PageSourceSearch

https://selfwalkajsgoodtimebar.web.app/assets/AdminView.9d4c9eee.js

js selfwalkajsgoodtimebar.web.app collected 2026-10-03 12:35:25 UTC 253,451 bytes, 6 lines download raw bytes

1var Yo=Object.defineProperty;var Wo=(x,e,t)=>e in x?Yo(x,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):x[e]=t;var mn=(x,e,t)=>(Wo(x,typeof e!="symbol"?e+"":e,t),t);import{v as Q,b as F,e as Dt,d as ot,a as Ko}from"./runtime-dom.esm-bundler.2a0ee4d0.js";import{o as Bn,A as en,O as Lo,U as Po,E as Qo,V as J,M as cn,w as dn,Q as Ue,x as io,y as Pt,L as Jo,z as Jt,D as ko,G as Ot,H as es,P as ts,I as ns,J as Ht,N as tn,R as nn,W as os,X as Sn,Y as ss,Z as Eo,$ as as,a0 as is,a1 as lo,a2 as zo,a3 as Do,a4 as Fn,a5 as ls,a6 as Vn,a7 as Oo,a8 as to,a9 as $o,aa as rs,ab as Wn,ac as cs,ad as ie,ae as ds,af as Nt,ag as us,ah as ps,ai as jn,aj as Ro,ak as Zo,al as hs,am as Uo,an as ms,ao as fs,ap as gs,aq as Bo,ar as Ln,as as vs,at as ws,au as bs,av as ys,aw as _s,ax as Cs,ay as xs,az as Ss,aA as Ms,aB as ro,aC as As,aD as Is,aE as co,aF as Ts,aG as Ls,aH as Ps,aI as ks,aJ as Fo,aK as xt,aL as bt,aM as uo,aN as Dn,aO as No,aP as fn,aQ as Es,aR as zs,aS as Ds,aT as Os,u as Gt,h as $s,T as Nn,q as un,aU as Rs,aV as Zs,aW as Xo,aX as Us,aY as Bs,aZ as pt,K as po,a_ as Fs,a$ as Ns,B as Xs}from"./index.8211466d.js";import{g as Pn,r as Mn,u as kn,a as En,d as Vs}from"./index.esm2017.269d1646.js";import{c as js,d as Hs}from"./ToolUI.ff5135c5.js";import{c as I,d as T,e as n,r as C,k as yn,t as le,f as W,_ as Yt,a6 as qs,o as zn,h as R,u as f,F as Ae,M as ke,a5 as pn,p as on,g as sn,w as Kn,G as xn,N as Mt,n as Vo,L as An,i as Gs,j as Zt}from"./_plugin-vue_export-helper.491c0f58.js";import{l as qt}from"./index.5217b87f.js";/* empty css                                                                       */import"./TopLeftMenu.vue_vue_type_style_index_0_scoped_f4dbed34_lang.bc9c7db9.js";import"./storeDiagrams.c83becf2.js";/* empty css                                                                             *//* empty css                                                                         *//* empty css                                                                         */import{g as no,b as In}from"./CustWalls.06541c5c.js";import"./qrcode.vue.esm.2fdd168b.js";import"./morecapbutton.5e433274.js";const Ys={"pointer-events":"all",cursor:"pointer",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ws=["fill"],Ks=["fill"],Qs={__name:"PhotoIcon",props:{fillColor:{type:String,default:"white"}},setup(x){const e=x;return(t,o)=>(I(),T("svg",Ys,[n("path",{d:"M13 4C13 3.73478 12.8946 3.48043 12.7071 3.29289C12.5196 3.10536 12.2652 3 12 3H1C0.734784 3 0.480444 3.10536 0.292908 3.29289C0.105371 3.48043 0 3.73478 0 4V15C0 15.2652 0.105371 15.5196 0.292908 15.7071C0.480444 15.8946 0.734784 16 1 16H12C12.2652 16 12.5196 15.8946 12.7071 15.7071C12.8946 15.5196 13 15.2652 13 15V4ZM8.45901 5C8.75569 5 9.04568 5.08797 9.29236 5.25279C9.53903 5.41761 9.73129 5.65189 9.84482 5.92598C9.95835 6.20007 9.98805 6.50166 9.93018 6.79263C9.8723 7.0836 9.72943 7.35087 9.51965 7.56065C9.30987 7.77043 9.04262 7.9133 8.75165 7.97118C8.46068 8.02905 8.15907 7.99935 7.88498 7.88582C7.61089 7.77229 7.37661 7.58003 7.21179 7.33336C7.04697 7.08669 6.95901 6.79667 6.95901 6.5C6.95901 6.10218 7.11704 5.72065 7.39835 5.43935C7.67965 5.15804 8.06119 5 8.45901 5ZM2 13.5V9.125C2.07998 8.79307 2.26202 8.49457 2.52051 8.2715L3.89651 6.9785C3.99849 6.88433 4.13219 6.83203 4.271 6.83203C4.40981 6.83203 4.54353 6.88433 4.64551 6.9785L7.31351 10.625L8.9697 8.9785C9.0646 8.88467 9.19268 8.83205 9.32614 8.83205C9.4596 8.83205 9.58768 8.88467 9.68259 8.9785L10.8105 10.2715C10.9613 10.4827 11.0288 10.7421 11 11V13.5C11 13.6326 10.9473 13.7598 10.8535 13.8535C10.7598 13.9473 10.6326 14 10.5 14H2.5C2.36739 14 2.24022 13.9473 2.14645 13.8535C2.05269 13.7598 2 13.6326 2 13.5Z",fill:e.fillColor},null,8,Ws),n("path",{d:"M4 0C3.73478 0 3.48044 0.105356 3.29291 0.292892C3.10537 0.480429 3 0.734784 3 1V2H13C13.2652 2 13.5196 2.10536 13.7071 2.29289C13.8946 2.48043 14 2.73478 14 3V13H15C15.2652 13 15.5196 12.8946 15.7071 12.7071C15.8946 12.5196 16 12.2652 16 12V1C16 0.734784 15.8946 0.480429 15.7071 0.292892C15.5196 0.105356 15.2652 0 15 0H4Z",fill:e.fillColor},null,8,Ks)]))}},Js={style:{height:"100%",width:"100%",margin:"10px",display:"flex","align-items":"center"}},ea={key:0},ta=["src"],na=["value"],On={__name:"photoFire",props:{collectionName:String,documentId:String,docRef:Object,storageBucket:String,documentField:String,iconColor:{type:String,default:"white"}},emits:["urlSaved"],setup(x,{emit:e}){const t=x;C(!1);const o=C(null),a=C(null),r=C(0),s=C(null);function c(k){if(k.target.files&&k.target.files.length>0)return;k.preventDefault(),s.value.click(),console.log("selectPhoto clicked")}function d(k){if(k.target.files.length===0)return;const w=k.target.files[0],A=new FileReader;A.onload=()=>{o.value=A.result,a.value=w}
1,A.readAsDataURL(w)}async function m(k){const w=Bn(),A=en(w,"images",k),z=await Lo(A);return z.exists()?z.data():null}async function M(k){const w=Bn(),A=en(w,"images",k.name);await Po(A,{name:k.name,url:k.url})}async function u(){const k=Pn(),w=Mn(k,t.storageBucket+"/"+a.value.name),A=kn(w,a.value),z=await m(a.value.name);if(z){const G=z;console.log("emited before upload",G),e("urlSaved",G),alert("A file with the same name already exists. Using the existing file.  If you want to upload a new file, please rename the file and try again.");return}A.on("state_changed",G=>{const re=G.bytesTransferred/G.totalBytes*100;r.value=re},G=>{console.log(G),alert("Error:",G)},async()=>{const re={url:await En(w),name:a.value.name};e("urlSaved",re),console.log("emited after upload",re),await M(re),O()})}function L(){O()}function O(){o.value=null,a.value=null,r.value=0;const k=s.value;k.value=null}return(k,w)=>(I(),T("div",Js,[n("label",{style:{width:"25px",height:"25px",cursor:"pointer","border-radius":"5px",margin:"5px"},for:"photo-input",onClick:c},[yn(Qs,{fillColor:x.iconColor},null,8,["fillColor"])]),n("input",{id:"photo-input",ref_key:"photoInput",ref:s,type:"file",style:{display:"none"},onChange:d},null,544),o.value?(I(),T("div",ea,[n("img",{style:{width:"100px",height:"100px"},src:o.value,alt:"Preview of selected photo or video"},null,8,ta),r.value>0?(I(),T("progress",{key:0,value:r.value,max:"100"},le(r.value)+"%",9,na)):W("",!0),n("button",{onClick:u},"Upload"),n("button",{onClick:L},"Cancel")])):W("",!0)]))}},ho={type:"change"},Hn={type:"start"},mo={type:"end"};class oa extends Qo{constructor(e,t){super(),this.object=e,this.domElement=t,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new J,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:cn.ROTATE,MIDDLE:cn.DOLLY,RIGHT:cn.PAN},this.touches={ONE:dn.ROTATE,TWO:dn.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return c.phi},this.getAzimuthalAngle=function(){return c.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(h){h.addEventListener("keydown",Xt),this._domElementKeyEvents=h},this.saveState=function(){o.target0.copy(o.target),o.position0.copy(o.object.position),o.zoom0=o.object.zoom},this.reset=function(){o.target.copy(o.target0),o.object.position.copy(o.position0),o.object.zoom=o.zoom0,o.object.updateProjectionMatrix(),o.dispatchEvent(ho),o.update(),r=a.NONE}
1,this.update=function(){const h=new J,g=new Ue().setFromUnitVectors(e.up,new J(0,1,0)),p=g.clone().invert(),y=new J,_=new Ue,b=2*Math.PI;return function(){const xe=o.object.position;h.copy(xe).sub(o.target),h.applyQuaternion(g),c.setFromVector3(h),o.autoRotate&&r===a.NONE&&ue($e()),o.enableDamping?(c.theta+=d.theta*o.dampingFactor,c.phi+=d.phi*o.dampingFactor):(c.theta+=d.theta,c.phi+=d.phi);let de=o.minAzimuthAngle,U=o.maxAzimuthAngle;return isFinite(de)&&isFinite(U)&&(de<-Math.PI?de+=b:de>Math.PI&&(de-=b),U<-Math.PI?U+=b:U>Math.PI&&(U-=b),de<=U?c.theta=Math.max(de,Math.min(U,c.theta)):c.theta=c.theta>(de+U)/2?Math.max(de,c.theta):Math.min(U,c.theta)),c.phi=Math.max(o.minPolarAngle,Math.min(o.maxPolarAngle,c.phi)),c.makeSafe(),c.radius*=m,c.radius=Math.max(o.minDistance,Math.min(o.maxDistance,c.radius)),o.enableDamping===!0?o.target.addScaledVector(M,o.dampingFactor):o.target.add(M),h.setFromSpherical(c),h.applyQuaternion(p),xe.copy(o.target).add(h),o.object.lookAt(o.target),o.enableDamping===!0?(d.theta*=1-o.dampingFactor,d.phi*=1-o.dampingFactor,M.multiplyScalar(1-o.dampingFactor)):(d.set(0,0,0),M.set(0,0,0)),m=1,u||y.distanceToSquared(o.object.position)>s||8*(1-_.dot(o.object.quaternion))>s?(o.dispatchEvent(ho),y.copy(o.object.position),_.copy(o.object.quaternion),u=!1,!0):!1}}(),this.dispose=function(){o.domElement.removeEventListener("contextmenu",i),o.domElement.removeEventListener("pointerdown",ce),o.domElement.removeEventListener("pointercancel",dt),o.domElement.removeEventListener("wheel",oe),o.domElement.removeEventListener("pointermove",kt),o.domElement.removeEventListener("pointerup",mt),o._domElementKeyEvents!==null&&o._domElementKeyEvents.removeEventListener("keydown",Xt)};const o=this,a={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let r=a.NONE;const s=1e-6,c=new io,d=new io;let m=1;const M=new J;let u=!1;const L=new Pt,O=new Pt,k=new Pt,w=new Pt,A=new Pt,z=new Pt,G=new Pt,re=new Pt,v=new Pt,te=[],ge={};function $e(){return 2*Math.PI/60/60*o.autoRotateSpeed}function Fe(){return Math.pow(.95,o.zoomSpeed)}function ue(h){d.theta-=h}function Ie(h){d.phi-=h}const pe=function(){const h=new J;return function(p,y){h.setFromMatrixColumn(y,0),h.multiplyScalar(-p),M.add(h)}}(),Ye=function(){const h=new J;return function(p,y){o.screenSpacePanning===!0?h.setFromMatrixColumn(y,1):(h.setFromMatrixColumn(y,0),h.crossVectors(o.object.up,h)),h.multiplyScalar(p),M.add(h)}}(),Ee=function(){const h=new J;return function(p,y){const _=o.domElement;if(o.object.isPerspectiveCamera){const b=o.object.position;h.copy(b).sub(o.target);let H=h.length();H*=Math.tan(o.object.fov/2*Math.PI/180),pe(2*p*H/_.clientHeight,o.object.matrix),Ye(2*y*H/_.clientHeight,o.object.matrix)}else o.object.isOrthographicCamera?(pe(p*(o.object.right-o.object.left)/o.object.zoom/_.clientWidth,o.object.matrix),Ye(y*(o.object.top-o.object.bottom)/o.object.zoom/_.clientHeight,o.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),o.enablePan=!1)}}();function he(h){o.object.isPerspectiveCamera?m/=h:o.object.isOrthographicCamera?(o.object.zoom=Math.max(o.minZoom,Math.min(o.maxZoom,o.object.zoom*h)),o.object.updateProjectionMatrix(),u=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),o.enableZoom=!1)}function q(h){o.object.isPerspectiveCamera?m*=h:o.object.isOrthographicCamera?(o.object.zoom=Math.max(o.minZoom,Math.min(o.maxZoom,o.object.zoom/h)),o.object.updateProjectionMatrix(),u=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),o.enableZoom=!1)}function Te(h){L.set(h.clientX,h.clientY)}function Re(h){G.set(h.clientX,h.clientY)}function ne(h){w.set(h.clientX,h.clientY)}function $(h){O.set(h.clientX,h.clientY),k.subVectors(O,L).multiplyScalar(o.rotateSpeed);const g=o.domElement;ue(2*Math.PI*k.x/g.clientHeight),Ie(2*Math.PI*k.y/g.clientHeight),L.c
1opy(O),o.update()}function ee(h){re.set(h.clientX,h.clientY),v.subVectors(re,G),v.y>0?he(Fe()):v.y<0&&q(Fe()),G.copy(re),o.update()}function De(h){A.set(h.clientX,h.clientY),z.subVectors(A,w).multiplyScalar(o.panSpeed),Ee(z.x,z.y),w.copy(A),o.update()}function Me(h){h.deltaY<0?q(Fe()):h.deltaY>0&&he(Fe()),o.update()}function je(h){let g=!1;switch(h.code){case o.keys.UP:Ee(0,o.keyPanSpeed),g=!0;break;case o.keys.BOTTOM:Ee(0,-o.keyPanSpeed),g=!0;break;case o.keys.LEFT:Ee(o.keyPanSpeed,0),g=!0;break;case o.keys.RIGHT:Ee(-o.keyPanSpeed,0),g=!0;break}g&&(h.preventDefault(),o.update())}function We(){if(te.length===1)L.set(te[0].pageX,te[0].pageY);else{const h=.5*(te[0].pageX+te[1].pageX),g=.5*(te[0].pageY+te[1].pageY);L.set(h,g)}}function ht(){if(te.length===1)w.set(te[0].pageX,te[0].pageY);else{const h=.5*(te[0].pageX+te[1].pageX),g=.5*(te[0].pageY+te[1].pageY);w.set(h,g)}}function _e(){const h=te[0].pageX-te[1].pageX,g=te[0].pageY-te[1].pageY,p=Math.sqrt(h*h+g*g);G.set(0,p)}function V(){o.enableZoom&&_e(),o.enablePan&&ht()}function P(){o.enableZoom&&_e(),o.enableRotate&&We()}function ye(h){if(te.length==1)O.set(h.pageX,h.pageY);else{const p=D(h),y=.5*(h.pageX+p.x),_=.5*(h.pageY+p.y);O.set(y,_)}k.subVectors(O,L).multiplyScalar(o.rotateSpeed);const g=o.domElement;ue(2*Math.PI*k.x/g.clientHeight),Ie(2*Math.PI*k.y/g.clientHeight),L.c
1opy(O)}function be(h){if(te.length===1)A.set(h.pageX,h.pageY);else{const g=D(h),p=.5*(h.pageX+g.x),y=.5*(h.pageY+g.y);A.set(p,y)}z.subVectors(A,w).multiplyScalar(o.panSpeed),Ee(z.x,z.y),w.copy(A)}function Ce(h){const g=D(h),p=h.pageX-g.x,y=h.pageY-g.y,_=Math.sqrt(p*p+y*y);re.set(0,_),v.set(0,Math.pow(re.y/G.y,o.zoomSpeed)),he(v.y),G.copy(re)}function fe(h){o.enableZoom&&Ce(h),o.enablePan&&be(h)}function ze(h){o.enableZoom&&Ce(h),o.enableRotate&&ye(h)}function ce(h){o.enabled!==!1&&(te.length===0&&(o.domElement.setPointerCapture(h.pointerId),o.domElement.addEventListener("pointermove",kt),o.domElement.addEventListener("pointerup",mt)),l(h),h.pointerType==="touch"?Z(h):At(h))}function kt(h){o.enabled!==!1&&(h.pointerType==="touch"?j(h):zt(h))}function mt(h){S(h),te.length===0&&(o.domElement.releasePointerCapture(h.pointerId),o.domElement.removeEventListener("pointermove",kt),o.domElement.removeEventListener("pointerup",mt)),o.dispatchEvent(mo),r=a.NONE}function dt(h){S(h)}function At(h){let g;switch(h.button){case 0:g=o.mouseButtons.LEFT;break;case 1:g=o.mouseButtons.MIDDLE;break;case 2:g=o.mouseButtons.RIGHT;break;default:g=-1}switch(g){case cn.DOLLY:if(o.enableZoom===!1)return;Re(h),r=a.DOLLY;break;case cn.ROTATE:if(h.ctrlKey||h.metaKey||h.shiftKey){if(o.enablePan===!1)return;ne(h),r=a.PAN}else{if(o.enableRotate===!1)return;Te(h),r=a.ROTATE}break;case cn.PAN:if(h.ctrlKey||h.metaKey||h.shiftKey){if(o.enableRotate===!1)return;Te(h),r=a.ROTATE}else{if(o.enablePan===!1)return;ne(h),r=a.PAN}break;default:r=a.NONE}r!==a.NONE&&o.dispatchEvent(Hn)}function zt(h){switch(r){case a.ROTATE:if(o.enableRotate===!1)return;$(h);break;case a.DOLLY:if(o.enableZoom===!1)return;ee(h);break;case a.PAN:if(o.enablePan===!1)return;De(h);break}}function oe(h){o.enabled===!1||o.enableZoom===!1||r!==a.NONE||(h.preventDefault(),o.dispatchEvent(Hn),Me(h),o.dispatchEvent(mo))}function Xt(h){o.enabled===!1||o.enablePan===!1||je(h)}function Z(h){switch(E(h),te.length){case 1:switch(o.touches.ONE){case dn.ROTATE:if(o.enableRotate===!1)return;We(),r=a.TOUCH_ROTATE;break;case dn.PAN:if(o.enablePan===!1)return;ht(),r=a.TOUCH_PAN;break;default:r=a.NONE}break;case 2:switch(o.touches.TWO){case dn.DOLLY_PAN:if(o.enableZoom===!1&&o.enablePan===!1)return;V(),r=a.TOUCH_DOLLY_PAN;break;case dn.DOLLY_ROTATE:if(o.enableZoom===!1&&o.enableRotate===!1)return;P(),r=a.TOUCH_DOLLY_ROTATE;break;default:r=a.NONE}break;default:r=a.NONE}r!==a.NONE&&o.dispatchEvent(Hn)}function j(h){switch(E(h),r){case a.TOUCH_ROTATE:if(o.enableRotate===!1)return;ye(h),o.update();break;case a.TOUCH_PAN:if(o.enablePan===!1)return;be(h),o.update();break;case a.TOUCH_DOLLY_PAN:if(o.enableZoom===!1&&o.enablePan===!1)return;fe(h),o.update();break;case a.TOUCH_DOLLY_ROTATE:if(o.enableZoom===!1&&o.enableRotate===!1)return;ze(h),o.update();break;default:r=a.NONE}}function i(h){o.enabled!==!1&&h.preventDefault()}function l(h){te.push(h)}function S(h){delete ge[h.pointerId];for(let g=0;g<te.length;g++)if(te[g].pointerId==h.pointerId){te.splice(g,1);return}}function E(h){let g=ge[h.pointerId];g===void 0&&(g=new Pt,ge[h.pointerId]=g),g.set(h.pageX,h.pageY)}function D(h){const g=h.pointerId===te[0].pointerId?te[1]:te[0];return ge[g.pointerId]}o.domElement.addEventListener("contextmenu",i),o.domElement.addEventListener("pointerdown",ce),o.domElement.addEventListener("pointercancel",dt),o.domElement.addEventListener("wheel",oe,{passive:!1}),this.update()}}class sa extends Jo{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(t){return new ca(t)}),this.register(function(t){return new ga(t)}),this.register(function(t){return new va(t)}),this.register(function(t){return new ua(t)}),this.register(function(t){return new pa(t)}),this.register(function(t){return new ha(t)}),this.register(function(t){return new ma(t)}),this.register(function(t){return new ra(t)}),this.register(function(t){return new fa(t)}),this.register(function(t){return new da(t)}),this.register(function(t){return new ia(t)}),this.register(function(t){return new wa(t)}),this.register(function(t){return new ba(t)})}load(e,t,o,a){const r=this;let s;this.resourcePath!==""?s=this.resourcePath:this.path!==""?s=this.path:s=Jt.extractUrlBase(e),this.manager.itemStart(e);const c=function(m){a?a(m):console.error(m),r.manager.itemError(e),r.manager.itemEnd(e)},d=new ko(this.manager);d.setPath(this.path),d.setResponseType("arraybuffer"),d.setRequestHeader(this.requestHeader),d.setWithCredentials(this.withCredentials),d.load(e,function(m){try{r.parse(m,s,function(M){t(
vendor: 4,388 bytes, line 1
1M),r.manager.itemEnd(e)},c)}catch(M){c(M)}},o,c)}setDRACOLoader(e){return this.dracoLoader=e,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,o,a){let r;const s={},c={};if(typeof e=="string")r=JSON.parse(e);else if(e instanceof ArrayBuffer)if(Jt.decodeText(new Uint8Array(e,0,4))===jo){try{s[Le.KHR_BINARY_GLTF]=new ya(e)}catch(M){a&&a(M);return}r=JSON.parse(s[Le.KHR_BINARY_GLTF].content)}else r=JSON.parse(Jt.decodeText(new Uint8Array(e)));else r=e;if(r.asset===void 0||r.asset.version[0]<2){a&&a(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const d=new za(r,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});d.fileLoader.setRequestHeader(this.requestHeader);for(let m=0;m<this.pluginCallbacks.length;m++){const M=this.pluginCallbacks[m](d);c[M.name]=M,s[M.name]=!0}if(r.extensionsUsed)for(let m=0;m<r.extensionsUsed.length;++m){const M=r.extensionsUsed[m],u=r.extensionsRequired||[];switch(M){case Le.KHR_MATERIALS_UNLIT:s[M]=new la;break;case Le.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:s[M]=new xa;break;case Le.KHR_DRACO_MESH_COMPRESSION:s[M]=new _a(r,this.dracoLoader);break;case Le.KHR_TEXTURE_TRANSFORM:s[M]=new Ca;break;case Le.KHR_MESH_QUANTIZATION:s[M]=new Sa;break;default:u.indexOf(M)>=0&&c[M]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+M+'".')}}d.setExtensions(s),d.setPlugins(c),d.parse(o,a)}parseAsync(e,t){const o=this;return new Promise(function(a,r){o.parse(e,t,a,r)})}}function aa(){let x={};return{get:function(e){return x[e]},add:function(e,t){x[e]=t},remove:function(e){delete x[e]},removeAll:function(){x={}}}}const Le={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class ia{constructor(e){this.parser=e,this.name=Le.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let o=0,a=t.length;o<a;o++){const r=t[o];r.extensions&&r.extensions[this.name]&&r.extensions[this.name].light!==void 0&&e._addNodeRef(this.cache,r.extensions[this.name].light)}}_loadLight(e){const t=this.parser,o="light:"+e;let a=t.cache.get(o);if(a)return a;const r=t.json,d=((r.extensions&&r.extensions[this.name]||{}).lights||[])[e];let m;const M=new Ot(16777215);d.color!==void 0&&M.fromArray(d.color);const u=d.range!==void 0?d.range:0;switch(d.type){case"directional":m=new ns(M),m.target.position.set(0,0,-1),m.add(m.target);break;case"point":m=new ts(M),m.distance=u;break;case"spot":m=new es(M),m.distance=u,d.spot=d.spot||{},d.spot.innerConeAngle=d.spot.innerConeAngle!==void 0?d.spot.innerConeAngle:0,d.spot.outerConeAngle=d.spot.outerConeAngle!==void 0?d.spot.outerConeAngle:Math.PI/4,m.angle=d.spot.outerConeAngle,m.penumbra=1-d.spot.innerConeAngle/d.spot.outerConeAngle,m.target.position.set(0,0,-1),m.add(m.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+d.type)}return m.position.set(0,0,0),m.decay=2,d.intensity!==void 0&&(m.intensity=d.intensity),m.name=t.createUniqueName(d.name||"light_"+e),a=Prom
vendor: 10,758 bytes, line 1
1ise.resolve(m),t.cache.add(o,a),a}createNodeAttachment(e){const t=this,o=this.parser,r=o.json.nodes[e],c=(r.extensions&&r.extensions[this.name]||{}).light;return c===void 0?null:this._loadLight(c).then(function(d){return o._getNodeRef(t.cache,c,d)})}}class la{constructor(){this.name=Le.KHR_MATERIALS_UNLIT}getMaterialType(){return Ht}extendParams(e,t,o){const a=[];e.color=new Ot(1,1,1),e.opacity=1;const r=t.pbrMetallicRoughness;if(r){if(Array.isArray(r.baseColorFactor)){const s=r.baseColorFactor;e.color.fromArray(s),e.opacity=s[3]}r.baseColorTexture!==void 0&&a.push(o.assignTexture(e,"map",r.baseColorTexture,tn))}return Promise.all(a)}}class ra{constructor(e){this.parser=e,this.name=Le.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const a=this.parser.json.materials[e];if(!a.extensions||!a.extensions[this.name])return Promise.resolve();const r=a.extensions[this.name].emissiveStrength;return r!==void 0&&(t.emissiveIntensity=r),Promise.resolve()}}class ca{constructor(e){this.parser=e,this.name=Le.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:nn}extendMaterialParams(e,t){const o=this.parser,a=o.json.materials[e];if(!a.extensions||!a.extensions[this.name])return Promise.resolve();const r=[],s=a.extensions[this.name];if(s.clearcoatFactor!==void 0&&(t.clearcoat=s.clearcoatFactor),s.clearcoatTexture!==void 0&&r.push(o.assignTexture(t,"clearcoatMap",s.clearcoatTexture)),s.clearcoatRoughnessFactor!==void 0&&(t.clearcoatRoughness=s.clearcoatRoughnessFactor),s.clearcoatRoughnessTexture!==void 0&&r.push(o.assignTexture(t,"clearcoatRoughnessMap",s.clearcoatRoughnessTexture)),s.clearcoatNormalTexture!==void 0&&(r.push(o.assignTexture(t,"clearcoatNormalMap",s.clearcoatNormalTexture)),s.clearcoatNormalTexture.scale!==void 0)){const c=s.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new Pt(c,c)}return Promise.all(r)}}class da{constructor(e){this.parser=e,this.name=Le.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:nn}extendMaterialParams(e,t){const o=this.parser,a=o.json.materials[e];if(!a.extensions||!a.extensions[this.name])return Promise.resolve();const r=[],s=a.extensions[this.name];return s.iridescenceFactor!==void 0&&(t.iridescence=s.iridescenceFactor),s.iridescenceTexture!==void 0&&r.push(o.assignTexture(t,"iridescenceMap",s.iridescenceTexture)),s.iridescenceIor!==void 0&&(t.iridescenceIOR=s.iridescenceIor),t.iridescenceThicknessRange===void 0&&(t.iridescenceThicknessRange=[100,400]),s.iridescenceThicknessMinimum!==void 0&&(t.iridescenceThicknessRange[0]=s.iridescenceThicknessMinimum),s.iridescenceThicknessMaximum!==void 0&&(t.iridescenceThicknessRange[1]=s.iridescenceThicknessMaximum),s.iridescenceThicknessTexture!==void 0&&r.push(o.assignTexture(t,"iridescenceThicknessMap",s.iridescenceThicknessTexture)),Promise.all(r)}}class ua{constructor(e){this.parser=e,this.name=Le.KHR_MATERIALS_SHEEN}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:nn}extendMaterialParams(e,t){const o=this.parser,a=o.json.materials[e];if(!a.extensions||!a.extensions[this.name])return Promise.resolve();const r=[];t.sheenColor=new Ot(0,0,0),t.sheenRoughness=0,t.sheen=1;const s=a.extensions[this.name];return s.sheenColorFactor!==void 0&&t.sheenColor.fromArray(s.sheenColorFactor),s.sheenRoughnessFactor!==void 0&&(t.sheenRoughness=s.sheenRoughnessFactor),s.sheenColorTexture!==void 0&&r.push(o.assignTexture(t,"sheenColorMap",s.sheenColorTexture,tn)),s.sheenRoughnessTexture!==void 0&&r.push(o.assignTexture(t,"sheenRoughnessMap",s.sheenRoughnessTexture)),Promise.all(r)}}class pa{constructor(e){this.parser=e,this.name=Le.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:nn}extendMaterialParams(e,t){const o=this.parser,a=o.json.materials[e];if(!a.extensions||!a.extensions[this.name])return Promise.resolve();const r=[],s=a.extensions[this.name];return s.transmissionFactor!==void 0&&(t.transmission=s.transmissionFactor),s.transmissionTexture!==void 0&&r.push(o.assignTexture(t,"transmissionMap",s.transmissionTexture)),Promise.all(r)}}class ha{constructor(e){this.parser=e,this.name=Le.KHR_MATERIALS_VOLUME}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:nn}extendMaterialParams(e,t){const o=this.parser,a=o.json.materials[e];if(!a.extensions||!a.extensions[this.name])return Promise.resolve();const r=[],s=a.extensions[this.name];t.thickness=s.thicknessFactor!==void 0?s.thicknessFactor:0,s.thicknessTexture!==void 0&&r.push(o.assignTexture(t,"thicknessMap",s.thicknessTexture)),t.attenuationDistance=s.attenuationDistance||1/0;const c=s.attenuationColor||[1,1,1];return t.attenuationColor=new Ot(c[0],c[1],c[2]),Promise.all(r)}}class ma{constructor(e){this.parser=e,this.name=Le.KHR_MATERIALS_IOR}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:nn}extendMaterialParams(e,t){const a=this.parser.json.materials[e];if(!a.extensions||!a.extensions[this.name])return Promise.resolve();const r=a.extensions[this.name];return t.ior=r.ior!==void 0?r.ior:1.5,Promise.resolve()}}class fa{constructor(e){this.parser=e,this.name=Le.KHR_MATERIALS_SPECULAR}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:nn}extendMaterialParams(e,t){const o=this.parser,a=o.json.materials[e];if(!a.extensions||!a.extensions[this.name])return Promise.resolve();const r=[],s=a.extensions[this.name];t.specularIntensity=s.specularFactor!==void 0?s.specularFactor:1,s.specularTexture!==void 0&&r.push(o.assignTexture(t,"specularIntensityMap",s.specularTexture));const c=s.specularColorFactor||[1,1,1];return t.specularColor=new Ot(c[0],c[1],c[2]),s.specularColorTexture!==void 0&&r.push(o.assignTexture(t,"specularColorMap",s.specularColorTexture,tn)),Promise.all(r)}}class ga{constructor(e){this.parser=e,this.name=Le.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,o=t.json,a=o.textures[e];if(!a.extensions||!a.extensions[this.name])return null;const r=a.extensions[this.name],s=t.options.ktx2Loader;if(!s){if(o.extensionsRequired&&o.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,r.source,s)}}class va{constructor(e){this.parser=e,this.name=Le.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,o=this.parser,a=o.json,r=a.textures[e];if(!r.extensions||!r.extensions[t])return null;const s=r.extensions[t],c=a.images[s.source];let d=o.textureLoader;if(c.uri){const m=o.options.manager.getHandler(c.uri);m!==null&&(d=m)}return this.detectSupport().then(function(m){if(m)return o.loadTextureImage(e,s.source,d);if(a.extensionsRequired&&a.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return o.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class wa{constructor(e){this.name=Le.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,o=t.bufferViews[e];if(o.extensions&&o.extensions[this.name]){const a=o.extensions[this.name],r=this.parser.getDependency("buffer",a.buffer),s=this.parser.options.meshoptDecoder;if(!s||!s.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return r.then(function(c){const d=a.byteOffset||0,m=a.byteLength||0,M=a.count,u=a.byteStride,L=new Uint8Array(c,d,m);return s.decodeGltfBufferAsync?s.decodeGltfBufferAsync(M,u,L,a.mode,a.filter).then(function(O){return O.buffer}):s.ready.then(function(){const O=new ArrayBuffer(M*u);return s.decodeGltfBuffer(new Uint8Array(O),M,u,L,a.mode,a.filter),O})})}else return null}}class ba{constructor(e){this.name=Le.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,o=t.nodes[e];if(!o.extensions||!o.extensions[this.name]||o.mesh===void 0)return null;const a=t.meshes[o.mesh];for(const m of a.primitives)if(m.mode!==Et.TRIANGLES&&m.mode!==Et.TRIANGLE_STRIP&&m.mode!==Et.TRIANGLE_FAN&&m.mode!==void 0)return null;const s=o.extensions[this.name].attributes,c=[],d={};for(const m in s)c.push(this.parser.getDependency("accessor",s[m]).then(M=>(d[m]=M,d[m])));return c.length<1?null:(c.push(this.parser.createNodeMesh(e)),Promise.all(c).then(m=>{const M=m.pop(),u=M.isGroup?M.children:[M],L=m[0].count,O=[];for(const k of u){const w=new Ln,A=new J,z=new Ue,G=new J(1,1,1),re=new os(k.geometry,k.material,L);for(let v=0;v<L;v++)d.TRANSLATION&&A.fromBufferAttribute(d.TRANSLATION,v),d.ROTATION&&z.fromBufferAttribute(d.ROTATION,v),d.SCALE&&G.fromBufferAttribute(d.SCALE,v),re.setMatrixAt(v,w.compose(A,z,G));for(const v in d)v!=="TRANSLATION"&&v!=="ROTATION"&&v!=="SCALE"&&k.geometry.setAttribute(v,d[v]);Sn.prototype.copy.call(re,k),re.frustumCulled=!1,this.parser.assignFinalMaterial(re),O.push(re)}return M.isGroup?(M.clear(),M.add(...O),M):O[0]}))}}const jo="glTF",gn=12,fo={JSON:1313821514,BIN:5130562};class ya{constructor(e){this.name=Le.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,gn);if(this.header={magic:Jt.decodeText(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==jo)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const o=this.header.length-gn,a=new DataView(e,gn);let r=0;for(;r<o;){const s=a.getUint32(r,!0);r+=4;const c=a.getUint32(r,!0);if(r+=4,c===fo.JSON){const d=new Uint8Array(e,gn+r,s);this.content=Jt.decodeText(d)}else if(c===fo.BIN){const d=gn+r;this.body=e.slice(d,d+s)}r+=s}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class _a{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=Le.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const o=this.json,a=this.dracoLoader,r=e.extensions[this.name].bufferView,s=e.extensions[this.name].attributes,c={},d={},m={};for(const M in s){const u=Jn[M]||M.toLowerCase();c[u]=s[M]}for(const M in e.attributes){const u=Jn[M]||M.toLowerCase();
1if(s[M]!==void 0){const L=o.accessors[e.attributes[M]],O=Tn[L.componentType];m[u]=O.name,d[u]=L.normalized===!0}}return t.getDependency("bufferView",r).then(function(M){return new Promise(function(u){a.decodeDracoFile(M,function(L){for(const O in L.attributes){const k=L.attributes[O],w=d[O];w!==void 0&&(k.normalized=w)}u(L)},c,m)})})}}class Ca{constructor(){this.name=Le.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return t.texCoord!==void 0&&console.warn('THREE.GLTFLoader: Custom UV sets in "'+this.name+'" extension not yet supported.'),t.offset===void 0&&t.rotation===void 0&&t.scale===void 0||(e=e.clone(),t.offset!==void 0&&e.offset.fromArray(t.offset),t.rotation!==void 0&&(e.rotation=t.rotation),t.scale!==void 0&&e.repeat.fromArray(t.scale),e.needsUpdate=!0),e}}class Qn extends to{constructor(e){super(),this.isGLTFSpecularGlossinessMaterial=!0;const t=["#ifdef USE_SPECULARMAP","	uniform sampler2D specularMap;","#endif"].join(`
2`),o=["#ifdef USE_GLOSSINESSMAP","	uniform sampler2D glossinessMap;","#endif"].join(`
3`),a=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP","	vec4 texelSpecular = texture2D( specularMap, vUv );","	// reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture","	specularFactor *= texelSpecular.rgb;","#endif"].join(`
4`),r=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP","	vec4 texelGlossiness = texture2D( glossinessMap, vUv );","	// reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture","	glossinessFactor *= texelGlossiness.a;","#endif"].join(`
5`),s=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb * ( 1. - max( specularFactor.r, max( specularFactor.g, specularFactor.b ) ) );","vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );","float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );","material.roughness = max( 1.0 - glossinessFactor, 0.0525 ); // 0.0525 corresponds to the base mip of a 256 cubemap.","material.roughness += geometryRoughness;","material.roughness = min( material.roughness, 1.0 );","material.specularColor = specularFactor;"].join(`
6`),c={specular:{value:new Ot().setHex(16777215)},glossiness:{value:1},specularMap:{value:null},glossinessMap:{value:null}};this._extraUniforms=c,this.onBeforeCompile=function(d){for(const m in c)d.uniforms[m]=c[m];d.fragmentShader=d.fragmentShader.replace("uniform float roughness;","uniform vec3 specular;").replace("uniform float metalness;","uniform float glossiness;").replace("#include <roughnessmap_pars_fragment>",t).replace("#include <metalnessmap_pars_fragment>",o).replace("#include <roughnessmap_fragment>",a).replace("#include <metalnessmap_fragment>",r).replace("#include <lights_physical_fragment>",s)},Object.defineProperties(this,{specular:{get:function(){return c.specular.value},set:function(d){c.specular.value=d}},specularMap:{get:function(){return c.specularMap.value},set:function(d){c.specularMap.value=d,d?this.defines.USE_SPECULARMAP="":delete this.defines.USE_SPECULARMAP}},glossiness:{get:function(){return c.glossiness.value},set:function(d){c.glossiness.value=d}},glossinessMap:{get:function(){return c.glossinessMap.value},set:function(d){c.glossinessMap.value=d,d?(this.defines.USE_GLOSSINESSMAP="",this.defines.USE_UV=""):(delete this.defines.USE_GLOSSINESSMAP,delete this.defines.USE_UV)}}}),delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this.setValues(e)}copy(e){return super.copy(e),this.specularMap=e.specularMap,this.specular.copy(e.specular),this.glossinessMap=e.glossinessMap,this.glossiness=e.glossiness,delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this}}class xa{constructor(){this.name=Le.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,this.specularGlossinessParams=["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","normalMapType","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity"]}getMaterialType(){return Qn}extendParams(e,t,o){const a=t.extensions[this.name];e.color=new Ot(1,1,1),e.opacity=1;const r=[];if(Array.isArray(a.diffuseFactor)){const s=a.diffuseFactor;e.color.fromArray(s),e.opacity=s[3]}if(a.diffuseTexture!==void 0&&r.push(o.assignTexture(e,"map",a.diffuseTexture,tn)),e.emissive=new Ot(0,0,0),e.glossiness=a.glossinessFactor!==void 0?a.glossinessFactor:1,e.specular=new Ot(1,1,1),Array.isArray(a.specularFactor)&&e.specular.fromArray(a.specularFactor),a.specularGlossinessTexture!==void 0){const s=a.specularGlossinessTexture;r.push(o.assignTexture(e,"glossinessMap",s)),r.push(o.assignTexture(e,"specularMap",s,tn))}return Promise.all(r)}createMaterial(e){const t=new Qn(e);return t.fog=!0,t.color=e.color,t.map=e.map===void 0?null:e.map,t.lightMap=null,t.lightMapIntensity=1,t.aoMap=e.aoMap===void 0?null:e.aoMap,t.aoMapIntensity=1,t.emissive=e.emissive,t.emissiveIntensity=e.emissiveIntensity===void 0?1:e.emissiveIntensity,t.emissiveMap=e.emissiveMap===void 0?null:e.emissiveMap,t.bumpMap=e.bumpMap===void 0?null:e.bumpMap,t.bumpScale=1,t.normalMap=e.normalMap===void 0?null:e.normalMap,t.normalMapType=ss,e.normalScale&&(t.normalScale=e.normalScale),t.displacementMap=null,t.displacementScale=1,t.displacementBias=0,t.specularMap=e.specularMap===void 0?null:e.specularMap,t.specular=e.specular,t.glossinessMap=e.glossinessMap===void 0?null:e.glossinessMap,t.glossiness=e.glossiness,t.alphaMap=null,t.envMap=e.envMap===void 0?null:e.envMap,t.envMapIntensity=1,t}}class Sa{constructor(){this.name=Le.KHR_MESH_QUANTIZATION}}class Ho extends ks{constructor(e,t,o,a){super(e,t,o,a)}copySampleValue_(e){const t=this.resultBuffer,o=this.sampleValues,a=this.valueSize,r=e*a*3+a;for(let s=0;s!==a;s++)t[s]=o[r+s];return t}interpolate_(e,t,o,a){const r=this.resultBuffer,s=this.sampleValues,c=this.valueSize,d=c*2,m=c*3,M=a-t,u=(o-t)/M,L=u*u,O=L*u,k=e*m,w=k-m,A=-2*O+3*L,z=O-L,G=1-A,re=z-L+u;for(let v=0;v!==c;v++){const te=s[w+v+c],ge=s[w+v+d]*M,$e=s[k+v+c],Fe=s[k+v]*M;r[v]=G*te+re*ge+A*$e+z*Fe}return r}}const Ma=new Ue;class Aa extends Ho{interpolate_(e,t,o,a){const r=super.interpolate_(e,t,o,a);return Ma.fromArray(r).normalize().toArray(r),r}}const Et={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},Tn={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},go={9728:vs,9729:zo,9984:ws,9985:bs,9986:ys,9987:Do},vo={33071:_s,33648:Cs,10497:Fn},wo={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Jn={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},Vt={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Ia={CUBICSPLINE:void 0,LINEAR:Uo,STEP:xs},qn={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function Ta(x){return x.DefaultMaterial===void 0&&(x.DefaultMaterial=new to({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:Ss})),x.DefaultMaterial}function vn(x,e,t){for(const o in t.extensions)x[o]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[o]=t.extensions[o])}function Kt(x,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(x.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function La(x,e,t){let o=!1,a=!1,r=!1;for(let m=0,M=e.length;m<M;m++){const u=e[m];if(u.POSITION!==void 0&&(o=!0),u.NORMAL!==void 0&&(a=!0),u.COLOR_0!==void 0&&(r=!0),o&&a&&r)break}if(!o&&!a&&!r)return Promise.resolve(x);const s=[],c=[],d=[];for(let m=0,M=e.length;m<M;m++){const u=e[m];if(o){const L=u.POSITION!==void 0?t.getDependency("accessor",u.POSITION):x.attributes.position;s.push(L)}
vendor: 9,626 bytes, line 6
6if(a){const L=u.NORMAL!==void 0?t.getDependency("accessor",u.NORMAL):x.attributes.normal;c.push(L)}if(r){const L=u.COLOR_0!==void 0?t.getDependency("accessor",u.COLOR_0):x.attributes.color;d.push(L)}}return Promise.all([Promise.all(s),Promise.all(c),Promise.all(d)]).then(function(m){const M=m[0],u=m[1],L=m[2];return o&&(x.morphAttributes.position=M),a&&(x.morphAttributes.normal=u),r&&(x.morphAttributes.color=L),x.morphTargetsRelative=!0,x})}function Pa(x,e){if(x.updateMorphTargets(),e.weights!==void 0)for(let t=0,o=e.weights.length;t<o;t++)x.morphTargetInfluences[t]=e.weights[t];if(e.extras&&Array.isArray(e.extras.targetNames)){const t=e.extras.targetNames;if(x.morphTargetInfluences.length===t.length){x.morphTargetDictionary={};for(let o=0,a=t.length;o<a;o++)x.morphTargetDictionary[t[o]]=o}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function ka(x){const e=x.extensions&&x.extensions[Le.KHR_DRACO_MESH_COMPRESSION];let t;return e?t="draco:"+e.bufferView+":"+e.indices+":"+bo(e.attributes):t=x.indices+":"+bo(x.attributes)+":"+x.mode,t}function bo(x){let e="";const t=Object.keys(x).sort();for(let o=0,a=t.length;o<a;o++)e+=t[o]+":"+x[t[o]]+";";return e}function eo(x){switch(x){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function Ea(x){return x.search(/\.jpe?g($|\?)/i)>0||x.search(/^data\:image\/jpeg/)===0?"image/jpeg":x.search(/\.webp($|\?)/i)>0||x.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}class za{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new aa,this.associations=new Map,this.primitiveCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};const o=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,a=navigator.userAgent.indexOf("Firefox")>-1,r=a?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1;typeof createImageBitmap>"u"||o||a&&r<98?this.textureLoader=new Eo(this.options.manager):this.textureLoader=new as(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new ko(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const o=this,a=this.json,r=this.extensions;this.cache.removeAll(),this._invokeAll(function(s){return s._markDefs&&s._markDefs()}),Promise.all(this._invokeAll(function(s){return s.beforeRoot&&s.beforeRoot()})).then(function(){return Promise.all([o.getDependencies("scene"),o.getDependencies("animation"),o.getDependencies("camera")])}).then(function(s){const c={scene:s[0][a.scene||0],scenes:s[0],animations:s[1],cameras:s[2],asset:a.asset,parser:o,userData:{}};vn(r,c,a),Kt(c,a),Promise.all(o._invokeAll(function(d){return d.afterRoot&&d.afterRoot(c)})).then(function(){e(c)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],o=this.json.meshes||[];for(let a=0,r=t.length;a<r;a++){const s=t[a].joints;for(let c=0,d=s.length;c<d;c++)e[s[c]].isBone=!0}for(let a=0,r=e.length;a<r;a++){const s=e[a];s.mesh!==void 0&&(this._addNodeRef(this.meshCache,s.mesh),s.skin!==void 0&&(o[s.mesh].isSkinnedMesh=!0)),s.camera!==void 0&&this._addNodeRef(this.cameraCache,s.camera)}}_addNodeRef(e,t){t!==void 0&&(e.refs[t]===void 0&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,o){if(e.refs[t]<=1)return o;const a=o.clone(),r=(s,c)=>{const d=this.associations.get(s);d!=null&&this.associations.set(c,d);for(const[m,M]of s.children.entries())r(M,c.children[m])};return r(o,a),a.name+="_instance_"+e.uses[t]++,a}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let o=0;o<t.length;o++){const a=e(t[o]);if(a)return a}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const o=[];for(let a=0;a<t.length;a++){const r=e(t[a]);r&&o.push(r)}return o}getDependency(e,t){const o=e+":"+t;let a=this.cache.get(o);if(!a){switch(e){case"scene":a=this.loadScene(t);break;case"node":a=this.loadNode(t);break;case"mesh":a=this._invokeOne(function(r){return r.loadMesh&&r.loadMesh(t)});break;case"accessor":a=this.loadAccessor(t);break;case"bufferView":a=this._invokeOne(function(r){return r.loadBufferView&&r.loadBufferView(t)});break;case"buffer":a=this.loadBuffer(t);break;case"material":a=this._invokeOne(function(r){return r.loadMaterial&&r.loadMaterial(t)});break;case"texture":a=this._invokeOne(function(r){return r.loadTexture&&r.loadTexture(t)});break;case"skin":a=this.loadSkin(t);break;case"animation":a=this._invokeOne(function(r){return r.loadAnimation&&r.loadAnimation(t)});break;case"camera":a=this.loadCamera(t);break;default:throw new Error("Unknown type: "+e)}this.cache.add(o,a)}return a}getDependencies(e){let t=this.cache.get(e);if(!t){const o=this,a=this.json[e+(e==="mesh"?"es":"s")]||[];t=Promise.all(a.map(function(r,s){return o.getDependency(e,s)})),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],o=this.fileLoader;if(t.type&&t.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(t.uri===void 0&&e===0)return Promise.resolve(this.extensions[Le.KHR_BINARY_GLTF].body);const a=this.options;return new Promise(function(r,s){o.load(Jt.resolveURL(t.uri,a.path),r,void 0,function(){s(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))})})}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then(function(o){const a=t.byteLength||0,r=t.byteOffset||0;return o.slice(r,r+a)})}loadAccessor(e){const t=this,o=this.json,a=this.json.accessors[e];if(a.bufferView===void 0&&a.sparse===void 0)return Promise.resolve(null);const r=[];return a.bufferView!==void 0?r.push(this.getDependency("bufferView",a.bufferView)):r.push(null),a.sparse!==void 0&&(r.push(this.getDependency("bufferView",a.sparse.indices.bufferView)),r.push(this.getDependency("bufferView",a.sparse.values.bufferView))),Promise.all(r).then(function(s){const c=s[0],d=wo[a.type],m=Tn[a.componentType],M=m.BYTES_PER_ELEMENT,u=M*d,L=a.byteOffset||0,O=a.bufferView!==void 0?o.bufferViews[a.bufferView].byteStride:void 0,k=a.normalized===!0;let w,A;if(O&&O!==u){const z=Math.floor(L/O),G="InterleavedBuffer:"+a.bufferView+":"+a.componentType+":"+z+":"+a.count;let re=t.cache.get(G);re||(w=new m(c,z*O,a.count*O/M),re=new is(w,O/M),t.cache.add(G,re)),A=new Ms(re,d,L%O/M,k)}else c===null?w=new m(a.count*d):w=new m(c,L,a.count*d),A=new lo(w,d,k);if(a.sparse!==void 0){const z=wo.SCALAR,G=Tn[a.sparse.indices.componentType],re=a.sparse.indices.byteOffset||0,v=a.sparse.values.byteOffset||0,te=new G(s[1],re,a.sparse.count*z),ge=new m(s[2],v,a.sparse.count*d);c!==null&&(A=new lo(A.array.slice(),A.itemSize,A.normalized));for(let $e=0,Fe=te.length;$e<Fe;$e++){const ue=te[$e];if(A.setX(ue,ge[$e*d]),d>=2&&A.setY(ue,ge[$e*d+1]),d>=3&&A.setZ(ue,ge[$e*d+2]),d>=4&&A.setW(ue,ge[$e*d+3]),d>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return A})}loadTexture(e){const t=this.json,o=this.options,r=t.textures[e].source,s=t.images[r];let c=this.textureLoader;if(s.uri){const d=o.manager.getHandler(s.uri);d!==null&&(c=d)}return this.loadTextureImage(e,r,c)}loadTextureImage(e,t,o){const a=this,r=this.json,s=r.textures[e],c=r.images[t],d=(c.uri||c.bufferView)+":"+s.sampler;if(this.textureCache[d])return this.textureCache[d];const m=this.loadImageSource(t,o).then(function(M){M.flipY=!1,M.name=s.name||c.name||"";const L=(r.samplers||{})[s.sampler]||{};return M.magFilter=go[L.magFilter]||zo,M.minFilter=go[L.minFilter]||Do,M.wrapS=vo[L.wrapS]||Fn,M.wrapT=vo[L.wrapT]||Fn,a.associations.set(M,{textures:e}),M}).catch(function(){return null});return this.textureCache[d]=m,m}loadImageSource(e,t){const o=this,a=this.json,r=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(u=>u.clone());const s=a.images[e],c=self.URL||self.webkitURL;let d=s.uri||"",m=!1;if(s.bufferView!==void 0)d=o.getDependency("bufferView",s.bufferView).then(function(u){m=!0;const L=new Blob([u],{type:s.mimeType});return d=c.createObjectURL(L),d});else if(s.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const M=Promise.resolve(d).then(function(u){return new Promise(function(L,O){let k=L;t.isImageBitmapLoader===!0&&(k=function(w){const A=new ro(w);A.needsUpdate=!0,L(A)}),t.load(Jt.resolveURL(u,r.path),k,void 0,O)})}).then(function(u){return m===!0&&c.revokeObjectURL(d),u.userData.mimeType=s.mimeType||Ea(s.uri),u}).catch(function(u){throw console.error("THREE.GLTFLoader: Couldn't load texture",d),u});return this.sourceCache[e]=M,M}assignTexture(e,t,o,a){const r=this;return this.getDependency("texture",o.index).then(function(s){if(o.texCoord!==void 0&&o.texCoord!=0&&!(t==="aoMap"&&o.texCoord==1)&&console.warn("THREE.GLTFLoader: Custom UV set "+o.texCoord+" for texture "+t+" not yet supported."),r.extensions[Le.KHR_TEXTURE_TRANSFORM]){const c=o.extensions!==void 0?o.extensions[Le.KHR_TEXTURE_TRANSFORM]:void 0;if(c){const d=r.associations.get(s);s=r.extensions[Le.KHR_TEXTURE_TRANSFORM].extendTexture(s,c),r.associations.set(s,d)}}return a!==void 0&&(s.encoding=a),e[t]=s,s})}assignFinalMaterial(e){const t=e.geometry;let o=e.material;
6const a=t.attributes.tangent===void 0,r=t.attributes.color!==void 0,s=t.attributes.normal===void 0;if(e.isPoints){const c="PointsMaterial:"+o.uuid;let d=this.cache.get(c);d||(d=new ls,Vn.prototype.copy.call(d,o),d.color.copy(o.color),d.map=o.map,d.sizeAttenuation=!1,this.cache.add(c,d)),o=d}else if(e.isLine){const c="LineBasicMaterial:"+o.uuid;let d=this.cache.get(c);d||(d=new Oo,Vn.prototype.copy.call(d,o),d.color.copy(o.color),this.cache.add(c,d)),o=d}if(a||r||s){let c="ClonedMaterial:"+o.uuid+":";o.isGLTFSpecularGlossinessMaterial&&(c+="specular-glossiness:"),a&&(c+="derivative-tangents:"),r&&(c+="vertex-colors:"),s&&(c+="flat-shading:");let d=this.cache.get(c);d||(d=o.clone(),r&&(d.vertexColors=!0),s&&(d.flatShading=!0),a&&(d.normalScale&&(d.normalScale.y*=-1),d.clearcoatNormalScale&&(d.clearcoatNormalScale.y*=-1)),this.cache.add(c,d),this.associations.set(d,this.associations.get(o))),o=d}o.aoMap&&t.attributes.uv2===void 0&&t.attributes.uv!==void 0&&t.setAttribute("uv2",t.attributes.uv),e.material=o}getMaterialType(){return to}loadMaterial(e){const t=this,o=this.json,a=this.extensions,r=o.materials[e];let s;const c={},d=r.extensions||{},m=[];if(d[Le.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){const u=a[Le.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];s=u.getMaterialType(),m.push(u.extendParams(c,r,t))}else if(d[Le.KHR_MATERIALS_UNLIT]){const u=a[Le.KHR_MATERIALS_UNLIT];s=u.getMaterialType(),m.push(u.extendParams(c,r,t))}else{const u=r.pbrMetallicRoughness||{};if(c.color=new Ot(1,1,1),c.opacity=1,Array.isArray(u.baseColorFactor)){const L=u.baseColorFactor;c.color.fromArray(L),c.opacity=L[3]}u.baseColorTexture!==void 0&&m.push(t.assignTexture(c,"map",u.baseColorTexture,tn)),c.metalness=u.metallicFactor!==void 0?u.metallicFactor:1,c.roughness=u.roughnessFactor!==void 0?u.roughnessFactor:1,u.metallicRoughnessTexture!==void 0&&(m.push(t.assignTexture(c,"metalnessMap",u.metallicRoughnessTexture)),m.push(t.assignTexture(c,"roughnessMap",u.metallicRoughnessTexture))),s=this._invokeOne(function(L){return L.getMaterialType&&L.getMaterialType(e)}),m.push(Promise.all(this._invokeAll(function(L){return L.extendMaterialParams&&L.extendMaterialParams(e,c)})))}r.doubleSided===!0&&(c.side=$o);const M=r.alphaMode||qn.OPAQUE;if(M===qn.BLEND?(c.transparent=!0,c.depthWrite=!1):(c.transparent=!1,M===qn.MASK&&(c.alphaTest=r.alphaCutoff!==void 0?r.alphaCutoff:.5)),r.normalTexture!==void 0&&s!==Ht&&(m.push(t.assignTexture(c,"normalMap",r.normalTexture)),c.normalScale=new Pt(1,1),r.normalTexture.scale!==void 0)){const u=r.normalTexture.scale;c.normalScale.set(u,u)}return r.occlusionTexture!==void 0&&s!==Ht&&(m.push(t.assignTexture(c,"aoMap",r.occlusionTexture)),r.occlusionTexture.strength!==void 0&&(c.aoMapIntensity=r.occlusionTexture.strength)),r.emissiveFactor!==void 0&&s!==Ht&&(c.emissive=new Ot().fromArray(r.emissiveFactor)),r.emissiveTexture!==void 0&&s!==Ht&&m.push(t.assignTexture(c,"emissiveMap",r.emissiveTexture,tn)),Promise.all(m).then(function(){let u;return s===Qn?u=a[Le.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(c):u=new s(c),r.name&&(u.name=r.name),Kt(u,r),t.associations.set(u,{materials:e}),r.extensions&&vn(a,u,r),u})}createUniqueName(e){const t=rs.sanitizeNodeName(e||"");let o=t;for(let a=1;this.nodeNamesUsed[o];++a)o=t+"_"+a;return this.nodeNamesUsed[o]=!0,o}loadGeometries(e){const t=this,o=this.extensions,a=this.primitiveCache;function r(c){return o[Le.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(c,t).then(function(d){return yo(d,c,t)})}const s=[];for(let c=0,d=e.length;c<d;c++){const m=e[c],M=ka(m),u=a[M];if(u)s.push(u.promise);else{let L;m.extensions&&m.extensions[Le.KHR_DRACO_MESH_COMPRESSION]?L=r(m):L=yo(new Wn,m,t),a[M]={primitive:m,promise:L},s.push(L)}}return Promise.all(s)}loadMesh(e){const t=this,o=this.json,a=this.extensions,r=o.meshes[e],s=r.primitives,c=[];for(let d=0,m=s.length;d<m;d++){const M=s[d].material===void 0?Ta(this.cache):this.getDependency("material",s[d].material);c.push(M)}return c.push(t.loadGeometries(s)),Promise.all(c).then(function(d){const m=d.slice(0,d.length-1),M=d[d.length-1],u=[];for(let O=0,k=M.length;O<k;O++){const w=M[O],A=s[O];let z;const G=m[O];if(A.mode===Et.TRIANGLES||A.mode===Et.TRIANGLE_STRIP||A.mode===Et.TRIANGLE_FAN||A.mode===void 0)z=r.isSkinnedMesh===!0?new cs(w,G):new ie(w,G),z.isSkinnedMesh===!0&&!z.geometry.attributes.skinWeight.normalized&&z.normalizeSkinWeights(),A.mode===Et.TRIANGLE_STRIP?z.geometry=_o(z.geometry,As):A.mode===Et.TRIANGLE_FAN&&(z.geometry=_o(z.geometry,Bo));else if(A.mode===Et.LINES)z=new ds(w,G);else if(A.mode===Et.LINE_STRIP)z=new Nt(w,G);else if(A.mode===Et.LINE_LOOP)z=new us(w,G);else if(A.mode===Et.POINTS)z=new ps(w,G);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+A.mode);Object.keys(z.geometry.morphAttributes).length>0&&Pa(z,r),z.name=t.createUniqueName(r.name||"mesh_"+e),Kt(z,r),A.extensions&&vn(a,z,A),t.assignFinalMaterial(z),u.push(z)}for(let O=0,k=u.length;O<k;O++)t.associations.set(u[O],{meshes:e,primitives:O});if(u.length===1)return u[0];const L=new jn;t.associations.set(L,{meshes:e});for(let O=0,k=u.length;O<k;O++)L.add(u[O]);return L})}loadCamera(e){let t;const o=this.json.cameras[e],a=o[o.type];if(!a){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return o.type==="perspective"?t=new Ro(Zo.radToDeg(a.yfov),a.aspectRatio||1,a.znear||1,a.zfar||2e6):o.type==="orthographic"&&(t=new hs(-a.xmag,a.xmag,a.ymag,-a.ymag,a.znear,a.zfar)),o.name&&(t.name=this.createUniqueName(o.name)),Kt(t,o),Promise.resolve(t)}loadSkin(e){const t=this.json.skins[e],o={joints:t.joints};return t.inverseBindMatrices===void 0?Promise.resolve(o):this.getDependency("accessor",t.inverseBindMatrices).then(function(a){return o.inverseBindMatrices=a,o})}loadAnimation(e){const o=this.json.animations[e],a=[],r=[],s=[],c=[],d=[];for(let m=0,M=o.channels.length;m<M;m++){const u=o.channels[m],L=o.samplers[u.sampler],O=u.target,k=O.node,w=o.parameters!==void 0?o.parameters[L.input]:L.input,A=o.parameters!==void 0?o.parameters[L.output]:L.output;a.push(this.getDependency("node",k)),r.push(this.getDependency("accessor",w)),s.push(this.getDependency("accessor",A)),c.push(L),d.push(O)}return Promise.all([Promise.all(a),Promise.all(r),Promise.all(s),Promise.all(c),Promise.all(d)]).then(function(m){const M=m[0],u=m[1],L=m[2],O=m[3],k=m[4],w=[];for(let z=0,G=M.length;z<G;z++){const re=M[z],v=u[z],te=L[z],ge=O[z],$e=k[z];if(re===void 0)continue;re.updateMatrix();let Fe;switch(Vt[$e.path]){case Vt.weights:Fe=Ts;break;case Vt.rotation:Fe=co;break;case Vt.position:case Vt.scale:default:Fe=Is;break}const ue=re.name?re.name:re.uuid,Ie=ge.interpolation!==void 0?Ia[ge.interpolation]:Uo,pe=[];
6Vt[$e.path]===Vt.weights?re.traverse(function(Ee){Ee.morphTargetInfluences&&pe.push(Ee.name?Ee.name:Ee.uuid)}):pe.push(ue);let Ye=te.array;if(te.normalized){const Ee=eo(Ye.constructor),he=new Float32Array(Ye.length);for(let q=0,Te=Ye.length;q<Te;q++)he[q]=Ye[q]*Ee;Ye=he}for(let Ee=0,he=pe.length;Ee<he;Ee++){const q=new Fe(pe[Ee]+"."+Vt[$e.path],v.array,Ye,Ie);ge.interpolation==="CUBICSPLINE"&&(q.createInterpolant=function(Re){const ne=this instanceof co?Aa:Ho;return new ne(this.times,this.values,this.getValueSize()/3,Re)},q.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),w.push(q)}}const A=o.name?o.name:"animation_"+e;return new ms(A,void 0,w)})}createNodeMesh(e){const t=this.json,o=this,a=t.nodes[e];return a.mesh===void 0?null:o.getDependency("mesh",a.mesh).then(function(r){const s=o._getNodeRef(o.meshCache,a.mesh,r);return a.weights!==void 0&&s.traverse(function(c){if(c.isMesh)for(let d=0,m=a.weights.length;d<m;d++)c.morphTargetInfluences[d]=a.weights[d]}),s})}loadNode(e){const t=this.json,o=this.extensions,a=this,r=t.nodes[e],s=r.name?a.createUniqueName(r.name):"";return function(){const c=[],d=a._invokeOne(function(m){return m.createNodeMesh&&m.createNodeMesh(e)});return d&&c.push(d),r.camera!==void 0&&c.push(a.getDependency("camera",r.camera).then(function(m){return a._getNodeRef(a.cameraCache,r.camera,m)})),a._invokeAll(function(m){return m.createNodeAttachment&&m.createNodeAttachment(e)}).forEach(function(m){c.push(m)}),Promise.all(c)}().then(function(c){let d;if(r.isBone===!0?d=new fs:c.length>1?d=new jn:c.length===1?d=c[0]:d=new Sn,d!==c[0])for(let m=0,M=c.length;m<M;m++)d.add(c[m]);if(r.name&&(d.userData.name=r.name,d.name=s),Kt(d,r),r.extensions&&vn(o,d,r),r.matrix!==void 0){const m=new Ln;m.fromArray(r.matrix),d.applyMatrix4(m)}else r.translation!==void 0&&d.position.fromArray(r.translation),r.rotation!==void 0&&d.quaternion.fromArray(r.rotation),r.scale!==void 0&&d.scale.fromArray(r.scale);return a.associations.has(d)||a.associations.set(d,{}),a.associations.get(d).nodes=e,d})}loadScene(e){const t=this.json,o=this.extensions,a=this.json.scenes[e],r=this,s=new jn;a.name&&(s.name=r.createUniqueName(a.name)),Kt(s,a),a.extensions&&vn(o,s,a);const c=a.nodes||[],d=[];for(let m=0,M=c.length;m<M;m++)d.push(qo(c[m],s,t,r));return Promise.all(d).then(function(){const m=M=>{const u=new Map;for(const[L,O]of r.associations)(L instanceof Vn||L instanceof ro)&&u.set(L,O);return M.traverse(L=>{const O=r.associations.get(L);O!=null&&u.set(L,O)}),u};return r.associations=m(s),s})}}function qo(x,e,t,o){const a=t.nodes[x];return o.getDependency("node",x).then(function(r){if(a.skin===void 0)return r;let s;return o.getDependency("skin",a.skin).then(function(c){s=c;const d=[];for(let m=0,M=s.joints.length;m<M;m++)d.push(o.getDependency("node",s.joints[m]));return Promise.all(d)}).then(function(c){return r.traverse(function(d){if(!d.isMesh)return;const m=[],M=[];for(let u=0,L=c.length;u<L;u++){const O=c[u];if(O){m.push(O);const k=new Ln;s.inverseBindMatrices!==void 0&&k.fromArray(s.inverseBindMatrices.array,u*16),M.push(k)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',s.joints[u])}d.bind(new gs(m,M),d.matrixWorld)}),r})}).then(function(r){e.add(r);const s=[];if(a.children){const c=a.children;for(let d=0,m=c.length;d<m;d++){const M=c[d];s.push(qo(M,r,t,o))}}return Promise.all(s)})}function Da(x,e,t){const o=e.attributes,a=new Ls;if(o.POSITION!==void 0){const c=t.json.accessors[o.POSITION],d=c.min,m=c.max;if(d!==void 0&&m!==void 0){if(a.set(new J(d[0],d[1],d[2]),new J(m[0],m[1],m[2])),c.normalized){const M=eo(Tn[c.componentType]);a.min.multiplyScalar(M),a.max.multiplyScalar(M)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const r=e.targets;if(r!==void 0){const c=new J,d=new J;for(let m=0,M=r.length;m<M;m++){const u=r[m];if(u.POSITION!==void 0){const L=t.json.accessors[u.POSITION],O=L.min,k=L.max;if(O!==void 0&&k!==void 0){if(d.setX(Math.max(Math.abs(O[0]),Math.abs(k[0]))),d.setY(Math.max(Math.abs(O[1]),Math.abs(k[1]))),d.setZ(Math.max(Math.abs(O[2]),Math.abs(k[2]))),L.normalized){const w=eo(Tn[L.componentType]);d.multiplyScalar(w)}c.max(d)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}a.expandByVector(c)}x.boundingBox=a;const s=new Ps;a.getCenter(s.center),s.radius=a.min.distanceTo(a.max)/2,x.boundingSphere=s}function yo(x,e,t){const o=e.attributes,a=[];function r(s,c){return t.getDependency("accessor",s).then(function(d){x.setAttribute(c,d)})}for(const s in o){const c=Jn[s]||s.toLowerCase();c in x.attributes||a.push(r(o[s],c))}if(e.indices!==void 0&&!x.index){const s=t.getDependency("accessor",e.indices).then(function(c){x.setIndex(c)});a.push(s)}return Kt(x,e),Da(x,e,t),Promise.all(a).then(function(){return e.targets!==void 0?La(x,e.targets,t):x})}function _o(x,e){let t=x.getIndex();if(t===null){const s=[],c=x.getAttribute("position");if(c!==void 0){for(let d=0;d<c.count;d++)s.push(d);x.setIndex(s),t=x.getIndex()}else return console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),x}const o=t.count-2,a=[];if(e===Bo)for(let s=1;s<=o;s++)a.push(t.getX(0)),a.push(t.getX(s)),a.push(t.getX(s+1));else for(let s=0;s<o;s++)s%2===0?(a.push(t.getX(s)),a.push(t.getX(s+1)),a.push(t.getX(s+2))):(a.push(t.getX(s+2)),a.push(t.getX(s+1)),a.push(t.getX(s)));a.length/3!==o&&console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const r=x.clone();return r.setIndex(a),r}const Wt=new Fo,St=new J,jt=new J,Je=new Ue,Co={X:new J(1,0,0),Y:new J(0,1,0),Z:new J(0,0,1)},Gn={type:"change"},xo={type:"mouseDown"},So={type:"mouseUp",mode:null},Mo={type:"objectChange"};class Oa extends Sn{constructor(e,t){super(),t===void 0&&(console.warn('THREE.TransformControls: The second parameter "domElement" is now mandatory.'),t=document),this.isTransformControls=!0,this.visible=!1,this.domElement=t,this.domElement.style.touchAction="none";const o=new Fa;this._gizmo=o,this.add(o);const a=new Na;this._plane=a,this.add(a);const r=this;function s(G,re){let v=re;Object.defineProperty(r,G,{get:function(){return v!==void 0?v:re}
6,set:function(te){v!==te&&(v=te,a[G]=te,o[G]=te,r.dispatchEvent({type:G+"-changed",value:te}),r.dispatchEvent(Gn))}}),r[G]=re,a[G]=re,o[G]=re}s("camera",e),s("object",void 0),s("enabled",!0),s("axis",null),s("mode","translate"),s("translationSnap",null),s("rotationSnap",null),s("scaleSnap",null),s("space","world"),s("size",1),s("dragging",!1),s("showX",!0),s("showY",!0),s("showZ",!0);const c=new J,d=new J,m=new Ue,M=new Ue,u=new J,L=new Ue,O=new J,k=new J,w=new J,A=0,z=new J;s("worldPosition",c),s("worldPositionStart",d),s("worldQuaternion",m),s("worldQuaternionStart",M),s("cameraPosition",u),s("cameraQuaternion",L),s("pointStart",O),s("pointEnd",k),s("rotationAxis",w),s("rotationAngle",A),s("eye",z),this._offset=new J,this._startNorm=new J,this._endNorm=new J,this._cameraScale=new J,this._parentPosition=new J,this._parentQuaternion=new Ue,this._parentQuaternionInv=new Ue,this._parentScale=new J,this._worldScaleStart=new J,this._worldQuaternionInv=new Ue,this._worldScale=new J,this._positionStart=new J,this._quaternionStart=new Ue,this._scaleStart=new J,this._getPointer=$a.bind(this),this._onPointerDown=Za.bind(this),this._onPointerHover=Ra.bind(this),this._onPointerMove=Ua.bind(this),this._onPointerUp=Ba.bind(this),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointermove",this._onPointerHover),this.domElement.addEventListener("pointerup",this._onPointerUp)}updateMatrixWorld(){this.object!==void 0&&(this.object.updateMatrixWorld(),this.object.parent===null?console.error("TransformControls: The attached 3D object must be a part of the scene graph."):this.object.parent.matrixWorld.decompose(this._parentPosition,this._parentQuaternion,this._parentScale),this.object.matrixWorld.decompose(this.worldPosition,this.worldQuaternion,this._worldScale),this._parentQuaternionInv.copy(this._parentQuaternion).invert(),this._worldQuaternionInv.copy(this.worldQuaternion).invert()),this.camera.updateMatrixWorld(),this.camera.matrixWorld.decompose(this.cameraPosition,this.cameraQuaternion,this._cameraScale),this.camera.isOrthographicCamera?this.camera.getWorldDirection(this.eye).negate():this.eye.copy(this.cameraPosition).sub(this.worldPosition).normalize(),super.updateMatrixWorld(this)}pointerHover(e){if(this.object===void 0||this.dragging===!0)return;Wt.setFromCamera(e,this.camera);const t=Yn(this._gizmo.picker[this.mode],Wt);t?this.axis=t.object.name:this.axis=null}pointerDown(e){if(!(this.object===void 0||this.dragging===!0||e.button!==0)&&this.axis!==null){Wt.setFromCamera(e,this.camera);const t=Yn(this._plane,Wt,!0);t&&(this.object.updateMatrixWorld(),this.object.parent.updateMatrixWorld(),this._positionStart.copy(this.object.position),this._quaternionStart.copy(this.object.quaternion),this._scaleStart.copy(this.object.scale),this.object.matrixWorld.decompose(this.worldPositionStart,this.worldQuaternionStart,this._worldScaleStart),this.pointStart.copy(t.point).sub(this.worldPositionStart)),this.dragging=!0,xo.mode=this.mode,this.dispatchEvent(xo)}}pointerMove(e){const t=this.axis,o=this.mode,a=this.object;let r=this.space;if(o==="scale"?r="local":(t==="E"||t==="XYZE"||t==="XYZ")&&(r="world"),a===void 0||t===null||this.dragging===!1||e.button!==-1)return;Wt.setFromCamera(e,this.camera);const s=Yn(this._plane,Wt,!0);if(s){if(this.pointEnd.copy(s.point).sub(this.worldPositionStart),o==="translate")this._offset.copy(this.pointEnd).sub(this.pointStart),r==="local"&&t!=="XYZ"&&this._offset.applyQuaternion(this._worldQuaternionInv),t.indexOf("X")===-1&&(this._offset.x=0),t.indexOf("Y")===-1&&(this._offset.y=0),t.indexOf("Z")===-1&&(this._offset.z=0),r==="local"&&t!=="XYZ"?this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale):this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale),a.position.copy(this._offset).add(this._positionStart),this.translationSnap&&(r==="local"&&(a.position.applyQuaternion(Je.copy(this._quaternionStart).invert()),t.search("X")!==-1&&(a.position.x=Math.round(a.position.x/this.translationSnap)*this.translationSnap),t.search("Y")!==-1&&(a.position.y=Math.round(a.position.y/this.translationSnap)*this.translationSnap),t.search("Z")!==-1&&(a.position.z=Math.round(a.position.z/this.translationSnap)*this.translationSnap),a.position.applyQuaternion(this._quaternionStart)),r==="world"&&(
6a.parent&&a.position.add(St.setFromMatrixPosition(a.parent.matrixWorld)),t.search("X")!==-1&&(a.position.x=Math.round(a.position.x/this.translationSnap)*this.translationSnap),t.search("Y")!==-1&&(a.position.y=Math.round(a.position.y/this.translationSnap)*this.translationSnap),t.search("Z")!==-1&&(a.position.z=Math.round(a.position.z/this.translationSnap)*this.translationSnap),a.parent&&a.position.sub(St.setFromMatrixPosition(a.parent.matrixWorld))));else if(o==="scale"){if(t.search("XYZ")!==-1){let c=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(c*=-1),jt.set(c,c,c)}else St.copy(this.pointStart),jt.copy(this.pointEnd),St.applyQuaternion(this._worldQuaternionInv),jt.applyQuaternion(this._worldQuaternionInv),jt.divide(St),t.search("X")===-1&&(jt.x=1),t.search("Y")===-1&&(jt.y=1),t.search("Z")===-1&&(jt.z=1);a.scale.copy(this._scaleStart).multiply(jt),this.scaleSnap&&(t.search("X")!==-1&&(a.scale.x=Math.round(a.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),t.search("Y")!==-1&&(a.scale.y=Math.round(a.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),t.search("Z")!==-1&&(a.scale.z=Math.round(a.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(o==="rotate"){this._offset.copy(this.pointEnd).sub(this.pointStart);const c=20/this.worldPosition.distanceTo(St.setFromMatrixPosition(this.camera.matrixWorld));t==="E"?(this.rotationAxis.copy(this.eye),this.rotationAngle=this.pointEnd.angleTo(this.pointStart),this._startNorm.copy(this.pointStart).normalize(),this._endNorm.copy(this.pointEnd).normalize(),this.rotationAngle*=this._endNorm.cross(this._startNorm).dot(this.eye)<0?1:-1):t==="XYZE"?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(St.copy(this.rotationAxis).cross(this.eye))*c):(t==="X"||t==="Y"||t==="Z")&&(this.rotationAxis.copy(Co[t]),St.copy(Co[t]),r==="local"&&St.applyQuaternion(this.worldQuaternion),this.rotationAngle=this._offset.dot(St.cross(this.eye).normalize())*c),this.rotationSnap&&(this.rotationAngle=Math.round(this.rotationAngle/this.rotationSnap)*this.rotationSnap),r==="local"&&t!=="E"&&t!=="XYZE"?(a.quaternion.copy(this._quaternionStart),a.quaternion.multiply(Je.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),a.quaternion.copy(Je.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),a.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(Gn),this.dispatchEvent(Mo)}}pointerUp(e){e.button===0&&(this.dragging&&this.axis!==null&&(So.mode=this.mode,this.dispatchEvent(So)),this.dragging=!1,this.axis=null)}dispose(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerHover),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.traverse(function(e){e.geometry&&e.geometry.dispose(),e.material&&e.material.dispose()})}attach(e){return this.object=e,this.visible=!0,this}detach(){return this.object=void 0,this.visible=!1,this.axis=null,this}reset(){this.enabled&&this.dragging&&(this.object.position.copy(this._positionStart),this.object.quaternion.copy(this._quaternionStart),this.object.scale.copy(this._scaleStart),this.dispatchEvent(Gn),this.dispatchEvent(Mo),this.pointStart.copy(this.pointEnd))}getRaycaster(){return Wt}getMode(){return this.mode}setMode(e){this.mode=e}setTranslationSnap(e){this.translationSnap=e}setRotationSnap(e){this.rotationSnap=e}setScaleSnap(e){this.scaleSnap=e}setSize(e){this.size=e}setSpace(e){this.space=e}}function $a(x){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:x.button};{const e=this.domElement.getBoundingClientRect();return{x:(x.clientX-e.left)/e.width*2-1,y:-(x.clientY-e.top)/e.height*2+1,button:x.button}}}function Ra(x){if(this.enabled)switch(x.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(x));break}}function Za(x){this.enabled&&(document.pointerLockElement||this.domElement.setPointerCapture(x.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.pointerHover(this._getPointer(x)),this.pointerDown(this._getPointer(x)))}function Ua(x){this.enabled&&this.pointerMove(this._getPointer(x))}function Ba(x){this.enabled&&(this.domElement.releasePointerCapture(x.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(x)))}function Yn(x,e,t){const o=e.intersectObject(x,!0);for(let a=0;a<o.length;a++)if(o[a].object.visible||t)return o[a];return!1}const $n=new zs,Ge=new J(0,1,0),Ao=new J(0,0,0),Io=new Ln,Rn=new Ue,Un=new Ue,Ut=new J,To=new Ln,_n=new J(1,0,0),Qt=new J(0,1,0),Cn=new J(0,0,1),Zn=new J,wn=new J,bn=new J;class Fa extends Sn{constructor(){super(),this.isTransformControlsGizmo=!0,this.type="TransformControlsGizmo";const e=new Ht({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),t=new Oo({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),o=e.clone();o.opacity=.15;const a=t.clone();a.opacity=.5;const r=e.clone();r.color.setHex(16711680);const s=e.clone();s.color.setHex(65280);const c=e.clone();c.color.setHex(255);const d=e.clone();d.color.setHex(16711680),d.opacity=.5;const m=e.clone();m.color.setHex(65280),m.opacity=.5;const M=e.clone();M.color.setHex(255),M.opacity=.5;const u=e.clone();u.opacity=.25;const L=e.clone();L.color.setHex(16776960),L.opacity=.25,e.clone().color.setHex(16776960);const k=e.clone();k.color.setHex(7895160);const w=new xt(0,.04,.1,12);w.translate(0,.05,0);const A=new bt(.08,.08,.08);A.translate(0,.04,0);const z=new Wn;z.setAttribute("position",new uo([0,0,0,1,0,0],3));const G=new xt(.0075,.0075,.5,3);G.translate(0,.25,0);function re(q,Te){const Re=new fn(q,.0075,3,64,Te*Math.PI*2);return Re.rotateY(Math.PI/2),Re.rotateX(Math.PI/2),Re}function v(){const q=new Wn;return q.setAttribute("position",new uo([0,0,0,1,1,1],3)),q}
6const te={X:[[new ie(w,r),[.5,0,0],[0,0,-Math.PI/2]],[new ie(w,r),[-.5,0,0],[0,0,Math.PI/2]],[new ie(G,r),[0,0,0],[0,0,-Math.PI/2]]],Y:[[new ie(w,s),[0,.5,0]],[new ie(w,s),[0,-.5,0],[Math.PI,0,0]],[new ie(G,s)]],Z:[[new ie(w,c),[0,0,.5],[Math.PI/2,0,0]],[new ie(w,c),[0,0,-.5],[-Math.PI/2,0,0]],[new ie(G,c),null,[Math.PI/2,0,0]]],XYZ:[[new ie(new Dn(.1,0),u.clone()),[0,0,0]]],XY:[[new ie(new bt(.15,.15,.01),M.clone()),[.15,.15,0]]],YZ:[[new ie(new bt(.15,.15,.01),d.clone()),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new ie(new bt(.15,.15,.01),m.clone()),[.15,0,.15],[-Math.PI/2,0,0]]]},ge={X:[[new ie(new xt(.2,0,.6,4),o),[.3,0,0],[0,0,-Math.PI/2]],[new ie(new xt(.2,0,.6,4),o),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new ie(new xt(.2,0,.6,4),o),[0,.3,0]],[new ie(new xt(.2,0,.6,4),o),[0,-.3,0],[0,0,Math.PI]]],Z:[[new ie(new xt(.2,0,.6,4),o),[0,0,.3],[Math.PI/2,0,0]],[new ie(new xt(.2,0,.6,4),o),[0,0,-.3],[-Math.PI/2,0,0]]],XYZ:[[new ie(new Dn(.2,0),o)]],XY:[[new ie(new bt(.2,.2,.01),o),[.15,.15,0]]],YZ:[[new ie(new bt(.2,.2,.01),o),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new ie(new bt(.2,.2,.01),o),[.15,0,.15],[-Math.PI/2,0,0]]]},$e={START:[[new ie(new Dn(.01,2),a),null,null,null,"helper"]],END:[[new ie(new Dn(.01,2),a),null,null,null,"helper"]],DELTA:[[new 
6Nt(v(),a),null,null,null,"helper"]],X:[[new Nt(z,a.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new Nt(z,a.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new Nt(z,a.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},Fe={XYZE:[[new ie(re(.5,1),k),null,[0,Math.PI/2,0]]],X:[[new ie(re(.5,.5),r)]],Y:[[new ie(re(.5,.5),s),null,[0,0,-Math.PI/2]]],Z:[[new ie(re(.5,.5),c),null,[0,Math.PI/2,0]]],E:[[new ie(re(.75,1),L),null,[0,Math.PI/2,0]]]},ue={AXIS:[[new Nt(z,a.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]]},Ie={XYZE:[[new ie(new No(.25,10,8),o)]],X:[[new ie(new fn(.5,.1,4,24),o),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new ie(new fn(.5,.1,4,24),o),[0,0,0],[Math.PI/2,0,0]]],Z:[[new ie(new fn(.5,.1,4,24),o),[0,0,0],[0,0,-Math.PI/2]]],E:[[new ie(new fn(.75,.1,2,24),o)]]},pe={X:[[new ie(A,r),[.5,0,0],[0,0,-Math.PI/2]],[new ie(G,r),[0,0,0],[0,0,-Math.PI/2]],[new ie(A,r),[-.5,0,0],[0,0,Math.PI/2]]],Y:[[new ie(A,s),[0,.5,0]],[new ie(G,s)],[new ie(A,s),[0,-.5,0],[0,0,Math.PI]]],Z:[[new ie(A,c),[0,0,.5],[Math.PI/2,0,0]],[new ie(G,c),[0,0,0],[Math.PI/2,0,0]],[new ie(A,c),[0,0,-.5],[-Math.PI/2,0,0]]],XY:[[new ie(new bt(.15,.15,.01),M),[.15,.15,0]]],YZ:[[new ie(new bt(.15,.15,.01),d),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new ie(new bt(.15,.15,.01),m),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new ie(new bt(.1,.1,.1),u.clone())]]},Ye={X:[[new ie(new xt(.2,0,.6,4),o),[.3,0,0],[0,0,-Math.PI/2]],[new ie(new xt(.2,0,.6,4),o),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new ie(new xt(.2,0,.6,4),o),[0,.3,0]],[new ie(new xt(.2,0,.6,4),o),[0,-.3,0],[0,0,Math.PI]]],Z:[[new ie(new xt(.2,0,.6,4),o),[0,0,.3],[Math.PI/2,0,0]],[new ie(new xt(.2,0,.6,4),o),[0,0,-.3],[-Math.PI/2,0,0]]],XY:[[new ie(new bt(.2,.2,.01),o),[.15,.15,0]]],YZ:[[new ie(new bt(.2,.2,.01),o),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new ie(new bt(.2,.2,.01),o),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new ie(new bt(.2,.2,.2),o),[0,0,0]]]},Ee={X:[[new Nt(z,a.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new Nt(z,a.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new Nt(z,a.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]};function he(q){const Te=new Sn;for(const Re in q)for(let ne=q[Re].length;ne--;){const $=q[Re][ne][0].clone(),ee=q[Re][ne][1],De=q[Re][ne][2],Me=q[Re][ne][3],je=q[Re][ne][4];$.name=Re,$.tag=je,ee&&$.position.set(ee[0],ee[1],ee[2]),De&&$.rotation.set(De[0],De[1],De[2]),Me&&$.scale.set(Me[0],Me[1],Me[2]),$.updateMatrix();const We=$.geometry.clone();We.applyMatrix4($.matrix),$.geometry=We,$.renderOrder=1/0,$.position.set(0,0,0),$.rotation.set(0,0,0),$.scale.set(1,1,1),Te.add($)}return Te}this.gizmo={},this.picker={},this.helper={},this.add(this.gizmo.translate=he(te)),this.add(this.gizmo.rotate=he(Fe)),this.add(this.gizmo.scale=he(pe)),this.add(this.picker.translate=he(ge)),this.add(this.picker.rotate=he(Ie)),this.add(this.picker.scale=he(Ye)),this.add(this.helper.translate=he($e)),this.add(this.helper.rotate=he(ue)),this.add(this.helper.scale=he(Ee)),this.picker.translate.visible=!1,this.picker.rotate.visible=!1,this.picker.scale.visible=!1}updateMatrixWorld(e){const o=(this.mode==="scale"?"local":this.space)==="local"?this.worldQuaternion:Un;this.gizmo.translate.visible=this.mode==="translate",this.gizmo.rotate.visible=this.mode==="rotate",this.gizmo.scale.visible=this.mode==="scale",this.helper.translate.visible=this.mode==="translate",this.helper.rotate.visible=this.mode==="rotate",this.helper.scale.visible=this.mode==="scale";let a=[];a=a.concat(this.picker[this.mode].children),a=a.concat(this.gizmo[this.mode].children),a=a.concat(this.helper[this.mode].children);for(let r=0;r<a.length;r++){const s=a[r];s.visible=!0,s.rotation.set(0,0,0),s.position.copy(this.worldPosition);let c;if(this.camera.isOrthographicCamera?c=(this.camera.top-this.camera.bottom)/this.camera.zoom:c=this.worldPosition.distanceTo(this.cameraPosition)*Math.min(1.9*Math.tan(Math.PI*this.camera.fov/360)/this.camera.zoom,7),s.scale.set(1,1,1).multiplyScalar(c*this.size/4),s.tag==="helper"){s.visible=!1,s.name==="AXIS"?(s.position.copy(this.worldPositionStart),s.visible=!!this.axis,this.axis==="X"&&(Je.setFromEuler($n.set(0,0,0)),s.quaternion.copy(o).multiply(Je),Math.abs(Ge.copy(_n).applyQuaternion(o).dot(this.eye))>.9&&(s.visible=!1)),this.axis==="Y"&&(Je.setFromEuler($n.set(0,0,Math.PI/2)),s.quaternion.copy(o).multiply(Je),Math.abs(Ge.copy(Qt).applyQuaternion(o).dot(this.eye))>.9&&(s.visible=!1)),this.axis==="Z"&&(Je.setFromEuler($n.set(0,Math.PI/2,0)),s.quaternion.copy(o).multiply(Je),Math.abs(Ge.copy(Cn).applyQuaternion(o).dot(this.eye))>.9&&(s.visible=!1)),this.axis==="XYZE"&&(Je.setFromEuler($n.set(0,Math.PI/2,0)),Ge.copy(this.rotationAxis),s.quaternion.setFromRotationMatrix(Io.lookAt(Ao,Ge,Qt)),s.quaternion.multiply(Je),s.visible=this.dragging),this.axis==="E"&&(s.visible=!1)):s.name==="START"?(s.position.copy(this.worldPositionStart),s.visible=this.dragging):s.name==="END"?(s.position.copy(this.worldPosition),s.visible=this.dragging):s.name==="DELTA"?(s.position.copy(this.worldPositionStart),s.quaternion.copy(this.worldQuaternionStart),St.set(1e-10,
61e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),St.applyQuaternion(this.worldQuaternionStart.clone().invert()),s.scale.copy(St),s.visible=this.dragging):(s.quaternion.copy(o),this.dragging?s.position.copy(this.worldPositionStart):s.position.copy(this.worldPosition),this.axis&&(s.visible=this.axis.search(s.name)!==-1));continue}s.quaternion.copy(o),this.mode==="translate"||this.mode==="scale"?(s.name==="X"&&Math.abs(Ge.copy(_n).applyQuaternion(o).dot(this.eye))>.99&&(s.scale.set(1e-10,1e-10,1e-10),s.visible=!1),s.name==="Y"&&Math.abs(Ge.copy(Qt).applyQuaternion(o).dot(this.eye))>.99&&(s.scale.set(1e-10,1e-10,1e-10),s.visible=!1),s.name==="Z"&&Math.abs(Ge.copy(Cn).applyQuaternion(o).dot(this.eye))>.99&&(s.scale.set(1e-10,1e-10,1e-10),s.visible=!1),s.name==="XY"&&Math.abs(Ge.copy(Cn).applyQuaternion(o).dot(this.eye))<.2&&(s.scale.set(1e-10,1e-10,1e-10),s.visible=!1),s.name==="YZ"&&Math.abs(Ge.copy(_n).applyQuaternion(o).dot(this.eye))<.2&&(s.scale.set(1e-10,1e-10,1e-10),s.visible=!1),s.name==="XZ"&&Math.abs(Ge.copy(Qt).applyQuaternion(o).dot(this.eye))<.2&&(s.scale.set(1e-10,
61e-10,1e-10),s.visible=!1)):this.mode==="rotate"&&(Rn.copy(o),Ge.copy(this.eye).applyQuaternion(Je.copy(o).invert()),s.name.search("E")!==-1&&s.quaternion.setFromRotationMatrix(Io.lookAt(this.eye,Ao,Qt)),s.name==="X"&&(Je.setFromAxisAngle(_n,Math.atan2(-Ge.y,Ge.z)),Je.multiplyQuaternions(Rn,Je),s.quaternion.copy(Je)),s.name==="Y"&&(Je.setFromAxisAngle(Qt,Math.atan2(Ge.x,Ge.z)),Je.multiplyQuaternions(Rn,Je),s.quaternion.copy(Je)),s.name==="Z"&&(Je.setFromAxisAngle(Cn,Math.atan2(Ge.y,Ge.x)),Je.multiplyQuaternions(Rn,Je),s.quaternion.copy(Je))),s.visible=s.visible&&(s.name.indexOf("X")===-1||this.showX),s.visible=s.visible&&(s.name.indexOf("Y")===-1||this.showY),s.visible=s.visible&&(s.name.indexOf("Z")===-1||this.showZ),s.visible=s.visible&&(s.name.indexOf("E")===-1||this.showX&&this.showY&&this.showZ),s.material._color=s.material._color||s.material.color.clone(),s.material._opacity=s.material._opacity||s.material.opacity,s.material.color.copy(s.material._color),s.material.opacity=s.material._opacity,this.enabled&&this.axis&&(s.name===this.axis||this.axis.split("").some(function(d){return s.name===d}))&&(s.material.color.setHex(16776960),s.material.opacity=1)}super.updateMatrixWorld(e)}}class Na extends ie{constructor(){super(new Es(1e5,1e5,2,2),new Ht({visible:!1,wireframe:!0,side:$o,transparent:!0,opacity:.1,toneMapped:!1})),this.isTransformControlsPlane=!0,this.type="TransformControlsPlane"}updateMatrixWorld(e){let t=this.space;switch(this.position.copy(this.worldPosition),this.mode==="scale"&&(t="local"),Zn.copy(_n).applyQuaternion(t==="local"?this.worldQuaternion:Un),wn.copy(Qt).applyQuaternion(t==="local"?this.worldQuaternion:Un),bn.copy(Cn).applyQuaternion(t==="local"?this.worldQuaternion:Un),Ge.copy(wn),this.mode){case"translate":case"scale":switch(this.axis){case"X":Ge.copy(this.eye).cross(Zn),Ut.copy(Zn).cross(Ge);break;case"Y":Ge.copy(this.eye).cross(wn),Ut.copy(wn).cross(Ge);break;case"Z":Ge.copy(this.eye).cross(bn),Ut.copy(bn).cross(Ge);break;case"XY":Ut.copy(bn);break;case"YZ":Ut.copy(Zn);break;case"XZ":Ge.copy(bn),Ut.copy(wn);break;case"XYZ":case"E":Ut.set(0,0,0);break}break;case"rotate":default:Ut.set(0,0,0)}Ut.length()===0?this.quaternion.copy(this.cameraQuaternion):(To.lookAt(St.set(0,0,0),Ut,Ge),this.quaternion.setFromRotationMatrix(To)),super.updateMatrixWorld(e)}}const Xa={ref:"container",class:"viewer-container"},Va={__name:"PanoramaViewer",props:{panoramaId:{type:String,required:!0}},emits:["close"],setup(x,{emit:e}){const t=x,o=C(null),a=C(null);let r,s,c,d,m,M=new Fo,u=new Pt,L=null,O=!1;const k=30,w=90,A=async()=>{const ue=Bn(),Ie=en(ue,"panoramas",t.panoramaId),pe=await Lo(Ie);pe.exists()?(o.value=pe.data().imageUrl,z()):console.log("No such document!")},z=()=>{const ue=a.value;r=new Ds,s=new Ro(75,ue.clientWidth/ue.clientHeight,.1,2e3),s.position.set(0,0,.1),c=new Os({antialias:!0}),c.setSize(ue.clientWidth,ue.clientHeight),c.setPixelRatio(window.devicePixelRatio),ue.appendChild(c.domElement),window.addEventListener("resize",te),d=new oa(s,c.domElement),d.enableZoom=!1,d.enablePan=!0,d.enableDamping=!0,d.dampingFactor=.05,new Eo().load(o.value,pe=>{pe.wrapS=Fn,pe.repeat.x=-1;const Ye=new No(500,60,40);Ye.scale(-1,1,1);const Ee=new Ht({map:pe}),he=new ie(Ye,Ee);r.add(he),G(),re(),ge()}),window.addEventListener("wheel",$e),window.addEventListener("mousedown",v)},G=()=>{const ue=new sa;ue.load("https://firebasestorage.googleapis.com/v0/b/selfwalksigniabonnetcreek.appspot.com/o/updatedDiagramAssets%2F003_SelfWalk_BasicRoundTable_Asset_LOD2.gltf?alt=media&token=e5335755-ab25-4065-832d-51e3dce062be",Ie=>{const pe=Ie.scene;pe.position.set(0,-1,3),pe.scale.set(.5,.5,.5),pe.name="chair",r.add(pe)}),ue.load("https://firebasestorage.googleapis.com/v0/b/selfwalksigniabonnetcreek.appspot.com/o/updatedDiagramAssets%2F003_SelfWalk_BasicRoundTable_Asset_LOD2.gltf?alt=media&token=e5335755-ab25-4065-832d-51e3dce062be",Ie=>{const pe=Ie.scene;pe.position.set(2,-1,4),pe.scale.set(.7,.7,.7),pe.name="table",r.add(pe)})},re=()=>{m=new Oa(s,c.domElement),r.add(m),m.addEventListener("dragging-changed",function(ue){d.enabled=!ue.value})},v=ue=>{u.x=ue.clientX/window.innerWidth*2-1,u.y=-(ue.clientY/window.innerHeight)*2+1,M.setFromCamera(u,s);const Ie=M.intersectObjects(r.children,!0);Ie.length>0&&(L=Ie[0].object,m.attach(L))},te=()=>{const ue=a.value;s.aspect=ue.clientWidth/ue.clientHeight,s.updateProjectionMatrix(),c.setSize(ue.clientWidth,ue.clientHeight)},ge=()=>{O||(requestAnimationFrame(ge),d.update(),c.render(r,s))},$e=ue=>{const Ie=ue.deltaY*.05;s.fov=Zo.clamp(s.fov+Ie,k,w),s.updateProjectionMatrix()};qs(()=>{O=!0,c&&c.dispose(),r=null,s=null,d.dispose(),window.removeEventListener("resize",te),window.removeEventListener("wheel",$e),window.removeEventListener("mousedown",v)});const Fe=()=>{e("close")};return zn(()=>{O=!1,A()}),(ue,Ie)=>(I(),T("div",Xa,[n("button",{class:"close-btn",onClick:Fe},"Close"),n("div",{ref_key:"panoramaContainer",ref:a,class:"panorama-viewer"},null,512)],512))}},ja=Yt(Va,[["__scopeId","data-v-0641b581"]]),hn=x=>(on("data-v-14398d3e"),x=x(),sn(),x),Ha={class:"docInfo"},qa={class:"addDocs"},Ga={class:"uploadDoc"},Ya=hn(()=>n("label",{class:"upload-btn",for:"file"},"Upload PDF",-1)),Wa={key:0},Ka={class:"addDocLink"},Qa=hn(()=>n("div",null,null,-1)),Ja={class:"venueCheckField"},ei=hn(()=>n("label",{for:"inroomdiningtab"},"Show Doc Menu Pills",-1)),ti={class:"venueCheckField"},ni=hn(()=>n("label",{for:"inroomdiningtab"},"Use Doc Menu Builder",-1)),oi={class:"docList"},si={class:"docItem"},ai=pn('<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewB
6ox="0 0 50 50" fill="none" data-v-14398d3e><mask id="mask0_728_2024" style="mask-type:alpha;" maskUnits="userSpaceOnUse" x="0" y="0" width="50" height="50" data-v-14398d3e><path d="M0 12C0 5.37258 5.37258 0 12 0H38C44.6274 0 50 5.37258 50 12V38C50 44.6274 44.6274 50 38 50H12C5.37258 50 0 44.6274 0 38V12Z" fill="white" data-v-14398d3e></path></mask><g mask="url(#mask0_728_2024)" data-v-14398d3e><rect opacity="0.1" x="-10" y="-2" width="70" height="54" fill="white" data-v-14398d3e></rect><path d="M29.0007 13.3C29.7065 13.542 30.3487 13.9398 30.8797 14.464L32.5357 16.122C33.0605 16.6523 33.4587 17.2943 33.7007 18H29.0007V13.3ZM34.0007 20V32C33.9991 33.3256 33.4718 34.5964 32.5345 35.5338C31.5971 36.4711 30.3263 36.9984 29.0007 37H21.0007C19.6751 36.9984 18.4043 36.4711 17.4669 35.5338C16.5296 34.5964 16.0023 33.3256 16.0007 32C15.9991 30.6744 16.0007 18 16.0007 18C16.0023 16.6744 16.5296 15.4036 17.4669 14.4662C18.4043 13.5289 19.6751 13.0016 21.0007 13H27.0007V18C27.0007 18.5304 27.2114 19.0391 27.5865 19.4142C27.9616 19.7893 28.4703 20 29.0007 20H34.0007ZM30.0007 27C30.0007 26.7348 29.8953 26.4804 29.7078 26.2929C29.5203 26.1054 29.2659 26 29.0007 26H21.0007C20.7355 26 20.4811 26.1054 20.2936 26.2929C20.1061 26.4804 20.0007 26.7348 20.0007 27C20.0007 27.2652 20.1061 27.5196 20.2936 27.7071C20.4811 27.8946 20.7355 28 21.0007 28H29.0007C29.2659 28 29.5203 27.8946 29.7078 27.7071C29.8953 27.5196 30.0007 27.2652 30.0007 27ZM30.0007 23C30.0007 22.7348 29.8953 22.4804 29.7078 22.2929C29.5203 22.1054 29.2659 22 29.0007 22H21.0007C20.7355 22 20.4811 22.1054 20.2936 22.2929C20.1061 22.4804 20.0007 22.7348 20.0007 23C20.0007 23.2652 20.1061 23.5196 20.2936 23.7071C20.4811 23.8946 20.7355 24 21.0007 24H29.0007C29.2659 24 29.5203 23.8946 29.7078 23.7071C29.8953 23.5196 30.0007 23.2652 30.0007 23Z" fill="white" data-v-14398d3e></path></g></svg>',1),ii={class:"docItemDetails"},li=["onUpdate:modelValue"],ri=["onUpdate:modelValue"],ci={class:"docItemButtons"},di=["onClick"],ui=hn(()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[n("rect",{width:"26",height:"26",rx:"4",fill:"#B46C26"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 8C20 7.44772 19.5523 7 19 7L17 7C16.4477 7 16 6.55228 16 6C16 5.44772 15.5523 5 15 5L11 5C10.4477 5 10 5.44772 10 6C10 6.55229 9.55228 7 9 7L7 7C6.44772 7 6 7.44772 6 8C6 8.55228 6.44772 9 7 9L7.00003 17.3333C7.00003 19.3584 8.64166 21 10.6667 21L15.3333 21C17.3584 21 19 19.3584 19 17.3333L19 9C19.5523 9 20 8.55228 20 8ZM10 11C10 10.4477 10.4477 10 11 10C11.5523 10 12 10.4477 12 11L12 17C12 17.5523 11.5523 18 11 18C10.4477 18 10 17.5523 10 17L10 11ZM15 10C14.4477 10 14 10.4477 14 11L14 17C14 17.5523 14.4477 18 15 18C15.5523 18 16 17.5523 16 17L16 11C16 10.4477 15.5523 10 15 10Z",fill:"white"})],-1)),pi=[ui],hi=["onClick"],mi=hn(()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[n("rect",{opacity:"0.3",width:"26",height:"26",rx:"4",fill:"white"}),n("path",{d:"M11.5367 8.14941C11.4931 8.1023 11.4403 8.06471 11.3814 8.039C11.3226 8.01329 11.2591 8 11.1949 8C11.1308 8 11.0672 8.01329 11.0084 8.039C10.9496 8.06471 10.8967 8.1023 10.8531 8.14941L10.1696 8.86621C10.0783 8.96287 10.0275 9.09072 10.0275 9.22363C10.0275 9.35654 10.0783 9.48445 10.1696 9.58112L13.4645 12.9863L10.1422 16.4199C10.051 16.5167 10.0001 16.6447 10.0001 16.7778C10.0001 16.9108 10.051 17.0389 10.1422 17.1357L10.8258 17.8525C10.8697 17.8992 10.9226 17.9365 10.9814 17.9619C11.0402 17.9874 11.1036 18.0005 11.1676 18.0005C11.2317 18.0005 11.2951 17.9874 11.3539 17.9619C11.4127 17.9365 11.4656 17.8992 11.5094 17.8525L15.8594 13.3447C15.9498 13.2473 16.0001 13.1193 16.0001 12.9863C16.0001 12.8534 15.9498 12.7254 15.8594 12.6279L11.5367 8.14941Z",fill:"white"})],-1)),fi=[mi],gi={__name:"DocAdmin",setup(x){const e=Gt();C(!1);const t=qt(e.updateAdminField,500),o=C({}),a=C(null);function r(){console.log("document",o.value),o.value!=={}&&(console.log(o.value),e.siteProInfo.documents.push(o.value),e.updateAdminField("documents",e.siteProInfo.documents),o.value={})}function s(u){e.siteProInfo.documents.splice(u,1),e.updateAdminField("documents",e.siteProInfo.documents)}function c(u){let L=e.siteProInfo.documents[u].link;window.open(L,"_blank")}const d=Pn(),m=C(!1),M=u=>{const L=u.target.files[0];if(!L)return;const O=L.name;console.log("File name:",O);const k=Mn(d,`pdfs/${L.name}`),w=kn(k,L);w.on("state_changed",A=>{const z=A.bytesTransferred/A.totalBytes*100;console.log("Upload is "+z+"% done"),a.value=z.toFixed(2)},A=>{console.error("Error during upload: ",A),a.value=null},()=>{En(w.snapshot.ref).then(A=>{o.value.link=A,o.value.name=O,console.log("adding doc",o.value),r(o.value),a.value=null,o.value={}})}),m.value=!1};return(u,L)=>(I(),T("div",Ha,[n("div",qa,[n("div",Ga,[Ya,n("input",{type:"file",id:"file",onChange:M,accept:"application/pdf",style:{display:"none"}},null,32),a.value!==null?(I(),T("div",Wa," Upload Progress: "+le(a.value)+"% ",1)):W("",!0)]),n("div",Ka,[n("div",null,[R(n("input",{id:"documents","onUpdate:modelValue":L[0]||(L[0]=O=>o.value.name=O),type:"text",placeholder:"Document Name"},null,512),[[Q,o.value.name]])]),n("div",null,[R(n("input",{id:"documents","onUpdate:modelValue":L[1]||(L[1]=O=>
6o.value.link=O),type:"text",placeholder:"Document Link"},null,512),[[Q,o.value.link]])]),n("button",{class:"addButton",onClick:L[2]||(L[2]=F(O=>r(o.value),["prevent"]))},"Add")])]),Qa,n("div",Ja,[R(n("input",{id:"inroomdiningtab","onUpdate:modelValue":L[3]||(L[3]=O=>f(e).siteProInfo.showDocPills=O),onChange:L[4]||(L[4]=O=>f(t)("showDocPills",f(e).siteProInfo.showDocPills)),type:"checkbox",placeholder:"Show Doc Menu Pills"},null,544),[[Dt,f(e).siteProInfo.showDocPills]]),ei]),n("div",ti,[R(n("input",{id:"inroomdiningtab","onUpdate:modelValue":L[5]||(L[5]=O=>f(e).siteProInfo.useDocMenuBuilder=O),onChange:L[6]||(L[6]=O=>f(t)("useDocMenuBuilder",f(e).siteProInfo.useDocMenuBuilder)),type:"checkbox",placeholder:"Use Doc Menu Builder"},null,544),[[Dt,f(e).siteProInfo.useDocMenuBuilder]]),ni]),n("div",oi,[(I(!0),T(Ae,null,ke(f(e).siteProInfo.documents,(O,k)=>(I(),T("div",si,[ai,n("div",ii,[R(n("input",{"onUpdate:modelValue":w=>O.name=w,onChange:L[7]||(L[7]=w=>f(t)("documents",f(e).siteProInfo.documents))},null,40,li),[[Q,O.name]]),R(n("input",{"onUpdate:modelValue":w=>O.link=w,onChange:L[8]||(L[8]=w=>f(t)("documents",f(e).siteProInfo.documents))},null,40,ri),[[Q,O.link]])]),n("div",ci,[n("button",{class:"removeButton",onClick:F(w=>s(k),["prevent"])},pi,8,di),n("button",{class:"removeButton",onClick:F(w=>c(k),["prevent"])},fi,8,hi)])]))),256))])]))}},vi=Yt(gi,[["__scopeId","data-v-14398d3e"]]),Xn=x=>(on("data-v-4e593a05"),x=x(),sn(),x),wi={class:"modeladd"},bi=Xn(()=>n("label",{for:"model-add"},"Add a Model to Hotel",-1)),yi={class:"modelinputs"},_i=["onClick"],Ci={class:"modelList"},xi={class:"modelListItem"},Si={class:"modelBtns"},Mi=Xn(()=>n("img",{class:"modelThumb"},null,-1)),Ai={class:"modelName"},Ii={class:"modelBtns"},Ti=["onClick"],Li=Xn(()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[n("rect",{width:"26",height:"26",rx:"4",fill:"#B46C26"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 8C20 7.44772 19.5523 7 19 7L17 7C16.4477 7 16 6.55228 16 6C16 5.44772 15.5523 5 15 5L11 5C10.4477 5 10 5.44772 10 6C10 6.55229 9.55228 7 9 7L7 7C6.44772 7 6 7.44772 6 8C6 8.55228 6.44772 9 7 9L7.00003 17.3333C7.00003 19.3584 8.64166 21 10.6667 21L15.3333 21C17.3584 21 19 19.3584 19 17.3333L19 9C19.5523 9 20 8.55228 20 8ZM10 11C10 10.4477 10.4477 10 11 10C11.5523 10 12 10.4477 12 11L12 17C12 17.5523 11.5523 18 11 18C10.4477 18 10 17.5523 10 17L10 11ZM15 10C14.4477 10 14 10.4477 14 11L14 17C14 17.5523 14.4477 18 15 18C15.5523 18 16 17.5523 16 17L16 11C16 10.4477 15.5523 10 15 10Z",fill:"white"})],-1)),Pi=[Li],ki=["onClick"],Ei=Xn(()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[n("rect",{opacity:"0.3",width:"26",height:"26",rx:"4",fill:"white"}),n("path",{d:"M11.5366 8.14941C11.493 8.1023 11.4401 8.06471 11.3813 8.039C11.3225 8.01329 11.259 8 11.1948 8C11.1306 8 11.0671 8.01329 11.0083 8.039C10.9495 8.06471 10.8966 8.1023 10.853 8.14941L10.1694 8.86621C10.0782 8.96287 10.0274 9.09072 10.0274 9.22363C10.0274 9.35654 10.0782 9.48445 10.1694 9.58112L13.4644 12.9863L10.1421 16.4199C10.0508 16.5167 10 16.6447 10 16.7778C10 16.9108 10.0508 17.0389 10.1421 17.1357L10.8257 17.8525C10.8695 17.8992 10.9225 17.9365 10.9813 17.9619C11.0401 17.9874 11.1034 18.0005 11.1675 18.0005C11.2316 18.0005 11.295 17.9874 11.3538 17.9619C11.4125 17.9365 11.4655 17.8992 11.5093 17.8525L15.8593 13.3447C15.9497 13.2473 15.9999 13.1193 15.9999 12.9863C15.9999 12.8534 15.9497 12.7254 15.8593 12.6279L11.5366 8.14941Z",fill:"white"})],-1)),zi=[Ei],Di={__name:"ModelAdmin",setup(x){const e=Gt();C(!1);const t=C("");C("");async function o(s){await e.navToMPLink(s.link)}async function a(){let s;console.log("model to visit",t.value);try{console.log("cur sweep bef move",e.currentSweep);let c=e.currentSweep;await e.navToMPLink(t.value),await new Promise(m=>{let M=setInterval(()=>{e.currentSweep!==c&&(clearInterval(M),m())},100)}),console.log("cur sweep aft move",e.currentSweep);const d=await e.mpSdk.Model.getDetails();console.log("model det",d),console.log("Model sid:"+d.sid),console.log("Model name:"+d.name),console.log("Model summary:"+d.summary),s={link:t.value,name:d.name,sid:d.sid,summary:d.summary},console.log("model: ",s),e.siteProInfo.models.push(s),e.updateAdminField("models",e.siteProInfo.models),t.value=""}catch(c){console.error("Error retrieving model details:",c)}}function r(s){e.siteProInfo.models.splice(s,1),e.updateAdminField("models",e.siteProInfo.models)}return(s,c)=>(I(),T("div",wi,[bi,n("div",yi,[R(n("input",{id:"model-add","onUpdate:modelValue":c[0]||(c[0]=d=>t.value=d),type:"text",class:"modeladdInput",placeholder:"Model URL"},null,512),[[Q,t.value]]),n("button",{class:"modeladdButton",onClick:F(a,["prevent"])},"Add Model",8,_i)]),n("div",Ci,[(I(!0),T(Ae,null,ke(f(e).siteProInfo.models,(d,m)=>(I(),T("div",xi,[n("div",Si,[Mi,n("span",Ai,le(d.name),1)]),n("div",Ii,[n("button",{class:"modelRemove",onClick:F(M=>r(m),["prevent"])},Pi,8,Ti),n("button",{class:"modelGo",onClick:M=>o(d)},zi,8,ki)])]))),256))])]))}},Oi=Yt(Di,[["__scopeId","data-v-4e593a05"]]),ae=x=>(on("data-v-cafdfe90"),x=x(),sn(),x),$i={key:0},Ri={class:"locationInfo"},Zi={class:"locInputField"},Ui={key:0},Bi=ae(()=>n("label",{for:"mainstart-select"},"Select a MainStart Location: ",-1)),Fi=["value"],Ni={style:{display:"flex","justify-content":"space-between",width:"450px","padding-top":"10px"}},Xi=["onClick"],Vi=ae(()=>n("div",{class:"locationsFilter"},[n("div",null,"Locations"),n("div",null,"Date Added"),n("div",null,"ASC")],-1)),ji=ae(()=>n("div",{class:"locSpaceBar"},[n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"500",height:"1",viewBox:"0 0 550 1",fill:"none"},[n("path",{opacity:"0.2",d:"M0 0H550V1H0V0Z",fill:"#F2F1ED"})])],-1)),Hi={class:"locationList"},qi={style:{display:"flex",gap:"0.5rem"}},Gi=["onClick"],Yi=ae(()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[n("rect",{width:"26",height:"26",rx:"4",fill:"#B46C26"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 8C20 7.44772 19.5523 7 19 7L17 7C16.4477 7 16 6.55228 16 6C16 5.44772 15.5523 5 15 5L11 5C10.4477 5 10 5.44772 10 6C10 6.55229 9.55228 7 9 7L7 7C6.44772 7 6 7.44772 6 8C6 8.55228 6.44772 9 7 9L7.00003 17.3333C7.00003 19.3584 8.64166 21 10.6667 21L15.3333 21C17.3584 21 19 19.3584 19 17.3333L19 9C19.5523 9 20 8.55228 20 8ZM10 11C10 10.4477 10.4477 10 11 10C11.5523 10 12 10.4477 12 11L12 17C12 17.5523 11.5523 18 11 18C10.4477 18 10 17.5523 10 17L10 11ZM15 10C14.4477 10 14 10.4477 14 11L14 17C14 17.5523 14.4477 18 15 18C15.5523 18 16 17.5523 16 17L16 11C16 10.4477 15.5523 10 15 10Z",fill:"white"})],-1)),Wi=[Yi],Ki={key:0,class:"locIconBtn"},Qi=ae(()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[n("rect",{width:"26",height:"26",rx:"4",fill:"#F19539"}),n("path",{d:"M18.874 11.2041L15.8067 14.5219L17.0049 18.5224C17.0958 18.8224 17.0254 19 16.8481 19C16.761 18.9956 16.6767 18.9683 16.6035 18.9209L13 16.8965L9.44051 18.918C9.36651 18.965 9.28187 18.9927 9.19437 18.9985C9.01572 18.9985 8.94536 18.8227 9.03326 18.521L10.1934 14.5219L7.126 11.2041C6.88435 10.8628 7 10.5844 7.3897 10.5844L10.8966 10.5625L12.6397 7.28276C12.7393 7.09526 12.8682 7 12.9997 7C13.1313 7 13.2604 7.09526 13.3597 7.28276L15.1029 10.5625L18.6097 10.5844C19 10.585 19.1157 10.8628 18.874 11.2041Z",fill:"white"})],-1)),Ji=[Qi],el=["onClick"],tl=ae(()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[n("rect",{opacity:"0.3",width:"26",height:"26",rx:"4",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.00537 18.0004V15.8573L13.363 10.4998L15.506 12.6428L10.1484 18.0004H8.00537Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.4346 9.42834L15.5489 8.31396C15.6484 8.21443 15.7665 8.13547 15.89
665 8.0816C16.0265 8.02773 16.1658 8 16.3065 8C16.4473 8 16.5866 8.02773 16.7166 8.0816C16.8466 8.13547 16.9647 8.21443 17.0642 8.31396L17.692 8.94181C17.7915 9.04127 17.8705 9.15937 17.9244 9.28937C17.9782 9.41936 18.006 9.55869 18.006 9.6994C18.006 9.84012 17.9782 9.97945 17.9244 10.1094C17.8705 10.2394 17.7915 10.3575 17.692 10.457L16.5776 11.5714L14.4346 9.42834Z",fill:"white"})],-1)),nl=[tl],ol=["onClick"],sl=ae(()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[n("rect",{opacity:"0.3",width:"26",height:"26",rx:"4",fill:"white"}),n("path",{d:"M11.5366 8.14941C11.493 8.1023 11.4401 8.06471 11.3813 8.039C11.3225 8.01329 11.259 8 11.1948 8C11.1306 8 11.0671 8.01329 11.0083 8.039C10.9495 8.06471 10.8966 8.1023 10.853 8.14941L10.1694 8.86621C10.0782 8.96287 10.0274 9.09072 10.0274 9.22363C10.0274 9.35654 10.0782 9.48445 10.1694 9.58112L13.4644 12.9863L10.1421 16.4199C10.0508 16.5167 10 16.6447 10 16.7778C10 16.9108 10.0508 17.0389 10.1421 17.1357L10.8257 17.8525C10.8695 17.8992 10.9225 17.9365 10.9813 17.9619C11.0401 17.9874 11.1034 18.0005 11.1675 18.0005C11.2316 18.0005 11.295 17.9874 11.3538 17.9619C11.4125 17.9365 11.4655 17.8992 11.5093 17.8525L15.8593 13.3447C15.9497 13.2473 15.9999 13.1193 15.9999 12.9863C15.9999 12.8534 15.9497 12.7254 15.8593 12.6279L11.5366 8.14941Z",fill:"white"})],-1)),al=[sl],il={key:0,class:"locPopOut"},ll={class:"locTitle"},rl=["onClick"],cl={class:"pills"},dl={class:"menu-container"},ul=["onClick"],pl={style:{display:"flex","align-items":"center"},width:"8",height:"12",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},hl=ae(()=>n("path",{d:"M4.46338 9.85059C4.50698 9.8977 4.55986 9.93529 4.61868 9.961C4.6775 9.98671 4.74098 10 4.80518 10C4.86937 10 4.93288 9.98671 4.9917 9.961C5.05052 9.93529 5.10337 9.8977 5.14697 9.85059L5.83057 9.13379C5.92179 9.03713 5.97263 8.90928 5.97263 8.77637C5.97263 8.64346 5.92179 8.51555 5.83057 8.41888L2.53558 5.01367L5.85788 1.58008C5.94916 1.48327 6 1.35529 6 1.22223C6 1.08917 5.94916 0.961129 5.85788 0.864319L5.17429 0.147522C5.13045 0.100804 5.0775 0.0635404 5.01871 0.0380859C4.95992 0.0126313 4.89655 -0.000488378 4.83249 -0.000488383C4.76843 -0.000488389 4.70503 0.0126313 4.64624 0.0380858C4.58745 0.0635403 4.53453 0.100804 4.49069 0.147522L0.140687 4.65527C0.0502858 4.75273 6.14827e-05 4.88074 6.14711e-05 5.01367C6.14595e-05 5.1466 0.0502858 5.27461 0.140686 5.37207L4.46338 9.85059Z",fill:"white"},null,-1)),ml=[hl],fl={style:{display:"flex","align-items":"center"},width:"8",height:"12",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},gl=ae(()=>n("path",{d:"M1.53662 0.149414C1.49302 0.1023 1.44014 0.0647104 1.38132 0.0390015C1.3225 0.0132926 1.25902 0 1.19482 0C1.13063 0 1.06712 0.0132926 1.0083 0.0390015C0.949481 0.0647104 0.896627 0.1023 0.853027 0.149414L0.169434 0.866211C0.0782118 0.962872 0.0273743 1.09072 0.0273743 1.22363C0.0273743 1.35654 0.0782118 1.48445 0.169434 1.58112L3.46442 4.98633L0.14212 8.41992C0.0508384 8.51673 0 8.64471 0 8.77777C0 8.91083 0.0508384 9.03887 0.14212 9.13568L0.825714 9.85248C0.869548 9.8992 0.922505 9.93646 0.981293 9.96191C1.04008 9.98737 1.10345 10.0005 1.16751 10.0005C1.23157 10.0005 1.29497 9.98737 1.35376 9.96191C1.41255 9.93646 1.46547 9.8992 1.50931 9.85248L5.85931 5.34473C5.94971 5.24727 5.99994 5.11926 5.99994 4.98633C5.99994 4.8534 5.94971 4.72538 5.85931 4.62793L1.53662 0.149414Z",fill:"white"},null,-1)),vl=[gl],wl=ae(()=>n("div",{class:"adminSpaceBar"},[n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"500",height:"1",viewBox:"0 0 550 1",fill:"none"},[n("path",{opacity:"0.2",d:"M0 0H550V1H0V0Z",fill:"#F2F1ED"})])],-1)),bl={key:0,class:"locPopOutInfo"},yl={key:0,class:"locInputField"},_l={for:"menu-select"},Cl=["onUpdate:modelValue","onChange"],xl=["value"],Sl={key:1},Ml={class:"locInputField"},Al=ae(()=>n("label",{for:"breakoutAirwalls"},"Breakout (Airwall Option)",-1)),Il=["onUpdate:modelValue","onChange"],Tl=ae(()=>n("option",{value:""},null,-1)),Ll=ae(()=>n("option",{value:"Ballrooms"},"Combined Rooms",-1)),Pl=ae(()=>n("option",{value:"Salons"},"Single Room",-1)),kl=[Tl,Ll,Pl],El={key:2,class:"locInputField"},zl={for:"complex-select"},Dl=["onUpdate:modelValue","onChange"],Ol=["value"],$l={class:"locInputField"},Rl=ae(()=>n("label",{for:"locations"},"Name",-1)),Zl=["onUpdate:modelValue","onInput"],Ul={class:"locInputField"},Bl=ae(()=>n("label",{for:"locations"},"Order",-1)),Fl=["onUpdate:modelValue","onInput"],Nl={class:"locInputField"},Xl=ae(()=>n("label",{for:"info"},"Space Info",-1)),Vl=["onUpdate:modelValue","onInput"],jl={class:"locInputField"},Hl=ae(()=>n("label",{for:"amenities"},"Amenities",-1)),ql=["onUpdate:modelValue","onInput"],Gl={class:"locInputField"},Yl=ae(()=>n("label",{for:"more-info"},"More info (optional)",-1)),Wl=["onUpdate:modelValue","onInput"],Kl={class:"locInputField"},Ql=ae(()=>n("label",{for:"pro-tip"},"Pro Tip (optional)",-1)),Jl=["onUpdate:modelValue","onInput"],er={class:"locInputField"},tr=ae(()=>
6n("label",{for:"menu-link-on-click"},"Room Fact Link",-1)),nr=["onUpdate:modelValue","onInput"],or={class:"locInputField"},sr=ae(()=>n("label",{for:"menu-link-on-click"},"Menu Link",-1)),ar=["onUpdate:modelValue","onInput"],ir={key:1,class:"locPopOutInfo"},lr={class:"locInputField"},rr={style:{display:"flex","flex-direction":"row","justify-content":"space-between","padding-top":"10px","padding-right":"10px"}},cr=["onClick"],dr=["onClick"],ur={style:{display:"flex","flex-direction":"row",gap:"0.5rem","align-items":"center"}},pr=["onClick"],hr=ae(()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[n("rect",{width:"26",height:"26",rx:"4",fill:"#B46C26"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 8C20 7.44772 19.5523 7 19 7L17 7C16.4477 7 16 6.55228 16 6C16 5.44772 15.5523 5 15 5L11 5C10.4477 5 10 5.44772 10 6C10 6.55229 9.55228 7 9 7L7 7C6.44772 7 6 7.44772 6 8C6 8.55228 6.44772 9 7 9L7.00003 17.3333C7.00003 19.3584 8.64166 21 10.6667 21L15.3333 21C17.3584 21 19 19.3584 19 17.3333L19 9C19.5523 9 20 8.55228 20 8ZM10 11C10 10.4477 10.4477 10 11 10C11.5523 10 12 10.4477 12 11L12 17C12 17.5523 11.5523 18 11 18C10.4477 18 10 17.5523 10 17L10 11ZM15 10C14.4477 10 14 10.4477 14 11L14 17C14 17.5523 14.4477 18 15 18C15.5523 18 16 17.5523 16 17L16 11C16 10.4477 15.5523 10 15 10Z",fill:"white"})],-1)),mr=[hr],fr=["onClick"],gr=ae(()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[n("rect",{opacity:"0.3",width:"26",height:"26",rx:"4",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.00537 18.0004V15.8573L13.363 10.4998L15.506 12.6428L10.1484 18.0004H8.00537Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.4346 9.42834L15.5489 8.31396C15.6484 8.21443 15.7665 8.13547 15.8965 8.0816C16.0265 8.02773 16.1658 8 16.3065 8C16.4473 8 16.5866 8.02773 16.7166 8.0816C16.8466 8.13547 16.9647 8.21443 17.0642 8.31396L17.692 8.94181C17.7915 9.04127 17.8705 9.15937 17.9244 9.28937C17.9782 9.41936 18.006 9.55869 18.006 9.6994C18.006 9.84012 17.9782 9.97945 17.9244 10.1094C17.8705 10.2394 17.7915 10.3575 17.692 10.457L16.5776 11.5714L14.4346 9.42834Z",fill:"white"})],-1)),vr=[gr],wr=["onClick"],br=pn('<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-cafdfe90><rect opacity="0.3" width="26" height="26" rx="4" fill="white" data-v-cafdfe90></rect><path fill-rule="evenodd" clip-rule="evenodd" d="M8.00537 21.0004V18.8573L13.363 13.4998L15.506 15.6428L10.1484 21.0004H8.00537Z" fill="white" data-v-cafdfe90></path><path fill-rule="evenodd" clip-rule="evenodd" d="M14.4346 12.4283L15.5489 11.314C15.6484 11.2144 15.7665 11.1355 15.8965 11.0816C16.0265 11.0277 16.1658 11 16.3065 11C16.4473 11 16.5866 11.0277 16.7166 11.0816C16.8466 11.1355 16.9647 11.2144 17.0642 11.314L17.692 11.9418C17.7915 12.0413 17.8705 12.1594 17.9244 12.2894C17.9782 12.4194 18.006 12.5587 18.006 12.6994C18.006 12.8401 17.9782 12.9795 17.9244 13.1094C17.8705 13.2394 17.7915 13.3575 17.692 13.457L16.5776 14.5714L14.4346 12.4283Z" fill="white" data-v-cafdfe90></path><path d="M3.52841 7V2.63636H4.05682V6.53125H6.08523V7H3.52841ZM8.20739 7.06818C7.89205 7.06818 7.62003 6.99858 7.39134 6.85938C7.16406 6.71875 6.98864 6.52273 6.86506 6.27131C6.7429 6.01847 6.68182 5.72443 6.68182 5.3892C6.68182 5.05398 6.7429 4.75852 6.86506 4.50284C6.98864 4.24574 7.16051 4.04545 7.38068 3.90199C7.60227 3.7571 7.8608 3.68466 8.15625 3.68466C8.3267 3.68466 8.49503 3.71307 8.66122 3.76989C8.82741 3.8267 8.97869 3.91903 9.11506 4.04688C9.25142 4.1733 9.36009 4.34091 9.44105 4.54972C9.52202 4.75852 9.5625 5.01562 9.5625 5.32102V5.53409H7.03977V5.09943H9.05114C9.05114 4.91477 9.0142 4.75 8.94034 4.60511C8.8679 4.46023 8.7642 4.34588 8.62926 4.26207C8.49574 4.17827 8.33807 4.13636 8.15625 4.13636C7.95597 4.13636 7.78267 4.18608 7.63636 4.28551C7.49148 4.38352 7.37997 4.51136 7.30185 4.66903C7.22372 4.8267 7.18466 4.99574 7.18466 5.17614V5.46591C7.18466 5.71307 7.22727 5.92259 7.3125 6.09446C7.39915 6.26491 7.51918 6.39489 7.67259 6.48438C7.82599 6.57244 8.00426 6.61648 8.20739 6.61648C8.33949 6.61648 8.45881 6.59801 8.56534 6.56108C8.6733 6.52273 8.76634 6.46591 8.84446 6.39062C8.92259 6.31392 8.98295 6.21875 9.02557 6.10511L9.51136 6.24148C9.46023 6.40625 9.37429 6.55114 9.2535
65 6.67614C9.13281 6.79972 8.98366 6.89631 8.80611 6.96591C8.62855 7.03409 8.42898 7.06818 8.20739 7.06818ZM11.6484 8.29545C11.4055 8.29545 11.1967 8.2642 11.022 8.2017C10.8473 8.14062 10.7017 8.05966 10.5852 7.95881C10.4702 7.85938 10.3786 7.75284 10.3104 7.6392L10.7109 7.35795C10.7564 7.41761 10.8139 7.4858 10.8835 7.5625C10.9531 7.64062 11.0483 7.7081 11.169 7.76491C11.2912 7.82315 11.451 7.85227 11.6484 7.85227C11.9126 7.85227 12.1307 7.78835 12.3026 7.66051C12.4744 7.53267 12.5604 7.33239 12.5604 7.05966V6.39489H12.5178C12.4808 6.45455 12.4283 6.52841 12.3601 6.61648C12.2933 6.70312 12.1967 6.78054 12.0703 6.84872C11.9453 6.91548 11.7763 6.94886 11.5632 6.94886C11.299 6.94886 11.0618 6.88636 10.8516 6.76136C10.6428 6.63636 10.4773 6.45455 10.3551 6.21591C10.2344 5.97727 10.174 5.6875 10.174 5.34659C10.174 5.01136 10.233 4.71946 10.3509 4.47088C10.4688 4.22088 10.6328 4.0277 10.843 3.89134C11.0533 3.75355 11.2962 3.68466 11.5717 3.68466C11.7848 3.68466 11.9538 3.72017 12.0788 3.79119C12.2053 3.8608 12.3018 3.94034 12.3686 4.02983C12.4368 4.1179 12.4893 4.19034 12.5263 4.24716H12.5774V3.72727H13.0632V7.09375C13.0632 7.375 12.9993 7.60369 12.8714 7.77983C12.745 7.95739 12.5746 8.08736 12.3601 8.16974C12.147 8.25355 11.9098 8.29545 11.6484 8.29545ZM11.6314 6.49716C11.8331 6.49716 12.0036 6.45099 12.1428 6.35866C12.282 6.26634 12.3878 6.13352 12.4602 5.96023C12.5327 5.78693 12.5689 5.57955 12.5689 5.33807C12.5689 5.10227 12.5334 4.89418 12.4624 4.71378C12.3913 4.53338 12.2862 4.39205 12.147 4.28977C12.0078 4.1875 11.8359 4.13636 11.6314 4.13636C11.4183 4.13636 11.2408 4.19034 11.0987 4.2983C10.9581 4.40625 10.8523 4.55114 10.7812 4.73295C10.7116 4.91477 10.6768 5.11648 10.6768 5.33807C10.6768 5.56534 10.7124 5.76634 10.7834 5.94105C10.8558 6.11435 10.9624 6.25071 11.103 6.35014C11.245 6.44815 11.4212 6.49716 11.6314 6.49716ZM14.9467 7.0767C14.7393 7.0767 14.5511 7.03764 14.3821 6.95952C14.2131 6.87997 14.0788 6.76562 13.9794 6.61648C13.88 6.46591 13.8303 6.28409 13.8303 6.07102C13.8303 5.88352 13.8672 5.73153 13.9411 5.61506C14.0149 5.49716 14.1136 5.40483 14.2372 5.33807C14.3608 5.27131 14.4972 5.22159 14.6463 5.18892C14.7969 5.15483 14.9482 5.12784 15.1001 5.10795C15.299 5.08239 15.4602 5.06321 15.5838 5.05043C15.7088 5.03622 15.7997 5.01278 15.8565 4.98011C15.9148 4.94744 15.9439 4.89062 15.9439 4.80966V4.79261C15.9439 4.58239 15.8864 4.41903 15.7713 4.30256C15.6577 4.18608 15.4851 4.12784 15.2536 4.12784C15.0135 4.12784 14.8253 4.1804 14.6889 4.28551C14.5526 4.39062 14.4567 4.50284 14.4013 4.62216L13.924 4.4517C14.0092 4.25284 14.1229 4.09801 14.2649 3.98722C14.4084 3.875 14.5646 3.79687 14.7337 3.75284C14.9041 3.70739 15.0717 3.68466 15.2365 3.68466C15.3416 3.68466 15.4624 3.69744 15.5987 3.72301C15.7365 3.74716 15.8693 3.79759 15.9972 3.87429C16.1264 3.95099 16.2337 4.06676 16.3189 4.22159C16.4041 4.37642 16.4467 4.58381 16.4467 4.84375V7H15.9439V6.55682H15.9183C15.8842 6.62784 15.8274 6.70384 15.7479 6.7848C15.6683 6.86577 15.5625 6.93466 15.4304 6.99148C15.2983 7.0483 15.1371 7.0767 14.9467 7.0767ZM15.0234 6.625C15.2223 6.625 15.3899 6.58594 15.5263 6.50781C15.6641 6.42969 15.7678 6.32884 15.8374 6.20526C15.9084 6.08168 15.9439 5.9517 15.9439 5.81534V5.35511C15.9226 5.38068 15.8757 5.40412 15.8033 5.42543C15.7322 5.44531 15.6499 5.46307 15.5561 5.47869C15.4638 5.4929 15.3736 5.50568 15.2855 5.51705C15.1989 5.52699 15.1286 5.53551 15.0746 5.54261C14.9439 5.55966 14.8217 5.58736 14.7081 5.62571C14.5959 5.66264 14.505 5.71875 14.4354 5.79403C14.3672 5.8679 14.3331 5.96875 14.3331 6.09659C14.3331 6.27131 14.3977 6.40341 14.527 6.4929C14.6577 6.58097 14.8232 6.625 15.0234 6.625ZM18.6941 7.06818C18.3873 7.06818 18.123 6.99574 17.9015 6.85085C17.6799 6.70597 17.5094 6.50639 17.3901 6.25213C17.2708 5.99787 17.2111 5.70739 17.2111 5.38068C17.2111 5.0483 17.2722 4.75497 17.3944 4.50071C17.5179 4.24503 17.6898 4.04545 17.91 3.90199C18.1316 3.7571 18.3901 3.68466 18.6855 3.68466C18.9157 3.68466 19.123 3.72727 19.3077 3.8125C19.4924 3.89773 19.6436 4.01705 19.7615 4.17045C19.8794 4.32386 19.9526 4.50284 19.981 4.70739H19.4782C19.4398 4.55824 19.3546 4.42614 19.2225 4.31108C19.0918 4.1946 18.9157 4.13636 18.6941 4.13636C18.498 4.13636 18.3262 4.1875 18.1784 4.28977C18.0321 4.39062 17.9178 4.53338 17.8354 4.71804C17.7544 4.90128 17.714 5.11648 17.714 5.36364C17.714 5.61648 17.7537 5.83665 17.8333 6.02415C17.9142 6.21165 18.0279 6.35724 18.1742 6.46094C18.3219 6.56463 18.4952 6.61648 18.6941 6.61648C18.8248 6.61648 18.9434 6.59375 19.0499 6.5483C19.1564 6.50284 19.2466 6.4375 19.3205 6.35227C19.3944 6.26705 19.4469 6.16477 19.4782 6.04545H19.981C19.9526 6.23864 19.8823 6.412
664 19.7701 6.56747C19.6593 6.72088 19.5123 6.84304 19.329 6.93395C19.1472 7.02344 18.9355 7.06818 18.6941 7.06818ZM21.04 8.22727C20.9547 8.22727 20.8787 8.22017 20.812 8.20597C20.7452 8.19318 20.699 8.1804 20.6735 8.16761L20.8013 7.72443C20.9235 7.75568 21.0314 7.76705 21.1252 7.75852C21.2189 7.75 21.302 7.7081 21.3745 7.63281C21.4483 7.55895 21.5158 7.43892 21.5769 7.27273L21.6706 7.01705L20.4604 3.72727H21.0059L21.9093 6.33523H21.9434L22.8468 3.72727H23.3922L22.003 7.47727C21.9405 7.64631 21.8631 7.78622 21.7708 7.89702C21.6784 8.00923 21.5712 8.09233 21.449 8.14631C21.3283 8.20028 21.1919 8.22727 21.04 8.22727Z" fill="white" data-v-cafdfe90></path></svg>',1),yr=[br],_r={key:0},Cr={style:{"font-size":"14px"}},xr=["onClick"],Sr=["onClick"],Mr=ae(()=>n("label",{for:"centerx"},"Left / Right",-1)),Ar=["onClick"],Ir=["onClick"],Tr=["onClick"],Lr=["onClick"],Pr=ae(()=>n("label",{for:"centery"},"Floor / Box Height",-1)),kr=["onClick"],Er=["onClick"],zr=["onClick"],Dr=["onClick"],Or=ae(()=>n("label",{for:"centerz"},"Up / Down",-1)),$r=["onClick"],Rr=["onClick"],Zr=["onClick"],Ur=["onClick"],Br=ae(()=>n("label",{for:"sizex"}," Width ",-1)),Fr=["onClick"],Nr=["onClick"],Xr=["onClick"],Vr=["onClick"],jr=ae(()=>n("label",{for:"size.z"}," Length",-1)),Hr=["onClick"],qr=["onClick"],Gr=["onClick"],Yr=["onClick"],Wr=ae(()=>n("label",{for:" orientation.yaw"}," Yaw",-1)),Kr=["onClick"],Qr=["onClick"],Jr={key:1},ec=["onClick"],tc=["onClick"],nc=["onClick"],oc={class:"boxButtons"},sc=["onClick"],ac=["onClick"],ic=["onClick"],lc=["src"],rc={key:2,class:"locPopOutInfo"},cc={class:"locInputField"},dc=ae(()=>n("label",{for:"cta-button-display-text"},"CTA Text",-1)),uc=["onUpdate:modelValue","onInput"],pc={class:"locInputField"},hc=ae(()=>n("label",{for:"cta-email-on-click"},"CTA Email",-1)),mc=["onUpdate:modelValue","onInput"],fc={class:"locInputField"},gc=ae(()=>n("label",{for:"cta-link-on-click"},"CTA Link",-1)),vc=["onUpdate:modelValue","onInput"],wc={class:"locCheckField"},bc=["onUpdate:modelValue","onChange"],yc=ae(()=>n("label",{for:"cta-link-newtab"},"CTA Link New tab",-1)),_c={class:"locCheckField"},Cc=["onUpdate:modelValue","onChange"],xc=ae(()=>n("label",{for:"cta-link-newtab"},"CTA Location OverRide",-1)),Sc={key:0,class:"ctaOverideBox"},Mc={class:"locInputField2"},Ac=ae(()=>n("label",{for:"cta-button-display-text"},"CTA Override dialog Text",-1)),Ic=["onUpdate:modelValue","onInput"],Tc={class:"locInputField3"},Lc={class:"locContactField"},Pc=["onUpdate:modelValue","onChange"],kc=pn('<option value="text" data-v-cafdfe90>text</option><option value="number" data-v-cafdfe90>number</option><option value="email" data-v-cafdfe90>email</option><option value="tel" data-v-cafdfe90>telephone</option><option value="date" data-v-cafdfe90>date</option>',5),Ec=[kc],zc=["onClick"],Dc=ae(()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[n("rect",{width:"26",height:"26",rx:"4",fill:"#B46C26"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 8C20 7.44772 19.5523 7 19 7L17 7C16.4477 7 16 6.55228 16 6C16 5.44772 15.5523 5 15 5L11 5C10.4477 5 10 5.44772 10 6C10 6.55229 9.55228 7 9 7L7 7C6.44772 7 6 7.44772 6 8C6 8.55228 6.44772 9 7 9L7.00003 17.3333C7.00003 19.3584 8.64166 21 10.6667 21L15.3333 21C17.3584 21 19 19.3584 19 17.3333L19 9C19.5523 9 20 8.55228 20 8ZM10 11C10 10.4477 10.4477 10 11 10C11.5523 10 12 10.4477 12 11L12 17C12 17.5523 11.5523 18 11 18C10.4477 18 10 17.5523 10 17L10 11ZM15 10C14.4477 10 14 10.4477 14 11L14 17C14 17.5523 14.4477 18 15 18C15.5523 18 16 17.5523 16 17L16 11C16 10.4477 15.5523 10 15 10Z",fill:"white"})],-1)),Oc=[Dc],$c={key:0,class:"form-group"},Rc={key:0,open:""},Zc={method:"dialog"},Uc=ae(()=>n("h2",null,"Add a custom field to space override contact",-1)),Bc=["onClick"],Fc={key:3,class:"locPopOutInfo"},Nc={class:"locInputField"},Xc=ae(()=>n("label",{for:"cvent-3d"},"CVENT 3D/Pin Link (requires a max set box)",-1)),Vc=["onUpdate:modelValue","onInput"],jc={class:"locInputField"},Hc=ae(()=>n("label",{for:"cvent-3d"},"CVENT FloorId",-1)),qc=["onUpdate:modelValue","onInput"],Gc={class:"locInputField"},Yc=ae(()=>n("label",{for:"cvent-3d"},"CVENT BuildingId",-1)),Wc=["onUpdate:modelValue","onInput"],Kc={class:"locInputField"},Qc=ae(()=>n("label",{for:"cvent-3d"},"CVENT RoomId",-1)),Jc=["onUpdate:modelValue","onInput"],ed={class:"locInputField"},td=ae(()=>n("label",{for:"cvent-3d"},"CVENT Floorplan Thumbnail",-1)),nd=["onUpdate:modelValue","onInput"],od={class:"locInputField"},sd=ae(()=>n("label",{for:"cvent-3d"},"CVENT Floorplan Download",-1)),ad=["onUpdate:modelValue","onInput"],id={style:{display:"flex","flex-direction":"row","justify-content":"space-between",width:"420px"}},ld=ae(()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[n("rect",{opacity:"0.3",width:"26",height:"26",rx:"4",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.00537 18.0004V15.8573L13.363 10.4998L15.506 12.6428L10.1484 18.0004H8.00537Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.4346 9.42834L15.5489 8.31396C15.6484 8.21443 15.7665 8.13547 15.89
665 8.0816C16.0265 8.02773 16.1658 8 16.3065 8C16.4473 8 16.5866 8.02773 16.7166 8.0816C16.8466 8.13547 16.9647 8.21443 17.0642 8.31396L17.692 8.94181C17.7915 9.04127 17.8705 9.15937 17.9244 9.28937C17.9782 9.41936 18.006 9.55869 18.006 9.6994C18.006 9.84012 17.9782 9.97945 17.9244 10.1094C17.8705 10.2394 17.7915 10.3575 17.692 10.457L16.5776 11.5714L14.4346 9.42834Z",fill:"white"})],-1)),rd=[ld],cd=ae(()=>n("div",{class:"adminSpaceBar"},[n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"500",height:"1",viewBox:"0 0 550 1",fill:"none"},[n("path",{opacity:"0.2",d:"M0 0H550V1H0V0Z",fill:"#F2F1ED"})])],-1)),dd={key:0},ud={for:"diagramType.label"},pd={class:"capItemDetails"},hd=["onUpdate:modelValue","onInput"],md=["onUpdate:modelValue","onInput"],fd=ae(()=>n("h3",null,"Max Sets Capacity Chart",-1)),gd=ae(()=>n("div",{class:"adminSpaceBar"},[n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"500",height:"1",viewBox:"0 0 550 1",fill:"none"},[n("path",{opacity:"0.2",d:"M0 0H550V1H0V0Z",fill:"#F2F1ED"})])],-1)),vd={class:"locListItem"},wd={style:{display:"flex",gap:"0.5rem"}},bd=["onClick"],yd=ae(()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[n("rect",{width:"26",height:"26",rx:"4",fill:"#B46C26"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 8C20 7.44772 19.5523 7 19 7L17 7C16.4477 7 16 6.55228 16 6C16 5.44772 15.5523 5 15 5L11 5C10.4477 5 10 5.44772 10 6C10 6.55229 9.55228 7 9 7L7 7C6.44772 7 6 7.44772 6 8C6 8.55228 6.44772 9 7 9L7.00003 17.3333C7.00003 19.3584 8.64166 21 10.6667 21L15.3333 21C17.3584 21 19 19.3584 19 17.3333L19 9C19.5523 9 20 8.55228 20 8ZM10 11C10 10.4477 10.4477 10 11 10C11.5523 10 12 10.4477 12 11L12 17C12 17.5523 11.5523 18 11 18C10.4477 18 10 17.5523 10 17L10 11ZM15 10C14.4477 10 14 10.4477 14 11L14 17C14 17.5523 14.4477 18 15 18C15.5523 18 16 17.5523 16 17L16 11C16 10.4477 15.5523 10 15 10Z",fill:"white"})],-1)),_d=[yd],Cd=["onClick"],xd=ae(()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[n("rect",{opacity:"0.3",width:"26",height:"26",rx:"4",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.00537 18.0004V15.8573L13.363 10.4998L15.506 12.6428L10.1484 18.0004H8.00537Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.4346 9.42834L15.5489 8.31396C15.6484 8.21443 15.7665 8.13547 15.8965 8.0816C16.0265 8.02773 16.1658 8 16.3065 8C16.4473 8 16.5866 8.02773 16.7166 8.0816C16.8466 8.13547 16.9647 8.21443 17.0642 8.31396L17.692 8.94181C17.7915 9.04127 17.8705 9.15937 17.9244 9.28937C17.9782 9.41936 18.006 9.55869 18.006 9.6994C18.006 9.84012 17.9782 9.97945 17.9244 10.1094C17.8705 10.2394 17.7915 10.3575 17.692 10.457L16.5776 11.5714L14.4346 9.42834Z",fill:"white"})],-1)),Sd=[xd],Md={class:"locListItem"},Ad={style:{display:"flex",gap:"0.5rem"}},Id=ae(()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[n("rect",{opacity:"0.3",width:"26",height:"26",rx:"4",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.00537 18.0004V15.8573L13.363 10.4998L15.506 12.6428L10.1484 18.0004H8.00537Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.4346 9.42834L15.5489 8.31396C15.6484 8.21443 15.7665 8.13547 15.8965 8.0816C16.0265 8.02773 16.1658 8 16.3065 8C16.4473 8 16.5866 8.02773 16.7166 8.0816C16.8466 8.13547 16.9647 8.21443 17.0642 8.31396L17.692 8.94181C17.7915 9.04127 17.8705 9.15937 17.9244 9.28937C17.9782 9.41936 18.006 9.55869 18.006 9.6994C18.006 9.84012 17.9782 9.97945 17.9244 10.1094C17.8705 10.2394 17.7915 10.3575 17.692 10.457L16.5776 11.5714L14.4346 9.42834Z",fill:"white"})],-1)),Td=[Id],Ld={key:0},Pd=["onClick"],kd=["onClick"],Ed=["onClick"],zd=["onClick"],Dd={key:1,class:"",style:{display:"flex","flex-direction":"column"}},Od=["onClick"],$d=ae(()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[n("rect",{opacity:"0.3",width:"26",height:"26",rx:"4",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.00537 18.0004V15.8573L13.363 10.4998L15.506 12.6428L10.1484 18.0004H8.00537Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.4346 9.42834L15.5489 8.31396C15.6484 8.21443 15.7665 8.13547 15.89
665 8.0816C16.0265 8.02773 16.1658 8 16.3065 8C16.4473 8 16.5866 8.02773 16.7166 8.0816C16.8466 8.13547 16.9647 8.21443 17.0642 8.31396L17.692 8.94181C17.7915 9.04127 17.8705 9.15937 17.9244 9.28937C17.9782 9.41936 18.006 9.55869 18.006 9.6994C18.006 9.84012 17.9782 9.97945 17.9244 10.1094C17.8705 10.2394 17.7915 10.3575 17.692 10.457L16.5776 11.5714L14.4346 9.42834Z",fill:"white"})],-1)),Rd=[$d],Zd={key:0,style:{padding:"15px"}},Ud=ae(()=>n("label",null,"Skip Set",-1)),Bd=["onChange","onUpdate:modelValue"],Fd=ae(()=>n("label",null,"Show in Large Room",-1)),Nd=["onChange","onUpdate:modelValue"],Xd=ae(()=>n("label",null,"Show in Small Room",-1)),Vd=["onChange","onUpdate:modelValue"],jd=ae(()=>n("label",null,"Aisle Horizontal",-1)),Hd=["onChange","onUpdate:modelValue"],qd=ae(()=>n("label",null,"Aisle Vertical",-1)),Gd=["onChange","onUpdate:modelValue"],Yd=ae(()=>n("label",null,"Column Per Block",-1)),Wd=["onChange","onUpdate:modelValue"],Kd=ae(()=>n("label",null,"Row Per Block",-1)),Qd=["onChange","onUpdate:modelValue"],Jd=ae(()=>n("label",null,"Object Space Horizontal",-1)),eu=["onChange","onUpdate:modelValue"],tu=ae(()=>n("label",null,"Object Space Vertical",-1)),nu=["onChange","onUpdate:modelValue"],ou=ae(()=>n("label",null,"Room Perimeter",-1)),su=["onChange","onUpdate:modelValue"],au=["onClick"],iu=["onClick"],lu={__name:"LocationAdmin2",setup(x){const e=Gt(),t=$s(),o=Nn(un,"spaces"),a=C("createdAt"),r=C("asc");s(),Kn(a,s),Kn(r,s);function s(){const Z=Rs(o,Zs(a.value,r.value));Xo(Z,j=>{e.spaceInfo=j.docs.map(i=>({...i.data(),id:i.id}))})}const c=qt(e.updateField,500);qt(e.updateAdminField,500),qt(e.updateMultiFields,500),C(!1);const d=C(!1),m=C(!1);C("");const M=C(!1);C(null),C(),C(""),C(""),C({}),C(""),C(""),C(""),C(""),C(""),C(""),C(!1),C(""),C(""),C(""),C(""),C([]),C(""),C({}),C();const u=C(),L=C(null);C("");const O=C(""),k=C(["dining","guest rooms","event space","amenities"]),w={width:1280,height:720},A={mattertags:!1,sweeps:!0};C(!0);const z=C([{name:"SMART BAR"},{name:"BOXES"},{name:"CTA"},{name:"CAPACITIES"}]);function G(){e.locMenuPillIndex<z.value.length-1?e.locMenuPillIndex=e.locMenuPillIndex+1:e.locMenuPillIndex=0,console.log("increment",e.locMenuPillIndex,"len",z.value.length)}function re(){e.locMenuPillIndex>0?e.locMenuPillIndex=e.locMenuPillIndex-1:e.locMenuPillIndex=z.value.length-1,console.log("decrement",e.locMenuPillIndex,"len",z.value.length)}const v=C(null),te=85,ge=xn(()=>e.locMenuPillIndex*te*.5);function $e(Z){e.locMenuPillIndex=Z,Fe()}function Fe(){const Z=z[e.locMenuPillIndex];if(Z&&v.value){const j=Z.getBoundingClientRect(),i=v.value.getBoundingClientRect();(j.left<i.left||j.right>i.right)&&(v.value.scrollLeft=Z.offsetLeft)}}C();async function ue(Z){await $([]);try{const j=await e.mpSdk.Renderer.takeScreenShot(w,A);O.value=j;const i=atob(j.split(",")[1]),l=j.split(",")[0].split(":")[1].split(";")[0],S=new ArrayBuffer(i.length),E=new Uint8Array(S);for(let y=0;y<i.length;y++)E[y]=i.charCodeAt(y);const D=new Blob([S],{type:l}),h=Pn(),g=Mn(h,`images/spacethumb/${Z}_thumb.jpg`);kn(g,D).on("state_changed",y=>{},y=>{console.error("Error uploading screenshot:",y)},async()=>{const y=await En(g);await e.updateField(Z,"thumb",y),console.log("Screenshot uploaded to Firebase Storage and URL saved to Firestore!")})}catch(j){console.error("Error capturing or uploading screenshot:",j)}}C(null),C(null),C(!1),C(),C(null),C(null),C(null),C(null),C(),xn(()=>e.siteProInfo.walls.filter(Z=>Z.model===e.selectedModel));function Ie(){console.log("box dimensions are:",t.diagramBox,"node is:",e.diagramtemplatenode)}function pe(){e.myBoxControl.inputs.mode="rotate",e.myBoxControl.inputs.showX=!1,e.myBoxControl.inputs.showY=!0,e.myBoxControl.inputs.showZ=!1}function Ye(){e.myBoxControl.inputs.mode="scale",e.myBoxControl.inputs.showX=!0,e.myBoxControl.inputs.showY=!0,e.myBoxControl.inputs.showZ=!0}function Ee(){e.myBoxControl.inputs.mode="translate",e.myBoxControl.inputs.showX=!0,e.myBoxControl.inputs.showY=!0,e.myBoxControl.inputs.showZ=!0}async function he(Z){if(t.editingArea=await t.defineArea(65280,.7),t.areaSubmitted=!1,await t.visualBox(t.editingArea.startX,t.editingArea.startZ,t.editingArea.endX,t.editingArea.endZ,t.editingArea.startY,t.editingArea.endY,!1,"0x00ff00",.85,{x:0,y:0,z:0,w:1}),t.editingArea.quat={x:e.diagramtemplatenode.quaternion.x,y:e.diagramtemplatenode.quaternion.y,z:e.diagramtemplatenode.quaternion.z,w:e.diagramtemplatenode.quaternion.w},t.editingArea.euler=Me(t.editingArea.quat.x,t.editingArea.quat.y,t.editingArea.quat.z,t.editingArea.quat.w),console.log("setting area",e.diagramtemplatenode,t.editingArea),await new Promise(i=>{const l=setInterval(()=>{t.areaSubmitted?(console.log("old area",t.editingArea,"diagramNode",e.diagramtemplatenode),console.log("box dimensions are:",e.diagramtemplatenode.scale,e.diagramtemplatenode.position),t.editingArea.startX=e.diagramtemplatenode.position.x-e.diagramtemplatenode.scale.x/2,t.editingArea.endX=e.diagramtemplatenode.position.x+e.diagramtemplatenode.scale.x/2,t.editingArea.startZ=e.diagramtemplatenode.position.z-e.diagramtemplatenode.scale.z/2,t.editingArea.endZ=e.diagramtemplatenode.position.z+e.diagramtemplatenode.scale.z/2,t.editingArea.widthX=Math.abs(t.editingArea.startX-t.editingArea.endX),t.editingArea.depthZ=Math.abs(t.editingArea.startZ-t.editingArea.endZ),t.editingArea.quat={x:e.diagramtemplatenode.quaternion.x,y:e.diagramtemplatenode.quaternion.y,z:e.diagramtemplatenode.quaternion.z,w:e.diagramtemplatenode.quaternion.w},console.log("new area",t.editingArea),clearInterval(l),i(!0)):console.log("interval update box")},500)}),t.areaSubmitted){await t.visualBox(t.editingArea.startX,t.editingArea.startZ,t.editingArea.endX,t.editingArea.endZ,t.editingArea.startY,t.editingArea.endY,!0,"0x00ff00",.5,t.editingArea.quat);let i=t.editingArea,l=!1;if(l=window.confirm("Is the area correct?  If not cancel and draw again."),l){e.controlBoxNode.stop(),e.myBoxControl.inputs.selection=null;let S=prompt("Pick a default direction to display, (N, S, E, W)","N"),E=window.confirm("Is the Ceiling Tall? Confirm to use Risers, cancel to skip risers.");const D=["N","S","E","W"];for(;!S;){const h=prompt("Pick a default direction to display, (N, S, E, W)","N");D.includes(h.toUpperCase())?S=h.toUpperCase():alert("Invalid direction. Please enter one of the following: N, S, E, W.")}console.log(`Area is correct and the default direction is: ${S}`),console.log("maxSetArea will be:",i),e.updateField(Z.id,"maxSetArea",i),e.updateField(Z.id,"maxSetDefaultDir",S),e.updateField(Z.id,"maxSetTallCeiling",E),i.widthX*i.depthZ*10.76391042,console.log("updated capacities",e.
6spaceInfo[e.selectedSpace].capacities)}else console.log("Area is not correct. Please draw again."),e.controlBoxNode.stop(),e.myBoxControl.inputs.selection=null;t.areaModal=!1,t.areaSubmitted=!1,e.showAdminPanel=!0}}async function q(Z){if(window.confirm("Are you sure you want to delete the Max Sets?")){let j=null,i={exhibit:Z.capacities.exhibit??null,theater:Z.capacities.theater??null,classroom2per6:Z.capacities.classroom2per6??null,banquet:Z.capacities.banquet??null,hollowSquare:Z.capacities.hollowSquare??null,rounds6:Z.capacities.rounds6??null,conference:Z.capacities.conference??null,uShape:Z.capacities.uShape??null,reception:Z.capacities.reception??null};e.updateField(Z.id,"capacities",i),e.updateField(Z.id,"maxSetArea",j)}}const Te=(Z,j)=>{if(!Z.setTemplate||!Z.setTemplate[j]){const i=t.setTemplates.find(l=>l.diagramType===j);Z.setTemplate||(Z.setTemplate={}),Z.setTemplate[j]=i?{...i,skipSet:!1}:{skipSet:!1,largeRoomType:!1,smallRoomType:!1,aisleHor:0,aisleVert:0,objSpaceHori:0,objSpaceVert:0,objPerBlockHori:0,objPerBlockVert:0,serPer:0}}return Z.setTemplate[j]},Re=C(1),ne=C();async function $(Z){let j=[];for(let l=0;l<Z.length;l++){Z[l].orientation||(Z[l].orientation={yaw:0,pitch:0,roll:0});let S=await e.mpSdk.Sensor.createSource(e.mpSdk.Sensor.SourceType.BOX,{center:{x:Z[l].center.x,y:Z[l].center.y,z:Z[l].center.z},size:{x:Z[l].size.x,y:Z[l].size.y,z:Z[l].size.z},orientation:{yaw:Z[l].orientation.yaw*-1,pitch:Z[l].orientation.pitch,roll:Z[l].orientation.roll}});console.log("box created",l,Z[l]),j.push(S)}const i=await e.mpSdk.Sensor.createSensor(e.mpSdk.Sensor.SensorType.CAMERA);console.log("sensor created",i),i.addSource(...j),i.showDebug(!0)}C(0),C(0),C(0);async function ee(){e.debugger=!e.debugger;const Z=await e.mpSdk.Model.getDetails();if(console.log("Model sid:"+Z.sid),e.debugger){let j=e.spaceInfo.filter(l=>l.space===Z.sid);console.log("filteredSpaces",j);let i=j.flatMap(l=>l.sourceBox);console.log("boxes",i),await $(i)}else await $([])}async function De(Z){window.confirm("Are you sure you want to remove this location?")&&await e.removeLocation(Z)}function Me(Z,j,i,l){const S=2*(l*Z+j*i),E=1-2*(Z*Z+j*j),D=Math.atan2(S,E),h=2*(l*j-i*Z);let g;Math.abs(h)>=1?g=Math.sign(h)*Math.PI/2:g=Math.asin(h);const p=g*-180/Math.PI,y=D*180/Math.PI,_=D*180/Math.PI;return{yaw:p,pitch:y,roll:_}}function je(Z,j,i){const l=Z*Math.PI/180,S=j*Math.PI/180,E=i*Math.PI/180,D=Math.cos(l*.5),h=Math.sin(l*.5),g=Math.cos(S*.5),p=Math.sin(S*.5),y=Math.cos(E*.5),_=Math.sin(E*.5),b=y*g*D+_*p*h,H=_*g*D-y*p*h,xe=y*p*D+_*g*h,de=y*g*h-_*p*D;return{qx:H,qy:xe,qz:de,qw:b}}async function We(Z){t.sourceAreaModal=!0,t.sourceArea=await t.defineArea("0x00ff00",.7),t.sourceSubmitted=!1;let j=t.sourceArea;if(j.endY=j.startY+4,await t.visualBox(t.sourceArea.startX,t.sourceArea.startZ,t.sourceArea.endX,t.sourceArea.endZ,j.startY,j.endY,!1,"0x00ff00",.85,{x:0,y:0,z:0,w:1}),t.sourceArea.quat={x:e.diagramtemplatenode.quaternion.x,y:e.diagramtemplatenode.quaternion.y,z:e.diagramtemplatenode.quaternion.z,w:e.diagramtemplatenode.quaternion.w},t.sourceArea.euler=Me(t.sourceArea.quat.x,t.sourceArea.quat.y,t.sourceArea.quat.z,t.sourceArea.quat.w),await new Promise(l=>{const S=setInterval(()=>{t.sourceSubmitted?(console.log("old area",t.sourceArea),console.log("box dimensions are:",e.diagramtemplatenode.scale,e.diagramtemplatenode.position),t.sourceArea.startX=e.diagramtemplatenode.position.x-e.diagramtemplatenode.scale.x/2,t.sourceArea.endX=e.diagramtemplatenode.position.x+e.diagramtemplatenode.scale.x/2,t.sourceArea.startZ=e.diagramtemplatenode.position.z-e.diagramtemplatenode.scale.z/2,t.sourceArea.endZ=e.diagramtemplatenode.position.z+e.diagramtemplatenode.scale.z/2,t.sourceArea.startY=e.diagramtemplatenode.position.y-e.diagramtemplatenode.scale.y/2,t.sourceArea.endY=e.diagramtemplatenode.position.y+e.diagramtemplatenode.scale.y/2,t.sourceArea.widthX=Math.abs(t.sourceArea.startX-t.sourceArea.endX),t.sourceArea.depthZ=Math.abs(t.sourceArea.startZ-t.sourceArea.endZ),t.sourceArea.quat={x:e.diagramtemplatenode.quaternion.x,y:e.diagramtemplatenode.quaternion.y,z:e.diagramtemplatenode.quaternion.z,w:e.diagramtemplatenode.quaternion.w},t.sourceArea.euler=Me(t.sourceArea.quat.x,t.sourceArea.quat.y,t.sourceArea.quat.z,t.sourceArea.quat.w),console.log("new area",t.sourceArea),clearInterval(S),l(!0)):console.log("interval update box")},500)}),t.sourceSubmitted){await t.visualBox(t.sourceArea.startX,t.sourceArea.startZ,t.sourceArea.endX,t.sourceArea.endZ,t.sourceArea.startY,t.sourceArea.endY,!0,"0x00ff00",.5,t.sourceArea.quat);let l=!1;l=window.confirm("Is the area correct?  If not cancel and draw again."),l?(be.value=!0,Z.push({center:{x:(t.sourceArea.endX+t.sourceArea.startX)/2,y:(t.sourceArea.endY+t.sourceArea.startY)/2,z:(t.sourceArea.endZ+t.sourceArea.startZ)/2},size:{x:t.sourceArea.widthX,y:t.sourceArea.endY-t.sourceArea.startY,z:t.sourceArea.depthZ},orientation:{yaw:t.sourceArea.euler.yaw,pitch:t.sourceArea.euler.pitch,roll:t.sourceArea.euler.roll}}),e.controlBoxNode.stop(),e.myBoxControl.inputs.selection=null,$(Z)):(console.log("Area is not correct. Please draw again."),e.controlBoxNode.stop(),e.myBoxControl.inputs.selection=null),t.sourceAreaModal=!1,t.sourceSubmitted=!1}console.log("source box",Z)}const ht=C(!1);async function _e(Z,j){ht.value=!0,u.value=j,$([]),Z[j]}async function V(Z,j){u.value=j,ht.value=!1,$([]);let i=Z[j];t.sourceAreaModal=!0,t.sourceArea.startX=i.center.x-i.size.x/2,t.sourceArea.startZ=i.center.z-i.size.z/2,t.sourceArea.startY=i.center.y-i.size.y/2,t.sourceArea.endX=i.center.x+i.size.x/2,t.sourceArea.endZ=i.center.z+i.size.z/2,t.sourceArea.endY=i.center.y+i.size.y/2,t.sourceArea.widthX=i.size.x,t.sourceArea.depthZ=i.size.z,t.sourceSubmitted=!1;let l=je(i.orientation.pitch,-i.orientation.yaw,i.orientation.roll);if(await t.visualBox(t.sourceArea.startX,t.sourceArea.startZ,t.sourceArea.endX,t.sourceArea.endZ,t.sourceArea.startY,t.sourceArea.endY,!1,"0x00ff00",.85,{x:l.qx,y:l.qy,z:l.qz,w:l.qw}),t.sourceArea.quat={x:e.diagramtemplatenode.quaternion.x,y:e.diagramtemplatenode.quaternion.y,z:e.diagramtemplatenode.quaternion.z,w:e.diagramtemplatenode.quaternion.w},t.sourceArea.euler=Me(t.sourceArea.quat.x,t.sourceArea.quat.y,t.sourceArea.quat.z,t.sourceArea.quat.w),await new Promise(E=>{const D=setInterval(()=>{t.sourceSubmitted?(console.log("old area",t.sourceArea),console.log("box dimensions are:",e.diagramtemplatenode.scale,e.diagramtemplatenode.position),t.sourceArea.startX=e.diagramtemplatenode.position.x-e.diagramtemplatenode.scale.x/2,t.sourceArea.endX=e.diagramtemplatenode.position.x+e.diagramtemplatenode.scale.x/2,t.sourceArea.startZ=e.diagramtemplatenode.position.z-e.diagramtemplatenode.scale.z/2,t.sourceArea.endZ=e.diagramtemplatenode.position.z+e.diagramtemplatenode.scale.z/2,t.sourceArea.startY=e.diagramtemplatenode.position.y-e.diagramtemplatenode.scale.y/2,t.sourceArea.endY=e.diagramtemplatenode.position.y+e.diagramtemplatenode.scale.y/2,t.sourceArea.widthX=Math.abs(t.sourceArea.startX-t.sourceArea.endX),t.sourceArea.depthZ=Math.abs(t.sourceArea.startZ-t.sourceArea.endZ),t.sourceArea.quat={x:e.diagramtemplatenode.quaternion.x,y:e.diagramtemplatenode.quaternion.y,z:e.diagramtemplatenode.quaternion.z,w:e.diagramtemplatenode.quaternion.w},t.sourceArea.euler=Me(t.sourceArea.quat.x,t.sourceArea.quat.y,t.sourceArea.quat.z,t.sourceArea.quat.w),console.log("new area",t.sourceArea),clearInterval(D),E(!0)):console.log("interval update box")},500)}),t.sourceSubmitted){e.controlBoxNode.stop(),e.myBoxControl.inputs.selection=null,await t.visualBox(t.sourceArea.startX,t.sourceArea.startZ,t.sourceArea.endX,t.sourceArea.endZ,t.sourceArea.startY,t.sourceArea.endY,!0,"0x00ff00",.5,t.sourceArea.quat);let E=!1;E=window.confirm("Is the area correct?  If not cancel and draw again."),E?(be.value=!0,Z[j]={center:{x:(t.sourceArea.endX+t.sourceArea.startX)/2,y:(t.sourceArea.endY+t.sourceArea.startY)/2,z:(t.sourceArea.endZ+t.sourceArea.startZ)/2},size:{x:t.sourceArea.widthX,y:t.sourceArea.endY-t.sourceArea.startY,z:t.sourceArea.depthZ},orientation:{yaw:t.sourceArea.euler.yaw,pitch:t.sourceArea.euler.pitch,roll:t.sourceArea.euler.roll}},e.controlBoxNode.stop(),e.myBoxControl.inputs.selection=null,$(Z)):(console.log("Area is not correct. Please draw again."),e.controlBoxNode.stop(),e.myBoxControl.inputs.selection=null),t.sourceAreaModal=!1,t.sourceSubmitted=!1}console.log("source box",Z)}function P(Z,j){Z.splice(j,1),console.log("source box",Z),$(Z)}function ye(Z){c(Z.id,"sourceBox",Z.sourceBox),be.value=!1,ht.value=!1}const be=C(!1);function Ce(){be.value?window.confirm("You did not save boxes, are you sure you want to leave?")&&(M.value=!1,e.selectedLocID=null,e.showStartPanel=!1):(M.value=!1,e.selectedLocID=null,e.showStartPanel=!1)}function fe(Z){console.log("space selected at: ",Z.id,Z.name),e.selectedLocID=Z.id}async function ze(){console.log("useZoomControl"),e.mpSdk&&(ne.value=await e.mpSdk.Camera.zoom.subscribe(function(Z){console.log("Current zoom2 is ",Z.level),Re.value=Z.level,console.log("Current zoom ref is ",Re.value)}),console.log("Current zoomL is ",Re.value))}function ce(){console.log("cancelZoomControl"),ne.value.cancel()}function kt(Z){e.selectedSpace=e.spaceInfo.findIndex(j=>j.id===Z),e.selectedModel=e.spaceInfo[e.selectedSpace].space,console.log("id, nav menu mode",Z,e.spaceInfo[e.selectedSpace].subCategory.toLowerCase()),e.spaceInfo[e.selectedSpace].subCategory&&e.spaceInfo[e.selectedSpace].subCategory.toLowerCase()==="salons"||e.spaceInfo[e.selectedSpace].breakoutAirwall&&e.spaceInfo[e.selectedSpace].breakoutAirwall.toLowerCase()==="salons"?e.currentMode="Salons":e.currentMode="Ballrooms",console.log("nav mode",e.currentMode),e.navToSpot(e.selectedSpace),console.log("space",e.selectedSpace,"sel model",e.selectedModel)}async function mt(){console.log(),e.updateAdminField("mainStart",e.siteProInfo.mainStart),e.updateAdminField("fallbackM",e.siteProInfo.mainStart.space),e.updateAdminField("fallbackStart",e.siteProInfo.mainStart.spaceStart)}const dt=C(!1),At=C(),zt=C();function oe(){let Z={name:At.value,type:zt.value};e.updateField(e.selectedLocID,`ctaLocOverForm.${At.value}`,Z),dt.value=!1}function Xt(Z,j){let i={...Z};delete i[j],e.updateField(e.selectedLocID,"ctaLocOverForm",i)}
6return(Z,j)=>f(e).isLoaded?(I(),T("div",$i,[n("div",Ri,[n("div",Zi,[f(e).siteProInfo.mainStart?(I(),T("label",Ui,"Selected: "+le(f(e).siteProInfo.mainStart.name),1)):W("",!0),Bi,R(n("select",{id:"mainstart-select","onUpdate:modelValue":j[0]||(j[0]=i=>f(e).siteProInfo.mainStart=i),onChange:j[1]||(j[1]=i=>mt())},[(I(!0),T(Ae,null,ke(f(e).spaceInfo,i=>(I(),T("option",{key:i,value:i},le(i.name),9,Fi))),128))],544),[[ot,f(e).siteProInfo.mainStart]])]),n("div",Ni,[M.value?W("",!0):(I(),T("button",{key:0,class:"addLocButton",onClick:j[2]||(j[2]=F((...i)=>f(e).addLocation&&f(e).addLocation(...i),["prevent"]))},"Add Location")),n("button",{class:"debugBtn",onClick:F(ee,["prevent"]),id:"debugger-btn"},"Boxes On/Off",8,Xi)]),Vi,ji,n("div",Hi,[(I(!0),T(Ae,null,ke(f(e).spaceInfo,i=>(I(),T("li",{class:"locListItem",key:i.id},[n("span",null,le(i.name),1),n("div",qi,[n("button",{class:"locIconBtn",onClick:F(l=>De(i.id),["prevent"])},Wi,8,Gi),f(e).selectedLocID===i.id?(I(),T("button",Ki,Ji)):W("",!0),n("button",{class:"locIconBtn",onClick:F(l=>fe(i),["prevent"])},nl,8,el),n("button",{class:"locIconBtn",onClick:F(l=>kt(i.id),["prevent"])},al,8,ol)]),f(e).selectedLocID===i.id?(I(),T("div",il,[n("div",ll,[n("span",null,le(i.name),1),Mt(),f(t).sourceAreaModal?W("",!0):(I(),T("button",{key:0,class:"removeButton",onClick:F(Ce,["prevent"])},"Close",8,rl))]),n("div",cl,[n("div",dl,[n("ul",{class:"menu-header-list",style:Vo([{"padding-left":"0px"},{transform:`translateX(-${f(ge)}px)`}])},[(I(!0),T(Ae,null,ke(z.value,(l,S)=>(I(),T("li",{key:S,class:An({active:S===f(e).locMenuPillIndex}),onClick:E=>$e(S)},le(l.name),11,ul))),128))],4)]),n("button",{class:"pillButton-left","aria-label":"prev",onClick:re},[(I(),T("svg",pl,ml))]),n("button",{class:"pillButton-right","aria-label":"next",onClick:G},[(I(),T("svg",fl,vl))])]),wl,f(e).locMenuPillIndex==0?(I(),T("div",bl,[f(t).sourceAreaModal?W("",!0):(I(),T("div",yl,[n("label",_l,"Select a Function Category Icon: ("+le(i.categoryIcon)+")",1),R(n("select",{id:"menu-select","onUpdate:modelValue":l=>i.categoryIcon=l,onChange:l=>f(c)(i.id,"categoryIcon",i.categoryIcon)},[(I(!0),T(Ae,null,ke(k.value,l=>(I(),T("option",{key:l,value:l},le(l),9,xl))),128))],40,Cl),[[ot,i.categoryIcon]])])),f(t).sourceAreaModal?W("",!0):(I(),T("div",Sl,[n("div",Ml,[Al,R(n("select",{id:"breakoutAirwalls","onUpdate:modelValue":l=>i.breakoutAirwall=l,onChange:l=>f(c)(i.id,"breakoutAirwall",i.breakoutAirwall)},kl,40,Il),[[ot,i.breakoutAirwall]])])])),f(t).sourceAreaModal?W("",!0):(I(),T("div",El,[n("label",zl,"Select a Complex: ("+le(i.complex)+")",1),R(n("select",{id:"complex-select","onUpdate:modelValue":l=>i.complex=l,onChange:l=>f(c)(i.id,"complex",i.complex)},[(I(!0),T(Ae,null,ke(f(e).siteProInfo.complex,l=>(I(),T("option",{key:l,value:l.name},le(l.name),9,Ol))),128))],40,Dl),[[ot,i.complex]])])),n("div",$l,[Rl,R(n("input",{id:"locations","onUpdate:modelValue":l=>i.name=l,onInput:l=>f(c)(i.id,"name",i.name),type:"text"},null,40,Zl),[[Q,i.name]])]),n("div",Ul,[Bl,R(n("input",{id:"locations","onUpdate:modelValue":l=>i.order=l,onInput:l=>f(c)(i.id,"order",i.order),type:"number"},null,40,Fl),[[Q,i.order]])]),n("div",Nl,[Xl,R(n("input",{id:"info","onUpdate:modelValue":l=>i.info=l,onInput:l=>f(c)(i.id,"info",i.info),type:"text"},null,40,Vl),[[Q,i.info]])]),n("div",jl,[Hl,R(n("textarea",{id:"amenities","onUpdate:modelValue":l=>i.amenities=l,onInput:l=>f(c)(i.id,"amenities",i.amenities)},null,40,ql),[[Q,i.amenities]])]),n("div",Gl,[Yl,R(n("input",{id:"more-info","onUpdate:modelValue":l=>i.moreInfo=l,onInput:l=>f(c)(i.id,"moreInfo",i.moreInfo),type:"text"},null,40,Wl),[[Q,i.moreInfo]])]),n("div",Kl,[Ql,R(n("input",{id:"pro-tip","onUpdate:modelValue":l=>i.proTip=l,onInput:l=>f(c)(i.id,"proTip",i.proTip),type:"text"},null,40,Jl),[[Q,i.proTip]])]),n("div",er,[tr,R(n("input",{id:"menu-link-on-click","onUpdate:modelValue":l=>i.roomFactLink=l,onInput:l=>f(c)(i.id,"roomFactLink",i.roomFactLink),type:"text"},null,40,nr),[[Q,i.roomFactLink]])]),n("div",or,[sr,R(n("input",{id:"menu-link-on-click","onUpdate:modelValue":l=>i.menuLink=l,onInput:l=>f(c)(i.id,"menuLink",i.menuLink),type:"text"},null,40,ar),[[Q,i.menuLink]])])])):W("",!0),f(e).locMenuPillIndex==1?(I(),T("div",ir,[n("div",lr,[n("label",null,"Current: "+le(i.space)+", sweepv1: "+le(i.sweep)+" sweepv2: "+le(i.sweep2)+" "+le(i.spaceStart),1),n("button",{onClick:j[3]||(j[3]=F(l
6=>f(e).showStartPanel=!0,["prevent"]))},"Set Starting Position")]),n("div",null,[n("div",rr,[f(t).sourceAreaModal?W("",!0):(I(),T("button",{key:0,class:"debugBtn",onClick:F(l=>$(i.sourceBox),["prevent"])},"Show Boxes",8,cr)),f(t).sourceAreaModal?W("",!0):(I(),T("button",{key:1,onClick:F(ee,["prevent"]),class:"debugBtn"},"Show All Boxes",8,dr))]),f(t).sourceAreaModal?W("",!0):(I(!0),T(Ae,{key:0},ke(i.sourceBox,(l,S)=>(I(),T("div",null,[n("div",ur,[n("p",null," Source: "+le(S),1),n("button",{onClick:F(E=>P(i.sourceBox,S),["prevent"]),class:"locIconBtn"},mr,8,pr),n("button",{onClick:F(E=>V(i.sourceBox,S),["prevent"]),class:"locIconBtn"},vr,8,fr),n("button",{onClick:F(E=>_e(i.sourceBox,S),["prevent"]),class:"locIconBtn"},yr,8,wr)]),S==u.value&&ht.value?(I(),T("div",_r,[n("button",{onClick:j[4]||(j[4]=F(E=>(u.value=null,ht.value=!1),["prevent"]))},"X"),n("p",Cr,le(l),1),n("ul",null,[n("button",{class:"sizeBtn",onClick:F(E=>(l.center.x-=10,$(i.sourceBox)),["prevent"])},"◀◀",8,xr),n("button",{class:"sizeBtn",onClick:F(E=>(l.center.x-=1,$(i.sourceBox)),["prevent"])},"◀",8,Sr),Mr,n("button",{class:"sizeBtn",onClick:F(E=>(l.center.x+=1,$(i.sourceBox)),["prevent"])},"▶",8,Ar),n("button",{class:"sizeBtn",onClick:F(E=>(l.center.x+=10,$(i.sourceBox)),["prevent"])},"▶▶",8,Ir)]),n("ul",null,[n("button",{class:"sizeBtn",onClick:F(E=>(l.center.y-=10,$(i.sourceBox)),["prevent"])},"Down",8,Tr),n("button",{class:"sizeBtn",onClick:F(E=>(l.center.y-=1,$(i.sourceBox)),["prevent"])},"Down",8,Lr),Pr,n("button",{class:"sizeBtn",onClick:F(E=>(l.center.y+=1,$(i.sourceBox)),["prevent"])},"Up",8,kr),n("button",{class:"sizeBtn",onClick:F(E=>(l.center.y+=10,$(i.sourceBox)),["prevent"])},"Up",8,Er)]),n("ul",null,[n("button",{class:"sizeBtn",onClick:F(E=>(l.center.z-=10,$(i.sourceBox)),["prevent"])},"▲▲",8,zr),n("button",{class:"sizeBtn",onClick:F(E=>(l.center.z-=1,$(i.sourceBox)),["prevent"])},"▲",8,Dr),Or,n("button",{class:"sizeBtn",onClick:F(E=>(l.center.z+=1,$(i.sourceBox)),["prevent"])},"▼",8,$r),n("button",{class:"sizeBtn",onClick:F(E=>(l.center.z+=10,$(i.sourceBox)),["prevent"])},"▼▼",8,Rr)]),n("ul",null,[n("button",{class:"sizeBtn",onClick:F(E=>(l.size.x-=10,$(i.sourceBox)),["prevent"])},"-10",8,Zr),n("button",{class:"sizeBtn",onClick:F(E=>(l.size.x-=1,$(i.sourceBox)),["prevent"])},"-1",8,Ur),Br,n("button",{class:"sizeBtn",onClick:F(E=>(l.size.x+=1,$(i.sourceBox)),["prevent"])},"+",8,Fr),n("button",{class:"sizeBtn",onClick:F(E=>(l.size.x+=10,$(i.sourceBox)),["prevent"])},"+++",8,Nr)]),n("ul",null,[n("button",{class:"sizeBtn",onClick:F(E=>(l.size.z-=10,$(i.sourceBox)),["prevent"])},"---",8,Xr),n("button",{class:"sizeBtn",onClick:F(E=>(l.size.z-=1,$(i.sourceBox)),["prevent"])},"-",8,Vr),jr,n("button",{class:"sizeBtn",onClick:F(E=>(l.size.z+=1,$(i.sourceBox)),["prevent"])},"+",8,Hr),n("button",{class:"sizeBtn",onClick:F(E=>(l.size.z+=10,$(i.sourceBox)),["prevent"])},"+++",8,qr)]),n("ul",null,[n("button",{class:"sizeBtn",onClick:F(E=>(l.orientation.yaw-=10,$(i.sourceBox)),["prevent"])},"---",8,Gr),n("button",{class:"sizeBtn",onClick:F(E=>(l.orientation.yaw-=1,$(i.sourceBox)),["prevent"])},"-",8,Yr),Wr,n("button",{class:"sizeBtn",onClick:F(E=>(l.orientation.yaw+=1,$(i.sourceBox)),["prevent"])},"+",8,Kr),n("button",{class:"sizeBtn",onClick:F(E=>(l.orientation.yaw+=10,$(i.sourceBox)),["prevent"])},"+++",8,Qr)])])):W("",!0)]))),256)),f(t).sourceAreaModal?(I(),T("div",Jr,[f(t).sourceAreaModal?(I(),T("button",{key:0,onClick:j[5]||(j[5]=F(l=>f(t).sourceSubmitted=!0,["prevent"]))},"Box Submit")):W("",!0),n("button",{onClick:F(Ye,["prevent"])},"S",8,ec),n("button",{onClick:F(Ee,["prevent"])},"T",8,tc),n("button",{onClick:F(pe,["prevent"])},"R",8,nc)])):W("",!0),n("div",oc,[f(t).sourceAreaModal?W("",!0):(I(),T("button",{key:0,onClick:F(l=>We(i.sourceBox),["prevent"])},"Add a Box",8,sc)),f(t).sourceAreaModal?W("",!0):(I(),T("button",{key:1,onClick:F(l=>ye(i),["prevent"])},"Save Boxes",8,ac)),f(t).sourceAreaModal?W("",!0):(I(),T("button",{key:2,onClick:F(l=>ue(i.id),["prevent"])}," Gen Thumb",8,ic))]),i.thumb&&!f(t).sourceAreaModal?(I(),T("img",{key:2,style:{"border-radius":"15px",height:"200px"},src:i.thumb,alt:"thumb"},null,8,lc)):W("",!0)])])):W("",!0),f(e).locMenuPillIndex==2?(I(),T("div",rc,[n("div",cc,[dc,R(n("input",{id:"cta-button-display-text","onUpdate:modelValue":l=>i.ctaText=l,onInput:l=>f(c)(i.id,"ctaText",i.ctaText),type:"text"},null,40,uc),[[Q,i.ctaText]])]),n("div",pc,[hc,R(n("input",{id:"cta-email-on-click","onUpdate:modelValue":l=>i.ctaEmail=l,onInput:l=>f(c)(i.id,"ctaEmail",i.ctaEmail),type:"text"},null,40,mc),[[Q,i.ctaEmail]])]),n("div",fc,[gc,R(n("input",{id:"cta-link-on-cl
6ick","onUpdate:modelValue":l=>i.ctaLink=l,onInput:l=>f(c)(i.id,"ctaLink",i.ctaLink),type:"text"},null,40,vc),[[Q,i.ctaLink]])]),n("div",wc,[R(n("input",{id:"cta-link-newtab","onUpdate:modelValue":l=>i.ctaNewTab=l,onChange:l=>f(c)(i.id,"ctaNewTab",i.ctaNewTab),type:"checkbox"},null,40,bc),[[Dt,i.ctaNewTab]]),yc]),n("div",_c,[R(n("input",{id:"cta-link-newtab","onUpdate:modelValue":l=>i.ctaLocOverride=l,onChange:l=>f(c)(i.id,"ctaLocOverride",i.ctaLocOverride),type:"checkbox"},null,40,Cc),[[Dt,i.ctaLocOverride]]),xc]),i.ctaLocOverride?(I(),T("div",Sc,[n("div",Mc,[Ac,R(n("textarea",{id:"cta-button-display-text","onUpdate:modelValue":l=>i.ctaOverRideDiaText=l,onInput:l=>f(c)(i.id,"ctaOverRideDiaText",i.ctaOverRideDiaText),type:"text"},null,40,Ic),[[Q,i.ctaOverRideDiaText]])]),(I(!0),T(Ae,null,ke(i.ctaLocOverForm,(l,S)=>(I(),T("div",Tc,[n("label",null,le(l.name),1),n("div",Lc,[R(n("select",{id:"cta-type-newtab","onUpdate:modelValue":E=>l.type=E,onChange:E=>f(c)(i.id,`ctaLocOverForm.${S}.type`,l.type)},Ec,40,Pc),[[ot,l.type]]),n("button",{class:"locIconBtn",onClick:F(E=>Xt(i.ctaLocOverForm,S),["prevent"])},Oc,8,zc)])]))),256)),i.ctaLocOverride?(I(),T("div",$c,[n("button",{onClick:j[6]||(j[6]=F(l=>dt.value=!0,["prevent"]))},"Add Custom Contact Field"),dt.value?(I(),T("div",Rc,[n("form",Zc,[Uc,n("div",null,[R(n("textarea",{"onUpdate:modelValue":j[7]||(j[7]=l=>At.value=l),placeholder:"Enter Field Name"},null,512),[[Q,At.value]]),R(n("textarea",{"onUpdate:modelValue":j[8]||(j[8]=l=>zt.value=l),placeholder:"Enter Field type (number, text, etc)"},null,512),[[Q,zt.value]])]),n("menu",null,[n("button",{type:"reset",onClick:j[9]||(j[9]=F(l=>dt.value=!1,["prevent"]))},"Cancel"),n("button",{type:"submit.prevent",onClick:F(oe,["prevent"])},"Confirm",8,Bc)])])])):W("",!0)])):W("",!0)])):W("",!0)])):W("",!0),f(e).locMenuPillIndex==3?(I(),T("div",Fc,[n("div",Nc,[Xc,R(n("input",{id:"cvent-3d","onUpdate:modelValue":l=>i.cvent3d=l,onInput:l=>f(c)(i.id,"cvent3d",i.cvent3d),type:"text"},null,40,Vc),[[Q,i.cvent3d]])]),n("div",jc,[Hc,R(n("input",{id:"cvent-3d","onUpdate:modelValue":l=>i.cventFloorId=l,onInput:l=>f(c)(i.id,"cventFloorId",i.cventFloorId),type:"text"},null,40,qc),[[Q,i.cventFloorId]])]),n("div",Gc,[Yc,R(n("input",{id:"cvent-3d","onUpdate:modelValue":l=>i.cventBuildingId=l,onInput:l=>f(c)(i.id,"cventBuildingId",i.cventBuildingId),type:"text"},null,40,Wc),[[Q,i.cventBuildingId]])]),n("div",Kc,[Qc,R(n("input",{id:"cvent-3d","onUpdate:modelValue":l=>i.cventRoomId=l,onInput:l=>f(c)(i.id,"cventRoomId",i.cventRoomId),type:"text"},null,40,Jc),[[Q,i.cventRoomId]])]),n("div",ed,[td,R(n("input",{id:"cvent-3d","onUpdate:modelValue":l=>i.cventFloorThumb=l,onInput:l=>f(c)(i.id,"cventFloorThumb",i.cventFloorThumb),type:"text"},null,40,nd),[[Q,i.cventFloorThumb]])]),n("div",od,[sd,R(n("input",{id:"cvent-3d","onUpdate:modelValue":l=>i.cventFloorDown=l,onInput:l=>f(c)(i.id,"cventFloorDown",i.cventFloorDown),type:"text"},null,40,ad),[[Q,i.cventFloorDown]])]),n("h3",id,[Mt(" Linkable Capacity Chart "),n("button",{class:"locIconBtn",onClick:j[10]||(j[10]=l=>(d.value=!d.value,m.value=!1))},rd)]),cd,d.value?(I(),T("div",dd,[n("div",null,[(I(!0),T(Ae,null,ke(f(e).diagramTypes,(l,S)=>(I(),T("div",{key:S,class:"capItem"},[n("label",ud,le(l.label),1),n("div",pd,[R(n("input",{type:"number",placeholder:"capacity","onUpdate:modelValue":E=>i.capacities[l.field]=E,onInput:E=>f(c)(i.id,`capacities.${l.field}`,i.capacities[l.field])},null,40,hd),[[Q,i.capacities[l.field]]]),R(n("input",{type:"text",placeholder:"room set link","onUpdate:modelValue":E=>i.capacities[l.linkField]=E,onInput:E=>f(c)(i.id,`capacities.${l.linkField}`,i.capacities[l.linkField])},null,40,md),[[Q,i.capacities[l.linkField]]])])]))),128))])])):W("",!0),fd,gd,n("div",null,[n("div",vd,[Mt(" Max Set Area: "),n("div",wd,[i.maxSetArea?(I(),T("button",{key:0,onClick:F(l=>q(i),["prevent"]),class:"locIconBtn"},_d,8,bd)):W("",!0),n("button",{onClick:F(l=>he(i),["prevent"]),class:"locIconBtn"},Sd,8,Cd)])]),n("div",Md,[Mt(" Edit Area Templates: "),n("div",Ad,[i.maxSetArea?(I(),T("button",{key:0,class:"locIconBtn",onClick:j[11]||(j[11]=l=>(m.value=!m.value,d.value=!1))},Td)):W("",!0)])]),f(t).areaModal?(I(),T("div",Ld,[Mt(" Area Modal "),n("button",{onClick:j[12]||(j[12]=F(l=>f(t).areaSubmitted=!0,["prevent"]))},"Save Area"),n("div",null,[n("button",{onClick:F(Ye,["prevent"])},"S",8,Pd),n("button",{onClick:F(Ee,["prevent"])},"T",8,kd),n("button",{onClick:F(pe,["prevent"])},"R",8,Ed),n("button",{onClick:F(Ie,["prevent"])},"Log Box",8,zd)])])):W("",!0),m.value?(I(),T("div",Dd,[(I(!0),T(Ae,null,ke(f(t).setTemplates,(l,S)=>(I(),T("div",{key:S},[Mt(" SetType: "+le(l.diagramType)+" ",1),n("button",{class:"locIconBtn",onClick:E=>L.value=S},Rd,8,Od),L.value===S?(I(),T("div",Zd,[n("div",null,[Ud,R(n("input",{type:"checkbox",onChange:E=>f(c)(i.id,"setTemplate",i.setTemplate),"onUpdate:modelValue":E=>Te(i,l.diagramType).skipSet=E},null,40,Bd),[[Dt,Te(i,l.diagramType).skipSet]])]),n("div",null,[Fd,R(n("input",{type:"checkbox",onChange:E=>f(c)(i.id,"setTemplate",i.setTemplate),"onUpdate:modelValue":E=>Te(i,l.diagramType).largeRoomType=E},null,40,Nd),[[Dt,Te(i,l.diagramType).largeRoomType]])]),n("div",null,[Xd,R(n("input",{type:"checkbox",onChange:E=>f(c)(i.id,"setTemplate",i.setTemplate),"onUpdate:modelValue":E=>Te(i,l.diagramType).smallRoomType=E},null,40,Vd),[[Dt,Te(i,l.diagramType).smallRoomType]])]),n("div",null,[jd,R(n("input",{type:"number",onChange:E=>f(c)(i.id,"setTemplate",i.setTemplate),"onUpdate:modelValue":E=>Te(i,l.diagramType).aisleHor=E},null,40,Hd),[[Q,Te(i,l.diagramType).aisleHor]])]),n("div",null,[qd,R(n("input",{type:"number",onChange:E=>f(c)(i.id,"setTemplate",i.setTemplate),"onUpdate:modelValue":E=>Te(i,l.diagramType).aisleVert=E},null,40,Gd),[[Q,Te(i,l.diagramType).aisleVert]])]),n("div",null,[Yd,R(n("input",{type:"number",onChange:E=>f(c)(i.id,"setTemplate",i.setTemplate),"onUpdate:modelValue":E=>Te(i,l.diagramType).objPerBlockVert=E},null,40,Wd),[[Q,Te(i,l.diagramType).objPerBlockVert]])]),n("div",null,[Kd,R(n("input",{type:"number",onChange:E=>f(c)(i.id,"setTemplate",i.setTemplate),"onUpdate:modelValue":E=>Te(i,l.diagramType).objPerBlockHor=E},null,40,Qd),[[Q,Te(i,l.diagramType).objPerBlockHor]])]),n("div",null,[Jd,R(n("input",{type:"number",onChange:E=>f(c)(i.id,"setTemplate",i.setTemplate),"onUpdate:modelValue":E=>Te(i,l.diagramType).objSpaceHori=E},null,40,eu),[[Q,Te(i,l.diagramType).objSpaceHori]])]),n("div",null,[tu,R(n("input",{type:"number",onChange:E=>f(c)(i.id,"setTemplate",i.setTemplate),"onUpdate:modelValue":E=>Te(i,l.diagramType).objSpaceVert=E},null,40,nu),[[Q,Te(i,l.diagramType).objSpaceVert]])]),n("div",null,[ou,R(n("input",{type:"number",onChange:E=>f(c)(i.id,"setTemplate",i.setTemplate),"onUpdate:modelValue":E=>Te(i,l.diagramType).serPer=E},null,40,su),[[Q,Te(i,l.diagramType).serPer]])])])):W("",!0)]))),128))])):W("",!0)])])):W("",!0)])):W("",!0),f(e).showStartPanel?(I(),T("button",{key:1,class:"startLocZoom",onClick:F(ze,["prevent"])},"Set Zoom",8,au)):W("",!0),f(e).showStartPanel?(I(),T("button",{key:2,class:"startLocZoomCanc",onClick:F(ce,["prevent"])},"Cancel Zoom",8,iu)):W("",!0)]))),128))])])])):W("",!0)}},ru=Yt(lu,[["__scopeId","data-v-cafdfe90"]]);const Bt=x=>(on("data-v-30266023"),x=x(),sn(),x),cu={class:"airwall-info"},du={style:{display:"flex","flex-direction":"column",gap:"1rem"}},uu=Bt(()=>n("label",{for:"gltfUrl"},"Select Object:",-1)),pu=["value"],hu={style:{display:"flex","flex-direction":"row",gap:"1rem","justify-content":"start","align-items":"start"}},mu={style:{display:"flex","flex-direction":"column",gap:"1rem"}},fu=Bt(()=>n("label",{for:"servicePerimeter"},"Service Perimeter Inches:",-1)),gu={style:{display:"flex","flex-direction":"column",gap:"1rem"}},vu=pn('<label for="spaceBetweenBlocksHor" data-v-30266023> Aisle <svg fill="none" height="23" viewBox="0 0 31 23" width="31" xmlns="http://www.w3.org/2000/svg" data-v-30266023><g fill="#fff" data-v-30266023><path d="m30.7071 15.7071c.3905-.3905.3905-1.0237 0-1.4142l-6.364-6.36397c-.3905-.39052-1.0236-.39052-1.4142 0-.3905.39053-.3905 1.02369 0 1.41422l5.6569 5.65685-5.6569 5.6569c-.3905.3905-.3905 1.0236 0 1.4142.3906.3905 1.0237.3905 1.4142 0zm-29.7071.2929h29v-2h-29z" data-v-30266023></path><path d="m.292893 14.2929c-.3905241.3905-.3905241 1.0237 0 1.4142l6.363957 6.364c.39053.3905 1.02369.3905 1.41422 0 .39
6052-.3906.39052-1.0237 0-1.4142l-5.65686-5.6569 5.65686-5.65685c.39052-.39053.39052-1.02369 0-1.41422-.39053-.39052-1.02369-.39052-1.41422 0zm1.707107-.2929h-1v2h1z" data-v-30266023></path><path d="m11.7614 2.72727v7.27273h-.8807v-7.27273zm2.4902 3.99148v3.28125h-.8381v-5.45455h.8097v.85228h.071c.1279-.27699.322-.49953.5824-.66762.2604-.17045.5966-.25568 1.0085-.25568.3693 0 .6925.07576.9695.22727.277.14915.4924.37642.6463.68182.1539.30303.2308.68656.2308 1.15057v3.46591h-.8381v-3.40909c0-.4285-.1112-.76231-.3338-1.00142-.2225-.24148-.5279-.36222-.9162-.36222-.2675 0-.5066.058-.7173.17401-.2083.116-.3729.28527-.4936.50781s-.1811.49243-.1811.80966zm5.6223 3.33805c-.1752 0-.3255-.06272-.451-.18819-.1254-.12548-.1882-.27581-.1882-.451s.0628-.32552.1882-.45099c.1255-.12547.2758-.18821.451-.18821s.3256.06274.451.18821c.1255.12547.1882.2758.1882.45099 0 .11601-.0296.22254-.0887.31961-.0569.09706-.1338.17519-.2309.23437-.0947.05681-.2012.08521-.3196.08521z" data-v-30266023></path></g></svg></label>',1),wu={style:{display:"flex","flex-direction":"column",gap:"1rem"}},bu=pn('<label for="spaceBetweenBlocksVert" data-v-30266023> Aisle <svg width="24" height="29" viewBox="0 0 24 29" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-30266023><path d="M8.70711 0.790231C8.31658 0.399706 7.68342 0.399706 7.29289 0.790231L0.928932 7.15419C0.538408 7.54472 0.538408 8.17788 0.928932 8.56841C1.31946 8.95893 1.95262 8.95893 2.34315 8.56841L8 2.91155L13.6569 8.56841C14.0474 8.95893 14.6805 8.95893 15.0711 8.56841C15.4616 8.17788 15.4616 7.54472 15.0711 7.15419L8.70711 0.790231ZM9 25.0027L9 1.49734H7L7 25.0027H9Z" fill="white" data-v-30266023></path><path d="M7.29289 28.7071C7.68342 29.0976 8.31658 29.0976 8.70711 28.7071L15.0711 22.3431C15.4616 21.9526 15.4616 21.3195 15.0711 20.9289C14.6805 20.5384 14.0474 20.5384 13.6569 20.9289L8 26.5858L2.34315 20.9289C1.95262 20.5384 1.31946 20.5384 0.928932 20.9289C0.538408 21.3195 0.538408 21.9526 0.928932 22.3431L7.29289 28.7071ZM7 25V28H9V25H7Z" fill="white" data-v-30266023></path><path d="M11.7614 9.72727V17H10.8807V9.72727H11.7614ZM14.2516 13.7188V17H13.4135V11.5455H14.2232V12.3977H14.2942C14.4221 12.1207 14.6162 11.8982 14.8766 11.7301C15.137 11.5597 15.4732 11.4744 15.8851 11.4744C16.2544 11.4744 16.5776 11.5502 16.8546 11.7017C17.1316 11.8509 17.347 12.0781 17.5009 12.3835C17.6548 12.6866 17.7317 13.0701 17.7317 13.5341V17H16.8936V13.5909C16.8936 13.1624 16.7824 12.8286 16.5598 12.5895C16.3373 12.348 16.0319 12.2273 15.6436 12.2273C15.3761 12.2273 15.137 12.2853 14.9263 12.4013C14.718 12.5173 14.5534 12.6866 14.4327 12.9091C14.312 13.1316 14.2516 13.4015 14.2516 13.7188ZM19.8739 17.0568C19.6987 17.0568 19.5484 16.9941 19.4229 16.8686C19.2975 16.7431 19.2347 16.5928 19.2347 16.4176C19.2347 16.2424 19.2975 16.0921 19.4229 15.9666C19.5484 15.8411 19.6987 15.7784 19.8739 15.7784C20.0491 15.7784 20.1995 15.8411 20.3249 15.9666C20.4504 16.0921 20.5131 16.2424 20.5131 16.4176C20.5131 16.5336 20.4835 16.6402 20.4244 16.7372C20.3675 16.8343 20.2906 16.9124 20.1935 16.9716C20.0988 17.0284 19.9923 17.0568 19.8739 17.0568Z" fill="white" data-v-30266023></path></svg></label>',1),yu={style:{display:"flex","flex-direction":"column",gap:"1rem"}},_u=Bt(()=>n("label",{for:"spaceBetweenRow"}," Obj Space ",-1)),Cu={style:{display:"flex","flex-direction":"column",gap:"1rem"}},xu=Bt(()=>n("label",{for:"spaceBetweenColumn"}," Obj Space ",-1)),Su={style:{display:"flex","flex-direction":"column",gap:"1rem"}},Mu=Bt(()=>n("label",{for:"numObjInBlockVert"},"# Obj Vert:",-1)),Au={style:{display:"flex","flex-direction":"column",gap:"1rem"}},Iu=Bt(()=>n("label",{for:"numObjInBlockHor"},"# Obj Hori:",-1)),Tu={style:{display:"flex","flex-direction":"column",gap:"1rem"}},Lu=Bt(()=>n("label",{for:"numScreens"},"Num Screens:",-1)),Pu={id:"mobileToolBar"},ku=Bt(()=>n("div",{id:"spacerBarMobile"},null,-1)),Eu=["onClick"],zu=["onClick"],Du={id:"mobileToolBar2"},Ou=Bt(()=>n("div",{id:"spacerBarMobile"},null,-1)),$u={key:0,class:"modal"},Ru={class:"modal-content"},Zu=Bt(()=>n("h2",null,"Please select the direction",-1)),Uu={class:"modal-body"},Bu=["value"],Fu={__name:"AddMaxSetGroupsAuto",props:{space:Object,diagramType:String},setup(x){const e=x,t=Gt();Nn(un,"spaces");const o=qt(t.updateField,500);C(null),C(null);const a=C(!1),r=C(),s=C(null),c=C(null),d=C(null),m=C(null),M=C(),u=C([]),L=C(0),O
6=C(),k=C(),w=C([]),A=C([]);C([]),C([]);const z=C(0);C(5),C();const G=C(0);function re(){console.log("setting control"),G.value<3?G.value++:G.value=0,console.log("aircontrol",G.value),G.value===0||(G.value===1?k.value.inputs.mode="translate":G.value===2?k.value.inputs.mode="scale":G.value===3&&(k.value.inputs.mode="rotate")),console.log("mode",k.value.inputs.mode)}const v=C({name:"roundsOf6LOD2",url:"https://firebasestorage.googleapis.com/v0/b/selfwalksigniabonnetcreek.appspot.com/o/updatedDiagramAssets%2F003_SelfWalk_BasicRoundTable_Asset_LOD2.gltf?alt=media&token=e5335755-ab25-4065-832d-51e3dce062be",loader:"",tableType:"round",tableChairs:6,type:"",seats:0,size:{x:2.969,y:.749,z:2.995}});C(),C(),C(),C(),C(1),C(1);const te=C(24),ge=C(24),$e=C(24),Fe=C(24),ue=C(1),Ie=C(1),pe=C(0),Ye=C(0);C(0),C(5),C(-10);const Ee=C(0);C(0);function he(i,l,S,E,D,h,g,p){console.log("setting template"),pe.value=l,$e.value=S,Fe.value=E,te.value=D,ge.value=h,ue.value=g,Ie.value=p,v.value=t.diagramObjects.find(y=>y.name===i)}const q=C([]);class Te{constructor(l,S){this.path=l,this.node=S}onEvent(l){l.input.type=="hover",l.input.type=="unhover"||(l.input.type=="click"?console.log("Clicked emit"):l.input.type==="dragend"&&console.log("Drag ended"))}}const Re=C(null),ne=C([]),$=C([]),ee=C(null);async function De(i){console.log("showDiagramming",i,"props",e.space.capacities,"diagramType",e.diagramType),w.value=[];let l=[];if(t.diagrammingSceneObject)console.log("diagrammingSceneObject.stop()"),t.diagrammingSceneObject.stop(),t.diagrammingSceneObject=null,l.forEach(S=>S.cancel()),l=[];else{await t.mpSdk.Scene.registerComponents([{factory:no(t.mpSdk),name:"gltfType"}]),console.log("creating wallsceneobj"),t.diagrammingSceneObject=(await t.mpSdk.Scene.createObjects(1))[0],console.log("creating wallsceneobj");for(let D=0;D<i.length;D++){w.value[D]=t.diagrammingSceneObject.addNode();const h=i[D];w.value[D].obj3D.position.set(h.position.x,h.position.y,h.position.z),w.value[D].obj3D.scale.set(h.scale.x,h.scale.y,h.scale.z),h.quaternion&&w.value[D].obj3D.quaternion.set(h.quaternion.x,h.quaternion.y,h.quaternion.z,h.quaternion.w),w.value[D].model=h.model,w.value[D].rows=h.rows,w.value[D].columns=h.columns,w.value[D].width=h.width,w.value[D].depth=h.depth,w.value[D].rowSpace=h.rowSpace,w.value[D].boundingBox=h.boundingBox,w.value[D].colSpace=h.colSpace,w.value[D].diagramID=h.diagramID,w.value[D].url=h.url,w.value[D].loader=h.loader,w.value[D].type=h.type,w.value[D].seats=h.seats,w.value[D].size=h.size,O[D]={pos:w.value[D].obj3D.position,rot:w.value[D].obj3D.rotation,quat:w.value[D].obj3D.quaternion,scale:w.value[D].obj3D.scale},console.log("wall"+D,O[D]),console.log("registering gltf"),A[D]=w.value[D].addComponent(In,{url:h.url,type:h.type,seats:h.seats,tableChairs:h.tableChairs,tableType:h.tableType,size:h.size,width:h.width,depth:h.depth,rows:h.rows,columns:h.columns,boundingBox:h.boundingBox,rowSpace:h.rowSpace,colSpace:h.colSpace,diagramID:h.diagramID,loader:h.loader,materialColor:"white",materialColor2:"white"}),console.log("wallnodecomp",A[D]);const g=await t.diagrammingSceneObject.addEmitPath(A[D],"gltfevents"),p=t.diagrammingSceneObject.spyOnEvent(new Te(g,w.value[D]));l.push(p);const y=await t.diagrammingSceneObject.addEmitPath(A[D],"gltfevents","wallNodeComp_"+D);class _{constructor(){mn(this,"path",y)}onEvent(xe){console.log("click evnet12 log"),xe.input.type=="hover",xe.input.type=="unhover"&&console.log("userNavigationEnabled = true"),xe.input.type=="click"&&(console.log("click evnet log"),k.value.inputs.mode="translate",k.value.inputs.selection==null?(k.value.inputs.selection=w.value[D],Re.value=w.value[D].diagramID,console.log("selID",Re.value,w.value[D].diagramID),L.value=(w.value[D].obj3D.rotation.y*(180/Math.PI)).toFixed(2),z.value=D):(k.value.inputs.selection=null,t.inputComponent.inputs.userNavigationEnabled=!0))}}const b=t.diagrammingSceneObject.spyOnEvent(new _);l.push(b),console.log("registered gltf")}const S=t.diagrammingSceneObject.addNode();k.value=S.addComponent("mp.transformControls",{mode:"scale",selection:null,size:1}),t.diagrammingSceneObject.addNode().addComponent("mp.ambientLight",{intensity:1,color:{r:1,g:1,b:1}}),t.diagrammingSceneObject.start()}k.value.inputs.selection=null,G.value=0}async function Me(){We.value=[];let i=await fe("0x00ff00");console.log("area",i);for(let g=0;g<w.value.length;g++){const p=w.value[g];p.position.x>i.startX&&p.position.x<i.endX&&p.position.z>i.startZ&&p.position.z<i.endZ&&(ne.value.push(p.diagramID),$.value.push(p),We.value.push(p.diagramID))}Re.value=ne.value[0];let l=w.value.findIndex(g=>g.diagramID===ne.value[0]);console.log("index",l,Re.value,w.value[l],"selectedObject",ne.value[0]);let S=w.value[l],E=S.obj3D.position.clone(),D=S.obj3D.quaternion.clone();console.log("ogrot",D),k.value.inputs.selection=w.value[l],k.value.inputs.mode="translate",console.log("selectedObjects",ne.value),console.log("obj",w.value[l]),$.value.forEach(g=>{let p=w.value.findIndex(y=>y.diagramID===g.diagramID);console.log("index",p,g.diagramID,w.value[p],"comp",A[p]),A[p].inputs.boundingBox=!0,console.log("comp boundingbox",A[p])});function h(){let g=S.obj3D.position.x-E.x,p=S.obj3D.position.z-E.z,
6y=S.obj3D.quaternion.clone().multiply(D.clone().invert());$.value.forEach(_=>{if(_!==S){let b={x:_.obj3D.position.x-S.obj3D.position.x,z:_.obj3D.position.z-S.obj3D.position.z},H=new J(b.x,0,b.z);H.applyQuaternion(y),_.obj3D.position.x=S.obj3D.position.x+H.x+g,_.obj3D.position.z=S.obj3D.position.z+H.z+p,_.obj3D.quaternion.multiplyQuaternions(y,_.obj3D.quaternion)}}),E.copy(S.obj3D.position),D.copy(S.obj3D.quaternion),ee.value=requestAnimationFrame(h),console.log("updatePositions",ee.value)}ee.value=requestAnimationFrame(h)}async function je(){$.value.forEach(i=>{let l=w.value.findIndex(S=>S.diagramID===i.diagramID);A[l].inputs.boundingBox=!1}),Re.value=null,$.value=[],ne.value=[],We.value=[],k.value.inputs.selection=null,ee.value!==null&&(console.log("before cancelAnimationFrame",ee.value),cancelAnimationFrame(ee.value),console.log("after cancelAnimationFrame",ee.value),ee.value=null,console.log("finished cancelAnimationFrame",ee.value))}const We=C([]);async function ht(){await fe("0x808080",.7)}async function _e(i,l,S){if(window.confirm("Are you sure you want to delete this group?")){let E=e.diagramType;for(let D=0;D<We.value.length;D++){e.diagramType,u.value=[],q.value?u.value=q.value:u.value=[];let h=u.value.findIndex(g=>g.diagramID===We.value[D]);u.value.splice(h,1)}q.value=u.value,je(),dt(i,l,S),t.updateMaxSet(u.value,e.space.id,E),De(u.value),De(u.value)}}const V=C(!1),P=C("N"),ye=["N","S","E","W"],be=()=>{V.value=!1},Ce=()=>{console.log(P.value),be()};async function fe(i,l){return new Promise((S,E)=>{console.log("usernavigation: ",t.inputComponent.inputs.userNavigationEnabled),t.inputComponent.inputs.userNavigationEnabled=!1,console.log("usernavigation: ",t.inputComponent.inputs.userNavigationEnabled),console.log("nav disabled");let D=0,h=!1,g=!1;s.value=null,c.value=null,d.value=null,m.value=null,console.log("Intersection count:",D);const p=Kn(()=>t.showcaseClickCount,(_,b)=>{_>b&&(h||(a.value=!0,console.log("isDragging:",t.showcaseClickCount),console.log("DragPoint",r.value,"count",D)),h&&!g&&(g=!0,p(),console.log("isDragging stopped click watch:",t.showcaseClickCount)),h=!0)});r.value=t.mpSdk.Pointer.intersection.subscribe(_=>{if(h&&!g&&!s.value)console.log("Point 1 first:",_.position),s.value=_.position.x,c.value=_.position.z,y(s.value,c.value,_.position.x,_.position.z,!1,i,l);else if(h&&!g&&s.value)console.log("Point 1:",s.value,"Dragging Point 2:",_.position),y(s.value,c.value,_.position.x,_.position.z,!1,i,l);else if(h&&g&&!d.value){d.value=_.position.x,m.value=_.position.z,console.log("Point 1:",s.value,c.value,"Point 2:",d.value,m.value),r.value.cancel(),y(s.value,c.value,d.value,m.value,!0,i,l),t.inputComponent.inputs.userNavigationEnabled=!0,console.log("usernavigation: ",t.inputComponent.inputs.userNavigationEnabled);const b=m.value-c.value,H=d.value-s.value,xe=Math.atan2(b,H),de=Math.round(xe*(180/Math.PI)),U=Math.round(de/90)*90;console.log("normalizedAngle",U);let X={startX:s.value,startZ:c.value,endX:d.value,endZ:m.value,widthX:Math.abs(d.value-s.value),depthZ:Math.abs(m.value-c.value)};s.value<d.value?(X.startX=s.value,X.endX=d.value):(X.startX=d.value,X.endX=s.value),c.value<m.value?(X.startZ=c.value,X.endZ=m.value):(X.startZ=m.value,X.endZ=c.value),console.log("arealog",X),console.log("diagramtemplatenode1",t.diagramtemplatenode),console.log("diagramtemplatenode2",t.diagramtemplatenode),S(X)}});async function y(_,b,H,xe,de,U,X){await t.mpSdk.Scene.registerComponents([{factory:Us(t.mpSdk),name:Bs}]);try{t.diagramtemplateobject!=null&&(console.log("checking if obj null",t.diagramtemplateobject),t.diagramtemplateobject.stop(),t.diagramtemplateobject=null),t.diagramtemplateobject=(await t.mpSdk.Scene.createObjects(1))[0],t.diagramtemplatenode=await t.diagramtemplateobject.addNode(),console.log("trying to add box"),M.value=t.diagramtemplatenode.addComponent("mp.box",{width:Math.abs(H-_),height:.4,depth:Math.abs(xe-b),color:U,opacity:X??.3,localScale:{x:1,y:1,z:1},localPosition:{x:(H+_)/2,y:.1,z:(xe+b)/2},localRotation:{x:0,y:0,z:0}}),console.log("component added",t.diagramtemplatenode,M.value),t.diagramtemplateobject.start()}catch(se){console.error("Error adding box to Matterport scene:",se)}de&&(t.diagramtemplatenode.stop(),t.diagramtemplatenode=null)}})}async function ze(i,l,S,E,D,h){console.log("adding diagram with",i,l,S,E,D,"gltf val1",v.value);let g;E?g=mt(E):g=await fe("0x00ff00");let p=pe.value*.0254;console.log("serPer",p,pe.value,g,"area start",g.startX,g.startZ),g.startX=g.startX+p,g.startZ=g.startZ+p,g.endZ=g.endZ-p,g.endX=g.endX-p,console.log(g,"area with serPer",g.startX,g.startZ),console.log("area1",g,"square area",g.widthX*g.depth
6Z),g.widthX=Math.abs(g.startX-g.endX),g.depthZ=Math.abs(g.startZ-g.endZ),console.log("area2",g,"square area",g.widthX*g.depthZ),console.log("add diagram",i,l,S);let y=S,_=pt();console.log("diagramID",_),u.value=[],console.log("maxsetarray",q.value,"diagramset",u.value),q.value||(q.value=[]),q.value?u.value=q.value:u.value=[],console.log("maxsetarray2",q.value,"diagramset2",u.value);let b=g.startX,H=g.startZ;Ee.value*(Math.PI/180);let xe=g.widthX,de=g.depthZ;try{let U=ge.value*.0254,X=te.value*.0254,se=$e.value*.0254,K=Fe.value*.0254,B;D?B=D:B=prompt("Please enter the direction of the area (N, S, E, W)","N"),g.direction=B,console.log("area",g,"roomdir",D,"roomarea",E);let Rt,lt,Ke,Ze,an;console.log(g.direction),(g.direction=="N"||g.direction=="n")&&(Rt=new Ue().setFromAxisAngle(new J(0,1,0),-Math.PI/2),lt=v.value.size.z+U,Ze=v.value.size.x+X),(g.direction=="S"||g.direction=="s")&&(Rt=new Ue().setFromAxisAngle(new J(0,1,0),Math.PI/2),lt=v.value.size.z+U,Ze=v.value.size.x+X),(g.direction=="E"||g.direction=="e")&&(Rt=new Ue().setFromAxisAngle(new J(0,1,0),Math.PI),U=te.value*.0254,X=ge.value*.0254,se=Fe.value*.0254,K=$e.value*.0254,lt=v.value.size.x+U,Ze=v.value.size.z+X),(g.direction=="W"||g.direction=="w")&&(Rt=new Ue().setFromAxisAngle(new J(0,1,0),0),U=te.value*.0254,X=ge.value*.0254,se=Fe.value*.0254,K=$e.value*.0254,lt=v.value.size.x+U,Ze=v.value.size.z+X),(ue.value*lt>xe||Ie.value*Ze>de)&&console.log("Too many objects for the area");let tt=xe/(ue.value*lt+se),nt=de/(Ie.value*Ze+K),vt=tt-Math.floor(tt),wt=nt-Math.floor(nt),He=Math.max(1,xe/(ue.value*lt+se)),Ve=Math.max(1,de/(Ie.value*Ze+K));console.log("requested hori",ue.value,"blockCountHor",He,"blockCountVert",Ve,"remainHor",vt,"remainVert",wt),Ke=ue.value,an=Ie.value;let st=[];if(console.log("tableType",v.value.tableType),v.value.tableType=="roun
6d"||v.value.tableType=="classroom"||v.value.tableType=="crescent"||v.value.tableType=="theater")for(let N=0;N<Ve;N++)for(let Oe=0;Oe<He;Oe++)for(let Ne=0;Ne<an;Ne++)for(let ut=0;ut<Ke;ut++){let yt=Rt,_t=pt(),at={position:{x:ut*lt+se*Oe+Ke*lt*Oe+(b+lt/2),y:.05,z:Ne*Ze+K*N+an*Ze*N+(H+Ze/2)},scale:{x:1,y:1,z:1},quaternion:{x:yt.x,y:yt.y,z:yt.z,w:yt.w},boundingBox:!1,url:v.value.url,seats:v.value.seats,tableType:v.value.tableType,tableChairs:v.value.tableChairs,size:v.value.size,materialColor:"white",diagramID:_t};st.push(at),console.log("new params",at),at={}}if(v.value.tableType=="conference"||v.value.tableType=="ushape"||v.value.tableType=="hollowsquare"){let qe=function(me){if(me=="n"||me=="s")return me="e";if(me=="e"||me=="w")return me="n"},ft=function(me,Se,ve,Xe,Be,gt,rt,it,Ft,Tt,Lt){let we,Y,et=Xe+xe/2,Pe=Be+de/2;return ve==="n"||ve==="s"?(Be=Pe-Tt-v.value.size.x/2,Xe=Xe+Lt+xe/it/2+v.value.size.z/2,we=me*gt+(Xe+gt/2),Y=Se*rt+(Be+rt/2)):(Xe=et-Tt-v.value.size.x/2,Be=Be+Lt+de/Ft/2+v.value.size.z/2,we=me*gt+(Xe+gt/2),Y=Se*rt+(Be+rt/2)),{x:we,y:.05,z:Y}},It=function(me,Se,ve){let Xe,Be,gt;return(me==="n"||me==="s")&&(gt=de,Be=Math.floor(de/v.value.size.z)),(me==="e"||me==="w")&&(gt=xe,Be=Math.floor(xe/v.value.size.z)),v.value.tableType=="conference"&&((me==="n"||me==="s")&&(Xe=v.value.size.x/2),(me==="e"||me==="w")&&(Xe=-(v.value.size.x/2))),(v.value.tableType=="hollowsquare"||v.value.tableType=="ushape")&&(Xe=(v.value.size.z*Be-v.value.size.x)/2),console.log("tableOffset",me,Se,"oppTable",Be,"tableOpp",Math.floor(ve),Xe),Xe},N,Oe,Ne;switch(g.direction.toLowerCase()){case"n":Ne=new Ue().setFromAxisAngle(new J(0,1,0),-Math.PI/2),N=Math.floor(He-1),Oe=1;break;case"s":Ne=new Ue().setFromAxisAngle(new J(0,1,0),-Math.PI/2),N=Math.floor(He-1),Oe=1;break;case"e":Ne=new Ue().setFromAxisAngle(new J(0,1,0),Math.PI),N=1,Oe=Math.floor(Ve-1);break;case"w":Ne=new Ue().setFromAxisAngle(new J(0,1,0),Math.PI),N=1,Oe=Math.floor(Ve-1);break}let ut=new Ue().setFromAxisAngle(new J(0,1,0),-Math.PI/2),yt=new Ue().setFromAxisAngle(new J(0,1,0),Math.PI/2),_t=new Ue().setFromAxisAngle(new J(0,1,0),Math.PI),at=Ne.clone().multiply(_t),ln=Ne.clone().multiply(ut),rn=Ne.clone().multiply(yt);if(v.value.tableType=="conference")for(let me=0;me<Oe;me++)for(let Se=0;Se<N;Se++){console.log("conX",N,"conZ",Oe);const ve=ft(Se,me,g.direction.toLowerCase(),b,H,lt,Ze,N,Oe,-It(g.direction.toLowerCase(),!0,N),0);let Xe=pt(),Be={position:{x:ve.x,y:.05,z:ve.z},scale:{x:1,y:1,z:1},quaternion:{x:Ne.x,y:Ne.y,z:Ne.z,w:Ne.w},boundingBox:!1,url:v.value.url,seats:v.value.seats,tableType:v.value.tableType,tableChairs:v.value.tableChairs,size:v.value.size,materialColor:"white",diagramID:Xe};st.push(Be),console.log("new params",Be),Be={}}if(v.value.tableType=="conference")for(let me=0;me<Oe;me++)for(let Se=0;Se<N;Se++){const ve=ft(Se,me,g.direction.toLowerCase(),b,H,lt,Ze,N,Oe,It(g.direction.toLowerCase(),!0,N),0);let Xe=pt(),Be={position:{x:ve.x,y:.05,z:ve.z},scale:{x:1,y:1,z:1},quaternion:{x:at.x,y:at.y,z:at.z,w:at.w},boundingBox:!1,url:v.value.url,seats:v.value.seats,tableType:v.value.tableType,tableChairs:v.value.tableChairs,size:v.value.size,materialColor:"white",diagramID:Xe};st.push(Be),console.log("new params",Be),Be={}}if(v.value.tableType=="ushape"||v.value.tableType=="hollowsquare"){let Xe=function(we,Y,et){console.log("setPos",Y);let Pe,Ct;return(g.direction.toLowerCase()=="n"||g.direction.toLowerCase()=="s")&&(Y=="n"&&(Pe=b+(xe-Se*v.value.size.z)/2+we*v.value.size.z+v.value.size.z/2,Ct=H+de-(de-v.value.size.x-ve*v.value.size.z)/2+v.value.size.x/2),Y=="s"&&(Pe=b+(xe-Se*v.value.size.z)/2+we*v.value.size.z+v.value.size.z/2,Ct=H+(de-v.value.size.x-ve*v.value.size.z)/2+v.value.size.x/2),Y=="e"&&(Pe=b+v.value.size.x/2+(xe-Se*v.value.size.z)/2,Ct=H+(de-v.value.size.x-ve*v.value.size.z)/2+v.value.size.x/2+v.value.size.x/2+v.value.size.z/2+we*v.value.size.z),Y=="w"&&(Pe=b+xe-v.value.size.x/2-(xe-Se*v.value.size.z)/2,Ct=H+(de-v.value.size.x-ve*v.value.size.z)/2+v.value.size.x/2+v.value.size.x/2+v.value.size.z/2+we*v.value.size.z)),(g.direction.toLowerCase()=="e"||g.direction.toLowerCase()=="w")&&(Y=="n"&&(Pe=b+(xe-Se*v.value.size.z)/2+we*v.value.size.z+v.value.size.z/2,Ct=H+de-(de-v.value.size.x-ve*v.value.size.z)/2+v.value.size.x/2),Y=="s"&&(Pe=b+(xe-Se*v.value.size.z)/2+we*v.value.size.z+v.value.size.z/2,Ct=H+(de-v.value.size.x-ve*v.value.size.z)/2+v.value.size.x/2),Y=="e"&&(Pe=b+v.value.size.x/2+(xe-Se*v.value.size.z)/2,Ct=H+(de-v.value.size.x-ve*v.value.size.z)/2+v.value.size.x/2+v.value.size.x/2+v.value.size.z/2+we*v.value.size.z),Y=="w"&&(Pe=b+xe-v.value.size.x/2-(xe-Se*v.value.size.z)/2,Ct=H+(de-v.value.size.x-ve*v.value.size.z)/2+v.value.size.x/2+v.value.size.x/2+v.value.size.z/2+we*v.value.size.z)),{x:Pe,y:.05,z:Ct}},Be=function(we){let Y=we;if(Y=="n")return Y="s",Y;if(Y=="e")return Y="w",Y;if(Y=="s")return Y="n",Y;if(Y=="w")return Y="e",Y;console.log("settingDir180",Y)},gt=function(we){let Y=we;if(Y=="n")return Y="e",Y;if(Y=="e")return Y="s",Y;if(Y=="s")return Y="w",Y;if(Y=="w")return Y="n",Y;console.log("settingDir90",Y)},rt=function(we){let Y=we;if(Y=="n")return Y="w",Y;if(Y=="w")return Y="s",Y;if(Y=="s")return Y="e",Y;if(Y=="e")return Y="n",Y},me,Se,ve;v.value.tableType=="ushape"?me=3:me=4,(g.direction.toLowerCase()=="n"||g.direction.toLowerCase()=="s")&&(Se=Math.floor(xe/v.value.size.z)-1,ve=Math.floor((de-v.value.size.x)/v.value.size.z)-1,console.log("dir n/s","numX, numZ",Se,ve)),(g.direction.toLowerCase()=="e"||g.direction.toLowerCase()=="w")&&(Se=Math.floor(xe/v.value.size.z)-1,ve=Math.floor((de-v.value.size.x)/v.value.size.z)-1,console.log("dir e/w","numX, numZ",Se,ve));let it,Ft,Tt,Lt;(g.direction.toLowerCase()=="n"||g.direction.toLowerCase()=="s")&&(it=Se,Lt=Se,Ft=ve,Tt=ve),(g.direction.toLowerCase()=="w"||g.direction.toLowerCase()=="e")&&(it=ve,Lt=ve,Ft=Se,Tt=Se),(g.direction.toLowerCase()=="s"||g.direction.toLowerCase()=="w")&&(Ne=Ne.clone().multiply(_t),at=Ne.clone().multiply(_t),ln=Ne.clone().multiply(ut),rn=Ne.clone().multiply(yt));for(let we=0;we<it;we++){let Y=pt(),et=Xe(we,g.direction.toLowerCase()),Pe={position:{x:et.x,y:.05,z:et.z},scale:{x:1,y:1,z:1},quaternion:{x:Ne.x,y:Ne.y,z:Ne.z,w:Ne.w},boundingBox:!1,url:v.value.url,seats:v.value.seats,tableType:v.value.tableType,tableChairs:v.value.tableChairs,size:v.value.size,materialColor:"white",diagramID:Y};st.push(Pe),console.log("new params",Pe),Pe={}}for(let we=0;we<Ft;we++){let Y=pt(),et=Xe(we,rt(g.direction.toLowerCase())),Pe={position:{x:et.x,y:.05,z:et.z},scale:{x:1,y:1,z:1},quaternion:{x:rn.x,y:rn.y,z:rn.z,w:rn.w},boundingBox:!1,url:v.value.url,seats:v.value.seats,tableType:v.value.tableType,tableChairs:v.value.tableChairs,size:v.value.size,materialColor:"white",diagramID:Y};st.push(Pe),console.log("new params",Pe),Pe={}}for(let we=0;we<Tt;we++){let Y=pt(),et=Xe(we,gt(g.direction.toLowerCase())),Pe={position:{x:et.x,y:.05,z:et.z},scale:{x:1,y:1,z:1},quaternion:{x:ln.x,y:ln.y,z:ln.z,w:ln.w},boundingBox:!1,url:v.value.url,seats:v.value.seats,tableType:v.value.tableType,tableChairs:v.value.tableChairs,size:v.value.size,materialColor:"white",diagramID:Y};st.push(Pe),console.log("new params",Pe),Pe={}}if(v.value.tableType=="hollowsquare")for(let we=0;we<Lt;we++){let Y=pt(),et=Xe(we,Be(g.direction.toLowerCase())),Pe={position:{x:et.x,y:.05,z:et.z},scale:{x:1,y:1,z:1},quaternion:{x:at.x,y:at.y,z:at.z,w:at.w},boundingBox:!1,url:v.value.url,seats:v.value.seats,tableType:v.value.tableType,tableChairs:v.value.tableChairs,size:v.value.size,materialColor:"white",diagramID:Y};st.push(Pe),console.log("new params",Pe),Pe={}}}}console.log("overflowArray",st,"area",g);for(let N=st.length-1;N>=0;N--){let Oe=st[N].position;(Oe.x>g.startX+g.widthX||Oe.z>g.startZ+g.depthZ||Oe.x<g.startX||Oe.z<g.startZ)&&(console.log("splicing because overflow","pos x",Oe.x,">",g.startX+g.widthX," or pos z",Oe.z,">",g.startZ+g.depthZ,"or pos.x",Oe.x,"<",g.startX,"or pos.z",Oe.z,"<",g.startZ),st.splice(N,1))}st.forEach(N=>{u.value.push(N)});for(let N=u.value.length-1;N>=0;N--)if(u.value[N].tableChairs>0){let Oe={name:"grayChairLOD2",url:"https://firebasestorage.googleapis.com/v0/b/selfwalksigniabonnetcreek-dev.appspot.com/o/Chair2020.glb?alt=media&token=2567ce39-24dc-486e-a62d-e88652e2afbc",loader:"",tableType:"",tableChairs:0,type:"",seats:1,size:{x:.608,y:.983,z:.506}},Ne=u.value[N].position.x,ut=u.value[N].position.y,yt=u.value[N].position.z,_t=u.value[N].tableChairs,at=(u.value[N].size.x+Oe.size.x)/1.95,ln=u.value[N].size.x,rn=u.value[N].size.z;
6if(u.value[N].tableType=="round"&&!u.value[N].tableID)for(let qe=0;qe<u.value[N].tableChairs;qe++){let ft={name:"grayChairLOD2",url:"https://firebasestorage.googleapis.com/v0/b/selfwalksigniabonnetcreek-dev.appspot.com/o/Chair2020.glb?alt=media&token=2567ce39-24dc-486e-a62d-e88652e2afbc",loader:"",tableType:"",tableChairs:0,type:"",seats:1,size:{x:.608,y:.983,z:.506}},It=pt(),me=-2*Math.PI/_t*qe,Se=2*Math.PI/_t*qe,ve=new Ue().setFromAxisAngle(new J(0,1,0),Se),Xe={position:{x:Ne+at*Math.cos(me),y:u.value[N].position.y,z:yt+at*Math.sin(me)},scale:{x:1,y:1,z:1},quaternion:{x:ve.x,y:ve.y,z:ve.z,w:ve.w},boundingBox:!1,url:ft.url,seats:ft.seats,tableType:ft.tableType,tableChairs:ft.tableChairs,tableID:u.value[N].diagramID,size:ft.size,materialColor:"white",diagramID:It};u.value.push(Xe),Xe={}}if(u.value[N].tableType=="classroom"&&!u.value[N].tableID){let qe=Rt,ft=Ee.value*(Math.PI/180),It=u.value[N].size.z,me=u.value[N].size.x,Se=u.value[N].position.x,ve=u.value[N].position.z,Xe={name:"grayChairLOD2",url:"https://firebasestorage.googleapis.com/v0/b/selfwalksigniabonnetcreek-dev.appspot.com/o/Chair2020.glb?alt=media&token=2567ce39-24dc-486e-a62d-e88652e2afbc",loader:"",tableType:"",tableChairs:0,type:"",seats:1,size:{x:.608,y:.983,z:.506}},Be=u.value[N].tableChairs,gt=me/1.25;for(let rt=0;rt<u.value[N].tableChairs;rt++){let it={name:"grayChairLOD2",url:"https://firebasestorage.googleapis.com/v0/b/selfwalksigniabonnetcreek-dev.appspot.com/o/Chair2020.glb?alt=media&token=2567ce39-24dc-486e-a62d-e88652e2afbc",loader:"",tableType:"",tableChairs:0,type:"",seats:1,size:{x:.608,y:.983,z:.506}},Ft=pt(),Tt,Lt,we=(It-it.size.x*Be)/Be,Y=it.size.x,et=Y/2+we/2,Pe=et+rt*Y+we;switch(rt==0&&(Pe=et+rt*Y+we/2),rt==u.value[N].tableChairs-1&&(Pe=et+rt*Y+we/2),g.direction.toLowerCase()){case"n":Tt=Se-It/2+Pe,Lt=ve+me/2+gt;break;case"s":Tt=Se-It/2+Pe,Lt=ve-me/2-gt;break;case"e":Tt=Se-me/2-gt,Lt=ve+It/2-Pe;break;case"w":Tt=Se+me/2+gt,Lt=ve-It/2+Pe;break}let Ct={position:{x:Tt,y:u.value[N].position.y,z:Lt},scale:{x:1,y:1,z:1},quaternion:{x:qe.x,y:qe.y,z:qe.z,w:qe.w},boundingBox:!1,url:it.url,seats:it.seats,tableType:it.tableType,tableChairs:it.tableChairs,tableID:u.value[N].diagramID,size:it.size,materialColor:"white",diagramID:Ft};u.value.push(Ct),Ct={}}}if((u.value[N].tableType=="conference"||u.value[N].tableType=="ushape"||u.value[N].tableType=="hollowsquare")&&!u.value[N].tableID){let qe=u.value[N].quaternion,ft=Ee.value*(Math.PI/180),It=u.value[N].size.z,me=u.value[N].size.x,Se=u.value[N].position.x,ve=u.value[N].position.z,Xe={name:"grayChairLOD2",url:"https://firebasestorage.googleapis.com/v0/b/selfwalksigniabonnetcreek-dev.appspot.com/o/Chair2020.glb?alt=media&token=2567ce39-24dc-486e-a62d-e88652e2afbc",loader:"",tableType:"",tableChairs:0,type:"",seats:1,size:{x:.608,y:.983,z:.506}},Be=u.value[N].tableChairs,gt=me;for(let rt=0;rt<u.value[N].tableChairs;rt++){let it={name:"grayChairLOD2",url:"https://firebasestorage.googleapis.com/v0/b/selfwalksigniabonnetcreek-dev.appspot.com/o/Chair2020.glb?alt=media&token=2567ce39-24dc-486e-a62d-e88652e2afbc",loader:"",tableType:"",tableChairs:0,type:"",seats:1,size:{x:.608,y:.983,z:.506}},Ft=pt(),Tt,Lt,we=new J(u.value[N].size.x,u.value[N].size.y,u.value[N].size.z),Y=(we.z-it.size.z*Be)/Be,et=it.size.x;rt==0||rt==u.value[N].tableChairs-1?Y=(we.z-et*Be)/Be/2:Y=(we.z-et*Be)/Be;let Pe=new Ue(qe.x,qe.y,qe.z,qe.w),Ct=new J(Se,u.value[N].position.y,ve),Go=-(we.z/2)+et/2+rt*(et+Y),oo=new J(gt,0,Go);oo.applyQuaternion(Pe);let so=oo.add(Ct),ao={position:{x:so.x,y:u.value[N].position.y,z:so.z},scale:{x:1,y:1,z:1},quaternion:{x:qe.x,y:qe.y,z:qe.z,w:qe.w},boundingBox:!1,url:it.url,seats:it.seats,tableType:it.tableType,tableChairs:it.tableChairs,tableID:u.value[N].diagramID,size:it.size,materialColor:"white",diagramID:Ft};u.value.push(ao),ao={}}}if(u.value[N].tableType=="crescent"&&!u.value[N].tableID)for(let qe=0;qe<u.value[N].tableChairs;qe++){let ft={name:"grayChairLOD2",url:"https://firebasestorage.googleapis.com/v0/b/selfwalksigniabonnetcreek-dev.appspot.com/o/Chair2020.glb?alt=media&token=2567ce39-24dc-486e-a62d-e88652e2afbc",loader:"",tableType:"",tableChairs:0,type:"",seats:1,size:{x:.608,y:.983,z:.506}},It=pt(),me;switch(g.direction.toLowerCase()){case"n":me=-1*Math.PI/(u.value[N].tableChairs-1)*qe-Math.PI;break;case"s":me=1*Math.PI/(u.value[N].tableChairs-1)*qe-Math.PI;break;case"e":me=-1*Math.PI/(u.value[N].tableChairs-1)*qe-Math.PI/2;break;case"w":me=1*Math.PI/(u.value[N].tableChairs-1)*qe-Math.PI/2;break}let Se=2*Math.PI/_t*qe,ve=Rt,Xe={position:{x:Ne+at*Math.cos(me),y:u.value[N].position.y,z:yt+at*Math.sin(me)},scale:{x:1,y:1,z:1},quaternion:{x:ve.x,y:ve.y,z:ve.z,w:ve.w},boundingBox:!1,url:ft.url,seats:ft.seats,tableType:ft.tableType,tableChairs:ft.tableChairs,tableID:u.value[N].diagramID,size:ft.size,materialColor:"white",diagramID:It};u.value.push(Xe),Xe={}}u.value[N].tableID=u.value[N].diagramID}q.value=u.value,console.log("New wall params added:",_,u.value,q.value),dt(i,l,S),t.updateMaxSet(u.value,e.space.id,y),console.log("New wall params added:",u.value),h?console.log("not showing diagrams created"):(De(u.value),De(u.value))}catch(U){console.error("Error in addWall function:",U)}}async function ce(i,l,S,E,D,h,g,p,y,_){let b=t.diagramObjects.find(ut=>ut.name==="stage6ftx8ft"),H=p;console.log("area",H);let xe=y;h||(E=0,D=0),console.log("screenside",g),H.direction=xe,console.log("area",H),console.log("add diagram",i,l,S);let de=S,U=pt();u.value=[],q.value||(q.value=[]),q.value?u.value=q.value:u.value=[];let X=H.startX,se=H.startZ;Ee.value*(Math.PI/180);let K=H.widthX,B=H.depthZ,Rt=pt(),lt,Ke,Ze,an=t.diagramObjects.find(ut=>ut.name==="screentripod"),tt,nt,vt,wt,He,Ve,st,N,Oe;switch((H.direction.toLowerCase()=="s"||H.direction.toLowerCase()=="n")&&(E?Ke=E:Ke=0,D?Ze=D:Ze=0),(H.direction.toLowerCase()=="w"||H.direction.toLowerCase()=="e")&&(E?Ke=D:Ke=0,D?Ze=E:Ze=0),H.direction.toLowerCase()){case"n":lt=new 
6Ue().setFromAxisAngle(new J(0,1,0),-Math.PI/2),Oe=lt,He=b.size.z,Ve=b.size.x,st=X-b.size.z/2+b.size.z*Ke/2,N=se-b.size.x/2+b.size.x*Ze/2,tt=st,nt=N-Ve/2+.24,vt=X+(K-He*Ke)/2,wt=se+Ve/2,h&&(g=="left"&&(tt=vt-He*.5-1.9),g=="right"&&(tt=vt+He*(Ke-.5)+1.9),g=="center"&&(nt=se+.5,tt=vt-He*.5+He*(Ke/2))),h||(nt=se+.5,tt=vt-He*.5+He*(Ke/2));break;case"s":lt=new Ue().setFromAxisAngle(new J(0,1,0),Math.PI/2),Oe=lt,He=b.size.z,Ve=b.size.x,st=X-b.size.z/2+b.size.z*Ke/2,N=se-b.size.x/2+b.size.x*Ze/2,tt=st,nt=N-b.size.x/2+b.size.x*Ze/2,vt=X+(K-He*Ke)/2,wt=se+B-Ve*Ze+Ve/2,h&&(g=="left"&&(tt=vt-He*.5-1.9,nt=se+B-.5),g=="right"&&(tt=vt+He*(Ke-.5)+1.9,nt=se+B-.5),g=="center"&&(nt=se+B-.5,tt=vt-He*.5+He*(Ke/2))),h||(nt=se+B-.5,tt=vt-He*.5+He*(Ke/2));break;case"e":lt=new Ue().setFromAxisAngle(new J(0,1,0),Math.PI),Oe=new Ue().setFromAxisAngle(new J(0,1,0),0),He=b.size.x,Ve=b.size.z,st=X-b.size.x/2+b.size.x*Ke/2,N=se-b.size.z/2+b.size.z*Ze/2,tt=st+b.size.x/2-b.size.x*Ke/2+.25,nt=N,vt=X+He/2,wt=se+(B-Ve*Ze)/2,h&&(g=="left"&&(nt=wt+Ve*(Ze-.5)+1.9),g=="right"&&(nt=wt-Ve*.5-1.9),g=="center"&&(nt=wt+Ve*(Ze/2)-Ve*.5,tt=X+.5)),h||(nt=wt+Ve*(Ze/2)-Ve*.5,tt=X+.5);break;case"w":lt=new Ue().setFromAxisAngle(new J(0,1,0),0),Oe=new Ue().setFromAxisAngle(new J(0,1,0),Math.PI),He=b.size.x,Ve=b.size.z,st=X-b.size.x/2+b.size.x*Ke/2,N=se-b.size.z/2+b.size.z*Ze/2,tt=st+b.size.x/2+b.size.x*Ke/2,nt=N,vt=X+K-He*Ke+He/2,wt=se+(B-Ve*Ze)/2,h&&(g=="right"&&(nt=wt+Ve*(Ze-.5)+1.9,tt=X+K-.5),g=="left"&&(nt=wt-Ve*.5-1.9,tt=X+K-.5),g=="center"&&(nt=wt-Ve*.5+Ve*(Ze/2),tt=X+K-.5)),h||(nt=wt-Ve*.5+Ve*(Ze/2),tt=X+K-.5);break}console.log("positions","initialX",X,"initialZ",se,"stageNumEleWidth","stageNumEleDepth","templateWidth","templateDepth",Ke,Ze,K,B);for(let ut=0;ut<Ke;ut++)for(let yt=0;yt<Ze;yt++){let _t=lt,at={position:{x:He*ut+vt,y:.05,z:Ve*yt+wt},scale:{x:1,y:1,z:1},quaternion:{x:_t.x,y:_t.y,z:_t.z,w:_t.w},boundingBox:!1,url:b.url,seats:b.seats,materialColor:"white",diagramID:Rt};u.value.push(at),at={}}let Ne={position:{x:tt,y:.05,z:nt},scale:{x:1,y:1,z:1},quaternion:{x:Oe.x,y:Oe.y,z:Oe.z,w:Oe.w},boundingBox:!1,url:an.url,seats:an.seats,materialColor:"white",diagramID:Rt};u.value.push(Ne),Ne={};try{q.value=u.value,console.log("New wall params added:",U,u.value,q.value),dt(i,l,S),t.updateMaxSet(u.value,e.space.id,de),console.log("New wall params added:",u.value)}catch(ut){console.error("Error in addWall function:",ut)}q.value=u.value,console.log("New wall params added:",U,u.value,q.value),_?console.log("not showing diagrams created"):(De(u.value),De(u.value))}function kt(i,l,S,E){if(window.confirm("Are you sure you want to remove this diagram?")){let D=S;u.value=[],q.value?u.value=q.value:u.value=[];for(let h=0;h<u.value.length;h++)if(u.value[h].diagramID===E){u.value.splice(h,1);break}q.value=u.value,dt(i,l,S),t.updateMaxSet(u.value,e.space.id,D),De(u.value),De(u.value)}}function mt(i){if(i===null||typeof i!="object")return i;let l=Array.isArray(i)?[]:{};for(let S in i)i.hasOwnProperty(S)&&(l[S]=mt(i[S]));return l}async function dt(i,l,S){let E=0;for(let D=0;D<u.value.length;D++)E+=u.value[D].seats;i.capacities[S]=E,o(l,"capacities",i.capacities)}async function At(i,l,S){let E=S;u.value=[];for(let D=0;D<w.value.length;D++){let h={position:{x:w.value[D].obj3D.position.x,y:w.value[D].obj3D.position.y,z:w.value[D].obj3D.position.z},rotation:{x:w.value[D].obj3D.rotation.x,y:w.value[D].obj3D.rotation.y,z:w.value[D].obj3D.rotation.z},quaternion:{x:w.value[D].obj3D.quaternion.x,y:w.value[D].obj3D.quaternion.y,z:w.value[D].obj3D.quaternion.z,w:w.value[D].obj3D.quaternion.w},scale:{x:w.value[D].obj3D.scale.x,y:w.value[D].obj3D.scale.y,z:w.value[D].obj3D.scale.z},boundingBox:w.value[D].boundingBox,url:w.value[D].url,seats:w.value[D].seats,diagramID:w.value[D].diagramID};u.value.push(h)}console.log("diagramSet.value",u.value,q.value),q.value=u.value,dt(i,l,S),t.updateMaxSet(u.value,e.space.id,E)}function zt(i,l,S,E){let D=S;u.value=[],q.value?u.value=q.value:u.value=[];for(let h=0;h<u.value.length;h++)if(u.value[h].diagramID===E){let g=pt();console.log("newID",g);let p={...u.value[h],diagramID:g};u.value.push(p);break}q.value=u.value,t.updateMaxSet(u.value,e.space.id,D),De(u.value),De(u.value)}function oe(i){return new Promise(l=>setTimeout(l,i))}async function Xt(i,l,S){let E=["N","S","E","W"],D=window.confirm("Is the Ceiling Tall? Confirm to use Risers, cancel to skip risers."),h=i.maxSetArea||await fe("0x00ff00"),g=!1;if(i.maxSetArea?g=!0:g=window.confirm("Is Area box good?"),g){for(let p of E)await Z(i,l,h,p,D),await oe(3e3),await j(i,l,h,p),await oe(3e3);alert("Diagrams created!")}}async function Z(i,l,S,E,D){let h=!1;S?h=!0:window.confirm("Is Area box good?")||(S=await fe("0x00ff00")),t.diagramObjects.find(p=>p.name==="screentripod");let g=t.diagramObjects.find(p=>p.name==="stage6ftx8ft");if(h){let p=mt(S),y=mt(S);console.log("avarea2",y);let _=mt(S),b,H,xe=S.widthX*S.depthZ*10.76391042,de,U=E??prompt("Please enter the direction of the area (N, S, E, W)","N").toUpperCase(),X=D??window.confirm("Is the Ceiling Tall? Confirm to use Risers, cancel to skip risers.");xe>6e3&&(de=30,b=3,X?H=g.size.z*2:H=g.size.z*1),xe>3e3&&xe<6e3&&(de=30,b=2,X?H=g.size.z*2:H=g.size.z*1),xe<=3e3&&(de=20,b=1,X?H=g.size.z*2:H=g.size.z*1);let se=mt(S);console.log("roomsetarea",se);let K,B=de*.0254;U.toLowerCase()=="n"&&(se.startZ=se.startZ+H,se.depthZ=Math.abs(se.startZ-se.endZ),K="n",se.widthX-B*2<50&&(b=2),se.widthX-B*2<30&&(b=1),b==3&&(p.startX=p.startX+g.size.x+B,p.endX=p.endX-B-(p.widthX-2*B)/b*(b-1),p.endZ=p.startZ+H,p.widthX=Math.abs(p.endX-p.startX),p.depthZ=Math.abs(p.endZ-p.startZ),y.startX=y.startX+B+(y.widthX-2*B)/b*(b-2),y.endX=y.endX-B-(y.widthX-2*B)/b*(b-2),y.endZ=y.startZ+H,y.widthX=Math.abs(y.endX-y.startX),y.depthZ=Math.abs(y.endZ-y.startZ),_.startX=_.startX+(_.widthX-2*B)/b*(b-1),_.endX=_.endX-B,_.endZ=_.startZ+H,_.widthX=Math.abs(_.endX-_.startX),_.depthZ=Math.abs(_.endZ-_.startZ)),b==2&&(p.startX=p.startX+g.size.x+B,p.endX=p.endX-B-(p.widthX-2*B)/b*(b-1),p.endZ=p.startZ+H,p.widthX=Math.abs(p.endX-p.startX),p.depthZ=Math.abs(p.endZ-p.startZ),y.startX=y.startX+B+(y.widthX-2*B)/b*(b-2),y.endX=y.endX-(y.widthX-2*B)/b*(b-2),y.endZ=y.startZ+H,y.widthX=Math.abs(y.endX-y.startX),y.depthZ=Math.abs(y.endZ-y.startZ),_.startX=_.startX+B+(_.widthX-2*B)/b*(b-1),_.endX=_.endX-B,_.endZ=_.startZ+H,_.widthX=Math.abs(_.endX-_.startX),_.depthZ=Math.abs(_.endZ-_.startZ)),b==1&&(p.startX=p.startX+g.size.x,p.endX=p.endX,p.endZ=p.startZ+H,p.widthX=Math.abs(p.endX-p.startX),p.depthZ=Math.abs(p.endZ-p.startZ)),console.log("avarea2 after north",y,"screennum",b),console.log("roomsetarea after north",se)),U.toLowerCase()=="s"&&(se.endZ=se.endZ-H,se.depthZ=Math.abs(se.startZ-se.endZ),K="s",se.widthX-B*2<50&&(b=2),se.widthX-B*2<30&&(b=1),b==3&&(p.startX=p.startX+g.size.x+B,p.endX=p.endX-B-(p.widthX-2*B)/b*(b-1),p.startZ=p.endZ-H,p.widthX=Math.abs(p.endX-p.startX),p.depthZ=Math.abs(p.endZ-p.startZ),y.startX=y.startX+B+(y.widthX-2*B)/b*(b-2),y.endX=y.endX-B-(y.widthX-2*B)/b*(b-2),y.startZ=y.endZ-H,y.widthX=Math.abs(y.endX-y.startX),y.depthZ=Math.abs(y.endZ-y.startZ),_.startX=_.startX+(_.widthX-2*B)/b*(b-1),_.endX=_.endX-B,_.startZ=_.endZ-H,_.widthX=Math.abs(_.endX-_.startX),_.depthZ=Math.abs(_.endZ-_.startZ)),b==2&&(p.startX=p.startX+g.size.x+B,p.endX=p.endX-B-(p.widthX-2*B)*(b-1),p.startZ=p.endZ-H,p.widthX=Math.abs(p.endX-p.startX),p.depthZ=Math.abs(p.endZ-p.startZ),y.startX=y.startX+B+(y.widthX-2*B)/b*(b-2),y.endX=y.endX-(y.widthX-2*B)/b*(b-2),y.startZ=y.endZ-H,y.widthX=Math.abs(y.endX-y.startX),y.depthZ=Math.abs(y.endZ-y.startZ),_.startX=_.startX+B+(_.widthX-2*B)/b*(b-1),_.endX=_.endX-B,_.startZ=_.endZ-H,_.widthX=Math.abs(_.endX-_.startX),_.depthZ=Math.abs(_.endZ-_.startZ)),b==1&&(p.startX=p.startX+g.size.x,p.endX=p.endX,p.startZ=p.endZ-H,p.widthX=Math.abs(p.endX-p.startX),p.depthZ=Math.abs(p.endZ-p.startZ))),U.toLowerCase()=="w"&&(se.startX=se.startX+H,se.widthX=Math.abs(se.startX-se.endX),K="e",se.depthZ-B*2<50&&(b=2),se.depthZ-B*2<30&&(b=1),b==3&&(_.endX=_.startX+H,_.startZ=_.startZ+g.size.x+B,_.endZ=_.endZ-B-(_.depthZ-2*B)/b*(b-1),_.widthX=Math.abs(_.endX-_.startX),_.depthZ=Math.abs(_.endZ-_.startZ),y.endX=y.startX+H,y.startZ=y.startZ+B+(y.depthZ-2*B)/b*(b-2),y.endZ=y.endZ-B-(y.depthZ-2*B)/b*(b-2),y.widthX=Math.abs(y.endX-y.startX),y.depthZ=Math.abs(y.endZ-y.startZ),p.startZ=p.startZ+(p.depthZ-2*B)/b*(b-1),p.endZ=p.endZ-B,p.endX=p.startX+H,p.widthX=Math.abs(p.endX-p.startX),p.depthZ=Math.abs(p.endZ-p.startZ)),b==2&&(_.endX=_.startX+H,_.startZ=_.startZ+g.size.x+B,_.endZ=_.endZ-(_.depthZ-2*B)/b*(b-1),_.widthX=Math.abs(_.endX-_.startX),_.depthZ=Math.abs(_.endZ-_.startZ),y.endX=y.startX+H,y.startZ=y.startZ+B+(y.depthZ-2*B)/b*(b-2),y.endZ=y.endZ-B-(y.depthZ-2*B)/b*(b-2),y.widthX=Math.abs(y.endX-y.startX),y.depthZ=Math.abs(y.endZ-y.startZ),p.startZ=p.startZ+B+(p.depthZ-2*B)/b*(b-1),p.endZ=p.endZ-B,p.endX=p.startX+H,p.widthX=Math.abs(p.endX-p.startX),p.depthZ=Math.abs(p.endZ-p.startZ)),b==1&&(p.endX=p.startX+H,p.startZ=p.startZ+g.size.x,p.endZ=p.endZ,p.widthX=Math.abs(p.endX-p.startX),p.depthZ=Math.abs(p.endZ-p.startZ))),U.toLowerCase()=="e"&&(se.endX=se.endX-H,se.widthX=Math.abs(se.startX-se.endX),K="w",se.depthZ-B*2<50&&(b=2),se.depthZ-B*2<30&&(b=1),b==3&&(p.startX=p.endX-H,p.startZ=p.startZ+g.size.x+B,p.endZ=p.endZ-B-(p.depthZ-2*B)/b*(b-1),p.widthX=Math.abs(p.endX-p.startX),p.depthZ=Math.abs(p.endZ-p.startZ),y.startX=y.endX-H,y.startZ=y.startZ+B+(y.depthZ-2*B)/b*(b-2),y.endZ=y.endZ-B-(y.depthZ-2*B)/b*(b-2),y.widthX=Math.abs(y.endX-y.startX),y.depthZ=Math.abs(y.endZ-y.startZ),_.startZ=_.startZ+(_.depthZ-2*B)/b*(b-1),_.endZ=_.endZ-B,_.startX=_.endX-H,_.widthX=Math.abs(_.endX-_.startX),_.depthZ=Math.abs(_.endZ-_.startZ)),b==2&&(p.startX=p.endX-H,p.startZ=p.startZ+g.size.x+B,p.endZ=p.endZ-(p.depthZ-2*B)/b*(b-1),p.widthX=Math.abs(p.endX-p.startX),p.depthZ=Math.abs(p.endZ-p.startZ),y.startX=y.endX-H,y.startZ=y.startZ+B+(y.depthZ-2*B)/b*(b-2),y.endZ=y.endZ-B-(y.depthZ-2*B)/b*(b-2),y.widthX=Math.abs(y.endX-y.startX),y.depthZ=Math.abs(y.endZ-y.startZ),_.startZ=_.startZ+B+(_.depthZ-2*B)/b*(b-1),_.endZ=_.endZ-B,_.startX=_.endX-H,_.widthX=Math.abs(_.endX-_.startX),_.depthZ=Math.abs(_.endZ-_.startZ)),b==1&&(p.startX=p.endX-H,p.startZ=p.startZ+g.size.x,p.endZ=p.endZ,p.widthX=Math.abs(p.endX-p.startX),p.depthZ=Math.abs(p.endZ-p.startZ))),q.value=[],console.log("adding diagrams theater av, roomserper",de),await oe(3e3),await he("grayChairLOD2",de,60,48,20,0,14,7),await oe(1e3),await ze(i,l,`theaterDiagramAV${U}`,se,U,!0),await oe(3e3),console.log("avarea2 placing screens",y,"screennum",b),b==1&&await ce(i,l,`theaterDiagramAV${U}`,3,2,X,"center",p,K,!0),b==2&&(await ce(i,l,`theaterDiagramAV${U}`,3,2,X,"left",p,K,!0),await ce(i,l,`theaterDiagramAV${U}`,3,2,X,"right",_,K,!0)),b==3&&(await ce(i,l,`theaterDiagramAV${U}`,3,2,X,"left",p,K,!0),await ce(i,l,`theaterDiagramAV${U}`,3,2,X,"center",y,K,!0),await ce(i,l,`theaterDiagramAV${U}`,3,2,X,"right",_,K,!0)),await oe(3e3),q.value=[],console.log("adding diagrams classroom av roomserper",de),await oe(3e3),await he("classroomtablexblend",de,60,36,36,0,5,5),await oe(1e3),console.log("roomSerPer servicePerimeter.value",pe.value),await ze(i,l,`classroom2per6DiagramAV${U}`,se,U,!0),await oe(3e3),console.log("avarea2 placing screens",y,"screennum",b),b==1&&await ce(i,l,`classroom2per6DiagramAV${U}`,3,2,X,"center",p,K,!0),b==2&&(await ce(i,l,`classroom2per6DiagramAV${U}`,3,2,X,"left",p,K,!0),await ce(i,l,`classroom2per6DiagramAV${U}`,3,2,X,"right",_,K,!0)),b==3&&(await ce(i,l,`classroom2per6DiagramAV${U}`,3,2,X,"left",p,K,!0),await ce(i,l,`classroom2per6DiagramAV${U}`,3,2,X,"center",y,K,!0),await ce(i,l,`classroom2per6DiagramAV${U}`,3,2,X,"right",_,K,!0)),await oe(3e3),q.value=[],console.log("adding diagrams crescent 6 av roomserper",de),await oe(3e3),await he("crescentOf6LOD2",de,60,60,0,0,1,1),await oe(1e3),console.log("roomSerPer servicePerimeter.value",pe.value),await ze(i,l,`crescent6DiagramAV${U}`,se,U,!0),await oe(3e3),console.log("avarea2 placing screens",y,"screennum",b),b==1&&await ce(i,l,`crescent6DiagramAV${U}`,3,2,X,"center",p,K,!0),b==2&&(await ce(i,l,`crescent6DiagramAV${U}`,3,2,X,"left",p,K,!0),await ce(i,l,`crescent6DiagramAV${U}`,3,2,X,"right",_,K,!0)),b==3&&(await ce(i,l,`crescent6DiagramAV${U}`,3,2,X,"left",p,K,!0),await ce(i,l,`crescent6DiagramAV${U}`,3,2,X,"center",y,K,!0),await ce(i,l,`crescent6DiagramAV${U}`,3,2,X,"right",_,K,!0)),await oe(3e3),q.value=[],console.log("adding diagrams rounds 10 av roomserper",de),await he("roundsOf10LOD2",de,60,60,0,0,1,1),await oe(2e3),console.log("roomSerPer servicePerimeter.value",pe.value),await ze(i,l,`rounds10DiagramAV${U}`,se,U,!0),await oe(3e3),console.log("avarea2 placing screens",y,"screennum",b),b==1&&await ce(i,l,`rounds10DiagramAV${U}`,3,2,X,"center",p,K,!0),b==2&&(await ce(i,l,`rounds10DiagramAV${U}`,3,2,X,"left",p,K,!0),await ce(i,l,`rounds10DiagramAV${U}`,3,2,X,"right",_,K,!0)),b==3&&(await ce(i,l,`rounds10DiagramAV${U}`,3,2,X,"left",p,K,!0),await ce(i,l,`rounds10DiagramAV${U}`,3,2,X,"center",y,K,!0),await ce(i,l,`rounds10DiagramAV${U}`,3,2,X,"right",_,K,!0)),await oe(3e3),q.value=[],console.log("adding diagrams reception av roomserper",de),await oe(3e3),await he("cocktail",de,120,120,60,60,5,4),await oe(1e3),console.log("roomSerPer servicePerimeter.value",pe.value),await ze(i,l,`receptionDiagramAV${U}`,se,U,!0),await oe(3e3),console.log("avarea2 placing screens",y,"screennum",b),b==1&&await ce(i,l,`receptionDiagramAV${U}`,3,2,X,"center",p,K,!0),b==2&&(await ce(i,l,`receptionDiagramAV${U}`,3,2,X,"left",p,K,!0),await ce(i,l,`receptionDiagramAV${U}`,3,2,X,"right",_,K,!0)),b==3&&(await ce(i,l,`receptionDiagramAV${U}`,3,2,X,"left",p,K,!0),await ce(i,l,`receptionDiagramAV${U}`,3,2,X,"center",y,K,!0),await ce(i,l,`receptionDiagramAV${U}`,3,2,X,"right",_,K,!0)),xe<3100&&(await oe(3e3),q.value=[],console.log("adding diagrams ushape av roomserper",de),await oe(3e3),await he("ushape",de,60,60,60,60,5,4),await oe(1e3),console.log("roomSerPer servicePerimeter.value",pe.value),await ze(i,l,`ushapeDiagramAV${U}`,se,U,!0),await oe(3e3),console.log("avarea2 placing screens",y,"screennum",b),b==1&&await ce(i,l,`ushapeDiagramAV${U}`,3,2,X,"center",p,K,!0),b==2&&(await ce(i,l,`ushapeDiagramAV${U}`,3,2,X,"left",p,K,!0),await ce(i,l,`ushapeDiagramAV${U}`,3,2,X,"right",_,K,!0)),b==3&&(await ce(i,l,`ushapeDiagramAV${U}`,3,2,X,"left",p,K,!0),await ce(i,l,`ushapeDiagramAV${U}`,3,2,X,"center",y,K,!0),await ce(i,l,`ushapeDiagramAV${U}`,3,2,X,"right",_,K,!0)),await oe(3e3),q.value=[],console.log("adding diagrams conferene av roomserper",de),await oe(3e3),await he("conferencetablexblend",de,60,60,60,60,5,4),await oe(1e3),console.log("roomSerPer servicePerimeter.value",pe.value),await ze(i,l,`conferenceDiagramAV${U}`,se,U,!0),await oe(3e3),console.log("avarea2 placing screens",y,"screennum",b),b==1&&await ce(i,l,`conferenceDiagramAV${U}`,3,2,X,"center",p,K,!0),b==2&&(await ce(i,l,`conferenceDiagramAV${U}`,3,2,X,"left",p,K,!0),await ce(i,l,`conferenceDiagramAV${U}`,3,2,X,"right",_,K,!0)),b==3&&(await ce(i,l,`conferenceDiagramAV${U}`,3,2,X,"left",p,K,!0),await ce(i,l,`conferenceDiagramAV${U}`,3,2,X,"center",y,K,!0),await ce(i,l,`conferenceDiagramAV${U}`,3,2,X,"right",_,K,!0)),await oe(3e3),q.value=[],console.log("adding diagrams conferene av roomserper",de),await oe(3e3),await he("hollowsquare",de,60,60,60,60,5,4),console.log("roomSerPer servicePerimeter.value",pe.value),await oe(1e3),await ze(i,l,`hollowsquareDiagramAV${U}`,se,U,!0),await oe(3e3),console.log("avarea2 placing screens",y,"screennum",b),b==1&&await ce(i,l,`hollowsquareDiagramAV${U}`,3,2,X,"center",p,K,!0),b==2&&(await ce(i,l,`hollowsquareDiagramAV${U}`,3,2,X,"left",p,K,!0),await ce(i,l,`hollowsquareDiagramAV${U}`,3,2,X,"right",_,K,!0)),b==3&&(await ce(i,l,`hollowsquareDiagramAV${U}`,3,2,X,"left",p,K,!0),await ce(i,l,`hollowsquareDiagramAV${U}`,3,2,X,"center",y,K,!0),await ce(i,l,`hollowsquareDiagramAV${U}`,3,2,X,"right",_,K,!0))),console.log("finshed adding av sets")}}async function j(i,l,S,E){let D=!1;if(S?D=!0:window.confirm("Is Area box good?")||(S=await fe("0x00ff00")),D){let h=S.widthX*S.depthZ*10.76391042,g;h>4e3?g=60:g=5;let p=E??prompt("Please enter the direction of the area (N, S, E, W)","N").toUpperCase();console.log("adding diagrams theater"),q.value=[],await oe(3e3),await he("grayChairLOD2",g,60,48,20,0,14,7),await oe(3
6e3),console.log("roomSerPer servicePerimeter.value",pe.value),await ze(i,l,`theaterDiagram${p}`,S,p,!0),await oe(3e3),q.value=[],console.log("adding diagrams classroom"),await oe(3e3),await he("classroomtablexblend",g,60,36,36,0,5,5),await oe(1e3),console.log("roomSerPer servicePerimeter.value",pe.value),await ze(i,l,`classroom2per6Diagram${p}`,S,p,!0),await oe(3e3),console.log("adding diagrams crescent"),q.value=[],await oe(3e3),await he("crescentOf6LOD2",g,60,60,0,0,1,1),await oe(1e3),console.log("roomSerPer servicePerimeter.value",pe.value),await ze(i,l,`crescent6Diagram${p}`,S,p,!0),await oe(3e3),console.log("adding diagrams rounds10"),q.value=[],await he("roundsOf10LOD2",g,60,60,0,0,1,1),await oe(2e3),console.log("roomSerPer servicePerimeter.value",pe.value),await ze(i,l,`rounds10Diagram${p}`,S,p,!0),await oe(3e3),console.log("adding diagrams reception"),q.value=[],await oe(3e3),await he("cocktail",g,120,120,60,60,5,4),await oe(1e3),console.log("roomSerPer servicePerimeter.value",pe.value),await ze(i,l,`receptionDiagram${p}`,S,p,!0),await oe(3e3),h<3100&&(console.log("adding diagrams ushape"),q.value=[],await oe(3e3),await he("ushape",g,60,60,60,60,5,4),await oe(1e3),console.log("roomSerPer servicePerimeter.value",pe.value),await ze(i,l,`ushapeDiagram${p}`,S,p,!0),await oe(3e3),console.log("adding diagrams conference"),q.value=[],await oe(3e3),await he("conferencetablexblend",g,60,60,60,60,5,4),await oe(1e3),console.log("roomSerPer servicePerimeter.value",pe.value),await ze(i,l,`conferenceDiagram${p}`,S,p,!0),await oe(3e3),console.log("adding diagrams hollowsquare"),q.value=[],await oe(3e3),await he("hollowsquare",g,60,60,60,60,5,4),await oe(1e3),console.log("roomSerPer servicePerimeter.value",pe.value),await ze(i,l,`hollowsquareDiagram${p}`,S,p,!0),await oe(3e3)),console.log("finished adding diagrams")}}return zn(async()=>{console.log("pre load mounting","type",e.diagramType,q.value),q.value=await t.retrieveMaxSet(e.space.id,e.diagramType),console.log("mounted",q.value)}),(i,l)=>(I(),T(Ae,null,[n("div",cu,[n("div",du,[uu,R(n("select",{id:"gltfUrl","onUpdate:modelValue":l[0]||(l[0]=S=>v.value=S)},[(I(!0),T(Ae,null,ke(f(t).diagramObjects,S=>(I(),T("option",{value:S},le(S.name),9,pu))),256))],512),[[ot,v.value]])]),n("div",hu,[n("div",mu,[fu,R(n("input",{id:"servicePerimeter","onUpdate:modelValue":l[1]||(l[1]=S=>pe.value=S),type:"number"},null,512),[[Q,pe.value,void 0,{number:!0}]])]),n("div",gu,[vu,R(n("input",{id:"spaceBetweenBlocksHor","onUpdate:modelValue":l[2]||(l[2]=S=>$e.value=S),type:"number"},null,512),[[Q,$e.value,void 0,{number:!0}]])]),n("div",wu,[bu,R(n("input",{id:"spaceBetweenBlocksVert","onUpdate:modelValue":l[3]||(l[3]=S=>Fe.value=S),type:"number"},null,512),[[Q,Fe.value,void 0,{number:!0}]])]),n("div",yu,[_u,R(n("input",{id:"spaceBetweenRow","onUpdate:modelValue":l[4]||(l[4]=S=>te.value=S),type:"number"},null,512),[[Q,te.value,void 0,{number:!0}]])]),n("div",Cu,[xu,R(n("input",{id:"spaceBetweenColumn","onUpdate:modelValue":l[5]||(l[5]=S=>ge.value=S),type:"number"},null,512),[[Q,ge.value,void 0,{number:!0}]])]),n("div",Su,[Mu,R(n("input",{id:"numObjInBlockVert","onUpdate:modelValue":l[6]||(l[6]=S=>Ie.value=S),type:"number"},null,512),[[Q,Ie.value,void 0,{number:!0}]])]),n("div",Au,[Iu,R(n("input",{id:"numObjInBlockHor","onUpdate:modelValue":l[7]||(l[7]=S=>ue.value=S),type:"number"},null,512),[[Q,ue.value,void 0,{number:!0}]])]),n("div",Tu,[Lu,R(n("input",{id:"numScreens","onUpdate:modelValue":l[8]||(l[8]=S=>Ye.value=S),type:"number"},null,512),[[Q,Ye.value,void 0,{number:!0}]])])])]),n("div",Pu,[n("div",{class:An({mobileToolBack:!0,helpHighlight:f(t).isHighlighted==5})},[n("button",{class:"actionbtn",onClick:l[9]||(l[9]=F(S=>f(t).showMaxSetTool=!1,["prevent"]))},"X"),ku,n("button",{class:"actionbtn",onClick:F(re,["prevent"]),id:"airwallcontrol"},"S/R/T",8,Eu),n("button",{class:"actionbtn",onClick:F(je,["prevent"]),id:"airwallcontrol"},"Unselect",8,zu),n("button",{class:"actionbtn",onClick:l[10]||(l[10]=F(S=>ze(e.space,e.space.id,e.diagramType),["prevent"]))},"Add "),n("button",{class:"actionbtn",onClick:l[11]||(l[11]=F(S=>j(e.space,e.space.id),["prevent"]))},"Auto Main "),n("button",{class:"actionbtn",onClick:l[12]||(l[12]=F(S=>ht(),["prevent"]))},"Floor"),n("button",{class:"actionbtn",onClick:l[13]||(l[13]=F(S=>Xt(e.space,e.space.id),["prevent"]))},"ALL SET"),n("button",{class:"actionbtn",onClick:l[14]||(l[14]=F(S=>Z(e.space,e.space.id),["prevent"]))},"AV SET "),n("button",{class:"actionbtn",onClick:l[15]||(l[15]=F(S=>De(q.value),["prevent"]))},"Show "),n("button",{class:"actionbtn",onClick:l[16]||(l[16]=F(S=>At(e.space,e.space.id,e.diagramType),["prevent"]))},"Save "),n("button",{class:"actionbtn",onClick:l[17]||(l[17]=F(S=>zt(e.space,e.space.id,e.diagramType,Re.value),["prevent"]))},"copy"),n("button",{class:"actionbtn",onClick:l[18]||(l[18]=F(S=>kt(e.space,e.space.id,e.diagramType,Re.value),["prevent"]))},"Delete"),n("div",null,"ID:"+le(Re.value),1),n("button",{class:"actionbtn",onClick:l[19]||(l[19]=F(S=>Me(),["prevent"]))},"Group"),n("button",{class:"actionbtn",onClick:l[20]||(l[20]=F(S=>_e(e.space,e.space.id,e.diagramType),["prevent"]))},"Delete Group")],2)]),n("div",Du,[n("div",{class:An({mobileToolBack:!0,helpHighlight:f(t).isHighlighted==5})},[n("button",{class:"actionbtn",onClick:l[21]||(l[21]=F(S=>f(t).showMaxSetTool=!1,["prevent"]))},"X"),Ou,n("button",{class:"actionbtn",onClick:l[22]||(l[22]=F(S=>ce(e.space,e.space.id,e.diagramType,3,2,!0,"left"),["prevent"]))},"Stage"),n("button",{class:"actionbtn",onClick:l[23]||(l[23]=F(S=>he(i.typeName="roundsOf6LOD2",i.servicePer=0,i.aisleHori=60,i.aisleVert=60,i.objSpaceHori=60,i.objSpaceVert=60,i.objPerBlockHori=4,i.objPerBlockVert=5),["prevent"]))},"rounds "),n("button",{class:"actionbtn",onClick:l[24]||(l[24]=F(S=>he("grayChairLOD2",0,60,48,20,0,14,7),["prevent"]))},"Theater"),n("button",{class:"actionbtn",onClick:l[25]||(l[25]=F(S=>he("classroomtablexblend",0,60,36,36,0,5,5),["prevent"]))},"classroom"),n("button",{class:"actionbtn",onClick:l[26]||(l[26]=F(S=>he("hollowsquare",0,0,0,20,0,1,1),["prevent"]))},"hollowSquare"),n("button",{class:"actionbtn",onClick:l[27]||(l[27]=F(S=>he("conferencetablexblend",0,0,0,20,0,1,1),["prevent"]))},"conference"),n("button",{class:"actionbtn",onClick:l[28]||(l[28]=F(S=>he("ushape",0,0,0,20,0,1,1),["prevent"]))},"u-shape"),n("button",{class:"actionbtn",onClick:l[29]||(l[29]=F(S=>he("banquet8",0,36,36,20,0,5,5),["prevent"]))},"reception")],2)]),V.value?(I(),T("div",$u,[n("div",Ru,[n("div",{class:"modal-header"},[n("span",{class:"close-button",onClick:be},"×"),Zu]),n("div",Uu,[R(n("select",{"onUpdate:modelValue":l[30]||(l[30]=S=>P.value=S)},[(I(),T(Ae,null,ke(ye,S=>n("option",{key:S,value:S},le(S),9,Bu)),64))],512),[[ot,P.value]])]),n("div",{class:"modal-footer"},[n("button",{onClick:Ce},"Confirm")])])])):W("",!0)],64))}},Nu=Yt(Fu,[["__scopeId","data-v-30266023"]]);const ct=x=>(on("data-v-5d563e9b"),x=x(),sn(),x),Xu={class:"venueInfo"},Vu={key:0,class:"venuLogo"},ju=ct(()=>n("label",{for:"images"},"SmartBar Logo",-1)),Hu={class:"photoUpload"},qu=["src"],Gu={key:1,class:"venuLogo"},Yu=ct(()=>n("label",{for:"landing-page-image"},"Landing Page Logo",-1)),Wu={class:"photoUpload"},Ku=["src"],Qu={key:2,class:"form-group"},Ju={class:"venuLogo"},e1=["onInput","onUpdate:modelValue"],t1=["onInput","onUpdate:modelValue"],n1=ct(()=>n("label",{for:"landing-page-image"},"Landing Page Logo",-1)),o1=["src"],s1=ct(()=>n("label",{for:"images"},"SmartBar Logo",-1)),a1=["src"],i1=ct(()=>n("label",{for:"mainstart-select"},"Select a MainStart Location:",-1)),l1=["onUpdate:modelValue","onChange"],r1=["value"],c1={ke
6y:2},d1={key:3},u1={class:"venueFields"},p1={class:"venueCheckField"},h1=ct(()=>n("label",{for:"inroomdiningtab"},"Dining Link New Tab",-1)),m1={class:"venueInputField"},f1=ct(()=>n("label",{for:"inroomdining"},"Mobile Dining Link",-1)),g1={class:"venueCheckField"},v1=ct(()=>n("label",{for:"maxSetsCheck"},"Use Max Sets In SmartBar",-1)),w1={class:"venueCheckField"},b1=ct(()=>n("label",{for:"maxSetsCheck"},"Use 3d Vista as Base",-1)),y1={class:"venueInputField"},_1=ct(()=>n("label",{for:"typeselect"},"Venue Type",-1)),C1=pn('<option value="hotel" data-v-5d563e9b>Hotel</option><option value="bar" data-v-5d563e9b>Bar</option><option value="restaurant" data-v-5d563e9b>Restaurant</option><option value="art" data-v-5d563e9b>Art</option><option value="golf" data-v-5d563e9b>Golf</option>',5),x1=[C1],S1={class:"venueInputField"},M1=ct(()=>n("label",{for:"planselect"},"Plan Select",-1)),A1=ct(()=>n("option",{value:"Basic"},"Basic",-1)),I1=ct(()=>n("option",{value:"BasicPlus"},"Basic Plus",-1)),T1=ct(()=>n("option",{value:"SitePro"},"SitePro",-1)),L1=ct(()=>n("option",{value:"SiteProPlus"},"SitePro Plus",-1)),P1=[A1,I1,T1,L1],k1={class:"venueInputField2"},E1=ct(()=>n("label",{for:"venueContacts"},"Venue Contacts",-1)),z1={style:{display:"flex",gap:"0.5rem","justify-content":"space-between"}},D1=["onClick"],O1=ct(()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[n("rect",{width:"26",height:"26",rx:"4",fill:"#B46C26"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 8C20 7.44772 19.5523 7 19 7L17 7C16.4477 7 16 6.55228 16 6C16 5.44772 15.5523 5 15 5L11 5C10.4477 5 10 5.44772 10 6C10 6.55229 9.55228 7 9 7L7 7C6.44772 7 6 7.44772 6 8C6 8.55228 6.44772 9 7 9L7.00003 17.3333C7.00003 19.3584 8.64166 21 10.6667 21L15.3333 21C17.3584 21 19 19.3584 19 17.3333L19 9C19.5523 9 20 8.55228 20 8ZM10 11C10 10.4477 10.4477 10 11 10C11.5523 10 12 10.4477 12 11L12 17C12 17.5523 11.5523 18 11 18C10.4477 18 10 17.5523 10 17L10 11ZM15 10C14.4477 10 14 10.4477 14 11L14 17C14 17.5523 14.4477 18 15 18C15.5523 18 16 17.5523 16 17L16 11C16 10.4477 15.5523 10 15 10Z",fill:"white"})],-1)),$1=[O1],R1={class:"venueInputField"},Z1=ct(()=>n("label",{for:"map"},"3D Vista Map Link:",-1)),U1={class:"venueInputField"},B1=ct(()=>n("label",{for:"map"},"Cvent PropertyId:",-1)),F1={__name:"VenueAdmin",setup(x){const e=Gt(),t=qt(e.updateAdminField,500),o=C("");function a(){console.log("cur email",o.value),o.value&&r(o.value)&&(e.siteProInfo.hotelLeadEmail||(e.siteProInfo.hotelLeadEmail=[]),e.siteProInfo.hotelLeadEmail.push(o.value),o.value="",e.updateAdminField("hotelLeadEmail",e.siteProInfo.hotelLeadEmail))}function r(k){return/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/.test(k)}function s(k){e.siteProInfo.hotelLeadEmail.splice(k,1),e.updateAdminField("hotelLeadEmail",e.siteProInfo.hotelLeadEmail)}const c=C(null),d=C(""),m=C("");function M(k){console.log("photoobj is: ",k),console.log("url",k.url),e.siteProInfo.logoUrl=k.url,e.updateAdminField("logoUrl",e.siteProInfo.logoUrl)}function u(k){console.log("photoobj is: ",k,"val is:"),console.log("url",k.url),e.siteProInfo.landingLogoUrl=k.url,e.updateAdminField("landingLogoUrl",e.siteProInfo.landingLogoUrl)}function L(k,w){console.log("photoobj is: ",k,w),e.siteProInfo.complex||(e.siteProInfo.complex=[]);const A=e.siteProInfo.complex.findIndex(z=>z.name===w.name);A!==-1?e.siteProInfo.complex[A].landingLogoUrl=k.url:e.siteProInfo.complex.push({name:w,landingLogoUrl:k.url}),e.updateAdminField("complex",e.siteProInfo.complex)}function O(k,w){console.log("photoobj is: ",k,w),e.siteProInfo.complex||(e.siteProInfo.complex=[]);const A=e.siteProInfo.complex.findIndex(z=>z.name===w.name);A!==-1?e.siteProInfo.complex[A].logoUrl=k.url:e.siteProInfo.complex.push({name:w,logoUrl:k.url}),e.updateAdminField("complex",e.siteProInfo.complex)}return zn(()=>{d.value="url",m.value="images"}),(k,w)=>(I(),T("div",Xu,[f(e).siteProInfo.complex.length==0?(I(),T("div",Vu,[ju,n("div",Hu,[yn(On,{id:"images",style:{width:"40px","max-height":"250px"},docRef:c.value,storageBucket:m.value,iconColor:"orange",onUrlSaved:M},null,8,["docRef","storageBucket"]),f(e).siteProInfo.logoUrl?(I(),T("img",{key:0,src:f(e).siteProInfo.logoUrl,
6style:{width:"60px","margin-left":"20px",height:"60px","border-radius":"0.5rem"}},null,8,qu)):W("",!0)])])):W("",!0),f(e).siteProInfo.complex.length==0?(I(),T("div",Gu,[Yu,n("div",Wu,[yn(On,{id:"landing-page-image",style:{width:"40px","max-height":"250px"},docRef:c.value,storageBucket:m.value,iconColor:"orange",onUrlSaved:u},null,8,["docRef","storageBucket"]),f(e).siteProInfo.landingLogoUrl?(I(),T("img",{key:0,src:f(e).siteProInfo.landingLogoUrl,style:{width:"60px","margin-left":"20px",height:"60px","border-radius":"0.5rem","background-color":"white"}},null,8,Ku)):W("",!0)])])):W("",!0),f(e).siteProInfo.complex.length>0?(I(),T("div",Qu,[(I(!0),T(Ae,null,ke(f(e).siteProInfo.complex,A=>(I(),T("div",Ju,[Mt(le(A.name)+" ",1),R(n("input",{onInput:z=>f(t)("complex",f(e).siteProInfo.complex),placeholder:"webdomain","onUpdate:modelValue":z=>A.webdomain=z},null,40,e1),[[Q,A.webdomain]]),R(n("input",{onInput:z=>f(t)("complex",f(e).siteProInfo.complex),placeholder:"hotelName","onUpdate:modelValue":z=>A.hotelName=z},null,40,t1),[[Q,A.hotelName]]),n1,yn(On,{id:"landing-page-image",style:{width:"30px","max-height":"250px"},docRef:c.value,storageBucket:m.value,iconColor:"orange",onUrlSaved:z=>L(z,A)},null,8,["docRef","storageBucket","onUrlSaved"]),A.landingLogoUrl?(I(),T("img",{key:0,src:A.landingLogoUrl,style:{width:"60px","margin-left":"20px",height:"60px","background-color":"white"}},null,8,o1)):W("",!0),s1,yn(On,{id:"images",style:{width:"30px","max-height":"250px"},docRef:c.value,storageBucket:m.value,iconColor:"orange",onUrlSaved:z=>O(z,A)},null,8,["docRef","storageBucket","onUrlSaved"]),A.logoUrl?(I(),T("img",{key:1,src:A.logoUrl,style:{width:"60px","margin-left":"20px",height:"60px"}},null,8,a1)):W("",!0),i1,R(n("select",{id:"mainstart-select","onUpdate:modelValue":z=>A.mainStart=z,onChange:z=>f(t)("complex",f(e).siteProInfo.complex)},[(I(!0),T(Ae,null,ke(f(e).spaceInfo,z=>(I(),T("option",{key:z,value:z},le(z.name),9,r1))),128))],40,l1),[[ot,A.mainStart]]),A.mainStart?(I(),T("p",c1,"Selected: "+le(A.mainStart.name),1)):W("",!0),f(e).spaceInfo[f(e).selectedSpace]?(I(),T("p",d1,"Current Source: "+le(f(e).spaceInfo[f(e).selectedSpace].name),1)):W("",!0)]))),256))])):W("",!0),n("div",u1,[n("div",p1,[R(n("input",{id:"inroomdiningtab","onUpdate:modelValue":w[0]||(w[0]=A=>f(e).siteProInfo.mobileDiningNewTab=A),onChange:w[1]||(w[1]=A=>f(t)("mobileDiningNewTab",f(e).siteProInfo.mobileDiningNewTab)),type:"checkbox",placeholder:"Mobile Dining Link"},null,544),[[Dt,f(e).siteProInfo.mobileDiningNewTab]]),h1]),n("div",m1,[f1,R(n("input",{id:"inroomdining","onUpdate:modelValue":w[2]||(w[2]=A=>f(e).siteProInfo.mobileDiningLink=A),type:"text",onInput:w[3]||(w[3]=A=>f(t)("mobileDiningLink",f(e).siteProInfo.mobileDiningLink)),placeholder:"Mobile Dining Link"},null,544),[[Q,f(e).siteProInfo.mobileDiningLink]])]),n("div",g1,[R(n("input",{id:"maxSetsCheck","onUpdate:modelValue":w[4]||(w[4]=A=>f(e).siteProInfo.useMaxSets=A),onChange:w[5]||(w[5]=A=>f(t)("useMaxSets",f(e).siteProInfo.useMaxSets)),type:"checkbox",placeholder:"Use Max sets"},null,544),[[Dt,f(e).siteProInfo.useMaxSets]]),v1]),n("div",w1,[R(n("input",{id:"maxSetsCheck","onUpdate:modelValue":w[6]||(w[6]=A=>f(e).siteProInfo.vistaBase=A),onChange:w[7]||(w[7]=A=>f(t)("vistaBase",f(e).siteProInfo.vistaBase)),type:"checkbox",placeholder:"Use Max sets"},null,544),[[Dt,f(e).siteProInfo.vistaBase]]),b1]),n("div",y1,[_1,R(n("select",{id:"typeselect","onUpdate:modelValue":w[8]||(w[8]=A=>f(e).siteProInfo.venueType=A),onChange:w[9]||(w[9]=A=>f(t)("venueType",f(e).siteProInfo.venueType))},x1,544),[[ot,f(e).siteProInfo.venueType]])]),n("div",S1,[M1,R(n("select",{id:"planselect","onUpdate:modelValue":w[10]||(w[10]=A=>f(e).siteProInfo.plan=A),onChange:w[11]||(w[11]=A=>f(t)("plan",f(e).siteProInfo.plan))},P1,544),[[ot,f(e).siteProInfo.plan]])]),n("div",k1,[E1,n("div",z1,[R(n("input",{id:"venueContacts","onUpdate:modelValue":w[12]||(w[12]=A=>o.value=A),type:"email",placeholder:"Enter an email and press Add"},null,512),[[Q,o.value]]),n("button",{class:"addContact",onClick:a},"Add")]),n("ul",null,[(I(!0),T(Ae,null,ke(f(e).siteProInfo.hotelLeadEmail,(A,z)=>(I(),T("div",{class:"contactEmail",key:z},[Mt(" O "+le(A)+" ",1),n("button",{class:"removeButton",onClick:G=>s(z)},$1,8,D1)]))),128))])]),n("div",R1,[Z1,R(n("input",{id:"map","onUpdate:modelValue":w[13]||(w[13]=A=>f(e).siteProInfo.mapLink=A),type:"text",onInput:w[14]||(w[14]=A=>f(t)("mapLink",f(e).siteProInfo.mapLink))},null,544),[[Q,f(e).siteProInfo.mapLink]])]),n("div",U1,[B1,R(n("input",{id:"map","onUpdate:modelValue":w[15]||(w[15]=A=>f(e).siteProInfo.cventPropId=A),type:"text",onInput:w[16]||(w[16]=A=>f(t)("cventPropId",f(e).siteProInfo.cventPropId))},null,544),[[Q,f(e).siteProInfo.cventPropId]])])])]))}},N1=Yt(F1,[["__scopeId","data-v-5d563e9b"]]);const Qe=x=>(on("data-v-aab264f2"),x=x(),sn(),x),X1={class:"venueInfo"},V1={class:"venueFields"},j1={class:"venueCheckField"},H1=Qe(()=>n("label",{for:"maxSetsCheck"},"Use Max Sets In SmartBar",-1)),q1={class:"addDocs"},G1={class:"uploadDoc"},Y1=Qe(()=>n("label",{class:"upload-btn",for:"file"},"Upload Object",-1)),W1={key:0},K1={class:"venueInputField"},Q1=Qe(()=>n("label",{for:"typeselect"},"Select Chair Model",-1)),J1=["value"],e0={class:"venueInputField"},t0=Qe(()=>n("label",{for:"typeselect"},"Select Classroom Table Model",-1)),n0=["value"],o0={class:"venueInputField"},s0=Qe(()=>n("label",{for:"typeselect"},"Select Conference Table Model",-1)),a0=["value"],i0={class:"venueInputField"},l0=Qe(()=>n("label",{for:"typeselect"},"Select U-Shape Table Model",-1)),r0=["value"],c0={class:"venueInputField"},d0=Qe(()=>n("label",{for:"typeselect"},"Select Hollow Table Model",-1)),u0=["value"],p0={class:"venueInputField"},h0=Qe(()=>n("label",{for:"typeselect"},"Select Rounds Table Model",-1)),m0=["value"],f0={class:"venueInputField"},g0=Qe(()=>n("label",{for:"typeselect"},"Select Crescents Table Model",-1)),v0=["value"],w0={class:"venueInputField"},b0=Qe(()=>n("label",{for:"typeselect"},"Select Reception Table Model",-1)),y0=["value"],_0={class:"venueInputField"},C0=Qe(()=>n("label",{for:"typeselect"},"Select Screen 1 Model",-1)),x0=["value"],S0={class:"venueInputField"},M0=Qe(()=>n("label",{for:"typeselect"},"Select Screen 2 Model",-1)),A0=["value"],I0={class:"venueInputField"}
6,T0=Qe(()=>n("label",{for:"typeselect"},"Select Podium Model",-1)),L0=["value"],P0={class:"venueInputField"},k0=Qe(()=>n("label",{for:"typeselect"},"Select Stage Model",-1)),E0=["value"],z0=["onClick"],D0={key:0,class:"editor-content"},O0={key:0},$0=Qe(()=>n("label",null,"X:",-1)),R0=["onUpdate:modelValue"],Z0=Qe(()=>n("label",null,"Y:",-1)),U0=["onUpdate:modelValue"],B0=Qe(()=>n("label",null,"Z:",-1)),F0=["onUpdate:modelValue"],N0=Qe(()=>n("label",null,"Scale X:",-1)),X0=["onUpdate:modelValue"],V0=Qe(()=>n("label",null,"Scale Y:",-1)),j0=["onUpdate:modelValue"],H0=Qe(()=>n("label",null,"Scale Z:",-1)),q0=["onUpdate:modelValue"],G0=["onClick"],Y0=["onClick"],W0={class:"save-actions"},K0=["onClick"],Q0={class:"locInputField3"},J0={class:"locContactField"},ep=Qe(()=>n("label",null,"Display Name",-1)),tp=["onUpdate:modelValue"],np={class:"locContactField"},op=Qe(()=>n("label",null,"File Name",-1)),sp={class:"locContactField"},ap=Qe(()=>n("label",null,"Size in meters (x)",-1)),ip=["onUpdate:modelValue"],lp={class:"locContactField"},rp=Qe(()=>n("label",null,"Size in meters (y)",-1)),cp=["onUpdate:modelValue"],dp={class:"locContactField"},up=Qe(()=>n("label",null,"Size in meters (z)",-1)),pp=["onUpdate:modelValue"],hp=["onClick"],mp=["onClick"],fp={__name:"MaxSetsAdmin",setup(x){var q,Te,Re,ne,$,ee,De,Me,je,We,ht;const e=Pn(),t=Gt(),o=C([]),a=C(),r=C(0),s=C(((q=t.siteProInfo.chairObjSel)==null?void 0:q.id)??""),c=C(((Te=t.siteProInfo.classroomTableObjSel)==null?void 0:Te.id)??""),d=C(((Re=t.siteProInfo.conferenceTableObjSel)==null?void 0:Re.id)??""),m=C(((ne=t.siteProInfo.ushapeTableObjSel)==null?void 0:ne.id)??""),M=C((($=t.siteProInfo.hollowTableObjSel)==null?void 0:$.id)??""),u=C(((ee=t.siteProInfo.roundsTableObjSel)==null?void 0:ee.id)??""),L=C(((De=t.siteProInfo.crescentsTableObjSel)==null?void 0:De.id)??""),O=C(((Me=t.siteProInfo.podiumObjSel)==null?void 0:Me.id)??""),k=C(((je=t.siteProInfo.stageObjSel)==null?void 0:je.id)??""),w=C(((We=t.siteProInfo.screenObjSel)==null?void 0:We.id)??""),A=C(((ht=t.siteProInfo.screen2ObjSel)==null?void 0:ht.id)??"");C(!1),C(null),C([]);const z=C([{obj:t.siteProInfo.stageObjSel,fieldName:"stageObjSel"},{obj:t.siteProInfo.screenObjSel,fieldName:"screenObjSel"},{obj:t.siteProInfo.screen2ObjSel,fieldName:"screen2ObjSel"}]),G=C(z.value.map(()=>!0)),re=_e=>{G.value[_e]=!G.value[_e]},v=(_e,V)=>{_e&&V?(te(V,_e),t.showToast("Changes saved successfully")):console.error("Missing object or field name for saveChanges")},te=qt(t.updateAdminField,500);function ge(_e,V,P,ye,be,Ce){const fe=t.propSetObjects.find(ze=>ze.id===Ce);fe?(fe.tableType=_e,fe.tableChairs=V,fe.seats=P,te(ye,fe),t.showToast("Updated Selection")):(console.error("Selected object not found"),t.showToast("Failed to update selection"))}const $e=_e=>{_e.brandPos||(_e.brandPos=[]),_e.brandPos.push({oX:0,oY:0,oZ:0,sX:1,sY:1,sZ:1})},Fe=(_e,V)=>{_e.brandPos&&_e.brandPos.splice(V,1)},ue=C(null),Ie=async _e=>{try{const V=en(un,"setObjects",_e.id);await po(V,{displayName:_e.displayName,tableType:_e.tableType,size:_e.size}),console.log("Document successfully updated!")}catch(V){console.error("Error updating document: ",V)}},pe=async _e=>{try{const V=en(un,"setObjects",_e.id);await Fs(V),console.log("Document successfully deleted!");const P=Mn(e,`setObjects/${_e.name}`);await Vs(P),console.log("File successfully deleted from storage!"),t.propSetObjects=t.propSetObjects.filter(ye=>ye.id!==_e.id)}catch(V){console.error("Error deleting document or file: ",V)}};C(null);const Ye=C(!1),Ee=_e=>{t.uploadModelSize=null,t.modelUploadSceneObject&&(t.modelUploadSceneObject.stop(),t.modelUploadSceneObject=null,t.modelUploadSubs.forEach(Ce=>Ce.cancel()),t.modelUploadSubs=[]);const V=_e.target.files[0];if(!V)return;const P=V.name;console.log("File name:",P);const ye=Mn(e,`setObjects/${V.name}`),be=kn(ye,V);be.on("state_changed",Ce=>{const fe=Ce.bytesTransferred/Ce.totalBytes*100;console.log("Upload is "+fe+"% done"),ue.value=fe.toFixed(2)},Ce=>{console.error("Error during upload: ",Ce),ue.value=null},()=>{En(be.snapshot.ref).then(async Ce=>{await he(Ce),console.log("upload model size124",t.uploadModelSize),await new Promise((ze,ce)=>{let kt=1e3,mt=5e3,dt=0;const At=setInterval(()=>{dt+=kt,t.uploadModelSize!==null?(console.log("upload model size is set:",t.uploadModelSize),clearInterval(At),t.modelUploadSceneObject&&(t.modelUploadSceneObject.stop(),t.modelUploadSceneObject=null,t.modelUploadSubs.forEac
6h(zt=>zt.cancel()),t.modelUploadSubs=[]),ze()):dt>=mt?(console.log("Timed out waiting for uploadModelSize"),clearInterval(At),ce(new Error("Timed out waiting for uploadModelSize"))):console.log("Waiting for uploadModelSize...")},kt)}).then(()=>{console.log("Final upload model size:",t.uploadModelSize)}).catch(ze=>{console.error("Error:",ze)});const fe={name:P,displayName:P,url:Ce,loader:"",tableType:"theater",tableChairs:0,type:"",seats:1,id:pt(),size:{x:t.uploadModelSize.x||.608,y:t.uploadModelSize.y||.608,z:t.uploadModelSize.z||.608}};console.log("Adding document:",fe),console.log("add obj from url:",Ce);try{const ze=await Ns(Nn(un,"setObjects"),fe);await po(ze,{id:ze.id}),console.log("Document successfully added with ID: ",ze.id)}catch(ze){console.error("Error adding document: ",ze)}t.propSetObjects.push(fe),ue.value=null,Ye.value=!1})}),Ye.value=!1};async function he(_e){class V{constructor(Ce,fe){this.path=Ce,this.node=fe}onEvent(Ce){Ce.input.type=="hover",Ce.input.type=="unhover"||(Ce.input.type=="click"?console.log("Clicked emit"):Ce.input.type==="dragend"&&console.log("Drag ended"))}}class P{constructor(Ce,fe){this.path=Ce,this.node=fe}onEvent(Ce){(Ce.input.type="modelSize")&&(console.log("modelSize123",Ce.input.modelSize),Ce.input.modelSize&&(t.uploadModelSize=Ce.input.modelSize,console.log("modelSize54",Ce.input.modelSize),console.log("uploadModelSize",t.uploadModelSize)))}}o.value=[],console.log("adding url obj to get size",_e);let ye=0;if(t.modelUploadSceneObject)console.log("modelUploadSceneObject.stop()"),t.modelUploadSceneObject.stop(),t.modelUploadSceneObject=null,t.modelUploadSubs.forEach(be=>be.cancel()),t.modelUploadSubs=[];else{await t.mpSdk.Scene.registerComponents([{factory:no(t.mpSdk),name:In}]),console.log("creating wallsceneobj"),t.modelUploadSceneObject=(await t.mpSdk.Scene.createObjects(1))[0],console.log("creating wallsceneobj"),o.value[ye]=await t.modelUploadSceneObject.addNode();const be=await o.value[ye].addComponent(In,{url:_e});console.log("wallnodecomp",be,"wallnode123",o.value[ye]);const Ce=await t.modelUploadSceneObject.addEmitPath(be,"gltfevents"),fe=t.modelUploadSceneObject.spyOnEvent(new V(Ce,o.value[ye])),ze=await t.modelUploadSceneObject.addEmitPath(be,"gltfevents2"),ce=t.modelUploadSceneObject.spyOnEvent(new P(ze,o.value[ye]));t.modelUploadSubs.push(fe),t.modelUploadSubs.push(ce);const kt=await t.modelUploadSceneObject.addEmitPath(be,"gltfevents","wallNodeComp_"+ye),mt=await t.modelUploadSceneObject.addEmitPath(be,"gltfevents2","wallNodeComp2_"+ye);class dt{constructor(){mn(this,"path",kt)}onEvent(i){console.log("click evnet12 log"),i.input.type=="hover",i.input.type=="unhover"&&(console.log("userNavigationEnabled = true"),t.inputComponent.inputs.userNavigationEnabled=!0),i.input.type=="click"&&(console.log("click evnet log"),a.value.inputs.mode="translate",a.value.inputs.selection==null?(a.value.inputs.selection=o.value[ye],selID.value=o.value[ye].docid,console.log("selID",o.value[ye]),rotateDeg.value=(o.value[ye].obj3D.rotation.y*(180/Math.PI)).toFixed(2),picker.value=ye):a.value.inputs.selection=null,t.inputComponent.inputs.userNavigationEnabled=!0)}}const At=t.modelUploadSceneObject.spyOnEvent(new dt);t.modelUploadSubs.push(At),console.log("registered gltf");class zt{constructor(){mn(this,"path",mt)}onEvent(i){console.log("click evnet12 log"),(i.input.type="modelSize")&&(console.log("modelSize123",i.input.modelSize),i.input.modelSize&&(t.uploadModelSize=i.input.modelSize,console.log("modelSize52",i.input.modelSize),console.log("uploadModelSize",t.uploadModelSize)))}}const oe=t.modelUploadSceneObject.spyOnEvent(new zt);t.modelUploadSubs.push(oe),console.log("registered gltf2");const Xt=t.modelUploadSceneObject.addNode();a.value=Xt.addComponent("mp.transformControls",{mode:"scale",selection:null,size:1}),t.modelUploadSceneObject.addNode().addComponent("mp.ambientLight",{intensity:1,color:{r:1,g:1,b:1}}),t.modelUploadSceneObject.start(),console.log("Object root",be.outputs)}a.value.inputs.selection=null,r.value=0}return(_e,V)=>(I(),T("div",X1,[n("div",V1,[n("div",j1,[R(n("input",{id:"maxSetsCheck","onUpdate:modelValue":V[0]||(V[0]=P=>f(t).siteProInfo.useMaxSets=P),onChange:V[1]||(V[1]=P=>f(te)("useMaxSets",f(t).siteProInfo.useMaxSets)),type:"checkbox",placeholder:"Use Max sets"},null,544),[[Dt,f(t).siteProInfo.useMaxSets]]),H1]),n("div",q1,[n("div",G1,[Y1,n("input",{type:"file",id:"file",onChange:Ee,accept:".gltf,.glb",style:{display:"none"}},null,32),ue.value!==null?(I(),T("div",W1," Upload Progress: "+le(ue.value)+"% ",1)):W("",!0)])]),n("div",K1,[Q1,R(n("select",{"onUpdate:modelValue":V[2]||(V[2]=P=>s.value=P),id:"typeselect",onChange:V[3]||(V[3]=P=>ge("theater",0,1,"chairObjSel",f(t).siteProInfo.chairObjSel,s.value))},[(I(!0),T(Ae,null,ke(f(t).propSetObjects,P=>(I(),T("option",{key:P.id,value:P.id},le(P.displayName)+le(P.id),9,J1))),128))],544),[[ot,s.value]])]),n("div",e0,[t0,R(n("select",{"onUpdate:modelValue":V[4]||(V[4]=P=>c.value=P),id:"typeselect",onChange:V[5]||(V[5]=P=>ge("classroom",3,0,"classroomTableObjSel",f(t).siteProInfo.classroomTableObjSel,c.value))},[(I(!0),T(Ae,null,ke(f(t).propSetObjects,P=>(I(),T("option",{key:P.id,value:P.id},le(P.displayName),9,n0))),128))],544),[[ot,c.value]])]),n("div",o0,[s0,R(n("select",{"onUpdate:modelValue":V[6]||(V[6]=P=>d.value=P),id:"typeselect",onChange:V[7]||(V[7]=P=>ge("conference",3,0,"conferenceTableObjSel",f(t).siteProInfo.conferenceTableObjSel,d.value))},[(I(!0),T(Ae,null,ke(f(t).propSetObjects,P=>(I(),T("option",{key:P.id,value:P.id},le(P.displayName),9,a0))),128))],544),[[ot,d.value]])]),n("div",i0,[l0,R(n("select",{"onUpdate:modelValue":V[8]||(V[8]=P=>m.value=P),id:"typeselect",onChange:V[9]||(V[9]=P=>ge("ushape",3,0,"ushapeTableObjSel",f(t).siteProInfo.ushapeTableObjSel,m.value))},[(I(!0),T(Ae,null,ke(f(t).propSetObjects,P=>(I(),T("option",{key:P.id,value:P.id},le(P.displayName),9,r0))),128))],544),[[ot,m.value]])]),n("div",c0,[d0,R(n("select",{"onUpdate:modelValue":V[10]||(V[10]=P=>M.value=P),id:"typeselect",onChange:V[11]||(V[11]=P=>ge("hollowsquare",3,0,"hollowTableObjSel",f(t).siteProInfo.hollowTableObjSel,M.value))},[(I(!0),T(Ae,null,ke(f(t).propSetObjects,P=>(I(),T("option",{key:P.id,value:P.id},le(P.displayName),9,u0))),128))],544),[[ot,M.value]])]),n("div",p0,[h0,R(n("select",{"onUpdate:modelValue":V[12]||(V[12]=P=>u.value=P),id:"typeselect",onChange:V[13]||(V[13]=P=>ge("round",10,0,"roundsTableObjSel",f(t).siteProInfo.roundsTableObjSel,u.value))},[(I(!0),T(Ae,null,ke(f(t).propSetObjects,P=>(I(),T("option",{key:P.id,value:P.id},le(P.displayName),9,m0))),128))],544),[[ot,u.value]])]),n("div",f0,[g0,R(n("select",{"onUpdate:modelValue":V[14]||(V[14]=P=>L.value=P),id:"typeselect",onChange:V[15]||(V[15]=P=>ge("crescent",6,0,"crescentsTableObjSel",f(t).siteProInfo.crescentsTableObjSel,L.value))},[(I(!0),T(Ae,null,ke(f(t).propSetObjects,P=>(I(),T("option",{key:P.id,value:P.id},le(P.displayName),9,v0))),128))],544),[[ot,L.value]])]),n("div",w0,[b0,R(n("select",{"onUpdate:modelValue":V[16]||(V[16]=P=>_e.receptionTableSelID=P),id:"typeselect",onChange:V[17]||(V[17]=P=>ge("reception",0,7,"receptionTableObjSel",f(t).siteProInfo.receptionTableObjSel,_e.receptionTableSelID))},[(I(!0),T(Ae,null,ke(f(t).propSetObjects,P=>(I(),T("option",{key:P.id,value:P.id},le(P.displayName),9,y0))),128))],544),[[ot,_e.receptionTableSelID]])]),n("div",_0,[C0,R(n("select",{"onUpdate:modelValue":V[18]||(V[18]=P=>w.value=P),id:"typeselect",onChange:V[19]||(V[19]=P=>ge("screen",0,0,"screenObjSel",f(t).siteProInfo.screenObjSel,w.value))},[(I(!0),T(Ae,null,ke(f(t).propSetObjects,P=>(I(),T("option",{key:P.id,value:P.id},le(P.displayName),9,x0))),128))],544),[[ot,w.value]])]),n("div",S0,[M0,R(n("select",{"onUpdate:modelValue":V[20]||(V[20]=P=>A.value=P),id:"typeselect",onChange:V[21]||(V[21]=P=>ge("screen",0,0,"screen2ObjSel",f(t).siteProInfo.screen2ObjSel,A.value))},[(I(!0),T(Ae,null,ke(f(t).propSetObjects,P=>(I(),T("option",{key:P.id,value:P.id},le(P.displayName),9,A0))),128))],544),[[ot,A.value]])]),n("div",I0,[T0,R(n("select",{"onUpdate:modelValue":V[22]||(V[22]=P=>O.value=P),id:"typeselect",onChange:V[23]||(V[23]=P=>ge("podium",0,0,"podiumObjSel",f(t).siteProInfo.podiumObjSel,O.value))},[(I(!0),T(Ae,null,ke(f(t).propSetObjects,P=>(I(),T("option",{key:P.id,value:P.id},le(P.displayName),9,L0))),128))],544),[[ot,O.value]])]),n("div",P0,[k0,R(n("select",{"onUpdate:modelValue":V[24]||(V[24]=P=>k.value=P),id:"typeselect",onChange:V[25]||(V[25]=P=>
6ge("stage",0,0,"stageObjSel",f(t).siteProInfo.stageObjSel,k.value))},[(I(!0),T(Ae,null,ke(f(t).propSetObjects,P=>(I(),T("option",{key:P.id,value:P.id},le(P.displayName),9,E0))),128))],544),[[ot,k.value]])]),f(t).siteProInfo.stageObjSel&&f(t).siteProInfo.screenObjSel&&f(t).siteProInfo.screen2ObjSel?(I(!0),T(Ae,{key:0},ke(z.value,(P,ye)=>(I(),T("div",{key:ye,class:"venueInputField"},[n("div",{class:"editor-header",onClick:be=>re(ye)},[n("h3",null,[Mt(" Edit Branding Positions for "+le(P.obj.displayName)+" ",1),n("span",null,le(G.value[ye]?"▼":"▲"),1)])],8,z0),G.value[ye]?W("",!0):(I(),T("div",D0,[P.obj.brandPos&&P.obj.brandPos.length>0?(I(),T("div",O0,[(I(!0),T(Ae,null,ke(P.obj.brandPos,(be,Ce)=>(I(),T("div",{key:Ce,class:"brandPos-input"},[n("label",null,"Brand Position "+le(Ce+1),1),n("div",null,[$0,R(n("input",{"onUpdate:modelValue":fe=>be.oX=fe,type:"number",placeholder:"Offset X"},null,8,R0),[[Q,be.oX,void 0,{number:!0}]]),Z0,R(n("input",{"onUpdate:modelValue":fe=>be.oY=fe,type:"number",placeholder:"Offset Y"},null,8,U0),[[Q,be.oY,void 0,{number:!0}]]),B0,R(n("input",{"onUpdate:modelValue":fe=>be.oZ=fe,type:"number",placeholder:"Offset Z"},null,8,F0),[[Q,be.oZ,void 0,{number:!0}]])]),n("div",null,[N0,R(n("input",{"onUpdate:modelValue":fe=>be.sX=fe,type:"number",placeholder:"Scale X"},null,8,X0),[[Q,be.sX,void 0,{number:!0}]]),V0,R(n("input",{"onUpdate:modelValue":fe=>be.sY=fe,type:"number",placeholder:"Scale Y"},null,8,j0),[[Q,be.sY,void 0,{number:!0}]]),H0,R(n("input",{"onUpdate:modelValue":fe=>be.sZ=fe,type:"number",placeholder:"Scale Z"},null,8,q0),[[Q,be.sZ,void 0,{number:!0}]])]),n("button",{onClick:fe=>Fe(P.obj,Ce)},"Remove",8,G0)]))),128))])):W("",!0),n("button",{onClick:be=>$e(P.obj)},"Add Another Branding Position",8,Y0),n("div",W0,[n("button",{onClick:be=>v(P.obj,P.fieldName)},"Save Changes",8,K0)])]))]))),128)):W("",!0),(I(!0),T(Ae,null,ke(f(t).propSetObjects,P=>(I(),T("div",{key:P.id,class:"ctaOverideBox"},[n("div",Q0,[n("div",J0,[ep,R(n("input",{"onUpdate:modelValue":ye=>P.displayName=ye,placeholder:"Display Name"},null,8,tp),[[Q,P.displayName]])]),n("div",np,[op,n("label",null,le(P.name),1)]),n("div",sp,[ap,R(n("input",{"onUpdate:modelValue":ye=>P.size.x=ye,type:"number"},null,8,ip),[[Q,P.size.x]])]),n("div",lp,[rp,R(n("input",{"onUpdate:modelValue":ye=>P.size.y=ye,type:"number"},null,8,cp),[[Q,P.size.y]])]),n("div",dp,[up,R(n("input",{"onUpdate:modelValue":ye=>P.size.z=ye,type:"number"},null,8,pp),[[Q,P.size.z]])]),n("button",{onClick:ye=>Ie(P)},"Save",8,hp),n("button",{onClick:ye=>pe(P)},"Remove",8,mp)])]))),128))])]))}},gp=Yt(fp,[["__scopeId","data-v-aab264f2"]]),vp=n("h2",null,"Upload 360 Image",-1),wp=["disabled"],bp={key:0},yp={key:1},_p=n("h2",null,"Uploaded Panoramas",-1),Cp=["onClick"],xp={__name:"Admin360Edit",setup(x){const e=C(null),t=C(!1),o=C(0),a=C(null),r=C([]),s=Gt(),c=Pn(),d=Bn();zn(async()=>{await m()});const m=async()=>{const k=await Xs(Nn(d,"panoramas"));r.value=k.docs.map(w=>({id:w.id,...w.data()}))},M=k=>{e.value=k.target.files[0]},u=async()=>{if(!e.value)return;const k=pt(),w=C(c,`360-images/${e.value.name}`),A=kn(w,e.value);t.value=!0,A.on("state_changed",z=>{o.value=Math.floor(z.bytesTransferred/z.totalBytes*100)},z=>{a.value=z.message,t.value=!1},async()=>{try{const z=await En(A.snapshot.ref);await L(z,k),await m()}catch(z){a.value="Error saving to Firestore: "+z.message}})},L=async(k,w)=>{const A=en(d,"panoramas",w);try{await Po(A,{imageUrl:k,name:e.value.name,createdAt:new Date}),t.value=!1,o.value=0,e.value=null}catch(z){a.value="Error saving to Firestore: "+z.message}},O=k=>{s.selectedPanoramaId=k};return(k,w)=>(I(),T(Ae,null,[n("div",null,[vp,n("input",{type:"file",onChange:M,accept:"image/*"},null,32),n("button",{onClick:u,disabled:!e.value},"Upload",8,wp),t.value?(I(),T("p",bp,"Uploading: "+le(o.value)+"%",1)):W("",!0),a.value?(I(),T("p",yp,le(a.value),1)):W("",!0)]),n("div",null,[_p,n("ul",null,[(I(!0),T(Ae,null,ke(r.value,A=>(I(),T("li",{key:A.id},[Mt(le(A.name)+" ",1),n("button",{onClick:z=>O(A.id)},"View",8,Cp)]))),128))])])],64))}};const $t=x=>(on("data-v-f41c645d"),x=x(),sn(),x),Sp={key:0},Mp={class:"pills"},Ap={class:"menu-container"},Ip=["onClick"],Tp={style:{display:"flex","align-items":"center"}
6,width:"8",height:"12",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Lp=$t(()=>n("path",{d:"M4.46338 9.85059C4.50698 9.8977 4.55986 9.93529 4.61868 9.961C4.6775 9.98671 4.74098 10 4.80518 10C4.86937 10 4.93288 9.98671 4.9917 9.961C5.05052 9.93529 5.10337 9.8977 5.14697 9.85059L5.83057 9.13379C5.92179 9.03713 5.97263 8.90928 5.97263 8.77637C5.97263 8.64346 5.92179 8.51555 5.83057 8.41888L2.53558 5.01367L5.85788 1.58008C5.94916 1.48327 6 1.35529 6 1.22223C6 1.08917 5.94916 0.961129 5.85788 0.864319L5.17429 0.147522C5.13045 0.100804 5.0775 0.0635404 5.01871 0.0380859C4.95992 0.0126313 4.89655 -0.000488378 4.83249 -0.000488383C4.76843 -0.000488389 4.70503 0.0126313 4.64624 0.0380858C4.58745 0.0635403 4.53453 0.100804 4.49069 0.147522L0.140687 4.65527C0.0502858 4.75273 6.14827e-05 4.88074 6.14711e-05 5.01367C6.14595e-05 5.1466 0.0502858 5.27461 0.140686 5.37207L4.46338 9.85059Z",fill:"white"},null,-1)),Pp=[Lp],kp={style:{display:"flex","align-items":"center"},width:"8",height:"12",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ep=$t(()=>n("path",{d:"M1.53662 0.149414C1.49302 0.1023 1.44014 0.0647104 1.38132 0.0390015C1.3225 0.0132926 1.25902 0 1.19482 0C1.13063 0 1.06712 0.0132926 1.0083 0.0390015C0.949481 0.0647104 0.896627 0.1023 0.853027 0.149414L0.169434 0.866211C0.0782118 0.962872 0.0273743 1.09072 0.0273743 1.22363C0.0273743 1.35654 0.0782118 1.48445 0.169434 1.58112L3.46442 4.98633L0.14212 8.41992C0.0508384 8.51673 0 8.64471 0 8.77777C0 8.91083 0.0508384 9.03887 0.14212 9.13568L0.825714 9.85248C0.869548 9.8992 0.922505 9.93646 0.981293 9.96191C1.04008 9.98737 1.10345 10.0005 1.16751 10.0005C1.23157 10.0005 1.29497 9.98737 1.35376 9.96191C1.41255 9.93646 1.46547 9.8992 1.50931 9.85248L5.85931 5.34473C5.94971 5.24727 5.99994 5.11926 5.99994 4.98633C5.99994 4.8534 5.94971 4.72538 5.85931 4.62793L1.53662 0.149414Z",fill:"white"},null,-1)),zp=[Ep],Dp=$t(()=>n("div",{class:"adminSpaceBar"},[n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"500",height:"1",viewBox:"0 0 550 1",fill:"none"},[n("path",{opacity:"0.2",d:"M0 0H550V1H0V0Z",fill:"#F2F1ED"})])],-1)),Op={key:4},$p={class:"form-group",style:{display:"flex","flex-direction":"column","justify-content":"start","align-items":"start"}},Rp=$t(()=>n("label",{for:"menusList"},"Menus",-1)),Zp=$t(()=>n("label",{for:"menusList"},"Menu Order",-1)),Up={class:"listItem"},Bp={class:"listText"},Fp=["onUpdate:modelValue"],Np=["onUpdate:modelValue"],Xp=$t(()=>n("button",{class:"editButton"},"Edit",-1)),Vp=["onClick"],jp={class:"form-group",style:{display:"flex","flex-direction":"column","justify-content":"start","align-items":"start"}},Hp=$t(()=>n("label",{for:"subCategoryList"},"SubCategory/SubMenu",-1)),qp=$t(()=>n("label",{for:"subCategoryList"},"SubMenu Order",-1)),Gp={class:"listItem"},Yp={class:"listText"},Wp=["onUpdate:modelValue"],Kp=["onUpdate:modelValue"],Qp=["onClick"],Jp={class:"form-group"},eh=$t(()=>n("label",{for:"complexsList"},"Complex",-1)),th={class:"listItem"},nh={class:"listText"},oh=$t(()=>n("button",{class:"editButton"},"Edit",-1)),sh=["onClick"],ah={key:0},ih={key:1},lh=$t(()=>n("div",{id:"sourceFloorDiv"},null,-1)),rh={__name:"AdminView",setup(x){const e=Gt();C(!1),C(!1),C(!1);const t=C(!1),o=en(un,"sitePro","info");Xo(o,ne=>{ne.exists()?e.siteProInfo=ne.data():console.error("No such document!")},ne=>{console.error("Error fetching document:",ne)});const a=qt(e.updateAdminField,500);C({name:"",url:"",type:"",loader:"",type:"",seats:1,size:{x:1,y:1,z:1}});const r=C({name:"",order:0}),s=C({name:"",order:0});function c(){console.log("mneu",r.value),r.value.name.trim()!==""&&(console.log(r.value),e.siteProInfo.menus.push(r.value),e.updateAdminField("menus",e.siteProInfo.menus),r.value={name:"",order:0})}function d(ne){e.siteProInfo.menus.splice(ne,1),e.updateAdminField("menus",e.siteProInfo.menus)}function m(){console.log("mneu",s.value),s.value.name.trim()!==""&&(console.log(s.value),e.siteProInfo.subMenus.push(s.value),e.updateAdminField("subMenus",e.siteProInfo.subMenus),s.value={name:"",order:0})}function M(ne){e.siteProInfo.subMenus.splice(ne,1),e.updateAdminField("subMenus",e.
6siteProInfo.subMenus)}const u=C("");function L(){console.log("menu",u.value),u.value.trim()!==""&&(console.log(u.value),e.siteProInfo.complex.push(u.value),e.updateAdminField("complex",e.siteProInfo.complex),u.value="")}function O(ne){e.siteProInfo.complex.splice(ne,1),e.updateAdminField("complex",e.siteProInfo.complex)}Gs(()=>{e.readWallsFromFire()}),zn(()=>{e.mpViewWidth="calc(100% - 500px)",e.mpViewLeft="500px"});const k=C(!1),w=C(0),A=C(null),z=C([]),G=C(null),re=C(!1),v=xn(()=>{var ne,$;return(($=(ne=e.siteProInfo)==null?void 0:ne.walls)==null?void 0:$.filter(ee=>ee.model===e.selectedModel))||[]});xn(()=>{const ne=e.spaceInfo[e.selectedSpace];return e.siteProInfo.walls.some($=>$.model===e.selectedModel)&&(e.currentMpMode==="mode.dollhouse"||ne.subCategory&&["ballrooms","salons"].includes(ne.subCategory.toLowerCase())||ne.breakoutAirwall&&["ballrooms","salons"].includes(ne.breakoutAirwall.toLowerCase()))});async function te(){console.log("walls?",v.value,e.selectedModel),ge(v.value,re.value),re.value=!re.value,console.log("toggle changed, showing/hiding walls",k.value)}async function ge(ne,$=!0){if(e.custWallsSub||(e.custWallsSub=[]),e.wallsceneObject&&(e.wallsceneObject.stop(),e.wallsceneObject=null,e.custWallsSub.forEach(ee=>ee.cancel()),e.custWallsSub=[],k.value=!1),!e.wallsceneObject&&$){await e.mpSdk.Scene.registerComponents([{factory:no(e.mpSdk),name:In}]),e.wallsceneObject=(await e.mpSdk.Scene.createObjects(1))[0],z.value=[];for(let Me=0;Me<ne.length;Me++){const je=ne[Me],We=e.wallsceneObject.addNode();We.obj3D.position.set(je.position.x,je.position.y,je.position.z),We.obj3D.scale.set(je.scale.x,je.scale.y,je.scale.z),je.rotation&&We.obj3D.rotation.set(je.rotation.x,je.rotation.y,je.rotation.z),We.url=je.url,We.materialColor=je.materialColor,z.value.push(We);const ht=We.addComponent(In,{url:je.url,wallRepeat:je.scale.z,materialColor:je.materialColor}),_e=await e.wallsceneObject.addEmitPath(ht,"gltfevents"),V=e.wallsceneObject.spyOnEvent(new $e(_e,We));e.custWallsSub.push(V);const P=await e.wallsceneObject.addEmitPath(ht,"gltfevents","wallNodeComp_"+Me);class ye{constructor(){mn(this,"path",P)}onEvent(fe){fe.input.type=="hover"&&console.log("userNavigationEnabled = false"),fe.input.type=="unhover"&&(console.log("userNavigationEnabled = true"),e.inputComponent.inputs.userNavigationEnabled=!0),fe.input.type=="click"&&(console.log("click evnet log"),G.value=Me,Fe(G.value),e.inputComponent.inputs.userNavigationEnabled=!0)}}const be=e.wallsceneObject.spyOnEvent(new ye);e.custWallsSub.push(be)}const ee=e.wallsceneObject.addNode();A.value=ee.addComponent("mp.transformControls",{mode:"scale",selection:null,size:1}),e.wallsceneObject.addNode().addComponent("mp.ambientLight",{intensity:1,color:{r:1,g:1,b:1}}),e.wallsceneObject.start(),k.value=!0}A.value&&(A.value.inputs.selection=null),w.value=0}class $e{constructor($,ee){this.path=$,this.node=ee}onEvent($){$.input.type=="hover",$.input.type=="unhover"?e.inputComponent.inputs.userNavigationEnabled=!0:$.input.type=="click"?console.log("Clicked emit"):$.input.type==="dragend"&&console.log("Drag ended")}}function Fe(ne){console.log("shrinkWall",ne,v.value[ne],v.value),v.value[ne].collapse=!v.value[ne].collapse,v.value[ne].collapse?v.value[ne].scale.z=e.hiddenWallSize:v.value[ne].scale.z=v.value[ne].extendedSizeZ,G.value=null,ge(v.value)}function ue(){t.value=!t.value,t.value?e.setLocBtnTransform="translateX(140%)":e.setLocBtnTransform="translateX(-50%)"}const Ie=C([{name:"MODELS"},{name:"VENUE INFO"},{name:"DOCUMENTS"},{name:"LOCATIONS"},{name:"LOCATIONS MENUS"},{name:"MAX SETS"},{name:"PANOS"}]);function pe(){e.adminPillIndex<Ie.value.length-1?e.adminPillIndex=e.adminPillIndex+1:e.adminPillIndex=0,console.log("increment",e.adminPillIndex,"len",Ie.value.length)}function Ye(){e.adminPillIndex>0?e.adminPillIndex=e.adminPillIndex-1:e.adminPillIndex=Ie.value.length-1,console.log("decrement",e.adminPillIndex,"len",Ie.value.length)}const Ee=C(null),he=85,q=xn(()=>e.adminPillIndex*he*.5);function Te(ne){e.adminPillIndex=ne,Re()}function Re(){const ne=Ie[e.adminPillIndex];if(ne&&Ee.value){const $=ne.getBoundingClientRect(),ee=Ee.value.getBoundingClientRect();($.left<ee.left||$.right>ee.right)&&(Ee.value.scrollLeft=ne.offsetLeft)}}return(ne,$)=>(I(),T(Ae,null,[f(e).isLoaded?(I(),T("div",Sp,[f(e).siteProInfo.plan!="Basic"?(I(),Zt(js,{key:0,role:"region","aria-label":"smartbar",style:{"max-width":"100%","max-height":"100%"},navTitle:"Space Info"})):W("",!0),n("button",{onClick:te,class:"centerWallBtn"},le(k.value?"Hide Air Walls":"Show AirWalls"),1),R(n("div",{class:An(["adminHiZ",{"adminHiZ-shifted":t.value}])},[n("h3",null,le(f(e).siteProInfo.hotelName)+": SitePro ver. "+le(f(e).siteProStatus.ver)+" | "+le(f(e).adminPillIndex),1),n("div",Mp,[n("div",Ap,[n("ul",{class:"menu-header-list",style:Vo({transform:`translateX(-${f(q)}px)`})},[(I(!0),T(Ae,null,ke(Ie.value,(ee,De)=>(I(),T("li",{key:De,class:An({active:De===f(e).adminPillIndex}),onClick:Me=>Te(De)},le(ee.name),11,Ip))),128))],4)]),n("button",{class:"pillButton-left","aria-label":"prev",onClick:Ye},[(I(),T("svg",Tp,Pp))]),n("button",{class:"pillButton-right","aria-label":"next",onClick:pe},[(I(),T("svg",kp,zp))])]),Dp,f(e).adminPillIndex==0?(I(),Zt(Oi,{key:0})):W("",!0),f(e).adminPillIndex==1?(I(),Zt(N1,{key:1})):W("",!0),f(e).adminPillIndex==2?(I(),Zt(vi,{key:2}
6)):W("",!0),f(e).adminPillIndex==3?(I(),Zt(ru,{key:3})):W("",!0),f(e).adminPillIndex==4?(I(),T("div",Op,[n("div",$p,[n("div",null,[Rp,R(n("input",{id:"menusList","onUpdate:modelValue":$[0]||($[0]=ee=>r.value.name=ee),type:"text"},null,512),[[Q,r.value.name]])]),n("div",null,[Zp,R(n("input",{id:"menusList","onUpdate:modelValue":$[1]||($[1]=ee=>r.value.order=ee),type:"text"},null,512),[[Q,r.value.order]])]),n("button",{class:"addButton",onClick:$[2]||($[2]=F(ee=>c(r.value),["prevent"]))},"Add")]),n("div",null,[n("div",null,[(I(!0),T(Ae,null,ke(f(e).siteProInfo.menus,(ee,De)=>(I(),T("li",Up,[n("span",Bp,[Mt(" Name: "+le(ee.name)+" | Order: "+le(ee.order),1),R(n("input",{"onUpdate:modelValue":Me=>ee.name=Me,onChange:$[3]||($[3]=Me=>f(a)("menus",f(e).siteProInfo.menus))},null,40,Fp),[[Q,ee.name]]),R(n("input",{"onUpdate:modelValue":Me=>ee.order=Me,onChange:$[4]||($[4]=Me=>f(a)("menus",f(e).siteProInfo.menus))},null,40,Np),[[Q,ee.order]])]),Xp,Mt(),n("button",{class:"removeButton",onClick:F(Me=>d(De),["prevent"])},"Remove",8,Vp)]))),256))])]),n("div",jp,[n("div",null,[Hp,R(n("input",{id:"subCategoryList","onUpdate:modelValue":$[5]||($[5]=ee=>s.value.name=ee),type:"text"},null,512),[[Q,s.value.name]])]),n("div",null,[qp,R(n("input",{id:"subCategoryList","onUpdate:modelValue":$[6]||($[6]=ee=>s.value.order=ee),type:"text"},null,512),[[Q,s.value.order]])]),n("button",{class:"addButton",onClick:$[7]||($[7]=F(ee=>m(s.value),["prevent"]))},"Add")]),n("div",null,[n("div",null,[(I(!0),T(Ae,null,ke(f(e).siteProInfo.subMenus,(ee,De)=>(I(),T("li",Gp,[n("span",Yp,[Mt(le(ee),1),R(n("input",{"onUpdate:modelValue":Me=>ee.name=Me,onChange:$[8]||($[8]=Me=>f(a)("subMenus",f(e).siteProInfo.subMenus))},null,40,Wp),[[Q,ee.name]]),R(n("input",{"onUpdate:modelValue":Me=>ee.order=Me,onChange:$[9]||($[9]=Me=>f(a)("subMenus",f(e).siteProInfo.subMenus))},null,40,Kp),[[Q,ee.order]])]),n("button",{class:"removeButton",onClick:F(Me=>M(De),["prevent"])},"Remove",8,Qp)]))),256))])]),n("div",Jp,[eh,R(n("input",{id:"complexsList","onUpdate:modelValue":$[10]||($[10]=ee=>u.value=ee),type:"text"},null,512),[[Q,u.value]]),n("button",{class:"addButton",onClick:$[11]||($[11]=F(ee=>L(u.value),["prevent"]))},"Add")]),n("div",null,[n("div",null,[(I(!0),T(Ae,null,ke(f(e).siteProInfo.complex,(ee,De)=>(I(),T("li",th,[n("span",nh,le(ee),1),oh,Mt(),n("button",{class:"removeButton",onClick:F(Me=>O(De),["prevent"])},"Remove",8,sh)]))),256))])])])):W("",!0),f(e).adminPillIndex==5?(I(),Zt(gp,{key:5})):W("",!0),f(e).adminPillIndex==6?(I(),Zt(xp,{key:6})):W("",!0)],2),[[Ko,f(e).showAdminPanel]]),n("button",{class:"adminToggleBtn",onClick:$[12]||($[12]=ee=>f(e).showAdminPanel=!f(e).showAdminPanel)},[f(e).showAdminPanel?(I(),T("span",ah,"Hide")):W("",!0),f(e).showAdminPanel?W("",!0):(I(),T("span",ih,"Show"))]),n("button",{class:"adminSizeToggleBtn",onClick:ue},le(t.value?"Collapse":"Expand"),1),f(e).showMaxSetTool?(I(),Zt(Nu,{key:1,space:f(e).selectedMaxSetSpace,diagramType:`${f(e).selectedMaxSetType.type}Diagram`},null,8,["space","diagramType"])):W("",!0),f(e).photoFrameOn==!1?(I(),Zt(Hs,{key:2,role:"toolbar"})):W("",!0),lh])):W("",!0),f(e).showStartPanel?(I(),T("button",{key:1,class:"startLocSet2",onClick:$[13]||($[13]=F(ee=>f(e).makeLocation2(f(e).selectedLocID),["prevent"]))},"Set Start Position ")):W("",!0),f(e).selectedPanoramaId?(I(),Zt(ja,{key:2,panoramaId:f(e).selectedPanoramaId,onClose:$[14]||($[14]=ee=>f(e).selectedPanoramaId=null),class:"adminPanoView"},null,8,["panoramaId"])):W("",!0)],64))}},Ah=Yt(rh,[["__scopeId","data-v-f41c645d"]]);export{Ah 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.