@syhr/sy-graph 1.1.0-rc.8 → 1.1.0-rc.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- "use strict";require('./sy-graph.css');var Ft=Object.defineProperty,Ut=Object.defineProperties;var Gt=Object.getOwnPropertyDescriptors;var Ye=Object.getOwnPropertySymbols;var Vt=Object.prototype.hasOwnProperty,Bt=Object.prototype.propertyIsEnumerable;var Me=(n,e,t)=>e in n?Ft(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,l=(n,e)=>{for(var t in e||(e={}))Vt.call(e,t)&&Me(n,t,e[t]);if(Ye)for(var t of Ye(e))Bt.call(e,t)&&Me(n,t,e[t]);return n},P=(n,e)=>Ut(n,Gt(e));var ce=(n,e,t)=>Me(n,typeof e!="symbol"?e+"":e,t);var J=(n,e,t)=>new Promise((a,r)=>{var o=p=>{try{h(t.next(p))}catch(g){r(g)}},i=p=>{try{h(t.throw(p))}catch(g){r(g)}},h=p=>p.done?a(p.value):Promise.resolve(p.value).then(o,i);h((t=t.apply(n,e)).next())});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("vue"),Ht=require("qs"),Wt=require("axios"),Kt=require("mitt"),Yt=require("dayjs");require("crypto-js");const me=require("gm-crypto"),Ne=require("lodash-es"),X=require("element-plus"),_t=require("@meta2d/utils"),G=require("@meta2d/core"),__$t__=require("@meta2d/plugin-mind-core"),qt=require("@meta2d/plugin-mind-collapse"),zt=require("@meta2d/form-diagram"),jt=require("@meta2d/class-diagram"),Xt=require("@meta2d/le5le-charts"),fe=require("@meta2d/core/src/diagrams"),$e=require("@meta2d/flow-diagram"),Oe=require("@meta2d/fta-diagram"),qe=require("@meta2d/sequence-diagram"),ze=require("@meta2d/activity-diagram"),Qt=require("@element-plus/icons-vue"),Jt={OFFLINE:0},Zt={STOP:2},ea={1:1,2:2,3:3,4:4,5:5},F={AREA:1,BAY:2,DEVICE:3,COMPONENT:4,POINT:5,YX:6,YC:7,YK:8,AUX_DEVICE:9,LD:10,LN:11,SG:12,GIS_SENSOR:13},ta={[F.AREA]:"area",[F.BAY]:"bay",[F.DEVICE]:"device",[F.COMPONENT]:"component",[F.POINT]:"patrolpoint",[F.YX]:"yxpoint",[F.YC]:"ycpoint",[F.YK]:"ykpoint",[F.AUX_DEVICE]:"acdevice",[F.LD]:"ld",[F.LN]:"ln",[F.SG]:"sgpoint",[F.GIS_SENSOR]:"gisuhfsensor"},Z={CUSTOM_MSG:"CUSTOM_MSG",OPEN_CAMERA:"OPEN_CAMERA",CLOSE_CAMERA:"CLOSE_CAMERA",OPEN_AUDIO:"OPEN_AUDIO",CLOSE_AUDIO:"CLOSE_AUDIO",CHANGE_GRAPH:"CHANGE_GRAPH",NOTIFY_DIALOG:"NOTIFY_DIALOG",GIS_PROPS_PANEL:"GIS_PROPS_PANEL"},Ie={Emit:7},Te={NONE:"none",WUJIE:"wujie",QIANKUN:"qiankun",MICROAPP:"microapp"},S={TEXT:"TEXT",NORMAL:"NORMAL",MP4:"MP4",TIME:"TIME",AUDIO:"AUDIO",RADIO:"RADIO",TABLE:"TABLE",INPUT:"INPUT",BUTTON:"BUTTON",CAMERA:"CAMERA",SELECT:"SELECT",SENSOR:"SENSOR",GIS_SENSOR:"GIS_SENSOR",GIS_SENSOR_WRAPPER:"GIS_SENSOR_WRAPPER",GIS_DB_VALUE:"GIS_DB_VALUE",SLIDER:"SLIDER",SWITCH:"SWITCH",CHECKBOX:"CHECKBOX",POINT_VALUE:"POINT_VALUE",LIGHT_PLATE:"LIGHT_PLATE",VIDEO_STREAM:"VIDEO_STREAM"},je={GRAPH:{SOCKET:"GRAPH_SOCKET"}},Le={AC:{ALARM:"ac.channel.alarm",CONDITION:"ac.channel.gk",OPERATION:"ac.channel.op"},AUDIT:{MSG:"audit.msg",ALARM:"audit.alarm"},DATA:{TASK_STATUS:"data.patroldevice.taskstatus",TASK_RESULT:"data.patroldevice.taskresult"},HOST:{STATUS:"status.platform.hoststatus"},NEST:{BATTERY:"status.platform.nestbattery",HUMIDITY:"status.platform.nesthumidity",TEMPERATURE:"status.platform.nesttemperature",AIR_STATE:"status.platform.nestairstate",DOOR_STATE:"status.platform.nestdoorstate",CHARGE_STATE:"status.platform.nestchargestate",RUNNING_STATE:"status.platform.nestrunningstate",BATTERY_STATE:"status.platform.nestbatterystate",BATTERY_ENABLE:"status.platform.nestbatteryenable",BATTERY_VOLTAGE:"status.platform.nestbatteryvoltage",PLATFORM_STATE:"status.platform.nestsysstate"},MEDIA:{NVR_INFO:"status.platform.nvrinfo",NVR_STATUS:"status.platform.nvrstatus",CAMERA_STATUS:"status.platform.camerastatus"},DRONE:{STATUS:"status.platform.dronestatus",ELECTRICITY:"status.platform.droneelectricity",FLIGHT_TIME:"status.platform.flighttime",FLIGHT_HEIGHT:"status.platform.flightheight",FLIGHT_STATUS:"status.platform.flightstatus",FLIGHT_DISTANCE:"status.platform.flightdistance",PTZ_ELEVATION:"status.platform.ptzelevation",PTZ_YAW_ANGLE:"status.platform.ptzyawangle",PTZ_ROLL_ANGLE:"status.platform.ptzrollangle",LOW_BATTERY:"status.platform.lowbattery",COMM_ABNORMAL:"status.platform.commabnormal",DRIVE_EXCEPTION:"status.platform.driveexception",FAULT_ALARM:"status.platform.faultalarm",CONTROL_STATUS:"status.platform.controlstatus",MILEAGE:"status.platform.mileage",CONTROL_MODE:"status.platform.controlmode"},ROBOT:{SPEED:"status.platform.robotspeed",STATUS:"status.platform.robotstatus",BATTERY:"status.platform.robotbattery",MILEAGE:"status.platform.robotmileage",HUMIDITY:"status.platform.robothumidity",WINDSPEED:"status.platform.robotwindspeed",COORDINATE:"status.platform.robotcoordinate",COORDINATES:"status.platform.robotcoordinates",FAULT_ALARM:"status.platform.robotfaultalarm",LOW_BATTERY:"status.platform.robotlowbattery",TEMPERATURE:"status.platform.robottemperature",CONTROL_MODE:"status.platform.robotcontrolmode",COMM_ABNORMAL:"status.platform.robotcommabnormal",RUNNING_STATE:"status.platform.robotrunningstate",CONTROL_STATUS:"status.platform.robotcontrolstatus",DRIVE_EXCEPTION:"status.platform.robotdriveexception",TRANSPORT_STATUS:"status.platform.robottransportstatus",ULTRASONIC_STOPPING:"status.platform.robotultrasonicstopping"},VOICE:{STATUS:"voiceprint.status",DATA:"voice.data",VOICEPRINT:"voiceprint.data",TIME_DOMAIN:"voiceprint.time.domain",FREQ_DOMAIN:"voiceprint.freq.domain"},PATROL:{ALARM:"patrol.alarm",TASK_ITEM:"patrol.task.item",TASK_INDEX:"patrol.task.index",SINGLE_RESULT:"patrol.single.result",CAMERA_ITEM:"patrol.camera.item",PATROLDEVICE_TASKSTATUS:"data.patroldevice.taskstatus",PATROLDEVICE_TASKRESULT:"data.patroldevice.taskresult",MASTER_ALARM:"patrol.master.alarm",MASTER_SILENCE:"patrol.task.master.silence",MASTER_TASK_ITEM:"patrol.task.master.item",MASTER_TASK_INDEX:"patrol.task.master.index"},REPORT:{ALARM:"report.alarm.message",EXCEL:"report.excel.message",PATROL:"report.patrol.message",PICTURE:"report.picture.message"},ACPOINT:{YCVALUE:"status.platform.ycvalue",YXVALUE:"status.platform.yxvalue"},ALARM:{VOICE:"alarm.platform.alarm"},LINKAGE:{TASK:"linkage.record.task",CAMERA:"linkage.record.camera",PRESET:"linkage.record.preset",CONTROL:"linkage.record.control",PATROLPOINT:"linkage.record.patrolpoint"},METRICS:{SERVER:"metrics.metrics.server",CONTAINER:"metrics.metrics.container"},STATION:{SF6:"status.platform.stationsf6",OXYGEN:"status.platform.stationoxygen",HUMIDITY:"status.platform.stationhumidity",PRESSURE:"status.platform.stationpressure",RAINFALL:"status.platform.stationrainfall",WINDSPEED:"status.platform.stationwindspeed",TEMPERATURE:"status.platform.stationtemperature",WINDDIRECTION:"status.platform.stationwinddirection"},INTERFACE:{ANALYSIS:"analyse.pic.result",ALGORITHM:"algorithm.update.result"},PATROL_DEVICE:{BATTERY:"status.platform.battery",MILEAGE:"status.platform.mileage",GEOGRAPHY:"status.platform.coordinate_geography",COORDINATE:"status.platform.coordinate",COORDINATES:"status.platform.coordinates",ELECTRICITY:"status.platform.electricity",PTZYAWANGLE:"status.platform.ptzyawangle",PTZELEVATION:"status.platform.ptzelevation",PTZROLLANGLE:"status.platform.ptzrollangle",VERTICAL_SPEED:"status.platform.verticalspeed",HORIZONTAL_SPEED:"status.platform.horizontalspeed",FAULT_ALARM:"status.platform.faultalarm",LOW_BATTERY:"status.platform.lowbattery",CONTROL_MODE:"status.platform.controlmode",COMM_ABNORMAL:"status.platform.commabnormal",RUNNING_STATE:"status.platform.runningstate",CONTROL_STATUS:"status.platform.controlstatus",DRIVE_EXCEPTION:"status.platform.driveexception",TRANSPORT_STATUS:"status.platform.transportstatus",ULTRASONIC_STOPPING:"status.platform.ultrasonicstopping"}};var Pe={};/*!
1
+ "use strict";require('./sy-graph.css');var Ft=Object.defineProperty,Ut=Object.defineProperties;var Gt=Object.getOwnPropertyDescriptors;var Ye=Object.getOwnPropertySymbols;var Vt=Object.prototype.hasOwnProperty,Bt=Object.prototype.propertyIsEnumerable;var Me=(n,e,t)=>e in n?Ft(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,l=(n,e)=>{for(var t in e||(e={}))Vt.call(e,t)&&Me(n,t,e[t]);if(Ye)for(var t of Ye(e))Bt.call(e,t)&&Me(n,t,e[t]);return n},P=(n,e)=>Ut(n,Gt(e));var ce=(n,e,t)=>Me(n,typeof e!="symbol"?e+"":e,t);var J=(n,e,t)=>new Promise((a,r)=>{var o=p=>{try{h(t.next(p))}catch(g){r(g)}},i=p=>{try{h(t.throw(p))}catch(g){r(g)}},h=p=>p.done?a(p.value):Promise.resolve(p.value).then(o,i);h((t=t.apply(n,e)).next())});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("vue"),Ht=require("qs"),Wt=require("axios"),Kt=require("mitt"),Yt=require("dayjs");require("crypto-js");const me=require("gm-crypto"),Ne=require("lodash-es"),j=require("element-plus"),wt=require("@meta2d/utils"),G=require("@meta2d/core"),__$t__=require("@meta2d/plugin-mind-core"),qt=require("@meta2d/plugin-mind-collapse"),zt=require("@meta2d/form-diagram"),jt=require("@meta2d/class-diagram"),Xt=require("@meta2d/le5le-charts"),fe=require("@meta2d/core/src/diagrams"),$e=require("@meta2d/flow-diagram"),Oe=require("@meta2d/fta-diagram"),qe=require("@meta2d/sequence-diagram"),ze=require("@meta2d/activity-diagram"),Qt=require("@element-plus/icons-vue"),Jt={OFFLINE:0},Zt={STOP:2},ea={1:1,2:2,3:3,4:4,5:5},F={AREA:1,BAY:2,DEVICE:3,COMPONENT:4,POINT:5,YX:6,YC:7,YK:8,AUX_DEVICE:9,LD:10,LN:11,SG:12,GIS_SENSOR:13},ta={[F.AREA]:"area",[F.BAY]:"bay",[F.DEVICE]:"device",[F.COMPONENT]:"component",[F.POINT]:"patrolpoint",[F.YX]:"yxpoint",[F.YC]:"ycpoint",[F.YK]:"ykpoint",[F.AUX_DEVICE]:"acdevice",[F.LD]:"ld",[F.LN]:"ln",[F.SG]:"sgpoint",[F.GIS_SENSOR]:"gisuhfsensor"},Z={CUSTOM_MSG:"CUSTOM_MSG",OPEN_CAMERA:"OPEN_CAMERA",CLOSE_CAMERA:"CLOSE_CAMERA",OPEN_AUDIO:"OPEN_AUDIO",CLOSE_AUDIO:"CLOSE_AUDIO",CHANGE_GRAPH:"CHANGE_GRAPH",NOTIFY_DIALOG:"NOTIFY_DIALOG",GIS_PROPS_PANEL:"GIS_PROPS_PANEL"},Ie={Emit:7},Te={NONE:"none",WUJIE:"wujie",QIANKUN:"qiankun",MICROAPP:"microapp"},S={TEXT:"TEXT",NORMAL:"NORMAL",MP4:"MP4",TIME:"TIME",AUDIO:"AUDIO",RADIO:"RADIO",TABLE:"TABLE",INPUT:"INPUT",BUTTON:"BUTTON",CAMERA:"CAMERA",SELECT:"SELECT",SENSOR:"SENSOR",GIS_SENSOR:"GIS_SENSOR",GIS_SENSOR_WRAPPER:"GIS_SENSOR_WRAPPER",GIS_DB_VALUE:"GIS_DB_VALUE",SLIDER:"SLIDER",SWITCH:"SWITCH",CHECKBOX:"CHECKBOX",POINT_VALUE:"POINT_VALUE",LIGHT_PLATE:"LIGHT_PLATE",VIDEO_STREAM:"VIDEO_STREAM"},je={GRAPH:{SOCKET:"GRAPH_SOCKET"}},Le={AC:{ALARM:"ac.channel.alarm",CONDITION:"ac.channel.gk",OPERATION:"ac.channel.op"},AUDIT:{MSG:"audit.msg",ALARM:"audit.alarm"},DATA:{TASK_STATUS:"data.patroldevice.taskstatus",TASK_RESULT:"data.patroldevice.taskresult"},HOST:{STATUS:"status.platform.hoststatus"},NEST:{BATTERY:"status.platform.nestbattery",HUMIDITY:"status.platform.nesthumidity",TEMPERATURE:"status.platform.nesttemperature",AIR_STATE:"status.platform.nestairstate",DOOR_STATE:"status.platform.nestdoorstate",CHARGE_STATE:"status.platform.nestchargestate",RUNNING_STATE:"status.platform.nestrunningstate",BATTERY_STATE:"status.platform.nestbatterystate",BATTERY_ENABLE:"status.platform.nestbatteryenable",BATTERY_VOLTAGE:"status.platform.nestbatteryvoltage",PLATFORM_STATE:"status.platform.nestsysstate"},MEDIA:{NVR_INFO:"status.platform.nvrinfo",NVR_STATUS:"status.platform.nvrstatus",CAMERA_STATUS:"status.platform.camerastatus"},DRONE:{STATUS:"status.platform.dronestatus",ELECTRICITY:"status.platform.droneelectricity",FLIGHT_TIME:"status.platform.flighttime",FLIGHT_HEIGHT:"status.platform.flightheight",FLIGHT_STATUS:"status.platform.flightstatus",FLIGHT_DISTANCE:"status.platform.flightdistance",PTZ_ELEVATION:"status.platform.ptzelevation",PTZ_YAW_ANGLE:"status.platform.ptzyawangle",PTZ_ROLL_ANGLE:"status.platform.ptzrollangle",LOW_BATTERY:"status.platform.lowbattery",COMM_ABNORMAL:"status.platform.commabnormal",DRIVE_EXCEPTION:"status.platform.driveexception",FAULT_ALARM:"status.platform.faultalarm",CONTROL_STATUS:"status.platform.controlstatus",MILEAGE:"status.platform.mileage",CONTROL_MODE:"status.platform.controlmode"},ROBOT:{SPEED:"status.platform.robotspeed",STATUS:"status.platform.robotstatus",BATTERY:"status.platform.robotbattery",MILEAGE:"status.platform.robotmileage",HUMIDITY:"status.platform.robothumidity",WINDSPEED:"status.platform.robotwindspeed",COORDINATE:"status.platform.robotcoordinate",COORDINATES:"status.platform.robotcoordinates",FAULT_ALARM:"status.platform.robotfaultalarm",LOW_BATTERY:"status.platform.robotlowbattery",TEMPERATURE:"status.platform.robottemperature",CONTROL_MODE:"status.platform.robotcontrolmode",COMM_ABNORMAL:"status.platform.robotcommabnormal",RUNNING_STATE:"status.platform.robotrunningstate",CONTROL_STATUS:"status.platform.robotcontrolstatus",DRIVE_EXCEPTION:"status.platform.robotdriveexception",TRANSPORT_STATUS:"status.platform.robottransportstatus",ULTRASONIC_STOPPING:"status.platform.robotultrasonicstopping"},VOICE:{STATUS:"voiceprint.status",DATA:"voice.data",VOICEPRINT:"voiceprint.data",TIME_DOMAIN:"voiceprint.time.domain",FREQ_DOMAIN:"voiceprint.freq.domain"},PATROL:{ALARM:"patrol.alarm",TASK_ITEM:"patrol.task.item",TASK_INDEX:"patrol.task.index",SINGLE_RESULT:"patrol.single.result",CAMERA_ITEM:"patrol.camera.item",PATROLDEVICE_TASKSTATUS:"data.patroldevice.taskstatus",PATROLDEVICE_TASKRESULT:"data.patroldevice.taskresult",MASTER_ALARM:"patrol.master.alarm",MASTER_SILENCE:"patrol.task.master.silence",MASTER_TASK_ITEM:"patrol.task.master.item",MASTER_TASK_INDEX:"patrol.task.master.index"},REPORT:{ALARM:"report.alarm.message",EXCEL:"report.excel.message",PATROL:"report.patrol.message",PICTURE:"report.picture.message"},ACPOINT:{YCVALUE:"status.platform.ycvalue",YXVALUE:"status.platform.yxvalue"},ALARM:{VOICE:"alarm.platform.alarm"},LINKAGE:{TASK:"linkage.record.task",CAMERA:"linkage.record.camera",PRESET:"linkage.record.preset",CONTROL:"linkage.record.control",PATROLPOINT:"linkage.record.patrolpoint"},METRICS:{SERVER:"metrics.metrics.server",CONTAINER:"metrics.metrics.container"},STATION:{SF6:"status.platform.stationsf6",OXYGEN:"status.platform.stationoxygen",HUMIDITY:"status.platform.stationhumidity",PRESSURE:"status.platform.stationpressure",RAINFALL:"status.platform.stationrainfall",WINDSPEED:"status.platform.stationwindspeed",TEMPERATURE:"status.platform.stationtemperature",WINDDIRECTION:"status.platform.stationwinddirection"},INTERFACE:{ANALYSIS:"analyse.pic.result",ALGORITHM:"algorithm.update.result"},PATROL_DEVICE:{BATTERY:"status.platform.battery",MILEAGE:"status.platform.mileage",GEOGRAPHY:"status.platform.coordinate_geography",COORDINATE:"status.platform.coordinate",COORDINATES:"status.platform.coordinates",ELECTRICITY:"status.platform.electricity",PTZYAWANGLE:"status.platform.ptzyawangle",PTZELEVATION:"status.platform.ptzelevation",PTZROLLANGLE:"status.platform.ptzrollangle",VERTICAL_SPEED:"status.platform.verticalspeed",HORIZONTAL_SPEED:"status.platform.horizontalspeed",FAULT_ALARM:"status.platform.faultalarm",LOW_BATTERY:"status.platform.lowbattery",CONTROL_MODE:"status.platform.controlmode",COMM_ABNORMAL:"status.platform.commabnormal",RUNNING_STATE:"status.platform.runningstate",CONTROL_STATUS:"status.platform.controlstatus",DRIVE_EXCEPTION:"status.platform.driveexception",TRANSPORT_STATUS:"status.platform.transportstatus",ULTRASONIC_STOPPING:"status.platform.ultrasonicstopping"}};var Pe={};/*!
2
2
  * vite-plugin-qiankun.js v1.0.14
3
3
  * (c) 2021-2022 Teng Mao Qing
4
4
  * Released under the MIT License.
5
- */Object.defineProperty(Pe,"__esModule",{value:!0});var Ae=typeof window!="undefined"?window.proxy||window:{},wt=function(n){Ae!=null&&Ae.__POWERED_BY_QIANKUN__&&(window.moudleQiankunAppLifeCycles||(window.moudleQiankunAppLifeCycles={}),Ae.qiankunName&&(window.moudleQiankunAppLifeCycles[Ae.qiankunName]=n))};Pe.default=wt;var Fe=Pe.qiankunWindow=Ae;Pe.renderWithQiankun=wt;function aa(){return window.__POWERED_BY_WUJIE__||window.$wujie?Te.WUJIE:window.__POWERED_BY_QIANKUN__||Fe!=null&&Fe.__POWERED_BY_QIANKUN__?Te.QIANKUN:window.__MICRO_APP_ENVIRONMENT__||window.microApp?Te.MICROAPP:Te.NONE}const xe="/",vt=window.meta.app.encrypt;aa();const na=location.protocol==="https:",ra=location.hostname,ia=na?"wss:":"ws:",oa=location.port,sa=location.origin,Xe=`${ia}//${location.host}/ws`;var nt,rt,it,ot,st,lt,ct,dt,ut,ht,mt,ft;(rt=(nt=window.meta)==null?void 0:nt.graph)!=null&&rt.savePath,(ot=(it=window.meta)==null?void 0:it.graph)!=null&&ot.graphPenPath,(lt=(st=window.meta)==null?void 0:st.graph)!=null&&lt.templatePath,(dt=(ct=window.meta)==null?void 0:ct.graph)!=null&&dt.graphImgUploadPath,(ht=(ut=window.meta)==null?void 0:ut.graph)!=null&&ht.threeSavePath,(ft=(mt=window.meta)==null?void 0:mt.graph)!=null&&ft.threeModelPath;var pt;const O=Wt.create({baseURL:sa,timeout:((pt=window.meta.axios)==null?void 0:pt.timeout)||6e4,withCredentials:!1,paramsSerializer:n=>Ht.stringify(n)});O.interceptors.request.use(n=>(n.headers["x-token"]="ewoglCJhbGcilDogpc3",n),n=>Promise.reject(n));O.interceptors.response.use(n=>{const{data:e}=n;return Promise.resolve(e)},n=>Promise.reject(n));function la(n,e={},t={}){return new Promise(a=>{O.get(n,l({params:e},t)).then(r=>a({res:r,err:null})).catch(r=>a({res:null,err:r}))})}function ca(n,e={},t={}){return new Promise(a=>{O.post(n,e,t).then(r=>a({res:r,err:null})).catch(r=>a({res:null,err:r}))})}function da(n,e={},t={}){return O.get(n,l({params:e},t))}function ua(n,e={},t={}){return O.post(n,e,t)}function ha(n,e={}){return O.get(`/filehandle/${n}`,{params:e})}function ma(n,e={},t={}){return O.post(`/filehandle/${n}`,e,t)}function fa(n,e={}){return O.get(`/user/${n}`,{params:e})}function pa(n,e={},t={}){return O.post(`/user/${n}`,e,t)}function Aa(n,e={}){return O.get(`${n}`,e.local?{params:e,baseURL:xe}:{params:e})}function ga(n,e={}){return O.get(`/media/${n}/`,{params:e})}function _a(n,e={},t={}){return O.post(`/media/${n}/`,e,t)}function wa(n,e={}){return O.get(`/${window.meta.app.isFactory?window.meta.factory.singo_prefix||"acproxy/common":"common"}/${n}/`,{params:e})}function va(n,e={},t={}){return O.post(`/${window.meta.app.isFactory?window.meta.factory.singo_prefix||"acproxy/common":"common"}/${n}/`,e,t)}function ya(n,e={}){return O.get(`/history/${n}`,{params:e})}function Ea(n,e={},t={}){return O.post(`/history/${n}`,e,t)}function Ia(n,e={}){return O.get(`/scada/${n}`,{params:e})}function Ta(n,e={},t={}){return O.post(`/scada/${n}`,e,t)}function Sa(n,e={}){return O.get(`/common/factory/${n}`,{params:e})}function ba(n,e={},t={}){return O.post(`/common/factory/${n}`,e,t)}function Ca(n,e={}){return O.get(`/factory/${n}`,{params:e})}function xa(n,e={},t={}){return O.post(`/factory/${n}`,e,t)}function Na(n,e={}){return O.get(`/pd/${n}`,{params:e})}function Pa(n,e={},t={}){return O.post(`/pd/${n}`,e,t)}const ue={getApi:la,postApi:ca,getFileApi:ha,postFileApi:ma,getBaseApi:da,postBaseApi:ua,getUserApi:fa,postUserApi:pa,getGraphApi:Aa,getMediaApi:ga,postMediaApi:_a,getScadaApi:Ia,postScadaApi:Ta,getCommonApi:wa,postCommonApi:va,getHistoryApi:ya,postHistoryApi:Ea,getFactoryApi:Ca,postFactoryApi:xa,getCommonFactoryApi:Sa,postCommonFactoryApi:ba,getPDApi:Na,postPDApi:Pa},Be=Kt(),Ra=[65535,-99999];function Ue(n){if(typeof n!="string")return!1;const e=/^-?\d+(\.\d+)?$/;return n.trim()!==""&&e.test(n.trim())}function He(n){return!["null","undefined"].includes(n)&&n!==void 0&&n!==null&&n!==""}function Se(n){return typeof n=="number"&&!Ra.includes(n)}const Ge=()=>{var a;const n={},e=((a=window.location.href.split("?"))==null?void 0:a[1])||"",t=new URLSearchParams(e);for(const[r,o]of t.entries())n[r]=o;return n};function Ve(n){return Object.prototype.toString.call(n).slice(8,-1)}(function(){if(typeof Object.id=="undefined"){var n=0;Object.id=function(e){return typeof e.__uniqueid=="undefined"&&Object.defineProperty(e,"__uniqueid",{value:++n,enumerable:!1,writable:!1}),e.__uniqueid}}})();function ka(){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1];this.encode=function(t){var a,r,o,i,h,p;for(o=t.length,r=0,a="";r<o;){if(i=t.charCodeAt(r++)&255,r==o){a+=n.charAt(i>>2),a+=n.charAt((i&3)<<4),a+="==";break}if(h=t.charCodeAt(r++),r==o){a+=n.charAt(i>>2),a+=n.charAt((i&3)<<4|(h&240)>>4),a+=n.charAt((h&15)<<2),a+="=";break}p=t.charCodeAt(r++),a+=n.charAt(i>>2),a+=n.charAt((i&3)<<4|(h&240)>>4),a+=n.charAt((h&15)<<2|(p&192)>>6),a+=n.charAt(p&63)}return a},this.decode=function(t){var a,r,o,i,h,p,g;for(p=t.length,h=0,g="";h<p;){do a=e[t.charCodeAt(h++)&255];while(h<p&&a==-1);if(a==-1)break;do r=e[t.charCodeAt(h++)&255];while(h<p&&r==-1);if(r==-1)break;g+=String.fromCharCode(a<<2|(r&48)>>4);do{if(o=t.charCodeAt(h++)&255,o==61)return g;o=e[o]}while(h<p&&o==-1);if(o==-1)break;g+=String.fromCharCode((r&15)<<4|(o&60)>>2);do{if(i=t.charCodeAt(h++)&255,i==61)return g;i=e[i]}while(h<p&&i==-1);if(i==-1)break;g+=String.fromCharCode((o&3)<<6|i)}return g},this.utf16to8=function(t){var a,r,o,i;for(a="",o=t.length,r=0;r<o;r++)i=t.charCodeAt(r),i>=1&&i<=127?a+=t.charAt(r):i>2047?(a+=String.fromCharCode(224|i>>12&15),a+=String.fromCharCode(128|i>>6&63),a+=String.fromCharCode(128|i>>0&63)):(a+=String.fromCharCode(192|i>>6&31),a+=String.fromCharCode(128|i>>0&63));return a},this.utf8to16=function(t){var a,r,o,i,h,p;for(a="",o=t.length,r=0;r<o;)switch(i=t.charCodeAt(r++),i>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:a+=t.charAt(r-1);break;case 12:case 13:h=t.charCodeAt(r++),a+=String.fromCharCode((i&31)<<6|h&63);break;case 14:h=t.charCodeAt(r++),p=t.charCodeAt(r++),a+=String.fromCharCode((i&15)<<12|(h&63)<<6|(p&63)<<0);break}return a},this.charToHex=function(t){var a,r,o;for(a="",r=0;r<t.length;)o=t.charCodeAt(r++).toString(16),a+="\\0x"+o,a+=r>0&&r%8==0?`\r
6
- `:", ";return a}}function Da(){var n=0,e=new Object;this.add=function(t,a){this.containsKey(t)||n++,e[t]=a},this.getValue=function(t){return this.containsKey(t)?e[t]:null},this.remove=function(t){this.containsKey(t)&&delete e[t]&&n--},this.containsKey=function(t){return t in e},this.containsValue=function(t){for(var a in e)if(e[a]==t)return!0;return!1},this.getValues=function(){var t=[];for(var a in e)t.push(e[a]);return t},this.getKeys=function(){var t=[];for(var a in e)t.push(a);return t},this.getSize=function(){return n},this.clear=function(){n=0,e=new Object}}function Ma(n){if(this.connect=!1,this.ready_func_=null,this.callbacks_=new Da,this.module_="JS_IActiveXCtrl","WebSocket"in window)this.ws=new WebSocket("ws://127.0.0.1:7321");else throw"WebSocket not supported";this.ws.onerror=function(){throw"Unable to establish connection to WebSocket"},this.loadModule=function(){this.connect=!0;var e=JSON.stringify({MsgId:"LoadModule",Module:this.module_});this.ws.onmessage=this._callback.bind(this),this.ws.send(e)},this.loadModuleCallBack=function(e){if(!e)throw e.Response;this.ready_func_&&this.ready_func_()}.bind(this),this.callbacks_.add("LoadModule",this.loadModuleCallBack),this.exec=function(e,t,a){var r=Object.id(a).toString();this.callbacks_.add(r,a);var o={MsgId:r,Method:e+"|"+n};t&&(o.Param=JSON.stringify(t));var i=JSON.stringify(o);this.connect&&this.ws.send(i)},this.ready=function(e){this.ready_func_=e},this._callback=function(e){var t=JSON.parse(e.data),a=t.MsgId;if(this.callbacks_.containsKey(a)){var r=this.callbacks_.getValue(a);r(t.Result,t.Response),this.callbacks_.remove(a)}},this.ws.onopen=this.loadModule.bind(this),this.Arm_GetDongleInfo=function({Index:e,DongleInfoNum:t},a){this.exec("Arm_GetDongleInfo",[parseInt(e),parseInt(t)],a)},this.Arm_Enum=function(e){this.exec("Arm_Enum",null,e)},this.Arm_Open=function({Index:e},t){this.exec("Arm_Open",[parseInt(e)],t)},this.Arm_Close=function({Handle:e},t){this.exec("Arm_Close",[parseInt(e)],t)},this.Arm_VerifyPIN=function({Handle:e,UserPin:t,UserType:a},r){this.exec("Arm_VerifyPIN",[parseInt(e),a,t],r)},this.Arm_ResetState=function({Handle:e},t){this.exec("Arm_ResetState",[parseInt(e)],t)},this.Arm_GenRandom=function({Handle:e,RandomLen:t},a){this.exec("Arm_GenRandom",[parseInt(e),parseInt(t)],a)},this.Arm_LEDControl=function({Handle:e,LedFlag:t},a){this.exec("Arm_LEDControl",[parseInt(e),t],a)},this.Arm_SwitchProtocol=function({Handle:e,ProtocolFlag:t},a){this.exec("Arm_SwitchProtocol",[parseInt(e),t],a)},this.Arm_CreateFile=function({Handle:e,FileID:t,FileType:a,AttrBuffer:r},o){this.exec("Arm_CreateFile",[parseInt(e),a,parseInt(t),r],o)},this.Arm_WriteFile=function({Handle:e,FileID:t,FileType:a,FileOffset:r,DataInput:o},i){this.exec("Arm_WriteFile",[parseInt(e),a,parseInt(t),parseInt(r),o],i)},this.Arm_ReadFile0001=function({Handle:e},t){this.exec("Arm_ReadFile",[parseInt(e),parseInt("0001"),parseInt(0),parseInt("64")],t)},this.Arm_ReadFile0002=function({Handle:e},t){this.exec("Arm_ReadFile",[parseInt(e),parseInt("0002"),parseInt(0),parseInt("130")],t)},this.Arm_ReadFile0003=function({Handle:e},t){this.exec("Arm_ReadFile",[parseInt(e),parseInt("0003"),parseInt(0),parseInt("130")],t)},this.Arm_ReadFile0004=function({Handle:e},t){this.exec("Arm_ReadFile",[parseInt(e),parseInt("0004"),parseInt(0),parseInt("2048")],t)},this.Arm_ReadFile0005=function({Handle:e},t){this.exec("Arm_ReadFile",[parseInt(e),parseInt("0005"),parseInt(0),parseInt("2048")],t)},this.Arm_DownloadExeFile=function({Handle:e,Count:t,ExeFileInfo:a},r){this.exec("Arm_DownloadExeFile",[parseInt(e),parseInt(t),a],r)},this.Arm_RunExeFile=function({Handle:e,FileID:t,InData:a,DataLen:r},o){this.exec("Arm_RunExeFile",[parseInt(e),parseInt(t),a,a.length,parseInt(r)],o)},this.Arm_ReadRunExeFileData=function(e){this.exec("Arm_ReadRunExeFileData",null,e)},this.Arm_DeleteFile=function({Handle:e,FileID:t,FileType:a},r){this.exec("Arm_DeleteFile",[parseInt(e),a,parseInt(t)],r)},this.Arm_WriteData=function({Handle:e,Offset:t,DataInput:a},r){this.exec("Arm_WriteData",[parseInt(e),parseInt(t),a],r)},this.Arm_ReadData=function({Handle:e,Offset:t,ReadLength:a},r){this.exec("Arm_ReadData",[parseInt(e),parseInt(t),a],r)},this.Arm_WriteShareMemory=function({Handle:e,DataInput:t},a){this.exec("Arm_WriteShareMemory",[parseInt(e),t],a)},this.Arm_ReadShareMemory=function({Handle:e},t){this.exec("Arm_ReadShareMemory",[parseInt(e)],t)},this.Arm_GenUniqueKey=function({Handle:e,Seed:t},a){this.exec("Arm_GenUniqueKey",[parseInt(e),t.length,t],a)},this.Arm_ChangePIN=function({Handle:e,NewPIN:t,OldPIN:a,TryCount:r,PinFlag:o},i){this.exec("Arm_ChangePIN",[parseInt(e),o,a,t,parseInt(r)],i)},this.Arm_ResetUserPIN=function({Handle:e,AdminPIN:t},a){this.exec("Arm_ResetUserPIN",[parseInt(e),t],a)},this.Arm_SetUserID=function({Handle:e,UserID:t},a){this.exec("Arm_SetUserID",[parseInt(e),parseInt(t)],a)},this.Arm_GetDeadline=function({Handle:e},t){this.exec("Arm_GetDeadline",[parseInt(e)],t)},this.Arm_SetDeadline=function({Handle:e,SetDeadTime:t},a){this.exec("Arm_SetDeadline",[parseInt(e),parseInt(t)],a)},this.Arm_GetUTCTime=function({Handle:e},t){this.exec("Arm_GetUTCTime",[parseInt(e)],t)},this.Arm_RFS=function({Handle:e},t){this.exec("Arm_RFS",[parseInt(e)],t)},this.Arm_RsaGenPubPriKey=function({Handle:e,RsaFileId:t},a){this.exec("Arm_RsaGenPubPriKey",[parseInt(e),parseInt(t)],a)},this.Arm_EccGenPubPriKey=function({Handle:e,EccFileId:t},a){this.exec("Arm_EccGenPubPriKey",[parseInt(e),parseInt(t)],a)},this.Arm_Sm2GenPubPriKey=function({Handle:e,Sm2FileId:t},a){this.exec("Arm_Sm2GenPubPriKey",[parseInt(e),parseInt(t)],a)},this.Arm_ReadRsaPri=function(e){this.exec("Arm_ReadRsaPri",null,e)},this.Arm_ReadRsaPub=function(e){this.exec("Arm_ReadRsaPub",null,e)},this.Arm_ReadEccPri=function(e){this.exec("Arm_ReadEccPri",null,e)},this.Arm_ReadEccPub=function(e){this.exec("Arm_ReadEccPub",null,e)},this.Arm_ReadSm2Pri=function(e){this.exec("Arm_ReadSm2Pri",null,e)},this.Arm_ReadSm2Pub=function(e){this.exec("Arm_ReadSm2Pub",null,e)},this.Arm_RsaPri=function({Handle:e,RsaPri_Flag:t,RsaPriInData:a,RsaPriFileID:r,RsaPriFileSize:o},i){this.exec("Arm_RsaPri",[parseInt(e),parseInt(r),parseInt(o),t,a],i)},this.Arm_RsaPub=function({Handle:e,RsaPubKey:t,RsaPub_Flag:a,RsaPubInData:r,RsaPubFileSize:o},i){this.exec("Arm_RsaPub",[parseInt(e),parseInt(o),a,t,t.length,r],i)},this.Arm_EccSign=function({Handle:e,HashData:t,EccFileId:a},r){this.exec("Arm_EccSign",[parseInt(e),parseInt(a),t],r)},this.Arm_EccVerify=function({Handle:e,HashData:t,EccPubKey:a,EccSignData:r},o){this.exec("Arm_EccVerify",[parseInt(e),a,a.length,t,r],o)},this.Arm_Sm2Sign=function({Handle:e,HashData:t,Sm2FileId:a},r){this.exec("Arm_Sm2Sign",[parseInt(e),parseInt(a),t],r)},this.Arm_Sm2Verify=function({Handle:e,HashData:t,Sm2PubKey:a,Sm2SignData:r},o){this.exec("Arm_Sm2Verify",[parseInt(e),a,a.length,t,r],o)},this.Arm_TDES=function({Handle:e,Tdes_Flag:t,TdesFileID:a,TdesInData:r},o){this.exec("Arm_TDES",[parseInt(e),parseInt(a),t,r],o)},this.Arm_SM4=function({Handle:e,Sm4_Flag:t,Sm4FileID:a,Sm4InData:r},o){this.exec("Arm_SM4",[parseInt(e),parseInt(a),t,r],o)},this.Arm_HASH=function({Handle:e,Hash_Flag:t,HashInData:a},r){this.exec("Arm_HASH",[parseInt(e),t,a],r)},this.Arm_Seed=function({Handle:e,SeedData:t,SeedLength:a},r){this.exec("Arm_Seed",[parseInt(e),a,t],r)},this.Arm_LimitSeedCount=function({Handle:e,SeedCount:t},a){this.exec("Arm_LimitSeedCount",[parseInt(e),parseInt(t)],a)},this.Arm_GenMotherKey=function({Handle:e,SeedLen:t,SeedForPID:a,SonCount:r,StartUserID:o,AdminTryCount:i,UserPin:h,UserTryCount:p,UpdateRSAPriKey:g},K){this.exec("Arm_GenMotherKey",[parseInt(e),parseInt(t),a,h,parseInt(p),parseInt(i),g,parseInt(o),parseInt(r)],K)},this.Arm_RequestInit=function({Handle:e},t){this.exec("Arm_RequestInit",[parseInt(e)],t)},this.Arm_GetInitDataFromMother=function({Handle:e},t){this.exec("Arm_GetInitDataFromMother",[parseInt(e),Request],t)},this.Arm_InitSon=function({Handle:e,InitData:t},a){this.exec("Arm_InitSon",[parseInt(e),t],a)},this.Arm_SetUpdatePriKey=function({Handle:e,UpdatePriKey:t},a){this.exec("Arm_SetUpdatePriKey",[parseInt(e),t],a)},this.Arm_MakeUpdatePacket=function({Handle:e,HID:t,Func:a,FileID:r,FileType:o,Offset:i,DataLen:h,DataBuffer:p,UpRSAPubKey:g},K){this.exec("Arm_MakeUpdatePacket",[parseInt(e),t,a,o,parseInt(r),parseInt(i),p,g,parseInt(h)],K)},this.Arm_MakeUpdatePacketFromMother=function({Handle:e,HID:t,Func:a,FileID:r,FileType:o,Offset:i,DataLen:h,DataBuffer:p},g){this.exec("Arm_MakeUpdatePacketFromMother",[parseInt(e),t,a,o,parseInt(r),parseInt(i),p,parseInt(h)],g)},this.Arm_Update=function({Handle:e,UpdateData:t},a){this.exec("Arm_Update",[parseInt(e),t],a)},this.Arm_Set_DATA_FILE_ATTR=function({Size:e,ReadPriv:t,WritePriv:a},r){this.exec("Arm_Set_DATA_FILE_ATTR",[parseInt(e),parseInt(t),parseInt(a)],r)},this.Arm_Set_PRIKEY_FILE_ATTR=function({Count:e,Size:t,Type:a,Priv:r,IsReset:o,IsDecOnRAM:i},h){this.exec("Arm_Set_PRIKEY_FILE_ATTR",[a,parseInt(t),parseInt(e),parseInt(r),parseInt(i),parseInt(o)],h)},this.Arm_Set_KEY_FILE_ATTR=function({Size:e,PrivEnc:t},a){this.exec("Arm_Set_KEY_FILE_ATTR",[parseInt(e),parseInt(t)],a)},this.Arm_Set_EXE_FILE_ATTR=function({FileLen:e,PrivExe:t},a){this.exec("Arm_Set_EXE_FILE_ATTR",[parseInt(e),parseInt(t)],a)},this.Arm_Set_DATA_LIC=function({ReadPriv:e,WritePriv:t},a){this.exec("Arm_Set_DATA_LIC",[parseInt(e),parseInt(t)],a)},this.Arm_Set_PRIKEY_LIC=function({Count:e,Priv:t,IsReset:a,IsDecOnRAM:r},o){this.exec("Arm_Set_PRIKEY_LIC",[parseInt(e),parseInt(t),parseInt(r),parseInt(a)],o)},this.Arm_Set_KEY_LIC=function({PrivEnc:e},t){this.exec("Arm_Set_KEY_LIC",[parseInt(e)],t)},this.Arm_Set_EXE_LIC=function({PrivExe:e},t){this.exec("Arm_Set_EXE_LIC",[parseInt(e)],t)},this.Arm_Set_EXE_FILE_INFO=function({FileID:e,FileData:t,FileSize:a,InBuffer:r,CallLimit:o},i){this.exec("Arm_Set_EXE_FILE_INFO",[r,parseInt(a),parseInt(e),parseInt(o),t,t.length],i)},this.Arm_Clear_EXE_FILE_INFO=function({InBuffer:e},t){this.exec("Arm_Clear_EXE_FILE_INFO",[e],t)}}const Oa={HID:0},be={PRODUCT_ID:0,USER_ID:1,HARDWARE_ID:2},Qe={USER:0};class yt{constructor(){ce(this,"Base64",new ka);ce(this,"AtlCtrl",null);ce(this,"ArmCount",0);ce(this,"ArmIndex",0);ce(this,"ArmHandle",0);ce(this,"ArmRandom","");try{this.AtlCtrl=new Ma("{39E9B272-82A7-4177-A19D-6723C1BDB0CC}")}catch(e){console.error(e),this.AtlCtrl=null}}armEnum(){if(this.AtlCtrl)return new Promise((e,t)=>{this.AtlCtrl.Arm_Enum((a,r)=>{a?(this.ArmCount=+r,e(r)):t(r)})})}armOpen(e=0){if(this.AtlCtrl)return this.ArmIndex=e,new Promise((t,a)=>{this.AtlCtrl.Arm_Open({Index:e},(r,o)=>{r?(this.ArmHandle=+o,t(o)):(this.ArmHandle=o,a(o))})})}armClose(e=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,a)=>{this.AtlCtrl.Arm_Close({Handle:e},(r,o)=>{r?t(o):a(o)})})}armChangePIN(e,t,a=255,r=Qe.USER,o=this.ArmHandle){if(this.AtlCtrl)return new Promise((i,h)=>{this.AtlCtrl.Arm_ChangePIN({Handle:o,NewPIN:e,OldPIN:t,TryCount:a,PinFlag:r},(p,g)=>{p&&g==0?(this.ArmPin=e,i(g)):h(g)})})}armGenRandom(e=16,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((a,r)=>{this.AtlCtrl.Arm_GenRandom({Handle:t,RandomLen:e},(o,i)=>{o?(this.ArmRandom=i,a(i)):r(i)})})}armGetDeadline(e=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,a)=>{this.AtlCtrl.Arm_GetDeadline({Handle:e},(r,o)=>{r?(this.ArmDeadline=o,t(o)):a(o)})})}armGenUniqueKey(e="MTIzNDU2Nzg5MA==",t=this.ArmHandle){if(this.AtlCtrl)return new Promise((a,r)=>{this.AtlCtrl.Arm_GenUniqueKey({Handle:t,Seed:e},(o,i)=>{o?(this.ArmUKey=i,a(i)):r(i)})})}armGetDongleInfo(e=0,t=be.HARDWARE_ID){if(this.AtlCtrl)return this.ArmIndex=e,new Promise((a,r)=>{this.AtlCtrl.Arm_GetDongleInfo({Index:e,DongleInfoNum:t},(o,i)=>{if(o){switch(t){case be.USER_ID:this.ArmUid=i;break;case be.PRODUCT_ID:this.ArmPid=i;break;case be.HARDWARE_ID:this.ArmHid=i;break}a(i)}else r(i)})})}armLEDControl(e,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((a,r)=>{this.AtlCtrl.Arm_LEDControl({Handle:t,LedFlag:e},(o,i)=>{o&&i==0?a(i):r(i)})})}armRFS(e=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,a)=>{this.AtlCtrl.Arm_RFS({Handle:e},(r,o)=>{r&&o==0?t(o):a(o)})})}armReadFile(e="0001",t=this.ArmHandle){if(this.AtlCtrl)return new Promise((a,r)=>{this.AtlCtrl[`Arm_ReadFile${e}`]({Handle:t},(o,i)=>{if(o&&i.length>0)try{i=this.Base64.decode(i),a(i)}catch(h){console.error(h),a(i)}else r(i)})})}armResetState(e=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,a)=>{this.AtlCtrl.Arm_ResetState({Handle:e},(r,o)=>{r&&o==0?t(o):a(o)})})}armResetUserPIN(e,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((a,r)=>{this.AtlCtrl.Arm_ResetUserPIN({Handle:t,AdminPIN:e},(o,i)=>{o&&i==0?a(i):r(i)})})}armSetUserID(e,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((a,r)=>{this.AtlCtrl.Arm_SetUserID({Handle:t,UserID:e},(o,i)=>{o&&i==0?a(i):r(i)})})}armSetDeadline(e,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((a,r)=>{this.AtlCtrl.Arm_SetDeadline({Handle:t,SetDeadTime:e},(o,i)=>{o&&i==0?a(i):r(i)})})}armSwitchProtocol(e=Oa.HID,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((a,r)=>{this.AtlCtrl.Arm_SwitchProtocol({Handle:t,ProtocolFlag:e},(o,i)=>{o&&i==0?a(i):r(i)})})}armVerifyPIN(e,t=Qe.USER,a=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,o)=>{this.AtlCtrl.Arm_VerifyPIN({Handle:a,UserPin:e,UserType:t},(i,h)=>{i&&h==0?(this.ArmPin=e,r(h)):o(h)})})}armReadData(e=0,t=128,a=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,o)=>{this.AtlCtrl.Arm_ReadData({Handle:a,Offset:e,ReadLength:t},(i,h)=>{i?(this.ArmData=h,r(h)):o(h)})})}armWriteData(e,t=0,a=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,o)=>{this.AtlCtrl.Arm_WriteData({Handle:a,Offset:t,DataInput:e},(i,h)=>{i&&h==0?r(h):o(h)})})}armReadShareMemory(e=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,a)=>{this.AtlCtrl.Arm_ReadShareMemory({Handle:e},(r,o)=>{r?(this.ArmData=o,t(o)):a(o)})})}armWriteShareMemory(e,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((a,r)=>{this.AtlCtrl.Arm_WriteShareMemory({Handle:t,DataInput:e},(o,i)=>{o&&i==0?a(i):r(i)})})}}const Et="0123456789abcdeffedcba9876543210",It="4b0de988570c3a0f",La=window.ENCRYPT;let ge=La&&new yt;function Tt(n=16,e="0123456789abcdefghijklmnopqrstuvwxyz"){let t="",a=e.length;for(;n>0;)t+=e[Math.floor(Math.random()*a)],n--;return t}function St(){return J(this,null,function*(){return ge||(ge=new yt),new Promise((n,e)=>{ge.armEnum().then(t=>{n(+t)}).catch(t=>{X.ElMessage({type:"warning",ElMessage:"未找到U盘锁,请检查U盘锁!"}),e(t)})})})}Ne.throttle(()=>J(exports,null,function*(){const n=yield St(),e={};if(typeof n!="number"||n<=0)X.ElMessage({type:"warning",ElMessage:"未找到U盘锁,请检查U盘锁!"}),e.resetToken();else{const t=yield Ua();if(!e.token)return;t.length?t.includes(e.ukeyHid)||(X.ElMessage({type:"error",ElMessage:"U盘锁不匹配,请检查U盘锁!"}),e.resetToken()):(X.ElMessage({type:"warning",ElMessage:"未找到U盘锁,请检查U盘锁!"}),e.resetToken())}}),5e3,{trailing:!1});function Fa(n=0){return J(this,null,function*(){return ge?new Promise((e,t)=>{ge.armGetDongleInfo(n).then(a=>{a?e(a):(X.ElMessage({type:"warning",ElMessage:"U盘锁信息为空,请检查U盘锁!"}),t(a))}).catch(a=>{t(a)})}):X.ElMessage({type:"warning",ElMessage:"未找到U盘锁程序,请检查后台程序!"})})}function Ua(){return J(this,null,function*(){if(!ge)return X.ElMessage({type:"warning",ElMessage:"未找到U盘锁程序,请检查后台程序!"});const n=yield St();let e=[];for(let t=0;t<n;t++){const a=yield Fa(t);e.push(a)}return e})}Tt(16);Tt(16);const bt=window.meta.app.inspect?me.SM4.constants.CBC:me.SM4.constants.ECB,{publicKey:yn,privateKey:En}=me.SM2.generateKeyPair();function Ga(n,e,t={}){const a=Ct(It),r=t.mode||bt;t=r===me.SM4.constants.ECB?l({mode:r,inputEncoding:"utf8",outputEncoding:"hex"},t):l({iv:Et,mode:r,inputEncoding:"utf8",outputEncoding:"hex"},t);let o="";try{o=me.SM4.encrypt(n,a,t)}catch(i){console.log("err: ",i)}return o}function Va(n,e,t={}){const a=Ct(It),r=t.mode||bt;return t=r===me.SM4.constants.ECB?l({mode:r,inputEncoding:"hex",outputEncoding:"utf8"},t):l({iv:Et,mode:r,inputEncoding:"hex",outputEncoding:"utf8"},t),me.SM4.decrypt(n,a,t)}function Ct(n){return[...n].map(e=>e.charCodeAt().toString(16)).join("")}function Ce(n){return n=vt&&He(n)?Va(n):n,He(n)?JSON.parse(n):n}function Je(n){return n=vt&&He(n)?Ga(n):n,JSON.stringify(n)}function pe(n,e,t,a){const r=new StorageEvent("storage",{url:window.location.href,key:n,oldValue:e,newValue:t,storageArea:a});window.dispatchEvent(r)}const Ze={getLocal:n=>{try{const e=window.localStorage.getItem(n);return Ce(e)}catch(e){console.error(e)}},setLocal:(n,e)=>{try{const t=window.localStorage.getItem(n),a=Je(e);window.localStorage.setItem(n,a),pe(n,t,a,window.localStorage)}catch(t){console.error(t)}},eachLocal:n=>{if(!n||Ve(n)!=="Function")return console.error("传递参数非函数类型!");for(let e=0,t=window.localStorage.length;e<t;e++){const a=window.localStorage.key(e);n((void 0).getLocal(a),a)}},clearLocal:()=>{window.localStorage.clear(),pe(null,null,null,window.localStorage)},removeLocal:n=>{const e=window.localStorage.getItem(n);window.localStorage.removeItem(n),pe(n,e,null,window.localStorage)},getSession:n=>{try{const e=window.sessionStorage.getItem(n);return Ce(e)}catch(e){console.error(e)}},setSession:(n,e)=>{try{const t=window.sessionStorage.getItem(n),a=Je(e);window.sessionStorage.setItem(n,a),pe(n,t,a,window.sessionStorage)}catch(t){console.error(t)}},eachSession:n=>{if(!n||Ve(n)!=="Function")return console.error("传递参数非函数类型!");for(let e=0,t=window.sessionStorage.length;e<t;e++){const a=window.sessionStorage.key(e);n((void 0).getSession(a),a)}},clearSession:()=>{window.sessionStorage.clear(),pe(null,null,null,window.sessionStorage)},removeSession:n=>{const e=window.sessionStorage.getItem(n);window.sessionStorage.removeItem(n),pe(n,e,null,window.sessionStorage)},onStorageChange:n=>{if(!n||Ve(n)!=="Function")return console.error("传递参数非函数类型!");const e=t=>{n({url:t.url,key:t.key,newValue:t.newValue?Ce(t.newValue):null,oldValue:t.oldValue?Ce(t.oldValue):null,storageArea:t.storageArea})};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}},et=n=>{const{quality:e,value:t,function_id:a}=n;return(e>>7&1)===1||e===0&&a===2&&t===1},tt="USER_TOKEN",at="STATION_ID",Ba=[{key:0,value:"离线"},{key:1,value:"在线"}],Ha=[{key:0,value:"反向"},{key:1,value:"正向"},{key:2,value:"停止"}],Wa=[{key:1,value:1},{key:2,value:2},{key:3,value:3},{key:4,value:4},{key:5,value:5}],Ka="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1753954524851'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1506'%20width='256'%20height='256'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M888.65792%20280.15616a46.80704%2046.80704%200%200%200-46.80704-46.80704H233.34912a46.80704%2046.80704%200%200%200-46.80704%2046.80704v93.61408h702.11584V280.15616zM186.54208%20420.5824v374.46144a46.80704%2046.80704%200%200%200%2046.80704%2046.80704h608.49664a46.80704%2046.80704%200%200%200%2046.80704-46.80704V420.5824H186.54208z%20m442.9056%2084.98688l30.92992%2011.47904c-15.62624%2024.23808-35.39968%2050.38592-50.70848%2067.6096l-25.51296-10.84416c15.31392-17.85856%2034.7648-46.56128%2045.29152-68.24448z%20m-184.64768-1.59744c17.54112%2020.09088%2038.26688%2047.5136%2047.5136%2065.37728l-25.51296%2015.62624c-8.61184-17.85856-28.70272-46.23872-45.92128-67.28704l23.92064-13.71648z%20m199.95136%20267.2384h-45.28128c-32.20992%200-39.86432-8.92928-39.86432-39.86432v-102.36416h-46.23872c-5.73952%2069.8368-21.6832%20121.18528-101.0944%20149.56544-3.5072-7.97184-11.47904-19.456-18.49344-25.51296%2072.07424-22.9632%2083.87072-66.01728%2088.65792-124.05248H399.19616v-28.70272h122.7776V483.88096h30.92992v116.39808h122.46016v28.70272h-85.7856v102.04672c0%2010.5216%201.90976%2012.11904%2013.71136%2012.11904h38.90176c8.92928%200%2010.84416-4.1472%2011.8016-28.38016%206.69696%204.78208%2019.12832%209.56928%2027.42272%2011.47904-3.49696%2035.39968-11.4688%2044.96384-36.66432%2044.96384z'%20fill='%23005CFF'%20p-id='1507'%3e%3c/path%3e%3c/svg%3e",de=window.meta.graph.penFormMap?window.meta.graph.penFormMap:{NORMAL:[{name:"颜色",key:"color",type:"color",dataIds:{}}],TEXT:[{name:"显示内容",key:"text",type:"text",dataIds:{}}],AUDIO:[{name:"颜色",key:"color",type:"color",dataIds:{}}],MP4:[{name:"颜色",key:"color",type:"color",dataIds:{}}],CAMERA:[{name:"颜色",key:"color",type:"color",dataIds:{}}],VIDEO_STREAM:[{name:"颜色",key:"color",type:"color",dataIds:{}}],LIGHT_PLATE:[{name:"光字牌",key:"light_plate",type:"select",dataIds:{},options:[{label:"离线",value:-1},{label:"正常",value:0},{label:"预警",value:1},{label:"一般",value:2},{label:"严重",value:3},{label:"危急",value:4}]}]},xt=window.meta.graph.lightPlateColorMap?window.meta.graph.lightPlateColorMap:{0:"#00d200",1:"#e2ac06",2:"#fa800a",3:"#f04155",4:"#ff0000"},Nt=window.meta.graph.lightPlateTextMap?window.meta.graph.lightPlateTextMap:{0:"#fff",1:"#fff",2:"#fff",3:"#fff",4:"#fff"},U={form:[{name:"带电状态",key:"charged_state",type:"select",dataIds:{},options:Ba.map(n=>({label:n.value,value:n.key}))},{name:"潮流方向",key:"electric_direction",type:"select",dataIds:{},options:Ha.map(n=>({label:n.value,value:n.key}))},{name:"电荷大小",key:"electric_size",type:"select",dataIds:{},options:Wa.map(n=>({label:n.value,value:n.key}))}],anchors:[{x:0,y:.5,id:"0"},{x:.5,y:0,id:"1"},{x:1,y:.5,id:"2"},{x:.5,y:1,id:"3"}],dataType:window.dataType,dataProp:window.dataProp,visibleLevel:window.visibleLevel},f=P(l({penType:S.NORMAL},U),{form:[...de[S.NORMAL],...U.form]});F.YX,F.YX,F.YX,S.POINT_VALUE,U.anchors,window.visibleLevel,U.form,U.form,window.dataType,window.dataProp,window.visibleLevel,U.form,window.dataType,window.dataProp,window.visibleLevel,U.form,window.dataType,window.dataProp,window.visibleLevel,Nt[0],S.LIGHT_PLATE,xt[0],U.anchors,window.visibleLevel,[...de[S.LIGHT_PLATE],...U.form],xe+"",S.SENSOR,U.anchors,window.visibleLevel,[...de[S.LIGHT_PLATE],...U.form],P(l({width:100,height:30,name:"text",penName:"文本",text:"文本",disableAnchor:!0,penType:S.TEXT},U),{form:[...de[S.TEXT],...U.form]}),l({width:100,height:100,name:"square",penName:"正方形"},f),P(l({type:1,name:"line",width:100,height:5,lineWidth:2,lineName:"line",penName:"line",background:"#FFF000",color:"#FFF000"},f),{lineAnimateType:1,anchors:[{x:0,y:.5,id:"0"},{x:1,y:.5,id:"1"}]}),l({width:200,height:50,borderRadius:0,name:"rectangle",penName:"矩形"},f),l({width:100,height:100,name:"circle",penName:"圆"},f),l({width:100,height:100,name:"triangle",penName:"三角形"},f),l({width:100,height:100,name:"diamond",penName:"菱形"},f),l({width:100,height:100,name:"pentagon",penName:"五边形"},f),l({width:100,height:100,name:"hexagon",penName:"六边形"},f),l({width:100,height:100,name:"pentagram",penName:"五角星"},f),l({width:120,height:60,name:"leftArrow",penName:"左箭头"},f),l({width:120,height:60,penName:"右箭头",name:"rightArrow"},f),l({width:150,height:60,name:"twowayArrow",penName:"双向箭头"},f),l({width:100,height:100,name:"cloud",penName:"云"},f),l({textTop:-.1,width:100,height:100,name:"message",penName:"消息框"},f),l({width:80,height:100,name:"file",penName:"文件"},f),P(l({width:60,height:100,name:"cube",penName:"立方体",z:.25},f),{props:{custom:[{key:"z",label:"Z",type:"number",min:0,placeholder:"<= 1 即宽度的比例"},{key:"backgroundFront",label:"前背景色",type:"color"},{key:"backgroundUp",label:"顶背景色",type:"color"},{key:"backgroundRight",label:"右背景色",type:"color"}]}}),l({width:70,height:100,name:"people",penName:"人"},f),P(l({name:"rectangle",penName:"按钮",width:80,height:30,borderRadius:.2,text:"按钮",background:"#1890ff",color:"#1890ff",textColor:"#fff",activeBackground:"#40a9ff",activeColor:"#40a9ff",activeTextColor:"#fff",hoverBackground:"#40a9ff",hoverColor:"#40a9ff",hoverTextColor:"#fff"},f),{penType:S.BUTTON}),P(l({name:"rectangle",penName:"输入框",height:50,width:200,input:!0,borderRadius:.05,ellipsis:!0,text:"输入数据",textAlign:"left",color:"#D9D9D9FF",textColor:"#000000FF",hoverTextColor:"#000000FF",activeTextColor:"#000000FF",textLeft:10},f),{penType:S.INPUT}),P(l({name:"rectangle",penName:"选择器",height:50,width:200,borderRadius:.05,ellipsis:!0,text:"选项1",textAlign:"left",color:"#D9D9D9FF",textColor:"#000000FF",hoverTextColor:"#000000FF",activeTextColor:"#000000FF",textLeft:10,dropdownList:[{text:"选项1"},{text:"选项2"},{text:"选项3"}]},f),{penType:S.SELECT}),P(l({name:"slider",penName:"进度条",width:300,height:30,value:10,textWidth:50,barHeight:4,fontSize:20,min:0,max:100,color:"#1890ff",background:"#D4D6D9",textColor:"#222",unit:"%"},f),{penType:S.SLIDER}),P(l({name:"time",penName:"时间",width:300,height:40,text:`${Yt().format("YYYY-MM-DD HH:mm:ss")}`,lineWidth:0,fontSize:20,interval:67,fillZero:!0},f),{penType:S.TIME,form:[{key:"timeFormat",name:"显示格式",type:"text"},{key:"fillZero",name:"是否补0",type:"switch"},...f.form],timeFormat:"`${year}-${month}-${day} ${hours}:${minutes}:${seconds} 星期${week}`"}),P(l({name:"switch",penName:"开关",height:30,width:60,checked:!1,offColor:"#BFBFBF",onColor:"#1890ff",disableOffColor:"#E5E5E5",disableOnColor:"#A3D3FF",locked:0},f),{penType:S.SWITCH}),P(l({name:"radio",penName:"单选框",direction:"horizontal",width:150,height:30,checked:"",options:[{text:"选项一"},{text:"选项二"},{text:"选项三",isForbidden:!0}]},f),{penType:S.RADIO}),P(l({name:"checkbox",penName:"多选框",width:30,height:30,checked:!0,value:"选项一"},f),{penType:S.CHECKBOX}),P(l({name:"table2",penName:"表格",width:80,height:30,datable:!0,disableAnchor:!0,colWidth:90,rowHeight:32,bordered:!0,vLine:!0,hLine:!0,stripe:!1,hasHeader:!0,color:"#333",textColor:"#444"},f),{penType:S.TABLE,replaceMode:2,data:[["设备 ID","设备名称","数据协议","级别"],["1","200","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["2","湿度传感器","MQTT",{text:"二级告警",background:"#4d2a02",textColor:"#E6A82EFF"}],["3","物联网设备","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["4","物联网设备/智能家居/智慧城市","MQTT",{text:"三级告警",textColor:"#58CC84FF",background:"#042617;"}]],styles:[{row:0,textColor:"#000"}]}),P(l({name:"table2",penName:"斑马纹表格",width:80,height:30,datable:!0,disableAnchor:!0,colWidth:90,rowHeight:32,bordered:!0,vLine:!0,hLine:!0,stripe:!0,hasHeader:!0,color:"#333",textColor:"#444"},f),{penType:S.TABLE,replaceMode:2,data:[["设备 ID","设备名称","数据协议","级别"],["1","200","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["2","湿度传感器","MQTT",{text:"二级告警",background:"#4d2a02",textColor:"#E6A82EFF"}],["3","物联网设备","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["4","物联网设备/智能家居/智慧城市","MQTT",{text:"三级告警",textColor:"#58CC84FF",background:"#042617;"}]],styles:[{row:0,textColor:"#000"}]}),P(l({name:"table2",penName:"滚动表格",width:80,height:30,datable:!0,disableAnchor:!0,colWidth:90,rowHeight:32,bordered:!0,vLine:!0,hLine:!0,stripe:!1,swiper:!0,maxNum:5,hasHeader:!0,color:"#333",textColor:"#444"},f),{penType:S.TABLE,replaceMode:2,data:[["设备 ID","设备名称","数据协议","级别"],["1","200","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["2","湿度传感器","MQTT",{text:"二级告警",background:"#4d2a02",textColor:"#E6A82EFF"}],["3","物联网设备","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["4","智慧城市","MQTT",{text:"三级告警",textColor:"#58CC84FF",background:"#042617;"}],["5","智能家居","MQTT",{text:"三级告警",textColor:"#58CC84FF",background:"#042617;"}]],styles:[{row:0,textColor:"#000"}]}),P(l({name:"svg",width:100,height:100,image:xe+"/icon/audio.svg",audioId:"",penName:"音频",datable:!0,penType:S.AUDIO},U),{form:[...de[S.AUDIO],...U.form],events:[{name:"enter",action:Ie.Emit,value:Z.OPEN_AUDIO,where:{type:""},params:JSON.stringify({action:Z.OPEN_AUDIO,data:""})},{name:"leave",action:Ie.Emit,value:Z.CLOSE_AUDIO,where:{type:""},params:JSON.stringify({action:Z.CLOSE_AUDIO,data:""})}]}),P(l({name:"svg",width:100,height:100,image:xe+"/icon/camera.svg",cameraId:"",penName:"摄像机",datable:!0,events:[{name:"enter",action:Ie.Emit,value:Z.OPEN_CAMERA,where:{type:""},params:JSON.stringify({action:Z.OPEN_CAMERA,data:""})},{name:"leave",action:Ie.Emit,value:Z.CLOSE_CAMERA,where:{type:""},params:JSON.stringify({action:Z.CLOSE_CAMERA,data:""})}],penType:S.CAMERA},U),{form:[...de[S.CAMERA],...U.form]}),P(l({name:"video",width:100,height:100,video:"https://video.699pic.com/videos/17/69/11/a_aa3jeKZ0D63g1556176911_10s.mp4",autoPlay:!0,penName:"MP4",penType:S.MP4},U),{form:[...de[S.MP4],...U.form]}),P(l({name:"video",width:100,height:100,penName:"视频流",datable:!0,video:"https://video.699pic.com/videos/17/69/11/a_aa3jeKZ0D63g1556176911_10s.mp4",autoPlay:!0,penType:S.VIDEO_STREAM},U),{form:[...de[S.VIDEO_STREAM],...U.form]}),l({text:"开始/结束",width:120,height:40,borderRadius:.5,name:"rectangle",penName:"开始/结束"},f),l({text:"流程",width:120,height:40,name:"rectangle",penName:"流程"},f),l({text:"判定",width:120,height:60,name:"diamond",penName:"判定"},f),l({text:"数据",width:120,height:50,name:"flowData",penName:"数据",offsetX:.14},f),l({text:"准备",width:120,height:50,name:"hexagon",penName:"准备"},f),l({text:"子流程",width:120,height:50,name:"flowSubprocess",penName:"子流程"},f),l({text:"数据库",width:80,height:120,name:"flowDb",penName:"数据库"},f),l({text:"文档",width:120,height:100,name:"flowDocument",penName:"文档"},f),l({text:"内部存储",width:120,height:80,name:"flowInternalStorage",penName:"内部存储"},f),l({text:"外部存储",width:120,height:80,name:"flowExternStorage",penName:"外部存储"},f),l({text:"队列",width:100,height:100,name:"flowQueue",penName:"队列"},f),l({text:"手动输入",width:120,height:80,name:"flowManually",penName:"手动输入"},f),l({text:"展示",width:120,height:80,name:"flowDisplay",penName:"展示"},f),l({text:"并行模式",width:120,height:50,name:"flowParallel",penName:"并行模式"},f),l({text:"注释",width:100,height:100,name:"flowComment",penName:"注释"},f),l({text:"",width:30,height:30,name:"circle",penName:"开始",background:"#555",lineWidth:0},f),l({width:30,height:30,name:"activityFinal",penName:"结束"},f),l({text:"活动",width:120,height:50,borderRadius:.25,name:"rectangle",penName:"活动"},f),l({text:"决策/合并",width:120,height:50,name:"diamond",penName:"决策/合并"},f),l({text:"垂直泳道",width:200,height:500,name:"swimlaneV",penName:"垂直泳道",textBaseline:"top",textTop:20,lineTop:.08},f),l({text:"水平泳道",width:500,height:200,name:"swimlaneH",penName:"水平泳道",textWidth:.01,textLeft:.04,textAlign:"left",lineLeft:.08},f),l({text:"垂直分岔/汇合",width:10,height:150,name:"forkV",penName:"垂直分岔/汇合",fillStyle:"#555",strokeStyle:"transparent"},f),l({text:"水平分岔/汇合",width:150,height:10,name:"forkH",penName:"水平分岔/汇合",fillStyle:"#555",strokeStyle:"transparent"},f),l({name:"andGate",penName:"与门",width:100,height:150},f),l({name:"basicEvent",penName:"基本事件",width:100,height:150},f),l({name:"unexpandedEvent",penName:"未展开事件",width:100,height:150},f),l({name:"priorityAndGate",penName:"优先AND门",width:100,height:150},f),l({name:"forbiddenGate",penName:"禁止门",width:100,height:150},f),l({name:"event",penName:"事件",width:100,height:150},f),l({name:"switchEvent",penName:"开关事件",width:100,height:150},f),l({name:"conditionalEvent",penName:"条件事件",width:150,height:100},f),l({name:"transferSymbol",penName:"转移符号",width:100,height:150},f),l({name:"orGate",penName:"或门",width:100,height:150},f),l({name:"xorGate",penName:"异或门",width:100,height:150},f),l({name:"votingGate",penName:"表决门",width:100,height:150},f);const Ya=(n,e={isDev:!1,devServerUrl:"",devServerPort:8443})=>(n=n.replace(/(https?:\/\/)(\b(?:\d{1,3}\.){3}\d{1,3}\b)(:(\d+))?/,`$1${e.isDev?e.devServerUrl:ra}:${e.isDev?e.devServerPort:oa}`),e.isDev?n:n.replace("/baseUrl","")),Re=(n,e)=>{const t=n.__vccOpts||n;for(const[a,r]of e)t[a]=r;return t},$a={class:"props-panel__title"},qa={class:"props-panel__value"},za={class:"value-left"},ja={class:"props-panel__value-num"},Xa={class:"value-right"},Qa=Object.assign({name:"PropsPanle"},{__name:"PropsPanle",props:{data:{type:Object,default:null}},emits:["close","enter","view-history"],setup(n,{emit:e}){const t=n,a=e;function r(p){return p==null||p==="—"?"—":typeof p=="number"?p.toFixed(2):p}const o=()=>{a("close")},i=()=>{a("enter")},h=()=>{a("view-history",t.data)};return(p,g)=>{var ee,te;const K=c.resolveComponent("el-button");return c.openBlock(),c.createElementBlock("div",{class:"props-panel",onMouseleave:o,onMouseover:i},[c.createElementVNode("div",$a,c.toDisplayString(((ee=t==null?void 0:t.data)==null?void 0:ee.name)||"—"),1),g[2]||(g[2]=c.createElementVNode("div",{class:"props-panel__label"},"脉冲峰值",-1)),c.createElementVNode("div",qa,[c.createElementVNode("div",za,[c.createElementVNode("span",ja,c.toDisplayString(r((te=t==null?void 0:t.data)==null?void 0:te.value)),1),g[0]||(g[0]=c.createElementVNode("span",{class:"props-panel__unit"},"dBm",-1))]),c.createElementVNode("div",Xa,[c.createVNode(K,{type:"primary",onClick:h},{default:c.withCtx(()=>[...g[1]||(g[1]=[c.createTextVNode("查看历史",-1)])]),_:1})])])],32)}}}),Ja=Re(Qa,[["__scopeId","data-v-62308838"]]);class Za{constructor(e){ce(this,"editor");this.editor=e}initPlugin(e,t,a={}){e.installPenPlugins({name:t},[{plugin:__$t__.mindBoxPlugin,options:a},{plugin:qt.collapseChildPlugin,options:a}])}}function en(n,e){var j,Y;const t=e||new Path2D,{x:a,y:r,width:o,height:i}=n.calculative.worldRect,h=a+o/2,p=r+i/2,g=o/2,K=(j=n.startAngle)!=null?j:0,ee=(Y=n.endAngle)!=null?Y:2*Math.PI;if(t.arc(h,p,g,K,ee,!0),t instanceof Path2D)return t}function tn(n,e){const t=e||new Path2D,{x:a,y:r,width:o,height:i}=n.calculative.worldRect;if(t.rect(a,r,o,i),t instanceof Path2D)return t}function an(n,e){const t=n||new Path2D,a=e.dimensionData;if(!a)return t;const r=e.calculative.worldRect,o=N=>({x:r.x+N.x*r.width,y:r.y+N.y*r.height}),i=o(a.tp1),h=o(a.tp2),p=o(a.dimStart),g=o(a.dimEnd),K=e.calculative.fontSize||12;n&&n.beginPath&&(n.save(),n.beginPath(),n.strokeStyle=e.color||"#000",n.lineWidth=e.calculative.lineWidth||1);const ee=Math.max(5,K*.4),te=p.x-i.x,j=p.y-i.y,Y=Math.hypot(te,j)||1,R=p.x+te/Y*ee,se=p.y+j/Y*ee,re=g.x-h.x,le=g.y-h.y,_=Math.hypot(re,le)||1,x=g.x+re/_*ee,$=g.y+le/_*ee;t.moveTo(i.x,i.y),t.lineTo(R,se),t.moveTo(h.x,h.y),t.lineTo(x,$),t.moveTo(p.x,p.y),t.lineTo(g.x,g.y);const q=Math.hypot(g.x-p.x,g.y-p.y),L=Math.min(10,q/2.1),y=(N,D)=>{if(L<1)return;const V=Math.atan2(D.y-N.y,D.x-N.x),M=Math.PI/6,B=D.x-L*Math.cos(V-M),H=D.y-L*Math.sin(V-M),ie=D.x-L*Math.cos(V+M),oe=D.y-L*Math.sin(V+M);t.moveTo(D.x,D.y),t.lineTo(B,H),t.lineTo(ie,oe),t.closePath()};if(y(g,p),y(p,g),n&&n.stroke&&(n.stroke(),n.restore()),n&&n.fillText&&a.text){n.save(),n.fillStyle=e.textColor||e.color||"#000",n.textAlign="center",n.textBaseline="bottom";let N=K;n.font=`${e.fontStyle||""} ${e.fontWeight||""} ${N}px ${e.fontFamily||"Arial"}`;const D=n.measureText(a.text),V=q*.9;if(D.width>V&&V>0){const ie=V/D.width;N=N*ie,n.font=`${e.fontStyle||""} ${e.fontWeight||""} ${N}px ${e.fontFamily||"Arial"}`}const M=(p.x+g.x)/2,B=(p.y+g.y)/2;let H=Math.atan2(g.y-p.y,g.x-p.x);(H>Math.PI/2||H<-Math.PI/2)&&(H+=Math.PI),n.translate(M,B),n.rotate(H),n.fillText(a.text,0,-N*.2),n.restore()}if(t instanceof Path2D)return t}function nn(){return J(this,null,function*(){yield meta2d.register({arc:en,mtext:tn}),yield meta2d.registerCanvasDraw({dimension:an})})}const rn="original_meta2d";function on(){return localStorage.removeItem(rn)}let ve={};const sn=n=>{const e=document.querySelectorAll("video");let t=null;if(e.forEach(r=>{r.getAttribute("src")===n.video&&(t=r)}),!t)return;t.setAttribute("muted","muted"),t.setAttribute("autoplay","autoplay"),t.setAttribute("loop","loop"),t.setAttribute("crossorigin",""),t.setAttribute("controls",""),t.style.display="none",t.parentElement.style.border="2px solid #ffc878";const a=new JessibucaPro({container:t.parentElement,background:"",hasControl:!1,controlAutoHide:!0,checkFirstIFrame:!0,debug:!1,decoder:"./wasm/decoder-pro.js",forceNoOffscreen:!0,hotKey:!1,hasAudio:!1,hasVideo:!0,hiddenAutoPause:!1,isFlv:!0,isResize:!1,isNotMute:!0,loadingIcon:!0,loadingText:"加载中...",networkDelayTimeoutReplay:!1,playbackForwardMaxRateDecodeIFrame:8,showBandwidth:!1,showPerformance:!1,syncAudioAndVideo:!0,supportDblclickFullscreen:!1,timeout:10,useMSE:!0,useWCS:!1,useSIMD:!0,useVideoRender:!0,useCanvasRender:!1,videoBuffer:.2,videoBufferDelay:1});return n.autoPlay&&n.streamUrl&&a.play(n.streamUrl),ve[n.id]=a,a},ln=()=>{Object.keys(ve).forEach(n=>{ve[n].destroy(),ve[n]=null}),ve={}},cn={class:"sy-empty"},dn={key:1,class:"sy-empty-picture"},un={class:"sy-empty-description"},hn=Object.assign({name:"SyEmpty"},{__name:"index",props:{image:{type:String,default:"empty"},imageSize:{type:Number,default:80},description:{type:String,default:"暂无数据"},onlyText:{type:Boolean,default:!1}},setup(n){c.useCssVars(r=>({a7383bac:a.value.width,v736d2d7a:a.value.height}));const e=n,t=c.computed(()=>({"font-size":e.imageSize?`${e.imageSize}px`:"80px"})),a=c.computed(()=>e.imageSize?{width:e.imageSize*1.2+"px",height:e.imageSize+"px"}:{width:"187px",height:"144px"});return(r,o)=>{const i=c.resolveComponent("SyIcon"),h=c.resolveComponent("el-icon");return c.openBlock(),c.createElementBlock("div",cn,[n.image!=="empty"?(c.openBlock(),c.createElementBlock("span",{key:0,class:"sy-empty-image",style:c.normalizeStyle(t.value)},[n.image!=="loading"?(c.openBlock(),c.createBlock(i,{key:0,name:n.image,gradient:""},null,8,["name"])):(c.openBlock(),c.createBlock(h,{key:1,class:"is-loading",style:{color:"#1671d4"}},{default:c.withCtx(()=>[c.createVNode(c.unref(Qt.Loading))]),_:1}))],4)):n.onlyText?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("span",dn)),c.createElementVNode("div",un,[c.createElementVNode("p",null,c.toDisplayString(n.description),1)])])}}}),mn=Re(hn,[["__scopeId","data-v-247a0fc9"]]),fn=Object.assign({name:"Meta2dEditor"},{__name:"index",props:{url:{type:String,default:""},data:{type:Object,default:()=>{}},local:{type:Boolean,default:!1},preview:{type:Boolean,default:!1},devConfig:{type:Object,default:()=>({isDev:!1,devServerUrl:"",devServerPort:8443})}},emits:["loaded","load-error"],setup(n,{expose:e,emit:t}){const a=t,r=n,o=c.ref(null),i=c.shallowRef(),h=c.computed(()=>!!(r.data||r.url));c.watch(()=>[r.data,r.url],()=>{h.value&&g()});let p=c.ref(!0);function g(){return J(this,null,function*(){try{if(p.value=!0,yield c.nextTick(),!o.value){console.error("未找到meta2d元素!");return}let _=null;if(r.data?_=r.data:r.url&&(_=yield re()),!_||!_.data){p.value=!1,console.log("图纸数据为空"),a("load-error");return}const x=_.options||{background:"#eee",disableAnchor:!1};if(i.value&&(i.value.destroy(!0),i.value=null),!o.value){console.error("Meta2D 容器元素不可用");return}i.value=new G.Meta2d(o.value,l({},x)),x.visibleLevel&&i.value.scale(x.visibleLevel),K(),ee(),yield te(_.data),i.value.render(),Y(),setTimeout(()=>{window.meta2dTools&&window.registerToolsNew()},1e3),a("loaded",i.value)}catch(_){console.error("初始化编辑器失败:",_)}})}function K(){if(!i.value)return;new Za({}).initPlugin(i.value,"mindNode",{})}function ee(){nn(),G.register(jt.classPens()),G.register($e.flowPens()),G.registerAnchors($e.flowAnchors()),G.register(qe.sequencePens()),G.registerCanvasDraw(qe.sequencePensbyCtx()),G.register(ze.activityDiagram()),G.registerCanvasDraw(ze.activityDiagramByCtx()),G.registerCanvasDraw(zt.formPens()),G.registerCanvasDraw(Xt.chartsPens()),G.register(Oe.ftaPens()),G.registerAnchors(Oe.ftaAnchors()),G.registerCanvasDraw(Oe.ftaPensbyCtx())}function te(_){var x;if(i.value){if(typeof _.locked=="undefined"&&(_.locked=0),_.bkImage&&i.value.setBackgroundImage(_.bkImage),_.pens&&_.pens.length>0){const $=[];_.pens.forEach(y=>{y.name==="video"&&y.streamUrl?$.push(y):y.name==="image"&&y.image?y.image=Ya(y.image,r.devConfig):y.lineType==="gisLine"?y.visible=!r.preview:y.penType===S.TABLE&&y.dataType?j(y):y.penType===S.GIS_SENSOR_WRAPPER&&r.preview&&(y.title="")}),$.length>0&&setTimeout(()=>{$.forEach(y=>{sn(y)})},500);const q=window.meta.graph.penCountThreshold||2e3;_.pens.length>q&&_.scale&&_.pens.forEach(y=>{const N=y.visibleLevel;N!==void 0?(y.visible=_.scale>=N,y.visible||(y.disabled=!0,y.locked=G.LockState.Disable)):(y.visible=!0,y.disabled=!1,y.locked=G.LockState.None)})}i.value.open(_),!r.preview&&((x=_.networks)!=null&&x.length)&&i.value.closeNetwork()}}const j=_=>J(this,null,function*(){var $;const x=yield ue.getCommonApi(ta[_.dataType],{offset:0,limit:_.tableSize||10});if(($=x.data)!=null&&$.length){const q=_.tableHeader||[{prop:"id",label:"ID"},{prop:"guid",label:"标识"},{prop:"name",label:"名称"}],L=x.data.map(y=>q.filter(N=>N.isShow).map(N=>{const D=y[N.prop];return N.choices?N.choices[D]||D:Ne.isObject(D)?D.name:D}));i.value.setValue({id:_.id,dataY:L})}else i.value.setValue({id:_.id,dataY:[]})}),Y=()=>{i.value&&(i.value.on("scale",R),r.preview||i.value.on("connectLine",se))},R=Ne.debounce(_=>{var x,$,q,L;try{if(!i.value)return;Be.emit("graph-scale",_);let y=i.value.store.data.pens;const N=window.meta.graph.penCountThreshold||2e3,D=y.length>N;for(let V=0;V<y.length;V++){const M=y[V];if([S.VIDEO_STREAM,S.MP4].includes(M.penType)){if((($=(x=fe.videos[M.id])==null?void 0:x.children)==null?void 0:$.length)===3){let B=fe.videos[M.id].children[0],H=fe.videos[M.id].children[2];B.style.width=H.currentTime/H.duration*M.calculative.worldRect.width+"px"}else if(((L=(q=fe.videos[M.id])==null?void 0:q.children)==null?void 0:L.length)===2){let B=fe.videos[M.id].children[0],H=fe.videos[M.id].children[1];B.style.width=H.currentTime/H.duration*M.calculative.worldRect.width+"px"}}if(D){const B=M.visibleLevel!==void 0?_>=M.visibleLevel:!0;i.value._setValue({id:M.id,visible:B,disabled:!B,locked:B?G.LockState.None:G.LockState.Disable})}}i.value.render()}catch(y){console.error("处理缩放失败:",y)}},500),se=q=>J(this,[q],function*({line:_,lineAnchor:x,pen:$}){var oe;if(x!=null&&x.start||($==null?void 0:$.penType)!==S.GIS_SENSOR)return;const L=(oe=_==null?void 0:_.calculative)==null?void 0:oe.worldAnchors;if(L.length!==2||L!=null&&L.some(ae=>!ae.connectTo))return;const[y,N]=L;if(y.connectTo===N.connectTo)return;const D=window.meta2d.findOne(y.connectTo),V=window.meta2d.findOne(N.connectTo);let M=D==null?void 0:D.bindData,B=V==null?void 0:V.bindData;if(!M||!B)return;const H=yield ue.postPDApi("setchannelpaired/",{data:[{channel1:M.guid,channel2:B.guid}]}),ie=yield ue.postCommonApi("sgpoint",{ln__in:`${M.guid},${B.guid}`,group_number__in:6});H.success&&ie.success?(i.value.setValue({id:_.id,color:"#00d200",lineDash:[3,3],lineWidth:2,lineType:"gisLine"}),X.ElMessage.success("配对成功")):X.ElMessage.error("配对失败",H.detail||ie.detail)});function re(){return J(this,null,function*(){if(!r.url)return X.ElMessage.error("图纸路径为空!"),null;try{return(yield ue.getGraphApi(r.url,{local:r.local}))||null}catch(_){return null}})}const le=()=>{i.value&&(i.value.resize(),i.value.fitView(!0,10))};return c.onMounted(()=>{var _,x;h.value&&(_=o.value)!=null&&_.clientHeight&&(x=o.value)!=null&&x.clientWidth&&g(),window.addEventListener("resize",le)}),c.onUnmounted(()=>{ln(),on(),i.value&&(r.preview?(_t.clearLineCross(),i.value.destroy(!0)):i.value.off("scale",R)),window.removeEventListener("resize",le)}),e({stage:i}),(_,x)=>(c.openBlock(),c.createElementBlock("div",{ref_key:"meta2dRef",ref:o,class:"meta2d-editor"},[c.unref(p)?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(mn,{key:0,class:"meta2d-empty",description:"图纸不存在"}))],512))}}),pn=Re(fn,[["__scopeId","data-v-f157e247"]]),An={key:0,class:"back-btn"};var At,gt;const gn=Object.assign({name:"Meta2dPreview"},{__name:"index",props:{url:{type:String,default:""},gid:{type:String,default:""},data:{type:Object,default:null},local:{type:Boolean,default:!1},lang:{type:String,default:((gt=(At=window.meta)==null?void 0:At.app)==null?void 0:gt.lang)||"zh-cn"},config:{type:Object,default:()=>({socketUrl:Xe,stationIdKey:at,enableToken:!0,userTokenKey:tt,userToken:void 0,messageDelay:200,debounceDelay:100,enableAutoFit:!0,enableWebSocket:!0,graphSocket:je.GRAPH.SOCKET})},showMap:{type:Boolean,default:!1},isFactory:{type:Boolean,default:!1},isInitData:{type:Boolean,default:!0},apiInstance:{type:Object,default:()=>ue},mittInstance:{type:Object,default:()=>Be},customCallbacks:{type:Object,default:()=>({})},errorHandler:{type:Object,default:()=>({callback:null,showMessage:!0})},devConfig:{type:Object,default:()=>({isDev:!1,devServerUrl:"",devServerPort:8443})}},emits:["error","loaded","custom-msg","socket-msg","view-history"],setup(n,{expose:e,emit:t}){const a=t,r=n;let o=c.ref(!1),i=c.ref(""),h=c.ref(""),p=c.ref(!1);const g=c.ref(null),K=c.ref(null),ee=c.ref(null),te=c.ref(""),j=c.ref(""),Y=c.ref(!1),R=c.computed(()=>{var s;return(s=ee.value)==null?void 0:s.stage}),se=c.computed(()=>{var s;return(s=R.value)==null?void 0:s.store}),re=c.computed(()=>l({socketUrl:Xe,stationIdKey:at,enableToken:!0,userTokenKey:tt,userToken:void 0,messageDelay:200,debounceDelay:100,enableAutoFit:!0,fitPadding:10,enableWebSocket:!0,graphSocket:je.GRAPH.SOCKET},r.config)),le=()=>r.apiInstance||ue,_=()=>r.mittInstance||Be,x=(s,d="")=>{const w={error:s,message:d,timestamp:new Date().toISOString()};a("error",w),r.errorHandler.callback?r.errorHandler.callback(w):r.errorHandler.showMessage&&X.ElMessage&&X.ElMessage.error(`${d}: ${s.message||s}`)},$=()=>{i.value?(j.value=i.value,Y.value=p.value):h.value&&(te.value=h.value,we(te.value)),o.value=!1},q={},L=c.ref(!1),y=c.ref({left:0,top:0}),N=c.ref(!1),D=()=>{N.value=!1,L.value=!1,y.value={left:0,top:0},oe.value={}},V=()=>{N.value=!0},M=s=>{a("view-history",s)},B=(s,d)=>{if(!g.value)return{left:s+20,top:d+20};const w=g.value.getBoundingClientRect(),C=s-w.left,k=d-w.top;let T=300,I=150;if(K.value){const v=K.value.$el||K.value;v&&v.offsetWidth&&(T=v.offsetWidth,I=v.offsetHeight)}let m=C+20,E=k+20;return m+T>w.width&&(m=C-T-20),E+I>w.height&&(E=k-I-20),{left:Math.max(0,Math.min(m,w.width-T)),top:Math.max(0,Math.min(E,w.height-I))}},H=s=>{L.value&&(y.value.left||(y.value=B(s.clientX,s.clientY)))},ie=s=>{var d,w,C,k,T,I;try{if(!s)return;if((d=s==null?void 0:s.includes)!=null&&d.call(s,"token 必传"))return X.ElMessage.warning(s);const m=typeof s=="string"?JSON.parse(s):s;if((m==null?void 0:m.data)==="服务错误"||(C=(w=m==null?void 0:m.data)==null?void 0:w.includes)!=null&&C.call(w,"token is expired"))return X.ElMessage.warning(m.data);switch(a("socket-msg",m),m.action){case Le.ACPOINT.YCVALUE:case Le.ACPOINT.YXVALUE:if((k=m==null?void 0:m.data)!=null&&k.point_id){const E=R.value.find(m.data.point_id);E&&(q[m.data.point_id]=m.action===Le.ACPOINT.YXVALUE?Se(m.data.value)?m.data.value:0:Se(m.data.value_disp||m.data.value)?m.data.value_disp||m.data.value:0,Ee(E,m.data))}break;default:if(((T=m.data)==null?void 0:T.length)>0){const E=setTimeout(()=>{clearTimeout(E),R.value&&(m.data.forEach(v=>{q[v.dataId||v.point_id]=v.value_disp||v.value}),m.data.forEach(v=>{const b=R.value.find(v.dataId||v.point_id);Ee(b,v)}))},re.value.messageDelay);r.customCallbacks.onWebSocketMessage&&r.customCallbacks.onWebSocketMessage(m),(I=window.customSocketFn)==null||I.call(window,s)}break}return!0}catch(m){return x(m,"WebSocket消息处理"),!0}},oe=c.ref({});let ae={},_e=null;const Pt=s=>J(this,null,function*(){try{if(s.msgName)switch(s.msgName){case Z.CHANGE_GRAPH:case Z.NOTIFY_DIALOG:case Z.GIS_PROPS_PANEL:We(s);break}else We(s);a("custom-msg",s),r.customCallbacks.onCustomMessage&&r.customCallbacks.onCustomMessage(s)}catch(d){x(d,"自定义消息处理")}}),We=s=>{var C,k;let d;if(s.params)try{d=JSON.parse(s.params)}catch(T){d=s.params}switch(s.msgName){case Z.CHANGE_GRAPH:(d==null?void 0:d.data)!=="图纸id"&&(d!=null&&d.data)?(i.value=j.value,p.value=Y.value,o.value=d.isBack,(C=d==null?void 0:d.data)!=null&&C.startsWith("/")?(j.value=d==null?void 0:d.data,Y.value=!0):(Y.value=!1,h.value=we(d.data))):d?(Y.value=!1,h.value=te.value,o.value=!0,we(d)):console.warn("切换图纸信息为空");break;case Z.NOTIFY_DIALOG:d.msg!=="通知内容"?X.ElNotification(l({message:d.msg},d)):console.warn("通知内容为空");break;case Z.GIS_PROPS_PANEL:s.eventName==="enter"?(L.value=!0,s.pen.penType===S.GIS_SENSOR?oe.value=((k=s==null?void 0:s.pen)==null?void 0:k.bindData)||{}:s.pen.penType===S.GIS_SENSOR_WRAPPER&&s.pen.children.forEach(T=>{const I=R.value.findOne(T);I&&I.penType===S.GIS_SENSOR&&(oe.value=I.bindData||{})}),s.e&&(y.value=B(s.e.clientX,s.e.clientY))):setTimeout(()=>{N.value||(L.value=!1,y.value={left:0,top:0},oe.value={})},200);break}},Rt=s=>{var d,w,C,k,T,I,m,E,v;try{a("loaded",s);const b=Ge(),u=re.value,A=Ze.getSession(u.stationIdKey),z=Ze.getSession(u.userTokenKey);u.enableWebSocket&&A&&z&&((C=(w=(d=s.store)==null?void 0:d.data)==null?void 0:w.networks)!=null&&C.length?(I=(T=(k=s.store)==null?void 0:k.data)==null?void 0:T.networks)==null||I.forEach(Q=>{var he;Q.protocol==="websocket"&&((he=Q.url)!=null&&he.includes("station_id")||(Q.url=`${Q.url}?station_id=${A}`),u.enableToken?Q.protocols=u.userToken||z:Q.protocols=void 0)}):(E=(m=s.store)==null?void 0:m.data)!=null&&E.websocket?((v=s.store.data.websocket)!=null&&v.includes("station_id")||(s.store.data.websocket=`${s.store.data.websocket}?station_id=${A}`),u.enableToken?s.store.data.websocketProtocols=u.userToken||z:s.store.data.websocketProtocols=void 0,s.closeSocket(),s.connectSocket()):(s.store.data.websocket=`${u.socketUrl}?station_id=${A}`,u.enableToken?s.store.data.websocketProtocols=z:s.store.data.websocketProtocols=void 0,s.connectWebsocket())),(r.showMap||b.showMap==="true")&&s.showMap(),s.setRule({rule:!1}),s.setOptions({disableRuleLine:!0}),s.setGrid({grid:!1}),s.lock(G.LockState.DisableEdit),De().forEach(Q=>{var he;(he=Q==null?void 0:Q.events)!=null&&he.length?W({id:Q.id,locked:1},!1):W({id:Q.id,locked:10},!1)}),s.render(),u.enableAutoFit&&s.fitView(!0,u.fitPadding),Object.values(Z).forEach(Q=>{s.on(Q,he=>Pt(P(l({},he),{msgName:Q})))}),s&&(s.socketFn=ie),r.customCallbacks.onStageLoaded&&r.customCallbacks.onStageLoaded(s),r.isInitData&&kt(s),window.addEventListener("mousemove",H)}catch(b){x(b,"图纸加载完成处理")}},we=Ne.throttle(s=>J(this,null,function*(){var d;try{if(window.isFactory=r.isFactory,r.url){Y.value=r.local,yield ke(r.url);return}const w=Ge();if(s=s||r.gid||w.id,w.local==="true"&&(Y.value=!0),s){const C=le();if(C&&C.getCommonApi){const k=yield C.getCommonApi(r.isFactory?"graph":"floorplan",{guid:s});if((d=k.data)!=null&&d.length)yield ke(k.data[0].path);else{const T="未找到图纸!";x(new Error(T),"获取图纸数据")}}else x(new Error("API实例不可用"),"初始化图纸数据!")}else Y.value=r.local,yield ke(r.url);r.customCallbacks.onGraphLoaded&&r.customCallbacks.onGraphLoaded(j.value)}catch(w){x(w,"获取图纸数据失败")}})),ke=s=>J(this,null,function*(){const d=s.split(".");if(s.includes(r.lang)||d.length!==3){j.value=s;return}const w=`${d[0]}.${r.lang}.${d[2]}`;try{const C=yield ue.getGraphApi(w,{local:r.local}).catch(()=>{console.warn("多语言图纸不存在,使用默认图纸")});j.value=C?w:s}catch(C){j.value=s}}),kt=s=>J(this,null,function*(){var d,w,C,k;if(s){let T=[],I=[],m=[];ae={};const E=s.store.data.pens;for(let b=0;b<E.length;b++){const u=E[b];u.bindDataId?(d=u.form)!=null&&d.length?u.form.forEach(A=>{if(A.dataIds.dataId)switch(A.dataIds.dataType){case F.YC:T.push(P(l({},A),{nodeName:A.dataIds.name,penId:u.id,penName:u.penName}));break;case F.YX:I.push(P(l({},A),{nodeName:A.dataIds.name,penId:u.id,penName:u.penName}));break;case F.SG:I.push(P(l({},A),{nodeName:A.dataIds.name,penId:u.id,penName:u.penName}));break;case F.POINT:m.push(P(l({},A),{nodeName:A.dataIds.name,penId:u.id,penName:u.penName}));break}}):(u.penType===S.GIS_SENSOR||u.penType===S.GIS_DB_VALUE)&&u.bindData&&(ae[u.bindData.ied_id]||(ae[u.bindData.ied_id]=[]),W({id:u.id,title:void 0}),ae[u.bindData.ied_id].push(l({penId:u.id,penType:u.penType},u.bindData))):(w=u.statusBindData)!=null&&w.length&&u.statusBindData.forEach(A=>{if(A.dataId)switch(A.dataType){case F.YX:I.push({showChild:0,value:0,nodeName:A.dataName,penId:u.id,penName:u.penName,dataId:A.dataId});break;case F.SG:I.push({showChild:0,value:0,nodeName:A.dataName,penId:u.id,penName:u.penName,dataId:A.dataId});break}})}let v=[];if(T.length){const b=le();if(b&&b.postCommonApi){const u=yield b.postCommonApi("queryrealtimepoint",{point_id:T.map(A=>{var z;return((z=A==null?void 0:A.dataIds)==null?void 0:z.dataId)||A.dataId}).join(",")});(C=u==null?void 0:u.data)!=null&&C.length&&(u.data.forEach(A=>{q[A.guid]=A.value_disp||A.value}),v=[...v,...u.data])}}if(I.length){const b=le();if(b&&b.postCommonApi){const u=yield b.postCommonApi("queryrealtimepoint",{point_id:I.map(A=>{var z;return((z=A==null?void 0:A.dataIds)==null?void 0:z.dataId)||A.dataId}).join(",")});(k=u==null?void 0:u.data)!=null&&k.length&&(u.data.forEach(A=>{q[A.guid]=Ue(A.value)?Number(A.value):A.value}),v=[...v,...u.data])}}v.length&&v.forEach(b=>{const u=s.find(b.guid);Ee(u,P(l({},b),{value:Ue(b.value)?Se(Number(b.value))?Number(b.value):0:b.value,value_disp:b.value_disp,alarm_value:b.alarm_value,point_id:b.guid}))}),ae&&Object.keys(ae).length?(_e&&clearInterval(_e),Ke(),_e=setInterval(()=>{Ke()},3e3)):_e&&clearInterval(_e)}}),Ke=()=>J(this,null,function*(){var s;if(ae){const d=Object.keys(ae);if(d.length){const w=yield ue.postPDApi("querychannelstatus/",{data:d.map(C=>({ied_id:C,ln_list:ae[C].map(k=>k.ln_id)}))});(s=w==null?void 0:w.data)!=null&&s.length&&(d.forEach(C=>{const k=w.data.find(I=>I.ied_id===C),T=ae[C];T!=null&&T.length&&T.forEach(I=>{const m=k.result.find(E=>E.ln_id===I.ln_id);if(m){const E=Ue(m.amp_peak)?Se(Number(m.amp_peak))?Number(m.amp_peak):0:m.amp_peak;I.penType===S.GIS_SENSOR?W({id:I.penId,showChild:m.status==="告警"?2:m.status==="正常"?1:0,bindData:P(l({},I),{status:m.status,value:E})},!1):W({id:I.penId,text:`${E} dBm`},!1)}})}),R.value.render())}}}),W=(s,d=!0)=>{if(R.value)return R.value.setValue(s,{render:d})},Dt=()=>R.value,De=()=>{var s,d;return((d=(s=se.value)==null?void 0:s.data)==null?void 0:d.pens)||[]},Mt=()=>S,Ee=(()=>{let s=null;const d=new Map,w=new Map,C=T=>{var m;if(!((m=T.children)!=null&&m.length))return[];const I=T.id||"";if(!I)return[];if(!w.has(I)&&se.value){const E=G.getAllChildren(T,se.value);w.set(I,E)}return w.get(I)||[]},k=()=>{if(d.size===0||!R.value||!se.value)return;const T=[],I=[],m=se.value.animates;d.forEach(({pen:E,dataItem:v,formKey:b})=>{switch(b){case"showChild":W({id:E.id,showChild:+v.value},!1);break;case"text":W({id:E.id,text:v.value_disp||v.value},!1);break;case"light_plate":{const u=v.value===-1||et(v)?"#999999":Nt[v.value!==void 0?v.value:v.alarm_value],A=v.value===-1||et(v)?"#cccccc":xt[v.value!==void 0?v.value:v.alarm_value];W({id:E.id,textColor:u,background:A},!1)}break;case"point_value":E.penType===S.POINT_VALUE&&C(E).forEach(A=>{A.name==="text"&&W({id:A.id,text:v.value},!1)});break;case"online_state":{let u=v.value?void 0:"contrast(0%)";W({id:E.id,filter:u},!1),C(E).forEach(z=>{W({id:z.id,filter:u},!1)})}break;case"charged_state":{const u=v.value===Jt.OFFLINE?"contrast(0%)":void 0;u!==E.filter&&(W({id:E.id,filter:u},!1),C(E).forEach(z=>{W({id:z.id,filter:u},!1)}))}break;case"electric_direction":v.value===Zt.STOP?m!=null&&m.has(E)&&I.push(E):!!v.value!==E.animateReverse&&(W({id:E.id,animateReverse:!!v.value},!1),m!=null&&m.has(E)||T.push(E));break;case"electric_size":{const u=ea[v.value];u!==void 0&&u!==E.lineWidth&&W({id:E.id,lineWidth:u},!1)}break;default:W({id:E.id,[b]:v.value},!1);break}}),I.length>0&&R.value.stopAnimate(I),T.length>0&&R.value.startAnimate(T),d.clear(),R.value.render()};return(T,I)=>{T!=null&&T.length&&(T.forEach(m=>{var v;const E=m.form;if((v=m.statusBindData)!=null&&v.length){if(!q[I.guid])return;const b=[...m.statusBindData],u=b.findIndex(A=>A.dataId===I.guid);if(u!==-1){const A=b[u];b.find(ne=>A.sort<ne.sort&&q[ne.dataId])||d.set(m.id,{pen:m,formKey:"showChild",dataItem:P(l({},I),{value:u})})}}else E!=null&&E.length&&E.forEach(b=>{if(!(Array.isArray(b.dataIds)?b.dataIds:[b.dataIds]).some(ne=>(ne==null?void 0:ne.dataId)&&((ne==null?void 0:ne.dataId)===I.dataId||(ne==null?void 0:ne.dataId)===I.point_id)))return;const z=`${m.id}-${b.key}`;d.set(z,{pen:m,dataItem:I,formKey:b.key})})}),s&&clearTimeout(s),s=setTimeout(()=>{k(),s=null},re.value.debounceDelay))}})(),Ot=s=>{if(R.value){for(let d=0;d<s.length;d++){const w=s[d];q[w.dataId||w.point_id]=w.value_disp||w.value;const C=R.value.find(w.dataId);setTimeout(()=>{Ee(C,w)},re.value.messageDelay)}R.value.render(),r.customCallbacks.onBatchUpdate&&r.customCallbacks.onBatchUpdate(s)}},Lt=(s,d=!1)=>{if(!R.value)return;const w=De();for(let C=0;C<w.length;C++){const k=w[C];let T=!1;d?T=s===k.dataProp:T=s===5?!0:k.dataProp<=s,W({id:k.id,visible:T},!1)}R.value.fitView(),R.value.render(),r.customCallbacks.onLevelChange&&r.customCallbacks.onLevelChange(s,d)};return c.watch(()=>[r.gid,r.url,r.data,r.lang,r.local,r.isFactory],()=>{we()}),c.watch(()=>r.showMap,s=>{R.value&&(s?R.value.showMap():R.value.hideMap())}),c.onMounted(()=>{const s=_();s&&s.on&&s.on(re.value.graphSocket,ie);const d=Ge();te.value=r.gid||d.id,we()}),c.onUnmounted(()=>{ae=null;const s=_();s&&s.off&&s.off(re.value.graphSocket,ie),window.removeEventListener("mousemove",H)}),e({setValue:W,getStage:Dt,getAllPens:De,getCustomPenType:Mt,batchUpdatePen:Ot,handleLineCross:_t.handleLineCross,changeVisibleByLevel:Lt}),(s,d)=>(c.openBlock(),c.createElementBlock("div",{ref_key:"previewRef",ref:g,class:"meta2d-preview"},[c.createVNode(pn,{ref_key:"graphRef",ref:ee,url:j.value,local:Y.value,data:r.data,"dev-config":r.devConfig,preview:"",onLoaded:Rt},null,8,["url","local","data","dev-config"]),c.unref(o)?(c.openBlock(),c.createElementBlock("div",An,[c.createVNode(c.unref(X.ElButton),{type:"primary",onClick:$},{default:c.withCtx(()=>[...d[0]||(d[0]=[c.createTextVNode("返回",-1)])]),_:1})])):c.createCommentVNode("",!0),L.value?(c.openBlock(),c.createBlock(Ja,{key:1,ref_key:"panelRef",ref:K,data:oe.value,style:c.normalizeStyle({top:y.value.top+"px",left:y.value.left+"px",position:"absolute"}),onClose:D,onEnter:V,onViewHistory:M},null,8,["data","style"])):c.createCommentVNode("",!0)],512))}}),ye=Re(gn,[["__scopeId","data-v-3c3d18e7"]]);ye.name||(ye.name="SyGraph");const _n=n=>{n.component(ye.name||"SyGraph",ye)},wn={install:_n};exports.SyGraph=ye;exports.default=wn;
5
+ */Object.defineProperty(Pe,"__esModule",{value:!0});var Ae=typeof window!="undefined"?window.proxy||window:{},_t=function(n){Ae!=null&&Ae.__POWERED_BY_QIANKUN__&&(window.moudleQiankunAppLifeCycles||(window.moudleQiankunAppLifeCycles={}),Ae.qiankunName&&(window.moudleQiankunAppLifeCycles[Ae.qiankunName]=n))};Pe.default=_t;var Fe=Pe.qiankunWindow=Ae;Pe.renderWithQiankun=_t;function aa(){return window.__POWERED_BY_WUJIE__||window.$wujie?Te.WUJIE:window.__POWERED_BY_QIANKUN__||Fe!=null&&Fe.__POWERED_BY_QIANKUN__?Te.QIANKUN:window.__MICRO_APP_ENVIRONMENT__||window.microApp?Te.MICROAPP:Te.NONE}const xe="/",vt=window.meta.app.encrypt;aa();const na=location.protocol==="https:",ra=location.hostname,ia=na?"wss:":"ws:",oa=location.port,sa=location.origin,Xe=`${ia}//${location.host}/ws`;var nt,rt,it,ot,st,lt,ct,dt,ut,ht,mt,ft;(rt=(nt=window.meta)==null?void 0:nt.graph)!=null&&rt.savePath,(ot=(it=window.meta)==null?void 0:it.graph)!=null&&ot.graphPenPath,(lt=(st=window.meta)==null?void 0:st.graph)!=null&&lt.templatePath,(dt=(ct=window.meta)==null?void 0:ct.graph)!=null&&dt.graphImgUploadPath,(ht=(ut=window.meta)==null?void 0:ut.graph)!=null&&ht.threeSavePath,(ft=(mt=window.meta)==null?void 0:mt.graph)!=null&&ft.threeModelPath;var pt;const O=Wt.create({baseURL:sa,timeout:((pt=window.meta.axios)==null?void 0:pt.timeout)||6e4,withCredentials:!1,paramsSerializer:n=>Ht.stringify(n)});O.interceptors.request.use(n=>(n.headers["x-token"]="ewoglCJhbGcilDogpc3",n),n=>Promise.reject(n));O.interceptors.response.use(n=>{const{data:e}=n;return Promise.resolve(e)},n=>Promise.reject(n));function la(n,e={},t={}){return new Promise(a=>{O.get(n,l({params:e},t)).then(r=>a({res:r,err:null})).catch(r=>a({res:null,err:r}))})}function ca(n,e={},t={}){return new Promise(a=>{O.post(n,e,t).then(r=>a({res:r,err:null})).catch(r=>a({res:null,err:r}))})}function da(n,e={},t={}){return O.get(n,l({params:e},t))}function ua(n,e={},t={}){return O.post(n,e,t)}function ha(n,e={}){return O.get(`/filehandle/${n}`,{params:e})}function ma(n,e={},t={}){return O.post(`/filehandle/${n}`,e,t)}function fa(n,e={}){return O.get(`/user/${n}`,{params:e})}function pa(n,e={},t={}){return O.post(`/user/${n}`,e,t)}function Aa(n,e={}){return O.get(`${n}`,e.local?{params:e,baseURL:xe}:{params:e})}function ga(n,e={}){return O.get(`/media/${n}/`,{params:e})}function wa(n,e={},t={}){return O.post(`/media/${n}/`,e,t)}function _a(n,e={}){return O.get(`/${window.meta.app.isFactory?window.meta.factory.singo_prefix||"acproxy/common":"common"}/${n}/`,{params:e})}function va(n,e={},t={}){return O.post(`/${window.meta.app.isFactory?window.meta.factory.singo_prefix||"acproxy/common":"common"}/${n}/`,e,t)}function ya(n,e={}){return O.get(`/history/${n}`,{params:e})}function Ea(n,e={},t={}){return O.post(`/history/${n}`,e,t)}function Ia(n,e={}){return O.get(`/scada/${n}`,{params:e})}function Ta(n,e={},t={}){return O.post(`/scada/${n}`,e,t)}function Sa(n,e={}){return O.get(`/common/factory/${n}`,{params:e})}function ba(n,e={},t={}){return O.post(`/common/factory/${n}`,e,t)}function Ca(n,e={}){return O.get(`/factory/${n}`,{params:e})}function xa(n,e={},t={}){return O.post(`/factory/${n}`,e,t)}function Na(n,e={}){return O.get(`/pd/${n}`,{params:e})}function Pa(n,e={},t={}){return O.post(`/pd/${n}`,e,t)}const ue={getApi:la,postApi:ca,getFileApi:ha,postFileApi:ma,getBaseApi:da,postBaseApi:ua,getUserApi:fa,postUserApi:pa,getGraphApi:Aa,getMediaApi:ga,postMediaApi:wa,getScadaApi:Ia,postScadaApi:Ta,getCommonApi:_a,postCommonApi:va,getHistoryApi:ya,postHistoryApi:Ea,getFactoryApi:Ca,postFactoryApi:xa,getCommonFactoryApi:Sa,postCommonFactoryApi:ba,getPDApi:Na,postPDApi:Pa},Be=Kt(),Ra=[65535,-99999];function Ue(n){if(typeof n!="string")return!1;const e=/^-?\d+(\.\d+)?$/;return n.trim()!==""&&e.test(n.trim())}function He(n){return!["null","undefined"].includes(n)&&n!==void 0&&n!==null&&n!==""}function Se(n){return typeof n=="number"&&!Ra.includes(n)}const Ge=()=>{var a;const n={},e=((a=window.location.href.split("?"))==null?void 0:a[1])||"",t=new URLSearchParams(e);for(const[r,o]of t.entries())n[r]=o;return n};function Ve(n){return Object.prototype.toString.call(n).slice(8,-1)}(function(){if(typeof Object.id=="undefined"){var n=0;Object.id=function(e){return typeof e.__uniqueid=="undefined"&&Object.defineProperty(e,"__uniqueid",{value:++n,enumerable:!1,writable:!1}),e.__uniqueid}}})();function ka(){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1];this.encode=function(t){var a,r,o,i,h,p;for(o=t.length,r=0,a="";r<o;){if(i=t.charCodeAt(r++)&255,r==o){a+=n.charAt(i>>2),a+=n.charAt((i&3)<<4),a+="==";break}if(h=t.charCodeAt(r++),r==o){a+=n.charAt(i>>2),a+=n.charAt((i&3)<<4|(h&240)>>4),a+=n.charAt((h&15)<<2),a+="=";break}p=t.charCodeAt(r++),a+=n.charAt(i>>2),a+=n.charAt((i&3)<<4|(h&240)>>4),a+=n.charAt((h&15)<<2|(p&192)>>6),a+=n.charAt(p&63)}return a},this.decode=function(t){var a,r,o,i,h,p,g;for(p=t.length,h=0,g="";h<p;){do a=e[t.charCodeAt(h++)&255];while(h<p&&a==-1);if(a==-1)break;do r=e[t.charCodeAt(h++)&255];while(h<p&&r==-1);if(r==-1)break;g+=String.fromCharCode(a<<2|(r&48)>>4);do{if(o=t.charCodeAt(h++)&255,o==61)return g;o=e[o]}while(h<p&&o==-1);if(o==-1)break;g+=String.fromCharCode((r&15)<<4|(o&60)>>2);do{if(i=t.charCodeAt(h++)&255,i==61)return g;i=e[i]}while(h<p&&i==-1);if(i==-1)break;g+=String.fromCharCode((o&3)<<6|i)}return g},this.utf16to8=function(t){var a,r,o,i;for(a="",o=t.length,r=0;r<o;r++)i=t.charCodeAt(r),i>=1&&i<=127?a+=t.charAt(r):i>2047?(a+=String.fromCharCode(224|i>>12&15),a+=String.fromCharCode(128|i>>6&63),a+=String.fromCharCode(128|i>>0&63)):(a+=String.fromCharCode(192|i>>6&31),a+=String.fromCharCode(128|i>>0&63));return a},this.utf8to16=function(t){var a,r,o,i,h,p;for(a="",o=t.length,r=0;r<o;)switch(i=t.charCodeAt(r++),i>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:a+=t.charAt(r-1);break;case 12:case 13:h=t.charCodeAt(r++),a+=String.fromCharCode((i&31)<<6|h&63);break;case 14:h=t.charCodeAt(r++),p=t.charCodeAt(r++),a+=String.fromCharCode((i&15)<<12|(h&63)<<6|(p&63)<<0);break}return a},this.charToHex=function(t){var a,r,o;for(a="",r=0;r<t.length;)o=t.charCodeAt(r++).toString(16),a+="\\0x"+o,a+=r>0&&r%8==0?`\r
6
+ `:", ";return a}}function Da(){var n=0,e=new Object;this.add=function(t,a){this.containsKey(t)||n++,e[t]=a},this.getValue=function(t){return this.containsKey(t)?e[t]:null},this.remove=function(t){this.containsKey(t)&&delete e[t]&&n--},this.containsKey=function(t){return t in e},this.containsValue=function(t){for(var a in e)if(e[a]==t)return!0;return!1},this.getValues=function(){var t=[];for(var a in e)t.push(e[a]);return t},this.getKeys=function(){var t=[];for(var a in e)t.push(a);return t},this.getSize=function(){return n},this.clear=function(){n=0,e=new Object}}function Ma(n){if(this.connect=!1,this.ready_func_=null,this.callbacks_=new Da,this.module_="JS_IActiveXCtrl","WebSocket"in window)this.ws=new WebSocket("ws://127.0.0.1:7321");else throw"WebSocket not supported";this.ws.onerror=function(){throw"Unable to establish connection to WebSocket"},this.loadModule=function(){this.connect=!0;var e=JSON.stringify({MsgId:"LoadModule",Module:this.module_});this.ws.onmessage=this._callback.bind(this),this.ws.send(e)},this.loadModuleCallBack=function(e){if(!e)throw e.Response;this.ready_func_&&this.ready_func_()}.bind(this),this.callbacks_.add("LoadModule",this.loadModuleCallBack),this.exec=function(e,t,a){var r=Object.id(a).toString();this.callbacks_.add(r,a);var o={MsgId:r,Method:e+"|"+n};t&&(o.Param=JSON.stringify(t));var i=JSON.stringify(o);this.connect&&this.ws.send(i)},this.ready=function(e){this.ready_func_=e},this._callback=function(e){var t=JSON.parse(e.data),a=t.MsgId;if(this.callbacks_.containsKey(a)){var r=this.callbacks_.getValue(a);r(t.Result,t.Response),this.callbacks_.remove(a)}},this.ws.onopen=this.loadModule.bind(this),this.Arm_GetDongleInfo=function({Index:e,DongleInfoNum:t},a){this.exec("Arm_GetDongleInfo",[parseInt(e),parseInt(t)],a)},this.Arm_Enum=function(e){this.exec("Arm_Enum",null,e)},this.Arm_Open=function({Index:e},t){this.exec("Arm_Open",[parseInt(e)],t)},this.Arm_Close=function({Handle:e},t){this.exec("Arm_Close",[parseInt(e)],t)},this.Arm_VerifyPIN=function({Handle:e,UserPin:t,UserType:a},r){this.exec("Arm_VerifyPIN",[parseInt(e),a,t],r)},this.Arm_ResetState=function({Handle:e},t){this.exec("Arm_ResetState",[parseInt(e)],t)},this.Arm_GenRandom=function({Handle:e,RandomLen:t},a){this.exec("Arm_GenRandom",[parseInt(e),parseInt(t)],a)},this.Arm_LEDControl=function({Handle:e,LedFlag:t},a){this.exec("Arm_LEDControl",[parseInt(e),t],a)},this.Arm_SwitchProtocol=function({Handle:e,ProtocolFlag:t},a){this.exec("Arm_SwitchProtocol",[parseInt(e),t],a)},this.Arm_CreateFile=function({Handle:e,FileID:t,FileType:a,AttrBuffer:r},o){this.exec("Arm_CreateFile",[parseInt(e),a,parseInt(t),r],o)},this.Arm_WriteFile=function({Handle:e,FileID:t,FileType:a,FileOffset:r,DataInput:o},i){this.exec("Arm_WriteFile",[parseInt(e),a,parseInt(t),parseInt(r),o],i)},this.Arm_ReadFile0001=function({Handle:e},t){this.exec("Arm_ReadFile",[parseInt(e),parseInt("0001"),parseInt(0),parseInt("64")],t)},this.Arm_ReadFile0002=function({Handle:e},t){this.exec("Arm_ReadFile",[parseInt(e),parseInt("0002"),parseInt(0),parseInt("130")],t)},this.Arm_ReadFile0003=function({Handle:e},t){this.exec("Arm_ReadFile",[parseInt(e),parseInt("0003"),parseInt(0),parseInt("130")],t)},this.Arm_ReadFile0004=function({Handle:e},t){this.exec("Arm_ReadFile",[parseInt(e),parseInt("0004"),parseInt(0),parseInt("2048")],t)},this.Arm_ReadFile0005=function({Handle:e},t){this.exec("Arm_ReadFile",[parseInt(e),parseInt("0005"),parseInt(0),parseInt("2048")],t)},this.Arm_DownloadExeFile=function({Handle:e,Count:t,ExeFileInfo:a},r){this.exec("Arm_DownloadExeFile",[parseInt(e),parseInt(t),a],r)},this.Arm_RunExeFile=function({Handle:e,FileID:t,InData:a,DataLen:r},o){this.exec("Arm_RunExeFile",[parseInt(e),parseInt(t),a,a.length,parseInt(r)],o)},this.Arm_ReadRunExeFileData=function(e){this.exec("Arm_ReadRunExeFileData",null,e)},this.Arm_DeleteFile=function({Handle:e,FileID:t,FileType:a},r){this.exec("Arm_DeleteFile",[parseInt(e),a,parseInt(t)],r)},this.Arm_WriteData=function({Handle:e,Offset:t,DataInput:a},r){this.exec("Arm_WriteData",[parseInt(e),parseInt(t),a],r)},this.Arm_ReadData=function({Handle:e,Offset:t,ReadLength:a},r){this.exec("Arm_ReadData",[parseInt(e),parseInt(t),a],r)},this.Arm_WriteShareMemory=function({Handle:e,DataInput:t},a){this.exec("Arm_WriteShareMemory",[parseInt(e),t],a)},this.Arm_ReadShareMemory=function({Handle:e},t){this.exec("Arm_ReadShareMemory",[parseInt(e)],t)},this.Arm_GenUniqueKey=function({Handle:e,Seed:t},a){this.exec("Arm_GenUniqueKey",[parseInt(e),t.length,t],a)},this.Arm_ChangePIN=function({Handle:e,NewPIN:t,OldPIN:a,TryCount:r,PinFlag:o},i){this.exec("Arm_ChangePIN",[parseInt(e),o,a,t,parseInt(r)],i)},this.Arm_ResetUserPIN=function({Handle:e,AdminPIN:t},a){this.exec("Arm_ResetUserPIN",[parseInt(e),t],a)},this.Arm_SetUserID=function({Handle:e,UserID:t},a){this.exec("Arm_SetUserID",[parseInt(e),parseInt(t)],a)},this.Arm_GetDeadline=function({Handle:e},t){this.exec("Arm_GetDeadline",[parseInt(e)],t)},this.Arm_SetDeadline=function({Handle:e,SetDeadTime:t},a){this.exec("Arm_SetDeadline",[parseInt(e),parseInt(t)],a)},this.Arm_GetUTCTime=function({Handle:e},t){this.exec("Arm_GetUTCTime",[parseInt(e)],t)},this.Arm_RFS=function({Handle:e},t){this.exec("Arm_RFS",[parseInt(e)],t)},this.Arm_RsaGenPubPriKey=function({Handle:e,RsaFileId:t},a){this.exec("Arm_RsaGenPubPriKey",[parseInt(e),parseInt(t)],a)},this.Arm_EccGenPubPriKey=function({Handle:e,EccFileId:t},a){this.exec("Arm_EccGenPubPriKey",[parseInt(e),parseInt(t)],a)},this.Arm_Sm2GenPubPriKey=function({Handle:e,Sm2FileId:t},a){this.exec("Arm_Sm2GenPubPriKey",[parseInt(e),parseInt(t)],a)},this.Arm_ReadRsaPri=function(e){this.exec("Arm_ReadRsaPri",null,e)},this.Arm_ReadRsaPub=function(e){this.exec("Arm_ReadRsaPub",null,e)},this.Arm_ReadEccPri=function(e){this.exec("Arm_ReadEccPri",null,e)},this.Arm_ReadEccPub=function(e){this.exec("Arm_ReadEccPub",null,e)},this.Arm_ReadSm2Pri=function(e){this.exec("Arm_ReadSm2Pri",null,e)},this.Arm_ReadSm2Pub=function(e){this.exec("Arm_ReadSm2Pub",null,e)},this.Arm_RsaPri=function({Handle:e,RsaPri_Flag:t,RsaPriInData:a,RsaPriFileID:r,RsaPriFileSize:o},i){this.exec("Arm_RsaPri",[parseInt(e),parseInt(r),parseInt(o),t,a],i)},this.Arm_RsaPub=function({Handle:e,RsaPubKey:t,RsaPub_Flag:a,RsaPubInData:r,RsaPubFileSize:o},i){this.exec("Arm_RsaPub",[parseInt(e),parseInt(o),a,t,t.length,r],i)},this.Arm_EccSign=function({Handle:e,HashData:t,EccFileId:a},r){this.exec("Arm_EccSign",[parseInt(e),parseInt(a),t],r)},this.Arm_EccVerify=function({Handle:e,HashData:t,EccPubKey:a,EccSignData:r},o){this.exec("Arm_EccVerify",[parseInt(e),a,a.length,t,r],o)},this.Arm_Sm2Sign=function({Handle:e,HashData:t,Sm2FileId:a},r){this.exec("Arm_Sm2Sign",[parseInt(e),parseInt(a),t],r)},this.Arm_Sm2Verify=function({Handle:e,HashData:t,Sm2PubKey:a,Sm2SignData:r},o){this.exec("Arm_Sm2Verify",[parseInt(e),a,a.length,t,r],o)},this.Arm_TDES=function({Handle:e,Tdes_Flag:t,TdesFileID:a,TdesInData:r},o){this.exec("Arm_TDES",[parseInt(e),parseInt(a),t,r],o)},this.Arm_SM4=function({Handle:e,Sm4_Flag:t,Sm4FileID:a,Sm4InData:r},o){this.exec("Arm_SM4",[parseInt(e),parseInt(a),t,r],o)},this.Arm_HASH=function({Handle:e,Hash_Flag:t,HashInData:a},r){this.exec("Arm_HASH",[parseInt(e),t,a],r)},this.Arm_Seed=function({Handle:e,SeedData:t,SeedLength:a},r){this.exec("Arm_Seed",[parseInt(e),a,t],r)},this.Arm_LimitSeedCount=function({Handle:e,SeedCount:t},a){this.exec("Arm_LimitSeedCount",[parseInt(e),parseInt(t)],a)},this.Arm_GenMotherKey=function({Handle:e,SeedLen:t,SeedForPID:a,SonCount:r,StartUserID:o,AdminTryCount:i,UserPin:h,UserTryCount:p,UpdateRSAPriKey:g},V){this.exec("Arm_GenMotherKey",[parseInt(e),parseInt(t),a,h,parseInt(p),parseInt(i),g,parseInt(o),parseInt(r)],V)},this.Arm_RequestInit=function({Handle:e},t){this.exec("Arm_RequestInit",[parseInt(e)],t)},this.Arm_GetInitDataFromMother=function({Handle:e},t){this.exec("Arm_GetInitDataFromMother",[parseInt(e),Request],t)},this.Arm_InitSon=function({Handle:e,InitData:t},a){this.exec("Arm_InitSon",[parseInt(e),t],a)},this.Arm_SetUpdatePriKey=function({Handle:e,UpdatePriKey:t},a){this.exec("Arm_SetUpdatePriKey",[parseInt(e),t],a)},this.Arm_MakeUpdatePacket=function({Handle:e,HID:t,Func:a,FileID:r,FileType:o,Offset:i,DataLen:h,DataBuffer:p,UpRSAPubKey:g},V){this.exec("Arm_MakeUpdatePacket",[parseInt(e),t,a,o,parseInt(r),parseInt(i),p,g,parseInt(h)],V)},this.Arm_MakeUpdatePacketFromMother=function({Handle:e,HID:t,Func:a,FileID:r,FileType:o,Offset:i,DataLen:h,DataBuffer:p},g){this.exec("Arm_MakeUpdatePacketFromMother",[parseInt(e),t,a,o,parseInt(r),parseInt(i),p,parseInt(h)],g)},this.Arm_Update=function({Handle:e,UpdateData:t},a){this.exec("Arm_Update",[parseInt(e),t],a)},this.Arm_Set_DATA_FILE_ATTR=function({Size:e,ReadPriv:t,WritePriv:a},r){this.exec("Arm_Set_DATA_FILE_ATTR",[parseInt(e),parseInt(t),parseInt(a)],r)},this.Arm_Set_PRIKEY_FILE_ATTR=function({Count:e,Size:t,Type:a,Priv:r,IsReset:o,IsDecOnRAM:i},h){this.exec("Arm_Set_PRIKEY_FILE_ATTR",[a,parseInt(t),parseInt(e),parseInt(r),parseInt(i),parseInt(o)],h)},this.Arm_Set_KEY_FILE_ATTR=function({Size:e,PrivEnc:t},a){this.exec("Arm_Set_KEY_FILE_ATTR",[parseInt(e),parseInt(t)],a)},this.Arm_Set_EXE_FILE_ATTR=function({FileLen:e,PrivExe:t},a){this.exec("Arm_Set_EXE_FILE_ATTR",[parseInt(e),parseInt(t)],a)},this.Arm_Set_DATA_LIC=function({ReadPriv:e,WritePriv:t},a){this.exec("Arm_Set_DATA_LIC",[parseInt(e),parseInt(t)],a)},this.Arm_Set_PRIKEY_LIC=function({Count:e,Priv:t,IsReset:a,IsDecOnRAM:r},o){this.exec("Arm_Set_PRIKEY_LIC",[parseInt(e),parseInt(t),parseInt(r),parseInt(a)],o)},this.Arm_Set_KEY_LIC=function({PrivEnc:e},t){this.exec("Arm_Set_KEY_LIC",[parseInt(e)],t)},this.Arm_Set_EXE_LIC=function({PrivExe:e},t){this.exec("Arm_Set_EXE_LIC",[parseInt(e)],t)},this.Arm_Set_EXE_FILE_INFO=function({FileID:e,FileData:t,FileSize:a,InBuffer:r,CallLimit:o},i){this.exec("Arm_Set_EXE_FILE_INFO",[r,parseInt(a),parseInt(e),parseInt(o),t,t.length],i)},this.Arm_Clear_EXE_FILE_INFO=function({InBuffer:e},t){this.exec("Arm_Clear_EXE_FILE_INFO",[e],t)}}const Oa={HID:0},be={PRODUCT_ID:0,USER_ID:1,HARDWARE_ID:2},Qe={USER:0};class yt{constructor(){ce(this,"Base64",new ka);ce(this,"AtlCtrl",null);ce(this,"ArmCount",0);ce(this,"ArmIndex",0);ce(this,"ArmHandle",0);ce(this,"ArmRandom","");try{this.AtlCtrl=new Ma("{39E9B272-82A7-4177-A19D-6723C1BDB0CC}")}catch(e){console.error(e),this.AtlCtrl=null}}armEnum(){if(this.AtlCtrl)return new Promise((e,t)=>{this.AtlCtrl.Arm_Enum((a,r)=>{a?(this.ArmCount=+r,e(r)):t(r)})})}armOpen(e=0){if(this.AtlCtrl)return this.ArmIndex=e,new Promise((t,a)=>{this.AtlCtrl.Arm_Open({Index:e},(r,o)=>{r?(this.ArmHandle=+o,t(o)):(this.ArmHandle=o,a(o))})})}armClose(e=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,a)=>{this.AtlCtrl.Arm_Close({Handle:e},(r,o)=>{r?t(o):a(o)})})}armChangePIN(e,t,a=255,r=Qe.USER,o=this.ArmHandle){if(this.AtlCtrl)return new Promise((i,h)=>{this.AtlCtrl.Arm_ChangePIN({Handle:o,NewPIN:e,OldPIN:t,TryCount:a,PinFlag:r},(p,g)=>{p&&g==0?(this.ArmPin=e,i(g)):h(g)})})}armGenRandom(e=16,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((a,r)=>{this.AtlCtrl.Arm_GenRandom({Handle:t,RandomLen:e},(o,i)=>{o?(this.ArmRandom=i,a(i)):r(i)})})}armGetDeadline(e=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,a)=>{this.AtlCtrl.Arm_GetDeadline({Handle:e},(r,o)=>{r?(this.ArmDeadline=o,t(o)):a(o)})})}armGenUniqueKey(e="MTIzNDU2Nzg5MA==",t=this.ArmHandle){if(this.AtlCtrl)return new Promise((a,r)=>{this.AtlCtrl.Arm_GenUniqueKey({Handle:t,Seed:e},(o,i)=>{o?(this.ArmUKey=i,a(i)):r(i)})})}armGetDongleInfo(e=0,t=be.HARDWARE_ID){if(this.AtlCtrl)return this.ArmIndex=e,new Promise((a,r)=>{this.AtlCtrl.Arm_GetDongleInfo({Index:e,DongleInfoNum:t},(o,i)=>{if(o){switch(t){case be.USER_ID:this.ArmUid=i;break;case be.PRODUCT_ID:this.ArmPid=i;break;case be.HARDWARE_ID:this.ArmHid=i;break}a(i)}else r(i)})})}armLEDControl(e,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((a,r)=>{this.AtlCtrl.Arm_LEDControl({Handle:t,LedFlag:e},(o,i)=>{o&&i==0?a(i):r(i)})})}armRFS(e=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,a)=>{this.AtlCtrl.Arm_RFS({Handle:e},(r,o)=>{r&&o==0?t(o):a(o)})})}armReadFile(e="0001",t=this.ArmHandle){if(this.AtlCtrl)return new Promise((a,r)=>{this.AtlCtrl[`Arm_ReadFile${e}`]({Handle:t},(o,i)=>{if(o&&i.length>0)try{i=this.Base64.decode(i),a(i)}catch(h){console.error(h),a(i)}else r(i)})})}armResetState(e=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,a)=>{this.AtlCtrl.Arm_ResetState({Handle:e},(r,o)=>{r&&o==0?t(o):a(o)})})}armResetUserPIN(e,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((a,r)=>{this.AtlCtrl.Arm_ResetUserPIN({Handle:t,AdminPIN:e},(o,i)=>{o&&i==0?a(i):r(i)})})}armSetUserID(e,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((a,r)=>{this.AtlCtrl.Arm_SetUserID({Handle:t,UserID:e},(o,i)=>{o&&i==0?a(i):r(i)})})}armSetDeadline(e,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((a,r)=>{this.AtlCtrl.Arm_SetDeadline({Handle:t,SetDeadTime:e},(o,i)=>{o&&i==0?a(i):r(i)})})}armSwitchProtocol(e=Oa.HID,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((a,r)=>{this.AtlCtrl.Arm_SwitchProtocol({Handle:t,ProtocolFlag:e},(o,i)=>{o&&i==0?a(i):r(i)})})}armVerifyPIN(e,t=Qe.USER,a=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,o)=>{this.AtlCtrl.Arm_VerifyPIN({Handle:a,UserPin:e,UserType:t},(i,h)=>{i&&h==0?(this.ArmPin=e,r(h)):o(h)})})}armReadData(e=0,t=128,a=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,o)=>{this.AtlCtrl.Arm_ReadData({Handle:a,Offset:e,ReadLength:t},(i,h)=>{i?(this.ArmData=h,r(h)):o(h)})})}armWriteData(e,t=0,a=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,o)=>{this.AtlCtrl.Arm_WriteData({Handle:a,Offset:t,DataInput:e},(i,h)=>{i&&h==0?r(h):o(h)})})}armReadShareMemory(e=this.ArmHandle){if(this.AtlCtrl)return new Promise((t,a)=>{this.AtlCtrl.Arm_ReadShareMemory({Handle:e},(r,o)=>{r?(this.ArmData=o,t(o)):a(o)})})}armWriteShareMemory(e,t=this.ArmHandle){if(this.AtlCtrl)return new Promise((a,r)=>{this.AtlCtrl.Arm_WriteShareMemory({Handle:t,DataInput:e},(o,i)=>{o&&i==0?a(i):r(i)})})}}const Et="0123456789abcdeffedcba9876543210",It="4b0de988570c3a0f",La=window.ENCRYPT;let ge=La&&new yt;function Tt(n=16,e="0123456789abcdefghijklmnopqrstuvwxyz"){let t="",a=e.length;for(;n>0;)t+=e[Math.floor(Math.random()*a)],n--;return t}function St(){return J(this,null,function*(){return ge||(ge=new yt),new Promise((n,e)=>{ge.armEnum().then(t=>{n(+t)}).catch(t=>{j.ElMessage({type:"warning",ElMessage:"未找到U盘锁,请检查U盘锁!"}),e(t)})})})}Ne.throttle(()=>J(exports,null,function*(){const n=yield St(),e={};if(typeof n!="number"||n<=0)j.ElMessage({type:"warning",ElMessage:"未找到U盘锁,请检查U盘锁!"}),e.resetToken();else{const t=yield Ua();if(!e.token)return;t.length?t.includes(e.ukeyHid)||(j.ElMessage({type:"error",ElMessage:"U盘锁不匹配,请检查U盘锁!"}),e.resetToken()):(j.ElMessage({type:"warning",ElMessage:"未找到U盘锁,请检查U盘锁!"}),e.resetToken())}}),5e3,{trailing:!1});function Fa(n=0){return J(this,null,function*(){return ge?new Promise((e,t)=>{ge.armGetDongleInfo(n).then(a=>{a?e(a):(j.ElMessage({type:"warning",ElMessage:"U盘锁信息为空,请检查U盘锁!"}),t(a))}).catch(a=>{t(a)})}):j.ElMessage({type:"warning",ElMessage:"未找到U盘锁程序,请检查后台程序!"})})}function Ua(){return J(this,null,function*(){if(!ge)return j.ElMessage({type:"warning",ElMessage:"未找到U盘锁程序,请检查后台程序!"});const n=yield St();let e=[];for(let t=0;t<n;t++){const a=yield Fa(t);e.push(a)}return e})}Tt(16);Tt(16);const bt=window.meta.app.inspect?me.SM4.constants.CBC:me.SM4.constants.ECB,{publicKey:yn,privateKey:En}=me.SM2.generateKeyPair();function Ga(n,e,t={}){const a=Ct(It),r=t.mode||bt;t=r===me.SM4.constants.ECB?l({mode:r,inputEncoding:"utf8",outputEncoding:"hex"},t):l({iv:Et,mode:r,inputEncoding:"utf8",outputEncoding:"hex"},t);let o="";try{o=me.SM4.encrypt(n,a,t)}catch(i){console.log("err: ",i)}return o}function Va(n,e,t={}){const a=Ct(It),r=t.mode||bt;return t=r===me.SM4.constants.ECB?l({mode:r,inputEncoding:"hex",outputEncoding:"utf8"},t):l({iv:Et,mode:r,inputEncoding:"hex",outputEncoding:"utf8"},t),me.SM4.decrypt(n,a,t)}function Ct(n){return[...n].map(e=>e.charCodeAt().toString(16)).join("")}function Ce(n){return n=vt&&He(n)?Va(n):n,He(n)?JSON.parse(n):n}function Je(n){return n=vt&&He(n)?Ga(n):n,JSON.stringify(n)}function pe(n,e,t,a){const r=new StorageEvent("storage",{url:window.location.href,key:n,oldValue:e,newValue:t,storageArea:a});window.dispatchEvent(r)}const Ze={getLocal:n=>{try{const e=window.localStorage.getItem(n);return Ce(e)}catch(e){console.error(e)}},setLocal:(n,e)=>{try{const t=window.localStorage.getItem(n),a=Je(e);window.localStorage.setItem(n,a),pe(n,t,a,window.localStorage)}catch(t){console.error(t)}},eachLocal:n=>{if(!n||Ve(n)!=="Function")return console.error("传递参数非函数类型!");for(let e=0,t=window.localStorage.length;e<t;e++){const a=window.localStorage.key(e);n((void 0).getLocal(a),a)}},clearLocal:()=>{window.localStorage.clear(),pe(null,null,null,window.localStorage)},removeLocal:n=>{const e=window.localStorage.getItem(n);window.localStorage.removeItem(n),pe(n,e,null,window.localStorage)},getSession:n=>{try{const e=window.sessionStorage.getItem(n);return Ce(e)}catch(e){console.error(e)}},setSession:(n,e)=>{try{const t=window.sessionStorage.getItem(n),a=Je(e);window.sessionStorage.setItem(n,a),pe(n,t,a,window.sessionStorage)}catch(t){console.error(t)}},eachSession:n=>{if(!n||Ve(n)!=="Function")return console.error("传递参数非函数类型!");for(let e=0,t=window.sessionStorage.length;e<t;e++){const a=window.sessionStorage.key(e);n((void 0).getSession(a),a)}},clearSession:()=>{window.sessionStorage.clear(),pe(null,null,null,window.sessionStorage)},removeSession:n=>{const e=window.sessionStorage.getItem(n);window.sessionStorage.removeItem(n),pe(n,e,null,window.sessionStorage)},onStorageChange:n=>{if(!n||Ve(n)!=="Function")return console.error("传递参数非函数类型!");const e=t=>{n({url:t.url,key:t.key,newValue:t.newValue?Ce(t.newValue):null,oldValue:t.oldValue?Ce(t.oldValue):null,storageArea:t.storageArea})};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}},et=n=>{const{quality:e,value:t,function_id:a}=n;return(e>>7&1)===1||e===0&&a===2&&t===1},tt="USER_TOKEN",at="STATION_ID",Ba=[{key:0,value:"离线"},{key:1,value:"在线"}],Ha=[{key:0,value:"反向"},{key:1,value:"正向"},{key:2,value:"停止"}],Wa=[{key:1,value:1},{key:2,value:2},{key:3,value:3},{key:4,value:4},{key:5,value:5}],Ka="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1753954524851'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1506'%20width='256'%20height='256'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M888.65792%20280.15616a46.80704%2046.80704%200%200%200-46.80704-46.80704H233.34912a46.80704%2046.80704%200%200%200-46.80704%2046.80704v93.61408h702.11584V280.15616zM186.54208%20420.5824v374.46144a46.80704%2046.80704%200%200%200%2046.80704%2046.80704h608.49664a46.80704%2046.80704%200%200%200%2046.80704-46.80704V420.5824H186.54208z%20m442.9056%2084.98688l30.92992%2011.47904c-15.62624%2024.23808-35.39968%2050.38592-50.70848%2067.6096l-25.51296-10.84416c15.31392-17.85856%2034.7648-46.56128%2045.29152-68.24448z%20m-184.64768-1.59744c17.54112%2020.09088%2038.26688%2047.5136%2047.5136%2065.37728l-25.51296%2015.62624c-8.61184-17.85856-28.70272-46.23872-45.92128-67.28704l23.92064-13.71648z%20m199.95136%20267.2384h-45.28128c-32.20992%200-39.86432-8.92928-39.86432-39.86432v-102.36416h-46.23872c-5.73952%2069.8368-21.6832%20121.18528-101.0944%20149.56544-3.5072-7.97184-11.47904-19.456-18.49344-25.51296%2072.07424-22.9632%2083.87072-66.01728%2088.65792-124.05248H399.19616v-28.70272h122.7776V483.88096h30.92992v116.39808h122.46016v28.70272h-85.7856v102.04672c0%2010.5216%201.90976%2012.11904%2013.71136%2012.11904h38.90176c8.92928%200%2010.84416-4.1472%2011.8016-28.38016%206.69696%204.78208%2019.12832%209.56928%2027.42272%2011.47904-3.49696%2035.39968-11.4688%2044.96384-36.66432%2044.96384z'%20fill='%23005CFF'%20p-id='1507'%3e%3c/path%3e%3c/svg%3e",de=window.meta.graph.penFormMap?window.meta.graph.penFormMap:{NORMAL:[{name:"颜色",key:"color",type:"color",dataIds:{}}],TEXT:[{name:"显示内容",key:"text",type:"text",dataIds:{}}],AUDIO:[{name:"颜色",key:"color",type:"color",dataIds:{}}],MP4:[{name:"颜色",key:"color",type:"color",dataIds:{}}],CAMERA:[{name:"颜色",key:"color",type:"color",dataIds:{}}],VIDEO_STREAM:[{name:"颜色",key:"color",type:"color",dataIds:{}}],LIGHT_PLATE:[{name:"光字牌",key:"light_plate",type:"select",dataIds:{},options:[{label:"离线",value:-1},{label:"正常",value:0},{label:"预警",value:1},{label:"一般",value:2},{label:"严重",value:3},{label:"危急",value:4}]}]},xt=window.meta.graph.lightPlateColorMap?window.meta.graph.lightPlateColorMap:{0:"#00d200",1:"#e2ac06",2:"#fa800a",3:"#f04155",4:"#ff0000"},Nt=window.meta.graph.lightPlateTextMap?window.meta.graph.lightPlateTextMap:{0:"#fff",1:"#fff",2:"#fff",3:"#fff",4:"#fff"},U={form:[{name:"带电状态",key:"charged_state",type:"select",dataIds:{},options:Ba.map(n=>({label:n.value,value:n.key}))},{name:"潮流方向",key:"electric_direction",type:"select",dataIds:{},options:Ha.map(n=>({label:n.value,value:n.key}))},{name:"电荷大小",key:"electric_size",type:"select",dataIds:{},options:Wa.map(n=>({label:n.value,value:n.key}))}],anchors:[{x:0,y:.5,id:"0"},{x:.5,y:0,id:"1"},{x:1,y:.5,id:"2"},{x:.5,y:1,id:"3"}],dataType:window.dataType,dataProp:window.dataProp,visibleLevel:window.visibleLevel},f=P(l({penType:S.NORMAL},U),{form:[...de[S.NORMAL],...U.form]});F.YX,F.YX,F.YX,S.POINT_VALUE,U.anchors,window.visibleLevel,U.form,U.form,window.dataType,window.dataProp,window.visibleLevel,U.form,window.dataType,window.dataProp,window.visibleLevel,U.form,window.dataType,window.dataProp,window.visibleLevel,Nt[0],S.LIGHT_PLATE,xt[0],U.anchors,window.visibleLevel,[...de[S.LIGHT_PLATE],...U.form],xe+"",S.SENSOR,U.anchors,window.visibleLevel,[...de[S.LIGHT_PLATE],...U.form],P(l({width:100,height:30,name:"text",penName:"文本",text:"文本",disableAnchor:!0,penType:S.TEXT},U),{form:[...de[S.TEXT],...U.form]}),l({width:100,height:100,name:"square",penName:"正方形"},f),P(l({type:1,name:"line",width:100,height:5,lineWidth:2,lineName:"line",penName:"line",background:"#FFF000",color:"#FFF000"},f),{lineAnimateType:1,anchors:[{x:0,y:.5,id:"0"},{x:1,y:.5,id:"1"}]}),l({width:200,height:50,borderRadius:0,name:"rectangle",penName:"矩形"},f),l({width:100,height:100,name:"circle",penName:"圆"},f),l({width:100,height:100,name:"triangle",penName:"三角形"},f),l({width:100,height:100,name:"diamond",penName:"菱形"},f),l({width:100,height:100,name:"pentagon",penName:"五边形"},f),l({width:100,height:100,name:"hexagon",penName:"六边形"},f),l({width:100,height:100,name:"pentagram",penName:"五角星"},f),l({width:120,height:60,name:"leftArrow",penName:"左箭头"},f),l({width:120,height:60,penName:"右箭头",name:"rightArrow"},f),l({width:150,height:60,name:"twowayArrow",penName:"双向箭头"},f),l({width:100,height:100,name:"cloud",penName:"云"},f),l({textTop:-.1,width:100,height:100,name:"message",penName:"消息框"},f),l({width:80,height:100,name:"file",penName:"文件"},f),P(l({width:60,height:100,name:"cube",penName:"立方体",z:.25},f),{props:{custom:[{key:"z",label:"Z",type:"number",min:0,placeholder:"<= 1 即宽度的比例"},{key:"backgroundFront",label:"前背景色",type:"color"},{key:"backgroundUp",label:"顶背景色",type:"color"},{key:"backgroundRight",label:"右背景色",type:"color"}]}}),l({width:70,height:100,name:"people",penName:"人"},f),P(l({name:"rectangle",penName:"按钮",width:80,height:30,borderRadius:.2,text:"按钮",background:"#1890ff",color:"#1890ff",textColor:"#fff",activeBackground:"#40a9ff",activeColor:"#40a9ff",activeTextColor:"#fff",hoverBackground:"#40a9ff",hoverColor:"#40a9ff",hoverTextColor:"#fff"},f),{penType:S.BUTTON}),P(l({name:"rectangle",penName:"输入框",height:50,width:200,input:!0,borderRadius:.05,ellipsis:!0,text:"输入数据",textAlign:"left",color:"#D9D9D9FF",textColor:"#000000FF",hoverTextColor:"#000000FF",activeTextColor:"#000000FF",textLeft:10},f),{penType:S.INPUT}),P(l({name:"rectangle",penName:"选择器",height:50,width:200,borderRadius:.05,ellipsis:!0,text:"选项1",textAlign:"left",color:"#D9D9D9FF",textColor:"#000000FF",hoverTextColor:"#000000FF",activeTextColor:"#000000FF",textLeft:10,dropdownList:[{text:"选项1"},{text:"选项2"},{text:"选项3"}]},f),{penType:S.SELECT}),P(l({name:"slider",penName:"进度条",width:300,height:30,value:10,textWidth:50,barHeight:4,fontSize:20,min:0,max:100,color:"#1890ff",background:"#D4D6D9",textColor:"#222",unit:"%"},f),{penType:S.SLIDER}),P(l({name:"time",penName:"时间",width:300,height:40,text:`${Yt().format("YYYY-MM-DD HH:mm:ss")}`,lineWidth:0,fontSize:20,interval:67,fillZero:!0},f),{penType:S.TIME,form:[{key:"timeFormat",name:"显示格式",type:"text"},{key:"fillZero",name:"是否补0",type:"switch"},...f.form],timeFormat:"`${year}-${month}-${day} ${hours}:${minutes}:${seconds} 星期${week}`"}),P(l({name:"switch",penName:"开关",height:30,width:60,checked:!1,offColor:"#BFBFBF",onColor:"#1890ff",disableOffColor:"#E5E5E5",disableOnColor:"#A3D3FF",locked:0},f),{penType:S.SWITCH}),P(l({name:"radio",penName:"单选框",direction:"horizontal",width:150,height:30,checked:"",options:[{text:"选项一"},{text:"选项二"},{text:"选项三",isForbidden:!0}]},f),{penType:S.RADIO}),P(l({name:"checkbox",penName:"多选框",width:30,height:30,checked:!0,value:"选项一"},f),{penType:S.CHECKBOX}),P(l({name:"table2",penName:"表格",width:80,height:30,datable:!0,disableAnchor:!0,colWidth:90,rowHeight:32,bordered:!0,vLine:!0,hLine:!0,stripe:!1,hasHeader:!0,color:"#333",textColor:"#444"},f),{penType:S.TABLE,replaceMode:2,data:[["设备 ID","设备名称","数据协议","级别"],["1","200","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["2","湿度传感器","MQTT",{text:"二级告警",background:"#4d2a02",textColor:"#E6A82EFF"}],["3","物联网设备","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["4","物联网设备/智能家居/智慧城市","MQTT",{text:"三级告警",textColor:"#58CC84FF",background:"#042617;"}]],styles:[{row:0,textColor:"#000"}]}),P(l({name:"table2",penName:"斑马纹表格",width:80,height:30,datable:!0,disableAnchor:!0,colWidth:90,rowHeight:32,bordered:!0,vLine:!0,hLine:!0,stripe:!0,hasHeader:!0,color:"#333",textColor:"#444"},f),{penType:S.TABLE,replaceMode:2,data:[["设备 ID","设备名称","数据协议","级别"],["1","200","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["2","湿度传感器","MQTT",{text:"二级告警",background:"#4d2a02",textColor:"#E6A82EFF"}],["3","物联网设备","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["4","物联网设备/智能家居/智慧城市","MQTT",{text:"三级告警",textColor:"#58CC84FF",background:"#042617;"}]],styles:[{row:0,textColor:"#000"}]}),P(l({name:"table2",penName:"滚动表格",width:80,height:30,datable:!0,disableAnchor:!0,colWidth:90,rowHeight:32,bordered:!0,vLine:!0,hLine:!0,stripe:!1,swiper:!0,maxNum:5,hasHeader:!0,color:"#333",textColor:"#444"},f),{penType:S.TABLE,replaceMode:2,data:[["设备 ID","设备名称","数据协议","级别"],["1","200","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["2","湿度传感器","MQTT",{text:"二级告警",background:"#4d2a02",textColor:"#E6A82EFF"}],["3","物联网设备","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["4","智慧城市","MQTT",{text:"三级告警",textColor:"#58CC84FF",background:"#042617;"}],["5","智能家居","MQTT",{text:"三级告警",textColor:"#58CC84FF",background:"#042617;"}]],styles:[{row:0,textColor:"#000"}]}),P(l({name:"svg",width:100,height:100,image:xe+"/icon/audio.svg",audioId:"",penName:"音频",datable:!0,penType:S.AUDIO},U),{form:[...de[S.AUDIO],...U.form],events:[{name:"enter",action:Ie.Emit,value:Z.OPEN_AUDIO,where:{type:""},params:JSON.stringify({action:Z.OPEN_AUDIO,data:""})},{name:"leave",action:Ie.Emit,value:Z.CLOSE_AUDIO,where:{type:""},params:JSON.stringify({action:Z.CLOSE_AUDIO,data:""})}]}),P(l({name:"svg",width:100,height:100,image:xe+"/icon/camera.svg",cameraId:"",penName:"摄像机",datable:!0,events:[{name:"enter",action:Ie.Emit,value:Z.OPEN_CAMERA,where:{type:""},params:JSON.stringify({action:Z.OPEN_CAMERA,data:""})},{name:"leave",action:Ie.Emit,value:Z.CLOSE_CAMERA,where:{type:""},params:JSON.stringify({action:Z.CLOSE_CAMERA,data:""})}],penType:S.CAMERA},U),{form:[...de[S.CAMERA],...U.form]}),P(l({name:"video",width:100,height:100,video:"https://video.699pic.com/videos/17/69/11/a_aa3jeKZ0D63g1556176911_10s.mp4",autoPlay:!0,penName:"MP4",penType:S.MP4},U),{form:[...de[S.MP4],...U.form]}),P(l({name:"video",width:100,height:100,penName:"视频流",datable:!0,video:"https://video.699pic.com/videos/17/69/11/a_aa3jeKZ0D63g1556176911_10s.mp4",autoPlay:!0,penType:S.VIDEO_STREAM},U),{form:[...de[S.VIDEO_STREAM],...U.form]}),l({text:"开始/结束",width:120,height:40,borderRadius:.5,name:"rectangle",penName:"开始/结束"},f),l({text:"流程",width:120,height:40,name:"rectangle",penName:"流程"},f),l({text:"判定",width:120,height:60,name:"diamond",penName:"判定"},f),l({text:"数据",width:120,height:50,name:"flowData",penName:"数据",offsetX:.14},f),l({text:"准备",width:120,height:50,name:"hexagon",penName:"准备"},f),l({text:"子流程",width:120,height:50,name:"flowSubprocess",penName:"子流程"},f),l({text:"数据库",width:80,height:120,name:"flowDb",penName:"数据库"},f),l({text:"文档",width:120,height:100,name:"flowDocument",penName:"文档"},f),l({text:"内部存储",width:120,height:80,name:"flowInternalStorage",penName:"内部存储"},f),l({text:"外部存储",width:120,height:80,name:"flowExternStorage",penName:"外部存储"},f),l({text:"队列",width:100,height:100,name:"flowQueue",penName:"队列"},f),l({text:"手动输入",width:120,height:80,name:"flowManually",penName:"手动输入"},f),l({text:"展示",width:120,height:80,name:"flowDisplay",penName:"展示"},f),l({text:"并行模式",width:120,height:50,name:"flowParallel",penName:"并行模式"},f),l({text:"注释",width:100,height:100,name:"flowComment",penName:"注释"},f),l({text:"",width:30,height:30,name:"circle",penName:"开始",background:"#555",lineWidth:0},f),l({width:30,height:30,name:"activityFinal",penName:"结束"},f),l({text:"活动",width:120,height:50,borderRadius:.25,name:"rectangle",penName:"活动"},f),l({text:"决策/合并",width:120,height:50,name:"diamond",penName:"决策/合并"},f),l({text:"垂直泳道",width:200,height:500,name:"swimlaneV",penName:"垂直泳道",textBaseline:"top",textTop:20,lineTop:.08},f),l({text:"水平泳道",width:500,height:200,name:"swimlaneH",penName:"水平泳道",textWidth:.01,textLeft:.04,textAlign:"left",lineLeft:.08},f),l({text:"垂直分岔/汇合",width:10,height:150,name:"forkV",penName:"垂直分岔/汇合",fillStyle:"#555",strokeStyle:"transparent"},f),l({text:"水平分岔/汇合",width:150,height:10,name:"forkH",penName:"水平分岔/汇合",fillStyle:"#555",strokeStyle:"transparent"},f),l({name:"andGate",penName:"与门",width:100,height:150},f),l({name:"basicEvent",penName:"基本事件",width:100,height:150},f),l({name:"unexpandedEvent",penName:"未展开事件",width:100,height:150},f),l({name:"priorityAndGate",penName:"优先AND门",width:100,height:150},f),l({name:"forbiddenGate",penName:"禁止门",width:100,height:150},f),l({name:"event",penName:"事件",width:100,height:150},f),l({name:"switchEvent",penName:"开关事件",width:100,height:150},f),l({name:"conditionalEvent",penName:"条件事件",width:150,height:100},f),l({name:"transferSymbol",penName:"转移符号",width:100,height:150},f),l({name:"orGate",penName:"或门",width:100,height:150},f),l({name:"xorGate",penName:"异或门",width:100,height:150},f),l({name:"votingGate",penName:"表决门",width:100,height:150},f);const Ya=(n,e={isDev:!1,devServerUrl:"",devServerPort:8443})=>(n=n.replace(/(https?:\/\/)(\b(?:\d{1,3}\.){3}\d{1,3}\b)(:(\d+))?/,`$1${e.isDev?e.devServerUrl:ra}:${e.isDev?e.devServerPort:oa}`),e.isDev?n:n.replace("/baseUrl","")),Re=(n,e)=>{const t=n.__vccOpts||n;for(const[a,r]of e)t[a]=r;return t},$a={class:"props-panel__title"},qa={class:"props-panel__value"},za={class:"value-left"},ja={class:"props-panel__value-num"},Xa={class:"value-right"},Qa=Object.assign({name:"PropsPanle"},{__name:"PropsPanle",props:{data:{type:Object,default:null}},emits:["close","enter","view-history"],setup(n,{emit:e}){const t=n,a=e;function r(p){return p==null||p==="—"?"—":typeof p=="number"?p.toFixed(2):p}const o=()=>{a("close")},i=()=>{a("enter")},h=()=>{a("view-history",t.data)};return(p,g)=>{var V,ee;return c.openBlock(),c.createElementBlock("div",{class:"props-panel",onMouseleave:o,onMouseover:i},[c.createElementVNode("div",$a,c.toDisplayString(((V=t==null?void 0:t.data)==null?void 0:V.name)||"—"),1),g[2]||(g[2]=c.createElementVNode("div",{class:"props-panel__label"},"脉冲峰值",-1)),c.createElementVNode("div",qa,[c.createElementVNode("div",za,[c.createElementVNode("span",ja,c.toDisplayString(r((ee=t==null?void 0:t.data)==null?void 0:ee.value)),1),g[0]||(g[0]=c.createElementVNode("span",{class:"props-panel__unit"},"dBm",-1))]),c.createElementVNode("div",Xa,[c.createVNode(c.unref(j.ElButton),{type:"primary",onClick:h},{default:c.withCtx(()=>[...g[1]||(g[1]=[c.createTextVNode("查看历史",-1)])]),_:1})])])],32)}}}),Ja=Re(Qa,[["__scopeId","data-v-629e8a65"]]);class Za{constructor(e){ce(this,"editor");this.editor=e}initPlugin(e,t,a={}){e.installPenPlugins({name:t},[{plugin:__$t__.mindBoxPlugin,options:a},{plugin:qt.collapseChildPlugin,options:a}])}}function en(n,e){var X,Y;const t=e||new Path2D,{x:a,y:r,width:o,height:i}=n.calculative.worldRect,h=a+o/2,p=r+i/2,g=o/2,V=(X=n.startAngle)!=null?X:0,ee=(Y=n.endAngle)!=null?Y:2*Math.PI;if(t.arc(h,p,g,V,ee,!0),t instanceof Path2D)return t}function tn(n,e){const t=e||new Path2D,{x:a,y:r,width:o,height:i}=n.calculative.worldRect;if(t.rect(a,r,o,i),t instanceof Path2D)return t}function an(n,e){const t=n||new Path2D,a=e.dimensionData;if(!a)return t;const r=e.calculative.worldRect,o=N=>({x:r.x+N.x*r.width,y:r.y+N.y*r.height}),i=o(a.tp1),h=o(a.tp2),p=o(a.dimStart),g=o(a.dimEnd),V=e.calculative.fontSize||12;n&&n.beginPath&&(n.save(),n.beginPath(),n.strokeStyle=e.color||"#000",n.lineWidth=e.calculative.lineWidth||1);const ee=Math.max(5,V*.4),re=p.x-i.x,X=p.y-i.y,Y=Math.hypot(re,X)||1,R=p.x+re/Y*ee,se=p.y+X/Y*ee,ne=g.x-h.x,le=g.y-h.y,w=Math.hypot(ne,le)||1,x=g.x+ne/w*ee,$=g.y+le/w*ee;t.moveTo(i.x,i.y),t.lineTo(R,se),t.moveTo(h.x,h.y),t.lineTo(x,$),t.moveTo(p.x,p.y),t.lineTo(g.x,g.y);const q=Math.hypot(g.x-p.x,g.y-p.y),L=Math.min(10,q/2.1),y=(N,D)=>{if(L<1)return;const B=Math.atan2(D.y-N.y,D.x-N.x),M=Math.PI/6,H=D.x-L*Math.cos(B-M),W=D.y-L*Math.sin(B-M),ie=D.x-L*Math.cos(B+M),oe=D.y-L*Math.sin(B+M);t.moveTo(D.x,D.y),t.lineTo(H,W),t.lineTo(ie,oe),t.closePath()};if(y(g,p),y(p,g),n&&n.stroke&&(n.stroke(),n.restore()),n&&n.fillText&&a.text){n.save(),n.fillStyle=e.textColor||e.color||"#000",n.textAlign="center",n.textBaseline="bottom";let N=V;n.font=`${e.fontStyle||""} ${e.fontWeight||""} ${N}px ${e.fontFamily||"Arial"}`;const D=n.measureText(a.text),B=q*.9;if(D.width>B&&B>0){const ie=B/D.width;N=N*ie,n.font=`${e.fontStyle||""} ${e.fontWeight||""} ${N}px ${e.fontFamily||"Arial"}`}const M=(p.x+g.x)/2,H=(p.y+g.y)/2;let W=Math.atan2(g.y-p.y,g.x-p.x);(W>Math.PI/2||W<-Math.PI/2)&&(W+=Math.PI),n.translate(M,H),n.rotate(W),n.fillText(a.text,0,-N*.2),n.restore()}if(t instanceof Path2D)return t}function nn(){return J(this,null,function*(){yield meta2d.register({arc:en,mtext:tn}),yield meta2d.registerCanvasDraw({dimension:an})})}const rn="original_meta2d";function on(){return localStorage.removeItem(rn)}let ve={};const sn=n=>{const e=document.querySelectorAll("video");let t=null;if(e.forEach(r=>{r.getAttribute("src")===n.video&&(t=r)}),!t)return;t.setAttribute("muted","muted"),t.setAttribute("autoplay","autoplay"),t.setAttribute("loop","loop"),t.setAttribute("crossorigin",""),t.setAttribute("controls",""),t.style.display="none",t.parentElement.style.border="2px solid #ffc878";const a=new JessibucaPro({container:t.parentElement,background:"",hasControl:!1,controlAutoHide:!0,checkFirstIFrame:!0,debug:!1,decoder:"./wasm/decoder-pro.js",forceNoOffscreen:!0,hotKey:!1,hasAudio:!1,hasVideo:!0,hiddenAutoPause:!1,isFlv:!0,isResize:!1,isNotMute:!0,loadingIcon:!0,loadingText:"加载中...",networkDelayTimeoutReplay:!1,playbackForwardMaxRateDecodeIFrame:8,showBandwidth:!1,showPerformance:!1,syncAudioAndVideo:!0,supportDblclickFullscreen:!1,timeout:10,useMSE:!0,useWCS:!1,useSIMD:!0,useVideoRender:!0,useCanvasRender:!1,videoBuffer:.2,videoBufferDelay:1});return n.autoPlay&&n.streamUrl&&a.play(n.streamUrl),ve[n.id]=a,a},ln=()=>{Object.keys(ve).forEach(n=>{ve[n].destroy(),ve[n]=null}),ve={}},cn={class:"sy-empty"},dn={key:1,class:"sy-empty-picture"},un={class:"sy-empty-description"},hn=Object.assign({name:"SyEmpty"},{__name:"index",props:{image:{type:String,default:"empty"},imageSize:{type:Number,default:80},description:{type:String,default:"暂无数据"},onlyText:{type:Boolean,default:!1}},setup(n){c.useCssVars(r=>({a7383bac:a.value.width,v736d2d7a:a.value.height}));const e=n,t=c.computed(()=>({"font-size":e.imageSize?`${e.imageSize}px`:"80px"})),a=c.computed(()=>e.imageSize?{width:e.imageSize*1.2+"px",height:e.imageSize+"px"}:{width:"187px",height:"144px"});return(r,o)=>{const i=c.resolveComponent("SyIcon"),h=c.resolveComponent("el-icon");return c.openBlock(),c.createElementBlock("div",cn,[n.image!=="empty"?(c.openBlock(),c.createElementBlock("span",{key:0,class:"sy-empty-image",style:c.normalizeStyle(t.value)},[n.image!=="loading"?(c.openBlock(),c.createBlock(i,{key:0,name:n.image,gradient:""},null,8,["name"])):(c.openBlock(),c.createBlock(h,{key:1,class:"is-loading",style:{color:"#1671d4"}},{default:c.withCtx(()=>[c.createVNode(c.unref(Qt.Loading))]),_:1}))],4)):n.onlyText?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("span",dn)),c.createElementVNode("div",un,[c.createElementVNode("p",null,c.toDisplayString(n.description),1)])])}}}),mn=Re(hn,[["__scopeId","data-v-247a0fc9"]]),fn=Object.assign({name:"Meta2dEditor"},{__name:"index",props:{url:{type:String,default:""},data:{type:Object,default:()=>{}},local:{type:Boolean,default:!1},preview:{type:Boolean,default:!1},devConfig:{type:Object,default:()=>({isDev:!1,devServerUrl:"",devServerPort:8443})}},emits:["loaded","load-error"],setup(n,{expose:e,emit:t}){const a=t,r=n,o=c.ref(null),i=c.shallowRef(),h=c.computed(()=>!!(r.data||r.url));c.watch(()=>[r.data,r.url],()=>{h.value&&g()});let p=c.ref(!0);function g(){return J(this,null,function*(){try{if(p.value=!0,yield c.nextTick(),!o.value){console.error("未找到meta2d元素!");return}let w=null;if(r.data?w=r.data:r.url&&(w=yield ne()),!w||!w.data){p.value=!1,console.log("图纸数据为空"),a("load-error");return}const x=w.options||{background:"#eee",disableAnchor:!1};if(i.value&&(i.value.destroy(!0),i.value=null),!o.value){console.error("Meta2D 容器元素不可用");return}i.value=new G.Meta2d(o.value,l({},x)),x.visibleLevel&&i.value.scale(x.visibleLevel),V(),ee(),yield re(w.data),i.value.render(),Y(),setTimeout(()=>{window.meta2dTools&&window.registerToolsNew()},1e3),a("loaded",i.value)}catch(w){console.error("初始化编辑器失败:",w)}})}function V(){if(!i.value)return;new Za({}).initPlugin(i.value,"mindNode",{})}function ee(){nn(),G.register(jt.classPens()),G.register($e.flowPens()),G.registerAnchors($e.flowAnchors()),G.register(qe.sequencePens()),G.registerCanvasDraw(qe.sequencePensbyCtx()),G.register(ze.activityDiagram()),G.registerCanvasDraw(ze.activityDiagramByCtx()),G.registerCanvasDraw(zt.formPens()),G.registerCanvasDraw(Xt.chartsPens()),G.register(Oe.ftaPens()),G.registerAnchors(Oe.ftaAnchors()),G.registerCanvasDraw(Oe.ftaPensbyCtx())}function re(w){var x;if(i.value){if(typeof w.locked=="undefined"&&(w.locked=0),w.bkImage&&i.value.setBackgroundImage(w.bkImage),w.pens&&w.pens.length>0){const $=[];w.pens.forEach(y=>{y.name==="video"&&y.streamUrl?$.push(y):y.name==="image"&&y.image?y.image=Ya(y.image,r.devConfig):y.lineType==="gisLine"?y.visible=!r.preview:y.penType===S.TABLE&&y.dataType?X(y):y.penType===S.GIS_SENSOR_WRAPPER&&r.preview&&(y.title="")}),$.length>0&&setTimeout(()=>{$.forEach(y=>{sn(y)})},500);const q=window.meta.graph.penCountThreshold||2e3;w.pens.length>q&&w.scale&&w.pens.forEach(y=>{const N=y.visibleLevel;N!==void 0?(y.visible=w.scale>=N,y.visible||(y.disabled=!0,y.locked=G.LockState.Disable)):(y.visible=!0,y.disabled=!1,y.locked=G.LockState.None)})}i.value.open(w),!r.preview&&((x=w.networks)!=null&&x.length)&&i.value.closeNetwork()}}const X=w=>J(this,null,function*(){var $;const x=yield ue.getCommonApi(ta[w.dataType],{offset:0,limit:w.tableSize||10});if(($=x.data)!=null&&$.length){const q=w.tableHeader||[{prop:"id",label:"ID"},{prop:"guid",label:"标识"},{prop:"name",label:"名称"}],L=x.data.map(y=>q.filter(N=>N.isShow).map(N=>{const D=y[N.prop];return N.choices?N.choices[D]||D:Ne.isObject(D)?D.name:D}));i.value.setValue({id:w.id,dataY:L})}else i.value.setValue({id:w.id,dataY:[]})}),Y=()=>{i.value&&(i.value.on("scale",R),r.preview||i.value.on("connectLine",se))},R=Ne.debounce(w=>{var x,$,q,L;try{if(!i.value)return;Be.emit("graph-scale",w);let y=i.value.store.data.pens;const N=window.meta.graph.penCountThreshold||2e3,D=y.length>N;for(let B=0;B<y.length;B++){const M=y[B];if([S.VIDEO_STREAM,S.MP4].includes(M.penType)){if((($=(x=fe.videos[M.id])==null?void 0:x.children)==null?void 0:$.length)===3){let H=fe.videos[M.id].children[0],W=fe.videos[M.id].children[2];H.style.width=W.currentTime/W.duration*M.calculative.worldRect.width+"px"}else if(((L=(q=fe.videos[M.id])==null?void 0:q.children)==null?void 0:L.length)===2){let H=fe.videos[M.id].children[0],W=fe.videos[M.id].children[1];H.style.width=W.currentTime/W.duration*M.calculative.worldRect.width+"px"}}if(D){const H=M.visibleLevel!==void 0?w>=M.visibleLevel:!0;i.value._setValue({id:M.id,visible:H,disabled:!H,locked:H?G.LockState.None:G.LockState.Disable})}}i.value.render()}catch(y){console.error("处理缩放失败:",y)}},500),se=q=>J(this,[q],function*({line:w,lineAnchor:x,pen:$}){var oe;if(x!=null&&x.start||($==null?void 0:$.penType)!==S.GIS_SENSOR)return;const L=(oe=w==null?void 0:w.calculative)==null?void 0:oe.worldAnchors;if(L.length!==2||L!=null&&L.some(te=>!te.connectTo))return;const[y,N]=L;if(y.connectTo===N.connectTo)return;const D=window.meta2d.findOne(y.connectTo),B=window.meta2d.findOne(N.connectTo);let M=D==null?void 0:D.bindData,H=B==null?void 0:B.bindData;if(!M||!H)return;const W=yield ue.postPDApi("setchannelpaired/",{data:[{channel1:M.guid,channel2:H.guid}]}),ie=yield ue.postCommonApi("sgpoint",{ln__in:`${M.guid},${H.guid}`,group_number__in:6});W.success&&ie.success?(i.value.setValue({id:w.id,color:"#00d200",lineDash:[3,3],lineWidth:2,lineType:"gisLine"}),j.ElMessage.success("配对成功")):j.ElMessage.error("配对失败",W.detail||ie.detail)});function ne(){return J(this,null,function*(){if(!r.url)return j.ElMessage.error("图纸路径为空!"),null;try{return(yield ue.getGraphApi(r.url,{local:r.local}))||null}catch(w){return null}})}const le=()=>{i.value&&(i.value.resize(),i.value.fitView(!0,10))};return c.onMounted(()=>{var w,x;h.value&&(w=o.value)!=null&&w.clientHeight&&(x=o.value)!=null&&x.clientWidth&&g(),window.addEventListener("resize",le)}),c.onUnmounted(()=>{ln(),on(),i.value&&(r.preview?(wt.clearLineCross(),i.value.destroy(!0)):i.value.off("scale",R)),window.removeEventListener("resize",le)}),e({stage:i}),(w,x)=>(c.openBlock(),c.createElementBlock("div",{ref_key:"meta2dRef",ref:o,class:"meta2d-editor"},[c.unref(p)?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(mn,{key:0,class:"meta2d-empty",description:"图纸不存在"}))],512))}}),pn=Re(fn,[["__scopeId","data-v-f157e247"]]),An={key:0,class:"back-btn"};var At,gt;const gn=Object.assign({name:"Meta2dPreview"},{__name:"index",props:{url:{type:String,default:""},gid:{type:String,default:""},data:{type:Object,default:null},local:{type:Boolean,default:!1},lang:{type:String,default:((gt=(At=window.meta)==null?void 0:At.app)==null?void 0:gt.lang)||"zh-cn"},config:{type:Object,default:()=>({socketUrl:Xe,stationIdKey:at,enableToken:!0,userTokenKey:tt,userToken:void 0,messageDelay:200,debounceDelay:100,enableAutoFit:!0,enableWebSocket:!0,graphSocket:je.GRAPH.SOCKET})},showMap:{type:Boolean,default:!1},isFactory:{type:Boolean,default:!1},isInitData:{type:Boolean,default:!0},apiInstance:{type:Object,default:()=>ue},mittInstance:{type:Object,default:()=>Be},customCallbacks:{type:Object,default:()=>({})},errorHandler:{type:Object,default:()=>({callback:null,showMessage:!0})},devConfig:{type:Object,default:()=>({isDev:!1,devServerUrl:"",devServerPort:8443})}},emits:["error","loaded","custom-msg","socket-msg","view-history"],setup(n,{expose:e,emit:t}){const a=t,r=n;let o=c.ref(!1),i=c.ref(""),h=c.ref(""),p=c.ref(!1);const g=c.ref(null),V=c.ref(null),ee=c.ref(null),re=c.ref(""),X=c.ref(""),Y=c.ref(!1),R=c.computed(()=>{var s;return(s=ee.value)==null?void 0:s.stage}),se=c.computed(()=>{var s;return(s=R.value)==null?void 0:s.store}),ne=c.computed(()=>l({socketUrl:Xe,stationIdKey:at,enableToken:!0,userTokenKey:tt,userToken:void 0,messageDelay:200,debounceDelay:100,enableAutoFit:!0,fitPadding:10,enableWebSocket:!0,graphSocket:je.GRAPH.SOCKET},r.config)),le=()=>r.apiInstance||ue,w=()=>r.mittInstance||Be,x=(s,d="")=>{const _={error:s,message:d,timestamp:new Date().toISOString()};a("error",_),r.errorHandler.callback?r.errorHandler.callback(_):r.errorHandler.showMessage&&j.ElMessage&&j.ElMessage.error(`${d}: ${s.message||s}`)},$=()=>{i.value?(X.value=i.value,Y.value=p.value):h.value&&(re.value=h.value,_e(re.value)),o.value=!1},q={},L=c.ref(!1),y=c.ref({left:0,top:0}),N=c.ref(!1),D=()=>{N.value=!1,L.value=!1,y.value={left:0,top:0},oe.value={}},B=()=>{N.value=!0},M=s=>{a("view-history",s)},H=(s,d)=>{if(!g.value)return{left:s+20,top:d+20};const _=g.value.getBoundingClientRect(),C=s-_.left,k=d-_.top;let T=300,I=150;if(V.value){const v=V.value.$el||V.value;v&&v.offsetWidth&&(T=v.offsetWidth,I=v.offsetHeight)}let m=C+20,E=k+20;return m+T>_.width&&(m=C-T-20),E+I>_.height&&(E=k-I-20),{left:Math.max(0,Math.min(m,_.width-T)),top:Math.max(0,Math.min(E,_.height-I))}},W=s=>{L.value&&(y.value.left||(y.value=H(s.clientX,s.clientY)))},ie=s=>{var d,_,C,k,T,I;try{if(!s)return;if((d=s==null?void 0:s.includes)!=null&&d.call(s,"token 必传"))return j.ElMessage.warning(s);const m=typeof s=="string"?JSON.parse(s):s;if((m==null?void 0:m.data)==="服务错误"||(C=(_=m==null?void 0:m.data)==null?void 0:_.includes)!=null&&C.call(_,"token is expired"))return j.ElMessage.warning(m.data);switch(a("socket-msg",m),m.action){case Le.ACPOINT.YCVALUE:case Le.ACPOINT.YXVALUE:if((k=m==null?void 0:m.data)!=null&&k.point_id){const E=R.value.find(m.data.point_id);E&&(q[m.data.point_id]=m.action===Le.ACPOINT.YXVALUE?Se(m.data.value)?m.data.value:0:Se(m.data.value_disp||m.data.value)?m.data.value_disp||m.data.value:0,Ee(E,m.data))}break;default:if(((T=m.data)==null?void 0:T.length)>0){const E=setTimeout(()=>{clearTimeout(E),R.value&&(m.data.forEach(v=>{q[v.dataId||v.point_id]=v.value_disp||v.value}),m.data.forEach(v=>{const b=R.value.find(v.dataId||v.point_id);Ee(b,v)}))},ne.value.messageDelay);r.customCallbacks.onWebSocketMessage&&r.customCallbacks.onWebSocketMessage(m),(I=window.customSocketFn)==null||I.call(window,s)}break}return!0}catch(m){return x(m,"WebSocket消息处理"),!0}},oe=c.ref({});let te={},we=null;const Pt=s=>J(this,null,function*(){try{if(s.msgName)switch(s.msgName){case Z.CHANGE_GRAPH:case Z.NOTIFY_DIALOG:case Z.GIS_PROPS_PANEL:We(s);break}else We(s);a("custom-msg",s),r.customCallbacks.onCustomMessage&&r.customCallbacks.onCustomMessage(s)}catch(d){x(d,"自定义消息处理")}}),We=s=>{var C,k;let d;if(s.params)try{d=JSON.parse(s.params)}catch(T){d=s.params}switch(s.msgName){case Z.CHANGE_GRAPH:(d==null?void 0:d.data)!=="图纸id"&&(d!=null&&d.data)?(i.value=X.value,p.value=Y.value,o.value=d.isBack,(C=d==null?void 0:d.data)!=null&&C.startsWith("/")?(X.value=d==null?void 0:d.data,Y.value=!0):(Y.value=!1,h.value=_e(d.data))):d?(Y.value=!1,h.value=re.value,o.value=!0,_e(d)):console.warn("切换图纸信息为空");break;case Z.NOTIFY_DIALOG:d.msg!=="通知内容"?j.ElNotification(l({message:d.msg},d)):console.warn("通知内容为空");break;case Z.GIS_PROPS_PANEL:s.eventName==="enter"?(L.value=!0,s.pen.penType===S.GIS_SENSOR?oe.value=((k=s==null?void 0:s.pen)==null?void 0:k.bindData)||{}:s.pen.penType===S.GIS_SENSOR_WRAPPER&&s.pen.children.forEach(T=>{const I=R.value.findOne(T);I&&I.penType===S.GIS_SENSOR&&(oe.value=I.bindData||{})}),s.e&&(y.value=H(s.e.clientX,s.e.clientY))):setTimeout(()=>{N.value||(L.value=!1,y.value={left:0,top:0},oe.value={})},200);break}},Rt=s=>{var d,_,C,k,T,I,m,E,v;try{a("loaded",s);const b=Ge(),u=ne.value,A=Ze.getSession(u.stationIdKey),z=Ze.getSession(u.userTokenKey);u.enableWebSocket&&A&&z&&((C=(_=(d=s.store)==null?void 0:d.data)==null?void 0:_.networks)!=null&&C.length?(I=(T=(k=s.store)==null?void 0:k.data)==null?void 0:T.networks)==null||I.forEach(Q=>{var he;Q.protocol==="websocket"&&((he=Q.url)!=null&&he.includes("station_id")||(Q.url=`${Q.url}?station_id=${A}`),u.enableToken?Q.protocols=u.userToken||z:Q.protocols=void 0)}):(E=(m=s.store)==null?void 0:m.data)!=null&&E.websocket?((v=s.store.data.websocket)!=null&&v.includes("station_id")||(s.store.data.websocket=`${s.store.data.websocket}?station_id=${A}`),u.enableToken?s.store.data.websocketProtocols=u.userToken||z:s.store.data.websocketProtocols=void 0,s.closeSocket(),s.connectSocket()):(s.store.data.websocket=`${u.socketUrl}?station_id=${A}`,u.enableToken?s.store.data.websocketProtocols=z:s.store.data.websocketProtocols=void 0,s.connectWebsocket())),(r.showMap||b.showMap==="true")&&s.showMap(),s.setRule({rule:!1}),s.setOptions({disableRuleLine:!0}),s.setGrid({grid:!1}),s.lock(G.LockState.DisableEdit),De().forEach(Q=>{var he;(he=Q==null?void 0:Q.events)!=null&&he.length?K({id:Q.id,locked:1},!1):K({id:Q.id,locked:10},!1)}),s.render(),u.enableAutoFit&&s.fitView(!0,u.fitPadding),Object.values(Z).forEach(Q=>{s.on(Q,he=>Pt(P(l({},he),{msgName:Q})))}),s&&(s.socketFn=ie),r.customCallbacks.onStageLoaded&&r.customCallbacks.onStageLoaded(s),r.isInitData&&kt(s),window.addEventListener("mousemove",W)}catch(b){x(b,"图纸加载完成处理")}},_e=Ne.throttle(s=>J(this,null,function*(){var d;try{if(window.isFactory=r.isFactory,r.url){Y.value=r.local,yield ke(r.url);return}const _=Ge();if(s=s||r.gid||_.id,_.local==="true"&&(Y.value=!0),s){const C=le();if(C&&C.getCommonApi){const k=yield C.getCommonApi(r.isFactory?"graph":"floorplan",{guid:s});if((d=k.data)!=null&&d.length)yield ke(k.data[0].path);else{const T="未找到图纸!";x(new Error(T),"获取图纸数据")}}else x(new Error("API实例不可用"),"初始化图纸数据!")}else Y.value=r.local,yield ke(r.url);r.customCallbacks.onGraphLoaded&&r.customCallbacks.onGraphLoaded(X.value)}catch(_){x(_,"获取图纸数据失败")}})),ke=s=>J(this,null,function*(){const d=s.split(".");if(s.includes(r.lang)||d.length!==3){X.value=s;return}const _=`${d[0]}.${r.lang}.${d[2]}`;try{const C=yield ue.getGraphApi(_,{local:r.local}).catch(()=>{console.warn("多语言图纸不存在,使用默认图纸")});X.value=C?_:s}catch(C){X.value=s}}),kt=s=>J(this,null,function*(){var d,_,C,k;if(s){let T=[],I=[],m=[];te={};const E=s.store.data.pens;for(let b=0;b<E.length;b++){const u=E[b];u.bindDataId?(d=u.form)!=null&&d.length?u.form.forEach(A=>{if(A.dataIds.dataId)switch(A.dataIds.dataType){case F.YC:T.push(P(l({},A),{nodeName:A.dataIds.name,penId:u.id,penName:u.penName}));break;case F.YX:I.push(P(l({},A),{nodeName:A.dataIds.name,penId:u.id,penName:u.penName}));break;case F.SG:I.push(P(l({},A),{nodeName:A.dataIds.name,penId:u.id,penName:u.penName}));break;case F.POINT:m.push(P(l({},A),{nodeName:A.dataIds.name,penId:u.id,penName:u.penName}));break}}):(u.penType===S.GIS_SENSOR||u.penType===S.GIS_DB_VALUE)&&u.bindData&&(te[u.bindData.ied_id]||(te[u.bindData.ied_id]=[]),K({id:u.id,title:void 0}),te[u.bindData.ied_id].push(l({penId:u.id,penType:u.penType},u.bindData))):(_=u.statusBindData)!=null&&_.length&&u.statusBindData.forEach(A=>{if(A.dataId)switch(A.dataType){case F.YX:I.push({showChild:0,value:0,nodeName:A.dataName,penId:u.id,penName:u.penName,dataId:A.dataId});break;case F.SG:I.push({showChild:0,value:0,nodeName:A.dataName,penId:u.id,penName:u.penName,dataId:A.dataId});break}})}let v=[];if(T.length){const b=le();if(b&&b.postCommonApi){const u=yield b.postCommonApi("queryrealtimepoint",{point_id:T.map(A=>{var z;return((z=A==null?void 0:A.dataIds)==null?void 0:z.dataId)||A.dataId}).join(",")});(C=u==null?void 0:u.data)!=null&&C.length&&(u.data.forEach(A=>{q[A.guid]=A.value_disp||A.value}),v=[...v,...u.data])}}if(I.length){const b=le();if(b&&b.postCommonApi){const u=yield b.postCommonApi("queryrealtimepoint",{point_id:I.map(A=>{var z;return((z=A==null?void 0:A.dataIds)==null?void 0:z.dataId)||A.dataId}).join(",")});(k=u==null?void 0:u.data)!=null&&k.length&&(u.data.forEach(A=>{q[A.guid]=Ue(A.value)?Number(A.value):A.value}),v=[...v,...u.data])}}v.length&&v.forEach(b=>{const u=s.find(b.guid);Ee(u,P(l({},b),{value:Ue(b.value)?Se(Number(b.value))?Number(b.value):0:b.value,value_disp:b.value_disp,alarm_value:b.alarm_value,point_id:b.guid}))}),te&&Object.keys(te).length?(we&&clearInterval(we),Ke(),we=setInterval(()=>{Ke()},3e3)):we&&clearInterval(we)}}),Ke=()=>J(this,null,function*(){var s;if(te){const d=Object.keys(te);if(d.length){const _=yield ue.postPDApi("querychannelstatus/",{data:d.map(C=>({ied_id:C,ln_list:te[C].map(k=>k.ln_id)}))});(s=_==null?void 0:_.data)!=null&&s.length&&(d.forEach(C=>{const k=_.data.find(I=>I.ied_id===C),T=te[C];T!=null&&T.length&&T.forEach(I=>{const m=k.result.find(E=>E.ln_id===I.ln_id);if(m){const E=Ue(m.amp_peak)?Se(Number(m.amp_peak))?Number(m.amp_peak):0:m.amp_peak;I.penType===S.GIS_SENSOR?K({id:I.penId,showChild:m.status==="告警"?2:m.status==="正常"?1:0,bindData:P(l({},I),{status:m.status,value:E})},!1):K({id:I.penId,text:`${E} dBm`},!1)}})}),R.value.render())}}}),K=(s,d=!0)=>{if(R.value)return R.value.setValue(s,{render:d})},Dt=()=>R.value,De=()=>{var s,d;return((d=(s=se.value)==null?void 0:s.data)==null?void 0:d.pens)||[]},Mt=()=>S,Ee=(()=>{let s=null;const d=new Map,_=new Map,C=T=>{var m;if(!((m=T.children)!=null&&m.length))return[];const I=T.id||"";if(!I)return[];if(!_.has(I)&&se.value){const E=G.getAllChildren(T,se.value);_.set(I,E)}return _.get(I)||[]},k=()=>{if(d.size===0||!R.value||!se.value)return;const T=[],I=[],m=se.value.animates;d.forEach(({pen:E,dataItem:v,formKey:b})=>{switch(b){case"showChild":K({id:E.id,showChild:+v.value},!1);break;case"text":K({id:E.id,text:v.value_disp||v.value},!1);break;case"light_plate":{const u=v.value===-1||et(v)?"#999999":Nt[v.value!==void 0?v.value:v.alarm_value],A=v.value===-1||et(v)?"#cccccc":xt[v.value!==void 0?v.value:v.alarm_value];K({id:E.id,textColor:u,background:A},!1)}break;case"point_value":E.penType===S.POINT_VALUE&&C(E).forEach(A=>{A.name==="text"&&K({id:A.id,text:v.value},!1)});break;case"online_state":{let u=v.value?void 0:"contrast(0%)";K({id:E.id,filter:u},!1),C(E).forEach(z=>{K({id:z.id,filter:u},!1)})}break;case"charged_state":{const u=v.value===Jt.OFFLINE?"contrast(0%)":void 0;u!==E.filter&&(K({id:E.id,filter:u},!1),C(E).forEach(z=>{K({id:z.id,filter:u},!1)}))}break;case"electric_direction":v.value===Zt.STOP?m!=null&&m.has(E)&&I.push(E):!!v.value!==E.animateReverse&&(K({id:E.id,animateReverse:!!v.value},!1),m!=null&&m.has(E)||T.push(E));break;case"electric_size":{const u=ea[v.value];u!==void 0&&u!==E.lineWidth&&K({id:E.id,lineWidth:u},!1)}break;default:K({id:E.id,[b]:v.value},!1);break}}),I.length>0&&R.value.stopAnimate(I),T.length>0&&R.value.startAnimate(T),d.clear(),R.value.render()};return(T,I)=>{T!=null&&T.length&&(T.forEach(m=>{var v;const E=m.form;if((v=m.statusBindData)!=null&&v.length){if(!q[I.guid])return;const b=[...m.statusBindData],u=b.findIndex(A=>A.dataId===I.guid);if(u!==-1){const A=b[u];b.find(ae=>A.sort<ae.sort&&q[ae.dataId])||d.set(m.id,{pen:m,formKey:"showChild",dataItem:P(l({},I),{value:u})})}}else E!=null&&E.length&&E.forEach(b=>{if(!(Array.isArray(b.dataIds)?b.dataIds:[b.dataIds]).some(ae=>(ae==null?void 0:ae.dataId)&&((ae==null?void 0:ae.dataId)===I.dataId||(ae==null?void 0:ae.dataId)===I.point_id)))return;const z=`${m.id}-${b.key}`;d.set(z,{pen:m,dataItem:I,formKey:b.key})})}),s&&clearTimeout(s),s=setTimeout(()=>{k(),s=null},ne.value.debounceDelay))}})(),Ot=s=>{if(R.value){for(let d=0;d<s.length;d++){const _=s[d];q[_.dataId||_.point_id]=_.value_disp||_.value;const C=R.value.find(_.dataId);setTimeout(()=>{Ee(C,_)},ne.value.messageDelay)}R.value.render(),r.customCallbacks.onBatchUpdate&&r.customCallbacks.onBatchUpdate(s)}},Lt=(s,d=!1)=>{if(!R.value)return;const _=De();for(let C=0;C<_.length;C++){const k=_[C];let T=!1;d?T=s===k.dataProp:T=s===5?!0:k.dataProp<=s,K({id:k.id,visible:T},!1)}R.value.fitView(),R.value.render(),r.customCallbacks.onLevelChange&&r.customCallbacks.onLevelChange(s,d)};return c.watch(()=>[r.gid,r.url,r.data,r.lang,r.local,r.isFactory],()=>{_e()}),c.watch(()=>r.showMap,s=>{R.value&&(s?R.value.showMap():R.value.hideMap())}),c.onMounted(()=>{const s=w();s&&s.on&&s.on(ne.value.graphSocket,ie);const d=Ge();re.value=r.gid||d.id,_e()}),c.onUnmounted(()=>{te=null;const s=w();s&&s.off&&s.off(ne.value.graphSocket,ie),window.removeEventListener("mousemove",W)}),e({setValue:K,getStage:Dt,getAllPens:De,getCustomPenType:Mt,batchUpdatePen:Ot,handleLineCross:wt.handleLineCross,changeVisibleByLevel:Lt}),(s,d)=>(c.openBlock(),c.createElementBlock("div",{ref_key:"previewRef",ref:g,class:"meta2d-preview"},[c.createVNode(pn,{ref_key:"graphRef",ref:ee,url:X.value,local:Y.value,data:r.data,"dev-config":r.devConfig,preview:"",onLoaded:Rt},null,8,["url","local","data","dev-config"]),c.unref(o)?(c.openBlock(),c.createElementBlock("div",An,[c.createVNode(c.unref(j.ElButton),{type:"primary",onClick:$},{default:c.withCtx(()=>[...d[0]||(d[0]=[c.createTextVNode("返回",-1)])]),_:1})])):c.createCommentVNode("",!0),L.value?(c.openBlock(),c.createBlock(Ja,{key:1,ref_key:"panelRef",ref:V,data:oe.value,style:c.normalizeStyle({top:y.value.top+"px",left:y.value.left+"px",position:"absolute"}),onClose:D,onEnter:B,onViewHistory:M},null,8,["data","style"])):c.createCommentVNode("",!0)],512))}}),ye=Re(gn,[["__scopeId","data-v-3c3d18e7"]]);ye.name||(ye.name="SyGraph");const wn=n=>{n.component(ye.name||"SyGraph",ye)},_n={install:wn};exports.SyGraph=ye;exports.default=_n;