1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3410,9151],{71752:function(e,n,t){t.r(n),t.d(n,{BASE_PATH:function(){return L}});var i=t(26042),l=t(69396),o=t(29815),a=t(85893),s=t(67294),r=t(50828),c=t(34749),d=t(64593),u=t(66010),h=t(49106),f=t(86426),m=t(40344),g=t(78145),v=t(96183),p=t(5e4),x=t(64370),b=t(5434),w=(t(81872),t(72125)),j=t(38735),N=t(30073),_=(t(87042),t(61927),t(1426)),k=t(51649),y=t(82529),S=t(100),C=t(80752),L="dashboard",I=(0,r.Pi)((function(e){var n=e.match,t=e.history,r=(e.customDomain,function(e){jn.current=e,le(e)}),I=function(e){Nn.current=e,fe(e)},E=function(e){_n.current=e,ve(e)},Z=function(e){kn.current=e},W=function(e,n){var t,i=[];e.forEach((function(e,n){i.push(z(e))})),null===(t=wn.current)||void 0===t||t.setNodes(i,n)},z=function(e){var n=e.env_item,t=e.connections.map((function(e){return{nodeId:e}}));return{id:e.env_id,panorama:n.image_url,thumbnail:n.thumb_url+"800_300.jpg",name:n.item_title||n.name,links:t,gps:[e.lng,e.lat],panoData:{poseHeading:e.heading}}},P=function(){K(!0),h.Z.Gsv.getGsvStreamKey(n.params.streamKey).then((function(e){var n=e.response;O(n),n.gsv&&null!==n.gsv||de(!0)})).catch((function(e){e&&403===e.status&&setPrivacyError(!0),e&&404===e.status&&t.push("/404")})).finally((function(){K(!1)}))},O=function(e){$(e.gsv),ne(e.task);var n=e.gsv_items||[],t=(0,o.Z)(n),i=!1,l=0,a=new Map;t.forEach((function(e,n){!i&&e.publish&&(i=!0,l=n),e.connections=e.connections?JSON.parse(e.connections):[],a.set(e.level,{value:e.level,label:e.level_name})})),r(t),Ze(new Map(a)),Pe(Array.from(a.values())),De(Array.from(a.keys())),t.length>0&&i&&I(t[l])},M=function(e,n,t){var i={},l=X.lat,o=X.lng,a=[o,l];he&&(l=he?he.lat:X.lat,o=he?he.lng:X.lng,a=p.Ij.createCoord([o,l],t,Qe));var s=a[1],r=a[0];i.lat=s,i.lng=r,on(i)},D=function(e,n){h.Z.Gsv.updateItem(e.collection_id,e.id,n).then((function(e){e.response.gsv_item}))},R=function(e){h.Z.Gsv.updateItems(X.collection_id,e).then((function(e){e.response}))},G=function(e,n){var t=ie.findIndex((function(n){return n.id===e.id})),i=JSON.parse(JSON.stringify(ie)),l=i[t];l.heading=n,E(null),Le(0),ye(0),r(i),I(l),D(l,{heading:n}),Ve(A()+(0,p.LW)(l.heading))},U=function(){var e;e=ie.filter((function(e){return Me.includes(e.level)})),se((0,o.Z)(e));var n=!1;he&&(n=e.find((function(e){return e.publish&&e.id==he.id})));var t=ie.filter((function(e){return e.publish}));fn(1==t.length),n||(I(null),Be(!1))},T=function(){Ve(he?A()+(0,p.LW)(he.heading):0);var e=(0,p.LW)((0,p.LW)(ke-Ce)+ge.heading);!function(e,n,t){var i=ie.findIndex((function(n){return n.id===e.id})),l=(0,o.Z)(ie),a=l[i],s=X.lat,c=X.lng,d=[c,s],u=[];if(he){u.push(he.env_id),s=he?he.lat:X.lat,c=he?he.lng:X.lng,d=p.Ij.createCoord([c,s],t,Qe);var h=l[ie.findIndex((function(e){return e.id===he.id}))];h.connections.push(a.env_id),D(h,{connections:h.connections})}var f=d[1],m=d[0];a.lat=f,a.lng=m,a.publish=1,a.connections=u,a.heading=n,E(null),Le(0),r(l),I(a),D(a,{lat:f,lng:m,publish:!0,connections:u,heading:n})}(ge,e,ke)},A=function(){var e;return(null===(e=pn.current)||void 0===e?void 0:e.getYaw())||0},B=function(e){var n,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];null===(n=pn.current)||void 0===n||n.setYaw(e,t)},J=function(e){var n;null===(n=pn.current)||void 0===n||n.setNorthOffset(e)},Y=function(e){var n=e.item,t=e.publish,i=void 0!==t&&t,l=e.onSelect,o=e.selected,s=void 0!==o&&o,r=e.connected,c=void 0!==r&&r,d=e.onConnect,u=e.hideConnect,h=void 0!==u&&u,f=e.onDelete,m=n.env_item;return m&&m.image_url&&n.publish==i&&"environment"===m.type?(0,a.jsxs)("div",{className:"float-left w-1/3 p-1",children:[(0,a.jsxs)("div",{className:"aspect-ratio aspect-ratio--1x1 relative",children:[(0,a.jsx)("div",{onClick:function(){l&&l(n)},className:" link aspect-ratio--object block cursor-pointer bg-gray-200 bg-cover text-black ".concat(s?"border border-white":""),style:{backgroundImage:"url(".concat(m.thumb_url,"800_300.jpg)")}}),(0,a.jsx)("div",{className:"absolute bottom-0 z-[999] w-full truncate bg-black/[.7] p-1 text-sm text-white",children:m.item_title||m.name||"Untitled"}),(0,a.jsx)("div",{className:"absolute left-0 top-0 z-[999] bg-black/[.2] p-1 text-xs text-white",children:n.level_name}),(0,a.jsxs)("div",{className:"absolute right-0 top-0 z-[999] bg-black/[.7] text-black",children:[i&&!s&&!h&&(c?(0,a.jsx)(b.$l_,{"data-tip":"Connected",className:" pointer m-1 inline-block h-4 w-4 align-middle text-blue-500",onClick:function(e){d&&d(n,!1)}}):(0,a.jsx)(b.Qw4,{"data-tip":"Not Connected",className:" pointer m-1 inline-block h-4 w-4 align-middle text-white",onClick:function(e){d&&d(n,!0)}})),(0,a.jsx)(b.FU5,{"data-tip":"".concat(i?"Unpublish":"Remove"),className:" pointer m-1 inline-block h-4 w-4 align-middle text-red-600",onClick:function(e){f&&f(n)}})]})]}),(0,a.jsx)(j.Z,{})]},m.id):null}
1,F=(0,s.useState)(!1),H=F[0],K=F[1],V=(0,s.useState)(!1),q=(V[0],V[1]),Q=(0,s.useState)(null),X=Q[0],$=Q[1],ee=(0,s.useState)(null),ne=(ee[0],ee[1]),te=(0,s.useState)([]),ie=te[0],le=te[1],oe=(0,s.useState)([]),ae=oe[0],se=oe[1],re=(0,s.useState)(!1),ce=re[0],de=re[1],ue=(0,s.useState)(null),he=ue[0],fe=ue[1],me=(0,s.useState)(null),ge=me[0],ve=me[1],pe=(0,s.useState)(!1),xe=(pe[0],pe[1],(0,s.useState)([])),be=xe[0],we=xe[1],je=(0,s.useState)([]),Ne=(je[0],je[1]),_e=(0,s.useState)(0),ke=_e[0],ye=_e[1],Se=(0,s.useState)(0),Ce=Se[0],Le=Se[1],Ie=(0,s.useState)(new Map),Ee=Ie[0],Ze=Ie[1],We=(0,s.useState)([]),ze=We[0],Pe=We[1],Oe=(0,s.useState)([0]),Me=Oe[0],De=Oe[1],Re=(0,s.useState)(.9),Ge=Re[0],Ue=Re[1],Te=(0,s.useState)(!1),Ae=Te[0],Be=Te[1],Je=(0,s.useState)(0),Ye=Je[0],Fe=Je[1],He=(0,s.useState)(0),Ke=He[0],Ve=He[1],qe=(0,s.useState)(3),Qe=qe[0],Xe=qe[1],$e=(0,s.useState)(!0),en=$e[0],nn=$e[1],tn=(0,s.useState)(null),ln=tn[0],on=tn[1],an=(0,s.useState)([]),sn=(an[0],an[1],(0,s.useState)("")),rn=(sn[0],sn[1],(0,s.useState)(!1)),cn=(rn[0],rn[1],(0,s.useState)(0)),dn=cn[0],un=(cn[1],(0,s.useState)(!0)),hn=un[0],fn=un[1],mn=(0,y.Z)(),gn=mn.userStore,vn=mn.commonStore,pn=(0,s.useRef)(),xn=(0,s.useRef)(),bn=(0,s.useRef)(),wn=(0,s.useRef)(),jn=(0,s.useRef)(),Nn=(0,s.useRef)(),_n=(0,s.useRef)(),kn=(0,s.useRef)(),yn=function(){wn.current||(wn.
1current=new _.PG(document.getElementById("arrows"),document.getElementById("container_arrows"),pn.current.getContainer(),(function(e,n){"click"==e&&function(e){var n=jn.current.findIndex((function(n){return n.env_id===e})),t=Nn.current?A()+(0,p.LW)(Nn.current.heading):0;Ve(t),I(jn.current[n])}(n)}))),W(ae,null===he||void 0===he?void 0:he.env_id)};(0,f.Nq)({flow:"auth-code",overrideScope:!0,scope:"openid https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/streetviewpublish https://www.googleapis.com/auth/userinfo.profile",onSuccess:function(e){e.code&&h.Z.Gsv.uploadCode(n.params.streamKey,e.code,document.location.origin).then((function(e){var n=e.response;q(n.connected),n.connected&&P()}))}});(0,s.useEffect)((function(){P()}),[]),(0,s.useEffect)((function(){var e=function(e){!ge&&he&&70==e.keyCode&&B(A()+180,!0)},n=function(e){if(ge){var n=0;e.wheelDeltaY?n=.05*e.wheelDeltaY:e.wheelDelta?n=.05*e.wheelDelta:e.detail&&(n=1.5*e.wheelDelta),Xe((function(e){return Math.max(0,Math.min(e+-n/24,9))}))}};return window.addEventListener("keyup",e),window.addEventListener("mousewheel",n,!1),window.addEventListener("DOMMouseScroll",n,!1),function(){window.removeEventListener("keyup",e),window.removeEventListener("mousewheel",n,!1),window.removeEventListener("DOMMouseScroll",n,!1)}}),[ge,he]),(0,s.useEffect)((function(){if(ge){(0,p.LW)((0,p.LW)(ke-Ce)+ge.heading);M(0,0,ke)}else on(null)}),[Qe,ke]),(0,s.useEffect)((function(){var e;if(null===(e=wn.current)||void 0===e||e.setVisible(!ge),ge){(0,p.LW)((0,p.LW)(ke-Ce)+ge.heading);M(0,0,ke)}else on(null)}),[ge]);(0,s.useEffect)((function(){!function(){var e=[];if(ae.forEach((function(n){if(n.publish&&n.connections&&n.connections.length>0){var t,i=[n.lat,n.lng],l=[];n.connections.forEach((function(e){var n=ae.find((function(n){return n.env_id==e}));if(n){var t=[n.lat,n.lng];l.push([i,t])}})),(t=e).push.apply(t,(0,o.Z)(l))}})),we((0,o.Z)(e)),he){var n=he.connections.map((function(e){var n=ie.find((function(n){return n.env_id===e}));return Sn(n,he)}));Ne(n)}}(),W(ae,null===he||void 0===he?void 0:he.env_id)}),[ae]),(0,s.useEffect)((function(){if(he){var e=he.connections.map((function(e){var n=ie.find((function(n){return n.env_id===e}));return Sn(n,he)}));Ne(e),J(he.heading),B(360-he.heading+Ke,!1)}else pn.current=null,wn.current=null}),[he]),(0,s.useEffect)((function(){U()}),[ie,Me]);var Sn=function(e,n){var t=(0,p.yD)(n.lat,n.lng,e.lat,e.lng)-(n&&n.heading||0),i={points:(0,p.oG)(t,-25,20,10),fill_color:"rgba(0, 0, 0, 0)",hover_fill_color:"rgba(0, 0, 0, 0)",stroke_color:"rgba(255, 255, 255, 1)",hover_stroke_color:"rgba(255, 255, 255, 1)",stroke_size:0,hover_stroke_size:0,media_enabled:!0,chroma_enabled:!1,autoplay:!1,chroma_threshold:.55,chroma_color:"rgba(0, 255, 0, 1)",chroma_padding:0};return{id:"env-"+n.env_id,scale:!0,pitch:-25,yaw:t,rotation:0,hotspotType:"polygon",type:"nav",sceneId:e.env_id,sizeScale:1,opacity:1,icon:"default-arrow-up-white-beat-anim-floor",childItem:{image_url:"/pannellum/img/hotspot/default-arrow-up-white.svg"},targetYaw:"sameAzimuth",targetPitch:"same",polygon:{points:i&&i.points||void 0,fillColor:i&&i.fill_color||void 0,hoverFillColor:i&&i.hover_fill_color||void 0,strokeColor:i&&i.stroke_color||void 0,hoevrStrokeColor:i&&i.hover_stroke_color||void 0,strokeSize:i&&i.stroke_size||0,hoverStrokeSize:i&&i.hover_stroke_size,mediaEnabled:i&&i.media_enabled||!1,chromaEnabled:i&&i.chroma_enabled||!1,chromaColor:i&&i.chroma_color||void 0,chromaThreshold:i&&i.chroma_threshold||void 0,chromaPadding:i&&i.chroma_padding||void 0,loopEnabled:i&&i.loop_enabled||!1,autoplay:i&&i.autoplay||!1,muted:i&&i.muted||!1}}};return(0,a.jsxs)("div",{className:"absolute--fill absolute bg-gray-950",id:"app",children:[(0,a.jsx)(d.q,{children:(0,a.jsx)("title",{children:"Street View Editor"})}),H?(0,a.jsx)(c.Z,{}):(0,a.jsxs)(s.Fragment,{children:[(0,a.jsx)("div",{children:X?(0,a.jsxs)("div",{className:"flex h-screen flex-col overflow-hidden",children:[(0,a.jsxs)("nav",{className:"flex w-full justify-between bg-gray-900 py-2",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("a",{title:"Home",href:"/",className:"link dim mr-2 inline-block cursor-pointer",style:{width:"1.75rem",he
1ight:"1.75rem"},children:(0,a.jsx)("img",{src:"/image/teliportme-logo-white.svg",className:"block align-middle",alt:"Best Virtual Tour Software TeliportMe logo"})}),(0,a.jsx)("div",{className:" text-center align-middle text-white",children:"Street View Editor"})]}),(0,a.jsxs)("div",{className:"",children:[(0,a.jsx)("a",{className:"m-1 inline-block",onClick:function(){t.push("/"+L+"/gsv-grid/"+n.params.streamKey)},children:(0,a.jsx)("button",{type:"button",className:"mr-3 mt-3 inline-flex items-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 md:mt-0",children:"Panorama List"})}),(0,a.jsx)("a",{className:"mr-2 inline-block p-1",onClick:function(){t.push("/"+L+"/gsv-publish/"+n.params.streamKey)},children:(0,a.jsx)("button",{className:"mt-3 inline-flex items-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 md:mt-0",children:"Ready to Publish"})}),(0,a.jsxs)(C.S,{className:"block list-none pb-2 sm:inline",children:[(0,a.jsx)("a",{className:"inline-block cursor-pointer",style:{width:"1.75rem",height:"1.75rem"},href:"/profile/".concat(gn.currentUser.username),children:vn.isTeam?(0,a.jsx)(k.s6e,{className:"inline-block rounded-full align-middle text-white",style:{width:"1.75rem",height:"1.75rem"}}):(0,a.jsx)("img",{alt:"profile pic",src:gn.currentUser.profile_pic_url||gn.currentUser.profile_pic_url_large||"/image/default_profile.jpg",className:"inline-block rounded-full align-middle"})}),(0,a.jsxs)("ul",{className:"z-[2147483647] list-none pt-2",children:[(0,a.jsxs)(S.I,{href:"/dashboard/settings",className:"link flex cursor-pointer flex-row items-center rounded rounded-b-none border border-b-0 border-gray-500 bg-white p-2 text-gray-800 hover:bg-gray-200",children:[(0,a.jsx)(k.rzH,{className:"text-gray-600"}),(0,a.jsx)("span",{className:"pl-2",children:"Settings"})]}),(0,a.jsxs)("button",{onClick:function(){GoogleAnalytics.event((0,i.Z)({category:"account",action:"logout",label:"account-logout"},gn.CustomGAItems)),authStore.logout().then((function(){window.location="/"}))},className:"link flex cursor-pointer flex-row items-center rounded rounded-t-none border border-t-0 border-gray-500 bg-white p-2 pr-4 text-gray-800 hover:bg-gray-200",children:[(0,a.jsx)(k.CmG,{className:"text-gray-600"}),(0,a.jsx)("span",{className:"pl-2",children:"Logout\u2000\u2000"})]})]})]})]})]}),(0,a.jsxs)("div",{className:"flex h-full overflow-hidden",children:[(0,a.jsxs)("div",{className:"w-30-m relative z-10 float-left h-full w-full overflow-x-hidden bg-gray-800 text-left lg:w-1/4",children:[(0,a.jsx)("div",{className:"cf pl-2",children:ae.map((function(e){return(0,a.jsx)(Y,{item:e,onSelect:function(e){!function(e){if(he)return ge&&ge.id==e.id?E(null):(E(e),Z((0,p.LW)(360-(0,p.LW)(e.heading)-A()))),void Be(!1);var n=ie.findIndex((function(n){return n.id===e.id})),t=(0,o.Z)(ie),i=t[n];p.Ij.calculateDistance([X.lng,X.lat],[i.lng,i.lat])>3e3&&(i.lat=X.lat,i.lng=X.lng),i.publish=!0,i.connections=[],r(t),I(i);var l={lat:i.lat,lng:i.lng,publish:!0,connections:[]};D(i,l)}(e)},selected:ge&&ge.id==e.id,onDelete:function(e){!function(e){var n=ie.findIndex((function(n){return n.id===e.id})),t=(0,o.Z)(ie);t.splice(n,1),r(t),E(null),Le(0),h.Z.Gsv.removeItem(e.collection_id,e.id).then((function(){}))}(e)}},e.id)}))}),(0,a.jsx)(j.Z,{})]}),(0,a.jsxs)("div",{className:"w-30-m relative z-10 float-left h-full w-full bg-gray-950 text-left lg:w-1/4",style:{flexGrow:1},children:[(0,a.jsx)("div",{className:"w-full bg-slate-300",children:(0,a.jsx)("div",{className:"aspect-ratio aspect-ratio--4x3 cursor-pointer",children:(0,a.jsxs)("div",{className:"link aspect-ratio--object block bg-cover",children:[he&&(0,a.jsxs)("div",{className:"tme-container",children:[(0,a.jsx)("div",{className:"tme-centered tme-container",children:(0,a.jsx)(v.Z,{disablePitch:en,disableScroll:null!=ge,imageUrl:he.env_item.image_url,showFullscreenCtrl:!1,autoRotate:0,isMultiresReady:he.env_item.is_multires_ready,multires:he.env_item.multires,showText:!1,headingYaw:360-(0,p.LW)(he.heading),headingPitch:0,onHeadingChanged:function(e,n){var t,i;(ye(e),null===(t=wn.current)||void 0===t||t.updateYaw(e),_n.current)&&(null===(i=xn.current)||void 0===i||i.setYaw((0,p.LW)(n+kn.current),!1))},compass:!0,onCompassClick:function(){B(360-(0,p.LW)(Nn.current.heading),!0)},northOffset:he.heading,onViewerReady:function(e){pn.current=e,yn()},handleHsClicks:function(e){if(e){var n=ie.findIndex((function(n){return n.env_id===e.sceneId}));Ve(he?A()+(0,p.LW)(he.heading):0),I(ie[n])}}})}),ge&&(0,a.jsxs)("div",{className:"tme-container tme-avoid-clicks",style:{opacity:Ge,transform:"matrix(".concat(Math.max(0,Math.min(1-.1*Qe,1)),", 0, 0, ").concat(Math.max(0,Math.min(1-.1*Qe,1)),", 0, 0)"),transformOrigin:"50% 50%",transition:"transform 200ms linear 0s"},children:[(0,a.jsx)(v.Z,{disablePitch:en,disableScroll:null!=ge,imageUrl:ge.env_item.image_url,showFullscreenCtrl:!1,autoRotate:0,isMultiresReady:ge.env_item.is_multires_ready,multires:ge.env_item.multires,showText:!1,headingYaw:360-(0,p.LW)(ge.heading),headingPitch:0,onHeadingChanged:function(e,n){Le(e),Z((0,p.LW)(n-A()))},northOffset:ge.heading,onViewerReady:function(e){xn.current=e}}),(0,a.jsx)("div",{className:"tme-top-right tme-allow-clicks mr-2 mt-2 rounded-full border-2 border-white bg-red-600 p-1",onClick:function(){E(null),Le(0)},children:(0,a.jsx)(b.FU5,{size:"24",className:"block text-white"})})]}),(0,a.jsx)("div",{id:"arrows",className:"absolute--fill tme-avoid-clicks absolute z-[2147483647]",children:(0,a.jsx)("div",{id:"container_arrows"})}),(0,a.jsx)("div",{className:"tme-centered tme-avoid-clicks h-full border border-black/[.7] bg-white",style:{width:"4px"}}),ge&&(0,a.jsx)("img",{alt:"",src:"/pannellum/img/hotspot/default-arrow-up-white.svg",className:"h-16 w-16 hover:bg-black/[.6]",style:{position:"absolute",bottom:0,left:"50%",transform:"translate(-50%, -50%) rotateX(45deg)"},onClick:function(){T()}}),(0,a.jsxs)("div",{className:"tme-bottom-left p-1",children:[(0,a.jsx)("input",{type:"checkbox",checked:!en,id:"pitch",onChange:function(e){nn(!e.target.checked)}}),(0,a.jsx)("label",{htmlFor:"pitch",className:"ml-1 cursor-pointer text-base",children:"Pitch"})]})]}),ge&&(0,a.jsxs)("div",{className:"flex justify-between p-2",children:[(0,a.jsx)("button",{className:"dim invisible flex cursor-pointer self-center rounded border-transparent bg-gray-800 p-2 text-sm font-bold text-white no-underline shadow-lg outline-0",onClick:function(){E(null),Le(0)},children:(0,a.jsx)("span",{className:"inline-block text-xs uppercase",children:"Cancel"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-center text-white",children:"Transparency"}),(0,a.jsx)(w.Z,{value:Ge,min:.1,max:1,step:.1,onChange:function(e){Ue(e.target.value)}})]}),(0,a.jsx)("button",{className:"dim flex cursor-pointer self-center rounded border-transparent bg-blue-700 p-2 text-sm font-bold text-white no-underline shadow-lg outline-0",onClick:function(){T()},children:(0,a.jsx)("span",{className:"inline-block text-xs uppercase",children:"Connect"})})]}),!ge&&he&&hn&&(0,a.jsx)("div",{className:"flex justify-between p-2",children:(0,a.jsx)("button",{className:"dim flex cursor-pointer self-center rounded border-transparent bg-blue-700 p-2 text-sm font-bold text-white no-underline shadow-lg outline-0",onClick:function(){var e=360-(0,p.LW)(A()
1);he.heading;G(he,e),u.ZP.success("North Updated")},children:(0,a.jsx)("span",{className:"inline-block text-xs uppercase",children:"Set North"})})})]})})}),(0,a.jsx)(j.Z,{})]}),(0,a.jsxs)("div",{className:"w-30-m relative float-left h-full w-full overflow-x-hidden bg-gray-800 lg:w-1/4",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"aspect-ratio aspect-ratio--1x1 z-[999] cursor-pointer",children:[(0,a.jsx)("div",{className:"link aspect-ratio--object block bg-cover",children:(0,a.jsx)(g.Z,{editNorthEnabled:!1,onNorthUpdated:function(e){var n=360-(0,p.LW)(A()-e);G(he,n)},previewMarker:ln,icon:"default-marker-icon-red",draggable:!0,tooltipEnabled:!0,centerPosition:{lat:X&&X.lat||0,lng:X&&X.lng||0},centerEnabled:!1,panosEnabled:!0,onCenterUpdated:function(e,n){},satelliteToggle:!1,satelliteTogglePosition:"top-right",zoom:21,onUpdated:function(e,n,t){Ve(he?A()+(0,p.LW)(he.heading):0),Ae?function(e,n){var t=p.Ij.calculateDistance(e,n),i=p.Ij.getBearing(e,n),l=(0,o.Z)(ie),a=ae.map((function(e){return e.id})),s=[];l.forEach((function(e){if(e.publish&&a.includes(e.id)){var n=p.Ij.createCoord([e.lng,e.lat],i,t),l=n[1],o=n[0];e.lat=l,e.lng=o,s.push({id:e.id,lat:l,lng:o})}})),s.length>0&&R(s),r(l)}([e.lng,e.lat],[t,n]):function(e,n,t){var i=ie.findIndex((function(n){return n.id===e.id})),l=JSON.parse(JSON.stringify(ie)),o=l[i];o.lat=n,o.lng=t,r(l),he.id==e.id&&I(o),D(o,{lat:n,lng:t})}(e,n,t)},onSelected:function(e,n,t){var i=ie.findIndex((function(n){return n.id===e.id}));Ve(he?A()+(0,p.LW)(he.heading):0),I(ie[i])},item:he,items:ae.filter((function(e){return e.publish})),compassEnabled:!0,compassHeading:ke,polygon:be})}),(0,a.jsx)("div",{className:"tme-top-left z-[999] m-1",children:(0,a.jsx)(x.ZP,{className:"w-full",options:ze,placeholder:"Level",menuPosition:"fixed",isMulti:!0,menuPortalTarget:document.body,onChange:function(e){var n=[];e.length>0?(e.forEach((function(e){n.push(e.value)})),De(n)):De(Array.from(Ee.keys()))},styles:{menuPortal:function(e){return(0,l.Z)((0,i.Z)({},e),{zIndex:999,background:"#fff"})}}})}),(0,a.jsxs)("div",{className:"tme-bottom-left z-[999] flex w-full justify-between bg-white/[.6] p-1",children:[(0,a.jsx)("div",{className:"w-1/3 self-center text-center",children:he&&(0,a.jsxs)("div",{className:"inline-block p-1","data-tip":"All markers will be updated",children:[(0,a.jsx)("input",{type:"checkbox",checked:Ae,id:"fsButton",onChange:function(e){Be(e.target.checked),U()}}),(0,a.jsx)("label",{htmlFor:"fsButton",className:"ml-2 cursor-pointer text-base",children:"Select All"})]})}),(0,a.jsx)("div",{className:"w-1/3 self-center",children:he&&(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsx)(b.Z8c,{className:"mr-2 inline-block h-8 w-8 align-middle"}),(0,a.jsx)(N.ZP,{className:"self-center",min:0,max:360,step:1,value:Ye,onBeforeChange:function(){var e=JSON.parse(JSON.stringify(ae));bn.current=e},onChange:function(e){Fe(e);var n=(0,p.LW)(360-he.heading-e),t=360-(0,p.LW)(n)-he.heading;!function(e,n,t){var i=JSON.parse(JSON.stringify(bn.current));i.forEach((function(i){if(t?i.publish:i.id===he.id){var l=p.Ij.calculateDistance(e,[i.lng,i.lat]),o=p.Ij.getBearing(e,[i.lng,i.lat]),a=p.Ij.createCoord(e,(0,p.LW)(o+n),l),s=a[1],r=a[0],c=(0,p.LW)(i.heading+n);i.lat=s,i.lng=r,i.heading=c}}));var l=i.findIndex((function(e){return e.id===he.id})),o=i[l];t?J(360===o.heading?0:o.heading):(Ve(A()+(0,p.LW)(o.heading)),I(o)),se(i)}([he.lng,he.lat],t,Ae)},onAfterChange:function(e){Fe(0);var n=(0,p.LW)(360-he.heading-e),t=360-(0,p.LW)(n)-he.heading;!function(e,n,t){var i=(0,o.Z)(ie),l=t?ae.map((function(e){return e.id})):[he.id],a=[];i.forEach((function(t){if(t.publish&&l.includes(t.id)){var i=p.Ij.calculateDistance(e,[t.lng,t.lat]),o=p.Ij.getBearing(e,[t.lng,t.lat]),s=p.Ij.createCoord(e,(0,p.LW)(o+n),i),r=s[1],c=s[0],d=(0,p.LW)(t.heading+n);t.lat=r,t.lng=c,t.heading=d,a.push({id:t.id,lat:r,lng:c,heading:d})}})),a.length>0&&R(a),E(null),Le(0),r(i);var s=i.findIndex((function(e){return e.id===he.id})),c=i[s];Ve(A()+(0,p.LW)(c.heading)),I(c)}([he.lng,he.lat],t,Ae),U()}})]})})]})]}),(0,a.jsx)("div",{className:"cf p-2",children:ae.map((function(e){return(0,a.jsx)(Y,{item:e,publish:!0,onSelect:function(e){he&&he.id==e.id?(Ve(0),I(null),ge&&E(null)):(he&&Ve(A()+(0,p.LW)(he.heading)),I(e))},selected:he&&he.id==e.id,hideConnect:!he,connected:he&&he.connections.includes(e.env_id),onConnect:function(e,n){!function(e,n){if(he){var t=(0,o.Z)(ie),i=ie.findIndex((function(e){return e.id===he.id}
1)),l=t[i],a=t[i=ie.findIndex((function(n){return n.id===e.id}))],s=l.connections.indexOf(a.env_id),c=a.connections.indexOf(l.env_id);n?(-1==s&&(l.connections.push(a.env_id),D(l,{connections:l.connections})),-1==c&&(a.connections.push(l.env_id),D(a,{connections:a.connections}))):(-1!==s&&(l.connections.splice(s,1),D(l,{connections:l.connections})),-1!==c&&(a.connections.splice(c,1),D(a,{connections:a.connections}))),r(t),I(l)}}(e,n)},onDelete:function(e){!function(e){var n=ie.findIndex((function(n){return n.id===e.id})),t=(0,o.Z)(ie),i=t[n];i.publish=0,i.connections=[];var l=i.env_id;t.forEach((function(e){if(e.publish&&e.connections&&e.connections.length>0){var n=e.connections.indexOf(l);-1!==n&&(e.connections.splice(n,1),D(e,{connections:e.connections}))}})),E(null),Le(0),ye(0),r(t),I(null),D(i,{publish:0,connections:[]})}(e)}},e.id)}))})]}),(0,a.jsx)(j.Z,{})]})]})]}):(0,a.jsx)("button",{className:"tme-centered",onClick:function(){de(!0)},children:"Select Place"})}),(0,a.jsx)(m.Z,{isOpen:ce,onClose:function(){de(!1)},onSave:function(e,i,l,o,a,s){h.Z.Gsv.createGsvStreamKey(n.params.streamKey,e,i,l,o,a,s,dn).then((function(e){var i=e.response;O(i),de(!1),t&&t.push("/"+L+"/gsv-grid/"+n.params.streamKey)}
1))}})]}),(0,a.jsx)(u.x7,{})]})}));n.default=I}}]);
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.