chunk-2c83f0e0.a61ce77e.js 72 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2c83f0e0"],{"013b":function(t,e,o){"use strict";var n=o("795a"),s=o.n(n);s.a},"0d6e":function(t,e,o){},"127c":function(t,e,o){"use strict";var n=o("6306"),s=o.n(n);s.a},"12e0":function(t,e,o){},"14b9":function(t,e,o){var n=o("5ca1");n(n.P,"String",{repeat:o("9744")})},"164b":function(t,e,o){"use strict";var n=o("7b42"),s=o.n(n);s.a},"18e8":function(t,e,o){},"29b2":function(t,e,o){"use strict";var n;o.d(e,"a",(function(){return s})),o.d(e,"b",(function(){return a}));var s={Data:"jsondata",Send:"getJson",Connection:"connection",Disconnect:"disconnect"};function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=Object({NODE_ENV:"production",VUE_APP_CDN_URL:"",VUE_APP_HIDE_MENU:"scene,decor,virtual,vrhouse,business",VUE_APP_INCLUDEAPPS:"embed,shop,decor,discover,reserve,grave,fire-control,rtc-live",VUE_APP_LANGS:"zh#中文,en#英文,de#德文,fr#法文,jp#日文,kr#韩文,es#西班牙文",VUE_APP_LOCAL_PAGE:"embed",VUE_APP_OEM:"localshow",VUE_APP_OEM_NAEM:"本地版展示页面",VUE_APP_OPENAPI:"",VUE_APP_RTC_SOCKETURL:"",VUE_APP_SERVER_URL:"",VUE_APP_SHOP_ADMIN_URL:"",VUE_APP_SHOP_SOCKETURL:"",VUE_APP_SHOP_URL:"",VUE_APP_STATIC_DIR:"static",VUE_APP_STATIC_URL:"static/",VUE_APP_TESTKEY:"test",VUE_APP_TESTPWD:"11111111Aa",VUE_APP_TESTUSR:"13112311178",VUE_APP_VRHOUSE_OPENAPI:"",VUE_APP_VRHOUSE_URL:"",BASE_URL:""}).VUE_APP_SOCKETURL||t.url,s=Object({NODE_ENV:"production",VUE_APP_CDN_URL:"",VUE_APP_HIDE_MENU:"scene,decor,virtual,vrhouse,business",VUE_APP_INCLUDEAPPS:"embed,shop,decor,discover,reserve,grave,fire-control,rtc-live",VUE_APP_LANGS:"zh#中文,en#英文,de#德文,fr#法文,jp#日文,kr#韩文,es#西班牙文",VUE_APP_LOCAL_PAGE:"embed",VUE_APP_OEM:"localshow",VUE_APP_OEM_NAEM:"本地版展示页面",VUE_APP_OPENAPI:"",VUE_APP_RTC_SOCKETURL:"",VUE_APP_SERVER_URL:"",VUE_APP_SHOP_ADMIN_URL:"",VUE_APP_SHOP_SOCKETURL:"",VUE_APP_SHOP_URL:"",VUE_APP_STATIC_DIR:"static",VUE_APP_STATIC_URL:"static/",VUE_APP_TESTKEY:"test",VUE_APP_TESTPWD:"11111111Aa",VUE_APP_TESTUSR:"13112311178",VUE_APP_VRHOUSE_OPENAPI:"",VUE_APP_VRHOUSE_URL:"",BASE_URL:""}).VUE_APP_SOCKETPATH||t.path;return n=io(o,{path:s||"/",query:e}),n}},"2a3b":function(t,e,o){"use strict";var n=o("a401"),s=o.n(n);s.a},"2ed7":function(t,e,o){},3133:function(t,e,o){"use strict";var n=o("6372"),s=o.n(n);s.a},3437:function(t,e,o){},"34c2":function(t,e,o){"use strict";var n=o("2ed7"),s=o.n(n);s.a},"48ea":function(t,e,o){"use strict";var n=o("9894"),s=o.n(n);s.a},"59f3":function(t,e,o){"use strict";var n=o("d410"),s=o.n(n);s.a},"5d77":function(t,e,o){"use strict";var n=o("8429"),s=o.n(n);s.a},6306:function(t,e,o){},6372:function(t,e,o){},7210:function(t,e,o){"use strict";var n=o("0d6e"),s=o.n(n);s.a},7747:function(t,e,o){"use strict";var n=o("3437"),s=o.n(n);s.a},"795a":function(t,e,o){},"7b42":function(t,e,o){},8429:function(t,e,o){},8508:function(t,e,o){},9096:function(t,e,o){"use strict";var n=o("8508"),s=o.n(n);s.a},9744:function(t,e,o){"use strict";var n=o("4588"),s=o("be13");t.exports=function(t){var e=String(s(this)),o="",a=n(t);if(a<0||a==1/0)throw RangeError("Count can't be negative");for(;a>0;(a>>>=1)&&(e+=e))1&a&&(o+=e);return o}},9894:function(t,e,o){},"99bf":function(t,e,o){"use strict";var n=o("d002"),s=o.n(n);s.a},"9a39":function(t,e,o){"use strict";o.d(e,"e",(function(){return m})),o.d(e,"d",(function(){return x})),o.d(e,"b",(function(){return C})),o.d(e,"a",(function(){return O})),o.d(e,"c",(function(){return S}));var n=o("53ca"),s=(o("7f7f"),o("ac6a"),o("6b54"),o("c75e")),a=o("617a"),i=o("c7b2"),r=o("80c5"),c=o("eb02"),l=o("29b2"),u=null,d=!1,p=null,h=null,f=null,m=a["a"].urlQueryValue("role"),w=a["a"].urlQueryValue("user_id"),v=a["a"].urlQueryValue("room_id");function y(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";u.emit(e||l["a"].Send,{role:m,roomId:v,userId:w,content:t})}function g(t){if(null==p)return b(t),!1;if(p.mode!=t.mode)return b(t),!1;if(p.mode==r["a"].PANORAMA)return!!p.qua.equals(t.qua)||(b(t),!1);if(p.mode==r["a"].DOLLHOUSE){var e=!0;return t.qua&&p.qua&&(p.qua.equals(t.qua)||(e=!1)),t.pos&&p.pos&&(p.pos.equals(t.pos)||(e=!1)),t.target&&p.target&&(p.target.equals(t.target)||(e=!1)),p.zoom&&(p.zoom.equals(t.zoom)||(e=!1)),e||b(t),e}var o=!0;return p.qua.equals(t.qua)?(p.pos&&(p.pos.equals(t.pos)||(o=!1)),p.zoom&&p.zoom!=t.zoom&&(o=!1)):o=!1,o||b(t),o}function b(t){p={},p.mode=t.mode,t.pos&&(p.pos=new THREE.Vector3,p.pos.set(t.pos.x,t.pos.y,t.pos.z)),t.qua&&(p.qua=new THREE.Quaternion,p.qua.set(t.qua._x,t.qua._y,t.qua._z,t.qua._w)),t.target&&(p.target=new THREE.Vector3,p.target.set(t.target.x,t.target.y,t.target.z)),t.zoom&&(p.zoom=t.zoom)}function _(){var t=c["a"].getters["scene/metadata"],e=0;t.entry&&(e=t.entry.pano);var o=new THREE.Quaternion;t.entry&&t.entry.camera&&(o=t.entry.camera.quaternion),P(e,o)}function P(t,e){if(i["app"].player.mode!=r["a"].PANORAMA||t!=i["app"].player.currentPano.id){var o;o=e instanceof Array?(new THREE.Quaternion).fromArray(e):(new THREE.Quaternion).set(e._x,e._y,e._z,e._w);var n={mode:r["a"].PANORAMA,pano:t,qua:o};isNaN(n.qua.x)&&console.log("NaN??????"),i["app"].player.flyToItem(n,null)}}function x(){u?u.emit("startCall"):(u=Object(l["b"])({url:"",path:"/vr-node"},{role:m,roomId:v,userId:w,scene_num:a["a"].urlQueryValue("m"),customContent:window._houseInfo?window._houseInfo.customContent:""}),u.on(l["a"].Connection,(function(t){console.log(t)})),u.on(l["a"].Disconnect,(function(){i["app"].play.control.onUpdate=!0,d=!1,!1,!1,h&&clearInterval(h),f&&clearInterval(f)})),u.on("vr_request",(function(t){h&&clearInterval(h),f&&clearInterval(f),d=!1,!1,!1;var e=!1,o=!1;if(u.emit("startCall"),t.persons&&t.persons.forEach((function(t){"agent"==t.role?e=!0:"customer"==t.role&&(o=!0,s["a"].emit("vrhouse/socket/action","userId",t.userId))})),e&&o){_();var n=0,a=3;h=setInterval((function(){--a>=1?s["a"].emit("player/counting",a):(s["a"].emit("player/counting",0),d=!0,i["app"].play.control.onUpdate=!1,"agent"==m&&!0,"customer"==m&&!0,clearInterval(h),f=setInterval((function(){s["a"].emit("vrhouse/socket/action","time",++n)}),1e3),s["a"].emit("vrhouse/socket/action","time",n))}),1e3),s["a"].emit("player/counting",a),s["a"].emit("vrhouse/socket/action","sync",!0)}else s["a"].emit("vrhouse/socket/action","sync",!1),s["a"].emit("vrhouse/socket/action","time",-1)})),u.on("action",(function(t){t&&("string"===typeof t?s["a"].emit("vrhouse/socket/action",t):s["a"].emit("vrhouse/socket/action",t.name,t.data,t.role))})),u.on("vr_response",(function(t){if(t.content.drawing)s["a"].emit("vrhouse/socket/action","drawing",t);else if(d&&i["app"].player.cameraControls.activeControl){if(t.role==m)return;if("undefined"!=typeof t.content.onUpdate&&(i["app"].play.control.onUpdate=t.content.onUpdate,console.log(i["app"].play.control.onUpdate),"agent"!=m||i["app"].play.control.onUpdate||s["a"].emit("vrhouse/socket/action","operation-tips")),"undefined"!=typeof t.content.scale&&(i["app"].player.cameraControls.activeControl.absoluteScale=t.content.scale,i["app"].player.cameraControls.activeControl.updateZoom()),i["app"].play.control.onUpdate)return;if(t.content.item){if(g(t.content.item))return;(t.content.item.mode!=i["app"].player.mode||t.content.item.mode==i["app"].player.mode&&t.content.item.mode==r["a"].PANORAMA)&&P(t.content.item.pano,t.content.item.qua),i["app"].player.copyCameraProp(i["app"].player.cameraControls.activeControl,t.content.item),i["app"].player.adjustControlAngel()}else if(t.content.toPano)t.content.toPano.pano=i["app"].player.model.panos.get(t.content.toPano.panoId),i["app"].player.adjustControlAngel({target:new THREE.Vector3(i["app"].player.cameraControls.activeControl.target.x,i["app"].player.cameraControls.activeControl.target.y,i["app"].player.cameraControls.activeControl.target.z)}),i["app"].player.currentPano.id!=t.content.toPano&&i["app"].player.flyToPano(t.content.toPano);else if(t.content.newModeInfo){if(t.content.newModeInfo.panoId&&(t.content.newModeInfo.pano=i["app"].player.model.panos.get(t.content.newModeInfo.panoId)),t.content.newModeInfo.quaternion){var e=t.content.newModeInfo.quaternion;t.content.newModeInfo.quaternion=new THREE.Quaternion,t.content.newModeInfo.quaternion.set(e._x,e._y,e._z,e._w)}i["app"].player.flyToNewMode(t.content.newModeInfo)}else console.warn(t)}})))}function C(){f&&clearInterval(f),s["a"].emit("vrhouse/socket/action","time",-1),u&&(u.emit("stopCall"),u.disconnect(),u=null,"customer"==m&&s["a"].emit("vrhouse/socket/action","sync",!1))}function O(t){u&&("object"===Object(n["a"])(t)&&(t.role=m),y({action:t}))}function S(t){y({drawing:t})}i["app"].player.cameraControls.on("vr_freedom",(function(t){d&&!i["app"].play.control.onUpdate&&(u.emit(l["a"].Send,{role:m,roomId:v,userId:w,content:{onUpdate:!1}}),i["app"].play.control.onUpdate=!0)})),i["app"].player.on("vr_Rotate",(function(t){if(d){var e={};e.qua=t.quaternion,e.mode=t.mode,e.pos=t.position,t.cameraControls.activeControl.currentScale&&(e.zoom=t.cameraControls.activeControl.currentScale/($("#player").width()/$("#player").height())),e.type="Rotate",g(e)||(t.mode==r["a"].PANORAMA?e.pano=t.currentPano.id:t.mode==r["a"].FLOORPLAN&&(e.pos=(new THREE.Vector3).set(t.position.x,t.position.y,t.position.z),e.zoom=t.cameraControls.activeControl.currentScale/($("#player").width()/$("#player").height())),t.cameraControls.activeControl.target&&(e.pos=t.position,e.target=t.cameraControls.activeControl.target),i["app"].play.control.onUpdate&&u.emit(l["a"].Send,{role:m,roomId:v,userId:w,content:{item:e}}))}})),i["app"].player.on("vr_Zoom",(function(t){if(d){var e=t.cameraControls.activeControl.absoluteScale;u.emit(l["a"].Send,{role:m,roomId:v,userId:w,content:{scale:e}})}})),i["app"].player.on("vr_FlyToPano",(function(t){d&&(t.socketed=!0,u.emit(l["a"].Send,{role:m,roomId:v,userId:w,content:{toPano:t}}),console.log("flytopano"+t.toString()))})),i["app"].player.on("vr_FlyToNewMode",(function(t){d&&(t.socketed=!0,u.emit(l["a"].Send,{role:m,roomId:v,userId:w,content:{newModeInfo:t}}),i["app"].play.control.onUpdate=!1)})),s["a"].on("vrhouse/painting",(function(t){u.emit(l["a"].Send,{role:m,roomId:v,userId:w,content:{drawing:t}})}))},a401:function(t,e,o){},a891:function(t,e,o){"use strict";o.r(e);var n=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"app-layout"},[o("link",{attrs:{rel:"stylesheet",href:"static/css/reserve/iconfont.css"}}),o("link",{attrs:{rel:"stylesheet",href:"static/css/fire-control/iconfont.css"}}),o("div",{staticClass:"left",class:{show:t.player.showVR}},[o("div",{staticClass:"back",on:{click:t.onBack}},[o("i",{staticClass:"iconfont icon_back"})])]),o("div",{staticClass:"app-player"},[o("player"),o("Floor")],1),o("app-header",{directives:[{name:"show",rawName:"v-show",value:t.show&&!t.player.showVR,expression:"show && !player.showVR"}],style:{zIndex:t.showGoods?1:9999}}),o("app-main",{directives:[{name:"show",rawName:"v-show",value:t.show&&!t.player.showVR,expression:"show && !player.showVR"}]})],1)},s=[],a=(o("8e6e"),o("ac6a"),o("456d"),o("ade3")),i=o("2f62"),r=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("player",{ref:"player"})},c=[],l=o("b31b"),u=o("c7b2"),d={components:{Player:l["a"]},created:function(){var t=this;this.$store.commit("SetPlayerOptions",{showUI:!1}),this.$bus.on("ready",(function(){t.$bus.emit("rule/Visible",!0,"vrhouse")}))},mounted:function(){var t=this;this.$refs.player.start(),u["app"].player.on("player/flyToNext",(function(e){t.$bus.emit("shop/player/mode",e)}))},methods:{init:function(){}}},p=d,h=o("2877"),f=Object(h["a"])(p,r,c,!1,null,null,null),m=f.exports,w=o("f708"),v=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"header",class:{disable:t.disable},style:{visibility:-1!==t.player.progres?"hidden":"initial"}},[o("h2",{staticClass:"title",class:{active:t.show},on:{click:t.changeShow}},[o("p",{ref:"title"},[t._v("\n "+t._s(t.detail.projectName)+"\n ")]),o("span",[o("i",{directives:[{name:"show",rawName:"v-show",value:t.tempdata.description,expression:"tempdata.description"}],staticClass:"iconfont iconscene_tit_arrow"})])]),t.newView?t._e():o("div",{staticClass:"description",class:{show:t.show},on:{click:t.changeShow}},[o("div",{staticClass:"desc-items"},[o("div",{staticClass:"infos"},[o("p",[o("img",{attrs:{src:t.icon}}),t._v(t._s(t.detail.projectSite))]),o("div",[o("p",[t._v(t._s(t.detail.projectSn))]),o("span",[t._v(t._s(t.detail.statusDesc))])])]),o("div",[o("span",[t._v("起火地址:")]),o("p",[t._v(t._s(t.detail.projectAddress))])]),o("div",[o("span",[t._v("承办单位:")]),o("p",[t._v(t._s(t.detail.organizerDeptName))])]),o("div",[o("span",[t._v("承办人员:")]),o("p",[t._v(t._s(t.detail.organizerUsers))])]),o("div",[o("span",[t._v("火灾原因:")]),o("p",[t._v(t._s(t.detail.fireReason))])]),o("div",[o("span",[t._v("事故日期:")]),o("p",[t._v(t._s(t.detail.accidentDate))])])])]),t.showNavigations.map?o("Map",{directives:[{name:"show",rawName:"v-show",value:!t.show,expression:"!show"}],ref:"map"}):t._e()],1)},y=[],g=(o("96cf"),o("1da1")),b=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"map",class:{hide:t.isSide,hyaline:!t.show}},[o("div",{directives:[{name:"show",rawName:"v-show",value:"pano"!=t.mode,expression:"mode!='pano'"}],staticClass:"tab-layer"},[o("div",{staticClass:"tabs",class:{disable:!t.modeCanSwitch}},[o("span",{class:{active:"2d"===t.mode},on:{click:function(e){return t.changeMode("2d")}}},[o("i",{staticClass:"iconfont iconscene_map_2d"}),t._v("\n 平面图\n ")]),o("span",{class:{active:"3d"===t.mode},on:{click:function(e){return t.changeMode("3d")}}},[o("i",{staticClass:"iconfont iconscene_map_3d"}),t._v("\n 三维模型\n ")])])]),o("div",{directives:[{name:"show",rawName:"v-show",value:"pano"==t.mode,expression:"mode=='pano'"}],staticClass:"map-layer",on:{click:function(e){return t.changeMode("2d")}}},[o("div",{ref:"cad",staticClass:"cad"})]),o("span",{directives:[{name:"show",rawName:"v-show",value:"pano"==t.mode,expression:"mode=='pano'"}],staticClass:"btn-side",on:{click:function(e){e.stopPropagation(),t.isSide=!t.isSide}}},[o("i",{staticClass:"iconfont",class:[t.isSide?"icon_back":"icon_forward"]})])])},_=[],P=o("26d4"),x=o("6860");o("9a39");function C(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,n)}return o}function O(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?C(Object(o),!0).forEach((function(e){Object(a["a"])(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):C(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var S={props:["area"],data:function(){return{show:!1,isLock:!1,isSide:!1}},computed:O({},Object(i["b"])({mode:"mode",floor:"scene/houstFloor",modeCanSwitch:"modeCanSwitch"})),methods:{changeMode:function(t){Object(u["flyToNewMode"])(t)},hideMap:function(){this.isSide=!0}},watch:{floor:function(){this.cad.adapt(),this.cad.loadData(this.floor),this.cad.toCanvas(),this.show=!0,this.cad.setSign({x:app.firstView.position.x,y:app.firstView.position.z},app.cameraControls.controls.panorama.lon),this.$bus.emit("sign/Set/angle",this.cad.processing.data.dire)}},mounted:function(){var t=this;this.cad=Object(P["a"])({data:this.floor,layer:this.$refs.cad,edit:!1,padding:1,isCanvas:!0}),this.cad.hideDire(),this.cad.setDefaultPointStyle({fillColor:"rgba(0,0,0,0)",storkeColor:"rgba(0,0,0,0)"}),this.cad.toCanvas(),this.listen=function(e){var o=e.x,n=e.y,s=e.lon;return t.cad.setSign({x:o,y:n},s)},this.$bus.on("player/position/change",this.listen),this.$bus.on("shop/player/mode",(function(e){t.isSide=!0})),this.$bus.on("shop/tag/onshow",(function(e){e&&(t.isSide=!0)}))},beforeDestroy:function(){this.cad.destroy(),this.$bus.off("player/position/change",this.listen)}},E=S,k=(o("48ea"),Object(h["a"])(E,b,_,!1,null,"67d2b044",null)),T=k.exports,j=o("617a"),R=o("0b16"),I=o.n(R),N=o("c75e"),U=o("b775"),D=I.a.parse(location.href,!0),A=D.query;window.__query=A,A.readySuccess=!1;var q=function(){var t=Object(g["a"])(regeneratorRuntime.mark((function t(){var e,o,n,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,U["a"].get(A.detailApi,{projectId:A.id});case 3:e=t.sent,o=e.data,A.detail=o,t.next=11;break;case 8:t.prev=8,t.t0=t["catch"](0),A.detail={};case 11:return t.prev=11,t.next=14,U["a"].get(A.attachListApi,{projectId:A.id,pageNum:1,pageSize:1e3});case 14:n=t.sent,s=n.data,A.deskList=s,t.next=22;break;case 19:t.prev=19,t.t1=t["catch"](11),A.deskList=[];case 22:A.readySuccess=!0,console.error(A),N["a"].emit("reserveReadySuccess",A);case 25:case"end":return t.stop()}}),t,null,[[0,8],[11,19]])})));return function(){return t.apply(this,arguments)}}();q();var V=function(){var t=Object(g["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e){t.next=5;break}return A.readySuccess=!1,t.next=4,q();case 4:return t.abrupt("return",A);case 5:if(!A.readySuccess){t.next=9;break}return t.abrupt("return",A);case 9:return t.next=11,new Promise((function(t){N["a"].on("reserveReadySuccess",(function(){return t(A)}))}));case 11:return t.abrupt("return",t.sent);case 12:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),M=(o("14b9"),o("80c5")),L=o("29b2"),H=j["a"].urlQueryValue("role")||"leader",G=j["a"].urlQueryValue("user_id"),z=j["a"].urlQueryValue("room_id");function F(){return H}function W(){return G}var B,Q=null,J=!1,K=null,X=!1;function Y(){B&&clearTimeout(B)&&(B=null),u["app"].player.model.fadePanoMarkers(null,null,{vrCustomer:!1})}function Z(){u["app"].player.model?(u["app"].player.model.fadePanoMarkers(0,0,{vrCustomer:!0,hideVideoFlag:!0}),B=null):B=setTimeout((function(){Z()}),30)}function tt(t,e){("leader"==H||e)&&Q&&Q.emit("webSyncAction",t)}function et(t){Q&&Q.emit("changeRoomEnableTalk",t)}function ot(t,e){Q&&Q.emit("clientSyncAction",{sender:"h5",type:t,data:e})}function nt(t){if(null==K)return st(t),!1;if(K.mode!=t.mode)return st(t),!1;if(K.mode==M["a"].PANORAMA)return!!K.qua.equals(t.qua)||(st(t),!1);if(K.mode==M["a"].DOLLHOUSE){var e=!0;return t.qua&&K.qua&&(K.qua.equals(t.qua)||(e=!1)),t.pos&&K.pos&&(K.pos.equals(t.pos)||(e=!1)),t.target&&K.target&&(K.target.equals(t.target)||(e=!1)),K.zoom&&(K.zoom.equals(t.zoom)||(e=!1)),e||st(t),e}var o=!0;return K.qua.equals(t.qua)?(K.pos&&(K.pos.equals(t.pos)||(o=!1)),K.zoom&&K.zoom!=t.zoom&&(o=!1)):o=!1,o||st(t),o}function st(t){K={},K.mode=t.mode,t.pos&&(K.pos=new THREE.Vector3,K.pos.set(t.pos.x,t.pos.y,t.pos.z)),t.qua&&(K.qua=new THREE.Quaternion,K.qua.set(t.qua._x,t.qua._y,t.qua._z,t.qua._w)),t.target&&(K.target=new THREE.Vector3,K.target.set(t.target.x,t.target.y,t.target.z)),t.zoom&&(K.zoom=t.zoom)}function at(t,e,o,n,s,a){var i;console.log(arguments),i=e instanceof Array?(new THREE.Quaternion).fromArray(e):(new THREE.Quaternion).set(e._x,e._y,e._z,e._w);var r={mode:o,pano:t,qua:i,pos:n,target:s,zoom:a};isNaN(r.qua.x)&&console.log("NaN??????"),u["app"].player.flyToItem(r,(function(){u["app"].play.control.noFly=!0,X=!0}))}function it(t){if(!Q){var e={url:"",path:"/fsl-node"},o={role:H,roomId:z,userId:G,sceneNum:j["a"].urlQueryValue("m"),userLimitNum:30},n=j["a"].urlHashValue("socket");if(n)try{n=JSON.parse(decodeURIComponent(n)),e={url:n.socketHost,path:n.path},o.userLimitNum=n.options.userLimitNum}catch(s){console.error("socket参数转换出错")}Q=Object(L["b"])(e,o),Q.on("connect",(function(){t&&(ot("cart",!0),ot("ready",j["a"].urlQueryValue("m")))})),Q.on("disconnect",(function(){})),Q.on("webSyncAction",(function(t){if(t.type&&N["a"].emit("shop/sync/action",t),"leader"==H&&t.init){var e={follow:1,mode:u["app"].player.mode,qua:u["app"].player.quaternion,panoId:u["app"].player.currentPano.id};"floorplan"==e.mode&&(e.zoom=u["app"].player.cameraControls.activeControl.currentScale/($("#player").width()/$("#player").height())),("floorplan"==e.mode||"dollhouse"==e.mode)&&(e.target=u["app"].player.cameraControls.activeControl.target,e.pos=u["app"].player.cameraControls.activeControl.camera.position),tt(e)}if(J&&u["app"].player.cameraControls.activeControl){if(t.follow){var o=u["app"].model.panos.get(t.panoId);return void(o||u["app"].player.linkViewManager.inited?at(t.panoId,t.qua,t.mode,t.pos,t.target,t.zoom):N["a"].on("link/data/load",(function(){at(t.panoId,t.qua,t.mode,t.pos,t.target,t.zoom)})))}if("undefined"!=typeof t.onUpdate&&(u["app"].play.control.onUpdate=t.onUpdate,"leader"!=H||u["app"].play.control.onUpdate||N["a"].emit("vrhouse/socket/action","operation-tips")),"undefined"!=typeof t.scale&&(u["app"].player.cameraControls.activeControl.absoluteScale=t.scale,u["app"].player.cameraControls.activeControl.updateZoom()),u["app"].play.control.onUpdate)return;if(t.item){if(nt(t.item))return;X?t.item.mode==M["a"].PANORAMA&&t.item.pano!=u["app"].player.currentPano.id?s():(u["app"].player.copyCameraProp(u["app"].player.cameraControls.activeControl,t.item,{transitionQua:!0}),u["app"].player.adjustControlAngel()):t.item.pano==u["app"].player.currentPano.id?(X=!0,u["app"].player.copyCameraProp(u["app"].player.cameraControls.activeControl,t.item),u["app"].player.adjustControlAngel()):s()}else if(t.toPano){if(t.toPano.pano=u["app"].player.model.panos.get(t.toPano.panoId),u["app"].player.currentPano.id!=t.toPano){if(t.toPano.follow=!0,t.toPano.quaternion){var n=t.toPano.quaternion;t.toPano.quaternion=new THREE.Quaternion(n._x,n._y,n._z,n._w)}u["app"].player.flyToPano(t.toPano,(function(){X=!0}))}}else if(t.newModeInfo){if(t.newModeInfo.panoId&&(t.newModeInfo.pano=u["app"].player.model.panos.get(t.newModeInfo.panoId)),t.newModeInfo.follow=!0,t.newModeInfo.callback=function(){X=!0},t.newModeInfo.quaternion){n=t.newModeInfo.quaternion;t.newModeInfo.quaternion=new THREE.Quaternion(n._x,n._y,n._z,n._w)}u["app"].player.flyToNewMode(t.newModeInfo)}}function s(){var e;e=t.item.qua instanceof Array?(new THREE.Quaternion).fromArray(t.item.qua):(new THREE.Quaternion).set(t.item.qua._x,t.item.qua._y,t.item.qua._z,t.item.qua._w);var o={mode:M["a"].PANORAMA,pano:t.item.pano,qua:e};isNaN(o.qua.x)&&console.log("NaN??????"),u["app"].play.control.noFly=!1,u["app"].player.flyToItem(o,(function(){X=!0})),u["app"].play.control.noFly=!0}})),Q.on("clientSyncAction",(function(t){"sync"==t.type?ct():"back"==t.type?t.data&&t.data.repeat||lt():"newRoom"==t.type&&t.data&&t.data.roomId&&("customer"==H&&Y(),H="leader",z=t.data.roomId,G=t.data.userId,rt(),setTimeout((function(){it(!0)}),100)),N["a"].emit("shop/app/action",t)})),Q.on("changeVoiceStatus",(function(t){N["a"].emit("shop/sync/action",{type:"users",data:t.roomsPerson})})),Q.on("roomIn",(function(t){J=!0,!0,!0,t.roomsConfig&&N["a"].emit("mutedChange",!t.roomsConfig.enableTalk),"customer"==H&&(u["app"].play.control.onUpdate=!1,setTimeout((function(){u["app"].ready?tt({init:1},!0):N["a"].on("loaded",(function(){tt({init:1},!0)}))}),100)),N["a"].emit("shop/sync/action",{type:"users",data:t.roomsPerson})})),Q.on("roomInFail",(function(t){setTimeout((function(){N["a"].emit("shop/sync/action",{type:t.type})}),1500)})),Q.on("roomClose",(function(t){J=!1,!1,!1,t&&"3002"==t.code?N["a"].emit("shop/sync/action",{type:"dissolve"}):N["a"].emit("shop/sync/action",{type:"close"})})),Q.on("changeRoomEnableTalk",(function(t){N["a"].emit("mutedChange",!t.enableTalk)})),Q.on("someOneInRoom",(function(t){N["a"].emit("shop/sync/action",{type:"users",user:t.user,data:t.roomsPerson}),N["a"].emit("shop/sync/action",{type:"online",user:t.user,isOnline:!0})})),Q.on("someOneLeaveRoom",(function(t){N["a"].emit("shop/sync/action",{type:"users",user:t.user,data:t.roomsPerson}),N["a"].emit("shop/sync/action",{type:"online",user:t.user,isOnline:!1})})),Q.on("roomPersonChange",(function(t){N["a"].emit("shop/sync/action",{type:"userChange",data:t.roomsPerson,user:t.user,isOnline:"inRoom"==t.actionName})})),Q.on("action",(function(t){}))}}function rt(){Q&&(lt(),Q.close(),Q=null)}function ct(){Q&&Q.emit("startCall"),"customer"==H&&Z()}function lt(){Q&&Q.emit("stopCall"),u["app"].play.control.noFly=!1,J=!1,!1,!1,u["app"].play.control.onUpdate=!0}function ut(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,n)}return o}function dt(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?ut(Object(o),!0).forEach((function(e){Object(a["a"])(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ut(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function pt(t){t.scrollWidth>t.clientWidth&&(t.textContent=t.textContent+t.textContent,ht(t,t.scrollWidth/2,0))}function ht(t,e,o){setInterval((function(){var n=t.scrollLeft;n>=e?n=o:n++,t.scrollTo(n,0)}),54)}u["app"].player.cameraControls.on("vr_freedom",(function(t){J&&("customer"==H?u["app"].play.control.onUpdate=!0:tt({onUpdate:!1}))})),u["app"].player.on("vr_Rotate",(function(t){if(J&&null!=t&&null!=t.currentPano&&"customer"!=H){var e={};e.qua=t.quaternion,e.mode=t.mode,e.pos=t.position,t.cameraControls.activeControl.currentScale&&(e.zoom=t.cameraControls.activeControl.currentScale/($("#player").width()/$("#player").height())),e.type="Rotate",nt(e)||(t.mode==M["a"].PANORAMA?e.pano=t.currentPano.id:t.mode==M["a"].FLOORPLAN&&(e.pos=(new THREE.Vector3).set(t.position.x,t.position.y,t.position.z),e.zoom=t.cameraControls.activeControl.currentScale/($("#player").width()/$("#player").height())),t.cameraControls.activeControl.target&&(e.pos=t.position,e.target=t.cameraControls.activeControl.target),u["app"].play.control.onUpdate&&tt({item:e}))}})),u["app"].player.on("vr_Zoom",(function(t){if(J){var e=t.cameraControls.activeControl.absoluteScale;tt({scale:e})}})),u["app"].player.on("vr_FlyToPano",(function(t){J&&(t.socketed=!0,t.quaternion=u["app"].player.quaternion,"customer"==H&&(u["app"].play.control.noFly=!0),tt({toPano:t,onUpdate:!1}))})),u["app"].player.on("vr_FlyToTag",(function(t){"customer"==H&&t.follow&&(u["app"].play.control.noFly=!1),"leader"==H&&(u["app"].play.control.noFly=!1)})),u["app"].player.on("vr_FlyToNewMode",(function(t){J&&(t.socketed=!0,t.quaternion=tt({newModeInfo:t}))}));var ft={data:function(){return{show:!1,newView:!1,isMiniprogram:!1,disable:!1,detail:{}}},computed:dt(dt({},Object(i["b"])({showNavigations:"showNavigations",tempdata:"scene/tempdata",player:"player"})),{},{icon:function(){var t=this.detail.projectSite?this.detail.projectSite:"";return~t.indexOf("非建构筑物")?"/static/img/apps/fire-control/fire_other.png":~t.indexOf("交通工具")?"/static/img/apps/fire-control/fire_bus.png":~t.indexOf("垃圾及废弃物")?"/static/img/apps/fire-control/fire_recycle.png":"/static/img/apps/fire-control/fire_building.png"}}),methods:{bgClick:function(){this.show=!1,ot("cart",!0)},changeShow:function(){this.show=!this.show,this.show&&this.$bus.emit("shop/tag/show",!1,!0),ot("cart",!this.show)}},created:function(){var t=this;j["a"].detectWeixin()&&window.parent.wx.miniProgram.getEnv((function(e){e.miniprogram&&(t.isMiniprogram=!0)})),this.$bus.on("shop/header/disable",(function(e){t.disable=e,t.disable})),this.$bus.on("shop/header/hidemap",(function(){}))},mounted:function(){var t=Object(g["a"])(regeneratorRuntime.mark((function t(){var e=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.$bus.on("reserveReadySuccess",(function(t){var o=t.detail;e.detail=o})),t.next=3,V();case 3:this.detail=t.sent.detail,pt(this.$refs.title),setTimeout((function(){document.querySelector('canvas[name="player"]').addEventListener("touchstart",(function(t){e.bgClick()}))}),3e3);case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),components:{Map:T}},mt=ft,wt=(o("cd90"),o("5d77"),Object(h["a"])(mt,v,y,!1,null,"9c8ff4c4",null)),vt=wt.exports,yt=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{directives:[{name:"show",rawName:"v-show",value:t.player.showWidgets,expression:"player.showWidgets"}],staticClass:"reserve-container",class:{yqg:t.yqg},style:{visibility:-1!==t.player.progres?"hidden":"initial"}},[o("Toolbar",{directives:[{name:"show",rawName:"v-show",value:t.player.showWidgets,expression:"player.showWidgets"}],class:{notevent:"leader"!=t.role}}),t._e(),o("div",{staticClass:"right-oper"},[t.showNavigations.measure?o("div",{directives:[{name:"show",rawName:"v-show",value:!t.yqg,expression:"!yqg"}],on:{click:function(e){return e.stopPropagation(),t.onMenuClick("measure")}}},[o("img",{attrs:{src:"/static/img/apps/fire-control/fire_vr@2x.png",alt:""}}),t._v("\n 测量工具\n ")]):t._e(),o("div",{directives:[{name:"show",rawName:"v-show",value:!t.yqg,expression:"!yqg"}],on:{click:t.changeVR}},[o("img",{attrs:{src:"/static/img/apps/fire-control/fire_vr@2x.png",alt:""}}),t._v("\n VR\n ")]),o("div",{directives:[{name:"show",rawName:"v-show",value:t.yqg,expression:"yqg"}],class:{disable:!t.showPaint||!t.canUndo},on:{click:t.chexiao}},[o("img",{attrs:{src:"/static/img/apps/fire-control/fire_cancel@2x.png",alt:""}}),t._v("\n 撤销\n ")]),o("div",{directives:[{name:"show",rawName:"v-show",value:t.yqg,expression:"yqg"}],class:{disable:"leader"!=t.role},on:{click:function(e){t.showPaint=!t.showPaint}}},[o("img",{attrs:{src:t.showPaint?"/static/img/apps/fire-control/fire_pen_off@2x.png":"/static/img/apps/fire-control/fire_pen_on@2x.png",alt:""}}),t._v("\n 画笔 \n ")]),"leader"==t.role?[o("div",{directives:[{name:"show",rawName:"v-show",value:t.yqg,expression:"yqg"}],on:{click:t.setMic}},[o("img",{attrs:{src:t.muted?"/static/img/apps/fire-control/fire_mic_off@2x.png":"/static/img/apps/fire-control/fire_mic_on@2x.png",alt:""}}),t._v("\n 语音 \n ")])]:t._e(),o("div",{class:{disable:!t.deskList.length},on:{click:function(e){t.showAppendix=!0}}},[o("img",{attrs:{src:"/static/img/apps/fire-control/fire_appendix@2x.png",alt:""}}),t._v("\n 附件\n ")]),o("div",{directives:[{name:"show",rawName:"v-show",value:t.yqg,expression:"yqg"}],on:{click:t.quitShopping}},[o("img",{attrs:{src:"/static/img/apps/fire-control/fire_exit@2x.png",alt:""}}),t._v("\n 退出\n ")]),o("div",{directives:[{name:"show",rawName:"v-show",value:!t.yqg,expression:"!yqg"}],on:{click:t.onShopping}},[o("img",{attrs:{src:"/static/img/apps/fire-control/fire_share@2x.png",alt:""}}),t._v("\n 共享\n ")])],2),(t.showNavigations.guide&&t.showPlayGuilds,t._e()),o("Appendix",{attrs:{show:t.showAppendix},on:{hideRoom:function(e){t.showAppendix=!1}}}),t.yqg?o("PageShopping",{ref:"shopping",attrs:{showPaint:t.showPaint},on:{paintChange:function(e){return t.showPaint=t.showPaint},back:function(e){t.yqg=!1},updateUser:function(e){return t.currUser=e}}}):t._e()],1)},gt=[],bt=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("xwindow",{attrs:{title:"附件",show:t.show,height:"75%",bgColor:"#fff"},on:{hideRoom:function(e){return t.$emit("hideRoom")}}},[t.list.length?t._l(t.tableData,(function(e){return e.children&&e.children.length?o("div",{key:e._title,staticClass:"type-item"},[o("h3",[t._v(t._s(e.title))]),o("div",{staticClass:"addpend"},t._l(e.children,(function(e){return o("a",{key:e.id,attrs:{target:"_blank"},on:{click:function(o){return t.viewFile(e.fileOssUrl)}}},[t._v(t._s(e.fileName)),o("i",{staticClass:"iconfont icon_forward"})])})),0)]):t._e()})):o("div",{staticClass:"no-data"},[o("img",{attrs:{src:"static/img/apps/reserve/img_nodata@2x.png"}}),o("p",[t._v("暂无插件")])])],2)},_t=[],Pt=(o("6762"),o("2909")),xt=(o("7f7f"),function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"aaaaaaa"},[t.show?o("div",{staticClass:"bg",on:{click:function(e){return t.$emit("hideRoom")}}}):t._e(),o("div",{staticClass:"room-list-layout",style:"\n bottom: "+(t.show?"0":"-"+t.height)+";\n background: "+(t.bgColor||"#F7F7F7")+";\n height:"+t.height+";\n border-radius: "+(isNaN(Number(t.radius))?14:t.radius)+"px "+(isNaN(Number(t.radius))?14:t.radius)+"px 0px 0px;\n "},[o("i",{staticClass:"iconfont iconclose",on:{click:function(e){return t.$emit("hideRoom")}}}),o("h4",[t._v(t._s(t.title))]),o("div",{staticClass:"room-content"},[t._t("default")],2)])])}),Ct=[],Ot={props:["show","title","height","bgColor","radius"]},St=Ot,Et=(o("7210"),Object(h["a"])(St,xt,Ct,!1,null,"b1cb923c",null)),kt=Et.exports,Tt=[{name:"现场调查证据材料",value:0},{name:"火灾事故认定",value:1},{name:"其他",value:2}],jt={props:["show"],data:function(){return{list:[],types:Tt}},mounted:function(){var t=Object(g["a"])(regeneratorRuntime.mark((function t(){var e=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.$bus.on("reserveReadySuccess",(function(t){var o=t.deskList;e.list=o})),t.next=3,V();case 3:this.list=t.sent.deskList;case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),methods:{fly:function(t){var e=app.tagManager.tags[t.hotId];e&&app.player.flyToTag(e,!0),this.$emit("hideRoom")},viewFile:function(t){ot("viewFile",t)}},computed:{tableData:function(){var t,e=this.list||[],o=[],n=this.types.reduce((function(t,n){var s=e.filter((function(t){return n.name===t.attachmentType}));return t.push({title:n.name,children:s}),o.push.apply(o,Object(Pt["a"])(s)),t}),[]);return(t=n[n.length-1].children).push.apply(t,Object(Pt["a"])(e.filter((function(t){return!o.includes(t)})))),n}},components:{xwindow:kt}},Rt=jt,$t=(o("59f3"),Object(h["a"])(Rt,bt,_t,!1,null,"93e4fd00",null)),It=$t.exports,Nt=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"navigation",style:{zIndex:t.showUserList||t.showExit||t.showDissolve||t.showFull||t.showOver||t.repeat?99999999:999999}},[o("canvas",{directives:[{name:"show",rawName:"v-show",value:t.show,expression:"show"}],ref:"canvas"}),o("div",{directives:[{name:"show",rawName:"v-show",value:t.users.length,expression:"users.length"}],staticClass:"wrapper sync"},[o("div",[o("ul",[t._l(t.users,(function(e,n){return o("li",{key:n,class:[e.role],on:{click:function(e){t.showUserList=!0}}},[o("img",{attrs:{src:"null"===e.avatar?t.$config.getStaticResource("img/apps/vrhouse/avatar_default.jpg"):e.avatar,alt:""}}),o("span",{directives:[{name:"show",rawName:"v-show",value:e.onlineStatus&&1!=e.voiceStatus,expression:"user.onlineStatus && user.voiceStatus != 1"}],staticClass:"voice"},[o("i",{staticClass:"iconfont",class:[2==e.voiceStatus?"iconscene_mic_open":"iconscene_mic_off"]})]),o("span",{directives:[{name:"show",rawName:"v-show",value:!e.onlineStatus,expression:"!user.onlineStatus"}],staticClass:"status"},[o("span",[t._v(" 已离开 ")])]),e.onlineStatus?[e.userId==t.userId?o("div",[t._v("我")]):"leader"==e.role?o("div",[t._v("发起者")]):t._e()]:t._e()],2)})),t.users.length<30?o("li",{staticClass:"add",on:{click:t.onInvite}},[o("i",{staticClass:"iconfont icon_plus"})]):t._e()],2)])]),o("div",{ref:"chat",staticClass:"chat"},[o("transition-group",{attrs:{appear:"",tag:"ul"}},t._l(t.message,(function(e){return o("li",{key:e.id},[o("div",[o("div",{staticClass:"message"},[o("img",{attrs:{src:e.avatar||"/static/img/apps/fire-control/avatar_default.png",alt:""}}),e.nickname?o("span",{domProps:{innerHTML:t._s("「"+e.nickname+"」")}}):t._e(),o("span",[t._v(t._s(e.content))])])])])})),0)],1),o("x-window",{attrs:{show:t.showExit,"show-close":!1}},[o("div",{staticClass:"exit-tips"},[o("h4",[t._v("温馨提示")]),o("div",[t._v("是否退出火调场景VR共享")]),o("button",{staticClass:"btn-1",attrs:{type:"button"},on:{click:function(e){return t.onExit(!1)}}},[t._v("取消")]),o("button",{staticClass:"btn-2",attrs:{type:"submit"},on:{click:function(e){return t.onExit(!0,!1)}}},[t._v("退出")])])]),o("x-window",{attrs:{show:t.showDissolve,"show-close":!1}},[o("div",{staticClass:"exit-tips"},[o("h4",[t._v("结束提醒")]),o("div",[t._v("\n 火调场景VR共享已结束\n ")]),o("button",{staticClass:"btn-block",on:{click:function(e){return t.onBack()}}},[t._v("我知道了")])])]),o("x-window",{attrs:{show:t.showFull,"show-close":!1}},[o("div",{staticClass:"exit-tips"},[o("h4",[t._v("温馨提示")]),o("div",[t._v("火调场景房间已满人!")]),o("button",{staticClass:"btn-block",on:{click:function(e){return t.onBack()}}},[t._v("确定")])])]),o("x-window",{attrs:{show:t.showOver||t.repeat,"show-close":!1}},[o("div",{staticClass:"exit-tips"},[o("h4",[t._v("温馨提示")]),o("div",[t._v(t._s(t.repeat?"用户冲突,火调场景VR共享已结束。":"火调场景VR共享已结束"))]),o("button",{staticClass:"btn-block",on:{click:function(e){return t.onBack()}}},[t._v("我知道了")])])]),o("Paint",{ref:"draw",attrs:{"show-paint":t.showPaint},on:{showChange:function(e){return t.$emit("paintChange",e)}}}),o("xwindow1",{attrs:{title:"语音",show:t.showUserList,height:"52%",bgColor:"#fff"},on:{hideRoom:function(e){t.showUserList=!1}}},t._l(t.users,(function(e,n){return o("div",{key:n,staticClass:"list-user"},[o("div",[o("img",{attrs:{src:"null"===e.avatar?t.$config.getStaticResource("img/apps/vrhouse/avatar_default.jpg"):e.avatar}}),o("span",[t._v(t._s(e.userId==t.userId?"我":e.nickname))])]),o("i",{staticClass:"iconfont",class:[2==e.voiceStatus?"iconscene_mic_open":"iconscene_mic_off"],on:{click:function(o){e.userId==t.userId&&t.onSetMic()}}})])})),0)],1)},Ut=[],Dt=(o("7514"),function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("popup",{attrs:{show:t.show,"is-close":t.showClose},on:{close:function(e){return t.$emit("close")}}},[o("div",{staticClass:"share-x-window",style:{height:t.height},on:{touchstart:function(t){t.stopPropagation()}}},[t.showClose?o("div",{staticClass:"header"},[o("span",{staticClass:"close",on:{click:function(e){return e.stopPropagation(),t.$emit("close")},touchstart:function(e){return e.stopPropagation(),t.$emit("close")}}})]):t._e(),o("div",{staticClass:"main"},[t._t("default")],2),o("div",{staticClass:"footer"},[t._t("footer")],2)])])}),At=[],qt=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("transition",{attrs:{appear:"",name:"custom-classes-transition","enter-active-class":"animated fadeIn faster","leave-active-class":"animated fadeOut faster"}},[t.show?o("div",{staticClass:"x-popup-layer",style:{"background-color":t.bgColor},on:{touchmove:function(t){t.preventDefault()},touchstart:t.onClick}},[t._t("default")],2):t._e()])},Vt=[],Mt=999;function Lt(){return++Mt}var Ht={name:"x-popup-layer",props:{show:Boolean,isClose:Boolean,bgColor:String},data:function(){return{zIndex:Lt()}},methods:{onClick:function(){this.isClose&&this.$emit("close")}}},Gt=Ht,zt=(o("34c2"),Object(h["a"])(Gt,qt,Vt,!1,null,"58f44490",null)),Ft=zt.exports,Wt={components:{Popup:Ft},props:{show:Boolean,height:String,showClose:{type:Boolean,default:function(){return!0}}}},Bt=Wt,Qt=(o("b246"),Object(h["a"])(Bt,Dt,At,!1,null,"4280ee80",null)),Jt=Qt.exports,Kt=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"paint"},[o("canvas",{directives:[{name:"show",rawName:"v-show",value:t.showPaint,expression:"showPaint"}],ref:"canvas"}),t._e()])},Xt=[],Yt=o("bc19"),Zt=o("4c16"),te={props:{showPaint:Boolean},data:function(){return{role:F(),show:!1,canUndo:!1,colorA:"#02c8ae",colorB:"#2e98fe"}},watch:{canUndo:function(){this.$bus.emit("canUndoChange",this.canUndo)},showPaint:function(){this.showPaint&&(this.role=F()),this.showPaint?this.onDraw("drawStart"):this.onDraw("drawStop")},show:function(){ot("cart",!this.show),this.$bus.emit("shop/header/disable",this.show)}},created:function(){var t=this;this.$bus.on("fire/drawUndo",(function(){t.onDraw("drawUndo")})),this.$bus.on("shop/sync/action",(function(e){if("drawStart"==e.type){var o=function(e){t.show=!0,t.draw=[],t.drawHistory=[],t.$nextTick((function(){t.onDrawStart(),e&&e()}))};if(e.data&&e.data.save){if(!t.drawHistory||0===t.drawHistory.length&&e.data.drawHistory&&e.data.role!=t.role){var n=function(){console.log("init"),o((function(){t.drawHistory=[],e.data.drawHistory.forEach((function(e){var o=t.transformTo2d(e);t.drawHistory.push(JSON.parse(JSON.stringify(o))),t.drawing(o)}))}))};clearTimeout(t.timeout),t.timeout=setTimeout(n,1e3),t.$bus.on("player/position/change",(function(){clearTimeout(t.timeout),t.timeout=setTimeout(n,1e3)}))}}else o()}else if("drawStop"==e.type)t.show=!1,t.draw=null,t.drawHistory=null;else if("drawing"==e.type){var s=t.transformTo2d(e.data.drawing);e.data.role!=t.role&&(t.drawHistory.push(JSON.parse(JSON.stringify(s))),t.drawing(s))}else"drawUndo"==e.type&&t.drawUndo(e.data.role)}))},mounted:function(){var t,e=this;this.canvas=this.$refs.canvas,this.context=this.canvas.getContext("2d"),this.canvas.onmousedown=function(t){e.show&&(t.preventDefault(),e.beginStroke({x:t.clientX,y:t.clientY}))},this.canvas.onmouseup=function(t){e.show&&(t.preventDefault(),e.endStroke())},this.canvas.onmouseout=function(t){e.show&&(t.preventDefault(),e.endStroke())},this.canvas.onmousemove=function(t){e.show&&(t.preventDefault(),e._mouseDown&&e.moveStroke({x:t.clientX,y:t.clientY}))},this.canvas.addEventListener("touchstart",(function(o){e.show&&(o.preventDefault(),t=o.touches[0],e.beginStroke({x:t.pageX,y:t.pageY}))})),this.canvas.addEventListener("touchmove",(function(o){e.show&&(o.preventDefault(),e._mouseDown&&(t=o.touches[0],e.moveStroke({x:t.pageX,y:t.pageY})))})),this.canvas.addEventListener("touchend",(function(t){e.show&&(t.preventDefault(),e.endStroke())})),this.mouse=new THREE.Vector2},methods:{transformTo3d:function(t){var e=this,o=[];return 0==t.length?[]:(t.forEach((function(t,n){Yt["a"].convertScreenPositionToNDC(t.x,t.y,e.mouse);var s=Zt["a"].getMouseIntersect(x["objects"].player.camera,[e.intersectPlane],e.mouse);s?(t.pos3d=s.point,o.push(t)):console.error("no intersect ??")})),o)},transformTo2d:function(t){var e=[];return t.forEach((function(t){var o=new THREE.Vector3(t.pos3d.x,t.pos3d.y,t.pos3d.z),n=Zt["a"].getPos2d(o,x["objects"].player.camera);t.x=n.pos.x,t.y=n.pos.y,e.push(t)})),e},onDraw:function(t,e){var o,n=this;if("drawStart"==t){if(e?o=this.drawHistory:(this.show=!0,this.draw=[],this.drawHistory=[],this.$nextTick((function(){n.onDrawStart()}))),"leader"!==this.role)return}else if("drawStop"==t)this.show=!1,this.draw=null,this.drawHistory=null;else if("drawing"==t){var s=this.transformTo2d(data.content.drawing);data.role!=role&&this.drawHistory.push(JSON.parse(JSON.stringify(s)))}else"drawUndo"==t&&this.drawUndo(this.role);tt({type:t,data:{role:this.role,save:e,drawHistory:o}},!0)},onPainting:function(){var t=this.transformTo3d(this.draw);this.drawHistory.push(JSON.parse(JSON.stringify(t))),tt({type:"drawing",data:{drawing:t}},!0),this.draw=[],this.canUndo=!0,this.$bus.emit("canUndoChange",this.canUndo),this._endTime=0,this._mouseDown=!1,this._lastTimestamp=0},beginStroke:function(t){this._mouseDown=!0,this._lastTimestamp=Date.now(),this._lastPosition=this.windowToCanvas(t.x,t.y),this.draw.push({role:this.role,width:0,x:this._lastPosition.x,y:this._lastPosition.y,t:5})},onDrawStart:function(){var t=window.devicePixelRatio||1,e=this.canvas.getBoundingClientRect();this.ratio=1,this.canvas.width=e.width*t,this.canvas.height=e.height*t,this.context.scale(t,t),this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this._endTime=0,this._mouseDown=!1,this._lastTimestamp=0,this._lastLineWidth=-1,this._lastPosition={x:0,y:0},Yt["a"].convertScreenPositionToNDC(0,0,this.mouse);var o=Zt["a"].getMouseIntersect(x["objects"].player.camera,[x["objects"].model.skybox,x["objects"].sceneRenderer.scene.skyboxBG],this.mouse);this.placeIntersectPlane(o&&o.point)},moveStroke:function(t){var e=Date.now(),o=this.windowToCanvas(t.x,t.y),n=this.calcDistance(o,this._lastPosition),s=e-this._lastTimestamp,a=this.calcLineWidth(s,n);this.context.beginPath(),this.context.moveTo(this._lastPosition.x,this._lastPosition.y),this.context.lineTo(o.x,o.y),this.draw.push({role:this.role,width:a,x:o.x,y:o.y,t:5}),this.context.strokeStyle=this.colorA,this.context.lineWidth=a,this.context.lineCap="round",this.context.linJoin="round",this.context.stroke(),this._lastPosition=o,this._lastTimestamp=e,this._lastLineWidth=a},endStroke:function(){this.draw.push({role:this.role,width:0,x:this._lastPosition.x,y:this._lastPosition.y,t:0}),this.onPainting(),this._mouseDown=!1,this._endTime=Date.now()},calcLineWidth:function(t,e){var o,n=e/t;return o=n<=.1?6:n>=3?2:6-(n-.1)/2.9*2,-1==this._lastLineWidth?o:2*this._lastLineWidth/3+1*o/3},calcDistance:function(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))},windowToCanvas:function(t,e){var o=this.canvas.getBoundingClientRect();return{x:Math.round(t-o.left),y:Math.round(e-o.top)}},drawing:function(t){for(var e=this,o=function(o){t[o].t&&setTimeout((function(){e.context.beginPath(),e.context.strokeStyle=t[o].role==e.role?e.colorA:e.colorB,e.context.moveTo(t[o].x*e.ratio,t[o].y*e.ratio),e.context.lineTo(t[o+1].x*e.ratio,t[o+1].y*e.ratio),e.context.lineWidth=t[o].width*e.ratio,e.context.lineCap="round",e.context.linJoin="round",e.context.stroke()}),5)},n=0;n<t.length-1;n++)o(n)},drawUndo:function(t){var e=this;this.context.clearRect(0,0,this.canvas.width,this.canvas.height);for(var o=this.drawHistory.length-1;o>=0;o--)if(this.drawHistory[o][0].role==t){this.drawHistory.splice(o,1);break}this.drawHistory.forEach((function(t){for(var o=0;o<t.length-1;o++)t[o].t&&(e.context.beginPath(),e.context.strokeStyle=t[o].role==e.role?e.colorA:e.colorB,e.context.moveTo(t[o].x*e.ratio,t[o].y*e.ratio),e.context.lineTo(t[o+1].x*e.ratio,t[o+1].y*e.ratio),e.context.lineWidth=t[o].width*e.ratio,e.context.lineCap="round",e.context.linJoin="round",e.context.stroke())})),this.canUndo=this.drawHistory.some((function(t){return t[0].role==e.role})),this.$bus.emit("canUndoChange",this.canUndo)},placeIntersectPlane:function(t){if(!this.intersectPlane){var e=new THREE.PlaneGeometry(8e3,8e4,1,1);this.intersectPlane=new THREE.Mesh(e,new THREE.MeshBasicMaterial({transparent:!0,wireframe:!1,opacity:0,side:THREE.DoubleSide,depthTest:!1})),this.intersectPlane.lookAt(new THREE.Vector3(0,1,0)),this.intersectPlane.name="intersectPlane",x["objects"].model.add(this.intersectPlane)}if(t){this.intersectPlane.position.copy(t);var o=x["objects"].player.getDirection(null,x["objects"].player.camera);this.intersectPlane.lookAt(t.clone().add(o))}}}},ee=te,oe=(o("9096"),Object(h["a"])(ee,Kt,Xt,!1,null,"b7294878",null)),ne=oe.exports;function se(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,n)}return o}function ae(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?se(Object(o),!0).forEach((function(e){Object(a["a"])(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):se(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var ie,re={props:["showPaint"],components:{Paint:ne,XWindow:Jt,xwindow1:kt},data:function(){return{role:null,userId:null,users:[],show:!1,showExit:!1,colorA:"#02c8ae",colorB:"#2e98fe",showDissolve:!1,showOver:!1,showFull:!1,showUserList:!1,showCart:!1,goods:null,repeat:!1,chats:[],orgin:j["a"].urlQueryValue("origin").toLowerCase()}},watch:{users:{immediate:!0,handler:function(){var t=this;clearTimeout(this.timeouta),this.showCart||(this.showCart=!0,ot("cart",!0));var e=this.users.find((function(t){return"leader"===t.role})),o=this.users.find((function(e){var o=e.userId;return o===t.userId}));o&&o.role!==this.role?(tt({type:"repeat"},!0),this.repeat=!0):this.repeat=!1,e&&!e.onlineStatus&&(this.timeouta=setTimeout((function(){t.showOver=!0}),12e4)),this.showPaint&&"leader"===this.role&&this.$refs.draw.onDraw("drawStart",!0)}},message:function(){this.$nextTick((function(){setTimeout((function(){}),3e3)}))}},computed:ae(ae({},Object(i["b"])({player:"player"})),{},{message:function(){return this.chats}}),created:function(){var t=this;"4dplaza"==j["a"].urlQueryValue("origin").toLowerCase()&&(this.showPaint=!0),this.role=F(),this.userId=W();var e=this;function o(t){if(console.log(t),"repeat"===t.type&&(e.repeat=!0),"full"!=t.type)if("users"==t.type){for(var o,n=0;n<t.data.length;n++)if("leader"==t.data[n].role){o=t.data.splice(n,1);break}if(o&&(t.data=o.concat(t.data)),!t.data.some((function(t){return"leader"==t.role})))return void(e.isNoTips()&&(e.showOver=!0));e.users=t.data,e.$emit("updateUser",e.users.find((function(t){return t.userId===e.userId})))}else if("userChange"==t.type){for(var s,a=0;a<t.data.length;a++)if("leader"==t.data[a].role){s=t.data.splice(a,1);break}s&&(t.data=s.concat(t.data)),e.users=t.data,"leader"==e.role&&"leader"!=t.user.role?e.showMessage("".concat(t.isOnline?"进入":"离开","房间"),t.user):"leader"!=e.role&&"leader"==t.user.role&&(t.user.nickname="发起人",e.showMessage("".concat(t.isOnline?"进入":"离开","房间"),t.user))}else"online"==t.type?"leader"==e.role&&"leader"!=t.user.role&&e.showMessage("".concat(t.isOnline?"进入":"退出","房间"),t.user):"dissolve"==t.type?e.isNoTips()&&(e.showDissolve=!0):"close"==t.type?e.isNoTips()&&(e.showOver=!0):"tagShow"==t.type?e.$bus.emit("shop/tag/show",t.data):"tagSwitch"==t.type&&e.$bus.emit("shop/tag/switch",t.data);else e.isNoTips()&&(e.showFull=!0)}this.$once("hook:beforeDestroy",(function(){t.$bus.off("shop/sync/action",o),t.role})),this.$bus.on("client/action",(function(){data.type})),this.$bus.on("shop/sync/action",o),"leader"==this.role&&ot("invite"),j["a"].urlHasValue("shopping")&&-1!=this.player.progres?this.$bus.on("loaded",(function(){ct(),ot("ready",t.$config.projectNum)})):(ct(),ot("ready",this.$config.projectNum)),window.CHECKEXIT=function(){e.showExit=!0}},mounted:function(){var t=this;this.$bus.on("mutedChange",(function(e){t.muted=e}))},destroyed:function(){window.CHECKEXIT=null},methods:{changeRoomEnableTalk:function(t){if("leader"==this.role)return et(t),!0},windowToCanvas:function(t,e){var o=this.canvas.getBoundingClientRect();return{x:Math.round(t-o.left),y:Math.round(e-o.top)}},calcDistance:function(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))},calcLineWidth:function(t,e){var o,n=e/t;return o=n<=.1?6:n>=3?2:6-(n-.1)/2.9*2,-1==this._lastLineWidth?o:2*this._lastLineWidth/3+1*o/3},transformTo3d:function(t){var e=this,o=[];return 0==t.length?[]:(t.forEach((function(t,n){Yt["a"].convertScreenPositionToNDC(t.x,t.y,e.mouse);var s=Zt["a"].getMouseIntersect(x["objects"].player.camera,[e.intersectPlane],e.mouse);s?(t.pos3d=s.point,o.push(t)):console.error("no intersect ??")})),o)},beginStroke:function(t){this._mouseDown=!0,this._lastTimestamp=Date.now(),this._lastPosition=this.windowToCanvas(t.x,t.y),this.draw.push({role:this.role,width:0,x:this._lastPosition.x,y:this._lastPosition.y,t:5})},moveStroke:function(t){var e=Date.now(),o=this.windowToCanvas(t.x,t.y),n=this.calcDistance(o,this._lastPosition),s=e-this._lastTimestamp,a=this.calcLineWidth(s,n);this.context.beginPath(),this.context.moveTo(this._lastPosition.x,this._lastPosition.y),this.context.lineTo(o.x,o.y),this.draw.push({role:this.role,width:a,x:o.x,y:o.y,t:5}),this.context.strokeStyle=this.colorA,this.context.lineWidth=a,this.context.lineCap="round",this.context.linJoin="round",this.context.stroke(),this._lastPosition=o,this._lastTimestamp=e,this._lastLineWidth=a},onPainting:function(){var t=this.transformTo3d(this.draw);this.drawHistory.push(JSON.parse(JSON.stringify(t))),tt({drawing:t}),this.draw=[],this.canUndo=!0,this._endTime=0,this._mouseDown=!1,this._lastTimestamp=0},endStroke:function(){this.draw.push({role:this.role,width:0,x:this._lastPosition.x,y:this._lastPosition.y,t:0}),this.onPainting(),this._mouseDown=!1,this._endTime=Date.now()},placeIntersectPlane:function(t){if(!this.intersectPlane){var e=new THREE.PlaneGeometry(8e3,8e4,1,1);this.intersectPlane=new THREE.Mesh(e,new THREE.MeshBasicMaterial({transparent:!0,wireframe:!1,opacity:0,side:THREE.DoubleSide,depthTest:!1})),this.intersectPlane.lookAt(new THREE.Vector3(0,1,0)),this.intersectPlane.name="intersectPlane",x["objects"].model.add(this.intersectPlane)}if(t){this.intersectPlane.position.copy(t);var o=x["objects"].player.getDirection(null,x["objects"].player.camera);this.intersectPlane.lookAt(t.clone().add(o))}},onDrawStart:function(){var t=window.devicePixelRatio||1,e=this.canvas.getBoundingClientRect();this.ratio=1,this.canvas.width=e.width*t,this.canvas.height=e.height*t,this.context.scale(t,t),this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this._endTime=0,this._mouseDown=!1,this._lastTimestamp=0,this._lastLineWidth=-1,this._lastPosition={x:0,y:0},Yt["a"].convertScreenPositionToNDC(0,0,this.mouse);var o=Zt["a"].getMouseIntersect(x["objects"].player.camera,[x["objects"].model.skybox,x["objects"].sceneRenderer.scene.skyboxBG],this.mouse);this.placeIntersectPlane(o&&o.point)},transformTo2d:function(t){var e=[];return t.forEach((function(t){var o=new THREE.Vector3(t.pos3d.x,t.pos3d.y,t.pos3d.z),n=Zt["a"].getPos2d(o,x["objects"].player.camera);t.x=n.pos.x,t.y=n.pos.y,e.push(t)})),e},drawing:function(t){for(var e=this,o=function(o){t[o].t&&setTimeout((function(){e.context.beginPath(),e.context.strokeStyle=t[o].role==e.role?e.colorA:e.colorB,e.context.moveTo(t[o].x*e.ratio,t[o].y*e.ratio),e.context.lineTo(t[o+1].x*e.ratio,t[o+1].y*e.ratio),e.context.lineWidth=t[o].width*e.ratio,e.context.lineCap="round",e.context.linJoin="round",e.context.stroke()}),5)},n=0;n<t.length-1;n++)o(n)},onInvite:function(){ot("invite")},onSetMic:function(){this.muted?alert("发起人已关闭语音,无法开启"):ot("mic")},onExit:function(t,e){var o=this;this.showExit=!1,this.showDissolve=!1,this.showFull=!1,this.showOver=!1,t&&(this.goods?this.goods.realShopUrl?(ot("cart",!1),window.location.href=this.goods.realShopUrl):window.parent.wx.miniProgram.navigateTo({url:"/pages/goods/goods?id="+this.goods.id}):e?(ot("newRoom"),setTimeout((function(){o.$emit("back")}),300)):(console.error("这里"),lt(),ot("exit"))),this.goods=null},onBack:function(){this.showExit=!1,this.showDissolve=!1,this.showFull=!1,this.showOver=!1,lt(),ot("back")},isNoTips:function(){return!this.showExit&&!this.showFull&&!this.showDissolve&&!this.showOver},exitToDetail:function(t){this.goods=t,this.showExit=!0},showMessage:function(t,e){var o=this;this.chats.push({id:"".concat(Date.now()).concat(this.chats.length),avatar:e.avatar,nickname:e.nickname,content:t}),setTimeout((function(){o.chats.shift()}),1500)}}},ce=re,le=(o("127c"),Object(h["a"])(ce,Nt,Ut,!1,null,"5cf42037",null)),ue=le.exports,de=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"guides",class:{disable:!t.status.isPlaying&&!t.modeCanSwitch},on:{touchmove:function(t){t.preventDefault()}}},[o("div",{staticClass:"frame"},[o("ul",t._l(t.roomLabels,(function(e,n){return o("li",{key:n,class:{active:n==t.index},on:{click:function(e){return t.onFrameActive(n)}}},[o("div",{staticClass:"content"},[o("span",[t._v(t._s(e.label))])]),t.status.isPlaying?o("div",{staticClass:"progress"},[o("div",{staticClass:"value",style:{width:t.progress+"%"}})]):t._e()])})),0)])])},pe=[],he=(o("c5f6"),o("f121"),o("ff11"),o("b235"));function fe(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,n)}return o}function me(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?fe(Object(o),!0).forEach((function(e){Object(a["a"])(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):fe(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var we,ve={props:{show:Boolean},data:function(){return{index:-1,progress:0,disable:!1}},created:function(){var t=this;u["play"].on("guide/play/start",(function(e){t.onRoomPlay(!0,!1),t.$store.commit("guide/SetStatus",{isPlaying:!0})})),u["play"].on("guide/play/pause",(function(e){t.onRoomPlay(!1),t.$store.commit("guide/SetStatus",{isPlaying:!1})})),u["play"].on("guide/play/stop",(function(){t.onRoomPlay(!1,!0),t.$store.commit("guide/SetStatus",{isPlaying:!1}),t.$emit("end")})),u["play"].on("guide/play/playing",(function(e){t.$store.commit("guide/SetIndex",e)})),u["play"].on("guide/play/flyToStart",(function(e){t.$store.commit("guide/SetIndex",e)}))},mounted:function(){var t=this;ie=new Sly(this.$el.querySelector(".frame"),{horizontal:!0,itemNav:"centered",smart:!0,scrollTrap:!0,scrollBy:1,mouseDragging:!0,touchDragging:!0,speed:300,dragHandle:!0,dynamicHandle:!0,clickBar:!0,scrollSource:this.$el,activateOn:null}).init(),window.__scrollbars.push(ie),this.$nextTick((function(){ie.reload(),t.$emit("init")}))},watch:{show:function(){var t=this;this.$nextTick((function(){t.show&&t.status.isPlaying&&ie.activate(t.index)}))},index:function(){var t=this;this.$nextTick((function(){-1!=t.index&&ie.activate(t.index)}))},disable:function(){this.$emit("disable",this.disable)}},computed:me({},Object(i["b"])({mode:"mode",page:"page",modeCanSwitch:"modeCanSwitch",musicIndex:"scene/musicIndex",plays:"guide/plays",status:"guide/status",roomLabels:"guide/roomLabels",metadata:"scene/metadata"})),methods:{onFrameActive:function(t){var e=this,o=this.roomLabels[t];this.disable=!0,this.$nextTick((function(){u["play"].pause(),u["play"].chooseFragment(o.index,0,(function(){u["play"].control.flyToSingleCap&&(u["play"].control.flyToSingleCap=!1),e.disable=!1})),e.$store.commit("guide/SetIndex",o.index),e.index=t}))},onGuidePlay:function(){var t=this;if(this.status.isPlaying)u["play"].pause();else{-1==this.index&&(this.index=0),this.disable=!0;var e=this.roomLabels[this.index];u["play"].chooseFragment(e.index,0,(function(){u["play"].control.flyToSingleCap&&(u["play"].control.flyToSingleCap=!1),u["play"].start((function(){t.disable=!1}))}))}},onRoomPlay:function(t,e){var o=this;if(!t)return this.timer&&he["a"].cancel(this.timer),this.progress=100,void setTimeout((function(){o.progress=0,e&&(o.index=0,o.$nextTick((function(){o.index=-1})))}),200);var n=this.roomLabels[this.index];if(n){var s=parseInt(1e3*Number(n.cTime).toFixed(3));this.timer=he["a"].start((function(e){1==e?(o.progress=0,o.index++,o.onRoomPlay(t)):o.progress=100*e}),s)}},reload:function(){this.$nextTick((function(){ie.reload()}))}}},ye=ve,ge=(o("2a3b"),Object(h["a"])(ye,de,pe,!1,null,"2594ac74",null)),be=ge.exports,_e=function(){var t=this,e=t.$createElement,o=t._self._c||e;return t.visible?o("div",{staticClass:"toolbar",class:{collapse:t.isCollapse||0==t.player.showToolbar||t.player.showVR},on:{touchmove:function(t){t.preventDefault()},touchstart:function(t){t.stopPropagation()}}},[t.showNavigations.guide&&t.showNavigations.map&&t.roomLabels.length?o("div",{staticClass:"guide",class:{flex:t.roomLabels.length<=2,disable:t.isGuideDisable}},[o("div",{staticClass:"play",on:{click:t.onGuidePlay}},[o("i",{staticClass:"iconfont",class:[t.status.isPlaying?"iconshow_suspension":"iconshow_playback"]})]),o("div",{staticClass:"rooms"},[o("Guides",{ref:"guides",on:{end:function(){return t.isPlayed=!1},disable:function(e){return t.isGuideDisable=e}}})],1)]):0==t.showNavigations.map?o("div",{staticClass:"ctrls",class:{notzh:t.isNotZH,noguide:0==t.roomLabels.length},on:{touchstart:t.onCheckPlaying}},[t.showNavigations.guide&&t.roomLabels.length?o("div",{staticClass:"play",class:{disable:t.isGuideDisable},on:{touchstart:function(t){t.stopPropagation()}}},[o("b",{on:{click:t.onGuidePlay}},[o("i",{staticClass:"iconfont",class:[t.status.isPlaying?"iconshow_suspension":"iconshow_playback"]})]),o("span",{on:{click:function(e){t.showGuides=!t.showGuides}}},[o("em",[t._v(t._s(t.isPlayed?t.status.isPlaying?t.$t("show.guide_play"):t.$t("show.guide_pause"):t.$t("show.guide")))]),o("i",{staticClass:"iconfont iconshow_drop-down",class:{down:t.showGuides}})])]):t._e(),t.showNavigations.pano?o("div",{class:{active:"pano"==t.mode,disable:t.disable},on:{click:function(e){return t.onModeSwitch("pano")}}},[o("i",{staticClass:"iconfont",class:["pano"==t.mode?"iconshow_roaming_selected":"iconshow_roaming_normal"]}),o("span",{class:{show:"pano"==t.modeTips}},[t._v(t._s(t.$t("show.switch_pano")))])]):t._e(),t.showNavigations.m2d?o("div",{class:{active:"2d"==t.mode,disable:t.disable},on:{click:function(e){return t.onModeSwitch("2d")}}},[o("i",{staticClass:"iconfont",class:["2d"==t.mode?"iconshow_plane_selected":"iconshow_plane_normal"]}),o("span",{class:{show:"2d"==t.modeTips}},[t._v(t._s(t.$t("show.switch_2d")))])]):t._e(),t.showNavigations.m3d?o("div",{class:{active:"3d"==t.mode,disable:t.disable},on:{click:function(e){return t.onModeSwitch("3d")}}},[o("i",{staticClass:"iconfont ",class:["3d"==t.mode?"iconshow_3d_selected":"iconshow_3d_normal"]}),o("span",{class:{show:"3d"==t.modeTips}},[t._v(t._s(t.$t("show.switch_3d")))])]):t._e(),t.showNavigations.guide&&t.roomLabels.length?[o("div",{staticClass:"rooms",class:{show:t.showGuides&&t.isGuides,init:t.isGuideInit,hide:t.isCollapse||0==t.player.showToolbar}},[o("Guides",{ref:"guides",attrs:{show:t.showGuides},on:{end:function(){return t.isPlayed=!1},init:function(){return t.isGuideInit=!0},disable:function(e){return t.isGuideDisable=e}}})],1)]:t._e()],2):t._e(),o("div",{staticClass:"switch",on:{click:function(e){return t.onCollapse()}}},[o("i",{staticClass:"iconfont iconshow_function_collect"})])]):t._e()},Pe=[];function xe(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,n)}return o}function Ce(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?xe(Object(o),!0).forEach((function(e){Object(a["a"])(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):xe(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var Oe={components:{Guides:be},data:function(){return{modeTips:"",isCollapse:!1,isPlayed:!1,isGuides:!0,isGuideInit:!1,isGuideDisable:!1,showGuides:!1}},computed:Ce(Ce({},Object(i["b"])({mode:"mode",player:"player",canSwitch:"modeCanSwitch",status:"guide/status",roomLabels:"guide/roomLabels",showNavigations:"showNavigations"})),{},{visible:function(){return this.showNavigations.map?this.showNavigations.guide&&this.roomLabels.length>0:!!(this.showNavigations.guide&&this.roomLabels.length||this.showNavigations.pano||this.showNavigations.m2d||this.showNavigations.m3d)||void 0},disable:function(){return!!this.status.isPlaying||!this.canSwitch},isNotZH:function(){return"zh"!=this.$config.lang}}),watch:{isCollapse:function(){var t=this;this.$nextTick((function(){t.isCollapse?t.isGuides=!1:setTimeout((function(){t.isGuides=!0}),500)}))},isGuides:function(){this.$emit("show-guide",this.showGuides,this.isGuides)},showGuides:function(){this.$emit("show-guide",this.showGuides,this.isGuides)},"player.showToolbar":function(){var t=this;this.$nextTick((function(){0==t.player.showToolbar?t.isGuides=!1:setTimeout((function(){t.isGuides=!0}),500)}))},"player.showVR":function(){var t=this;this.$nextTick((function(){t.player.showVR?t.isGuides=!1:setTimeout((function(){t.isGuides=!0}),500)}))},roomLabels:{handler:function(t,e){var o=this;this.showNavigations.guide&&this.roomLabels.length&&this.$nextTick((function(){$(o.$el).find(".ctrls").length&&($(o.$el).find(".ctrls ul").outerWidth()<=window.innerWidth-30?$(o.$el).find(".ctrls").addClass("flex"):$(o.$el).find(".ctrls").removeClass("flex"),o.$refs.guides&&o.$refs.guides.reload())}))},immediate:!0}},methods:{onModeSwitch:function(t){var e=this;we&&(this.modeTips="",clearTimeout(we)),this.modeTips=t,we=setTimeout((function(){e.modeTips=""}),2e3),Object(u["flyToNewMode"])(t)},onGuidePlay:function(){0==this.isPlayed&&(this.isPlayed=!0),this.$refs.guides&&this.$refs.guides.onGuidePlay()},onCollapse:function(){0==this.player.showToolbar?(this.isCollapse=!1,this.$store.commit("SetPlayerOptions",{showMap:!0,showToolbar:!0,showMore:!1,showDescription:!1})):this.isCollapse=!this.isCollapse},onCheckPlaying:function(){this.status.isPlaying&&u["play"].pause()}}},Se=Oe,Ee=(o("013b"),Object(h["a"])(Se,_e,Pe,!1,null,"5e72852a",null)),ke=Ee.exports;function Te(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,n)}return o}function je(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?Te(Object(o),!0).forEach((function(e){Object(a["a"])(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Te(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var Re={data:function(){return{showPaint:!1,showWidth:"auto",showAppendix:!1,showInfo:!1,muted:!1,role:null,showCtrl:!0,showPlayGuilds:!1,currUser:{},showReserveRet:!1,reserveInfo:{},isPlayed:!1,yqg:j["a"].urlHasValue("shopping"),labelDesk:null,deskList:[],showReserveFrom:!1,detail:{},orderDeskId:0,canUndo:!1,drawStart:!1}},computed:je({},Object(i["b"])({mode:"mode",player:"player",tags:"hotspot/tags",plays:"guide/plays",showNavigations:"showNavigations",status:"guide/status",medias:"guide/medias"})),methods:{guideClickHandle:function(){this.$refs.guides&&u["play"].pause(),this.showPlayGuilds=!this.showPlayGuilds},onMenuClick:function(){this.$store.commit("SetPlayerOptions",{showMore:!1,showDescription:!1,showMap:!0,showToolbar:!0}),this.$bus.emit("measure/Handle","start")},chexiao:function(){this.$bus.emit("fire/drawUndo")},onPlayGuide:function(){var t=this;if(!this.$refs.guides)return this.showPlayGuilds=!0;-1===this.$refs.guides.index&&(this.$refs.guides.index=0),this.$refs.guides.$nextTick((function(){t.status.isPlaying?u["play"].pause():u["play"].start()}))},flyToNewMode:u["flyToNewMode"],tagReserve:function(){var t=this;0===this.labelDesk.orderStatus||2===this.labelDesk.orderStatus?(this.orderDeskId=this.labelDesk.id,this.showInfo=!this.showInfo):(this.showReserveRet=!0,setTimeout((function(){return t.showReserveRet=!1}),2e3))},setMic:function(){this.muted=!this.muted,this.$refs.shopping.changeRoomEnableTalk(!this.muted)},prepare:function(t){this.reserveInfo=t,this.showReserveFrom=!0},changeVR:function(){Object(w["c"])("VRMode1"),this.$store.commit("SetVR",!0)},onShopping:function(){this.yqg=!0},quitShopping:function(){this.$refs.shopping.showExit=!0},onDraw:function(){tt({name:this.drawStart?"drawStop":"drawStart",data:this.currUser.role},!0),this.drawStart=!this.drawStart,console.log("---",this.drawStart);var t=this.$refs.shopping;this.drawStart?(t.show=!0,t.draw=[],t.drawHistory=[],t.$nextTick((function(){t.onDrawStart()}))):(t.show=!1,t.draw=null,t.drawHistory=null,console.error("????"))}},watch:{detail:function(){this.detail.canteenName&&(document.title=this.detail.canteenName)},showPaint:function(){this.showPaint||(this.canUndo=!1)}},mounted:function(){var t=Object(g["a"])(regeneratorRuntime.mark((function t(){var e,o=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.$bus.on("canUndoChange",(function(t){console.error("----------------"),o.canUndo=t})),this.role=F(),this.$bus.on("shop/sync/action",(function(t){"drawStart"==t.type?o.showPaint=!0:"drawStop"==t.type&&(o.showPaint=!1)})),this.$bus.on("mutedChange",(function(t){return o.muted=t})),this.showWidth=this.$refs.panel?this.$refs.panel.offsetWidth+"px":0,this.$bus.on("tag-reserve",(function(t){o.showInfo=!0,o.orderDeskId=t})),t.next=8,V();case 8:return this.detail=t.sent.detail,this.$bus.on("reserveReadySuccess",(function(t){var e=t.deskList,n=t.detail;o.deskList=e,o.detail=n})),t.next=12,V();case 12:e=t.sent,console.error(e),this.deskList=e.deskList,this.detail=e.detail,window.addEventListener("hashchange",(function(){try{var t=JSON.parse(decodeURI(location.hash.substr(1)));t.deskId===o.orderDeskId&&(V(!0),o.showInfo=!1)}catch(e){console.error(e)}}));case 17:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),created:function(){var t=this;u["play"].on("guide/play/start",(function(e){t.$store.commit("guide/SetStatus",{isPlaying:!0})})),u["play"].on("guide/play/pause",(function(e){t.$store.commit("guide/SetStatus",{isPlaying:!1})})),u["play"].on("guide/play/stop",(function(){t.$store.commit("guide/SetStatus",{isPlaying:!1})}))},components:{Guides:be,Toolbar:ke,Appendix:It,PageShopping:ue}},$e=Re,Ie=(o("3133"),o("fbdd"),Object(h["a"])($e,yt,gt,!1,null,"536b7e9e",null)),Ne=Ie.exports,Ue=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("popup",{attrs:{show:t.show,"is-close":!1}},[o("div",{staticClass:"password"},[o("h1",[t._v("温馨提示")]),o("h4",[t._v("场景已设置密码,请先输入密码")]),o("input",{directives:[{name:"model",rawName:"v-model",value:t.password,expression:"password"}],attrs:{type:"password",placeholder:"请输入密码"},domProps:{value:t.password},on:{input:function(e){e.target.composing||(t.password=e.target.value)}}}),o("div",[t._v(t._s(t.tips))]),o("button",{attrs:{type:"submit"},on:{click:t.check}},[t._v("进入")]),o("button",{attrs:{type:"button"},on:{click:function(e){return t.$emit("cancel")}}},[t._v("取消")])])])},De=[],Ae=o("fafa");function qe(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,n)}return o}function Ve(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?qe(Object(o),!0).forEach((function(e){Object(a["a"])(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):qe(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var Me={components:{Popup:Ft},data:function(){return{tips:"",password:"",isValid:!1}},computed:Ve(Ve({},Object(i["b"])({metadata:"scene/metadata"})),{},{show:function(){return 1==this.metadata.needKey&&!this.isValid}}),created:function(){Ae["b"].register((function(t){return new Promise((function(e){return t.resolve(e)}))}))},methods:{check:function(){var t=this;this.tips="",this.$nextTick((function(){if(!t.password)return t.tips=t.$t("show.password_require");t.$api.checkPassword(t.password).done((function(e){0==e.code?(t.isValid=!0,Ae["b"].valid()):t.tips=t.$t("tips.password_error")}))}))}}},Le=Me,He=(o("99bf"),Object(h["a"])(Le,Ue,De,!1,null,"01d29b1e",null)),Ge=He.exports,ze=o("3b09");function Fe(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,n)}return o}function We(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?Fe(Object(o),!0).forEach((function(e){Object(a["a"])(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Fe(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var Be={components:{Player:m,AppHeader:vt,AppMain:Ne,Password:Ge,Floor:ze["a"]},data:function(){return{show:!0,isGuide:!1,showGoods:!1,showPassword:!1}},created:function(){var t=this;"fashilong"==j["a"].urlQueryValue("origin")&&(this.showPassword=!0),"discover"==this.$config.appenv||localStorage.getItem("user_guide")?this.isGuide=!0:this.$bus.on("player/user/guided",(function(){return t.show=!0})),this.$bus.on("shop/app/action",(function(t){"openTag"==t.type&&__api.tag.openById(t.data)})),this.$bus.on("shop/tag/onshow",(function(e){t.showGoods=e})),window.addEventListener("message",(function(e){e.data.cmd&&("scene"==e.data.cmd?ot("scene",{cmd:e.data.data,num:t.$config.projectNum}):"showTabs"==e.data.cmd&&ot(e.data.cmd,e.data.data))}))},watch:{"player.progres":function(){-1==this.player.progres&&(document.title=this.tempdata.title,this.isGuide&&!this.show&&(this.show=!0))}},computed:We({},Object(i["b"])({player:"player",tempdata:"scene/tempdata"})),mounted:function(){it()},methods:{onBack:function(){this.player.showVR&&(Object(w["c"])("VRMode0"),this.$store.commit("SetVR",!1))},onPasswordCancel:function(){this.showPassword=!1,ot("back")}}},Qe=Be,Je=(o("cb0c"),o("164b"),o("7747"),Object(h["a"])(Qe,n,s,!1,null,"3c62a314",null));e["default"]=Je.exports},b246:function(t,e,o){"use strict";var n=o("12e0"),s=o.n(n);s.a},bd02:function(t,e,o){},cd90:function(t,e,o){"use strict";var n=o("18e8"),s=o.n(n);s.a},d002:function(t,e,o){},d410:function(t,e,o){},fbdd:function(t,e,o){"use strict";var n=o("bd02"),s=o.n(n);s.a}}]);