import{ck as He,aM as N,bt as we,bs as H,cl as Ke,at as Xe,av as We,ar as Je,a0 as Ye,bE as xe,cm as $e,cn as Ie,co as Se,cp as Ce,cq as Ve,bG as Ze,cr as et,bI as Pe,bK as Oe,cs as qe,ct as tt,cu as Te,cv as Be,cw as De,a$ as ie,aa as Ee,cx as at,ax as ne,cy as st,q as K,bR as nt,cz as pe,I as n,cA as Re,cB as Ne,bZ as le,am as A,b$ as rt,aA as ot,cC as it,cD as lt,an as ct,c3 as F,aE as c,u as f,bx as i,bX as re,s as _,v as b,b3 as p,t as h,bC as dt,c9 as S,cb as J,cc as de,H as O,cd as Ae,ce as ee,cf as ue,cg as _e,aI as ut,aF as _t,ch as ht,bc as D,cE as Fe,af as oe,aR as C,F as U,aP as Q,c7 as B,c8 as V,au as pt,c4 as ft,b6 as fe,cF as mt,aD as bt,cG as me,c5 as yt,cH as gt,aK as vt,cI as kt,cJ as jt,cK as wt,c2 as xt,cL as $t,cM as It,cN as St,cO as Ct,cP as Vt,cQ as Pt,cR as Ot,cS as qt,bM as Tt,b7 as Bt,bJ as Dt,cj as Et,ao as be,ci as Rt}from"./index-pVvkWKzi.js";import{T as Nt}from"./ThreeColumnLayout-QD46NqkJ.js";import{_ as At}from"./PlaceHolderImage-CBAhttrD.js";import{d as x,I as Ft,O as Lt}from"./MainPartTS-DdIm-rEB.js";import{V as G,C as zt}from"./ChildTreeSearchButton-DaF4HIkT.js";import{V as Le}from"./VDialog--TqfU5zO.js";import{t as ye,a as Ut,c as Gt}from"./triplestore-DD4Ytlqh.js";import{S as Mt,B as Qt,N as Ht,g as X,Q as Kt,G as Xt,D as Wt,a as Jt,F as Yt}from"./graph-DF6IiBDx.js";import{O as ge,a as ze}from"./ObjectCard-KETd_wO-.js";import{V as Ue}from"./VContainer-DfGidfZL.js";import{L as Zt}from"./LoadingSpinner-BjU99GiU.js";import{V as ea,b as ta,a as aa,c as sa}from"./VTabs-XMA4EkL7.js";import"./Anchor-B6I4eTNC.js";import"./ImageViewer-C0ruojiu.js";import"./_commonjsHelpers-C4iS2aBk.js";import"./VSlider-R4SIfaMv.js";import"./VSliderTrack-CNgqQsjp.js";import"./VInput-C6ablejM.js";import"./transform-CA9Jdjju.js";import"./VSlideGroup-CBZvK47O.js";function na(e,t={}){const a=t.head||He();if(a)return a.ssr?a.push(e,t):ra(a,e,t)}function ra(e,t,a={}){const s=N(!1),o=N({});we(()=>{o.value=s.value?{}:Ke(t)});const r=e.push(o.value,a);return H(o,d=>{r.patch(d)}),Ye()&&(Xe(()=>{r.dispose()}),We(()=>{s.value=!0}),Je(()=>{s.value=!1})),r}function oa(e){const t=ie(e());let a=-1;function s(){clearInterval(a)}function o(){s(),ct(()=>t.value=e())}function r(l){const d=l?getComputedStyle(l):{transitionDuration:.2},y=parseFloat(d.transitionDuration)*1e3||200;if(s(),t.value<=0)return;const v=performance.now();a=window.setInterval(()=>{const g=performance.now()-v+y;t.value=Math.max(e()-g,0),t.value<=0&&s()},y)}return ot(s),{clear:s,time:t,start:r,reset:o}}const ia=xe({multiLine:Boolean,text:String,timer:[Boolean,String],timeout:{type:[Number,String],default:5e3},vertical:Boolean,...$e({location:"bottom"}),...Ie(),...Se(),...Ce(),...Ve(),...Ze(et({transition:"v-snackbar-transition"}),["persistent","noClickAnimation","scrim","scrollStrategy"])},"VSnackbar"),Ge=Pe()({name:"VSnackbar",props:ia(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:a}=t;const s=Oe(e,"modelValue"),{positionClasses:o}=qe(e),{scopeId:r}=tt(),{themeClasses:l}=Te(e),{colorClasses:d,colorStyles:y,variantClasses:v}=Be(e),{roundedClasses:g}=De(e),E=oa(()=>Number(e.timeout)),q=N(),w=N(),$=ie(!1),L=ie(0),u=N(),m=Ee(it,void 0);at(()=>!!m,()=>{const T=lt();we(()=>{u.value=T.mainStyles.value})}),H(s,I),H(()=>e.timeout,I),ne(()=>{s.value&&I()});let j=-1;function I(){E.reset(),window.clearTimeout(j);const T=Number(e.timeout);if(!s.value||T===-1)return;const Z=st(w.value);E.start(Z),j=window.setTimeout(()=>{s.value=!1},T)}function k(){E.reset(),window.clearTimeout(j)}function P(){$.value=!0,k()}function R(){$.value=!1,I()}function Y(T){L.value=T.touches[0].clientY}function z(T){Math.abs(L.value-T.changedTouches[0].clientY)>50&&(s.value=!1)}function te(){$.value&&R()}const M=K(()=>e.location.split(" ").reduce((T,Z)=>(T[`v-snackbar--${Z}`]=!0,T),{}));return nt(()=>{const T=pe.filterProps(e),Z=!!(a.default||a.text||e.text);return n(pe,A({ref:q,class:["v-snackbar",{"v-snackbar--active":s.value,"v-snackbar--multi-line":e.multiLine&&!e.vertical,"v-snackbar--timer":!!e.timer,"v-snackbar--vertical":e.vertical},M.value,o.value,e.class],style:[u.value,e.style]},T,{modelValue:s.value,"onUpdate:modelValue":ae=>s.value=ae,contentProps:A({class:["v-snackbar__wrapper",l.value,d.value,g.value,v.value],style:[y.value],onPointerenter:P,onPointerleave:R},T.contentProps),persistent:!0,noClickAnimation:!0,scrim:!1,scrollStrategy:"none",_disableGlobalStack:!0,onTouchstartPassive:Y,onTouchend:z,onAfterLeave:te},r),{default:()=>{var ae,he;return[Re(!1,"v-snackbar"),e.timer&&!$.value&&n("div",{key:"timer",class:"v-snackbar__timer"},[n(Ne,{ref:w,color:typeof e.timer=="string"?e.timer:"info",max:e.timeout,"model-value":E.time.value},null)]),Z&&n("div",{key:"content",class:"v-snackbar__content",role:"status","aria-live":"polite"},[((ae=a.text)==null?void 0:ae.call(a))??e.text,(he=a.default)==null?void 0:he.call(a)]),a.actions&&n(le,{defaults:{VBtn:{variant:"text",ripple:!1,slim:!0}}},{default:()=>[n("div",{class:"v-snackbar__actions"},[a.actions({isActive:s})])]})]},activator:a.activator})}),rt({},q)}}),la={props:{path:{type:String,default:""},id:{type:String,default:""}},data:function(){return{dialog:!1,snackbar:!1,timeout:1e3,base_url:"https://db.antiquitatum-thesaurus.eu"}},computed:{today(){return new Date().toLocaleDateString()},perma_url(){return`${this.base_url}/${this.path}/${this.id}`}},methods:{copy_inner_text(e){this.copy_to_clipboard(e.target.innerText)},async copy_to_clipboard(e){try{await navigator.clipboard.writeText(e),this.snackbar=!0}catch{alert("Cannot copy")}}}},Me=e=>(ut("data-v-0f0998d3"),e=e(),_t(),e),ca={class:"text-caption permalink text-primary"},da={class:"mt-4 text-body"},ua=Me(()=>b("br",null,null,-1)),_a=Me(()=>b("br",null,null,-1)),ha={italic:""},pa={class:"permalink-title"},fa={key:0};function ma(e,t,a,s,o,r){return c(),f("span",ca,[n(S,{size:"20",icon:"mdi-information-outline",onClick:t[0]||(t[0]=dt(l=>e.dialog=!0,["stop"]))},{default:i(()=>[n(re,{size:"18"}),e.$vuetify.display.sm||e.$vuetify.display.xs?h("",!0):(c(),_(G,{key:0,location:"left","open-delay":"500",activator:"parent"},{default:i(()=>[b("span",null,p(e.$t("user_info.permalink_info_short")),1)]),_:1}))]),_:1}),n(Le,{modelValue:e.dialog,"onUpdate:modelValue":t[3]||(t[3]=l=>e.dialog=l),width:"500"},{default:i(()=>[n(J,null,{default:i(()=>[n(de,{class:"text-h5 mt-2 px-5"},{default:i(()=>[O(" Zitierhinweis ")]),_:1}),n(Ae,{class:"px-5 pt-0",style:{"font-size":"0.875rem"}},{default:i(()=>[n(ee),b("p",da,p(e.$t("user_info.citation_note_p1")),1),ua,b("p",null,p(e.$t("user_info.citation_note_p2")),1),_a,b("p",ha,[n(G,{location:"bottom","open-delay":"300"},{activator:i(({props:l})=>[b("a",A(l,{onClick:t[1]||(t[1]=(...d)=>r.copy_inner_text&&r.copy_inner_text(...d))}),"Antiquitatum Thesaurus, ID "+p(a.id)+", "+p(r.perma_url)+" ("+p(e.$t("user_info.citation_note_accessed"))+" "+p(r.today)+").",17)]),default:i(()=>[b("span",null,p(e.$t("user_info.copy_to_clipboard_info")),1)]),_:1})])]),_:1}),n(ue,null,{default:i(()=>[n(_e),n(S,{color:"#c60c30",variant:"text",onClick:t[2]||(t[2]=l=>e.dialog=!1)},{default:i(()=>[O(p(e.$t("site_navigation.close")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]),b("span",pa,[O(" Permalink: "),e.$vuetify.display.xs?(c(),f("br",fa)):h("",!0),b("a",{onClick:t[4]||(t[4]=(...l)=>r.copy_inner_text&&r.copy_inner_text(...l))},[O(p(r.perma_url)+" ",1),e.$vuetify.display.sm||e.$vuetify.display.xs?h("",!0):(c(),_(G,{key:0,location:"bottom","open-delay":"300",activator:"parent"},{default:i(()=>[b("span",null,p(e.$t("user_info.copy_to_clipboard_info")),1)]),_:1}))])]),n(Ge,{modelValue:e.snackbar,"onUpdate:modelValue":t[6]||(t[6]=l=>e.snackbar=l),timeout:e.timeout},{actions:i(({attrs:l})=>[n(S,A({color:"rgb(198, 12, 48)",variant:"text"},l,{onClick:t[5]||(t[5]=d=>e.snackbar=!1)}),{default:i(()=>[O(p(e.$t("site_navigation.close")),1)]),_:2},1040)]),default:i(()=>[O(p(e.$t("user_info.copied"))+" ",1)]),_:1},8,["modelValue","timeout"])])}const ba=F(la,[["render",ma],["__scopeId","data-v-0f0998d3"]]),ya={key:0},ga={__name:"BackToSearchButton",setup(e){const t=ht();return(a,s)=>D(t).last_search?(c(),f("div",ya,[n(S,{variant:"text",color:"primary",to:{name:"Search",query:D(t).last_search}},{default:i(()=>[O(p(a.$t("label.back_to_search")),1)]),_:1},8,["to"])])):h("",!0)}},va=Fe("comparison",{state:()=>({savedObject:null}),actions:{saveObject(e){this.savedObject=e},deleteSavedObject(){this.savedObject=null}}}),ka={__name:"ObjectComparisonButtons",setup(e){const t=va();let a=N(!1);return(s,o)=>(c(),f("div",null,[D(t).savedObject?(c(),_(G,{key:0,location:"right","open-delay":"300"},{activator:i(({props:r})=>[n(S,A({class:"mt-2",icon:"mdi-pin-off",size:"28"},r,{onClick:D(t).deleteSavedObject}),{default:i(()=>[n(re,{color:"rgb(198, 12, 48)"})]),_:2},1040,["onClick"])]),default:i(()=>[b("span",null,p(s.$t("site_navigation.delete_preselection")),1)]),_:1})):(c(),_(G,{key:1,location:"right","open-delay":"300"},{activator:i(({props:r})=>[n(S,A({class:"mt-2",icon:"mdi-pin",size:"28"},r,{onClick:o[0]||(o[0]=()=>{oe(a)?a.value=!0:a=!0,D(t).saveObject(s.$route.params.objectid)})}),null,16)]),default:i(()=>[b("span",null,p(s.$t("site_navigation.preselect_for_comparison")),1)]),_:1})),D(t).savedObject&&D(t).savedObject!=s.$route.params.objectid?(c(),_(G,{key:2,location:"right","open-delay":"300"},{activator:i(({props:r})=>[n(S,A({class:"mt-2",icon:"mdi-compare",size:"28"},r,{onClick:o[1]||(o[1]=l=>s.$router.push(`/comparison/${D(t).savedObject}/with/${s.$route.params.objectid}`))}),null,16)]),default:i(()=>[b("span",null,p(s.$t("site_navigation.compare_with_preselection")),1)]),_:1})):h("",!0),n(Ge,{modelValue:D(a),"onUpdate:modelValue":o[3]||(o[3]=r=>oe(a)?a.value=r:a=r),"multi-line":"",timeout:"8000"},{actions:i(({attrs:r})=>[n(S,A({color:"rgb(198, 12, 48)",variant:"text"},r,{onClick:o[2]||(o[2]=l=>oe(a)?a.value=!1:a=!1)}),{default:i(()=>[O(p(s.$t("site_navigation.close")),1)]),_:2},1040)]),default:i(()=>[O(p(s.$t("site_navigation.comparison_instructions"))+" ",1)]),_:1},8,["modelValue"])]))}},ve={sorting:"production_date_asc",results_per_page:60},ja={name:"DetailPaginator",inject:["parent_ac"],data(){return{ac:this.parent_ac,filter_object_id:null,results_per_page:null,page:null,sort:null,result:[],total_count:null,results_loaded:!1}},computed:{current_index(){return this.results_loaded?this.result.findIndex(e=>e.iri.endsWith("/"+this.$route.params.objectid)):-1}},created(){this.ac=new AbortController,this.read_component_states_from_url(),this.dispatch_search()},unmounted(){this.ac.abort()},methods:{read_component_states_from_url(){this.page=parseInt(this.$route.query.page)||1,this.results_per_page=parseInt(this.$route.query.items)||ve.results_per_page,this.sort=this.$route.query.sorting||ve.sorting,this.filter_object_id=this.$route.query.parent_id||null},async dispatch_search(){this.results_loaded=!1;try{this.result=await ye.search({q:this.$route.query.q,qfilter:this.$route.query.qfilter,filter_object_id:this.filter_object_id,limit:this.results_per_page,offset:this.results_per_page*(this.page-1),sorting:this.sort,signal:this.ac.signal}),this.total_count=await ye.get_total_count({q:this.$route.query.q,qfilter:this.$route.query.qfilter,filter_object_id:this.filter_object_id,signal:this.ac.signal}),this.results_loaded=!0}catch(e){e.name!="AbortError"&&(this.results_loaded=!1,console.error(e))}},async next_object(e){let t=Object.assign({},this.$route.query),a=null;e=="forward"?this.current_index+1==this.result.length?(this.page++,this.ac.abort(),this.ac=new AbortController,await this.dispatch_search(),t.page?t.page++:t.page=2,a=this.result[0].iri.split("/").slice(-1)[0]):a=this.result[this.current_index+1].iri.split("/").slice(-1)[0]:this.current_index==0?(this.page--,this.ac.abort(),this.ac=new AbortController,await this.dispatch_search(),t.page==2?delete t.page:t.page--,a=this.result[this.results_per_page-1].iri.split("/").slice(-1)[0]):a=this.result[this.current_index-1].iri.split("/").slice(-1)[0],this.$router.push({name:"Object",params:{objectid:a},query:t})}}},wa={key:0},xa={class:"text-button text-primary",style:{"user-select":"none"}};function $a(e,t,a,s,o,r){return o.results_loaded?(c(),f("div",wa,[n(S,{icon:"mdi-chevron-left",size:"24",disabled:r.current_index==0&&o.page==1,onClick:t[0]||(t[0]=l=>r.next_object("backward"))},null,8,["disabled"]),b("span",xa,p(r.current_index+1+o.results_per_page*(o.page-1))+" / "+p(o.total_count),1),n(S,{icon:"mdi-chevron-right",size:"24",disabled:r.current_index+1+o.results_per_page*(o.page-1)==o.total_count,onClick:t[1]||(t[1]=l=>r.next_object("forward"))},null,8,["disabled"])])):h("",!0)}const Ia=F(ja,[["render",$a]]),Qe=Fe("graph",{state:()=>({saved_raw_networks:{inverted_idx:{}},saved_prepared_networks:{},graph_empty:!1}),actions:{save_tree(e,t){e.forEach(a=>this.saved_prepared_networks[a]=t)},save_networks(e){this.saved_raw_networks=e}},getters:{getNetworkForId:e=>t=>{const a=e.saved_raw_networks.inverted_idx[t],s={nodes:{},links:[]};for(let o of a){let r=e.saved_raw_networks.links[o];r.source in s.nodes||(s.nodes[r.source]=e.saved_raw_networks.nodes[r.source]),r.target in s.nodes||(s.nodes[r.target]=e.saved_raw_networks.nodes[r.target]),s.links.push(r)}return s}}}),Sa={class:"d-flex flex-nowrap"},Ca={class:"d-flex flex-nowrap"},Va={style:{"min-width":"70px"}},Pa={style:{"max-width":"calc(100% - 70px)"}},Oa={__name:"ObjectTree",props:{children:{type:Array,default:()=>[]}},setup(e){async function t(a){if(a.children.length==0){let s=a.iri.split("/").slice(-1)[0],r=(await x.get_children(s)).children;for(let l of r)l.has_child&&(l.children=[]);a.children=r}}return(a,s)=>{const o=C("v-treeview");return c(),f("div",null,[n(o,{items:e.children,"load-children":t,density:"compact"},{title:i(({item:r})=>[b("div",Sa,[r.has_child?h("",!0):(c(),_(_e,{key:0,style:{width:"34px"}})),n(J,{variant:"outlined",width:"100%",class:"ma-1 object-card text-decoration-none",to:{name:"Object",params:{objectid:r.iri.split("/").slice(-1)[0]}}},{default:i(()=>[b("div",Ca,[b("div",Va,[n(D(ge),{images:r.images,"with-tree-button":!1,"image-height":60},null,8,["images"])]),b("div",Pa,[n(de,{class:"text-body-2 hyphenate",style:{"line-height":"1.25rem","white-space":"normal"}},{default:i(()=>[O(p(r.title),1)]),_:2},1024)]),r.children?(c(),_(ue,{key:0,class:"ml-auto"},{default:i(()=>[n(D(zt),{objectid:r.iri.split("/").slice(-1)[0]},null,8,["objectid"])]),_:2},1024)):h("",!0),r&&!(a.$vuetify.display.sm||a.$vuetify.display.xs)?(c(),_(G,{key:1,activator:"parent",location:"left",width:"40vh","open-delay":"600","content-class":"image-tooltip"},{default:i(()=>[n(D(ge),{images:r.images,"image-height":"40vh"},null,8,["images"])]),_:2},1024)):h("",!0)])]),_:2},1032,["to"])])]),_:1},8,["items"])])}}},qa=F(Oa,[["__scopeId","data-v-9ce54215"]]),Ta={components:{ObjectCard:ze,ObjectTree:qa},props:{data:{type:Array,default:()=>[]},panels:{type:Boolean,default:!1},tree:{type:Boolean,default:!1}},data:function(){return{image_height:140,active_panel:[]}},methods:{fill_row:function(e){let t=e.length%3;return t?3-t:0},has_comment:function(e){return e.comment?!0:(this.$emit("show_error","missing_objectdata"),!1)}}},Ba={key:0};function Da(e,t,a,s,o,r){const l=C("ObjectTree"),d=C("ObjectCard");return a.data.length?(c(),f("span",Ba,[a.tree?(c(),_(l,{key:0,children:a.data},null,8,["children"])):(c(),_(B,{key:1},{default:i(()=>[(c(!0),f(U,null,Q(a.data,(y,v)=>(c(),_(V,{key:v,class:"d-flex child-flex",cols:"6",md:"6",lg:"4",sm:"4"},{default:i(()=>[n(d,{iri:y,"image-height":140,"with-breadcrumbs":"","tooltip-enabled":""},null,8,["iri"])]),_:2},1024))),128))]),_:1}))])):h("",!0)}const Ea=F(Ta,[["render",Da]]);class se extends Mt{constructor(t,a){super(a),this.object_iris=t}}class W{constructor(t,a=100,s=100,o="",r=!1){this.url=t,this.width=a,this.height=s,this.style=o,this.is_placeholder=r}}class ce extends Ht{constructor(t,a,s,o,r,l){super(t,a,s,o),this.node_iri=r,this.node_img=l}}class ke extends ce{constructor(t,a,s,o,r,l,d){super(t,a,s,o,r,l),this.dating=d}}class Ra extends Qt{constructor(){super()}get_root_node(t){const a=t.split("/").slice(-1)[0],s=new se([t],null);return new ce("","","root",a,s,t,new W(""))}create_node(t,a){const s=t.node_iri.split("/").slice(-1)[0],o=new se([t.node_iri],a);let r=null;t.node_img?r=new W(t.node_img):r=new W("/logo.jpg",70,70,"",!0);let l="";return t.node_label&&(l=t.node_label),new ce(l,"object",s,o,t.node_iri,r)}}class Na extends Ra{constructor(){super()}get_root_node(t){const a=t.split("/").slice(-1)[0],s=new se([t],null);return new ke("","","root",a,s,t,new W(""),{from:"",to:""})}create_node(t,a){const s=t.node_iri.split("/").slice(-1)[0],o=new se([t.node_iri],a);let r=null;return t.node_img?r=new W(t.node_img):r=new W("/logo.jpg",70,70,"",!0),new ke(`${t.node_label}`,"object",s,o,t.node_iri,r,t.dating||{from:"",to:""})}}class Aa extends Kt{async get_children(t,a){return X.get_relations_for(t,a)}async get_node(t,a){const s=await X.get_node(t,a);return s.node.edge_label="",s}}class Fa extends Aa{async get_children(t,a){return X.get_relations_for(t,a,!1)}async get_dating(t,a){return x.get_dating_for_object(t,a)}async get_all_relations(t){return X.get_all_relations(t)}async get_all_nodes(t){return X.get_all_nodes(t)}}const je={__name:"ObjectGraph",props:{objectId:{type:Number,required:!0},width:{type:String,default:""},height:{type:String,default:""},reload:{type:Boolean,default:!1},graphtype:{type:String,default:"time"},expanded:{type:Boolean,default:!1}},setup(e){pt(()=>a.graph_empty=!1);const t=ft(),a=Qe(),s=e,o=N(!1),r=K(()=>s.expanded?"outlined":"flat");H(()=>s.graphtype,(u,m)=>{u!=m&&q()});const l=new Na,d=new Fa;let y=Ee("parent_ac");function v(u){let m=[];return u.forEach(j=>{var I;(I=j.dating)!=null&&I.from||m.push(d.get_dating(`https://db.antiquitatum-thesaurus.eu/object/${j.id}`,y.value.signal))}),m}function g(){o.value=!0,s.objectId in a.saved_prepared_networks||s.objectId in a.saved_raw_networks.inverted_idx?q():new Yt(l,d).create_networks(y.value.signal).then(m=>{a.save_networks(m),q()})}function E(u){const{getNetworkForId:m}=mt(a),j=[u],I=new Set([u]);let k={nodes:{},links:[]};for(;j.length>0;){const P=j.shift();let R=m.value(P);const Y=new Set([...k.links,...R.links]);k={nodes:{...k.nodes,...R.nodes},links:[...Y]};for(const z of Object.values(R.nodes))I.has(z.id)||(I.add(z.id),j.push(z.id))}return k}function q(){if(s.objectId&&s.width&&s.height)if(o.value=!0,s.objectId in a.saved_prepared_networks){o.value=!1;let u=a.saved_prepared_networks[s.objectId];u={nodes:Object.values(u.nodes),links:u.links},u=w(s.objectId,u),$(u)}else{o.value=!1;let u=E(s.objectId);const m=v(Object.values(u.nodes));Promise.allSettled(m).then(async j=>{console.info("load dating"),o.value=!1,j.forEach(k=>{const P=k.value,R=u.nodes[P.obj];P.dating&&(R.dating=P.dating)}),u.links.forEach(k=>{const P=u.nodes[k.source],R=u.nodes[k.target];k.source=fe(P),k.target=fe(R)}),u={nodes:Object.values(u.nodes),links:u.links};const I=u.nodes.map(k=>k.id);a.save_tree(I,u),u=w(s.objectId,u),console.info("render loaded graph"),$(u)})}}s.reload&&ne(()=>{g()});function w(u,m){const j=m.nodes.find(k=>k.type=="root");j&&(j.type="object");const I=m.nodes.find(k=>k.id==u);return I.type="root",m}async function $(u){let m=null;if(u.nodes.length>1){a.graph_empty=!1;const j={object:"#F5F5F5",root:"#C60C30",links:{depiction:"#d37676",copy:"#B0C5A4",precursor:"#F1EF99",duplicate:"#AD88C6",version:"#3077F9"}},I=new Xt({width:s.width,height:s.height});s.graphtype=="network"?m=new Wt(I,j,{width:50,height:50}):m=new Jt(I,j),m.clear_canvas(),m.draw_network(u,"div#tree").then(async()=>{await new Promise(P=>setTimeout(P,500)),m.zoom_to_full_extent(),console.info("Graph drawn")},P=>console.log(P))}else console.info("No children can't render tree"),a.graph_empty=!0}function L(u){t.push({name:"Object",params:{objectid:u.detail.node.id},query:{graphtype:s.graphtype}})}return(u,m)=>(c(),_(Ue,{class:"py-4 pb-4 pt-1"},{default:i(()=>[o.value?(c(),_(B,{key:0},{default:i(()=>[n(V,null,{default:i(()=>[n(Ne,{indeterminate:"",color:"red-lighten-2"})]),_:1})]),_:1})):h("",!0),n(J,{class:"pa-0",variant:r.value},{default:i(()=>[b("div",{id:"tree","on:nodeClicked":L},null,32)]),_:1},8,["variant"])]),_:1}))}},La={__name:"RelationsGraph",props:{objectId:{type:Number,required:!0}},setup(e){const t=N(!0),a=N(!1),s=N(!1),o=N("time"),r=yt();H(()=>r.params.objectid,async d=>{console.log("new id",d)}),H(a,d=>{d==!1&&(s.value=!1)}),ne(()=>{r.query&&r.query.graphtype&&(o.value=r.query.graphtype)}),bt(()=>{r.query&&r.query.graphtype&&(o.value=r.query.graphtype)});function l(){a.value=!a.value}return(d,y)=>(c(),_(Ue,null,{default:i(()=>[a.value?h("",!0):(c(),_(J,{key:0,variant:"outlined"},{default:i(()=>[n(B,null,{default:i(()=>[n(V,{class:"pb-1"},{default:i(()=>[n(S,{icon:"mdi-expand-all-outline",onClick:l}),n(me,{modelValue:o.value,"onUpdate:modelValue":y[0]||(y[0]=v=>o.value=v),variant:"plain",mandatory:""},{default:i(()=>[n(S,{class:"network_btn timeline_icon",icon:"mdi-chart-timeline",value:"time"}),n(S,{class:"network_btn",icon:"mdi-hub-outline",value:"network"})]),_:1},8,["modelValue"])]),_:1})]),_:1}),n(je,{"object-id":e.objectId,reload:t.value,graphtype:o.value,expanded:a.value,width:"100%",height:"550"},null,8,["object-id","reload","graphtype","expanded"])]),_:1})),n(Le,{modelValue:a.value,"onUpdate:modelValue":y[3]||(y[3]=v=>a.value=v),width:"80%",height:"90%"},{default:i(()=>[n(J,null,{default:i(()=>[n(B,null,{default:i(()=>[n(V,{class:"pb-1"},{default:i(()=>[n(S,{class:"collapse_icon",icon:"mdi-collapse-all-outline",onClick:y[1]||(y[1]=v=>a.value=!1)}),n(me,{modelValue:o.value,"onUpdate:modelValue":y[2]||(y[2]=v=>o.value=v),variant:"plain",mandatory:""},{default:i(()=>[n(S,{class:"network_btn timeline_icon",icon:"mdi-chart-timeline",value:"time"}),n(S,{class:"network_btn",icon:"mdi-hub-outline",value:"network"})]),_:1},8,["modelValue"])]),_:1})]),_:1}),a.value?(c(),_(je,{key:0,"object-id":e.objectId,graphtype:o.value,reload:t.value,expanded:a.value,width:"100%",height:"70vh"},null,8,["object-id","graphtype","reload","expanded"])):h("",!0)]),_:1})]),_:1},8,["modelValue"])]),_:1}))}},za=F(La,[["__scopeId","data-v-7a1dddf6"]]),Ua={methods:{parse_children_mixin(e){let t=[];if(e&&e.length)for(let a of e)a.has_child?t.push({...a,children:[]}):t.push(a);return t}}},Ga=`
    BASE <https://db.antiquitatum-thesaurus.eu>
    PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> 
    PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/> 
    PREFIX owl: <http://www.w3.org/2002/07/owl#>
    PREFIX at: <https://db.antiquitatum-thesaurus.eu/ontology/> `,Ma={async get_census_documents(e,t=null){let a=`
        ${Ga}
        SELECT ?document ?census_id_content ?ref_label ?instance_name_content ?mid ?path_title WHERE {

            SERVICE <https://censussparql.culture.hu-berlin.de/CENSUS/query> {
                VALUES ?instance {<https://semantic.census.de/physicalthing/${e}>}
    
                ?instance crm:P2_has_type <http://vocab.getty.edu/aat/300133025> .
                ?instance crm:P67i_is_referred_to_by ?ref .
                ?ref crm:P128i_is_carried_by ?document .
                ?document crm:P2_has_type <http://vocab.getty.edu/aat/300026030> .

                ?document crm:P1_is_identified_by ?instance_name .
                ?instance_name crm:P190_has_symbolic_content ?instance_name_content .
                ?instance_name crm:P2_has_type <http://vocab.getty.edu/aat/300404670> .

                ?document crm:P1_is_identified_by ?census_id .
                ?census_id crm:P190_has_symbolic_content ?census_id_content .
                ?census_id crm:P2_has_type <http://vocab.getty.edu/aat/300435704> .

                ?document crm:P46i_forms_part_of* ?mid .
                ?mid crm:P1_is_identified_by ?title_path_iri .
                ?title_path_iri crm:P2_has_type <http://vocab.getty.edu/aat/300404670> .
                ?title_path_iri crm:P190_has_symbolic_content ?path_title .
                
            }
        }`;const s=await Ut(a,{signal:t});return Gt(s,{census:[{document:"document",id:"census_id_content",ref_label:"ref_label",name:"instance_name_content",path:{title:"path_title",objectId:"mid"}}]})}},Qa={key:0},Ha={class:"external-doc-headline text-primary"},Ka={__name:"ExternalDocuments",props:{sourceKey:{type:String,default:""},sourceName:{type:String,default:""}},setup(e){const t=N([]),a=e;function s(){a.sourceName&&a.sourceKey&&a.sourceName=="Census"&&Ma.get_census_documents(a.sourceKey).then(o=>{if(Object.keys(o).length){const r=o.census.reduce((l,d)=>(d.id in l?l[d.id].path.push(d.path):l[d.id]={title:d.name,link:`https://database.census.de/#/detail/${d.id}`,path:[],images:["C"]},l),{});for(const l in r)r[l].path.reverse();t.value=Object.values(r).toSorted((l,d)=>l.path.length==0||!l.path[0].title?1:d.path.length==0||!d.path[0].title?-1:l.path[0].title.localeCompare(d.path[0].title))}})}return ne(()=>{s()}),H(()=>a.sourceKey,o=>{o?s():t.value=[]}),(o,r)=>t.value?(c(),f("div",Qa,[n(ee,{class:"mt-4"}),n(B,{class:"mt-0"},{default:i(()=>[n(V,null,{default:i(()=>[b("span",Ha,p(o.$t("label.external_documents"))+":",1)]),_:1})]),_:1}),n(B,null,{default:i(()=>[n(V,null,{default:i(()=>[b("h5",null,p(e.sourceName),1)]),_:1})]),_:1}),n(B,null,{default:i(()=>[(c(!0),f(U,null,Q(t.value,(l,d)=>(c(),_(V,{key:d,class:"d-flex child-flex",cols:"6",md:"6",lg:"4",sm:"4"},{default:i(()=>[n(D(ze),{"object-data":l,"image-height":140,"with-breadcrumbs":""},null,8,["object-data"])]),_:2},1024))),128))]),_:1})])):h("",!0)}},Xa=F(Ka,[["__scopeId","data-v-c71b0ed0"]]),Wa={components:{Relations:Ea,RelationsGraph:za,ExternalDocuments:Xa,LoadingSpinner:Zt},mixins:[Ua],inject:["parent_ac"],props:{objectId:{type:Number,default:0},objectTitle:{type:String,default:""},hasChildren:{type:Boolean,default:!1}},data(){return{active_tab:0,loaded_dates:0,sidebar_tabs:{relations:{type:"relations",loading:!0,loading_relations:{},loading_dating:{},count:0},relations_graph:{type:"relations_graph",loading:!0,count:0},children:{type:"children",loading:!0,count:0},artefacts:{type:"artefacts",loading:!0,count:0}},relations:new Map([]),has_relationships:!1,external_reference:[],retrievable_refs:{Census:{key:e=>{let t="";return e.ref_link.indexOf("censusID=")!=-1?t=e.ref_link.substring(e.ref_link.indexOf("censusID=")+9):t=e.ref_link.split("/").slice(-1)[0],t}}},artefacts:[],children:[],depictions:[]}},computed:{...gt(Qe),display_data(){return this.has_relationships||this.hasChildren}},watch:{objectId(){this.reset_data(),this.load_from_ts()},relations(){if(this.relations&&this.relations.length)for(let e of this.relations)e.iris=e.rels.split(","),this.sidebar_tabs.relations.count+=Number(e.rel_cnt),this.sidebar_tabs.relations_graph.count+=Number(e.rel_cnt)}},mounted(){this.$router.query&&this.$router.query.keys().includes("graphtype")&&(this.active_tab=1)},created(){this.reset_data(),this.load_from_ts(),this.graphStore.$subscribe((e,t)=>{t.graph_empty&&this.clear_graph_tab()})},methods:{buildQueryBuilderQuery(e){let a=[{field:{is_depicted_in:"depicts"}[e],iri:[{value:`object/${this.objectId}`,label:this.objectTitle}]}];return JSON.stringify(a)},node_clicked(){this.active_tab=1},check_relation_map(){this.relations.size==0&&delete this.sidebar_tabs.relations},clear_graph_tab(){delete this.sidebar_tabs.relations_graph},is_valid_response(e){return e===null?!1:!(e.id&&e.id!=this.objectId)},read_response(e,t){if(e&&this.is_valid_response(e)&&e.relations&&e.relations.length){this.sidebar_tabs.relations.loading_relations[t]=e.relations.length;const a=vt({loading:!0,loaded:0,from:e.relations.length});this.sidebar_tabs.relations.loading_dating[t]=a,this.relations.set(t,"loading");const s=[];e.relations.forEach(o=>{s.push(x.get_dating_for_object(o.obj).then(r=>(a.loaded++,r)))}),Promise.allSettled(s).then(o=>{const r=o.map(l=>l.value).toSorted((l,d)=>{if(!l.dating&&!d.dating)return 0;if(!l.dating&&d.dating)return 1;if(l.dating&&!d.dating)return-1;{const y=new Date(l.dating.from),v=new Date(d.dating.from);return y-v}}).map(l=>l.obj);this.sidebar_tabs.relations.loading_dating[t]=!1,this.relations.set(t,r),this.sidebar_tabs.relations.count+=r.length})}},load_from_ts(){X.has_relationships(this.objectId,this.parent_ac.signal).then(e=>{e.exists?(this.has_relationships=!0,this.graphStore.graph_empty=!1):(this.has_relationships=!1,delete this.sidebar_tabs.relations_graph)}).then(()=>{const e=[];this.has_relationships?(e.push(x.get_depicts_relations(this.objectId,this.parent_ac.signal).then(t=>{this.read_response(t,"depicts")})),e.push(x.get_depicted_relations(this.objectId,this.parent_ac.signal).then(t=>{this.read_response(t,"is_depicted_in")})),e.push(x.get_duplicate_relations(this.objectId,this.parent_ac.signal).then(t=>{this.read_response(t,"is_duplicate")})),e.push(x.get_is_copy_after_relations(this.objectId,this.parent_ac.signal).then(t=>{this.read_response(t,"is_copy_after")})),e.push(x.get_has_copy_relations(this.objectId,this.parent_ac.signal).then(t=>{this.read_response(t,"has_copy")})),e.push(x.get_has_precursor_relations(this.objectId,this.parent_ac.signal).then(t=>{this.read_response(t,"is_based_on")})),e.push(x.get_was_precursor_relations(this.objectId,this.parent_ac.signal).then(t=>{this.read_response(t,"is_precursor_for")})),e.push(x.get_related_to_relations(this.objectId,this.parent_ac.signal).then(t=>{this.read_response(t,"related_to")})),e.push(x.get_has_version_relations(this.objectId,this.parent_ac.signal).then(t=>{this.read_response(t,"has_version")})),e.push(x.get_is_version_of_relations(this.objectId,this.parent_ac.signal).then(t=>{this.read_response(t,"is_version_of")})),Promise.allSettled(e).then(()=>{this.sidebar_tabs.relations.loading=!1,this.check_relation_map()})):delete this.sidebar_tabs.relations}),x.get_children(this.objectId,this.parent_ac.signal).then(e=>{if(e&&e.children&&e.children.length&&e.id==this.objectId){let t=this.parse_children_mixin(e.children);this.children=t,this.sidebar_tabs.children.loading=!1,this.sidebar_tabs.children.count=t.length}else delete this.sidebar_tabs.children}),x.get_external_reference(this.objectId,this.$i18n.locale,this.parent_ac.signal).then(e=>{if(e&&Object.keys(e).includes("references")){const t=e.references.filter(s=>s.ref_source in this.retrievable_refs),a=[];for(let s of t){const r=this.retrievable_refs[s.ref_source].key(s);a.push({source:s.ref_source,key:r})}this.external_reference=a}else this.external_reference=[]}),x.get_related_artefacts(this.objectId,this.parent_ac.signal).then(e=>{e&&e.artefacts&&e.artefacts.length&&e.id==this.objectId?(this.artefacts=e.artefacts,this.sidebar_tabs.artefacts.loading=!1,this.sidebar_tabs.artefacts.count=e.artefacts.length):delete this.sidebar_tabs.artefacts})},reset_data(){this.relations=new Map([["depicts",[]],["is_depicted_in",[]],["is_copy_after",[]],["has_copy",[]],["is_based_on",[]],["is_precursor_for",[]],["is_duplicate",[]],["is_version_of",[]],["has_version",[]],["related_to",[]]]),this.children=[],this.sidebar_tabs={relations:{type:"relations",loading:!0,count:0,loading_relations:{},loading_dating:{}},children:{type:"children",loading:!0,count:0},artefacts:{type:"artefacts",loading:!0,count:0},relations_graph:{type:"relations_graph",loading:!1,count:0}}}}},Ja={key:0},Ya={key:0,class:"pl-1"},Za={key:1,class:"pl-1"},es={key:0},ts={key:0},as={key:2},ss={key:3};function ns(e,t,a,s,o,r){const l=C("loading-spinner"),d=C("Relations"),y=C("external-documents"),v=C("RelationsGraph");return r.display_data?(c(),f("div",Ja,[n(ea,{modelValue:o.active_tab,"onUpdate:modelValue":t[0]||(t[0]=g=>o.active_tab=g),"show-arrows":"",class:"text-primary"},{default:i(()=>[(c(!0),f(U,null,Q(o.sidebar_tabs,(g,E,q)=>(c(),_(aa,{key:q},{default:i(()=>[O(p(e.$t("label."+g.type))+" ",1),g.loading?(c(),f("span",Ya,[n(kt,{width:3,size:20,indeterminate:"",color:"grey-lighten-1"})])):h("",!0),g.count?(c(),f("span",Za,"("+p(g.count)+")",1)):h("",!0)]),_:2},1024))),128))]),_:1},8,["modelValue"]),n(ta,{modelValue:o.active_tab,"onUpdate:modelValue":t[2]||(t[2]=g=>o.active_tab=g)},{default:i(()=>[(c(!0),f(U,null,Q(o.sidebar_tabs,(g,E,q)=>(c(),_(sa,{key:q,class:"px-1 pt-4",value:`${g.type}`},{default:i(()=>[g.type=="relations"?(c(),f("div",es,[(c(!0),f(U,null,Q(o.relations,([w,$])=>(c(),_(B,{key:w},{default:i(()=>[$.length?(c(),_(V,{key:0,class:"mb-1"},{default:i(()=>[n(B,{align:"center"},{default:i(()=>[n(V,{cols:"11"},{default:i(()=>[b("h5",null,p(e.$t("label."+w)),1)]),_:2},1024),$.length>1&&w=="is_depicted_in"?(c(),_(V,{key:0,cols:"1",class:"ma-0 pa-0"},{default:i(()=>[n(S,{style:{"text-decoration":"none"},density:"compact",icon:"mdi-text-search-variant",to:{name:"Search",query:{q:r.buildQueryBuilderQuery(w)}}},null,8,["to"]),e.$vuetify.display.sm||e.$vuetify.display.xs?h("",!0):(c(),_(G,{key:0,location:"bottom","open-delay":"500",activator:"parent"},{default:i(()=>[b("span",null,p(e.$t("user_info.open_as_search_result")),1)]),_:1}))]),_:2},1024)):h("",!0)]),_:2},1024),n(B,null,{default:i(()=>[$=="loading"?(c(),_(V,{key:0,class:"ma-0 pa-0"},{default:i(()=>[n(l)]),_:1})):$.length?(c(),_(V,{key:1},{default:i(()=>[n(d,{data:$},null,8,["data"])]),_:2},1024)):h("",!0)]),_:2},1024)]),_:2},1024)):h("",!0)]),_:2},1024))),128)),o.external_reference?(c(),f("span",ts,[(c(!0),f(U,null,Q(o.external_reference,(w,$)=>(c(),_(B,{key:`${w.source}-${$}`},{default:i(()=>[n(V,{class:"mb-1"},{default:i(()=>[n(y,{"source-key":w.key,"source-name":w.source},null,8,["source-key","source-name"])]),_:2},1024)]),_:2},1024))),128))])):h("",!0)])):g.type=="relations_graph"?(c(),f("div",{key:1,"on:nodeClicked":t[1]||(t[1]=(...w)=>r.node_clicked&&r.node_clicked(...w))},[n(B,null,{default:i(()=>[n(V,{class:"mb-1"},{default:i(()=>[n(v,{"object-id":a.objectId},null,8,["object-id"])]),_:1})]),_:1})],32)):g.type=="artefacts"?(c(),f("div",as,[n(V,{class:"mb-1"},{default:i(()=>[n(d,{data:o.artefacts},null,8,["data"])]),_:1})])):g.type=="children"?(c(),f("div",ss,[n(d,{data:o.children,tree:""},null,8,["data"])])):h("",!0)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])):h("",!0)}const rs=F(Wa,[["render",ns],["__scopeId","data-v-f9048ae1"]]),os=jt("v-alert-title"),is=["success","info","warning","error"],ls=xe({border:{type:[Boolean,String],validator:e=>typeof e=="boolean"||["top","end","bottom","start"].includes(e)},borderColor:String,closable:Boolean,closeIcon:{type:wt,default:"$close"},closeLabel:{type:String,default:"$vuetify.close"},icon:{type:[Boolean,String,Function,Object],default:null},modelValue:{type:Boolean,default:!0},prominent:Boolean,title:String,text:String,type:{type:String,validator:e=>is.includes(e)},...xt(),...$t(),...It(),...St(),...$e(),...Ie(),...Se(),...Ct(),...Ve(),...Ce({variant:"flat"})},"VAlert"),cs=Pe()({name:"VAlert",props:ls(),emits:{"click:close":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{emit:a,slots:s}=t;const o=Oe(e,"modelValue"),r=K(()=>{if(e.icon!==!1)return e.type?e.icon??`$${e.type}`:e.icon}),l=K(()=>({color:e.color??e.type,variant:e.variant})),{themeClasses:d}=Te(e),{colorClasses:y,colorStyles:v,variantClasses:g}=Be(l),{densityClasses:E}=Vt(e),{dimensionStyles:q}=Pt(e),{elevationClasses:w}=Ot(e),{locationStyles:$}=qt(e),{positionClasses:L}=qe(e),{roundedClasses:u}=De(e),{textColorClasses:m,textColorStyles:j}=Tt(Bt(e,"borderColor")),{t:I}=Dt(),k=K(()=>({"aria-label":I(e.closeLabel),onClick(P){o.value=!1,a("click:close",P)}}));return()=>{const P=!!(s.prepend||r.value),R=!!(s.title||e.title),Y=!!(s.close||e.closable);return o.value&&n(e.tag,{class:["v-alert",e.border&&{"v-alert--border":!!e.border,[`v-alert--border-${e.border===!0?"start":e.border}`]:!0},{"v-alert--prominent":e.prominent},d.value,y.value,E.value,w.value,L.value,u.value,g.value,e.class],style:[v.value,q.value,$.value,e.style],role:"alert"},{default:()=>{var z,te;return[Re(!1,"v-alert"),e.border&&n("div",{key:"border",class:["v-alert__border",m.value],style:j.value},null),P&&n("div",{key:"prepend",class:"v-alert__prepend"},[s.prepend?n(le,{key:"prepend-defaults",disabled:!r.value,defaults:{VIcon:{density:e.density,icon:r.value,size:e.prominent?44:28}}},s.prepend):n(re,{key:"prepend-icon",density:e.density,icon:r.value,size:e.prominent?44:28},null)]),n("div",{class:"v-alert__content"},[R&&n(os,{key:"title"},{default:()=>{var M;return[((M=s.title)==null?void 0:M.call(s))??e.title]}}),((z=s.text)==null?void 0:z.call(s))??e.text,(te=s.default)==null?void 0:te.call(s)]),s.append&&n("div",{key:"append",class:"v-alert__append"},[s.append()]),Y&&n("div",{key:"close",class:"v-alert__close"},[s.close?n(le,{key:"close-defaults",defaults:{VBtn:{icon:e.closeIcon,size:"x-small",variant:"text"}}},{default:()=>{var M;return[(M=s.close)==null?void 0:M.call(s,{props:k.value})]}}):n(S,A({key:"close-btn",icon:e.closeIcon,size:"x-small",variant:"text"},k.value),null)])]}})}}}),ds={name:"ErrorResponse",props:{type:{type:String,default:""},error:{type:Error,default:null}},computed:{error_message:function(){let e="";return this.error&&(this.error.response?e="error.not_found":this.error.request?e="error.network_error":this.error.message?e="error."+this.error.message:e="error.unknown"),e},error_color:function(){let e="error";return this.error&&this.error.response&&(e="accent"),e}}},us={key:0};function _s(e,t,a,s,o,r){return a.type?(c(),f("span",us,[a.type==="symbole"?(c(),f(U,{key:0},[n(re,{size:"large",color:r.error_color},{default:i(()=>[O("mdi-alert-circle-outline")]),_:1},8,["color"]),O("  "+p(e.$t(r.error_message)),1)],64)):a.type==="bar"?(c(),_(cs,{key:1,density:"compact",variant:"outlined",type:"error"},{default:i(()=>[O("  "+p(e.$t(r.error_message)),1)]),_:1})):h("",!0)])):h("",!0)}const hs=F(ds,[["render",_s]]),ps={name:"ObjectDetail",components:{MainContainer:Et,ThreeColumnLayout:Nt,ImageSection:Ft,PermaLink:ba,Sidebar:rs,ObjectComparisonButtons:ka,DetailPaginator:Ia,ErrorResponse:hs,BackToSearchButton:ga,ObjectDetailTS:Lt,ObjectTitle:At},provide(){return{parent_ac:K(()=>this.ac)}},data(){return{loading:!0,objectId:null,object_path:[],title:"",has_children:!1,errors:[],trip_data:[],cataloging:[],ac:null,exists:2}},computed:{mailto_link:function(){return"mailto:thesaurus@bbaw.de?subject=Feedback zu Objekt: "+this.objectId}},watch:{objectId(e,t){t&&e!=t&&(this.ac.abort(),this.ac=new AbortController,this.object_path=[],this.title="",this.has_children=!1,this.cataloging=[],this.load_from_ts())}},updated(){this.objectId=Number(this.$route.params.objectid)},created(){this.ac=new AbortController,this.objectId=Number(this.$route.params.objectid),this.load_from_ts()},mounted(){na({title:()=>`${this.title} - Antiquitatum Thesaurus`,meta:[{property:"og:title",content:()=>`${this.title} - Antiquitatum Thesaurus`}]})},methods:{onShowError:function(e){this.errors.push(new Error(e))},load_data(){x.get_preferred_title(this.objectId,"de",this.ac.signal).then(e=>{e&&(this.title=e)}),x.get_parents_path(this.objectId,this.ac.signal).then(e=>{e&&e.path&&e.id==this.objectId&&(this.object_path=e.path)}),x.has_children(this.objectId,this.ac.signal).then(e=>{e&&e.children&&e.id==this.objectId&&(this.has_children=e.children)})},load_from_ts(){x.object_exists(this.objectId).then(e=>{this.exists=e.exists,this.exists&&this.load_data()})}}},fs={key:0},ms={key:0},bs={class:"sticky t-100"},ys={key:0,class:"text-center"},gs={class:"pa-2",align:"right"},vs=["href"],ks={key:1};function js(e,t,a,s,o,r){const l=C("ErrorResponse"),d=C("BackToSearchButton"),y=C("DetailPaginator"),v=C("PermaLink"),g=C("ObjectTitle"),E=C("ImageSection"),q=C("ObjectComparisonButtons"),w=C("ObjectDetailTS"),$=C("Sidebar"),L=C("ThreeColumnLayout"),u=C("MainContainer");return c(),_(u,null,{default:i(()=>[o.exists===!0?(c(),f("div",fs,[o.errors.length?(c(),_(B,{key:0,onShow_error:r.onShowError},{default:i(()=>[(c(!0),f(U,null,Q(o.errors,(m,j)=>(c(),_(l,{key:j,type:"bar",error:m},null,8,["error"]))),128))]),_:1},8,["onShow_error"])):h("",!0),n(B,{class:"ma-0 pa-0",align:"center",justify:"center",style:{"min-height":"40px"}},{default:i(()=>[n(V,{class:be(["ma-0 pa-0",{"text-center":e.$vuetify.display.sm||e.$vuetify.display.xs}]),cols:"12",md:"5"},{default:i(()=>[e.$route.query.mode=="objects"|!e.$route.query.mode?(c(),_(d,{key:0})):h("",!0)]),_:1},8,["class"]),n(V,{class:"ma-0 pa-0 text-center",cols:"12",md:"2"},{default:i(()=>[e.$route.query.mode=="objects"?(c(),_(y,{key:0})):(c(),_(_e,{key:1,style:{height:"36px"}}))]),_:1}),e.$vuetify.display.xs?h("",!0):(c(),_(V,{key:0,class:be(["ma-0 pa-0",{"text-center":e.$vuetify.display.sm||e.$vuetify.display.xs,"text-right":!(e.$vuetify.display.sm||e.$vuetify.display.xs)}]),cols:"12","align-self":"end",md:"5"},{default:i(()=>[n(v,{id:o.objectId.toString(),path:"object"},null,8,["id"])]),_:1},8,["class"]))]),_:1}),n(ee),n(L,null,{"col-1":i(()=>[e.$vuetify.display.xs?(c(),f("div",ms,[n(g,{title:o.title,"object-path":o.object_path,"has-children":o.has_children},null,8,["title","object-path","has-children"]),n(ee,{class:"mt-4"})])):h("",!0),b("div",bs,[n(E,{"object-id":o.objectId,max_width:430},null,8,["object-id"]),e.$vuetify.display.xs||e.$vuetify.display.sm?h("",!0):(c(),_(q,{key:0}))])]),"col-2":i(()=>[n(Rt,{class:"px-2 pb-2"},{default:i(()=>[e.$vuetify.display.xs?h("",!0):(c(),_(g,{key:0,title:o.title,"object-path":o.object_path,"has-children":o.has_children},null,8,["title","object-path","has-children"])),n(w,{"object-id":o.objectId},null,8,["object-id"])]),_:1}),n(ee),e.$vuetify.display.xs?(c(),f("div",ys,[n(v,{id:o.objectId.toString(),path:"object"},null,8,["id"])])):h("",!0),b("div",gs,[b("a",{class:"text-caption feedback",href:r.mailto_link},"Feedback",8,vs)])]),"col-3":i(()=>[n($,{style:{"margin-top":"3.5px"},"object-id":o.objectId,"object-title":o.title,"has-children":o.has_children},null,8,["object-id","object-title","has-children"])]),_:1})])):o.exists===!1?(c(),f("div",ks,[n(J,{variant:"outlined",rounded:"0","max-width":"500",class:"mx-auto my-10"},{default:i(()=>[n(de,null,{default:i(()=>[O(p(e.$t("error.object_not_found")),1)]),_:1}),n(Ae,null,{default:i(()=>[O(p(e.$t("error.wrong_object_id")),1)]),_:1}),n(ue,null,{default:i(()=>[n(S,{variant:"text",color:"#C60C30",to:{name:"Search"}},{default:i(()=>[O("Suche")]),_:1})]),_:1})]),_:1})])):h("",!0)]),_:1})}const Us=F(ps,[["render",js],["__scopeId","data-v-baff3d76"]]);export{Us as default};