Commit 58b16c12 authored by cazenave's avatar cazenave
Browse files

change environnement

parent 869e2da8
// public/config.js
window.config = {
publicPath: '',
apiURL: 'http://10.6.10.9'}
apiURL: http://fdp-api.f2ds.svc.cluster.local
}
This source diff could not be displayed because it is too large. You can view the blob instead.
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,700&display=swap" rel=stylesheet><script src=/app/config.js></script><link rel=icon href=/app/favicon.ico><title>EOSC-Pillar FAIR Data Point</title><link href=/app/css/app.3b04ddd3.css rel=preload as=style><link href=/app/js/app.fb8496d5.js rel=preload as=script><link href=/app/js/chunk-vendors.eeff047d.js rel=preload as=script><link href=/app/css/app.3b04ddd3.css rel=stylesheet></head><body><noscript><strong>We're sorry but fdp-client doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/app/js/chunk-vendors.eeff047d.js></script><script src=/app/js/app.fb8496d5.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,700&display=swap" rel=stylesheet><script src=/app/config.js></script><link rel=icon href=/app/favicon.ico><title>EOSC-Pillar FAIR Data Point</title><link href=/app/css/app.835b235b.css rel=preload as=style><link href=/app/js/app.a05b368d.js rel=preload as=script><link href=/app/js/chunk-vendors.eeff047d.js rel=preload as=script><link href=/app/css/app.835b235b.css rel=stylesheet></head><body><noscript><strong>We're sorry but fdp-client doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/app/js/chunk-vendors.eeff047d.js></script><script src=/app/js/app.a05b368d.js></script></body></html>
\ No newline at end of file
(function(t){function e(e){for(var a,i,o=e[0],u=e[1],c=e[2],d=0,p=[];d<o.length;d++)i=o[d],Object.prototype.hasOwnProperty.call(n,i)&&n[i]&&p.push(n[i][0]),n[i]=0;for(a in u)Object.prototype.hasOwnProperty.call(u,a)&&(t[a]=u[a]);l&&l(e);while(p.length)p.shift()();return s.push.apply(s,c||[]),r()}function r(){for(var t,e=0;e<s.length;e++){for(var r=s[e],a=!0,o=1;o<r.length;o++){var u=r[o];0!==n[u]&&(a=!1)}a&&(s.splice(e--,1),t=i(i.s=r[0]))}return t}var a={},n={app:0},s=[];function i(e){if(a[e])return a[e].exports;var r=a[e]={i:e,l:!1,exports:{}};return t[e].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=t,i.c=a,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},i.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)i.d(r,a,function(e){return t[e]}.bind(null,a));return r},i.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/app/";var o=window["webpackJsonp"]=window["webpackJsonp"]||[],u=o.push.bind(o);o.push=e,o=o.slice();for(var c=0;c<o.length;c++)e(o[c]);var l=u;s.push([0,"chunk-vendors"]),r()})({0:function(t,e,r){t.exports=r("cd49")},1:function(t,e){},10:function(t,e){},2:function(t,e){},3:function(t,e){},4:function(t,e){},4678:function(t,e,r){var a={"./af":"2bfb","./af.js":"2bfb","./ar":"8e73","./ar-dz":"a356","./ar-dz.js":"a356","./ar-kw":"423e","./ar-kw.js":"423e","./ar-ly":"1cfd","./ar-ly.js":"1cfd","./ar-ma":"0a84","./ar-ma.js":"0a84","./ar-sa":"8230","./ar-sa.js":"8230","./ar-tn":"6d83","./ar-tn.js":"6d83","./ar.js":"8e73","./az":"485c","./az.js":"485c","./be":"1fc1","./be.js":"1fc1","./bg":"84aa","./bg.js":"84aa","./bm":"a7fa","./bm.js":"a7fa","./bn":"9043","./bn.js":"9043","./bo":"d26a","./bo.js":"d26a","./br":"6887","./br.js":"6887","./bs":"2554","./bs.js":"2554","./ca":"d716","./ca.js":"d716","./cs":"3c0d","./cs.js":"3c0d","./cv":"03ec","./cv.js":"03ec","./cy":"9797","./cy.js":"9797","./da":"0f14","./da.js":"0f14","./de":"b469","./de-at":"b3eb","./de-at.js":"b3eb","./de-ch":"bb71","./de-ch.js":"bb71","./de.js":"b469","./dv":"598a","./dv.js":"598a","./el":"8d47","./el.js":"8d47","./en-SG":"cdab","./en-SG.js":"cdab","./en-au":"0e6b","./en-au.js":"0e6b","./en-ca":"3886","./en-ca.js":"3886","./en-gb":"39a6","./en-gb.js":"39a6","./en-ie":"e1d3","./en-ie.js":"e1d3","./en-il":"7333","./en-il.js":"7333","./en-nz":"6f50","./en-nz.js":"6f50","./eo":"65db","./eo.js":"65db","./es":"898b","./es-do":"0a3c","./es-do.js":"0a3c","./es-us":"55c9","./es-us.js":"55c9","./es.js":"898b","./et":"ec18","./et.js":"ec18","./eu":"0ff2","./eu.js":"0ff2","./fa":"8df4","./fa.js":"8df4","./fi":"81e9","./fi.js":"81e9","./fo":"0721","./fo.js":"0721","./fr":"9f26","./fr-ca":"d9f8","./fr-ca.js":"d9f8","./fr-ch":"0e49","./fr-ch.js":"0e49","./fr.js":"9f26","./fy":"7118","./fy.js":"7118","./ga":"5120","./ga.js":"5120","./gd":"f6b4","./gd.js":"f6b4","./gl":"8840","./gl.js":"8840","./gom-latn":"0caa","./gom-latn.js":"0caa","./gu":"e0c5","./gu.js":"e0c5","./he":"c7aa","./he.js":"c7aa","./hi":"dc4d","./hi.js":"dc4d","./hr":"4ba9","./hr.js":"4ba9","./hu":"5b14","./hu.js":"5b14","./hy-am":"d6b6","./hy-am.js":"d6b6","./id":"5038","./id.js":"5038","./is":"0558","./is.js":"0558","./it":"6e98","./it-ch":"6f12","./it-ch.js":"6f12","./it.js":"6e98","./ja":"079e","./ja.js":"079e","./jv":"b540","./jv.js":"b540","./ka":"201b","./ka.js":"201b","./kk":"6d79","./kk.js":"6d79","./km":"e81d","./km.js":"e81d","./kn":"3e92","./kn.js":"3e92","./ko":"22f8","./ko.js":"22f8","./ku":"2421","./ku.js":"2421","./ky":"9609","./ky.js":"9609","./lb":"440c","./lb.js":"440c","./lo":"b29d","./lo.js":"b29d","./lt":"26f9","./lt.js":"26f9","./lv":"b97c","./lv.js":"b97c","./me":"293c","./me.js":"293c","./mi":"688b","./mi.js":"688b","./mk":"6909","./mk.js":"6909","./ml":"02fb","./ml.js":"02fb","./mn":"958b","./mn.js":"958b","./mr":"39bd","./mr.js":"39bd","./ms":"ebe4","./ms-my":"6403","./ms-my.js":"6403","./ms.js":"ebe4","./mt":"1b45","./mt.js":"1b45","./my":"8689","./my.js":"8689","./nb":"6ce3","./nb.js":"6ce3","./ne":"3a39","./ne.js":"3a39","./nl":"facd","./nl-be":"db29","./nl-be.js":"db29","./nl.js":"facd","./nn":"b84c","./nn.js":"b84c","./pa-in":"f3ff","./pa-in.js":"f3ff","./pl":"8d57","./pl.js":"8d57","./pt":"f260","./pt-br":"d2d4","./pt-br.js":"d2d4","./pt.js":"f260","./ro":"972c","./ro.js":"972c","./ru":"957c","./ru.js":"957c","./sd":"6784","./sd.js":"6784","./se":"ffff","./se.js":"ffff","./si":"eda5","./si.js":"eda5","./sk":"7be6","./sk.js":"7be6","./sl":"8155","./sl.js":"8155","./sq":"c8f3","./sq.js":"c8f3","./sr":"cf1e","./sr-cyrl":"13e9","./sr-cyrl.js":"13e9","./sr.js":"cf1e","./ss":"52bd","./ss.js":"52bd","./sv":"5fbd","./sv.js":"5fbd","./sw":"74dc","./sw.js":"74dc","./ta":"3de5","./ta.js":"3de5","./te":"5cbb","./te.js":"5cbb","./tet":"576c","./tet.js":"576c","./tg":"3b1b","./tg.js":"3b1b","./th":"10e8","./th.js":"10e8","./tl-ph":"0f38","./tl-ph.js":"0f38","./tlh":"cf75","./tlh.js":"cf75","./tr":"0e81","./tr.js":"0e81","./tzl":"cf51","./tzl.js":"cf51","./tzm":"c109","./tzm-latn":"b53d","./tzm-latn.js":"b53d","./tzm.js":"c109","./ug-cn":"6117","./ug-cn.js":"6117","./uk":"ada2","./uk.js":"ada2","./ur":"5294","./ur.js":"5294","./uz":"2e8c","./uz-latn":"010e","./uz-latn.js":"010e","./uz.js":"2e8c","./vi":"2921","./vi.js":"2921","./x-pseudo":"fd7e","./x-pseudo.js":"fd7e","./yo":"7f33","./yo.js":"7f33","./zh-cn":"5c3a","./zh-cn.js":"5c3a","./zh-hk":"49ab","./zh-hk.js":"49ab","./zh-tw":"90ea","./zh-tw.js":"90ea"};function n(t){var e=s(t);return r(e)}function s(t){if(!r.o(a,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return a[t]}n.keys=function(){return Object.keys(a)},n.resolve=s,t.exports=n,n.id="4678"},5:function(t,e){},"5c0b":function(t,e,r){"use strict";var a=r("9c0c"),n=r.n(a);n.a},6:function(t,e){},7:function(t,e){},8:function(t,e){},"8ef2":function(t,e,r){},9:function(t,e){},"9c0c":function(t,e,r){},cd49:function(t,e,r){"use strict";r.r(e);r("d3b7"),r("e260"),r("e6cf"),r("cca6"),r("a79d");var a=r("2ef0"),n=r.n(a),s=r("2b0e"),i=r("5f5b"),o=r("1dce"),u=r.n(o),c=r("4a7a"),l=r.n(c),d=(r("c197"),r("5c90"),function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{attrs:{id:"app"}},[r("fdp-header"),r("router-view"),r("fdp-footer")],1)}),p=[],f=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"footer"},[r("div",{staticClass:"footer__inner"},[r("div",{staticClass:"footer__container"},[r("div",[r("span",[t._v("FAIR Data Point")]),r("span",{staticClass:"footer__separator"},[t._v("·")]),r("a",{directives:[{name:"b-modal",rawName:"v-b-modal.info-modal",modifiers:{"info-modal":!0}}],attrs:{href:"#"},on:{click:function(t){t.preventDefault()}}},[t._v("About")])])]),r("separator")],1),r("b-modal",{attrs:{id:"info-modal","hide-footer":"",title:"About"}},[r("version-info-table",{attrs:{title:"Server",version:t.info.version,"built-at":t.info.builtAt}}),r("version-info-table",{attrs:{title:"Client",version:"{version}","built-at":"{builtAt}"}})],1)],1)},m=[],h=(r("96cf"),r("89ba")),v=r("9f12"),b=r("53fe"),g=r("8b83"),y=r("c65a"),_=r("c03e"),j=r("9ab4"),O=r("60a3"),w=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"separator"})},k=[],$=function(t){function e(){return Object(v["a"])(this,e),Object(g["a"])(this,Object(y["a"])(e).apply(this,arguments))}return Object(_["a"])(e,t),e}(O["c"]);$=j["a"]([O["a"]],$);var C=$,x=C,S=r("2877"),E=Object(S["a"])(x,w,k,!1,null,null,null),P=E.exports,N=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"version-info-table"},[r("table",{staticClass:"table table-borderless"},[r("thead",[r("tr",[r("th",{attrs:{colspan:"2"}},[t._v(" "+t._s(t.title)+" ")])])]),r("tbody",[r("tr",[r("th",[t._v("Version")]),r("td",[r("code",[t._v(t._s(t.version.slice(0,36)))])])]),r("tr",[r("th",[t._v("Built at")]),r("td",[t._v(t._s(t.builtAtFormatted))])])])])])},D=[],R=r("c1df"),U=r.n(R),F=function(t){function e(){return Object(v["a"])(this,e),Object(g["a"])(this,Object(y["a"])(e).apply(this,arguments))}return Object(_["a"])(e,t),Object(b["a"])(e,[{key:"builtAtFormatted",get:function(){return U()(this.builtAt).format("D. M. YYYY, HH:mm")}}]),e}(O["c"]);j["a"]([Object(O["b"])({type:String,required:!0})],F.prototype,"title",void 0),j["a"]([Object(O["b"])({type:String,required:!0})],F.prototype,"version",void 0),j["a"]([Object(O["b"])({type:String,required:!0})],F.prototype,"builtAt",void 0),F=j["a"]([O["a"]],F);var A=F,q=A,I=Object(S["a"])(q,N,D,!1,null,null,null),M=I.exports,L=(r("99af"),r("bc3a")),T=r.n(L),B=n.a.get(window,"config.publicPath",""),V=n.a.get(window,"config.apiURL","".concat(window.location.protocol,"//").concat(window.location.host).concat(B)),z=function(){return n.a.get(window,"config.persistentURL",V)},G="DD-MM-Y",W={apiURL:V,dateFormat:G,persistentURL:z},K=T.a.create({baseURL:W.apiURL,headers:{Accept:"application/json"}}),Y=K;function H(t){return{get:function(e){return Y.get("/".concat(t,"/").concat(e),{headers:{Accept:"text/turtle"}})},getExpanded:function(e){return Y.get("/".concat(t,"/").concat(e,"/expanded"),{headers:{Accept:"text/turtle"}})},getSpec:function(){return Y.get("/".concat(t,"/spec"),{headers:{Accept:"text/turtle"}})},getMembership:function(e){return Y.get("/".concat(t,"/").concat(e,"/member"))},post:function(e){return Y.post("/".concat(t),e,{headers:{Accept:"text/turtle","Content-Type":"text/turtle"}})},put:function(e,r){return Y.put("/".concat(t,"/").concat(e),r,{headers:{Accept:"text/turtle","Content-Type":"text/turtle"}})},delete:function(e){return Y.delete("/".concat(t,"/").concat(e))},getMembers:function(e){return Y.get("/".concat(t,"/").concat(e,"/members"))},putMember:function(e,r,a){return Y.put("/".concat(t,"/").concat(e,"/members/").concat(r),{membershipUuid:a})},deleteMember:function(e,r){return Y.delete("/".concat(t,"/").concat(e,"/members/").concat(r))}}}var J={build:H},X={getBootstrap:function(){return Y.get("/configs/bootstrap")}},Q={getInfo:function(){return Y.get("/actuator/info")}},Z={get:function(){return Y.get("/",{headers:{Accept:"text/turtle"}})},getExpanded:function(){return Y.get("/expanded",{headers:{Accept:"text/turtle"}})},getSpec:function(){return Y.get("/spec",{headers:{Accept:"text/turtle"}})},put:function(t,e){return Y.put("/",e,{headers:{Accept:"text/turtle","Content-Type":"text/turtle"}})},delete:function(){return Y.delete("/")},getMembership:function(){return Promise.resolve({data:{}})},getDashboard:function(){return Y.get("/dashboard")}},tt={getMemberships:function(){return Y.get("/memberships")}},et={getShapes:function(){return Y.get("/shapes")},getShape:function(t){return Y.get("/shapes/".concat(t))},postShape:function(t){return Y.post("/shapes",t)},putShape:function(t){return Y.put("/shapes/".concat(t.uuid),t)},deleteShape:function(t){return Y.delete("/shapes/".concat(t.uuid))}},rt={fetchToken:function(t,e){return Y.post("/tokens",{email:t,password:e})}},at={getUsers:function(){return Y.get("/users")},getUser:function(t){return Y.get("/users/".concat(t))},getUserCurrent:function(){return Y.get("/users/current")},postUser:function(t){return Y.post("/users",t)},putUser:function(t){return Y.put("/users/".concat(t.uuid),t)},deleteUser:function(t){return Y.delete("/users/".concat(t.uuid))},putUserPassword:function(t,e){return Y.put("/users/".concat(t.uuid,"/password"),{password:e})}},nt={builder:J,configs:X,info:Q,memberships:tt,repository:Z,shapes:et,tokens:rt,users:at},st=function(t){function e(){var t;return Object(v["a"])(this,e),t=Object(g["a"])(this,Object(y["a"])(e).apply(this,arguments)),t.info={version:"",builtAt:""},t}return Object(_["a"])(e,t),Object(b["a"])(e,[{key:"created",value:function(){this.fetchData()}},{key:"fetchData",value:function(){var t=Object(h["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,nt.info.getInfo();case 2:e=t.sent,this.info=e.data;case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()}]),e}(O["c"]);st=j["a"]([Object(O["a"])({components:{Separator:P,VersionInfoTable:M}})],st);var it=st,ot=it,ut=Object(S["a"])(ot,f,m,!1,null,null,null),ct=ut.exports,lt=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"header"},[r("div",{staticClass:"header__container"},[r("router-link",{staticClass:"header__repository-name",attrs:{to:"/"}},[r("span",{staticClass:"header__repository-name__title--full"},[t._v(" FAIR Data Point ")]),r("span",{staticClass:"header__repository-name__title--short"},[t._v(" FDP ")])]),r("div",{staticClass:"header__nav"},[r("div",{staticClass:"header__menu"},[t.user?r("b-dropdown",{attrs:{right:"",variant:"link","data-cy":"user-menu"},scopedSlots:t._u([{key:"button-content",fn:function(){return[r("user-avatar",{attrs:{user:t.user,smaller:""}})]},proxy:!0}])},["ADMIN"===t.user.role?[r("b-dropdown-header",{attrs:{"data-cy":"user-menu-admin"}},[t._v(" FAIR Data Point ")]),r("b-dropdown-item",{on:{click:function(e){return t.$router.push("/users")}}},[r("fa",{attrs:{icon:["fas","user-friends"]}}),t._v(" Users ")],1),r("b-dropdown-item",{on:{click:function(e){return t.$router.push("/shapes")}}},[r("fa",{attrs:{icon:["fas","shapes"]}}),t._v(" SHACL shapes ")],1),r("b-dropdown-divider")]:t._e(),r("b-dropdown-header",{attrs:{"data-cy":"user-menu-user"}},[t._v(" "+t._s(t.user.firstName)+" "+t._s(t.user.lastName)+" ")]),r("b-dropdown-item",{on:{click:function(e){return t.$router.push("/my-metadata")}}},[r("fa",{attrs:{icon:["fas","project-diagram"]}}),t._v(" My Metadata ")],1),"ADMIN"===t.user.role?r("b-dropdown-item",{on:{click:function(e){return t.$router.push("/users/"+t.user.uuid)}}},[r("fa",{attrs:{icon:["fas","user-edit"]}}),t._v(" Edit profile ")],1):t._e(),r("b-dropdown-item",{on:{click:t.logout}},[r("fa",{attrs:{icon:["fas","sign-out-alt"]}}),t._v(" Log out ")],1)],2):r("router-link",{attrs:{to:"/login"}},[t._v(" Log in ")])],1)])],1),r("separator")],1)},dt=[],pt=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("avatar",{attrs:{initials:t.initials,value:t.user.email,smaller:t.smaller}})},ft=[],mt=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"avatar",class:{"avatar--smaller":t.smaller},style:"background: "+t.color},[t._v(" "+t._s(t.initials)+" ")])},ht=[],vt=(r("d81d"),r("ac1f"),r("1276"),function(t){function e(){return Object(v["a"])(this,e),Object(g["a"])(this,Object(y["a"])(e).apply(this,arguments))}return Object(_["a"])(e,t),Object(b["a"])(e,[{key:"color",get:function(){if(null===this.value)return"#ddd";var t=n.a.sum(this.value.split("").map((function(t){return 43*t.charCodeAt(0)}))),e=t%360,r=125+t%71,a=85+t%11,s=t+60,i=s%360,o=125+s%71,u=85+s%11;return"linear-gradient(45deg, hsl(".concat(e,", ").concat(r,"%, ").concat(a,"%), hsl(").concat(i,", ").concat(o,"%, ").concat(u,"%))")}}]),e}(O["c"]));j["a"]([Object(O["b"])({type:String,required:!0})],vt.prototype,"initials",void 0),j["a"]([Object(O["b"])({type:String,default:null})],vt.prototype,"value",void 0),j["a"]([Object(O["b"])({type:Boolean,default:!1})],vt.prototype,"smaller",void 0),vt=j["a"]([O["a"]],vt);var bt=vt,gt=bt,yt=Object(S["a"])(gt,mt,ht,!1,null,null,null),_t=yt.exports,jt=function(t){function e(){return Object(v["a"])(this,e),Object(g["a"])(this,Object(y["a"])(e).apply(this,arguments))}return Object(_["a"])(e,t),Object(b["a"])(e,[{key:"initials",get:function(){return this.user.firstName[0]+this.user.lastName[0]}}]),e}(O["c"]);j["a"]([Object(O["b"])({required:!0})],jt.prototype,"user",void 0),j["a"]([Object(O["b"])({type:Boolean,default:!1})],jt.prototype,"smaller",void 0),jt=j["a"]([Object(O["a"])({components:{Avatar:_t}})],jt);var Ot=jt,wt=Ot,kt=Object(S["a"])(wt,pt,ft,!1,null,null,null),$t=kt.exports,Ct=function(t){function e(){return Object(v["a"])(this,e),Object(g["a"])(this,Object(y["a"])(e).apply(this,arguments))}return Object(_["a"])(e,t),Object(b["a"])(e,[{key:"logout",value:function(){this.$store.dispatch("auth/logout"),"/"!==this.$router.currentRoute.path&&this.$router.push("/"),window.location.reload()}},{key:"authenticated",get:function(){return this.$store.getters["auth/authenticated"]}},{key:"user",get:function(){return this.$store.getters["auth/user"]}}]),e}(O["c"]);Ct=j["a"]([Object(O["a"])({components:{Separator:P,UserAvatar:$t,VersionInfoTable:M}})],Ct);var xt=Ct,St=xt,Et=Object(S["a"])(St,lt,dt,!1,null,null,null),Pt=Et.exports,Nt={components:{FdpFooter:ct,FdpHeader:Pt}},Dt=Nt,Rt=(r("5c0b"),Object(S["a"])(Dt,d,p,!1,null,null,null)),Ut=Rt.exports,Ft=(r("c975"),r("8c4f")),At=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("page",{attrs:{title:"My Metadata","content-only":""},scopedSlots:t._u([{key:"actions",fn:function(){return[r("a",{staticClass:"btn btn-link",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.expandAll(e)}}},[r("fa",{attrs:{icon:["fas","angle-double-down"]}}),t._v(" Expand all ")],1),r("a",{staticClass:"btn btn-link",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.collapseAll(e)}}},[r("fa",{attrs:{icon:["fas","angle-double-up"]}}),t._v(" Collapse all ")],1)]},proxy:!0},{key:"content",fn:function(){return[r("status-flash",{attrs:{status:t.status}}),t.dashboard&&t.dashboard.length>0?r("div",{staticClass:"item-list"},t._l(t.sortByTitle(t.dashboard),(function(e){return r("div",{key:e.uri,staticClass:"item-list__item"},[e.children.length>0?r("a",{staticClass:"item-list__item__control",on:{click:function(r){return r.preventDefault(),t.toggleOpen(e)}}},[r("fa",{attrs:{icon:["fas",e.open?"chevron-down":"chevron-right"]}})],1):r("span",{staticClass:"item-list__item__control"}),r("avatar",{attrs:{initials:e.title[0],value:e.uri,smaller:""}}),r("div",{staticClass:"item-list__item__content"},[r("div",{staticClass:"item-list__item__content__row"},[r("a",{attrs:{href:""+e.uri}},[t._v(" "+t._s(e.title)+" ")])])]),r("div",{staticClass:"item-list__item__actions"},[r("membership-badge",{attrs:{entity:e}})],1),e.open?r("div",{staticClass:"item-list"},t._l(t.sortByTitle(e.children),(function(e){return r("div",{key:e.uri,staticClass:"item-list__item"},[e.children.length>0?r("a",{staticClass:"item-list__item__control",on:{click:function(r){return r.preventDefault(),t.toggleOpen(e)}}},[r("fa",{attrs:{icon:["fas",e.open?"chevron-down":"chevron-right"]}})],1):r("span",{staticClass:"item-list__item__control"}),r("avatar",{attrs:{initials:e.title[0],value:e.uri,smaller:""}}),r("div",{staticClass:"item-list__item__content"},[r("div",{staticClass:"item-list__item__content__row"},[r("a",{attrs:{href:""+e.uri}},[t._v(" "+t._s(e.title)+" ")])])]),r("div",{staticClass:"item-list__item__actions"},[r("membership-badge",{attrs:{entity:e}})],1),e.open?r("div",{staticClass:"item-list"},t._l(t.sortByTitle(e.children),(function(e){return r("div",{key:e.uri,staticClass:"item-list__item"},[r("avatar",{attrs:{initials:e.title[0],value:e.uri,smaller:""}}),r("div",{staticClass:"item-list__item__content"},[r("div",{staticClass:"item-list__item__content__row"},[r("a",{attrs:{href:""+e.uri}},[t._v(" "+t._s(e.title)+" ")])])]),r("div",{staticClass:"item-list__item__actions"},[r("membership-badge",{attrs:{entity:e}})],1)],1)})),0):t._e()],1)})),0):t._e()],1)})),0):t._e(),t.dashboard&&0===t.dashboard.length?r("div",[r("p",[t._v(" You have no metadata. ")])]):t._e()]},proxy:!0}])})],1)},qt=[],It=(r("a4d3"),r("4de4"),r("4160"),r("e439"),r("dbb4"),r("b64b"),r("159b"),r("2fa7")),Mt=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"page",class:{"page--content-only":t.contentOnly,"page--small":t.small}},[r("div",{staticClass:"page__title"},[t.title?r("h1",[t._v(" "+t._s(t.title)+" ")]):t._e(),r("div",{staticClass:"page__actions"},[t._t("actions")],2)]),r("div",{staticClass:"page__content-wrapper"},[t.contentOnly?t._e():r("div",{staticClass:"page__column"},[t._t("column")],2),r("div",{staticClass:"page__content"},[t._t("content")],2)])])},Lt=[],Tt=function(t){function e(){return Object(v["a"])(this,e),Object(g["a"])(this,Object(y["a"])(e).apply(this,arguments))}return Object(_["a"])(e,t),e}(O["c"]);j["a"]([Object(O["b"])({type:String,default:null})],Tt.prototype,"title",void 0),j["a"]([Object(O["b"])({type:Boolean,default:!1})],Tt.prototype,"contentOnly",void 0),j["a"]([Object(O["b"])({type:Boolean,default:!1})],Tt.prototype,"small",void 0),Tt=j["a"]([O["a"]],Tt);var Bt=Tt,Vt=Bt,zt=Object(S["a"])(Vt,Mt,Lt,!1,null,null,null),Gt=zt.exports,Wt=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"status-flash"},[t.status.isDefault()?t._e():r("div",{class:{loader:t.status.isPending()&&!t.noLoading,"status-flash--large":t.status.isError()&&t.status.errorCode>0,"status-flash__alert status-flash__alert--danger":t.status.isError()&&!(t.status.errorCode>0),"status-flash__alert status-flash__alert--success":t.status.isSuccess()}},[t.status.isPending()&&!t.noLoading?[r("fa",{attrs:{icon:["fas","spinner"],spin:""}}),t._v(" Loading... ")]:t._e(),404===t.status.errorCode?[t._v(" 404 Not Found ")]:t.status.message?[t._v(" "+t._s(t.status.message)+" ")]:t._e()],2)])},Kt=[],Yt=(r("caad"),r("2532"),function(){function t(){Object(v["a"])(this,t),this.clear()}return Object(b["a"])(t,[{key:"setStatus",value:function(t,e){this.status=t,this.msg=e}},{key:"isPending",value:function(){return this.status===t.PENDING}},{key:"isDefault",value:function(){return this.status===t.DEFAULT}},{key:"isError",value:function(){return this.status===t.ERROR}},{key:"isSuccess",value:function(){return this.status===t.SUCCESS}},{key:"setPending",value:function(){this.clear(),this.status=t.PENDING,this.errorCode=null}},{key:"setError",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.status=t.ERROR,this.msg=e,this.errorCode=r}},{key:"setErrorFromResponse",value:function(e,r){this.status=t.ERROR,this.msg=n.a.get(e,"response.data.message",r),this.errorCode=n.a.includes(n.a.get(e,"message"),"404")?404:null}},{key:"setDone",value:function(e){this.msg=e,this.status=e?t.SUCCESS:t.DEFAULT}},{key:"clear",value:function(){this.status=t.DEFAULT,this.msg=null,this.errorCode=null}},{key:"message",get:function(){return this.msg}}]),t}());Yt.PENDING="PENDING",Yt.ERROR="ERROR",Yt.SUCCESS="SUCCESS",Yt.DEFAULT="DEFAULT";var Ht=function(t){function e(){return Object(v["a"])(this,e),Object(g["a"])(this,Object(y["a"])(e).apply(this,arguments))}return Object(_["a"])(e,t),e}(O["c"]);j["a"]([Object(O["b"])({type:Yt,required:!0})],Ht.prototype,"status",void 0),j["a"]([Object(O["b"])({type:Boolean,default:!1})],Ht.prototype,"noLoading",void 0),Ht=j["a"]([O["a"]],Ht);var Jt=Ht,Xt=Jt,Qt=Object(S["a"])(Xt,Wt,Kt,!1,null,null,null),Zt=Qt.exports,te=function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.role?r("span",{staticClass:"membership-badge",attrs:{"data-cy":"membership-badge"}},[t._v(" "+t._s(t.role)+" ")]):t._e()},ee=[],re=function(t){function e(){return Object(v["a"])(this,e),Object(g["a"])(this,Object(y["a"])(e).apply(this,arguments))}return Object(_["a"])(e,t),Object(b["a"])(e,[{key:"role",get:function(){return n.a.get(this.entity,"membership.name")}}]),e}(O["c"]);j["a"]([Object(O["b"])({required:!0})],re.prototype,"entity",void 0),re=j["a"]([O["a"]],re);var ae=re,ne=ae,se=Object(S["a"])(ne,te,ee,!1,null,null,null),ie=se.exports;function oe(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function ue(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?oe(r,!0).forEach((function(e){Object(It["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):oe(r).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var ce={name:"Dashboard",components:{MembershipBadge:ie,Avatar:_t,StatusFlash:Zt,Page:Gt},data:function(){return{dashboard:null,status:new Yt}},watch:{$route:"fetchData"},created:function(){this.fetchData()},methods:{fetchData:function(){var t=Object(h["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,this.status.setPending(),t.next=4,nt.repository.getDashboard();case 4:e=t.sent,this.dashboard=e.data,this.status.setDone(),t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](0),this.status.setErrorFromResponse(t.t0,"Unable to load dashboard.");case 12:case"end":return t.stop()}}),t,this,[[0,9]])})));function e(){return t.apply(this,arguments)}return e}(),toggleOpen:function(t){this.changeOpen((function(e){return e.uri===t.uri?!e.open:e.open}))},expandAll:function(){this.changeOpen((function(){return!0}))},collapseAll:function(){this.changeOpen((function(){return!1}))},changeOpen:function(t){this.dashboard=this.dashboard.map((function(e){return ue({},e,{open:t(e),children:e.children.map((function(e){return ue({},e,{open:t(e)})}))})}))},sortByTitle:function(t){return n.a.orderBy(t,["title"],["asc"])}}},le=ce,de=Object(S["a"])(le,At,qt,!1,null,null,null),pe=de.exports,fe=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("entity-view",{attrs:{config:t.config}})},me=[],he=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[t.breadcrumbs&&t.breadcrumbs.length>0?r("breadcrumbs",{attrs:{links:t.breadcrumbs,current:t.entity.title}}):t._e(),r("status-flash",{attrs:{status:t.status}}),null!==t.entity?r("page",{attrs:{title:t.entity.title},scopedSlots:t._u([{key:"actions",fn:function(){return[r("membership-badge",{attrs:{entity:t.membership}}),t.actionEnabled("edit")&&(t.isAdmin||t.permissions.hasWrite(t.membership))?r("router-link",{staticClass:"btn btn-link",attrs:{to:t.actionUrl("edit"),"data-cy":"edit"}},[r("fa",{attrs:{icon:["fas","edit"]}}),t._v(" Edit ")],1):t._e(),t.actionEnabled("settings")&&(t.isAdmin||t.permissions.hasWrite(t.membership))?r("router-link",{staticClass:"btn btn-link",attrs:{to:t.actionUrl("settings"),"data-cy":"settings"}},[r("fa",{attrs:{icon:["fas","cog"]}}),t._v(" Settings ")],1):t._e(),t.actionEnabled("delete")&&t.isAdmin?r("a",{staticClass:"btn btn-link text-danger",attrs:{"data-cy":"delete"},on:{click:t.deleteEntity}},[r("fa",{attrs:{icon:["far","trash-alt"]}}),t._v(" Delete ")],1):t._e()]},proxy:!0},{key:"column",fn:function(){return[r("p",t._l(t.extraLinks,(function(e){return r("a",{key:e.url,staticClass:"btn btn-primary btn-rounded mr-3 mb-3",attrs:{href:e.url,target:"_blank"}},[r("fa",{attrs:{icon:e.icon}}),t._v(" "+t._s(e.label)+" ")],1)})),0),r("entity-metadata",{attrs:{metadata:t.metadata}})]},proxy:!0},{key:"content",fn:function(){return[r("p",{staticClass:"description"},[t._v(" "+t._s(t.entity.description)+" ")]),null!==t.itemList?r("item-list",{attrs:{title:t.itemList.title,items:t.itemList.items,"create-link":t.createLink,"data-cy":"item-list"}}):t._e()]},proxy:!0}],null,!1,2197107691)}):t._e()],1)},ve=[],be=(r("8a79"),r("284c")),ge=r("e587"),ye=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"breadcrumbs"},[r("div",{staticClass:"breadcrumbs__container"},[r("ul",[t._l(t.links,(function(e,a){return r("li",{key:a,attrs:{"data-cy":"breadcrumbs-link"}},[r("router-link",{attrs:{to:e.to}},[t._v(" "+t._s(e.label)+" ")])],1)})),r("li",{attrs:{"data-cy":"breadcrumbs-current"}},[t._v(" "+t._s(t.current)+" ")])],2)])])},_e=[],je=function(t){function e(){return Object(v["a"])(this,e),Object(g["a"])(this,Object(y["a"])(e).apply(this,arguments))}return Object(_["a"])(e,t),e}(O["c"]);j["a"]([Object(O["b"])({type:Array,required:!0})],je.prototype,"links",void 0),j["a"]([Object(O["b"])({type:String,required:!0})],je.prototype,"current",void 0),je=j["a"]([O["a"]],je);var Oe=je,we=Oe,ke=Object(S["a"])(we,ye,_e,!1,null,null,null),$e=ke.exports,Ce=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"entity-metadata"},t._l(t.filteredMetadata,(function(e,a){return r("div",{key:a,staticClass:"entity-metadata__item",class:{"entity-metadata__item--sm":e.sm}},[r("h3",[t._v(t._s(e.label))]),r("p",[e.links?t._l(e.links,(function(e,a){return r("a",{key:a,staticClass:"link",attrs:{href:e.uri,target:"_blank"}},[t._v(" "+t._s(e.label)+" ")])})):e.items?[r("ul",t._l(e.items,(function(e,a){return r("li",{key:a},[e.uri?r("a",{attrs:{href:e.uri,target:"_blank"}},[t._v(" "+t._s(e.label)+" ")]):[t._v(" "+t._s(e.label)+" ")]],2)})),0)]:[e.uri?r("a",{attrs:{href:e.uri,target:"_blank"}},[t._v(" "+t._s(e.value)+" ")]):[t._v(" "+t._s(e.value)+" ")]]],2)])})),0)},xe=[],Se=function(t){function e(){return Object(v["a"])(this,e),Object(g["a"])(this,Object(y["a"])(e).apply(this,arguments))}return Object(_["a"])(e,t),Object(b["a"])(e,[{key:"filteredMetadata",get:function(){return this.metadata.filter((function(t){return!t.items||t.items.length>0}))}}]),e}(O["c"]);j["a"]([Object(O["b"])({type:Array,default:[]})],Se.prototype,"metadata",void 0),Se=j["a"]([O["a"]],Se);var Ee=Se,Pe=Ee,Ne=Object(S["a"])(Pe,Ce,xe,!1,null,null,null),De=Ne.exports,Re=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"item-list"},[r("div",{staticClass:"item-list__header"},[r("h2",[t._v(" "+t._s(t.title)+" ")]),t.createLink?r("router-link",{staticClass:"btn btn-link",attrs:{to:t.createLink,"data-cy":"create"}},[r("fa",{attrs:{icon:["fas","plus"]}}),t._v(" Create ")],1):t._e()],1),0===t.items.length?r("div",{staticClass:"item-list__empty"},[t._v(" "+t._s(t.emptyText)+" ")]):t._e(),t._l(t.sortByTitle(t.items),(function(t,e){return r("item",{key:e,attrs:{item:t,"data-cy":"item"}})}))],2)},Ue=[],Fe=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"item"},[r("router-link",{staticClass:"item__title",attrs:{to:t.item.link}},[t._v(" "+t._s(t.item.title)+" ")]),t.item.description?r("p",{staticClass:"item__description"},[t._v(" "+t._s(t._f("truncate")(t.item.description))+" ")]):t._e(),t.item.tags?r("div",{staticClass:"item__tags"},t._l(t.item.tags,(function(e,a){return r("a",{key:a,staticClass:"item__tags__tag",attrs:{href:e.uri,target:"_blank"}},[t._v(" "+t._s(e.label)+" ")])})),0):t._e(),t.item.metadata?r("dl",{staticClass:"item__metadata"},[t._l(t.item.metadata,(function(e,a){return[r("dt",{key:a+"_label"},[t._v(" "+t._s(e.label)+" ")]),r("dd",{key:a+"_value"},[t._v(" "+t._s(e.value)+" ")])]}))],2):t._e()],1)},Ae=[],qe=function(t){function e(){return Object(v["a"])(this,e),Object(g["a"])(this,Object(y["a"])(e).apply(this,arguments))}return Object(_["a"])(e,t),e}(O["c"]);j["a"]([Object(O["b"])({required:!0})],qe.prototype,"item",void 0),qe=j["a"]([O["a"]],qe);var Ie=qe,Me=Ie,Le=Object(S["a"])(Me,Fe,Ae,!1,null,null,null),Te=Le.exports,Be=function(t){function e(){return Object(v["a"])(this,e),Object(g["a"])(this,Object(y["a"])(e).apply(this,arguments))}return Object(_["a"])(e,t),Object(b["a"])(e,[{key:"sortByTitle",value:function(t){return n.a.orderBy(t,["title"],["asc"])}},{key:"emptyText",get:function(){return"There are no ".concat(n.a.toLower(this.title),".")}}]),e}(O["c"]);j["a"]([Object(O["b"])({type:String,required:!0})],Be.prototype,"title",void 0),j["a"]([Object(O["b"])({type:Array,required:!0})],Be.prototype,"items",void 0),j["a"]([Object(O["b"])({type:String,required:!1,default:null})],Be.prototype,"createLink",void 0),Be=j["a"]([Object(O["a"])({components:{Item:Te}})],Be);var Ve=Be,ze=Ve,Ge=Object(S["a"])(ze,Re,Ue,!1,null,null,null),We=Ge.exports,Ke=r("bf2d"),Ye=r("851f"),He="http://fairdatapoint.org/",Je=(Ye["Namespace"](He),Ye["Namespace"]("http://datashapes.org/dash#")),Xe=Ye["Namespace"]("http://www.w3.org/ns/dcat#"),Qe=Ye["Namespace"]("http://purl.org/dc/terms/"),Ze=Ye["Namespace"]("http://rdf.biosemantics.org/ontologies/fdp-o#"),tr=Ye["Namespace"]("http://www.re3data.org/schema/3-0#"),er=Ye["Namespace"]("http://www.w3.org/1999/02/22-rdf-syntax-ns#"),rr=Ye["Namespace"]("http://www.w3.org/ns/shacl#"),ar={dash:"http://datashapes.org/dash#",dcat:"http://www.w3.org/ns/dcat#",dcite:"http://purl.org/spar/datacite/",dct:"http://purl.org/dc/terms/",fm:"https://purl.org/fair-metrics/",foaf:"http://xmlns.com/foaf/0.1/",language:"http://id.loc.gov/vocabulary/iso639-1/",r3d:"http://www.re3data.org/schema/3-0#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",sh:"http://www.w3.org/ns/shacl#",sio:"http://semanticscience.org/resource/",wd:"https://www.wikidata.org/wiki/",xsd:"http://www.w3.org/2001/XMLSchema#"};function nr(t){return n.a.last(t.split(/[/#]/))}var sr={pathTerm:nr};r("b0c0");function ir(t){var e=function(t){return n.a.upperFirst(n.a.lowerCase(sr.pathTerm(t)))};return t.name?n.a.capitalize(t.name):e(t.path)}function or(t){return t.nodeKind===rr("IRI").value||!!t.class}function ur(t){return 1!==t.maxCount}function cr(t){return t.nodeKind===rr("Literal").value}function lr(t){return t.minCount>0}var dr={getName:ir,isIRI:or,isList:ur,isLiteral:cr,isRequired:lr};function pr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function fr(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pr(r,!0).forEach((function(e){Object(It["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pr(r).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function mr(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return"object"!==Object(Ke["a"])(e)?fr({label:t,value:e},r):Array.isArray(e)?fr({label:t,items:e},r):fr({label:t,value:e.label,uri:e.uri},r)}function hr(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return mr(t,U()(e).format(W.dateFormat),r)}function vr(t){return{label:"Download RDF",links:[{label:"ttl",uri:"".concat(t,"?format=ttl")},{label:"rdf+xml",uri:"".concat(t,"?format=rdf")},{label:"json-ld",uri:"".concat(t,"?format=jsonld")}]}}function br(t){return t?{label:sr.pathTerm(t),uri:t}:null}function gr(t){return[hr("Metadata Issued",t.findOne(Ze("metadataIssued")),{sm:!0}),hr("Metadata Modified",t.findOne(Ze("metadataModified")),{sm:!0})]}function yr(t,e){if(!e)return null;switch(t.viewer){case Je("LabelViewer").value:return br(e);case Je("URIViewer").value:return{label:e,uri:e};default:return{label:e}}}function _r(t,e){if(1===e.maxCount){var r=t.findOne(Ye["namedNode"](e.path));return yr(e,r)}var a=t.findAll(Ye["namedNode"](e.path));return a.map((function(t){return yr(e,t)}))}function jr(t,e){var r=dr.getName(e),a=_r(t,e);return!a||n.a.isEmpty(a)?null:mr(r,_r(t,e))}var Or={field:mr,dateField:hr,rdfLinks:vr,commonMetadata:gr,itemFromPath:br,fromShaclField:jr};function wr(t,e){var r=n.a.get(t,"membership.permissions",[]);return r.filter((function(t){return t.code===e})).length>0}function kr(t){return wr(t,"W")}function $r(t){return wr(t,"C")}var Cr={hasWrite:kr,hasCreate:$r},xr=(r("5db7"),r("13d5"),r("73d9"),r("e25e"),r("466d"),function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];Object(v["a"])(this,t),this.fields=e}),Sr=function t(e,r,a,n,s){Object(v["a"])(this,t),this.name=e,this.path=r,this.minCount=a,this.maxCount=n,this.nodeShape=s},Er=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;Object(v["a"])(this,t),this.maxDepth=r,this.store=Ye["graph"](),Ye["parse"](e,this.store,He,"text/turtle",null)}return Object(b["a"])(t,[{key:"parse",value:function(t){var e=this;return t.flatMap((function(t){return e.loadShapes(t)})).map((function(t){return e.loadShapeForm(t)})).reduce(this.mergeShapes)}},{key:"loadShapes",value:function(t){return this.store.match(null,rr("targetClass"),t,null).map((function(t){return t.subject}))}},{key:"loadShapeForm",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(r>this.maxDepth)return this.createEmptyShape();var a=this.loadProps(t,r),s=this.store.match(t,rr("and"),null,null),i=s.flatMap((function(t){var a=n.a.get(t,"object.elements");return a?a.flatMap((function(t){return e.loadElement(t,r)})):[]}));return this.createShape(i.concat(a),t)}},{key:"loadProps",value:function(t,e){var r=this;return this.store.match(t,rr("property"),null,null).flatMap((function(t){return r.parseShaclProp(t.object,e)}))}},{key:"loadElement",value:function(t,e){var r=this.store.match(t,er("type"),rr("NodeShape"),null).length>0;if(r){var a=this.loadShapeForm(t,e);return a.fields}return this.parseShaclProp(t,e)}},{key:"parseShaclProp",value:function(t,e){var r=this.store.match(t,rr("node"),null,null),a=n.a.get(r,"0.object"),s=a?this.loadShapeForm(a,e+1):null;return this.createField(this.getShaclValue(t,"name"),this.getShaclValue(t,"path"),this.parseIntNumber(this.getShaclValue(t,"minCount")),this.parseIntNumber(this.getShaclValue(t,"maxCount")),s,t)}},{key:"getShaclValue",value:function(t,e){var r=this.store.match(t,rr(e),null,null);return n.a.get(r,"0.object.value")}},{key:"getDashValue",value:function(t,e){var r=this.store.match(t,Je(e),null,null);return n.a.get(r,"0.object.value")}},{key:"parseIntNumber",value:function(t){return t?parseInt(t,10):null}}]),t}(),Pr=function(t){function e(t,r,a,n,s,i){var o;return Object(v["a"])(this,e),o=Object(g["a"])(this,Object(y["a"])(e).call(this,t,r,a,n,s)),o.viewer=i,o}return Object(_["a"])(e,t),e}(Sr),Nr=function(t){function e(){return Object(v["a"])(this,e),Object(g["a"])(this,Object(y["a"])(e).apply(this,arguments))}return Object(_["a"])(e,t),Object(b["a"])(e,[{key:"createEmptyShape",value:function(){return new xr([])}},{key:"createShape",value:function(t,e){return new xr(t)}},{key:"mergeShapes",value:function(t,e){return new xr([].concat(Object(be["a"])(t.fields),Object(be["a"])(e.fields)))}},{key:"createField",value:function(t,e,r,a,n,s){var i=this.getDashValue(s,"viewer");return i?[new Pr(t,e,r,a,n,i)]:[]}}]),e}(Er);function Dr(t,e){var r=new Nr(t);return r.parse(e)}r("7db0");var Rr=function(){function t(e,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"text/turtle";Object(v["a"])(this,t),this.defaultSubject=null,this.store=Ye["graph"](),this.defaultSubject=Ye["namedNode"](r),Ye["parse"](e,this.store,r,a,null)}return Object(b["a"])(t,[{key:"findOne",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.a.first(this.find(t,e))}},{key:"findAll",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.find(t,e)}},{key:"find",value:function(t,e){var r=n.a.get(e,"subject",this.defaultSubject),a=n.a.get(e,"value",!0),s=this.store.match(r,t);return s.map((function(t){return n.a.get(t,"object".concat(a?".value":""))}))}},{key:"subjectTerm",get:function(){return sr.pathTerm(this.defaultSubject.value)}}]),t}(),Ur=function(t){function e(){var t;return Object(v["a"])(this,e),t=Object(g["a"])(this,Object(y["a"])(e).apply(this,arguments)),t.breadcrumbs=null,t.entity=null,t.graph=null,t.status=new Yt,t}return Object(_["a"])(e,t),Object(b["a"])(e,[{key:"created",value:function(){this.init()}},{key:"resetBase",value:function(){this.status=new Yt,this.breadcrumbs=null,this.graph=null,this.entity=null}},{key:"init",value:function(){var t=Object(h["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:this.resetBase(),this.reset(),this.fetchData();case 3:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"reset",value:function(){}},{key:"fetchData",value:function(){var t=Object(h["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",Promise.resolve());case 1:case"end":return t.stop()}}),t)})));function e(){return t.apply(this,arguments)}return e}()},{key:"buildGraph",value:function(t){this.graph=new Rr(t,this.subject),this.createEntityData()}},{key:"createEntityData",value:function(){this.entity={title:this.graph.findOne(Qe("title")),description:this.graph.findOne(Qe("description"))}}},{key:"entityId",get:function(){return this.$route.params.id}},{key:"subject",get:function(){return this.config.subject(this.entityId)}},{key:"isAdmin",get:function(){return this.$store.getters["auth/isAdmin"]}},{key:"isAuthenticated",get:function(){return this.$store.getters["auth/authenticated"]}}]),e}(O["c"]);j["a"]([Object(O["b"])({required:!0})],Ur.prototype,"config",void 0),j["a"]([Object(O["d"])("$route")],Ur.prototype,"init",null),Ur=j["a"]([Object(O["a"])({})],Ur);var Fr=Ur,Ar=function(t){function e(){var t;return Object(v["a"])(this,e),t=Object(g["a"])(this,Object(y["a"])(e).apply(this,arguments)),t.createLink=null,t.extraLinks=[],t.itemList=null,t.membership=null,t.metadata=null,t.shape=null,t}return Object(_["a"])(e,t),Object(b["a"])(e,[{key:"actionEnabled",value:function(t){return n.a.includes(this.config.viewActions,t)}},{key:"actionUrl",value:function(t){var e=this.$route.path;return n.a.endsWith("/",e)?"".concat(e).concat(t):"".concat(e,"/").concat(t)}},{key:"reset",value:function(){this.metadata=null,this.itemList=null,this.membership=null,this.extraLinks=[],this.createLink=null,this.shape=null}},{key:"fetchData",value:function(){var t=Object(h["a"])(regeneratorRuntime.mark((function t(){var e,r,a,n,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,this.status.setPending(),t.next=4,this.loadData();case 4:e=t.sent,r=Object(ge["a"])(e,3),a=r[0],n=r[1],s=r[2],this.buildGraph(a.data),this.shape=Dr(n.data,this.config.targetClasses),this.membership=s.data,this.metadata=this.createMetadata(),this.extraLinks=this.config.getLinks(this.graph),this.breadcrumbs=this.config.createBreadcrumbs(this.graph,this.entityId),this.config.hasChildren&&(this.itemList=this.config.createChildrenList(this.graph)),this.canCreateChild&&(this.createLink=this.config.createChildUrl(this.entityId)),this.status.setDone(),t.next=23;break;case 20:t.prev=20,t.t0=t["catch"](0),this.status.setErrorFromResponse(t.t0,"Unable to get data.");case 23:case"end":return t.stop()}}),t,this,[[0,20]])})));function e(){return t.apply(this,arguments)}return e}()},{key:"loadData",value:function(){var t=Object(h["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",T.a.all([this.config.api.getExpanded(this.entityId),this.config.api.getSpec(),this.getMembership()]));case 1:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getMembership",value:function(){return this.isAuthenticated?this.config.api.getMembership(this.entityId):Promise.resolve({data:{}})}},{key:"createMetadata",value:function(){return[].concat(Object(be["a"])(Or.commonMetadata(this.graph)),Object(be["a"])(this.createLocalMetadata()),[Or.rdfLinks(this.subject)])}},{key:"createLocalMetadata",value:function(){var t=this;return this.shape.fields.map((function(e){return Or.fromShaclField(t.graph,e)})).filter((function(t){return null!==t}))}},{key:"deleteEntity",value:function(){var t=Object(h["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!window.confirm("Are you sure you want to delete ".concat(this.entity.title,"?"))){t.next=12;break}return t.prev=1,t.next=4,this.config.api.delete(this.entityId);case 4:return e=n.a.get(n.a.last(this.breadcrumbs),"to","/"),t.next=7,this.$router.push(e);case 7:t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](1),this.status.setError("Unable to delete data.");case 12:case"end":return t.stop()}}),t,this,[[1,9]])})));function e(){return t.apply(this,arguments)}return e}()},{key:"permissions",get:function(){return Cr}},{key:"canCreateChild",get:function(){return this.config.hasChildren&&(this.isAdmin||this.config.canCreateChild(this.isAuthenticated,this.membership))}}]),e}(Fr);Ar=j["a"]([Object(O["a"])({components:{Breadcrumbs:$e,EntityMetadata:De,ItemList:We,MembershipBadge:ie,Page:Gt,StatusFlash:Zt}})],Ar);var qr=Ar,Ir=qr,Mr=Object(S["a"])(Ir,he,ve,!1,null,null,null),Lr=Mr.exports;r("fb6a");function Tr(){return"/"}function Br(t){return"/catalog/".concat(t)}function Vr(t){return"/dataset/".concat(t)}function zr(t){return"/distribution/".concat(t)}function Gr(){return"/create-catalog"}function Wr(t){return"/catalog/".concat(t,"/create-dataset")}function Kr(t){return"/dataset/".concat(t,"/create-distribution")}var Yr={repository:Tr,catalog:Br,dataset:Vr,distribution:zr,createCatalog:Gr,createDataset:Wr,createDistribution:Kr};function Hr(t,e){return{label:t,to:e}}function Jr(t){var e=t.findOne(Qe("title"));return[Hr(e,Yr.repository())]}function Xr(t){var e=t.findOne(Qe("isPartOf"),{value:!1}),r=t.findOne(Qe("title"),{subject:e});return[Hr(r,Yr.repository())]}function Qr(t){var e=Xr(t),r=t.findOne(Qe("title")),a=Hr(r,Yr.catalog(t.subjectTerm));return e.push(a),e}function Zr(t){var e=t.findOne(Qe("isPartOf"),{value:!1}),r=t.findOne(Qe("title"),{subject:e}),a=sr.pathTerm(e.value),n=t.findOne(Qe("isPartOf"),{subject:e,value:!1}),s=t.findOne(Qe("title"),{subject:n});return[Hr(s,Yr.repository()),Hr(r,Yr.catalog(a))]}function ta(t){var e=Zr(t),r=t.findOne(Qe("title")),a=Hr(r,Yr.dataset(t.subjectTerm));return e.push(a),e}function ea(t){var e=t.findOne(Qe("isPartOf"),{value:!1}),r=t.findOne(Qe("title"),{subject:e}),a=sr.pathTerm(e.value),n=t.findOne(Qe("isPartOf"),{subject:e,value:!1}),s=t.findOne(Qe("title"),{subject:n}),i=sr.pathTerm(n.value),o=t.findOne(Qe("isPartOf"),{subject:n,value:!1}),u=t.findOne(Qe("title"),{subject:o});return[Hr(u,Yr.repository()),Hr(s,Yr.catalog(i)),Hr(r,Yr.dataset(a))]}function ra(t){var e=ea(t),r=t.findOne(Qe("title")),a=Hr(r,Yr.distribution(t.subjectTerm));return e.push(a),e}var aa={createItem:Hr,fromRepository:Jr,fromCatalog:Xr,fromWithCatalog:Qr,fromDataset:Zr,fromWithDataset:ta,fromDistribution:ea,fromWithDistribution:ra},na=function(){function t(e){Object(v["a"])(this,t),this.spec=e,this.enityApi=this.buildApi()}return Object(b["a"])(t,[{key:"buildApi",value:function(){return nt.builder.build(this.spec.name)}},{key:"toUrl",value:function(t){return this.createUrl(this.spec.name,t)}},{key:"subject",value:function(t){return"".concat(W.persistentURL(),"/").concat(this.spec.name,"/").concat(t)}},{key:"getLinks",value:function(t){return null===this.spec.links?null:this.spec.links.flatMap((function(e){var r=t.findOne(Ye["namedNode"](e.relation));return r?[{label:e.label,icon:e.icon,url:r}]:[]}))}},{key:"canCreateChild",value:function(t,e){return t&&Cr.hasCreate(e)}},{key:"createChildUrl",value:function(t){return"/".concat(this.spec.name,"/").concat(t,"/create-").concat(this.spec.children.name)}},{key:"createChildrenList",value:function(t){var e=this,r=t.findAll(Ye["namedNode"](this.spec.children.relation),{value:!1}).map((function(r){var a=sr.pathTerm(n.a.get(r,"value")),s={subject:r},i=e.spec.children.tags?t.findAll(Ye["namedNode"](e.spec.children.tags),s).map(Or.itemFromPath):null,o=e.spec.children.metadata?e.spec.children.metadata.map((function(e){var r=t.findOne(Ye["namedNode"](e.property),s);return Or.field(e.label,r)})):[];return{title:t.findOne(Qe("title"),s),link:"/".concat(e.spec.children.name,"/").concat(a),description:t.findOne(Qe("description"),s),tags:i,metadata:[Or.dateField("Issued",t.findOne(Ze("metadataIssued"),s)),Or.dateField("Modified",t.findOne(Ze("metadataModified"),s))].concat(o)}}));return{title:this.spec.children.title,items:r}}},{key:"createBreadcrumbsWithSelf",value:function(t,e){return[].concat(Object(be["a"])(this.createBreadcrumbs(t,e)),[aa.createItem(t.findOne(Qe("title")),this.toUrl(e))])}},{key:"createBreadcrumbs",value:function(t,e){var r=this,a=function e(a,s){if(0===a.length)return[];var i=a.pop(),o=t.findOne(Qe("isPartOf"),{value:!1,subject:s}),u=t.findOne(Qe("title"),{subject:o}),c=sr.pathTerm(n.a.get(o,"value")),l=r.createUrl(i,c),d=aa.createItem(u,l);return e(a,o).concat([d])};return a(this.spec.hierarchy.slice(),Ye["namedNode"](this.subject(e)))}},{key:"createUrl",value:function(t,e){return"repository"===t?"/":"/".concat(t,"/").concat(e)}},{key:"name",get:function(){return this.spec.name}},{key:"parentEntity",get:function(){return n.a.last(this.spec.hierarchy)}},{key:"api",get:function(){return this.enityApi}},{key:"entityType",get:function(){return this.spec.name.toUpperCase()}},{key:"targetClasses",get:function(){return this.spec.targetClasses.map(Ye["namedNode"])}},{key:"viewActions",get:function(){return["edit","settings","delete"]}},{key:"hasChildren",get:function(){return null!==this.spec.children}}]),t}(),sa=function(t){function e(){return Object(v["a"])(this,e),Object(g["a"])(this,Object(y["a"])(e).apply(this,arguments))}return Object(_["a"])(e,t),Object(b["a"])(e,[{key:"buildApi",value:function(){return nt.repository}},{key:"subject",value:function(t){return W.persistentURL()}},{key:"canCreateChild",value:function(t,e){return t}},{key:"createChildUrl",value:function(t){return"/create-".concat(this.spec.children.name)}},{key:"createBreadcrumbs",value:function(t,e){return[]}},{key:"viewActions",get:function(){return["edit"]}}]),e}(na),ia={name:"repository",targetClasses:[Xe("Resource").value,tr("Repository").value],children:{title:"Catalogs",name:"catalog",relation:tr("dataCatalog").value,tags:Xe("themeTaxonomy").value,metadata:null},hierarchy:[],links:null},oa=new sa(ia),ua=oa,ca=function(t){function e(){var t;return Object(v["a"])(this,e),t=Object(g["a"])(this,Object(y["a"])(e).apply(this,arguments)),t.config=ua,t}return Object(_["a"])(e,t),e}(O["c"]);ca=j["a"]([Object(O["a"])({components:{EntityView:Lr}})],ca);var la=ca,da=la,pa=Object(S["a"])(da,fe,me,!1,null,null,null),fa=pa.exports,ma=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("entity-edit",{attrs:{config:t.config}})},ha=[],va=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[null!==t.breadcrumbs?r("breadcrumbs",{attrs:{links:t.breadcrumbs,current:"Edit"}}):t._e(),r("status-flash",{attrs:{status:t.status}}),null!==t.simpleGraph?r("page",{attrs:{title:"Edit "+t.entity.title,"content-only":"",small:""},scopedSlots:t._u([{key:"content",fn:function(){return[r("shacl-form",{attrs:{rdf:t.simpleGraph.store,shacl:t.shacl,"target-classes":t.config.targetClasses,subject:t.subject,"validation-report":t.validationReport},on:{submit:t.onSubmit}})]},proxy:!0}],null,!1,3692498062)}):t._e()],1)},ba=[],ga=(r("5319"),function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("status-flash",{attrs:{status:t.status}}),!t.status.isError()&&t.form?r("form",{on:{submit:function(e){return e.preventDefault(),t.onSubmit(e)}}},[t.form?r("form-renderer",{attrs:{subject:t.subject,definition:t.form,"validation-report":t.validationReport},on:{input:t.onInput},model:{value:t.data,callback:function(e){t.data=e},expression:"data"}}):t._e(),r("div",{staticClass:"mb-5"},[r("a",{directives:[{name:"b-toggle",rawName:"v-b-toggle.rdf-view",modifiers:{"rdf-view":!0}}],staticClass:"text-primary collapse-link"},[t._v(" View RDF "),r("fa",{staticClass:"rotate-icon",attrs:{icon:["fas","angle-down"]}})],1),r("b-collapse",{attrs:{id:"rdf-view"}},[r("prism-editor",{attrs:{language:"turtle",readonly:!0},model:{value:t.turtle,callback:function(e){t.turtle=e},expression:"turtle"}})],1)],1),r("button",{staticClass:"btn btn-primary btn-rounded",attrs:{type:"submit","data-cy":"save"}},[t._v(" Save ")])],1):t._e()],1)}),ya=[],_a=r("431a"),ja=r.n(_a),Oa=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{key:t.componentKey,staticClass:"form form-renderer"},t._l(t.definition.fields,(function(e){return r("div",{key:""+e.path,class:{form__group:!0,"form__group--error":t.getError(e)}},[r("label",{class:{required:t.isRequired(e)}},[t._v(t._s(t.getName(e)))]),r(t.isList(e)?"ul":"div",{tag:"component"},t._l(t.data[e.path],(function(a,n){return r(t.isList(e)?"li":"div",{key:e.path+"."+n,tag:"component"},[r("div",{staticClass:"d-flex mt-3"},[e.nodeShape?r("form-renderer",{attrs:{definition:e.nodeShape,"validation-report":t.validationReport},on:{input:t.onInput},model:{value:t.data[e.path][n],callback:function(r){t.$set(t.data[e.path],n,r)},expression:"data[field.path][i]"}}):r("form-input",{attrs:{field:e},on:{input:t.onInput},model:{value:t.data[e.path][n],callback:function(r){t.$set(t.data[e.path],n,r)},expression:"data[field.path][i]"}}),t.canBeRemoved(e)?r("a",{staticClass:"text-danger ml-3 p-1",on:{click:function(r){return t.removeValue(e,n)}}},[r("fa",{attrs:{icon:["fas","times"]}})],1):t._e()],1)])})),1),t.isList(e)?r("button",{staticClass:"btn btn-link",on:{click:function(r){return r.preventDefault(),t.addValue(e)}}},[r("fa",{attrs:{icon:["fas","plus"]}}),t._v(" Add ")],1):t._e(),t.getError(e)?r("p",{staticClass:"invalid-feedback"},[t._v(" "+t._s(t.getError(e))+" ")]):t._e()],1)})),0)},wa=[],ka=(r("a434"),function(){var t=this,e=t.$createElement,r=t._self._c||e;return r(t.fieldElement,{tag:"component",staticClass:"input-field",attrs:{placeholder:t.placeholder,name:t.name},domProps:{value:t.textValue(t.value)},on:{input:t.onInput}})}),$a=[],Ca=function(t){function e(){return Object(v["a"])(this,e),Object(g["a"])(this,Object(y["a"])(e).apply(this,arguments))}return Object(_["a"])(e,t),Object(b["a"])(e,[{key:"textValue",value:function(t){return this.isIRI?n.a.get(t,"value",t):t}},{key:"onInput",value:function(t){this.$emit("input",this.sanitizeValue(t.target.value))}},{key:"sanitizeValue",value:function(t){if(this.isIRI)try{return Ye["namedNode"](t)}catch(e){return t}return t}},{key:"fieldElement",get:function(){return this.field.editor===Je("TextAreaEditor").value?"textarea":"input"}},{key:"isIRI",get:function(){return dr.isIRI(this.field)}},{key:"isLiteral",get:function(){return dr.isLiteral(this.field)}},{key:"placeholder",get:function(){return this.field.class?"Enter ".concat(this.field.class):this.field.datatype?"Enter ".concat(this.field.datatype):this.isIRI?"Enter IRI":this.isLiteral?"Enter a literal":""}},{key:"name",get:function(){return sr.pathTerm(this.field.path)}}]),e}(O["c"]);j["a"]([Object(O["b"])({required:!0})],Ca.prototype,"field",void 0),j["a"]([Object(O["b"])({required:!0})],Ca.prototype,"value",void 0),Ca=j["a"]([O["a"]],Ca);var xa=Ca,Sa=xa,Ea=Object(S["a"])(Sa,ka,$a,!1,null,null,null),Pa=Ea.exports,Na=function(t){function e(){var t;return Object(v["a"])(this,e),t=Object(g["a"])(this,Object(y["a"])(e).apply(this,arguments)),t.componentKey=0,t}return Object(_["a"])(e,t),Object(b["a"])(e,[{key:"createDefaultValue",value:function(t){return t.nodeShape?{subject:Ye["blankNode"](null),data:{}}:""}},{key:"createDefaultValueArray",value:function(t){return 1===t.minCount||1===t.maxCount?[this.createDefaultValue(t)]:[]}},{key:"created",value:function(){var t=this;this.data=this.definition.fields.reduce((function(e,r){return e[r.path]=n.a.get(t.value.data,r.path,t.createDefaultValueArray(r)),e}),{}),this.onInput()}},{key:"getName",value:function(t){return dr.getName(t)}},{key:"isRequired",value:function(t){return dr.isRequired(t)}},{key:"isList",value:function(t){return dr.isList(t)}},{key:"canBeRemoved",value:function(t){var e=this.data[t.path].length,r=n.a.get(t,"minCount",0);return this.isList(t)&&e>r}},{key:"addValue",value:function(t){this.data[t.path].push(this.createDefaultValue(t)),this.onInput()}},{key:"removeValue",value:function(t,e){this.data[t.path].splice(e,1),this.componentKey+=1,this.onInput()}},{key:"getError",value:function(t){var e="".concat(this.subject);return n.a.has(this.validationReport,e)?this.humanReadableError(t,this.validationReport[e][t.path]):null}},{key:"humanReadableError",value:function(t,e){switch(e){case rr("MinCountConstraintComponent").value:return"".concat(this.getName(t)," is required.");case rr("NodeKindConstraintComponent").value:return"".concat(this.getName(t)," requires a valid IRI.");default:return e}}},{key:"onInput",value:function(){this.$emit("input",{subject:this.value.subject,data:this.data,targetClasses:this.definition.targetClasses})}}]),e}(O["c"]);j["a"]([Object(O["b"])({required:!0})],Na.prototype,"definition",void 0),j["a"]([Object(O["b"])({required:!1,default:function(){return Ye["blankNode"](null)}})],Na.prototype,"subject",void 0),j["a"]([Object(O["b"])({required:!0})],Na.prototype,"validationReport",void 0),j["a"]([Object(O["b"])({required:!0})],Na.prototype,"value",void 0),Na=j["a"]([Object(O["a"])({name:"FormRenderer",components:{FormInput:Pa}})],Na);var Da=Na,Ra=Da,Ua=(r("f586"),Object(S["a"])(Ra,Oa,wa,!1,null,null,null)),Fa=Ua.exports,Aa=function(t){function e(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object(v["a"])(this,e),t=Object(g["a"])(this,Object(y["a"])(e).call(this,r)),t.targetClasses=a,t}return Object(_["a"])(e,t),e}(xr),qa=function(t){function e(t,r,a,n,s,i,o,u,c){var l;return Object(v["a"])(this,e),l=Object(g["a"])(this,Object(y["a"])(e).call(this,t,r,a,n,s)),l.datatype=i,l.nodeKind=o,l.class=u,l.minCount=a,l.maxCount=n,l.editor=c,l}return Object(_["a"])(e,t),e}(Sr),Ia=function(t){function e(){return Object(v["a"])(this,e),Object(g["a"])(this,Object(y["a"])(e).apply(this,arguments))}return Object(_["a"])(e,t),Object(b["a"])(e,[{key:"createEmptyShape",value:function(){return new Aa}},{key:"createShape",value:function(t,e){var r=this.store.match(e,rr("targetClass"),null,null).map((function(t){return t.object}));return new Aa(t,r)}},{key:"mergeShapes",value:function(t,e){return new Aa([].concat(Object(be["a"])(t.fields),Object(be["a"])(e.fields)),[].concat(Object(be["a"])(t.targetClasses),Object(be["a"])(e.targetClasses)))}},{key:"createField",value:function(t,e,r,a,n,s){var i=this.getDashValue(s,"editor");return i?[new qa(t,e,r,a,n,this.getShaclValue(s,"datatype"),this.getShaclValue(s,"nodeKind"),this.getShaclValue(s,"class"),i)]:[]}}]),e}(Er);r("4fad");function Ma(t,e,r){var a={};return t.fields.forEach((function(t){var n=r.match(e,Ye["namedNode"](t.path),null,null);n.length>0&&(a[t.path]=[],n.forEach((function(e){if(t.nodeShape)a[t.path].push(Ma(t.nodeShape,e.object,r));else if(dr.isIRI(t))try{a[t.path].push(Ye["namedNode"](e.object.value))}catch(n){}else a[t.path].push(e.object.value)})))})),{subject:e,data:a}}function La(t){return n.a.isObject(t)&&n.a.get(t,"data",!1)}function Ta(t){var e=n.a.get(t,"targetClasses",[]).map((function(e){return Ye["quad"](t.subject,er("type"),e,null)})),r=Object.entries(t.data).flatMap((function(e){var r=Object(ge["a"])(e,2),a=r[0],s=r[1];return n.a.isArray(s)?s.flatMap((function(e){if(La(e)){var r=Ta(e);return r.length>0?[Ye["quad"](t.subject,Ye["namedNode"](a),n.a.get(e,"subject"),null)].concat(Object(be["a"])(r)):[]}return n.a.isEmpty(e)?[]:[Ye["quad"](t.subject,Ye["namedNode"](a),e,null)]})):[]}));return e.concat(r)}function Ba(t,e,r,a){var n=Ye["namedNode"](r);a.fields.forEach((function(e){t.removeMany(n,Ye["namedNode"](e.path))})),t.addAll(Ta(e));var s=Ye["Serializer"](t);s.setFlags("sir"),Object.entries(ar).forEach((function(t){var e=Object(ge["a"])(t,2),r=e[0],a=e[1];s.suggestPrefix(r,a)}));var i=t.statementsMatching(void 0,void 0,void 0);return s.statementsToN3(i)}var Va=function(t){function e(){var t;return Object(v["a"])(this,e),t=Object(g["a"])(this,Object(y["a"])(e).apply(this,arguments)),t.data={subject:t.subject,data:{}},t.text="",t.turtle=null,t.status=new Yt,t}return Object(_["a"])(e,t),Object(b["a"])(e,[{key:"created",value:function(){try{var t=new Ia(this.shacl);this.form=t.parse(this.targetClasses),this.data=Ma(this.form,Ye["namedNode"](this.subject),this.rdf),this.status.setDone()}catch(e){this.status.setError("The form configuration is not valid.")}}},{key:"onInput",value:function(){this.turtle=Ba(this.rdf,this.data,this.subject,this.form)}},{key:"onSubmit",value:function(){this.$emit("submit",this.turtle)}}]),e}(O["c"]);j["a"]([Object(O["b"])({required:!0})],Va.prototype,"shacl",void 0),j["a"]([Object(O["b"])({required:!0})],Va.prototype,"rdf",void 0),j["a"]([Object(O["b"])({required:!0})],Va.prototype,"subject",void 0),j["a"]([Object(O["b"])({required:!0})],Va.prototype,"targetClasses",void 0),j["a"]([Object(O["b"])({required:!0})],Va.prototype,"validationReport",void 0),Va=j["a"]([Object(O["a"])({components:{FormRenderer:Fa,PrismEditor:ja.a,StatusFlash:Zt}})],Va);var za=Va,Ga=za,Wa=Object(S["a"])(Ga,ga,ya,!1,null,null,null),Ka=Wa.exports,Ya=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("form",{staticClass:"form",on:{submit:function(e){return e.preventDefault(),t.submit(e)}}},[t._l(t.spec.fields,(function(e){return r("div",{key:e.id,staticClass:"form__group",class:{"form__group--error":t.hasError(e.id)}},[r("label",{class:{required:e.required},attrs:{for:e.id}},[t._v(" "+t._s(e.label)+" ")]),e.multiple?[r("ul",t._l(t.$v.model[e.id].$each.$iter,(function(a,n){return r("li",{key:e.id+"."+n,staticClass:"form__group__input-item",class:{"form__group__input-item--error":a.value.$error}},[r("div",{staticClass:"d-flex"},[r("input",{directives:[{name:"model",rawName:"v-model.trim",value:a.value.$model,expression:"v.value.$model",modifiers:{trim:!0}}],domProps:{value:a.value.$model},on:{input:function(e){e.target.composing||t.$set(a.value,"$model",e.target.value.trim())},blur:function(e){return t.$forceUpdate()}}}),r("a",{staticClass:"text-danger ml-3 p-1",on:{click:function(r){t.model[e.id].splice(n,1)}}},[r("fa",{attrs:{icon:["fas","times"]}})],1)]),!1===a.value.required?r("p",{staticClass:"invalid-feedback"},[t._v(" Field is required ")]):t._e(),!1===a.value.url?r("p",{staticClass:"invalid-feedback"},[t._v(" This is not a valid IRI ")]):t._e()])})),0),r("button",{staticClass:"btn btn-outline-secondary btn-rounded",on:{click:function(r){r.preventDefault(),t.model[e.id].push({value:""})}}},[t._v(" Add ")])]:"xor"===e.type?[r("div",{staticClass:"form__group__xor-options"},t._l(e.options,(function(a){return r("label",{key:"radio-"+a.id},[r("input",{directives:[{name:"model",rawName:"v-model",value:t.$v.model[e.id].$model,expression:"$v.model[field.id].$model"}],attrs:{type:"radio",name:e.id},domProps:{value:a.id,checked:t._q(t.$v.model[e.id].$model,a.id)},on:{change:function(r){return t.$set(t.$v.model[e.id],"$model",a.id)}}}),t._v(" "+t._s(a.label)+" ")])})),0),t._l(e.options.filter((function(r){return r.id===t.model[e.id]})),(function(e){return[r("input",{directives:[{name:"model",rawName:"v-model.trim",value:t.$v.model[e.id].$model,expression:"$v.model[option.id].$model",modifiers:{trim:!0}}],key:"input-"+e.id,attrs:{id:e.id,name:e.id,placeholder:e.label},domProps:{value:t.$v.model[e.id].$model},on:{input:function(r){r.target.composing||t.$set(t.$v.model[e.id],"$model",r.target.value.trim())},blur:function(e){return t.$forceUpdate()}}}),!1===t.$v.model[e.id].required?r("p",{key:"err-req-"+e.id,staticClass:"invalid-feedback"},[t._v(" Field is required ")]):t._e(),!1===t.$v.model[e.id].url?r("p",{key:"err-url-"+e.id,staticClass:"invalid-feedback"},[t._v(" This is not a valid IRI ")]):t._e()]}))]:["text"===e.type?r("textarea",{directives:[{name:"model",rawName:"v-model.trim",value:t.$v.model[e.id].$model,expression:"$v.model[field.id].$model",modifiers:{trim:!0}}],attrs:{id:e.id,name:e.id,placeholder:e.label},domProps:{value:t.$v.model[e.id].$model},on:{input:function(r){r.target.composing||t.$set(t.$v.model[e.id],"$model",r.target.value.trim())},blur:function(e){return t.$forceUpdate()}}}):r("input",{directives:[{name:"model",rawName:"v-model.trim",value:t.$v.model[e.id].$model,expression:"$v.model[field.id].$model",modifiers:{trim:!0}}],attrs:{id:e.id,name:e.id,placeholder:e.label},domProps:{value:t.$v.model[e.id].$model},on:{input:function(r){r.target.composing||t.$set(t.$v.model[e.id],"$model",r.target.value.trim())},blur:function(e){return t.$forceUpdate()}}}),!1===t.$v.model[e.id].required?r("p",{staticClass:"invalid-feedback"},[t._v(" Field is required ")]):t._e(),!1===t.$v.model[e.id].url?r("p",{staticClass:"invalid-feedback"},[t._v(" This is not a valid IRI ")]):t._e()]],2)})),t._m(0)],2)},Ha=[function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("button",{staticClass:"btn btn-primary btn-rounded",attrs:{"data-cy":"save"}},[t._v(" Save ")])])}],Ja=r("b5ae");function Xa(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function Qa(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Xa(r,!0).forEach((function(e){Object(It["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xa(r).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Za={name:"FormGenerator",props:{spec:{type:Object,required:!0},entity:{type:Object,required:!0},onSubmit:{type:Function,required:!0}},data:function(){return{model:this.createModel()}},validations:function(){var t=this,e=function e(r){var a={},n={};return r.required&&(a=Qa({},a,{required:Ja["required"]})),"iri"===r.type&&(a=Qa({},a,{url:Ja["url"]})),"xor"===r.type&&(n=r.options.reduce((function(a,n){return Qa({},a,{},e(Qa({},n,{required:t.model[r.id]===n.id&&r.required})))}),{})),r.multiple&&(a={$each:{value:a}}),Qa(Object(It["a"])({},r.id,a),n)};return{model:this.spec.fields.reduce((function(t,r){var a=e(r);return Qa({},t,{},a)}),{})}},methods:{hasError:function(t){var e=this.spec.fields.filter((function(e){return e.id===t&&"xor"===e.type})).length>0,r=!!e&&this.$v.model[this.model[t]].$error;return this.$v.model[t].$error||r},submit:function(){this.$v.model.$touch(),this.$v.model.$invalid||this.onSubmit(this.getSanitizedModel())},createModel:function(){var t=Qa({},this.entity);return this.spec.fields.filter((function(t){return"xor"===t.type})).forEach((function(e){t[e.id]=e.options.reduce((function(e,r){return t[r.id]?r.id:e}),e.options[0].id)})),t},getSanitizedModel:function(){var t=Qa({},this.model);return this.spec.fields.filter((function(t){return"xor"===t.type})).forEach((function(e){var r=t[e.id];e.options.forEach((function(e){e.id!==r&&(t[e.id]=null)})),delete t[e.id]})),t}}},tn=Za,en=Object(S["a"])(tn,Ya,Ha,!1,null,null,null),rn=en.exports;function an(t,e){var r=e.findOne(rr("resultPath"),{subject:t});if(r){var a=e.findOne(rr("focusNode"),{subject:t}),n=e.findOne(rr("sourceConstraintComponent"),{subject:t});return Object(It["a"])({},a,Object(It["a"])({},r,n))}var s=e.findOne(rr("detail"),{subject:t,value:!1});return s?an(s,e):{}}function nn(t){var e=new Rr(t,He);return e.findAll(rr("result"),{subject:null,value:!1}).reduce((function(t,r){return n.a.merge(t,an(r,e))}),{})}var sn=function(t){function e(){var t;return Object(v["a"])(this,e),t=Object(g["a"])(this,Object(y["a"])(e).apply(this,arguments)),t.simpleGraph=null,t.shacl=null,t.validationReport={},t}return Object(_["a"])(e,t),Object(b["a"])(e,[{key:"fetchData",value:function(){var t=Object(h["a"])(regeneratorRuntime.mark((function t(){var e,r,a,n,s,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,this.status.setPending(),t.next=4,this.loadData();case 4:if(e=t.sent,r=Object(ge["a"])(e,4),a=r[0],n=r[1],s=r[2],i=r[3],!this.isAdmin&&!Cr.hasWrite(i.data)){t.next=18;break}this.buildGraph(n.data),this.shacl=s.data,this.simpleGraph=new Rr(a.data,this.subject),this.breadcrumbs=this.config.createBreadcrumbsWithSelf(this.graph,this.entityId),this.status.setDone(),t.next=20;break;case 18:return t.next=20,this.$router.replace(this.config.toUrl(this.entityId));case 20:t.next=25;break;case 22:t.prev=22,t.t0=t["catch"](0),this.status.setErrorFromResponse(t.t0,"Unable to get entity data.");case 25:case"end":return t.stop()}}),t,this,[[0,22]])})));function e(){return t.apply(this,arguments)}return e}()},{key:"loadData",value:function(){var t=Object(h["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",T.a.all([this.config.api.get(this.entityId),this.config.api.getExpanded(this.entityId),this.config.api.getSpec(),this.config.api.getMembership(this.entityId)]));case 1:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"onSubmit",value:function(){var t=Object(h["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.config.api.put(this.entityId,e);case 3:return t.next=5,this.$router.push(this.config.toUrl(this.entityId));case 5:t.next=12;break;case 7:t.prev=7,t.t0=t["catch"](0),this.validationReport=nn(t.t0.response.data),this.status.setError("Unable to update entity data."),window.scrollTo(0,0);case 12:case"end":return t.stop()}}),t,this,[[0,7]])})));function e(e){return t.apply(this,arguments)}return e}()}]),e}(Fr);sn=j["a"]([Object(O["a"])({components:{Breadcrumbs:$e,FormGenerator:rn,Page:Gt,StatusFlash:Zt,ShaclForm:Ka}})],sn);var on=sn,un=on,cn=Object(S["a"])(un,va,ba,!1,null,null,null),ln=cn.exports,dn=function(t){function e(){var t;return Object(v["a"])(this,e),t=Object(g["a"])(this,Object(y["a"])(e).apply(this,arguments)),t.config=ua,t}return Object(_["a"])(e,t),e}(O["c"]);dn=j["a"]([Object(O["a"])({components:{EntityEdit:ln}})],dn);var pn=dn,fn=pn,mn=Object(S["a"])(fn,ma,ha,!1,null,null,null),hn=mn.exports,vn=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"login"},[r("h1",[t._v("Login")]),r("status-flash",{attrs:{status:t.status,"no-loading":""}}),r("form",{staticClass:"form",on:{submit:function(e){return e.preventDefault(),t.submit(e)}}},[r("div",{staticClass:"form__group"},[r("input",{directives:[{name:"model",rawName:"v-model",value:t.email,expression:"email"}],attrs:{type:"text",placeholder:"Email",name:"email"},domProps:{value:t.email},on:{input:function(e){e.target.composing||(t.email=e.target.value)}}})]),r("div",{staticClass:"form__group"},[r("input",{directives:[{name:"model",rawName:"v-model",value:t.password,expression:"password"}],attrs:{type:"password",placeholder:"Password",name:"password"},domProps:{value:t.password},on:{input:function(e){e.target.composing||(t.password=e.target.value)}}})]),r("div",[r("button",{staticClass:"btn btn-primary btn-full btn-rounded",attrs:{disabled:t.status.isPending(),"data-cy":"login"}},[t.status.isPending()?r("fa",{attrs:{icon:["fas","spinner"],spin:""}}):[r("fa",{attrs:{icon:["fas","sign-in-alt"]}}),t._v(" Login ")]],2)])])],1)},bn=[],gn=r("2f62");function yn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function _n(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?yn(r,!0).forEach((function(e){Object(It["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yn(r).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var jn={name:"Login",components:{StatusFlash:Zt},data:function(){return{email:"",password:"",status:new Yt}},computed:_n({},Object(gn["b"])("auth",{authenticated:"authenticated"})),created:function(){this.authenticated&&this.$router.replace("/")},methods:{submit:function(){var t=this;this.email&&this.password&&(this.status.setPending(),this.$store.dispatch("auth/authenticate",{email:this.email,password:this.password,onSuccess:function(){return t.$router.push("/")},onError:function(){return t.status.setError("Login failed")}}))}}},On=jn,wn=Object(S["a"])(On,vn,bn,!1,null,null,null),kn=wn.exports,$n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("page",{attrs:{title:"Not Allowed"}})},Cn=[],xn={name:"NotAllowed",components:{Page:Gt}},Sn=xn,En=Object(S["a"])(Sn,$n,Cn,!1,null,null,null),Pn=En.exports,Nn=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("page",{attrs:{title:"Not Found"}})},Dn=[],Rn={name:"NotFound",components:{Page:Gt}},Un=Rn,Fn=Object(S["a"])(Un,Nn,Dn,!1,null,null,null),An=Fn.exports,qn=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("breadcrumbs",{attrs:{links:t.breadcrumbs,current:"Create user"}}),r("page",{attrs:{title:"Create user","content-only":"",small:""},scopedSlots:t._u([{key:"content",fn:function(){return[r("form",{staticClass:"form",on:{submit:function(e){return e.preventDefault(),t.submit(e)}}},[r("status-flash",{attrs:{status:t.profileSubmitStatus,"no-loading":""}}),r("div",{staticClass:"form__group",class:{"form__group--error":t.$v.user.firstName.$error}},[r("label",{attrs:{for:"user-first-name"}},[t._v("First name")]),r("input",{directives:[{name:"model",rawName:"v-model.trim",value:t.$v.user.firstName.$model,expression:"$v.user.firstName.$model",modifiers:{trim:!0}}],attrs:{id:"user-first-name",placeholder:"First name",name:"firstName"},domProps:{value:t.$v.user.firstName.$model},on:{input:function(e){e.target.composing||t.$set(t.$v.user.firstName,"$model",e.target.value.trim())},blur:function(e){return t.$forceUpdate()}}}),t.$v.user.firstName.required?t._e():r("p",{staticClass:"invalid-feedback"},[t._v(" Field is required ")])]),r("div",{staticClass:"form__group",class:{"form__group--error":t.$v.user.lastName.$error}},[r("label",{attrs:{for:"user-last-name"}},[t._v("Last name")]),r("input",{directives:[{name:"model",rawName:"v-model.trim",value:t.$v.user.lastName.$model,expression:"$v.user.lastName.$model",modifiers:{trim:!0}}],attrs:{id:"user-last-name",placeholder:"Last name",name:"lastName"},domProps:{value:t.$v.user.lastName.$model},on:{input:function(e){e.target.composing||t.$set(t.$v.user.lastName,"$model",e.target.value.trim())},blur:function(e){return t.$forceUpdate()}}}),t.$v.user.lastName.required?t._e():r("p",{staticClass:"invalid-feedback"},[t._v(" Field is required ")])]),r("div",{staticClass:"form__group",class:{"form__group--error":t.$v.user.email.$error}},[r("label",{attrs:{for:"user-email"}},[t._v("Email")]),r("input",{directives:[{name:"model",rawName:"v-model.trim",value:t.$v.user.email.$model,expression:"$v.user.email.$model",modifiers:{trim:!0}}],attrs:{id:"user-email",placeholder:"Email",name:"email"},domProps:{value:t.$v.user.email.$model},on:{input:function(e){e.target.composing||t.$set(t.$v.user.email,"$model",e.target.value.trim())},blur:function(e){return t.$forceUpdate()}}}),t.$v.user.email.required?t._e():r("p",{staticClass:"invalid-feedback"},[t._v(" Field is required ")]),t.$v.user.email.email?t._e():r("p",{staticClass:"invalid-feedback"},[t._v(" This is not a valid email ")])]),r("div",{staticClass:"form__group"},[r("label",{attrs:{for:"user-role"}},[t._v("Role")]),r("select",{directives:[{name:"model",rawName:"v-model",value:t.user.role,expression:"user.role"}],attrs:{id:"user-role",name:"role"},on:{change:function(e){var r=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.$set(t.user,"role",e.target.multiple?r:r[0])}}},[r("option",{attrs:{value:"USER"}},[t._v(" USER ")]),r("option",{attrs:{value:"ADMIN"}},[t._v(" ADMIN ")])])]),r("div",{staticClass:"form__group",class:{"form__group--error":t.$v.user.password.$error}},[r("label",{attrs:{for:"password-password"}},[t._v("New password")]),r("input",{directives:[{name:"model",rawName:"v-model.trim",value:t.$v.user.password.$model,expression:"$v.user.password.$model",modifiers:{trim:!0}}],attrs:{id:"password-password",placeholder:"New password",type:"password",name:"password"},domProps:{value:t.$v.user.password.$model},on:{input:function(e){e.target.composing||t.$set(t.$v.user.password,"$model",e.target.value.trim())},blur:function(e){return t.$forceUpdate()}}}),t.$v.user.password.required?t._e():r("p",{staticClass:"invalid-feedback"},[t._v(" Field is required ")])]),r("div",{staticClass:"form__group",class:{"form__group--error":t.$v.user.passwordCheck.$error}},[r("label",{attrs:{for:"password-confirmation"}},[t._v("New password confirmation")]),r("input",{directives:[{name:"model",rawName:"v-model.trim",value:t.$v.user.passwordCheck.$model,expression:"$v.user.passwordCheck.$model",modifiers:{trim:!0}}],attrs:{id:"password-confirmation",placeholder:"New password again",type:"password",name:"passwordConfirmation"},domProps:{value:t.$v.user.passwordCheck.$model},on:{input:function(e){e.target.composing||t.$set(t.$v.user.passwordCheck,"$model",e.target.value.trim())},blur:function(e){return t.$forceUpdate()}}}),t.$v.user.passwordCheck.passwordMatch?t._e():r("p",{staticClass:"invalid-feedback"},[t._v(" Passwords don't match. ")])]),r("div",[r("button",{staticClass:"btn btn-primary btn-rounded",attrs:{disabled:t.passwordSubmitStatus.isPending(),"data-cy":"create-user"}},[t._v(" Create user ")])])],1)]},proxy:!0}])})],1)},In=[],Mn={name:"UserDetail",components:{Breadcrumbs:$e,StatusFlash:Zt,Page:Gt},validations:function(){return{user:{firstName:{required:Ja["required"]},lastName:{required:Ja["required"]},email:{required:Ja["required"],email:Ja["email"]},password:{required:Ja["required"]},passwordCheck:{passwordMatch:function(t){return this.user.password===t}}}}},data:function(){return{user:{firstName:null,lastName:null,email:null,role:"USER",password:null,passwordCheck:null},status:new Yt,profileSubmitStatus:new Yt,passwordSubmitStatus:new Yt,breadcrumbs:[{label:"Users",to:"/users"}]}},methods:{submit:function(){var t=Object(h["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.$v.user.$touch(),this.$v.user.$invalid){t.next=13;break}return this.profileSubmitStatus.setPending(),t.prev=3,t.next=6,nt.users.postUser(this.user);case 6:return t.next=8,this.$router.replace("/users");case 8:t.next=13;break;case 10:t.prev=10,t.t0=t["catch"](3),this.profileSubmitStatus.setErrorFromResponse(t.t0,"User profile could not be created.");case 13:case"end":return t.stop()}}),t,this,[[3,10]])})));function e(){return t.apply(this,arguments)}return e}()}},Ln=Mn,Tn=Object(S["a"])(Ln,qn,In,!1,null,null,null),Bn=Tn.exports,Vn=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[t.user?r("breadcrumbs",{attrs:{links:t.breadcrumbs,current:t.title}}):t._e(),r("page",{attrs:{title:t.title,"content-only":"",small:""},scopedSlots:t._u([{key:"content",fn:function(){return[r("status-flash",{attrs:{status:t.status}}),t.user?r("div",[r("form",{staticClass:"form",on:{submit:function(e){return e.preventDefault(),t.submitProfile(e)}}},[r("h2",[t._v("Profile")]),r("status-flash",{attrs:{status:t.profileSubmitStatus,"no-loading":""}}),r("div",{staticClass:"form__group",class:{"form__group--error":t.$v.user.firstName.$error}},[r("label",{attrs:{for:"user-first-name"}},[t._v("First name")]),r("input",{directives:[{name:"model",rawName:"v-model.trim",value:t.$v.user.firstName.$model,expression:"$v.user.firstName.$model",modifiers:{trim:!0}}],attrs:{id:"user-first-name",placeholder:"First name",name:"firstName"},domProps:{value:t.$v.user.firstName.$model},on:{input:function(e){e.target.composing||t.$set(t.$v.user.firstName,"$model",e.target.value.trim())},blur:function(e){return t.$forceUpdate()}}}),t.$v.user.firstName.required?t._e():r("p",{staticClass:"invalid-feedback"},[t._v(" Field is required ")])]),r("div",{staticClass:"form__group",class:{"form__group--error":t.$v.user.lastName.$error}},[r("label",{attrs:{for:"user-last-name"}},[t._v("Last name")]),r("input",{directives:[{name:"model",rawName:"v-model.trim",value:t.$v.user.lastName.$model,expression:"$v.user.lastName.$model",modifiers:{trim:!0}}],attrs:{id:"user-last-name",placeholder:"Last name",name:"lastName"},domProps:{value:t.$v.user.lastName.$model},on:{input:function(e){e.target.composing||t.$set(t.$v.user.lastName,"$model",e.target.value.trim())},blur:function(e){return t.$forceUpdate()}}}),t.$v.user.lastName.required?t._e():r("p",{staticClass:"invalid-feedback"},[t._v(" Field is required ")])]),r("div",{staticClass:"form__group",class:{"form__group--error":t.$v.user.email.$error}},[r("label",{attrs:{for:"user-email"}},[t._v("Email")]),r("input",{directives:[{name:"model",rawName:"v-model.trim",value:t.$v.user.email.$model,expression:"$v.user.email.$model",modifiers:{trim:!0}}],attrs:{id:"user-email",placeholder:"Email",name:"email"},domProps:{value:t.$v.user.email.$model},on:{input:function(e){e.target.composing||t.$set(t.$v.user.email,"$model",e.target.value.trim())},blur:function(e){return t.$forceUpdate()}}}),t.$v.user.email.required?t._e():r("p",{staticClass:"invalid-feedback"},[t._v(" Field is required ")]),t.$v.user.email.email?t._e():r("p",{staticClass:"invalid-feedback"},[t._v(" This is not a valid email ")])]),r("div",{staticClass:"form__group"},[r("label",{attrs:{for:"user-role"}},[t._v("Role")]),r("select",{directives:[{name:"model",rawName:"v-model",value:t.user.role,expression:"user.role"}],attrs:{id:"user-role",name:"role"},on:{change:function(e){var r=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.$set(t.user,"role",e.target.multiple?r:r[0])}}},[r("option",{attrs:{value:"USER"}},[t._v(" USER ")]),r("option",{attrs:{value:"ADMIN"}},[t._v(" ADMIN ")])])]),r("div",[r("button",{staticClass:"btn btn-primary btn-rounded",attrs:{disabled:t.profileSubmitStatus.isPending(),"data-cy":"save-profile"}},[t._v(" Save profile ")])])],1),r("form",{staticClass:"form",on:{submit:function(e){return e.preventDefault(),t.submitPassword(e)}}},[r("h2",[t._v("Password")]),r("status-flash",{attrs:{status:t.passwordSubmitStatus,"no-loading":""}}),r("div",{staticClass:"form__group",class:{"form__group--error":t.$v.passwordForm.password.$error}},[r("label",{attrs:{for:"password-password"}},[t._v("New password")]),r("input",{directives:[{name:"model",rawName:"v-model.trim",value:t.$v.passwordForm.password.$model,expression:"$v.passwordForm.password.$model",modifiers:{trim:!0}}],attrs:{id:"password-password",placeholder:"New password",type:"password",name:"password"},domProps:{value:t.$v.passwordForm.password.$model},on:{input:function(e){e.target.composing||t.$set(t.$v.passwordForm.password,"$model",e.target.value.trim())},blur:function(e){return t.$forceUpdate()}}}),t.$v.passwordForm.password.required?t._e():r("p",{staticClass:"invalid-feedback"},[t._v(" Field is required ")])]),r("div",{staticClass:"form__group",class:{"form__group--error":t.$v.passwordForm.passwordCheck.$error}},[r("label",{attrs:{for:"password-confirmation"}},[t._v("New password confirmation")]),r("input",{directives:[{name:"model",rawName:"v-model.trim",value:t.$v.passwordForm.passwordCheck.$model,expression:"$v.passwordForm.passwordCheck.$model",modifiers:{trim:!0}}],attrs:{id:"password-confirmation",placeholder:"New password again",type:"password",name:"passwordConfirmation"},domProps:{value:t.$v.passwordForm.passwordCheck.$model},on:{input:function(e){e.target.composing||t.$set(t.$v.passwordForm.passwordCheck,"$model",e.target.value.trim())},blur:function(e){return t.$forceUpdate()}}}),t.$v.passwordForm.passwordCheck.passwordMatch?t._e():r("p",{staticClass:"invalid-feedback"},[t._v(" Passwords don't match. ")])]),r("div",[r("button",{staticClass:"btn btn-primary btn-rounded",attrs:{disabled:t.passwordSubmitStatus.isPending(),"data-cy":"update-password"}},[t._v(" Update password ")])])],1)]):t._e()]},proxy:!0}])})],1)},zn=[];function Gn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function Wn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Gn(r,!0).forEach((function(e){Object(It["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Gn(r).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Kn={name:"UserDetail",components:{Breadcrumbs:$e,StatusFlash:Zt,Page:Gt},validations:function(){return{user:{firstName:{required:Ja["required"]},lastName:{required:Ja["required"]},email:{required:Ja["required"],email:Ja["email"]}},passwordForm:{password:{required:Ja["required"]},passwordCheck:{passwordMatch:function(t){return this.passwordForm.password===t}}}}},data:function(){return{title:null,user:null,passwordForm:{password:null,passwordCheck:null},status:new Yt,profileSubmitStatus:new Yt,passwordSubmitStatus:new Yt,breadcrumbs:[{label:"Users",to:"/users"}]}},computed:Wn({},Object(gn["b"])("auth",{currentUser:"user"})),watch:{$route:"fetchData"},created:function(){this.fetchData()},methods:{fetchData:function(){var t=Object(h["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,this.status.setPending(),t.next=4,nt.users.getUser(this.$route.params.id);case 4:e=t.sent,this.user=e.data,this.setTitle(),this.status.setDone(),t.next=13;break;case 10:t.prev=10,t.t0=t["catch"](0),this.status.setError("Unable to get user profile.");case 13:case"end":return t.stop()}}),t,this,[[0,10]])})));function e(){return t.apply(this,arguments)}return e}(),submitProfile:function(){var t=Object(h["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.$v.user.$touch(),this.$v.user.$invalid){t.next=16;break}return t.prev=2,this.profileSubmitStatus.setPending(),t.next=6,nt.users.putUser(this.user);case 6:if(this.setTitle(),this.profileSubmitStatus.setDone("User profile was successfully updated!"),this.user.uuid!==this.currentUser.uuid){t.next=11;break}return t.next=11,this.$store.dispatch("auth/updateUser",{user:this.user});case 11:t.next=16;break;case 13:t.prev=13,t.t0=t["catch"](2),this.profileSubmitStatus.setError("User profile could not be updated.");case 16:case"end":return t.stop()}}),t,this,[[2,13]])})));function e(){return t.apply(this,arguments)}return e}(),submitPassword:function(){var t=Object(h["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.$v.passwordForm.$touch(),this.$v.passwordForm.$invalid){t.next=12;break}return t.prev=2,this.passwordSubmitStatus.setPending(),t.next=6,nt.users.putUserPassword(this.user,this.passwordForm.password);case 6:this.passwordSubmitStatus.setDone("Password was successfully updated!"),t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](2),this.passwordSubmitStatus.setError("Password could not be updated.");case 12:case"end":return t.stop()}}),t,this,[[2,9]])})));function e(){return t.apply(this,arguments)}return e}(),setTitle:function(){this.title="".concat(this.user.firstName," ").concat(this.user.lastName)}}},Yn=Kn,Hn=Object(S["a"])(Yn,Vn,zn,!1,null,null,null),Jn=Hn.exports,Xn=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("page",{attrs:{title:"Users","content-only":""},scopedSlots:t._u([{key:"actions",fn:function(){return[r("router-link",{attrs:{to:"/users/create","data-cy":"create-user"}},[t._v(" + Create user ")])]},proxy:!0},{key:"content",fn:function(){return[r("status-flash",{attrs:{status:t.status}}),r("div",{staticClass:"item-list"},t._l(t.users,(function(e){return r("user-item",{key:e.uuid,attrs:{user:e},scopedSlots:t._u([{key:"name",fn:function(){return[r("router-link",{attrs:{to:"/users/"+e.uuid,"data-cy":"user-link"}},[t._v(" "+t._s(e.firstName)+" "+t._s(e.lastName)+" ")]),r("b-badge",{attrs:{pill:"",variant:"light"}},[t._v(" "+t._s(e.role)+" ")])]},proxy:!0},{key:"actions",fn:function(){return[r("b-dropdown",{attrs:{text:"Actions",right:"",variant:"link","no-caret":""},scopedSlots:t._u([{key:"button-content",fn:function(){return[r("fa",{attrs:{icon:["fas","ellipsis-v"]}})]},proxy:!0}],null,!0)},[r("b-dropdown-item",{on:{click:function(r){return t.$router.push("/users/"+e.uuid)}}},[r("fa",{attrs:{icon:["fas","user-edit"]}}),t._v(" Edit profile ")],1),r("b-dropdown-divider"),r("b-dropdown-item",{staticClass:"dropdown-item-danger",on:{click:function(r){return r.preventDefault(),t.deleteUser(e)}}},[r("fa",{attrs:{icon:["far","trash-alt"]}}),t._v(" Remove ")],1)],1)]},proxy:!0}],null,!0)})})),1)]},proxy:!0}])})],1)},Qn=[],Zn=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"item-list__item",class:{"item-list__item--frameless":t.frameless},attrs:{"data-cy":"user-item"}},[r("user-avatar",{attrs:{user:t.user}}),r("div",{staticClass:"item-list__item__content"},[r("div",{staticClass:"item-list__item__content__row"},[t._t("name",[r("strong",[t._v(t._s(t.user.firstName)+" "+t._s(t.user.lastName))])])],2),r("div",{staticClass:"item-list__item__content__row"},[t._v(" "+t._s(t.user.email)+" ")])]),r("div",{staticClass:"item-list__item__actions"},[t._t("actions")],2)],1)},ts=[],es=function(t){function e(){return Object(v["a"])(this,e),Object(g["a"])(this,Object(y["a"])(e).apply(this,arguments))}return Object(_["a"])(e,t),e}(O["c"]);j["a"]([Object(O["b"])({required:!0})],es.prototype,"user",void 0),j["a"]([Object(O["b"])({type:Boolean,default:!1})],es.prototype,"frameless",void 0),es=j["a"]([Object(O["a"])({components:{UserAvatar:$t}})],es);var rs=es,as=rs,ns=Object(S["a"])(as,Zn,ts,!1,null,null,null),ss=ns.exports,is={name:"Users",components:{UserItem:ss,StatusFlash:Zt,Page:Gt},data:function(){return{users:null,status:new Yt}},watch:{$route:"fetchData"},created:function(){this.fetchData()},methods:{fetchData:function(){var t=Object(h["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,this.status.setPending(),t.next=4,nt.users.getUsers();case 4:e=t.sent,this.users=n.a.orderBy(e.data,["firstName","lastName"],["asc"]),this.status.setDone(),t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](0),this.status.setError("Unable to get users.");case 12:case"end":return t.stop()}}),t,this,[[0,9]])})));function e(){return t.apply(this,arguments)}return e}(),deleteUser:function(){var t=Object(h["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!window.confirm("Are you sure you want to delete ".concat(e.firstName," ").concat(e.lastName,"?"))){t.next=10;break}return t.prev=1,t.next=4,nt.users.deleteUser(e);case 4:this.fetchData(),t.next=10;break;case 7:t.prev=7,t.t0=t["catch"](1),this.status.setError("Unable to delete users.");case 10:case"end":return t.stop()}}),t,this,[[1,7]])})));function e(e){return t.apply(this,arguments)}return e}()}},os=is,us=Object(S["a"])(os,Xn,Qn,!1,null,null,null),cs=us.exports,ls={namespaced:!0,state:{session:null},getters:{authenticated:function(t){return null!==t.session},user:function(t){return n.a.get(t.session,"user")},role:function(t){return n.a.get(t.session,"user.role")},isAdmin:function(t){return"ADMIN"===n.a.get(t.session,"user.role")},token:function(t){return n.a.get(t,"session.token")}},actions:{authenticate:function(){var t=Object(h["a"])(regeneratorRuntime.mark((function t(e,r){var a,n,s,i,o,u,c,l;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=e.commit,n=r.email,s=r.password,i=r.onSuccess,o=r.onError,t.prev=2,t.next=5,nt.tokens.fetchToken(n,s);case 5:return u=t.sent,a("setSession",{user:null,token:u.data.token}),t.next=9,nt.users.getUserCurrent();case 9:c=t.sent,l={user:c.data,token:u.data.token},a("setSession",l),i(),t.next=19;break;case 15:t.prev=15,t.t0=t["catch"](2),a("setSession",null),o();case 19:case"end":return t.stop()}}),t,null,[[2,15]])})));function e(e,r){return t.apply(this,arguments)}return e}(),updateUser:function(t,e){var r=t.commit,a=t.state,n=e.user,s={user:n,token:a.session.token};r("setSession",s)},logout:function(t){var e=t.commit;e("setSession",null)}},mutations:{setSession:function(t,e){t.session=e}}};function ds(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function ps(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ds(r,!0).forEach((function(e){Object(It["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ds(r).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var fs=function(t){Y.interceptors.request.use((function(e){var r=ps({},e),a=t.getters["auth/token"];return a&&(r.headers.common.Authorization="Bearer ".concat(a)),r}),null)},ms=function(t){Y.interceptors.response.use(null,function(){var e=Object(h["a"])(regeneratorRuntime.mark((function e(r){var a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:throw a=r.response.status,401===a&&t.dispatch("auth/logout"),r;case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},hs=function(t){fs(t),ms(t)},vs=hs,bs=r("bfa9"),gs=new bs["a"]({key:"".concat(n.a.get(window,"config.publicPath",""),"/session"),storage:window.localStorage,reducer:function(t){return{auth:{session:n.a.get(t,"auth.session")}}}}),ys=gs;s["default"].use(gn["a"]);var _s=new gn["a"].Store({modules:{auth:ls},plugins:[vs,ys.plugin]}),js=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("entity-create",{attrs:{config:t.config,"parent-config":t.parentConfig}})},Os=[],ws=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[null!==t.breadcrumbs?r("breadcrumbs",{attrs:{links:t.breadcrumbs,current:t.createName}}):t._e(),r("status-flash",{attrs:{status:t.status}}),null!==t.graph?r("page",{attrs:{title:t.createName,"content-only":"",small:""},scopedSlots:t._u([{key:"content",fn:function(){return[r("shacl-form",{attrs:{rdf:t.graph.store,shacl:t.shacl,"target-classes":t.config.targetClasses,subject:t.subject,"validation-report":t.validationReport},on:{submit:t.onSubmit}})]},proxy:!0}],null,!1,2164344352)}):t._e()],1)},ks=[],$s=(r("07ac"),function(t){function e(){var t;return Object(v["a"])(this,e),t=Object(g["a"])(this,Object(y["a"])(e).apply(this,arguments)),t.shacl=null,t.validationReport={},t}return Object(_["a"])(e,t),Object(b["a"])(e,[{key:"fetchData",value:function(){var t=Object(h["a"])(regeneratorRuntime.mark((function t(){var e,r,a,n,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,this.status.setPending(),t.next=4,this.loadData();case 4:if(e=t.sent,r=Object(ge["a"])(e,3),a=r[0],n=r[1],s=r[2],!this.isAdmin&&!this.parentConfig.canCreateChild(this.isAuthenticated,s.data)){t.next=17;break}this.shacl=a.data,this.graph=new Rr("",this.subject),this.graph.store.add(Ye["namedNode"](this.subject),Qe("isPartOf"),Ye["namedNode"](this.isPartOf),null),this.createBreadcrumbs(n.data),this.status.setDone(),t.next=19;break;case 17:return t.next=19,this.$router.replace(this.parentConfig.toUrl(this.entityId));case 19:t.next=24;break;case 21:t.prev=21,t.t0=t["catch"](0),this.status.setErrorFromResponse(t.t0,"Unable to get metadata.");case 24:case"end":return t.stop()}}),t,this,[[0,21]])})));function e(){return t.apply(this,arguments)}return e}()},{key:"loadData",value:function(){var t=Object(h["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",T.a.all([this.config.api.getSpec(),this.parentConfig.api.getExpanded(this.entityId),this.parentConfig.api.getMembership(this.entityId)]));case 1:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"createBreadcrumbs",value:function(t){var e=new Rr(t,this.isPartOf);this.breadcrumbs=this.parentConfig.createBreadcrumbsWithSelf(e,this.entityId)}},{key:"onSubmit",value:function(){var t=Object(h["a"])(regeneratorRuntime.mark((function t(e){var r,a,s,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.config.api<