98 lines
82 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

System.register("chunks:///_virtual/apiSensors.ts",["cc"],(function(){var e;return{setters:[function(c){e=c.cclegacy}],execute:function(){e._RF.push({},"451acwCTa1LL6xezvkqFCFR","apiSensors",void 0),e._RF.pop()}}}));
System.register("chunks:///_virtual/Arrows.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(e){var r,t,o,i,n,l,a,s,u,c;return{setters:[function(e){r=e.applyDecoratedDescriptor,t=e.inheritsLoose,o=e.initializerDefineProperty,i=e.assertThisInitialized},function(e){n=e.cclegacy,l=e._decorator,a=e.Color,s=e.UITransform,u=e.Graphics,c=e.Component}],execute:function(){var p,h,f,d,w,b,y,g,k,m,C;n._RF.push({},"d71bcmJA5RBfbuO1WG9lxbP","Arrows",void 0);var v=l.ccclass,F=l.property;e("Arrows",(p=v("Arrows"),h=F({type:a}),f=F({type:a}),d=F({type:a}),w=F({type:a}),p((g=r((y=function(e){function r(){for(var r,t=arguments.length,n=new Array(t),l=0;l<t;l++)n[l]=arguments[l];return r=e.call.apply(e,[this].concat(n))||this,o(r,"outerFill",g,i(r)),o(r,"outerStroke",k,i(r)),o(r,"innerFill",m,i(r)),o(r,"arrowStroke",C,i(r)),r._graphics=null,r}t(r,e);var n=r.prototype;return n.onLoad=function(){var e=this.node.getComponent(s);e||(e=this.node.addComponent(s)),e.setContentSize(32,77.5);var r=this.node.getComponent(u);r||(r=this.node.addComponent(u)),this._graphics=r},n.start=function(){this.updateGraphics()},n.updateGraphics=function(){if(this._graphics){var e=this._graphics;e.clear(),e.fillColor=this.outerFill,e.roundRect(.5,.5,31,77.5,7.5),e.fill(),e.strokeColor=this.outerStroke,e.lineWidth=1,e.roundRect(.5,.5,31,77.5,7.5),e.stroke(),e.fillColor=this.innerFill,e.rect(4,27.25,24,24),e.fill();e.strokeColor=this.arrowStroke,e.lineWidth=2,e.lineCap=u.LineCap.ROUND,e.lineJoin=u.LineJoin.ROUND,e.moveTo(17,44.25),e.lineTo(22,39.25),e.lineTo(17,34.25),e.stroke(),e.moveTo(10,44.25),e.lineTo(15,39.25),e.lineTo(10,34.25),e.stroke()}},n.setColors=function(e,r,t,o){this.outerFill=e,this.outerStroke=r,this.innerFill=t,this.arrowStroke=o,this.updateGraphics()},r}(c)).prototype,"outerFill",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new a(255,255,255)}}),k=r(y.prototype,"outerStroke",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new a(201,200,211)}}),m=r(y.prototype,"innerFill",[d],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new a(255,255,255)}}),C=r(y.prototype,"arrowStroke",[w],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new a(138,136,148)}}),b=y))||b));n._RF.pop()}}}));
System.register("chunks:///_virtual/AutoLineBreak.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(e){var t,r,n,i,a,o,l,s,h,u;return{setters:[function(e){t=e.applyDecoratedDescriptor,r=e.inheritsLoose,n=e.initializerDefineProperty,i=e.assertThisInitialized},function(e){a=e.cclegacy,o=e._decorator,l=e.Label,s=e.Node,h=e.UITransform,u=e.Component}],execute:function(){var c,d,p,f,b,g;a._RF.push({},"70558TKGoZJV6WaN1zA9HSk","AutoLineBreak",void 0);var m=o.ccclass,v=o.property;e("AutoLineBreaker",(c=m("AutoLineBreaker"),d=v(l),c((b=t((f=function(e){function t(){for(var t,r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return t=e.call.apply(e,[this].concat(a))||this,n(t,"label",b,i(t)),n(t,"maxWidth",g,i(t)),t}r(t,e);var a=t.prototype;return a.start=function(){this.label&&(this.label.string=this.breakText(this.label.string))},a.breakText=function(e){for(var t=e.split(" "),r="",n="",i=0;i<t.length;i++){var a=t[i],o=n.length>0?n+" "+a:a;this.measureTextWidth(o)>this.maxWidth?""===n?r+=this.breakLongWord(a)+"\n":(r+=n+"\n",this.measureTextWidth(a)>this.maxWidth?(r+=this.breakLongWord(a)+"\n",n=""):n=a):n=o}return n.length>0&&(r+=n),r},a.breakLongWord=function(e){for(var t="",r="",n=0;n<e.length;n++){var i=r+e.charAt(n);this.measureTextWidth(i)>this.maxWidth?(t+=r+"\n",r=e.charAt(n)):r=i}return r.length>0&&(t+=r),t},a.measureTextWidth=function(e){var t=(new s).addComponent(l);t.font=this.label.font,t.string=e,t.lineHeight=this.label.lineHeight,t.overflow=l.Overflow.NONE,t.updateRenderData(!0);var r=t.node.getComponent(h);return r?r.contentSize.width:0},t}(u)).prototype,"label",[d],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),g=t(f.prototype,"maxWidth",[v],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 300}}),p=f))||p));a._RF.pop()}}}));
System.register("chunks:///_virtual/BackButton.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(t){var n,e,o,r,i,c,a,l,u,s;return{setters:[function(t){n=t.applyDecoratedDescriptor,e=t.inheritsLoose,o=t.initializerDefineProperty,r=t.assertThisInitialized},function(t){i=t.cclegacy,c=t._decorator,a=t.SceneAsset,l=t.Button,u=t.director,s=t.Component}],execute:function(){var p,f,B,h,k,b,y;i._RF.push({},"78f7278cNtNboFFr8iKBJ46","BackButton",void 0);var g=c.ccclass,d=c.property;t("BackButton",(p=g("BackButton"),f=d({type:a,tooltip:"Сцена для возврата"}),B=d(l),p((b=n((k=function(t){function n(){for(var n,e=arguments.length,i=new Array(e),c=0;c<e;c++)i[c]=arguments[c];return n=t.call.apply(t,[this].concat(i))||this,o(n,"targetScene",b,r(n)),o(n,"button",y,r(n)),n}e(n,t);var i=n.prototype;return i.onLoad=function(){var t;null==(t=this.button)||null==(t=t.node)||t.on("click",this.onBackClick,this)},i.onDestroy=function(){var t;null==(t=this.button)||null==(t=t.node)||t.off("click",this.onBackClick,this)},i.onBackClick=function(){this.targetScene?u.loadScene(this.targetScene.name):console.warn("BackButton: не задан targetScene")},n}(s)).prototype,"targetScene",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),y=n(k.prototype,"button",[B],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),h=k))||h));i._RF.pop()}}}));
System.register("chunks:///_virtual/CameraMover.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(e){var r,n,o,t,a,i,l,c,s,u,m;return{setters:[function(e){r=e.applyDecoratedDescriptor,n=e.inheritsLoose,o=e.initializerDefineProperty,t=e.assertThisInitialized},function(e){a=e.cclegacy,i=e._decorator,l=e.CameraComponent,c=e.MeshRenderer,s=e.geometry,u=e.tween,m=e.Component}],execute:function(){var p,d,f,h,v,y;a._RF.push({},"6e9d1pTCW9PELDNeLCm44VF","CameraMover",void 0);var w=i.ccclass,g=i.property;e("CameraMover",(p=w("CameraMover"),d=g({type:l}),p((v=r((h=function(e){function r(){for(var r,n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=e.call.apply(e,[this].concat(a))||this,o(r,"camera",v,t(r)),o(r,"transitionTime",y,t(r)),r}return n(r,e),r.prototype.moveToTarget=function(e){var r,n,o=this;if(this.camera){var t=e.getComponent(c);if(t){var a=new s.AABB;if(null==(r=t.model)||r.updateWorldBound(),null!=(n=t.model)&&n.worldBounds){a.copy(t.model.worldBounds);var i=a.center.clone(),l=a.halfExtents.clone().multiplyScalar(2),m=Math.max(l.x,l.y,l.z),p=this.camera.fov*(Math.PI/180),d=m/(2*Math.tan(p/2))+5,f=this.camera.node.forward.negative(),h=i.clone().add(f.multiplyScalar(d));console.log("🎥 Перемещение камеры к "+e.name),u(this.camera.node).to(this.transitionTime,{position:h}).call((function(){var e;return null==(e=o.camera)?void 0:e.node.lookAt(i)})).start()}else console.warn("⚠️ Не удалось получить worldBounds у "+e.name)}else console.warn("⚠️ У объекта "+e.name+" нет MeshRenderer!")}else console.warn("🚨 Камера не найдена!")},r}(m)).prototype,"camera",[d],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),y=r(h.prototype,"transitionTime",[g],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),f=h))||f));a._RF.pop()}}}));
System.register("chunks:///_virtual/CameraReset.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(e){var i,t,r,l,n,a,o,s,c;return{setters:[function(e){i=e.applyDecoratedDescriptor,t=e.inheritsLoose,r=e.initializerDefineProperty,l=e.assertThisInitialized},function(e){n=e.cclegacy,a=e._decorator,o=e.Node,s=e.Vec3,c=e.Component}],execute:function(){var p,u,y,h,P;n._RF.push({},"f9840lS54pAqo74KWdHx4Ej","CameraReset",void 0);var f=a.ccclass,g=a.property;e("CameraReset",(p=f("CameraReset"),u=g(o),p((P=i((h=function(e){function i(){for(var i,t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return i=e.call.apply(e,[this].concat(n))||this,r(i,"player",P,l(i)),i.initialPlayerPosition=new s,i.initialPlayerEulerAngles=new s,i}t(i,e);var n=i.prototype;return n.start=function(){this.player&&(this.initialPlayerPosition=this.player.position.clone(),this.initialPlayerEulerAngles=this.player.eulerAngles.clone(),console.log("Начальное положение:",this.initialPlayerPosition,"Начальный поворот:",this.initialPlayerEulerAngles))},n.resetPlayerTransform=function(){this.player?(this.player.setPosition(this.initialPlayerPosition),this.player.eulerAngles=this.initialPlayerEulerAngles.clone(),console.log("Трансформ игрока восстановлен.")):console.warn("Игрок не назначен!")},i}(c)).prototype,"player",[u],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),y=h))||y));n._RF.pop()}}}));
System.register("chunks:///_virtual/CursorChanger.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(e){var n,o,r,t,s,a,c;return{setters:[function(e){n=e.inheritsLoose},function(e){o=e.cclegacy,r=e._decorator,t=e.MeshRenderer,s=e.Node,a=e.game,c=e.Component}],execute:function(){var u;o._RF.push({},"9aaf6bN+EJChaqQh2593y1c","CursorChanger",void 0);var i=r.ccclass;e("CursorChanger",i("CursorChanger")(u=function(e){function o(){return e.apply(this,arguments)||this}n(o,e);var r=o.prototype;return r.start=function(){var e=this;this.node.children.forEach((function(n){n.getComponent(t)&&(n.on(s.EventType.MOUSE_ENTER,e.onMouseEnter,e),n.on(s.EventType.MOUSE_LEAVE,e.onMouseLeave,e))}))},r.onMouseEnter=function(e){a.canvas&&(a.canvas.style.cursor="pointer")},r.onMouseLeave=function(e){a.canvas&&(a.canvas.style.cursor="default")},o}(c))||u);o._RF.pop()}}}));
System.register("chunks:///_virtual/DescriptionManager.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(t){var n,e,r,o;return{setters:[function(t){n=t.inheritsLoose},function(t){e=t.cclegacy,r=t._decorator,o=t.Component}],execute:function(){var i;e._RF.push({},"957fdehndtMiKGfD02cq/1d","DescriptionManager",void 0);var c=r.ccclass;r.property,t("DescriptionManager",c("DescriptionManager")(i=function(t){function e(){return t.apply(this,arguments)||this}n(e,t);var r=e.prototype;return r.start=function(){},r.update=function(t){},e}(o))||i);e._RF.pop()}}}));
System.register("chunks:///_virtual/equipmentListSwitch.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(t){var i,e,n,o,s,r,a,u,l,c,p;return{setters:[function(t){i=t.applyDecoratedDescriptor,e=t.inheritsLoose,n=t.initializerDefineProperty,o=t.assertThisInitialized},function(t){s=t.cclegacy,r=t._decorator,a=t.Button,u=t.Node,l=t.Vec3,c=t.tween,p=t.Component}],execute:function(){var h,f,w,g,m,b,q,y,d,L,P;s._RF.push({},"41a9dZz2mVOFoYwOsk9H98q","equipmentListSwitch",void 0);var D=r.ccclass,v=r.property;t("equipmentListSwitch",(h=D("equipmentListSwitch"),f=v(a),w=v(u),g=v(u),h((q=i((b=function(t){function i(){for(var i,e=arguments.length,s=new Array(e),r=0;r<e;r++)s[r]=arguments[r];return i=t.call.apply(t,[this].concat(s))||this,n(i,"toggleButton",q,o(i)),n(i,"equipmentList",y,o(i)),n(i,"offsetX",d,o(i)),n(i,"animationDuration",L,o(i)),n(i,"arrow",P,o(i)),i.openPos=new l,i.closedPos=new l,i.isOnToggle=!1,i}e(i,t);var s=i.prototype;return s.onLoad=function(){var t;null==(t=this.toggleButton)||null==(t=t.node)||t.on("click",this.equipmentSwitch,this)},s.start=function(){this.openPos=this.equipmentList.getPosition().clone(),this.closedPos=new l(this.openPos.x-this.offsetX,this.openPos.y,this.openPos.z),this.equipmentList.setPosition(this.closedPos),this.arrow&&(this.arrow.angle=0)},s.stopTween=function(){c(this.equipmentList).stop(),this.arrow&&c(this.arrow).stop()},s.equipmentSwitch=function(){this.stopTween(),this.isOnToggle?(this.isOnToggle=!1,c(this.equipmentList).to(this.animationDuration,{position:this.closedPos}).start(),this.arrow&&c(this.arrow).to(this.animationDuration,{angle:0}).start()):(this.isOnToggle=!0,c(this.equipmentList).to(this.animationDuration,{position:this.openPos}).start(),this.arrow&&c(this.arrow).to(this.animationDuration,{angle:180}).start())},s.onDestroy=function(){var t;null==(t=this.toggleButton)||null==(t=t.node)||t.off("click",this.equipmentSwitch,this),this.stopTween()},i}(p)).prototype,"toggleButton",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),y=i(b.prototype,"equipmentList",[w],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),d=i(b.prototype,"offsetX",[v],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 250}}),L=i(b.prototype,"animationDuration",[v],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return.3}}),P=i(b.prototype,"arrow",[g],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),m=b))||m));s._RF.pop()}}}));
System.register("chunks:///_virtual/EquipmentManager.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(t){var e,n,r,i,a,s,o,c,u,l,p;return{setters:[function(t){e=t.applyDecoratedDescriptor,n=t.inheritsLoose,r=t.initializerDefineProperty,i=t.assertThisInitialized,a=t.createClass,s=t.asyncToGenerator,o=t.regeneratorRuntime},function(t){c=t.cclegacy,u=t._decorator,l=t.director,p=t.Component}],execute:function(){var d,h,f,v;c._RF.push({},"bdf50LzsO9GkrF5oSw4uDK/","EquipmentManager",void 0);var m=u.ccclass,y=u.property;t("EquipmentManager",m("EquipmentManager")(((v=function(t){function e(){for(var e,n=arguments.length,a=new Array(n),s=0;s<n;s++)a[s]=arguments[s];return e=t.call.apply(t,[this].concat(a))||this,r(e,"apiUrl",f,i(e)),e._dataList=[],e.totalCount=0,e._intervalId=null,e.initialDataPromise=void 0,e}n(e,t);var c=e.prototype;return c.onLoad=function(){var t=this;e.instance=this,l.addPersistRootNode(this.node),this.initialDataPromise=this.loadItems(),this._intervalId=window.setInterval((function(){t.loadItems()}),1e4)},c.loadItems=function(){var t=s(o().mark((function t(){var e,n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch(this.apiUrl);case 3:return e=t.sent,t.next=6,e.json();case 6:null!=(n=t.sent)&&n.items&&Array.isArray(n.items)?(this._dataList=n.items,this.totalCount=this._dataList.length,console.log("Данные оборудования обновлены:",this._dataList),this.node.emit("data-updated")):console.error("Некорректный формат данных",n),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),console.error("Ошибка при загрузке данных:",t.t0);case 13:case"end":return t.stop()}}),t,this,[[0,10]])})));return function(){return t.apply(this,arguments)}}(),c.getDataList=function(){var t=s(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this._dataList);case 1:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),c.onDestroy=function(){null!==this._intervalId&&(window.clearInterval(this._intervalId),this._intervalId=null)},a(e,[{key:"dataList",get:function(){return this._dataList}}]),e}(p)).instance=void 0,f=e((h=v).prototype,"apiUrl",[y],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"http://192.168.0.169:3030/api/v2/sensors"}}),d=h))||d);c._RF.pop()}}}));
System.register("chunks:///_virtual/ErrorButtonStatus.ts",["./rollupPluginModLoBabelHelpers.js","cc","./ErrorManager.ts","./ErrorItemData.ts"],(function(t){var r,e,n,i,o,a,u,s,l,c,p,b,f,m;return{setters:[function(t){r=t.applyDecoratedDescriptor,e=t.inheritsLoose,n=t.initializerDefineProperty,i=t.assertThisInitialized},function(t){o=t.cclegacy,a=t._decorator,u=t.Sprite,s=t.Button,l=t.Label,c=t.Node,p=t.Color,b=t.Component},function(t){f=t.ErrorManager},function(t){m=t.ErrorItemData}],execute:function(){var d,h,g,y,v,E,w,S,L,z,B;o._RF.push({},"af3d5cvwX9AKr0RbFp1/e0G","ErrorButtonStatus",void 0);var D=a.ccclass,C=a.property;t("ErrorButtonStatus",(d=D("ErrorButtonStatus"),h=C(u),g=C(s),y=C(l),v=C(c),d((S=r((w=function(t){function r(){for(var r,e=arguments.length,o=new Array(e),a=0;a<e;a++)o[a]=arguments[a];return r=t.call.apply(t,[this].concat(o))||this,n(r,"sprite",S,i(r)),n(r,"button",L,i(r)),n(r,"label",z,i(r)),n(r,"equipmentList",B,i(r)),r}e(r,t);var o=r.prototype;return o.start=function(){f.instance.node.on("errors-updated",this.updateStatus,this),this.updateStatus()},o.updateStatus=function(){var t=f.instance.getErrorList(),r=Object.keys(t.apiErrors).reduce((function(r,e){return r+t.apiErrors[e].map((function(t){var r=new m;return r.sensorName=e,r.alarmCode=t.alarmCode,r.description=t.description,r.timestamp=t.timestamp,r})).length}),0);r>0?(this.sprite.color=new p(255,0,0),this.button.interactable=!0,this.label.string="Аварий: "+r):(this.sprite.color=new p(128,128,128,0),this.button.interactable=!1,this.label.string="",this.equipmentList.active=!1)},r}(b)).prototype,"sprite",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),L=r(w.prototype,"button",[g],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),z=r(w.prototype,"label",[y],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),B=r(w.prototype,"equipmentList",[v],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),E=w))||E));o._RF.pop()}}}));
System.register("chunks:///_virtual/ErrorItemButton.ts",["./rollupPluginModLoBabelHelpers.js","cc","./EquipmentManager.ts","./PulsatingHighlighter.ts","./CameraMover.ts"],(function(t){var e,n,r,i,o,a,l,s,u,c,f,h,m,p,b;return{setters:[function(t){e=t.applyDecoratedDescriptor,n=t.inheritsLoose,r=t.initializerDefineProperty,i=t.assertThisInitialized,o=t.createForOfIteratorHelperLoose,a=t.asyncToGenerator,l=t.regeneratorRuntime},function(t){s=t.cclegacy,u=t._decorator,c=t.Label,f=t.Button,h=t.Component},function(t){m=t.EquipmentManager},function(t){p=t.PulsatingHighlighter},function(t){b=t.CameraMover}],execute:function(){var d,v,g,y,B,k,C,D,L,A,N;s._RF.push({},"7526dvrjYhI5oBmq7dolRop","ErrorItemButton",void 0);var w=u.ccclass,I=u.property;t("ErrorItemButton",(d=w("ErrorItemButton"),v=I(c),g=I(c),y=I(f),B=I(f),d((D=e((C=function(t){function e(){for(var e,n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o))||this,r(e,"nameLabel",D,i(e)),r(e,"timeLabel",L,i(e)),r(e,"actionButton",A,i(e)),r(e,"disableAlertButton",N,i(e)),e.itemData=null,e}n(e,t);var s=e.prototype;return s.initialize=function(t){this.itemData=t,this.nameLabel&&(this.nameLabel.string=t.sensorName),this.timeLabel&&(this.timeLabel.string=t.description)},s.onLoad=function(){var t,e;null==(t=this.actionButton)||null==(t=t.node)||t.on("click",this.onActionClick,this),null==(e=this.disableAlertButton)||null==(e=e.node)||e.on("click",this.onDisableAlertClick,this)},s.onDestroy=function(){var t,e;null==(t=this.actionButton)||null==(t=t.node)||t.off("click",this.onActionClick,this),null==(e=this.disableAlertButton)||null==(e=e.node)||e.off("click",this.onDisableAlertClick,this)},s.onActionClick=function(t){var e=this;if(this.itemData){var n=m.instance.dataList.find((function(t){return t.name===e.itemData.sensorName}));if(n){var r="";switch(n.value){case 2:r="red";break;case 1:r="green";break;case 0:r="yellow";break;default:return}var i=this.node.scene;if(i){var o,a,l=this.findNodeByName(i,this.itemData.sensorName);if(l)null==(o=l.getComponent(p))||o.switchToColor(r),null==(a=i.getComponentInChildren(b))||a.moveToTarget(l)}}}},s.onDisableAlertClick=function(){var t=a(l().mark((function t(e){var n;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.itemData){t.next=2;break}return t.abrupt("return");case 2:return t.prev=2,t.next=5,fetch("http://localhost:3030/api/v2/errors/resolve",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sensorName:this.itemData.sensorName})});case 5:return n=t.sent,t.t0=console,t.next=9,n.json();case 9:t.t1=t.sent,t.t0.log.call(t.t0,"Error resolved:",t.t1),t.next=16;break;case 13:t.prev=13,t.t2=t.catch(2),console.error("Error resolving via API:",t.t2);case 16:case"end":return t.stop()}}),t,this,[[2,13]])})));return function(e){return t.apply(this,arguments)}}(),s.findNodeByName=function(t,e){if(t.name===e)return t;for(var n,r=o(t.children);!(n=r()).done;){var i=n.value,a=this.findNodeByName(i,e);if(a)return a}return null},e}(h)).prototype,"nameLabel",[v],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),L=e(C.prototype,"timeLabel",[g],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),A=e(C.prototype,"actionButton",[y],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),N=e(C.prototype,"disableAlertButton",[B],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),k=C))||k));s._RF.pop()}}}));
System.register("chunks:///_virtual/ErrorItemData.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(e){var r,t,i,n;return{setters:[function(e){r=e.applyDecoratedDescriptor,t=e.initializerDefineProperty},function(e){i=e.cclegacy,n=e._decorator}],execute:function(){var a,o,c,l,s,u;i._RF.push({},"c2c76KUO15O3pkvQPkL45nM","ErrorItemData",void 0);var p=n.ccclass,m=n.property;e("ErrorItemData",p("ErrorItemData")((c=r((o=function(){t(this,"sensorName",c,this),t(this,"alarmCode",l,this),t(this,"description",s,this),t(this,"timestamp",u,this)}).prototype,"sensorName",[m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),l=r(o.prototype,"alarmCode",[m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),s=r(o.prototype,"description",[m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),u=r(o.prototype,"timestamp",[m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),a=o))||a);i._RF.pop()}}}));
System.register("chunks:///_virtual/ErrorItemNamedButton.ts",["./rollupPluginModLoBabelHelpers.js","cc","./EquipmentManager.ts","./PulsatingHighlighter.ts","./CameraMover.ts"],(function(e){var t,n,i,o,r,a,l,s,u,c,m,f,d;return{setters:[function(e){t=e.applyDecoratedDescriptor,n=e.inheritsLoose,i=e.initializerDefineProperty,o=e.assertThisInitialized,r=e.createForOfIteratorHelperLoose},function(e){a=e.cclegacy,l=e._decorator,s=e.Label,u=e.Button,c=e.Component},function(e){m=e.EquipmentManager},function(e){f=e.PulsatingHighlighter},function(e){d=e.CameraMover}],execute:function(){var h,p,v,g,b,N,y,w,B;a._RF.push({},"8d856ddUi1G2ad/KZe4aDTc","ErrorItemNamedButton",void 0);var D=l.ccclass,L=l.property;e("ErrorItemNamedButton",(h=D("ErrorItemNamedButton"),p=L(s),v=L(s),g=L(u),h((y=t((N=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return t=e.call.apply(e,[this].concat(r))||this,i(t,"nameLabel",y,o(t)),i(t,"timeLabel",w,o(t)),i(t,"actionButton",B,o(t)),t.itemData=null,t}n(t,e);var a=t.prototype;return a.initialize=function(e){this.itemData=e,this.nameLabel&&(this.nameLabel.string=e.description),this.timeLabel&&(this.timeLabel.string=e.timestamp),console.log("Initialized ErrorItemButton with data:",e)},a.onLoad=function(){var e;null==(e=this.actionButton)||null==(e=e.node)||e.on("click",this.onActionClick,this)},a.onDestroy=function(){var e;null==(e=this.actionButton)||null==(e=e.node)||e.off("click",this.onActionClick,this)},a.onActionClick=function(e){var t=this;if(console.log("Action clicked for error:",this.itemData),this.itemData){var n=m.instance.dataList.find((function(e){return e.name===t.itemData.sensorName}));if(n){var i="";if(2===n.value)i="red";else if(1===n.value)i="green";else{if(0!==n.value)return void console.warn("Unexpected sensor value: "+n.value);i="yellow"}var o=this.node.scene;if(o){var r=this.findNodeByName(o,this.itemData.sensorName);if(r){var a=r.getComponent(f);a?a.switchToColor(i):console.warn("Node "+this.itemData.sensorName+" does not have PulsatingHighlighter.");var l=o.getComponentInChildren(d);l?l.moveToTarget(r):console.warn("CameraMover not found!")}else console.warn("Node with name "+this.itemData.sensorName+" not found!")}else console.warn("Scene not found!")}else console.warn("Sensor "+this.itemData.sensorName+" not found!")}},a.findNodeByName=function(e,t){if(e.name===t)return e;for(var n,i=r(e.children);!(n=i()).done;){var o=n.value,a=this.findNodeByName(o,t);if(a)return a}return null},t}(c)).prototype,"nameLabel",[p],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),w=t(N.prototype,"timeLabel",[v],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),B=t(N.prototype,"actionButton",[g],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),b=N))||b));a._RF.pop()}}}));
System.register("chunks:///_virtual/ErrorLazyLoadList.ts",["./rollupPluginModLoBabelHelpers.js","cc","./ErrorManager.ts","./ErrorItemButton.ts","./ErrorItemNamedButton.ts","./SensorFieldItem.ts"],(function(t){var e,r,i,o,n,s,a,l,h,d,c,u,f,m,_,p,g,b,v;return{setters:[function(t){e=t.applyDecoratedDescriptor,r=t.inheritsLoose,i=t.initializerDefineProperty,o=t.assertThisInitialized,n=t.createForOfIteratorHelperLoose,s=t.createClass},function(t){a=t.cclegacy,l=t._decorator,h=t.Prefab,d=t.ScrollView,c=t.Label,u=t.director,f=t.UITransform,m=t.instantiate,_=t.Component},function(t){p=t.ErrorManager},function(t){g=t.ErrorItemButton},function(t){b=t.ErrorItemNamedButton},function(t){v=t.SensorFieldItem}],execute:function(){var C,w,y,I,D,L,E,N,P,z,B,F,S,V,M;a._RF.push({},"ae64aMysTNGGKsWiawEXMwG","ErrorLazyLoadList",void 0);var U=l.ccclass,x=l.property;t("ErrorLazyLoadList",(C=U("ErrorLazyLoadList"),w=x(h),y=x(h),I=x(h),D=x(d),L=x(c),C(((M=function(t){function e(){for(var e,r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];return e=t.call.apply(t,[this].concat(n))||this,i(e,"errorItemPrefab",P,o(e)),i(e,"errorItemNamedPrefab",z,o(e)),i(e,"sensorFieldItemPrefab",B,o(e)),i(e,"scrollView",F,o(e)),i(e,"header",S,o(e)),i(e,"spacing",V,o(e)),e._data=[],e._filteredData=null,e._mode="errors",e._sensorDescription=void 0,e._itemHeight=0,e._loadedCount=0,e._content=void 0,e._contentUI=void 0,e}r(e,t);var a=e.prototype;return a.onLoad=function(){if(e.instance=this,u.addPersistRootNode(this.node),this.scrollView.content){this._content=this.scrollView.content,this._contentUI=this._content.getComponent(f);var t=m(this.errorItemPrefab),r=t.getComponent(f);this._itemHeight=r?r.height:0,t.destroy(),this._filteredData=null,this._mode="errors",this.header.string="Список всех аварий",this.waitForErrorManager(),this.scrollView.node.on("scrolling",this.onScrolling,this)}else console.error("ScrollView.content is null!")},a.onDestroy=function(){var t,r;e.instance===this&&(e.instance=null),null==(t=p.instance)||null==(t=t.node)||t.off("errors-updated",this.onDataUpdated,this),null==(r=this.scrollView)||null==(r=r.node)||r.off("scrolling",this.onScrolling,this)},a.waitForErrorManager=function(){var t=this;p.instance?(p.instance.node.on("errors-updated",this.onDataUpdated,this),this.onDataUpdated()):this.scheduleOnce((function(){return t.waitForErrorManager()}),.1)},a.onDataUpdated=function(){if("errors"===this._mode){var t=p.instance.getErrorList().apiErrors,e=[];for(var r in t)for(var i,o=n(t[r]);!(i=o()).done;){var s=i.value;e.push({sensorName:r,alarmCode:s.alarmCode,description:s.description,timestamp:s.timestamp})}this._data=e,this._loadedCount=0,this._content.removeAllChildren(),this.loadNextBatch(20)}},a.onScrolling=function(){var t=this.scrollView.getScrollOffset().y,e=this.scrollView.node.getComponent(f).height,r=this._contentUI.height;t+e+2*this._itemHeight>=r&&this.loadNextBatch(20)},a.loadNextBatch=function(t){var e="errors"===this._mode?this._filteredData||this._data:this._sensorDescription.fields;if(!(this._loadedCount>=e.length)){for(var r=Math.min(this._loadedCount+t,e.length),i=this._loadedCount;i<r;i++){var o=e[i],n=void 0;if("errors"===this._mode){var s,a,l=o;if(this._filteredData)null==(s=(n=m(this.errorItemNamedPrefab)).getComponent(b))||s.initialize(l);else null==(a=(n=m(this.errorItemPrefab)).getComponent(g))||a.initialize(l)}else{var h,d=o;null==(h=(n=m(this.sensorFieldItemPrefab)).getComponent(v))||h.setData(d)}n.setPosition(0,-(this._loadedCount*(this._itemHeight+this.spacing)+this._itemHeight/2),0),this._content.addChild(n),this._loadedCount++}this._contentUI.height=this._loadedCount*(this._itemHeight+this.spacing)}},a.filterBySensor=function(t){this._mode="errors",this._filteredData=this._data.filter((function(e){return e.sensorName===t})),this._loadedCount=0,this._content.removeAllChildren(),this.header.string="Аварии на "+t,this.loadNextBatch(20)},a.resetFilter=function(){this._mode="errors",this._filteredData=null,this._loadedCount=0,this._content.removeAllChildren(),this.header.string="Список всех аварий",this.loadNextBatch(20)},a.showSensorDetails=function(t){this._mode="details",this._sensorDescription=t,this._loadedCount=0,this._content.removeAllChildren(),this.header.string="Детали "+t.sensorName,this.loadNextBatch(20)},a.showErrors=function(){this._mode="errors",this._filteredData=null,this._loadedCount=0,this._content.removeAllChildren(),this.header.string="Список всех аварий",this.loadNextBatch(20)},s(e,[{key:"mode",get:function(){return this._mode}}]),e}(_)).instance=null,P=e((N=M).prototype,"errorItemPrefab",[w],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),z=e(N.prototype,"errorItemNamedPrefab",[y],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),B=e(N.prototype,"sensorFieldItemPrefab",[I],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),F=e(N.prototype,"scrollView",[D],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),S=e(N.prototype,"header",[L],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),V=e(N.prototype,"spacing",[x],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 10}}),E=N))||E));a._RF.pop()}}}));
System.register("chunks:///_virtual/ErrorManager.ts",["./rollupPluginModLoBabelHelpers.js","cc","./EquipmentManager.ts","./ErrorsStore.ts"],(function(r){var t,e,n,o,i,s,a,u,c,l,d,h,f,p;return{setters:[function(r){t=r.applyDecoratedDescriptor,e=r.inheritsLoose,n=r.initializerDefineProperty,o=r.assertThisInitialized,i=r.asyncToGenerator,s=r.regeneratorRuntime},function(r){a=r.cclegacy,u=r._decorator,c=r.Node,l=r.AudioSource,d=r.director,h=r.Component},function(r){f=r.EquipmentManager},function(r){p=r.ErrorsStore}],execute:function(){var E,g,m,b,v,A,y,S;a._RF.push({},"e1d6eobzoNDs75XDl50wZhA","ErrorManager",void 0);var I=u.ccclass,k=u.property;r("ErrorManager",(E=I("ErrorManager"),g=k(c),m=k(l),E(((S=function(r){function t(){for(var t,e=arguments.length,i=new Array(e),s=0;s<e;s++)i[s]=arguments[s];return t=r.call.apply(r,[this].concat(i))||this,n(t,"errorListNode",A,o(t)),n(t,"audioSource",y,o(t)),t.soundEnabled=!0,t.currentErrors=[],t.errorItems=[],t.disabledAlerts=[],t.errorsStore=p.getInstance(),t}e(t,r);var a=t.prototype;return a.onLoad=function(){t.instance=this,d.addPersistRootNode(this.node),this.node.on("touchstart",this.disableSoundAlert,this)},a.start=function(){var r;null==(r=f.instance)||null==(r=r.node)||r.on("data-updated",this.checkErrors,this),this.schedule(this.checkErrors,5),this.schedule(this.fetchApiErrors,10)},a.onDestroy=function(){var r;this.node.off("touchstart",this.disableSoundAlert,this),null==(r=f.instance)||null==(r=r.node)||r.off("data-updated",this.checkErrors,this),this.unscheduleAllCallbacks()},a.getErrorList=function(){return{equipmentErrors:this.errorItems,apiErrors:this.errorsStore.getApiErrors()}},a.checkErrors=function(){var r,t,e=this,n=null!=(r=null==(t=f.instance)?void 0:t.dataList)?r:[],o=!1,i=[].concat(this.currentErrors);this.currentErrors=this.currentErrors.filter((function(r){return n.some((function(t){return t.tag===r&&2===t.value}))})),i.length!==this.currentErrors.length&&(this.errorItems=this.errorItems.filter((function(r){return n.some((function(t){return t.tag===r.tag&&2===t.value}))})),o=!0),n.forEach((function(r){var t;2===r.value&&-1===e.currentErrors.indexOf(r.tag)&&(e.currentErrors.push(r.tag),e.errorItems.push(r),e.addErrorToUI(r),o=!0,e.soundEnabled&&-1===e.disabledAlerts.indexOf(r.tag)&&(null==(t=e.audioSource)||t.play()))})),o&&this.node.emit("errors-updated"),this.fetchApiErrors()},a.fetchApiErrors=function(){var r=i(s().mark((function r(){return s().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,this.errorsStore.fetchApiErrors();case 3:this.node.emit("errors-updated"),r.next=9;break;case 6:r.prev=6,r.t0=r.catch(0),console.error("ErrorManager.fetchApiErrors:",r.t0);case 9:case"end":return r.stop()}}),r,this,[[0,6]])})));return function(){return r.apply(this,arguments)}}(),a.addErrorToUI=function(r){},a.disableSoundAlert=function(){this.soundEnabled=!1},a.disableAlertForError=function(r){-1===this.disabledAlerts.indexOf(r)&&this.disabledAlerts.push(r)},a.confirmError=function(r){this.currentErrors=this.currentErrors.filter((function(t){return t!==r})),this.errorItems=this.errorItems.filter((function(t){return t.tag!==r})),this.node.emit("errors-updated")},t}(h)).instance=void 0,A=t((v=S).prototype,"errorListNode",[g],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),y=t(v.prototype,"audioSource",[m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),b=v))||b));a._RF.pop()}}}));
System.register("chunks:///_virtual/ErrorsStore.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(r){var e,t,n;return{setters:[function(r){e=r.asyncToGenerator,t=r.regeneratorRuntime},function(r){n=r.cclegacy}],execute:function(){n._RF.push({},"c223eUBBj5G06wOn++quNUD","ErrorsStore",void 0),r("ErrorsStore",function(){function r(){this.apiErrors={}}r.getInstance=function(){return r._instance||(r._instance=new r),r._instance};var n=r.prototype;return n.fetchApiErrors=function(){var r=e(t().mark((function r(){var e,n;return t().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,fetch("http://192.168.0.169:3030/api/v2/errors");case 3:if((e=r.sent).ok){r.next=7;break}return console.error("ErrorsStore: ошибка при получении ошибок, статус:",e.status),r.abrupt("return");case 7:return r.next=9,e.json();case 9:n=r.sent,this.apiErrors=n,r.next=16;break;case 13:r.prev=13,r.t0=r.catch(0),console.error("ErrorsStore: ошибка запроса ошибок с API:",r.t0);case 16:case"end":return r.stop()}}),r,this,[[0,13]])})));return function(){return r.apply(this,arguments)}}(),n.getApiErrors=function(){return this.apiErrors},r}())._instance=null,n._RF.pop()}}}));
System.register("chunks:///_virtual/FirstPersonController.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(e){var t,o,i,n,s,r,l,a,u,h,c,p,_,d;return{setters:[function(e){t=e.applyDecoratedDescriptor,o=e.inheritsLoose,i=e.initializerDefineProperty,n=e.assertThisInitialized},function(e){s=e.cclegacy,r=e._decorator,l=e.Node,a=e.Vec3,u=e.input,h=e.Input,c=e.KeyCode,p=e.Quat,_=e.NodeSpace,d=e.Component}],execute:function(){var m,v,E,f,y,S,M,D,b,g;s._RF.push({},"5d80eQJlnxA9ooItxxIqddm","FirstPersonController",void 0);var w=r.ccclass,K=r.property;e("FirstPersonController",(m=w("FirstPersonController"),v=K({type:l}),m((y=t((f=function(e){function t(){for(var t,o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return t=e.call.apply(e,[this].concat(s))||this,i(t,"camera",y,n(t)),i(t,"moveSpeed",S,n(t)),i(t,"lookSpeed",M,n(t)),i(t,"speedStep",D,n(t)),i(t,"minSpeed",b,n(t)),i(t,"maxSpeed",g,n(t)),t._moveDirection=new a,t._eulerAngles=new a,t._isLeftMousePressed=!1,t._lastEmittedPosition=new a,t}o(t,e);var s=t.prototype;return s.onLoad=function(){u.on(h.EventType.KEY_DOWN,this._onKeyDown,this),u.on(h.EventType.KEY_UP,this._onKeyUp,this),u.on(h.EventType.MOUSE_DOWN,this._onMouseDown,this),u.on(h.EventType.MOUSE_UP,this._onMouseUp,this),u.on(h.EventType.MOUSE_MOVE,this._onMouseMove,this),u.on(h.EventType.MOUSE_WHEEL,this._onMouseWheel,this),this._eulerAngles=this.node.eulerAngles.clone(),this._lastEmittedPosition=this.node.getPosition().clone()},s.onDestroy=function(){null==u||u.off(h.EventType.KEY_DOWN,this._onKeyDown,this),null==u||u.off(h.EventType.KEY_UP,this._onKeyUp,this),null==u||u.off(h.EventType.MOUSE_DOWN,this._onMouseDown,this),null==u||u.off(h.EventType.MOUSE_UP,this._onMouseUp,this),null==u||u.off(h.EventType.MOUSE_MOVE,this._onMouseMove,this),null==u||u.off(h.EventType.MOUSE_WHEEL,this._onMouseWheel,this)},s._onKeyDown=function(e){switch(e.keyCode){case c.KEY_W:this._moveDirection.z=1;break;case c.KEY_S:this._moveDirection.z=-1;break;case c.KEY_A:this._moveDirection.x=-1;break;case c.KEY_D:this._moveDirection.x=1;break;case c.KEY_Q:this._moveDirection.y=-1;break;case c.KEY_E:this._moveDirection.y=1}},s._onKeyUp=function(e){switch(e.keyCode){case c.KEY_W:case c.KEY_S:this._moveDirection.z=0;break;case c.KEY_A:case c.KEY_D:this._moveDirection.x=0;break;case c.KEY_Q:case c.KEY_E:this._moveDirection.y=0}},s._onMouseDown=function(e){0===e.getButton()&&(this._isLeftMousePressed=!0)},s._onMouseUp=function(e){0===e.getButton()&&(this._isLeftMousePressed=!1)},s._onMouseMove=function(e){var t;if(this._isLeftMousePressed){this._eulerAngles.y-=e.movementX*this.lookSpeed,this._eulerAngles.x-=e.movementY*this.lookSpeed,this._eulerAngles.x=Math.max(-89,Math.min(89,this._eulerAngles.x));var o=p.fromEuler(new p,this._eulerAngles.x,this._eulerAngles.y,0);this.node.setRotation(o),null==(t=this.camera)||t.setRotation(p.IDENTITY)}},s._onMouseWheel=function(e){e.getScrollY()>0?this.moveSpeed=Math.min(this.moveSpeed+this.speedStep,this.maxSpeed):e.getScrollY()<0&&(this.moveSpeed=Math.max(this.moveSpeed-this.speedStep,this.minSpeed)),console.log("Current move speed: "+this.moveSpeed)},s.update=function(e){var t=a.transformQuat(new a,a.FORWARD,this.node.worldRotation),o=a.transformQuat(new a,a.RIGHT,this.node.worldRotation),i=new a;a.scaleAndAdd(i,i,t,this._moveDirection.z*this.moveSpeed*e),a.scaleAndAdd(i,i,o,this._moveDirection.x*this.moveSpeed*e),a.scaleAndAdd(i,i,a.UP,this._moveDirection.y*this.moveSpeed*e),this.node.translate(i,_.WORLD);var n=this.node.getPosition();a.distance(n,this._lastEmittedPosition)>.1&&(this.node.emit("moved"),this._lastEmittedPosition=n.clone())},t}(d)).prototype,"camera",[v],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),S=t(f.prototype,"moveSpeed",[K],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 5}}),M=t(f.prototype,"lookSpeed",[K],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return.1}}),D=t(f.prototype,"speedStep",[K],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),b=t(f.prototype,"minSpeed",[K],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),g=t(f.prototype,"maxSpeed",[K],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 20}}),E=f))||E));s._RF.pop()}}}));
System.register("chunks:///_virtual/HideButton.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(t){var e,n,i,o,r,u,c,a;return{setters:[function(t){e=t.applyDecoratedDescriptor,n=t.inheritsLoose,i=t.initializerDefineProperty,o=t.assertThisInitialized},function(t){r=t.cclegacy,u=t._decorator,c=t.Node,a=t.Component}],execute:function(){var l,p,s,f,h;r._RF.push({},"79616niCJ1C6rsWzIAYSTwW","HideButton",void 0);var d=u.ccclass,y=u.property;t("HideButton",(l=d("HideButton"),p=y(c),l((h=e((f=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),u=0;u<n;u++)r[u]=arguments[u];return e=t.call.apply(t,[this].concat(r))||this,i(e,"equipmentShowButton",h,o(e)),e}return n(e,t),e.prototype.onclick=function(){this.equipmentShowButton.active=!1},e}(a)).prototype,"equipmentShowButton",[p],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),s=f))||s));r._RF.pop()}}}));
System.register("chunks:///_virtual/ItemButton.ts",["./rollupPluginModLoBabelHelpers.js","cc","./EquipmentManager.ts","./PulsatingHighlighter.ts","./CameraMover.ts","./ErrorLazyLoadList.ts","./ErrorManager.ts","./ToggleListButton.ts","./SensorDetailManager.ts"],(function(t){var e,n,i,r,a,o,s,l,u,c,m,h,f,g,d,v;return{setters:[function(t){e=t.applyDecoratedDescriptor,n=t.inheritsLoose,i=t.initializerDefineProperty,r=t.assertThisInitialized},function(t){a=t.cclegacy,o=t._decorator,s=t.Label,l=t.Button,u=t.Component},function(t){c=t.EquipmentManager},function(t){m=t.PulsatingHighlighter},function(t){h=t.CameraMover},function(t){f=t.ErrorLazyLoadList},function(t){g=t.ErrorManager},function(t){d=t.ToggleListButton},function(t){v=t.SensorDetailManager}],execute:function(){var p,E,B,b,D,L,w,y,C,k,S;a._RF.push({},"e5a794S61FLarSaWsI+BZm6","ItemButton",void 0);var M=o.ccclass,I=o.property,P=function(t){return t[t.PPR=0]="PPR",t[t.Active=1]="Active",t[t.Disactive=2]="Disactive",t}(P||{}),z=function(t){return t.Yellow="yellow",t.Green="green",t.Red="red",t}(z||{});t("ItemButton",(p=M("ItemButton"),E=I(s),B=I(l),b=I(l),D=I(s),p((y=e((w=function(t){function e(){for(var e,n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return e=t.call.apply(t,[this].concat(a))||this,i(e,"nameLabel",y,r(e)),i(e,"button",C,r(e)),i(e,"ErrorButton",k,r(e)),i(e,"ErrorNumber",S,r(e)),e.itemIndex=0,e.itemData=null,e}n(e,t);var a=e.prototype;return a.initialize=function(t){this.itemData=t,this.nameLabel&&(this.nameLabel.string=t.name,this.ErrorButton.node.active=!1)},a.onLoad=function(){this.button?this.button.node.on("click",this.onClick,this):console.warn("Компонент Button не назначен в ItemButton."),this.ErrorButton?this.ErrorButton.node.on("click",this.onErrorClick,this):console.warn("Компонент ErrorButton не назначен в ItemButton."),g.instance&&g.instance.node.on("errors-updated",this.updateErrorStatus,this)},a.onDestroy=function(){var t,e,n;null==(t=this.button)||null==(t=t.node)||t.off("click",this.onClick,this),null==(e=this.ErrorButton)||null==(e=e.node)||e.off("click",this.onErrorClick,this),null==(n=g.instance)||null==(n=n.node)||n.off("errors-updated",this.updateErrorStatus,this)},a._findNodeByName=function(t,e){if(t.name===e)return t;for(var n=0;n<t.children.length;n++){var i=this._findNodeByName(t.children[n],e);if(i)return i}return null},a.onClick=function(t){var e=this;if(console.log("Нажата основная кнопка для элемента:",this.itemData),this.itemData)if(c.instance){d.instance?d.instance.equipmentList.active||d.instance.toggleList():console.warn("ToggleListButton.instance не инициализирован!");var n=c.instance.dataList.find((function(t){return t.name===e.itemData.name}));if(n){var i="";switch(n.value){case P.Disactive:i=z.Red;break;case P.Active:i=z.Green;break;case P.PPR:i=z.Yellow;break;default:return void console.warn("Неожиданное значение sensorData.value: "+n.value)}var r=this.node.scene;if(r){var a=this._findNodeByName(r,this.itemData.name);if(a){var o=a.getComponent(m);o?o.switchToColor(i):console.warn("Узел "+this.itemData.name+" не содержит PulsatingHighlighter.");var s=r.getComponentInChildren(h);s?s.moveToTarget(a):console.warn("CameraMover не найден в сцене!");var l=r.getComponentInChildren(v);l?l.onShowSensorDetails(this.itemData.name):console.warn("SensorDetailManager не найден в сцене!")}else console.warn("Узел с именем "+this.itemData.name+" не найден в сцене.")}else console.warn("Сцена не найдена!")}else console.warn("Датчик с именем "+this.itemData.name+" не найден в EquipmentManager.")}else console.warn("EquipmentManager не доступен!")},a.onErrorClick=function(t){console.log("Нажата кнопка Error для элемента:",this.itemData),this.itemData&&(f.instance?(f.instance.filterBySensor(this.itemData.name),d.instance?d.instance.equipmentList.active||(d.instance.toggleList(),f.instance.filterBySensor(this.itemData.name)):console.warn("ToggleListButton.instance не инициализирован!")):console.warn("ErrorLazyLoadList.instance не найден!"))},a.updateErrorStatus=function(){var t=this,e=c.instance.dataList.find((function(e){return e.name===t.itemData.name}));if(e)if(e.value!==P.Active){var n=g.instance.getErrorList().apiErrors,i=n[this.itemData.name]?n[this.itemData.name].length:0;i>0?(this.ErrorButton.node.active=!0,this.ErrorNumber.string=i.toString()):this.ErrorButton.node.active=!1}else this.ErrorButton.node.active=!1;else this.ErrorButton.node.active=!1},e}(u)).prototype,"nameLabel",[E],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),C=e(w.prototype,"button",[B],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),k=e(w.prototype,"ErrorButton",[b],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),S=e(w.prototype,"ErrorNumber",[D],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),L=w))||L));a._RF.pop()}}}));
System.register("chunks:///_virtual/main",["./CameraMover.ts","./FirstPersonController.ts","./ModelSelector.ts","./PulsatingHighlighter.ts","./AutoLineBreak.ts","./Mutex.ts","./DescriptionManager.ts","./EquipmentManager.ts","./ErrorItemData.ts","./ErrorManager.ts","./ErrorsStore.ts","./SceneTransitionManager.ts","./SensorDescriptionField.ts","./SensorDetailManager.ts","./SensorDetailStore.ts","./apiSensors.ts","./BackButton.ts","./ErrorLazyLoadList.ts","./ReturnCameraButtonController.ts","./SensorFieldItem.ts","./ToggleManage.ts","./Arrows.ts","./VirtualList.ts","./WallTextSwitch.ts","./RadialToggle.ts","./equipmentListSwitch.ts","./SceneHistory.ts","./CameraReset.ts","./CursorChanger.ts","./ErrorButtonStatus.ts","./ErrorItemButton.ts","./ErrorItemNamedButton.ts","./HideButton.ts","./ItemButton.ts","./MorphButtonWithButton.ts","./SceneLoaderOnDoubleClick.ts","./ScrollSync.ts","./ToggleListButton.ts","./switchWalls.ts"],(function(){return{setters:[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],execute:function(){}}}));
System.register("chunks:///_virtual/ModelSelector.ts",["./rollupPluginModLoBabelHelpers.js","cc","./PulsatingHighlighter.ts","./EquipmentManager.ts"],(function(e){var o,n,t,a,l,r,i,s,c,u,h,d,f,p,m,y,g;return{setters:[function(e){o=e.applyDecoratedDescriptor,n=e.inheritsLoose,t=e.initializerDefineProperty,a=e.assertThisInitialized},function(e){l=e.cclegacy,r=e._decorator,i=e.CameraComponent,s=e.geometry,c=e.input,u=e.Input,h=e.Vec3,d=e.PhysicsSystem,f=e.MeshRenderer,p=e.tween,m=e.Component},function(e){y=e.PulsatingHighlighter},function(e){g=e.EquipmentManager}],execute:function(){var v,_,C,M,w;l._RF.push({},"96ff6EZCmtHRYuI/W42BPVH","ModelSelector",void 0);var k=r.ccclass,P=r.property;e("ModelSelector",(v=k("ModelSelector"),_=P({type:i}),v((w=o((M=function(e){function o(){for(var o,n=arguments.length,l=new Array(n),r=0;r<n;r++)l[r]=arguments[r];return o=e.call.apply(e,[this].concat(l))||this,t(o,"camera",w,a(o)),o._ray=new s.Ray,o._clickCount=0,o._doubleClickThreshold=.3,o}n(o,e);var l=o.prototype;return l.onLoad=function(){c.on(u.EventType.MOUSE_UP,this._onMouseUp,this)},l.onDestroy=function(){c.off(u.EventType.MOUSE_UP,this._onMouseUp,this)},l._onMouseUp=function(e){2===e.getButton()&&(console.log("🖱 Правый клик зафиксирован!"),this.unschedule(this._resetClickCount),this._clickCount++,2===this._clickCount?(console.log("✅ Двойной клик зафиксирован!"),this._performRaycast(e),this._clickCount=0):this.scheduleOnce(this._resetClickCount,this._doubleClickThreshold))},l._resetClickCount=function(){this._clickCount=0,console.log("⏳ Сброс двойного клика из-за таймаута.")},l._performRaycast=function(e){if(this.camera){var o=new h(e.getLocationX(),e.getLocationY(),0);if(this.camera.screenPointToRay(o.x,o.y,this._ray),console.log("🔍 Запускаем raycast..."),d.instance.raycast(this._ray)){var n=d.instance.raycastResults;if(n.length>0){var t=n[0].collider.node;console.log("🎯 Попадание по объекту: "+t.name),this._highlightModel(t),this._movePlayer(t)}else console.log("❌ Raycast ничего не нашел.")}else console.log("⚠️ Raycast не сработал.")}else console.warn("🚨 Камера не найдена!")},l._highlightModel=function(e){var o=e.getComponent(y);if(o){if(!g.instance)return void console.warn("🚨 EquipmentManager не доступен!");var n=g.instance.dataList.find((function(e){return e.name===o.sensorName}));if(n){var t="";if(2===n.value)t="red";else if(1===n.value)t="green";else{if(0!==n.value)return void console.warn("Неожиданное значение sensorData.value: "+n.value);t="yellow"}o.switchToColor(t)}else console.warn("Датчик с именем "+o.sensorName+" не найден.")}},l._movePlayer=function(e){var o,n,t=this,a=e.getComponent(f);if(a){var l=new s.AABB;if(null==(o=a.model)||o.updateWorldBound(),null!=(n=a.model)&&n.worldBounds){l.copy(a.model.worldBounds);var r=l.center.clone(),i=l.halfExtents.clone().multiplyScalar(2),c=Math.max(i.x,i.y,i.z),u=60;this.camera&&(u=this.camera.fov);var d=u*(Math.PI/180),m=c/(2*Math.tan(d/2))+5,y=new h(0,0,1);h.transformQuat(y,y,this.node.rotation),h.negate(y,y);var g=y.clone();g.multiplyScalar(m);var v=r.clone().add(g);console.log("🎥 Перемещение игрока к "+e.name+" в позицию: ",v),p(this.node).to(1,{position:v}).call((function(){t.node.lookAt(r)})).start()}else console.warn("⚠️ Не удалось получить worldBounds у "+e.name)}else console.warn("🚨 У объекта "+e.name+" нет MeshRenderer!")},o}(m)).prototype,"camera",[_],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),C=M))||C));l._RF.pop()}}}));
System.register("chunks:///_virtual/MorphButtonWithButton.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(t){var e,i,r,o,n,a,s,u,l,p;return{setters:[function(t){e=t.applyDecoratedDescriptor,i=t.inheritsLoose,r=t.initializerDefineProperty,o=t.assertThisInitialized},function(t){n=t.cclegacy,a=t._decorator,s=t.SpriteFrame,u=t.Sprite,l=t.tween,p=t.Component}],execute:function(){var c,h,m,F,f,g,b,y,v,B,d;n._RF.push({},"4d4aeRRnDFF9oLZea6Yk+76","MorphButtonWithButton",void 0);var S=a.ccclass,w=a.property;t("MorphButtonWithButton",(c=S("MorphButtonWithButton"),h=w(s),m=w(s),F=w(s),f=w(u),c((y=e((b=function(t){function e(){for(var e,i=arguments.length,n=new Array(i),a=0;a<i;a++)n[a]=arguments[a];return e=t.call.apply(t,[this].concat(n))||this,r(e,"questionFrame",y,o(e)),r(e,"noiseFrame",v,o(e)),r(e,"crossFrame",B,o(e)),r(e,"targetSprite",d,o(e)),e.isQuestion=!0,e}i(e,t);var n=e.prototype;return n.onLoad=function(){this.targetSprite.spriteFrame=this.questionFrame},n.onClick=function(){var t=this;console.log("MorphButton: onClick вызван");for(var e=this.isQuestion?[this.noiseFrame,this.crossFrame]:[this.noiseFrame,this.questionFrame],i=l(this.targetSprite.node),r=function(){var e=n[o];i=i.delay(.055).call((function(){t.targetSprite.spriteFrame=e}))},o=0,n=e;o<n.length;o++)r();i.start(),this.isQuestion=!this.isQuestion},e}(p)).prototype,"questionFrame",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),v=e(b.prototype,"noiseFrame",[m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),B=e(b.prototype,"crossFrame",[F],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),d=e(b.prototype,"targetSprite",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),g=b))||g));n._RF.pop()}}}));
System.register("chunks:///_virtual/Mutex.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(e){var t,r,n,u;return{setters:[function(e){t=e.asyncToGenerator,r=e.regeneratorRuntime},function(e){n=e.cclegacy,u=e._decorator}],execute:function(){var c;n._RF.push({},"84efdsL2ZBGBIfNkxtYiT7w","Mutex",void 0);var i=u.ccclass;e("Mutex",i("Mutex")(c=function(){function e(){this.queue=[],this.locked=!1}var n=e.prototype;return n.acquire=function(){var e=t(r().mark((function e(){var t=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.locked){e.next=3;break}return this.locked=!0,e.abrupt("return");case 3:return e.abrupt("return",new Promise((function(e){return t.queue.push(e)})));case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),n.release=function(){if(this.queue.length>0){var e=this.queue.shift();e&&e()}else this.locked=!1},e}())||c);n._RF.pop()}}}));
System.register("chunks:///_virtual/PulsatingHighlighter.ts",["./rollupPluginModLoBabelHelpers.js","cc","./EquipmentManager.ts"],(function(t){var e,i,n,a,r,l,o,s,u,c,h;return{setters:[function(t){e=t.applyDecoratedDescriptor,i=t.inheritsLoose,n=t.initializerDefineProperty,a=t.assertThisInitialized},function(t){r=t.cclegacy,l=t._decorator,o=t.Material,s=t.MeshRenderer,u=t.math,c=t.Component},function(t){h=t.EquipmentManager}],execute:function(){var p,g,d,f,_,v,m,y,M,b,w,A;r._RF.push({},"04b2bx0wWRFNZUDzjOKuS7p","PulsatingHighlighter",void 0);var H=l.ccclass,C=l.property;t("PulsatingHighlighter",(p=H("PulsatingHighlighter"),g=C(o),d=C(o),f=C(o),p(((A=function(t){function e(){for(var e,i=arguments.length,r=new Array(i),l=0;l<i;l++)r[l]=arguments[l];return e=t.call.apply(t,[this].concat(r))||this,n(e,"redMaterial",m,a(e)),n(e,"greenMaterial",y,a(e)),n(e,"yellowMaterial",M,a(e)),e._originalMaterials=[],e._currentAlpha=0,e._direction=1,e._animationSpeed=3,n(e,"sensorName",b,a(e)),n(e,"autoHighlight",w,a(e)),e}i(e,t);var r=e.prototype;return r.onLoad=function(){this._storeOriginalMaterials(),this.autoHighlight&&this.waitForEquipmentManager()},r.waitForEquipmentManager=function(){var t=this;h.instance?h.instance.node.on("data-updated",this._onDataUpdated,this):this.scheduleOnce((function(){return t.waitForEquipmentManager()}),.1)},r._storeOriginalMaterials=function(){var t=this.node.getComponent(s);t&&(this._originalMaterials=t.materials.filter((function(t){return!!t})).map((function(t){var e=new o;return e.copy(t),e})))},r._onDataUpdated=function(){var t=this;if(this.autoHighlight){var e=h.instance.dataList.find((function(e){return e.name===t.sensorName}));if(e){var i=2===e.value?"red":1===e.value?"green":0===e.value?"yellow":"";i&&this.switchToColor(i)}}},r.switchToColor=function(t){var i=this,n=this.node.getComponent(s);if(n){if(e._activeInstance&&e._activeInstance!==this){var a=e._activeInstance;a.node&&a.resetHighlight()}e._activeInstance=this;var r=null;if("red"===t?r=this.redMaterial:"green"===t?r=this.greenMaterial:"yellow"===t&&(r=this.yellowMaterial),r){var l=new o;l.copy(r),n.materials=n.materials.map((function(){return l})),this._currentAlpha=0,this._direction=1,this.schedule(this._updateAlpha,.016),this.scheduleOnce((function(){e._activeInstance===i&&(i.resetHighlight(),e._activeInstance=null)}),10)}}},r._updateAlpha=function(){var t,e=this;this._currentAlpha+=this._direction*this._animationSpeed,this._currentAlpha=u.clamp(this._currentAlpha,0,255),0!==this._currentAlpha&&255!==this._currentAlpha||(this._direction*=-1);var i=null==(t=this.node)?void 0:t.getComponent(s);i&&i.materials.forEach((function(t){var i=null==t?void 0:t.getProperty("mainColor");i.a=e._currentAlpha,null==t||t.setProperty("mainColor",i)}))},r.resetHighlight=function(){this.unschedule(this._updateAlpha),this.unscheduleAllCallbacks(),this._restoreOriginalMaterials()},r._restoreOriginalMaterials=function(){if(this.node){var t=this.node.getComponent(s);t&&(t.materials=this._originalMaterials.map((function(t){var e=new o;return e.copy(t),e})))}},r.onDestroy=function(){var t;null==(t=h.instance)||null==(t=t.node)||t.off("data-updated",this._onDataUpdated,this),this.unscheduleAllCallbacks(),e._activeInstance===this&&(e._activeInstance=null)},e}(c))._activeInstance=null,m=e((v=A).prototype,"redMaterial",[g],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),y=e(v.prototype,"greenMaterial",[d],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),M=e(v.prototype,"yellowMaterial",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),b=e(v.prototype,"sensorName",[C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),w=e(v.prototype,"autoHighlight",[C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),_=v))||_));r._RF.pop()}}}));
System.register("chunks:///_virtual/RadialToggle.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(e){var t,r,o,a,i,n,c,l,s,g,u,p;return{setters:[function(e){t=e.applyDecoratedDescriptor,r=e.inheritsLoose,o=e.initializerDefineProperty,a=e.assertThisInitialized},function(e){i=e.cclegacy,n=e._decorator,c=e.Node,l=e.Vec3,s=e.UITransform,g=e.tween,u=e.easing,p=e.Component}],execute:function(){var h,d,f,v,y;i._RF.push({},"29a84gFTp9L1b4JlfdavyuZ","RadialToggle",void 0);var N=n.ccclass,_=n.property;e("CornerToggle",(h=N("CornerToggle"),d=_({type:c,tooltip:"Сюда перетащить ноду с Sprite и Label"}),h((y=t((v=function(e){function t(){for(var t,r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];return t=e.call.apply(e,[this].concat(i))||this,o(t,"targetNode",y,a(t)),t._origScale=new l(1,1,1),t}r(t,e);var i=t.prototype;return i.start=function(){if(this.targetNode){var e=this.targetNode.getComponent(s);e&&(e.anchorX=0,e.anchorY=1),this._origScale=this.targetNode.scale.clone(),this.targetNode.scale=this.targetNode.active?this._origScale.clone():new l(0,0,0)}},i.toggle=function(){if(this.targetNode){var e=this.targetNode,t=e.active,r=t?this._origScale.clone():new l(0,0,0),o=t?new l(0,0,0):this._origScale.clone();t||(e.active=!0),e.scale=r,g(e).to(.35,{scale:o},{easing:u.quadOut}).call((function(){t&&(e.active=!1)})).start()}},t}(p)).prototype,"targetNode",[d],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),f=v))||f));i._RF.pop()}}}));
System.register("chunks:///_virtual/ReturnCameraButtonController.ts",["./rollupPluginModLoBabelHelpers.js","cc","./switchWalls.ts"],(function(t){var e,r,i,n,o,a,u,l,s,c,h;return{setters:[function(t){e=t.applyDecoratedDescriptor,r=t.inheritsLoose,i=t.initializerDefineProperty,n=t.assertThisInitialized},function(t){o=t.cclegacy,a=t._decorator,u=t.Node,l=t.Vec3,s=t.tween,c=t.Component},function(t){h=t.switchWalls}],execute:function(){var p,f,m,C,b,d,w,g,B,P,v;o._RF.push({},"710e0lYsxlDaazRa54bbTix","ReturnCameraButtonController",void 0);var y=a.ccclass,D=a.property;t("ReturnCameraButtonController",(p=y("ReturnCameraButtonController"),f=D(u),m=D(u),p((d=e((b=function(t){function e(){for(var e,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o))||this,i(e,"returnCameraButton",d,n(e)),i(e,"character",w,n(e)),i(e,"returnDuration",g,n(e)),i(e,"hideDuration",B,n(e)),i(e,"hidePos",P,n(e)),i(e,"moveThreshold",v,n(e)),e.originalCharacterPos=new l,e.originalButtonPos=new l,e.wallSwtich=null,e}r(e,t);var o=e.prototype;return o.start=function(){this.originalButtonPos=this.returnCameraButton.getPosition().clone(),this.returnCameraButton.setPosition(this.hidePos),this.originalCharacterPos=this.character.getPosition().clone(),this.character.on("moved",this.onCharacterMoved,this),this.wallSwtich=h.getInstance()},o.onCharacterMoved=function(){this.character.getPosition().clone().subtract(this.originalCharacterPos).length()>=this.moveThreshold&&(this.wallSwtich.hideWalls(),this.resetPosition())},o.resetPosition=function(){this.returnCameraButton.active=!0,s(this.returnCameraButton).to(this.returnDuration,{position:this.originalButtonPos}).start()},o.hideButton=function(){var t=this;s(this.returnCameraButton).to(this.hideDuration,{position:this.hidePos}).call((function(){t.returnCameraButton.active=!1})).start()},o.onReturnButtonClick=function(){this.wallSwtich.showWalls(),this.hideButton()},e}(c)).prototype,"returnCameraButton",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),w=e(b.prototype,"character",[m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),g=e(b.prototype,"returnDuration",[D],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return.3}}),B=e(b.prototype,"hideDuration",[D],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return.3}}),P=e(b.prototype,"hidePos",[D],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new l(0,-100,0)}}),v=e(b.prototype,"moveThreshold",[D],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),C=b))||C));o._RF.pop()}}}));
System.register("chunks:///_virtual/SceneHistory.ts",["cc"],(function(e){var t;return{setters:[function(e){t=e.cclegacy}],execute:function(){t._RF.push({},"97252pylthHO6oLxo/fALEL","SceneHistory",void 0),e("SceneHistory",(function(){})).lastScene="",t._RF.pop()}}}));
System.register("chunks:///_virtual/SceneLoaderOnDoubleClick.ts",["./rollupPluginModLoBabelHelpers.js","cc","./SceneHistory.ts"],(function(e){var t,n,o,i,r,c,a,l,s,u,p,h,f,y,d,m;return{setters:[function(e){t=e.applyDecoratedDescriptor,n=e.inheritsLoose,o=e.initializerDefineProperty,i=e.assertThisInitialized},function(e){r=e.cclegacy,c=e._decorator,a=e.SceneAsset,l=e.Camera,s=e.input,u=e.Input,p=e.EventMouse,h=e.geometry,f=e.PhysicsSystem,y=e.director,d=e.Component},function(e){m=e.SceneHistory}],execute:function(){var D,S,C,b,g,T,k;r._RF.push({},"2354fT4dZNMRoYPBkL+6TQD","SceneLoaderOnDoubleClick",void 0);var v=c.ccclass,_=c.property;e("SceneLoaderOnDoubleClick3D",(D=v("SceneLoaderOnDoubleClick3D"),S=_({type:a,tooltip:"Сцена для загрузки при двойном клике"}),C=_({type:l,tooltip:"Основная камера"}),D((T=t((g=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),c=0;c<n;c++)r[c]=arguments[c];return t=e.call.apply(e,[this].concat(r))||this,o(t,"targetScene",T,i(t)),o(t,"camera",k,i(t)),t._doubleClickThreshold=300,t._lastClickTime=0,t}n(t,e);var r=t.prototype;return r.onLoad=function(){s.on(u.EventType.MOUSE_DOWN,this.onMouseDown,this)},r.onDestroy=function(){null==s||s.off(u.EventType.MOUSE_DOWN,this.onMouseDown,this)},r.onMouseDown=function(e){if(e.getButton()===p.BUTTON_LEFT){var t=performance.now();t-this._lastClickTime<this._doubleClickThreshold?(this.handleDoubleClick(e),this._lastClickTime=0):this._lastClickTime=t}},r.handleDoubleClick=function(e){if(this.camera){var t,n=e.getLocationX(),o=e.getLocationY(),i=new h.Ray;if(this.camera.screenPointToRay(n,o,i),f.instance.raycastClosest(i))if((null==(t=f.instance.raycastClosestResult.collider)?void 0:t.node)===this.node&&this.targetScene){var r=y.getScene();r?m.lastScene=r.name:console.warn("Не удалось получить текущую сцену"),y.loadScene(this.targetScene.name)}}else console.error("Камера не назначена!")},t}(d)).prototype,"targetScene",[S],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),k=t(g.prototype,"camera",[C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),b=g))||b));r._RF.pop()}}}));
System.register("chunks:///_virtual/SceneTransitionManager.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(n){var e,t,i,r,a;return{setters:[function(n){e=n.inheritsLoose,t=n.createClass},function(n){i=n.cclegacy,r=n._decorator,a=n.Component}],execute:function(){var o,s;i._RF.push({},"d47125UrFpA34fYqds05ln4","SceneTransitionManager",void 0);var c=r.ccclass;n("SceneTransitionManager",c("SceneTransitionManager")(((s=function(n){function i(){return n.apply(this,arguments)||this}return e(i,n),t(i,null,[{key:"allowTransition",get:function(){return this._allowTransition},set:function(n){this._allowTransition=n}}]),i}(a))._allowTransition=!0,o=s))||o);i._RF.pop()}}}));
System.register("chunks:///_virtual/ScrollSync.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(r){var o,e,l,n,t,c,i,a,s,u,h,p;return{setters:[function(r){o=r.applyDecoratedDescriptor,e=r.inheritsLoose,l=r.initializerDefineProperty,n=r.assertThisInitialized},function(r){t=r.cclegacy,c=r._decorator,i=r.ScrollView,a=r.ScrollBar,s=r.UITransform,u=r.Vec3,h=r.clamp,p=r.Component}],execute:function(){var f,d,y,g,v,S,B;t._RF.push({},"3a2135SBFBPYL23MKtr1qUo","ScrollSync",void 0);var m=c.ccclass,w=c.property;r("ScrollHandler",(f=m("ScrollHandler"),d=w(i),y=w(a),f((S=o((v=function(r){function o(){for(var o,e=arguments.length,t=new Array(e),c=0;c<e;c++)t[c]=arguments[c];return o=r.call.apply(r,[this].concat(t))||this,l(o,"scrollView",S,n(o)),l(o,"scrollBar",B,n(o)),o}e(o,r);var t=o.prototype;return t.onLoad=function(){var r=this.scrollBar.handle;r?r.node.on("touch-move",this.onDrag,this):console.error("ScrollHandler: у ScrollBar нет handle–спрайта!")},t.onDestroy=function(){var r;null==(r=this.scrollBar.handle)||null==(r=r.node)||r.off("touch-move",this.onDrag,this)},t.onDrag=function(r){var o=this.scrollBar.handle;if(o){var e=this.scrollBar.node.getComponent(s),l=r.getLocation(),n=e.convertToNodeSpaceAR(new u(l.x,l.y,0)),t=e.height,c=o.node.getComponent(s).height,i=(n.y+t/2-c/2)/(t-c);i=h(i,0,1),this.scrollView.scrollToPercentVertical(1-i,0)}},o}(p)).prototype,"scrollView",[d],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),B=o(v.prototype,"scrollBar",[y],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),g=v))||g));t._RF.pop()}}}));
System.register("chunks:///_virtual/SensorDescriptionField.ts",["cc"],(function(){var e;return{setters:[function(t){e=t.cclegacy}],execute:function(){e._RF.push({},"eb9adPqgbBBKJZm5wOTLQdx","SensorDescriptionField",void 0),e._RF.pop()}}}));
System.register("chunks:///_virtual/SensorDetailManager.ts",["./rollupPluginModLoBabelHelpers.js","cc","./SensorDetailStore.ts","./ErrorLazyLoadList.ts"],(function(e){var n,t,s,o,i,r;return{setters:[function(e){n=e.inheritsLoose},function(e){t=e.cclegacy,s=e._decorator,o=e.Component},function(e){i=e.SensorDetailStore},function(e){r=e.ErrorLazyLoadList}],execute:function(){var a;t._RF.push({},"a0091NqlExPUrb+f5xP0/Gf","SensorDetailManager",void 0);var l=s.ccclass;e("SensorDetailManager",l("SensorDetailManager")(a=function(e){function t(){for(var n,t=arguments.length,s=new Array(t),o=0;o<t;o++)s[o]=arguments[o];return(n=e.call.apply(e,[this].concat(s))||this).currentSensorName="",n}n(t,e);var s=t.prototype;return s.onLoad=function(){var e,n=null==(e=this.node.scene)?void 0:e.getChildByName("EquipmentManager");null==n||n.on("showSensorDetails",this.onShowSensorDetails,this)},s.onDestroy=function(){var e,n=null==(e=this.node.scene)?void 0:e.getChildByName("EquipmentManager");null==n||n.off("showSensorDetails",this.onShowSensorDetails,this),this.unscheduleAllCallbacks()},s.onShowSensorDetails=function(e){var n;this.currentSensorName===e&&"details"===(null==(n=r.instance)?void 0:n.mode)||(this.currentSensorName=e,this.unschedule(this.updateSensorDetails),i.getInstance().fetchSensorDetails(e).then((function(e){e&&r.instance&&r.instance.showSensorDetails(e)})).catch(console.error),this.node.active&&this.schedule(this.updateSensorDetails,5),this.node.active=!0)},s.onEnable=function(){this.currentSensorName&&(this.unschedule(this.updateSensorDetails),this.schedule(this.updateSensorDetails,5))},s.onDisable=function(){this.unschedule(this.updateSensorDetails)},s.updateSensorDetails=function(){this.currentSensorName&&i.getInstance().fetchSensorDetails(this.currentSensorName).then((function(e){var n;e&&"details"===(null==(n=r.instance)?void 0:n.mode)&&r.instance.showSensorDetails(e)})).catch(console.error)},t}(o))||a);t._RF.pop()}}}));
System.register("chunks:///_virtual/SensorDetailStore.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(e){var r,t,n,s,o,a;return{setters:[function(e){r=e.inheritsLoose,t=e.asyncToGenerator,n=e.regeneratorRuntime},function(e){s=e.cclegacy,o=e._decorator,a=e.Component}],execute:function(){var i,c;s._RF.push({},"0b4098z0xFHGY/qLrEzsi+7","SensorDetailStore",void 0);var u=o.ccclass;e("SensorDetailStore",u("SensorDetailStore")(((c=function(e){function s(){for(var r,t=arguments.length,n=new Array(t),s=0;s<t;s++)n[s]=arguments[s];return(r=e.call.apply(e,[this].concat(n))||this).currentSensorName="",r.currentDetails=null,r}r(s,e),s.getInstance=function(){return s._instance||(s._instance=new s),s._instance};var o=s.prototype;return o.onLoad=function(){s._instance=this},o.fetchSensorDetails=function(){var e=t(n().mark((function e(r){var t,s,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r){e.next=2;break}return e.abrupt("return",null);case 2:return this.currentSensorName=r,e.prev=3,e.next=6,fetch("http://192.168.0.169:3030/api/v2/sensor-details",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sensorName:r})});case 6:if((t=e.sent).ok){e.next=10;break}return console.error("[SensorDetailStore] Ошибка ответа от сервера: "+t.status),e.abrupt("return",null);case 10:return e.next=12,t.json();case 12:if(!((s=e.sent)&&s.description&&s.description.fields)){e.next=19;break}return o={sensorName:s.name,fields:s.description.fields},this.currentDetails=o,e.abrupt("return",o);case 19:return console.error("[SensorDetailStore] Неверный формат данных:",s),e.abrupt("return",null);case 21:e.next=27;break;case 23:return e.prev=23,e.t0=e.catch(3),console.error("[SensorDetailStore] Не удалось загрузить данные датчика:",e.t0),e.abrupt("return",null);case 27:case"end":return e.stop()}}),e,this,[[3,23]])})));return function(r){return e.apply(this,arguments)}}(),o.getCurrentDetails=function(){return this.currentDetails},s}(a))._instance=null,i=c))||i);s._RF.pop()}}}));
System.register("chunks:///_virtual/SensorFieldItem.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(e){var i,t,n,r,a,l,o,u,s;return{setters:[function(e){i=e.applyDecoratedDescriptor,t=e.inheritsLoose,n=e.initializerDefineProperty,r=e.assertThisInitialized},function(e){a=e.cclegacy,l=e._decorator,o=e.Label,u=e.Node,s=e.Component}],execute:function(){var c,p,b,h,d,f,L,m,v,y,g,w,z,C,I;a._RF.push({},"c1a39jwEUpIVIaHl1hL0Vwq","SensorFieldItem",void 0);var F=l.ccclass,S=l.property;e("SensorFieldItem",(c=F("SensorFieldItem"),p=S(o),b=S(o),h=S(o),d=S(o),f=S({type:u}),L=S({type:u}),c((y=i((v=function(e){function i(){for(var i,t=arguments.length,a=new Array(t),l=0;l<t;l++)a[l]=arguments[l];return i=e.call.apply(e,[this].concat(a))||this,n(i,"nameLabel",y,r(i)),n(i,"valueLabel",g,r(i)),n(i,"unitLabel",w,r(i)),n(i,"descriptionLabel",z,r(i)),n(i,"descriptionContainer",C,r(i)),n(i,"Morph",I,r(i)),i}t(i,e);var a=i.prototype;return a.onLoad=function(){this.descriptionContainer&&(this.descriptionContainer.active=!1)},a.setData=function(e){var i,t;this.nameLabel&&(this.nameLabel.string=e.name),this.valueLabel&&(this.valueLabel.string=String(e.value)),this.unitLabel&&(this.unitLabel.string=null!=(i=e.unit)?i:"????");var n=!(null==(t=e.description)||!t.trim());this.descriptionLabel&&(this.descriptionLabel.string=n?e.description:""),this.descriptionContainer&&(this.descriptionContainer.active=n),this.Morph&&(this.Morph.active=n)},i}(s)).prototype,"nameLabel",[p],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),g=i(v.prototype,"valueLabel",[b],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),w=i(v.prototype,"unitLabel",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),z=i(v.prototype,"descriptionLabel",[d],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),C=i(v.prototype,"descriptionContainer",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),I=i(v.prototype,"Morph",[L],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),m=v))||m));a._RF.pop()}}}));
System.register("chunks:///_virtual/switchWalls.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(t){var n,e,i,l,r,c,s,a;return{setters:[function(t){n=t.applyDecoratedDescriptor,e=t.inheritsLoose,i=t.initializerDefineProperty,l=t.assertThisInitialized},function(t){r=t.cclegacy,c=t._decorator,s=t.Node,a=t.Component}],execute:function(){var o,u,h,p,f,w;r._RF.push({},"c6cc9hNiE5Axr2R3ChCk2AB","switchWalls",void 0);var v=c.ccclass,y=c.property;t("switchWalls",(o=v("switchWalls"),u=y(s),o(((w=function(t){function n(){for(var n,e=arguments.length,r=new Array(e),c=0;c<e;c++)r[c]=arguments[c];return n=t.call.apply(t,[this].concat(r))||this,i(n,"walls",f,l(n)),n}e(n,t);var r=n.prototype;return r.onLoad=function(){n._instance=this},n.getInstance=function(){return n._instance},r.hideWalls=function(){this.walls.active=!1},r.showWalls=function(){this.walls.active=!0},n}(a))._instance=null,f=n((p=w).prototype,"walls",[u],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),h=p))||h));r._RF.pop()}}}));
System.register("chunks:///_virtual/ToggleListButton.ts",["./rollupPluginModLoBabelHelpers.js","cc","./ErrorLazyLoadList.ts"],(function(t){var i,e,s,n,o,r,a,u,l,h,c;return{setters:[function(t){i=t.applyDecoratedDescriptor,e=t.inheritsLoose,s=t.initializerDefineProperty,n=t.assertThisInitialized},function(t){o=t.cclegacy,r=t._decorator,a=t.Node,u=t.Vec3,l=t.tween,h=t.Component},function(t){c=t.ErrorLazyLoadList}],execute:function(){var p,d,L,f,m,q,v,g,P,w;o._RF.push({},"c8c51tyHOdF9qPPEv9e5w6n","ToggleListButton",void 0);var b=r.ccclass,y=r.property;t("ToggleListButton",(p=b("ToggleListButton"),d=y(a),L=y({type:a}),p(((w=function(t){function i(){for(var i,e=arguments.length,o=new Array(e),r=0;r<e;r++)o[r]=arguments[r];return i=t.call.apply(t,[this].concat(o))||this,s(i,"equipmentList",q,n(i)),i.visiblePos=new u,i.hiddenPos=new u,s(i,"slideDuration",v,n(i)),s(i,"slideOffset",g,n(i)),s(i,"arrow",P,n(i)),i}e(i,t);var o=i.prototype;return o.onLoad=function(){i.instance=this,this.equipmentList&&(this.visiblePos=this.equipmentList.position.clone(),this.hiddenPos=this.visiblePos.clone(),this.hiddenPos.x+=this.slideOffset,this.equipmentList.setPosition(this.hiddenPos),this.equipmentList.active=!1),this.arrow&&(this.arrow.angle=0)},o.onDestroy=function(){i.instance===this&&(i.instance=null)},o.toggleList=function(){var t,i=this;this.equipmentList&&(this.equipmentList.active?(l(this.equipmentList).to(this.slideDuration,{position:this.hiddenPos}).call((function(){i.equipmentList.active=!1})).start(),this.arrow&&l(this.arrow).to(this.slideDuration,{angle:0}).start()):(this.equipmentList.active=!0,this.equipmentList.setPosition(this.hiddenPos),l(this.equipmentList).to(this.slideDuration,{position:this.visiblePos}).start(),this.arrow&&l(this.arrow).to(this.slideDuration,{angle:-180}).start(),null==(t=c.instance)||t.resetFilter()))},o.openAndResetFilter=function(){var t;this.equipmentList&&(this.equipmentList.active||(this.equipmentList.active=!0,this.equipmentList.setPosition(this.hiddenPos),l(this.equipmentList).to(this.slideDuration,{position:this.visiblePos}).start(),this.arrow&&l(this.arrow).to(this.slideDuration,{angle:-180}).start()),null==(t=c.instance)||t.resetFilter())},o.open=function(){this.equipmentList&&(this.equipmentList.active||(this.equipmentList.active=!0,this.equipmentList.setPosition(this.hiddenPos),l(this.equipmentList).to(this.slideDuration,{position:this.visiblePos}).start(),this.arrow&&l(this.arrow).to(this.slideDuration,{angle:-180}).start()))},i}(h)).instance=null,q=i((m=w).prototype,"equipmentList",[d],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),v=i(m.prototype,"slideDuration",[y],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return.4}}),g=i(m.prototype,"slideOffset",[y],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 300}}),P=i(m.prototype,"arrow",[L],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),f=m))||f));o._RF.pop()}}}));
System.register("chunks:///_virtual/ToggleManage.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(e){var o,t,i,r,n,l,s,a,c,g;return{setters:[function(e){o=e.applyDecoratedDescriptor,t=e.inheritsLoose,i=e.initializerDefineProperty,r=e.assertThisInitialized},function(e){n=e.cclegacy,l=e._decorator,s=e.Node,a=e.Sprite,c=e.Color,g=e.Component}],execute:function(){var u,p,h,f,T,b,y,B,d;n._RF.push({},"25c6avRXM5AKrkSp8VWFb2Y","ToggleManage",void 0);var m=l.ccclass,v=l.property;e("ToggleManage",(u=m("ToggleManage"),p=v(s),h=v(a),f=v(c),u((y=o((b=function(e){function o(){for(var o,t=arguments.length,n=new Array(t),l=0;l<t;l++)n[l]=arguments[l];return o=e.call.apply(e,[this].concat(n))||this,i(o,"nodeThump",y,r(o)),i(o,"spriteBg",B,r(o)),i(o,"colorBg",d,r(o)),o.isOnToggle=!1,o}t(o,e);var n=o.prototype;return n.start=function(){this.spriteBg.color=this.colorBg[0]},n.setToggle=function(){this.isOnToggle?(this.isOnToggle=!1,this.spriteBg.color=this.colorBg[0]):(this.isOnToggle=!0,this.spriteBg.color=this.colorBg[1]),this.nodeThump.setPosition(0-this.nodeThump.position.x,0,0)},o}(g)).prototype,"nodeThump",[p],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),B=o(b.prototype,"spriteBg",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),d=o(b.prototype,"colorBg",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),T=b))||T));n._RF.pop()}}}));
System.register("chunks:///_virtual/VirtualList.ts",["./rollupPluginModLoBabelHelpers.js","cc","./ItemButton.ts","./EquipmentManager.ts"],(function(t){var e,n,i,o,r,a,s,l,c,u,h,d,p,f,m,g,_;return{setters:[function(t){e=t.applyDecoratedDescriptor,n=t.inheritsLoose,i=t.initializerDefineProperty,o=t.assertThisInitialized,r=t.asyncToGenerator,a=t.regeneratorRuntime},function(t){s=t.cclegacy,l=t._decorator,c=t.Prefab,u=t.ScrollView,h=t.Node,d=t.UITransform,p=t.instantiate,f=t.Component,m=t.MeshRenderer},function(t){g=t.ItemButton},function(t){_=t.EquipmentManager}],execute:function(){var w,C,b,v,y,I,L,V,D,q;s._RF.push({},"e8aeeDTB95N27vY5YNwlCRI","VirtualList",void 0);var N=l.ccclass,U=l.property;t("LazyLoadList",(w=N("LazyLoadList"),C=U(c),b=U(u),v=U(h),w((L=e((I=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return e=t.call.apply(t,[this].concat(r))||this,i(e,"itemPrefab",L,o(e)),i(e,"scrollView",V,o(e)),i(e,"equipmentNode",D,o(e)),i(e,"spacing",q,o(e)),e._data=[],e._totalCount=0,e._loadedCount=0,e._itemHeight=0,e._content=null,e._contentUI=null,e}n(e,t);var s=e.prototype;return s.onLoad=function(){if(this.scrollView.content){this._content=this.scrollView.content,this._contentUI=this._content.getComponent(d);var t=p(this.itemPrefab),e=t.getComponent(d);if(!e)return console.error("В префабе отсутствует компонент UITransform!"),void t.destroy();this._itemHeight=e.height,t.destroy(),this.waitForEquipmentManager(),this.scrollView.node.on("scrolling",this.onScrolling,this)}else console.error("ScrollView.content равен null!")},s.onScrolling=function(){var t=this.scrollView.getScrollOffset().y,e=this.scrollView.node.getComponent(d).height,n=this._contentUI.height;t+e+2*this._itemHeight>=n&&this.loadNextBatch(20)},s.waitForEquipmentManager=function(){var t=this;_.instance?_.instance.initialDataPromise.then((function(){_.instance.node.on("data-updated",t.onDataUpdated,t),t.onDataUpdated()})).catch((function(t){console.error("Ошибка загрузки данных в EquipmentManager:",t)})):this.scheduleOnce((function(){t.waitForEquipmentManager()}),.1)},s.onDataUpdated=function(){var t=r(a().mark((function t(){var e,n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(_.instance){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,_.instance.getDataList();case 4:e=t.sent,n=[],this.equipmentNode&&this.equipmentNode.children.forEach((function(t){t.getComponent(m)&&n.push(t.name)})),this._data=e.filter((function(t){return-1!==n.indexOf(t.name)})),this._totalCount=this._data.length,this._loadedCount=0,this._content.removeAllChildren(),this.loadNextBatch(20);case 12:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),s.loadNextBatch=function(t){if(!(this._loadedCount>=this._totalCount)){for(var e=Math.min(this._loadedCount+t,this._totalCount),n=this._loadedCount;n<e;n++){var i=p(this.itemPrefab),o=-(this._loadedCount*(this._itemHeight+this.spacing)+this._itemHeight/2);i.setPosition(0,o,0),this._content.addChild(i);var r=i.getComponent(g);r?(r.initialize(this._data[n]),r.itemIndex=n):console.error("Компонент ItemButton не найден на ноде",i),this._loadedCount++}this._contentUI.height=this._loadedCount*(this._itemHeight+this.spacing)}},s.onDestroy=function(){var t,e;null==(t=_.instance)||null==(t=t.node)||t.off("data-updated",this.onDataUpdated,this),null==(e=this.scrollView)||null==(e=e.node)||e.off("scrolling",this.onScrolling,this)},e}(f)).prototype,"itemPrefab",[C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),V=e(I.prototype,"scrollView",[b],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),D=e(I.prototype,"equipmentNode",[v],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),q=e(I.prototype,"spacing",[U],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 10}}),y=I))||y));s._RF.pop()}}}));
System.register("chunks:///_virtual/WallTextSwitch.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(t){var i,e,l,n,r,a,o,s;return{setters:[function(t){i=t.applyDecoratedDescriptor,e=t.inheritsLoose,l=t.initializerDefineProperty,n=t.assertThisInitialized},function(t){r=t.cclegacy,a=t._decorator,o=t.Label,s=t.Component}],execute:function(){var c,u,h,p,g;r._RF.push({},"bae91xJwvJDa5PQthCiFX8w","WallTextSwitch",void 0);var f=a.ccclass,b=a.property;t("WallTextSwitch",(c=f("WallTextSwitch"),u=b(o),c((g=i((p=function(t){function i(){for(var i,e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return i=t.call.apply(t,[this].concat(r))||this,l(i,"WallLb",g,n(i)),i.isOnToggle=!1,i}e(i,t);var r=i.prototype;return r.start=function(){this.WallLb.string="Стены включены"},r.wallSwitch=function(){this.isOnToggle?(this.isOnToggle=!1,this.WallLb.string="Стены включены"):(this.isOnToggle=!0,this.WallLb.string="Стены выключены")},i}(s)).prototype,"WallLb",[u],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),h=p))||h));r._RF.pop()}}}));
(function(r) {
r('virtual:///prerequisite-imports/main', 'chunks:///_virtual/main');
})(function(mid, cid) {
System.register(mid, [cid], function (_export, _context) {
return {
setters: [function(_m) {
var _exportObj = {};
for (var _key in _m) {
if (_key !== "default" && _key !== "__esModule") _exportObj[_key] = _m[_key];
}
_export(_exportObj);
}],
execute: function () { }
};
});
});