1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chunks/chunk-MEGr_gths8Cm-dsvg.js","assets/chunks/chunk-vBDoWlyaA3s2-propo.js","assets/chunks/chunk-C9MwVHZDj8F9-rende.js","assets/chunks/chunk-BY8-DUITmgGY-_onpa.js","assets/chunks/chunk-BmiWkJwjQ_s1-isele.js"])))=>i.map(i=>d[i]); 2import{aN as N,dI as V,cZ as p,at as a,cm as W,dR as D,cO as g,aC as S,az as F,cB as L,dF as G,aA as w,aI as y,dV as J,cs as j,_ as q}from"./chunk-C9MwVHZDj8F9-rende.js";import{aN as K,aJ as Q,a7 as X,h as Y,_ as ee}from"./chunk-BY8-DUITmgGY-_onpa.js";import{B as te}from"./chunk-CLOKsthOHEsE-build.js";import{T as ae}from"./chunk-CCH7r_fEdX0Z-toolt.js";/* empty css */import"./chunk-BmiWkJwjQ_s1-isele.js";import"./chunk-DljQp23X1kAl-union.js";const ie={class:"multi-building-view"},ne={key:0,class:"wrap-img"},oe=N({__name:"MultiBuildingRendering",props:{buildings:{default:()=>[]},activeHoverBuilding:{default:""}},emits:["onClickBuilding","updateActiveHoverBuilding"],setup(C,{emit:k}){const E=C,l=K(),z=Y(()=>q(()=>import("./chunk-MEGr_gths8Cm-dsvg.js"),__vite__mapDeps([0,1,2,3,4]))),n=V(),{generateUrl:I,isCloudflareUuid:M}=Q(),u=k,r=p(null),o=p({width:0,height:0}),m=p(),c=a(()=>{var e,t;return((t=(e=n.$app.screens)==null?void 0:e.building)==null?void 0:t.multiBuildingHoverImage)||""}),v=a(()=>W(n.$buildings||[],e=>({id:e.id,type:"group",params:{shapes:e.shapes||[],class:{active:E.activeHoverBuilding===e.id}}}))),s=a(()=>{var e,t;return(t=(e=n.$app.screens)==null?void 0:e.building)==null?void 0:t.panZoomEnabled}),H=a(()=>{var e,t;return(t=(e=n.$app.screens)==null?void 0:e.building)==null?void 0:t.initialZoomScale}),R=a(()=>({panEnabled:s.value,zoomEnabled:s.value,initialZoomScale:H.value})),h=a(()=>(l==null?void 0:l.page)||{}),d=a(()=>{var e;return X((e=h.value)==null?void 0:e.width)?h.value.width:0}),f=a(()=>d.value<=1023),$=a(()=>{var i;if(!((i=o.value)!=null&&i.width))return!1;const t=(d.value-20)*100/o.value.width;return o.value.height*t/100}),O=a(()=>d.value>600?{}:{height:`${$.value}px`}),Z=a(()=>({ref:"tooltip",desiredDirections:["e","w","s","n"],containingElement:()=>m.value,interactive:!1,debounce:0})),P=e=>{const t=new Image;t.addEventListener("load",function(){o.value.width=this.naturalWidth,o.value.height=this.naturalHeight},{once:!0}),t.src=e},T=(e,t)=>{var i;u("onClickBuilding",t),(i=n.$router)==null||i.navigateReplace({name:"buildings-show",params:{building_id:t}})},U=()=>{_(),u("updateActiveHoverBuilding",null)},x=(e,t)=>{A(e,t),u("updateActiveHoverBuilding",t)},A=(e,t)=>{if(!e||!t||f.value){_();return}e.data={building:n.$building(t)},r.value=e},_=()=>{r.value=null};return D(()=>c.value,e=>{var b,B;if(!e)return;const t=M(e)?"cloudflare":"uploadcare",i=I(e,{},"image.png",!!((B=(b=n.$app)==null?void 0:b.features)!=null&&B.useUploadCareRawUrl),t);P(i)},{immediate:!0}),(e,t)=>(g(),S("div",ie,[c.value?(g(),S("div",ne,[v.value?(g(),F(G(z),{key:0,ref_key:"dSvgRef",ref:m,class:"multi-building-svg",image:c.value,"uc-params":{resize:1600},shapes:v.value,"show-controls":s.value,"use-thumbnail":s.value,"pan-zoom-settings":R.value,fit:f.value,style:L(O.value),onShapeClicked:T,onShapeMouseOver:x,onShapeMouseOut:U},null,8,["image","shapes","show-controls","use-thumbnail","pan-zoom-settings","fit","style"])):w("",!0)])):w("",!0),y(ae,j(Z.value,{event:r.value}),{default:J(({data:{building:i}})=>[y(te,{class:"popover-building","inventory-item":i},null,8,["inventory-item"])]),_:1},16,["event"])]))}}),ge=ee(oe,[["__scopeId","data-v-a4777ecf"]]);export{ge as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.