mixdashboards 1.1.50 → 1.1.52

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.
@@ -3942,8 +3942,8 @@ ${v}`},color:f.textColor,fontSize:f.textSize}}],yAxis:[{type:"value",nameGap:10,
3942
3942
  </div>`}),p},textStyle:{align:"left",fontSize:f.textSize}},grid:{top:f.top,bottom:f.bottom,left:f.left,right:f.right,containLabel:!1},legend:{show:!0,data:this.props.conf.data.map(h=>h.name),right:20,top:0,textStyle:{color:f.textColor,fontSize:f.textSize}},xAxis:[{type:"category",data:this.getXAxisData(),axisTick:{alignWithLabel:!0},axisLine:{lineStyle:{color:f.textColor}},axisLabel:{formatter:h=>{if(!/^\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}$/.test(h))return h;const[p,m]=h.split(" ");return`${p}
3943
3943
  ${m}`},color:f.textColor,fontSize:f.textSize}}],yAxis:[{type:"value",max:100,nameGap:10,nameTextStyle:{align:"right"},splitLine:{lineStyle:{type:"dashed",color:"#e5e5e5"}},axisLabel:{color:f.textColor,fontSize:f.textSize,formatter:"{value}%"},axisLine:{lineStyle:{color:f.textColor}},splitNumber:4}],series:this.formatSeries()}}formatSeries(){var b,x,_;const f=this.props.conf,h=this.Style.value,p=this.getFixedStatisticsXLabels(),m=(b=this.historyCache)==null?void 0:b.seriesData,v=(_=(x=m==null?void 0:m[0])==null?void 0:x.length)!=null?_:p?p.length:h.points,g=m!=null&&m.length?m:f.data.map(()=>vu({num:v,max:200,min:0,mode:this.props.mode,hasDataSource:this.hasData()})),y=this.calcPercentData(g);return f.data.map((w,S)=>{const C=w.color||Hs[S];return{type:"bar",stack:"total",data:y[S],name:w.name,itemStyle:{color:C},label:{show:h.showLabel,position:"inside",color:"#fff",formatter:E=>E.value+"%"},barWidth:h.barWidth+"%"}})}setSocketData(f){var S;if(!this.hasData()||!this.chartObj||!f)return;const{data:h,common:p}=this.props.conf,m=p.source||"mosaic",v=this.chartObj.getOption(),g=(S=h[0])==null?void 0:S.periodUnit,y=["statistics","calculate"].includes(m)&&g&&!String(g).startsWith("near");if(h.forEach((C,E)=>{const T=this.extractDataValue(f,C.fv);if(["statistics","calculate"].includes(m)&&C.periodUnit&&!String(C.periodUnit).startsWith("near")&&!String(C.periodUnit).startsWith("last")){const M=Iv(f.start_time,C.periodUnit),D=M?v.xAxis[0].data.indexOf(M):-1;D>=0&&(v.series[E].data[D]=T);return}const A=["statistics","calculate"].includes(m)?f.start_time:f.datetime;A!=null&&(E===0&&v.xAxis[0].data.push(A),v.series[E].data.push(T))}),y){const C=v.series.map(T=>[...T.data]);this.syncHistoryCache(v.xAxis[0].data,C);const E=this.calcPercentData(C);v.series.forEach((T,A)=>{T.data=E[A]}),this.updateChart(v);return}const b=n3(v.xAxis[0].data,v.series.map(C=>C.data)),x=Number(this.Style.value.points)||10;v.xAxis[0].data=b.times.slice(-x);const _=b.data.map(C=>C.slice(-x));this.syncHistoryCache(v.xAxis[0].data,_);const w=this.calcPercentData(_);v.series.forEach((C,E)=>{C.data=w[E]}),this.updateChart(v)}setHistoryData(f){var _;if(!(f!=null&&f.length))return;const h=f[0];if(!((_=h==null?void 0:h.time)!=null&&_.length))return;const p=Number(this.Style.value.points)||10,{data:m}=this.props.conf,v=w=>{if(w==null||w===""||w==="-")return null;const S=Number(w);return Number.isFinite(S)?S:null},g=this.getFixedStatisticsXLabels();let y;const b=[];g!=null&&g.length?(y=[...g],f.forEach((w,S)=>{var D;const C=m[S],E=(C==null?void 0:C.periodUnit)||((D=m[0])==null?void 0:D.periodUnit),T=new Array(g.length).fill(null),A=w.time||[],M=w.data||[];for(let k=0;k<A.length;k++){const P=Iv(A[k],String(E||"")),I=P?g.indexOf(P):-1;I>=0&&(T[I]=v(M[k]))}b[S]=T})):(y=h.time.slice(-p),f.forEach((w,S)=>{const C=w.data||[];b[S]=C.map(v).slice(-p)})),this.syncHistoryCache(y,b);const x=this.calcPercentData(b);this.updateChart({xAxis:[{data:y}],series:x.map(w=>({data:w}))})}}const i=new r(e,"percentBar");i.setupLifecycle();const a=Na();o.onMounted(()=>{var d;if(a.registerInstance(e.uid,i),e.mode==="preview"){const f=((d=i.getChartInstance)==null?void 0:d.call(i))||i.chartObj;f==null||f.off("click"),f==null||f.on("click",h=>{var m,v,g,y,b,x;const p=h==null?void 0:h.seriesName;if(typeof p=="string"&&p){const _=((v=(m=e.conf)==null?void 0:m.options)==null?void 0:v.linkChannel)==="custom"?(y=(g=e.conf)==null?void 0:g.options)==null?void 0:y.customChannel:(x=(b=e.conf)==null?void 0:b.options)==null?void 0:x.linkChannel;t.publish(_||"percentBar","percentBar",{objectId:"",deviceId:"",type:"select",fieldKey:p,fv:Ne({key:p},h),source:"percentBar"})}})}}),o.onUnmounted(()=>{a.unregisterInstance(e.uid)});const s=i.getStyle(),l=i.getEchartId(),c=e.conf,u=o.computed(()=>$n(e.conf.options));return(d,f)=>(o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({background:o.unref(s).bgColor,borderRadius:`${o.unref(s).radiusSize}px`})},[o.createElementVNode("div",{class:"mix-title",style:o.normalizeStyle(u.value)},o.toDisplayString(o.unref(c).caption||o.unref(c).name),5),o.createElementVNode("div",Klt,[o.createElementVNode("div",{class:"w-full h-full",id:o.unref(l)},null,8,Jlt)]),o.renderSlot(d.$slots,"default",{},void 0,!0)],4))}})),oct=Dt(act,[["__scopeId","data-v-27b13345"]]),sct=Object.freeze(Object.defineProperty({__proto__:null,default:oct},Symbol.toStringTag,{value:"Module"})),lct="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e排行%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-199.000000,%20-376.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M200.293678,376.279562%20C200.619547,376.279562%20200.888858,376.521717%20200.93148,376.835897%20L200.937356,376.92324%20L200.937356,390.992205%20L215.006322,390.992205%20C215.332191,390.992205%20215.601502,391.23436%20215.644124,391.54854%20L215.65,391.635883%20C215.65,391.961753%20215.407845,392.231063%20215.093665,392.273686%20L215.006322,392.279562%20L200.293678,392.279562%20C199.967809,392.279562%20199.698498,392.037407%20199.655876,391.723227%20L199.65,391.635883%20L199.65,376.92324%20C199.65,376.567746%20199.938185,376.279562%20200.293678,376.279562%20Z%20M206.65,386.731669%20C207.202285,386.731669%20207.65,387.179384%20207.65,387.731669%20L207.65,388.183776%20C207.65,388.736061%20207.202285,389.183776%20206.65,389.183776%20L203.563155,389.183776%20L203.563155,386.731669%20L206.65,386.731669%20Z%20M209.919476,382.644823%20C210.471761,382.644823%20210.919476,383.092539%20210.919476,383.644823%20L210.919476,384.096931%20C210.919476,384.649216%20210.471761,385.096931%20209.919476,385.096931%20L203.563155,385.096931%20L203.563155,382.644823%20L209.919476,382.644823%20Z%20M212.371584,378.557978%20C212.923868,378.557978%20213.371584,379.005693%20213.371584,379.557978%20L213.371584,380.010085%20C213.371584,380.56237%20212.923868,381.010085%20212.371584,381.010085%20L203.563155,381.010085%20L203.563155,378.557978%20L212.371584,378.557978%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",cct="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e排行%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-199.000000,%20-376.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M200.293678,376.279562%20C200.619547,376.279562%20200.888858,376.521717%20200.93148,376.835897%20L200.937356,376.92324%20L200.937356,390.992205%20L215.006322,390.992205%20C215.332191,390.992205%20215.601502,391.23436%20215.644124,391.54854%20L215.65,391.635883%20C215.65,391.961753%20215.407845,392.231063%20215.093665,392.273686%20L215.006322,392.279562%20L200.293678,392.279562%20C199.967809,392.279562%20199.698498,392.037407%20199.655876,391.723227%20L199.65,391.635883%20L199.65,376.92324%20C199.65,376.567746%20199.938185,376.279562%20200.293678,376.279562%20Z%20M206.65,386.731669%20C207.202285,386.731669%20207.65,387.179384%20207.65,387.731669%20L207.65,388.183776%20C207.65,388.736061%20207.202285,389.183776%20206.65,389.183776%20L203.563155,389.183776%20L203.563155,386.731669%20L206.65,386.731669%20Z%20M209.919476,382.644823%20C210.471761,382.644823%20210.919476,383.092539%20210.919476,383.644823%20L210.919476,384.096931%20C210.919476,384.649216%20210.471761,385.096931%20209.919476,385.096931%20L203.563155,385.096931%20L203.563155,382.644823%20L209.919476,382.644823%20Z%20M212.371584,378.557978%20C212.923868,378.557978%20213.371584,379.005693%20213.371584,379.557978%20L213.371584,380.010085%20C213.371584,380.56237%20212.923868,381.010085%20212.371584,381.010085%20L203.563155,381.010085%20L203.563155,378.557978%20L212.371584,378.557978%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",uct={key:0,class:"mix-title-unit"},dct={class:"mix-body"},fct=["id"],hct={DEFAULT_ICON:lct,ACTIVE_ICON:cct,NAME_CN:"排行",NAME_EN:"Ranking",ORDER:1,PLATFORM:["pc","screen","mobile"]},pct={titleColor:"#111",titleSize:14,textColor:"#111",bgColor:"#fff",top:30,bottom:40,left:64,right:30,radiusSize:8,textSize:12,barWidth:50,direction:{value:"x",type:"radio",option:[{value:"x",label:"component.options.x"},{value:"y",label:"component.options.y"}],label:"component.options.direction"},realSort:!1,sortType:{value:"desc",type:"radio",option:[{value:"desc",label:"component.options.desc"},{value:"asc",label:"component.options.asc"}],label:"component.options.sortType",dependent:"realSort"},isHideTitle:!1,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4},mct=[{name:"参数一",fv:"",object_id:"",color:"#4162ff"}],vct=["name","fv","object_id","color"],gct=["mosaic"],yct={useAlias:!1,multiObject:!1,source:"mosaic",valueUnit:"",showPlanCompletionRate:!1},bct={DEFAULT:hct,OPTIONS:pct,DATA:mct,PARAMS:vct,SOURCE:gct,COMMON:yct},xct=o.defineComponent(tt(Ne({},bct),{__name:"raceBar",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(n){Ln([Do,Ba,Zi,Va,zi,Hg]);const e=n;function t(p,m,v){const g=p==null?void 0:p[m];return g==null?v:typeof g=="object"&&"value"in g?g.value:g}function r(p){return String(p).replace(/[|{}]/g,m=>({"|":"|","{":"﹛","}":"﹜"})[m]||m)}class i extends Mr{constructor(){super(...arguments),this.CHART={rawValues:[],items:[],colors:[],times:[]}}parseNumericRaw(m){if(m==="--"||m===null||m===void 0||m==="")return null;const v=typeof m=="number"?m:Number(m);return Number.isFinite(v)?v:null}ensureCommonFields(){const m=this.props.conf;(!m.common||typeof m.common!="object")&&(m.common={useAlias:!1,multiObject:!1,source:"mosaic"});const v=m.common;v.valueUnit===void 0&&(v.valueUnit=""),v.showPlanCompletionRate===void 0&&(v.showPlanCompletionRate=!1)}migrateLegacyDisplayOptions(){var _,w,S;this.ensureCommonFields();const m=this.props.conf.common,v=(_=this.props.conf.data)==null?void 0:_[0];v&&typeof v=="object"&&((!m.valueUnit||String(m.valueUnit).trim()==="")&&v.valueUnit!=null&&String(v.valueUnit).trim()!==""&&(m.valueUnit=String(v.valueUnit)),m.showPlanCompletionRate===!1&&v.showPlanCompletionRate===!0&&(m.showPlanCompletionRate=!0),"valueUnit"in v&&delete v.valueUnit,"showPlanCompletionRate"in v&&delete v.showPlanCompletionRate);const g=(w=this.props.conf.options)==null?void 0:w.valueUnit,y=g!=null&&typeof g=="object"&&"value"in g?g.value:g;(!m.valueUnit||String(m.valueUnit).trim()==="")&&y!==void 0&&y!==null&&String(y).trim()!==""&&(m.valueUnit=String(y));const b=(S=this.props.conf.options)==null?void 0:S.showPlanCompletionRate,x=b!=null&&typeof b=="object"&&"value"in b?b.value:b;m.showPlanCompletionRate===!1&&x===!0&&(m.showPlanCompletionRate=!0)}isPlanCompletionRateEnabled(){return this.ensureCommonFields(),!!this.props.conf.common.showPlanCompletionRate}resolveBarItemIndex(m){const v=this.CHART.items,g=[m==null?void 0:m.axisValue,m==null?void 0:m.name];for(const b of g){if(b==null||b==="")continue;const x=v.indexOf(String(b));if(x!==-1)return x}const y=m==null?void 0:m.dataIndex;return typeof y=="number"&&y>=0&&y<v.length?y:Math.min(Math.max(0,y!=null?y:0),Math.max(0,v.length-1))}extractStyles(){return tt(Ne({},super.extractStyles()),{barWidth:this.getOptionValue("barWidth",50),direction:this.getOptionValue("direction","x"),realSort:this.getOptionValue("realSort",!1),sortType:this.getOptionValue("sortType","desc")})}init(){return Ve(this,null,function*(){this.Style.value=this.extractStyles(),this.applyTheme(),this.ensureData(),this.migrateLegacyDisplayOptions(),this.initChartData(),yield o.nextTick(),this.initChart()})}initChart(){super.initChart(),requestAnimationFrame(()=>{this.chartObj&&this.chartObj.setOption(this.getChartOption(),!1)})}refreshOnConfigChange(){this.ensureData(),this.migrateLegacyDisplayOptions(),this.Style.value=this.extractStyles(),this.applyTheme(),this.initChartData(),this.ensureChartReady().then(()=>{this.chartObj&&(this.chartObj.setOption(this.getChartOption(),!0),this.chartObj.resize())})}initChartData(){var b,x;const m=this.props.conf,v=this.CHART.rawValues,g=this.CHART.items,y=v.length===((b=m.data)==null?void 0:b.length)&&g.length===((x=m.data)==null?void 0:x.length)&&g.every((_,w)=>{var S;return _===((S=m.data[w])==null?void 0:S.name)});this.CHART={rawValues:[],items:[],colors:[],times:[]},m.data.forEach((_,w)=>{const S=vu({num:1,mode:this.props.mode,hasDataSource:this.hasData()});this.CHART.colors.push(_.color||Hs[w]),_.value!==void 0&&_.value!==""?this.CHART.rawValues.push(_.value):y&&v[w]!==void 0&&v[w]!==""?this.CHART.rawValues.push(v[w]):this.CHART.rawValues.push(S[0]),this.CHART.items.push(_.name)})}buildSeriesAndMax(){const m=this.isPlanCompletionRateEnabled(),v=this.CHART.rawValues.map(b=>this.parseNumericRaw(b)).filter(b=>b!==null),g=v.length?Math.max(...v):0;return{seriesData:this.CHART.rawValues.map(b=>{const x=this.parseNumericRaw(b);return x===null?null:m?g<=0?0:x/g*100:x}),maxNumeric:g}}getChartOption(){const m=this,v=this.Style.value,g=this.CHART,y=this.isPlanCompletionRateEnabled(),{seriesData:b,maxNumeric:x}=this.buildSeriesAndMax(),_=v.direction==="x",w=_?"right":"center",S={pct:{color:"#000000",fontSize:v.textSize,align:w,padding:_?[0,0,0,10]:[4,0,0,0]}};g.colors.forEach((P,I)=>{S[`raw${I}`]={color:P||"#5470c6",fontSize:v.textSize,align:w,fontWeight:500}});const C=P=>{const I=this.resolveBarItemIndex(P),N=g.rawValues[I];if(y&&x>0){const R=this.parseNumericRaw(N),V=r(String(N)),B=R!==null&&x>0?`${Math.round(R/x*100)}%`:"";return`{raw${I}|${V}}{pct|${r(B)}}`}return`{raw${I}|${r(String(N))}}`},E=28,T=108,A=P=>{var R,V;const I=(V=(R=m.chartObj)==null?void 0:R.getWidth())!=null?V:0;return!I||!P.labelRect?{}:{x:I-12,y:P.labelRect.y+P.labelRect.height/2,verticalAlign:"middle",align:"right"}},M=_?v.right+T:v.right;let k={grid:{top:_?v.top:v.top+E,bottom:v.bottom,left:v.left,right:M,containLabel:!0},tooltip:{show:!0,formatter:P=>{const I=this.resolveBarItemIndex(P),N=g.rawValues[I],R=this.parseNumericRaw(N);let V=`${P.name}:`;return y&&x>0&&R!==null?V+=`${N}(${Math.round(R/x*100)}%)`:V+=String(N),V}},xAxis:{max:"dataMax",axisLine:{show:!0,color:v.textColor},axisTick:{show:!0},splitLine:{lineStyle:{}},axisLabel:{color:v.textColor,fontSize:v.textSize,overflow:"none",interval:0,formatter:P=>P.length>4?P.substr(0,4):P}},yAxis:{axisLabel:{formatter:P=>P.length>5?P.substr(0,5)+`
3944
3944
  `+P.substr(5):P,color:v.textColor,fontSize:v.textSize,overflow:"none"},axisLine:{lineStyle:{color:v.textColor}},splitLine:{lineStyle:{}},animationDuration:300,animationDurationUpdate:300},series:[tt(Ne({realtimeSort:v.realSort,type:"bar",barWidth:v.barWidth+"%",data:b},_?{labelLayout:A}:{}),{label:{show:!0,position:_?"right":"top",align:w,verticalAlign:_?"middle":"bottom",valueAnimation:!0,color:v.textColor,fontSize:v.textSize,rich:S,formatter:C},itemStyle:{color:P=>g.colors[this.resolveBarItemIndex(P)]||"#5470c6"}})],animationDuration:0,animationDurationUpdate:500,animationEasing:"linear",animationEasingUpdate:"linear"};return _?(k.yAxis.data=g.items,v.realSort&&(k.yAxis.inverse=v.sortType==="desc"),k.xAxis.splitLine.lineStyle.type="dashed",y&&x>0&&(k.xAxis.max=100,k.xAxis.axisLabel.formatter=P=>`${P}%`)):(k.xAxis.data=g.items,delete k.xAxis.max,v.realSort&&(k.xAxis.inverse=v.sortType==="asc"),k.yAxis.splitLine.lineStyle.type="dashed",delete k.yAxis.type,y&&x>0&&(k.yAxis.max=100,k.yAxis.axisLabel.formatter=P=>`${P}%`)),k}setSocketData(m){if(!this.hasData()||!m||!this.chartObj)return;const{data:v}=this.props.conf;this.CHART.rawValues=[],v.forEach(y=>{const b=this.extractDataValue(m,y.fv);this.CHART.rawValues.push(b!=null?b:"--")});const{seriesData:g}=this.buildSeriesAndMax();this.chartObj.setOption({series:[{data:g}]})}}const a=new i(e,"raceBar");a.setupLifecycle();const s=a.getStyle(),l=a.getEchartId(),c=e.conf,{t:u}=vh(),d=o.computed(()=>{var y;const p=((y=e.conf)==null?void 0:y.common)||{},m=String(p.valueUnit||"").trim(),v=!!p.showPlanCompletionRate,g=[];return m&&g.push(m),v&&g.push(u("component.options.showPlanCompletionRate")),g.join(" / ")}),f=o.computed(()=>{const p=$n(e.conf.options);return p.display==="none"?p:tt(Ne({},p),{display:"flex",alignItems:"center",gap:"8px",textAlign:"initial"})}),h=o.computed(()=>{var m;const p=((m=e.conf)==null?void 0:m.options)||{};return{flex:"1",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:t(p,"titleColor","#111"),fontSize:`${t(p,"titleSize",14)}px`,fontWeight:t(p,"titleWeight","bold"),textAlign:t(p,"titleAlign","left")}});return(p,m)=>(o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({background:o.unref(s).bgColor,borderRadius:`${o.unref(s).radiusSize}px`})},[o.createElementVNode("div",{class:"mix-title",style:o.normalizeStyle(f.value)},[o.createElementVNode("span",{class:"mix-title-caption",style:o.normalizeStyle(h.value)},o.toDisplayString(o.unref(c).caption||o.unref(c).name),5),d.value?(o.openBlock(),o.createElementBlock("span",uct,o.toDisplayString(d.value),1)):o.createCommentVNode("",!0)],4),o.createElementVNode("div",dct,[o.createElementVNode("div",{class:"w-full h-full",id:o.unref(l)},null,8,fct)]),o.renderSlot(p.$slots,"default",{},void 0,!0)],4))}})),_ct=Dt(xct,[["__scopeId","data-v-2977e874"]]),Sct=Object.freeze(Object.defineProperty({__proto__:null,default:_ct},Symbol.toStringTag,{value:"Module"})),wct="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='3'%20y='14'%20width='4'%20height='7'%20rx='1'%20fill='currentColor'%20opacity='0.5'/%3e%3crect%20x='7'%20y='14'%20width='4'%20height='7'%20rx='1'%20fill='currentColor'/%3e%3crect%20x='11'%20y='8'%20width='4'%20height='13'%20rx='1'%20fill='currentColor'%20opacity='0.5'/%3e%3crect%20x='15'%20y='8'%20width='4'%20height='13'%20rx='1'%20fill='currentColor'/%3e%3c/svg%3e",Cct="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='3'%20y='14'%20width='4'%20height='7'%20rx='1'%20fill='%23FFFFFF'%20opacity='0.5'/%3e%3crect%20x='7'%20y='14'%20width='4'%20height='7'%20rx='1'%20fill='%23FFFFFF'/%3e%3crect%20x='11'%20y='8'%20width='4'%20height='13'%20rx='1'%20fill='%23FFFFFF'%20opacity='0.5'/%3e%3crect%20x='15'%20y='8'%20width='4'%20height='13'%20rx='1'%20fill='%23FFFFFF'/%3e%3c/svg%3e",Ect={class:"mix-body"},Act=["id"],Tct={DEFAULT_ICON:wct,ACTIVE_ICON:Cct,NAME_CN:"堆积柱状图",NAME_EN:"Stacked Bar Chart",ORDER:2,PLATFORM:["pc","screen","mobile"]},Mct={titleColor:"#111",titleSize:14,textColor:"#111",bgColor:"#fff",top:30,bottom:40,left:40,right:20,radiusSize:8,textSize:12,barWidth:30,points:10,isHideTitle:!1,showLabel:!1,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4},Dct=[{name:"参数一",fv:"",object_id:"",color:"#4162ff",periodUnit:"near-hour",periodValue:1},{name:"参数二",fv:"",object_id:"",color:"#3bbc6a",periodUnit:"near-hour",periodValue:1}],Lct=["name","fv","object_id","color",{key:"periodUnit",label:"setting.timeUnit",type:"select",options:CI},{key:"periodValue",label:"setting.timePeriod",type:"number"}],Nct=["mosaic","statistics","calculate"],Oct={source:"mosaic",useAlias:!1,multiObject:!1,null:{type:"0",value:""}},Pct={DEFAULT:Tct,OPTIONS:Mct,DATA:Dct,PARAMS:Lct,SOURCE:Nct,COMMON:Oct},kct=o.defineComponent(tt(Ne({},Pct),{__name:"stackedBar",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(n){Ln([Do,Ba,Zi,Va,zi,Hg]);const e=n,t=ua();class r extends Mr{constructor(){super(...arguments),this.historyCache=null}syncHistoryCache(f,h){this.historyCache={xAxis:f,seriesData:h}}extractStyles(){return tt(Ne({},super.extractStyles()),{barWidth:this.getOptionValue("barWidth",30),showLabel:this.getOptionValue("showLabel",!1)})}getXAxisData(){var f,h,p;return(h=(f=this.historyCache)==null?void 0:f.xAxis)!=null&&h.length?this.historyCache.xAxis:(p=this.getFixedStatisticsXLabels())!=null?p:this.getTimeAxis()}getFixedStatisticsXLabels(){var v;const{data:f,common:h}=this.props.conf,p=(h==null?void 0:h.source)||"mosaic",m=(v=f[0])==null?void 0:v.periodUnit;return["statistics","calculate"].includes(p)&&m&&!String(m).startsWith("near")?jI(m):null}getChartOption(){const f=this.Style.value,h=this.props.conf;return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},textStyle:{align:"left",fontSize:f.textSize}},grid:{top:f.top,bottom:f.bottom,left:f.left,right:f.right,containLabel:!1},legend:{show:!0,data:h.data.map(p=>p.name),right:20,top:0,textStyle:{color:f.textColor,fontSize:f.textSize}},xAxis:[{type:"category",data:this.getXAxisData(),axisTick:{alignWithLabel:!0},axisLine:{lineStyle:{color:f.textColor}},axisLabel:{formatter:p=>{if(!/^\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}$/.test(p))return p;const[m,v]=p.split(" ");return`${m}
3945
- ${v}`},color:f.textColor,fontSize:f.textSize}}],yAxis:[{type:"value",nameGap:10,nameTextStyle:{align:"right"},splitLine:{lineStyle:{type:"dashed",color:"#e5e5e5"}},axisLabel:{color:f.textColor,fontSize:f.textSize},axisLine:{lineStyle:{color:f.textColor}},splitNumber:4}],series:this.formatSeries()}}formatSeries(){var g,y,b;const f=this.props.conf,h=this.Style.value,p=this.getFixedStatisticsXLabels(),m=(g=this.historyCache)==null?void 0:g.seriesData,v=(b=(y=m==null?void 0:m[0])==null?void 0:y.length)!=null?b:p?p.length:h.points;return f.data.map((x,_)=>{var S;const w=x.color||Hs[_];return{type:"bar",stack:"total",data:(S=m==null?void 0:m[_])!=null?S:vu({num:v,max:200,min:0,mode:this.props.mode,hasDataSource:this.hasData()}),name:x.name,itemStyle:{color:w},label:{show:h.showLabel,position:"inside",color:"#fff"},barWidth:h.barWidth+"%"}})}setSocketData(f){var _;if(!this.hasData()||!this.chartObj||!f)return;const{data:h,common:p}=this.props.conf,m=p.source||"mosaic",v=this.chartObj.getOption(),g=(_=h[0])==null?void 0:_.periodUnit,y=["statistics","calculate"].includes(m)&&g&&!String(g).startsWith("near");if(h.forEach((w,S)=>{const C=this.extractDataValue(f,w.fv);if(["statistics","calculate"].includes(m)&&w.periodUnit&&!String(w.periodUnit).startsWith("near")&&!String(w.periodUnit).startsWith("last")){const T=Iv(f.start_time,w.periodUnit),A=T?v.xAxis[0].data.indexOf(T):-1;A>=0&&(v.series[S].data[A]=C);return}const E=["statistics","calculate"].includes(m)?f.start_time:f.datetime;E!=null&&(S===0&&v.xAxis[0].data.push(E),v.series[S].data.push(C))}),y){this.syncHistoryCache(v.xAxis[0].data,v.series.map(w=>w.data)),this.updateChart(v);return}const b=n3(v.xAxis[0].data,v.series.map(w=>w.data)),x=Number(this.Style.value.points)||10;v.xAxis[0].data=b.times.slice(-x),v.series.forEach((w,S)=>{var C;w.data=((C=b.data[S])==null?void 0:C.slice(-x))||[]}),this.syncHistoryCache(v.xAxis[0].data,v.series.map(w=>w.data)),this.updateChart(v)}setHistoryData(f){var x;if(!(f!=null&&f.length))return;const h=f[0];if(!((x=h==null?void 0:h.time)!=null&&x.length))return;const p=Number(this.Style.value.points)||10,{data:m}=this.props.conf,v=_=>{if(_==null||_===""||_==="-")return null;const w=Number(_);return Number.isFinite(w)?w:null},g=this.getFixedStatisticsXLabels();let y;const b=[];g!=null&&g.length?(y=[...g],f.forEach((_,w)=>{var M;const S=m[w],C=(S==null?void 0:S.periodUnit)||((M=m[0])==null?void 0:M.periodUnit),E=new Array(g.length).fill(null),T=_.time||[],A=_.data||[];for(let D=0;D<T.length;D++){const k=Iv(T[D],String(C||"")),P=k?g.indexOf(k):-1;P>=0&&(E[P]=v(A[D]))}b[w]=E})):(y=h.time.slice(-p),f.forEach((_,w)=>{const S=_.data||[];b[w]=S.map(v).slice(-p)})),this.syncHistoryCache(y,b),this.updateChart({xAxis:[{data:y}],series:b.map(_=>({data:_}))})}}const i=new r(e,"stackedBar");i.setupLifecycle();const a=Na();o.onMounted(()=>{var d;if(a.registerInstance(e.uid,i),e.mode==="preview"){const f=((d=i.getChartInstance)==null?void 0:d.call(i))||i.chartObj;f==null||f.off("click"),f==null||f.on("click",h=>{var m,v,g,y,b,x;const p=h==null?void 0:h.seriesName;if(typeof p=="string"&&p){const _=((v=(m=e.conf)==null?void 0:m.options)==null?void 0:v.linkChannel)==="custom"?(y=(g=e.conf)==null?void 0:g.options)==null?void 0:y.customChannel:(x=(b=e.conf)==null?void 0:b.options)==null?void 0:x.linkChannel;t.publish(_||"stackedBar","stackedBar",{objectId:"",deviceId:"",type:"select",fieldKey:p,fv:Ne({key:p},h),source:"stackedBar"})}})}}),o.onUnmounted(()=>{a.unregisterInstance(e.uid)});const s=i.getStyle(),l=i.getEchartId(),c=e.conf,u=o.computed(()=>$n(e.conf.options));return(d,f)=>(o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({background:o.unref(s).bgColor,borderRadius:`${o.unref(s).radiusSize}px`})},[o.createElementVNode("div",{class:"mix-title",style:o.normalizeStyle(u.value)},o.toDisplayString(o.unref(c).caption||o.unref(c).name),5),o.createElementVNode("div",Ect,[o.createElementVNode("div",{class:"w-full h-full",id:o.unref(l)},null,8,Act)]),o.renderSlot(d.$slots,"default",{},void 0,!0)],4))}})),Ict=Dt(kct,[["__scopeId","data-v-b49ef526"]]),Rct=Object.freeze(Object.defineProperty({__proto__:null,default:Ict},Symbol.toStringTag,{value:"Module"})),Jde="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e数组卡片%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-733.000000,%20-221.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cg%20id='卡片查看模式_view-grid-card备份'%20transform='translate(733.833333,%20222.995324)'%3e%3cpath%20d='M14.4615385,0%20C15.3112073,0%2016,0.688792693%2016,1.53846154%20L16,1.53846154%20L16,12.7130579%20C16,13.5627267%2015.3112073,14.2515194%2014.4615385,14.2515194%20L14.4615385,14.2515194%20L1.53846154,14.2515194%20C0.688792693,14.2515194%200,13.5627267%200,12.7130579%20L0,12.7130579%20L0,1.53846154%20C0,0.688792693%200.688792693,0%201.53846154,0%20L1.53846154,0%20Z%20M14.4615385,1.23076923%20L1.53846154,1.23076923%20C1.36852777,1.23076923%201.23076923,1.36852777%201.23076923,1.53846154%20L1.23076923,1.53846154%20L1.23076923,12.7130579%20C1.23076923,12.8829916%201.36852777,13.0207502%201.53846154,13.0207502%20L1.53846154,13.0207502%20L14.4615385,13.0207502%20C14.6314722,13.0207502%2014.7692308,12.8829916%2014.7692308,12.7130579%20L14.7692308,12.7130579%20L14.7692308,1.53846154%20C14.7692308,1.36852777%2014.6314722,1.23076923%2014.4615385,1.23076923%20L14.4615385,1.23076923%20Z%20M12.6961184,7.52450725%20C13.035986,7.52450725%2013.3115031,7.80002432%2013.3115031,8.13989186%20L13.3115031,8.13989186%20L13.3115031,10.7985846%20C13.3115031,11.1384522%2013.035986,11.4139693%2012.6961184,11.4139693%20L12.6961184,11.4139693%20L3.48717949,11.4139693%20C3.14731195,11.4139693%202.87179487,11.1384522%202.87179487,10.7985846%20L2.87179487,10.7985846%20L2.87179487,8.13989186%20C2.87179487,7.80002432%203.14731195,7.52450725%203.48717949,7.52450725%20L3.48717949,7.52450725%20Z%20M12.08,8.75507692%20L4.10184615,8.75507692%20L4.10184615,10.1830769%20L12.08,10.1830769%20L12.08,8.75507692%20Z%20M12.6961184,2.87179487%20C13.035986,2.87179487%2013.3115031,3.14731195%2013.3115031,3.48717949%20L13.3115031,3.48717949%20L13.3115031,6.14587227%20C13.3115031,6.48573981%2013.035986,6.76125689%2012.6961184,6.76125689%20L12.6961184,6.76125689%20L3.48717949,6.76125689%20C3.14731195,6.76125689%202.87179487,6.48573981%202.87179487,6.14587227%20L2.87179487,6.14587227%20L2.87179487,3.48717949%20C2.87179487,3.14731195%203.14731195,2.87179487%203.48717949,2.87179487%20L3.48717949,2.87179487%20Z%20M12.08,4.10184615%20L4.10184615,4.10184615%20L4.10184615,5.52984615%20L12.08,5.52984615%20L12.08,4.10184615%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Qde="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e数组卡片%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-733.000000,%20-221.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cg%20id='卡片查看模式_view-grid-card备份'%20transform='translate(733.833333,%20222.995324)'%3e%3cpath%20d='M14.4615385,0%20C15.3112073,0%2016,0.688792693%2016,1.53846154%20L16,1.53846154%20L16,12.7130579%20C16,13.5627267%2015.3112073,14.2515194%2014.4615385,14.2515194%20L14.4615385,14.2515194%20L1.53846154,14.2515194%20C0.688792693,14.2515194%200,13.5627267%200,12.7130579%20L0,12.7130579%20L0,1.53846154%20C0,0.688792693%200.688792693,0%201.53846154,0%20L1.53846154,0%20Z%20M14.4615385,1.23076923%20L1.53846154,1.23076923%20C1.36852777,1.23076923%201.23076923,1.36852777%201.23076923,1.53846154%20L1.23076923,1.53846154%20L1.23076923,12.7130579%20C1.23076923,12.8829916%201.36852777,13.0207502%201.53846154,13.0207502%20L1.53846154,13.0207502%20L14.4615385,13.0207502%20C14.6314722,13.0207502%2014.7692308,12.8829916%2014.7692308,12.7130579%20L14.7692308,12.7130579%20L14.7692308,1.53846154%20C14.7692308,1.36852777%2014.6314722,1.23076923%2014.4615385,1.23076923%20L14.4615385,1.23076923%20Z%20M12.6961184,7.52450725%20C13.035986,7.52450725%2013.3115031,7.80002432%2013.3115031,8.13989186%20L13.3115031,8.13989186%20L13.3115031,10.7985846%20C13.3115031,11.1384522%2013.035986,11.4139693%2012.6961184,11.4139693%20L12.6961184,11.4139693%20L3.48717949,11.4139693%20C3.14731195,11.4139693%202.87179487,11.1384522%202.87179487,10.7985846%20L2.87179487,10.7985846%20L2.87179487,8.13989186%20C2.87179487,7.80002432%203.14731195,7.52450725%203.48717949,7.52450725%20L3.48717949,7.52450725%20Z%20M12.08,8.75507692%20L4.10184615,8.75507692%20L4.10184615,10.1830769%20L12.08,10.1830769%20L12.08,8.75507692%20Z%20M12.6961184,2.87179487%20C13.035986,2.87179487%2013.3115031,3.14731195%2013.3115031,3.48717949%20L13.3115031,3.48717949%20L13.3115031,6.14587227%20C13.3115031,6.48573981%2013.035986,6.76125689%2012.6961184,6.76125689%20L12.6961184,6.76125689%20L3.48717949,6.76125689%20C3.14731195,6.76125689%202.87179487,6.48573981%202.87179487,6.14587227%20L2.87179487,6.14587227%20L2.87179487,3.48717949%20C2.87179487,3.14731195%203.14731195,2.87179487%203.48717949,2.87179487%20L3.48717949,2.87179487%20Z%20M12.08,4.10184615%20L4.10184615,4.10184615%20L4.10184615,5.52984615%20L12.08,5.52984615%20L12.08,4.10184615%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Vct={class:"mix-body"},Bct={DEFAULT_ICON:Jde,ACTIVE_ICON:Qde,NAME_CN:"统计",NAME_EN:"Array Card",ORDER:5,PLATFORM:["pc","screen","mobile"]},Fct={titleColor:"#111",titleSize:14,bgColor:"#fff",textColor:"#111",textSize:48,radiusSize:8,isHideTitle:!0,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4},$de=[{fv:"",object_id:""}],zct=["fv","object_id"],Uct=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],Hct=1,jct={useAlias:!1,source:"mosaic",multiObject:!1,hideMultiObject:!0},Gct={DEFAULT:Bct,OPTIONS:Fct,DATA:$de,PARAMS:zct,SOURCE:Uct,ITEMS:Hct,COMMON:jct},Yct=o.defineComponent(tt(Ne({},Gct),{__name:"arrayCard",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(n){const e=n;class t extends Cn{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),textSize:this.getOptionValue("textSize",48),radiusSize:this.getOptionValue("radiusSize",8),isHideTitle:this.getOptionValue("isHideTitle",!0)}}init(){return Ve(this,null,function*(){var d;this.Style.value=this.extractStyles(),this.applyTheme(),(d=this.props.conf.data)!=null&&d.length||(this.props.conf.data=$de)})}setHistoryData(d){if(!d)return;const{data:f}=this.props.conf;if(!Array.isArray(f)||!f.length)return;let h=!1;f.forEach((p,m)=>{try{const v=d[m].data[0];v!=null&&p.value!==v&&(p.value=v,h=!0)}catch(v){}}),h&&this.notifyDataChanged()}setSocketData(d){if(!d)return;const{data:f}=this.props.conf;let h=!1;f.forEach(p=>{if(!this.shouldApplyRealtimeToItem(d,p))return;const m=this.extractDataValue(d,p.fv,p);m!=null&&p.value!==m&&(p.value=m,h=!0)}),h&&this.notifyDataChanged()}notifyDataChanged(){s.value++}}const r=new t(e,"arrayCard");r.setupLifecycle();const i=r.getStyle(),a=e.conf,s=o.ref(0),l=o.computed(()=>$n(e.conf.options)),c=u=>{var m;s.value;const d=((m=u==null?void 0:u[0])==null?void 0:m.value)||0,f=String(Math.floor(Number(d)||0)),h=[];let p=0;for(;p<f.length;)h.push(f.slice(p,p+3)),p+=3;return h.flatMap((v,g)=>g>0?[",",v]:[v])};return(u,d)=>(o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({background:o.unref(i).bgColor,borderRadius:`${o.unref(i).radiusSize}px`})},[o.createElementVNode("div",{class:"mix-title",style:o.normalizeStyle(l.value)},o.toDisplayString(o.unref(a).caption||o.unref(a).name),5),o.createElementVNode("div",Vct,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(c(o.unref(a).data),(f,h)=>(o.openBlock(),o.createElementBlock("div",{key:h,class:o.normalizeClass(["digit-item",{separator:f==","}]),style:o.normalizeStyle({fontSize:`${o.unref(i).textSize}px`,color:o.unref(i).textColor})},o.toDisplayString(f),7))),128))]),o.renderSlot(u.$slots,"default",{},void 0,!0)],4))}})),Wct=Dt(Yct,[["__scopeId","data-v-247945e5"]]),Xct=Object.freeze(Object.defineProperty({__proto__:null,default:Wct},Symbol.toStringTag,{value:"Module"})),e0e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e基础卡片%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-105.000000,%20-96.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M119.607399,97.4683109%20C120.37652,97.4683109%20121,98.0917972%20121,98.860912%20L121,98.860912%20L121,109.139088%20C121,109.908212%20120.376522,110.531689%20119.607399,110.531689%20L119.607399,110.531689%20L106.392601,110.531689%20C105.623486,110.531689%20105,109.908209%20105,109.139088%20L105,109.139088%20L105,98.860912%20C105,98.0917994%20105.623489,97.4683109%20106.392601,97.4683109%20L106.392601,97.4683109%20Z%20M119.607399,98.7852022%20L106.392601,98.7852022%20C106.350788,98.7852022%20106.316891,98.8190984%20106.316891,98.860912%20L106.316891,98.860912%20L106.316891,109.139088%20C106.316891,109.180907%20106.350782,109.214798%20106.392601,109.214798%20L106.392601,109.214798%20L119.607399,109.214798%20C119.649223,109.214798%20119.683109,109.180913%20119.683109,109.139088%20L119.683109,109.139088%20L119.683109,98.860912%20C119.683109,98.8190931%20119.649218,98.7852022%20119.607399,98.7852022%20L119.607399,98.7852022%20Z%20M117.588471,104.993404%20C117.952121,104.993404%20118.246917,105.2882%20118.246917,105.65185%20C118.246917,105.985195%20117.999206,106.260685%20117.677819,106.304285%20L117.588471,106.310295%20L108.411529,106.310295%20C108.047879,106.310295%20107.753083,106.015499%20107.753083,105.65185%20C107.753083,105.318504%20108.000794,105.043015%20108.322181,104.999415%20L108.411529,104.993404%20L117.588471,104.993404%20Z%20M112.449383,100.77201%20C112.813033,100.77201%20113.107829,101.066806%20113.107829,101.430456%20C113.107829,101.763801%20112.860118,102.039291%20112.538731,102.082891%20L112.449383,102.088902%20L108.411529,102.088902%20C108.047879,102.088902%20107.753083,101.794105%20107.753083,101.430456%20C107.753083,101.097111%20108.000794,100.821621%20108.322181,100.778021%20L108.411529,100.77201%20L112.449383,100.77201%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",t0e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e基础卡片%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-105.000000,%20-96.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M119.607399,97.4683109%20C120.37652,97.4683109%20121,98.0917972%20121,98.860912%20L121,98.860912%20L121,109.139088%20C121,109.908212%20120.376522,110.531689%20119.607399,110.531689%20L119.607399,110.531689%20L106.392601,110.531689%20C105.623486,110.531689%20105,109.908209%20105,109.139088%20L105,109.139088%20L105,98.860912%20C105,98.0917994%20105.623489,97.4683109%20106.392601,97.4683109%20L106.392601,97.4683109%20Z%20M119.607399,98.7852022%20L106.392601,98.7852022%20C106.350788,98.7852022%20106.316891,98.8190984%20106.316891,98.860912%20L106.316891,98.860912%20L106.316891,109.139088%20C106.316891,109.180907%20106.350782,109.214798%20106.392601,109.214798%20L106.392601,109.214798%20L119.607399,109.214798%20C119.649223,109.214798%20119.683109,109.180913%20119.683109,109.139088%20L119.683109,109.139088%20L119.683109,98.860912%20C119.683109,98.8190931%20119.649218,98.7852022%20119.607399,98.7852022%20L119.607399,98.7852022%20Z%20M117.588471,104.993404%20C117.952121,104.993404%20118.246917,105.2882%20118.246917,105.65185%20C118.246917,105.985195%20117.999206,106.260685%20117.677819,106.304285%20L117.588471,106.310295%20L108.411529,106.310295%20C108.047879,106.310295%20107.753083,106.015499%20107.753083,105.65185%20C107.753083,105.318504%20108.000794,105.043015%20108.322181,104.999415%20L108.411529,104.993404%20L117.588471,104.993404%20Z%20M112.449383,100.77201%20C112.813033,100.77201%20113.107829,101.066806%20113.107829,101.430456%20C113.107829,101.763801%20112.860118,102.039291%20112.538731,102.082891%20L112.449383,102.088902%20L108.411529,102.088902%20C108.047879,102.088902%20107.753083,101.794105%20107.753083,101.430456%20C107.753083,101.097111%20108.000794,100.821621%20108.322181,100.778021%20L108.411529,100.77201%20L112.449383,100.77201%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Zct={class:"value-main"},qct={key:0,class:"value-unit"},mQ="--",Kct={DEFAULT_ICON:e0e,ACTIVE_ICON:t0e,NAME_CN:"基础卡片",NAME_EN:"Card",ORDER:1,PLATFORM:["pc","screen","mobile"]},Jct={titleColor:"#111",titleSize:14,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4,labelColor:"#111",textColor:"#111",bgColor:"#fff",valueSize:28,nameSize:14,radiusSize:8,isHideTitle:!0,showTopGradient:!1,topGradientStart:{value:"#f5a623",type:"color",label:"component.options.topGradientStart",dependent:"showTopGradient"},topGradientHeight:{value:2,type:"number",min:1,max:16,label:"component.options.topGradientHeight",dependent:"showTopGradient"},topGradientPosition:{value:"cardItem",type:"select",label:"component.options.topGradientPosition",dependent:"showTopGradient",options:[{label:"component.options.topGradientPosition_cardItem",value:"cardItem"},{label:"component.options.topGradientPosition_aboveTitle",value:"aboveTitle"}]},showBgIcon:!1,defaultBgIcon:{value:"",type:"text",label:"component.options.defaultBgIcon",dependent:"showBgIcon"},bgIconOpacity:{value:.06,type:"number",min:0,max:1,step:.01,label:"component.options.bgIconOpacity",dependent:"showBgIcon"},bgIconSize:{value:40,type:"number",min:8,max:120,label:"component.options.bgIconSize",dependent:"showBgIcon"},bgIconPosition:{value:"right",type:"select",label:"component.options.bgIconPosition",dependent:"showBgIcon",options:[{label:"component.options.bgIconPosition_right",value:"right"},{label:"component.options.bgIconPosition_left",value:"left"}]},paramsLayout:{value:"horizontal",type:"select",label:"component.options.paramsLayout",options:[{label:"component.options.paramsLayout_horizontal",value:"horizontal"},{label:"component.options.paramsLayout_vertical",value:"vertical"}]}},Qct=[{name:"参数一",fv:"",object_id:"",unit:"",default:"",isText:!1,flag:[{code:0,text:""}],valueFontSize:0,nameFontSize:0,valueTextColor:"",nameTextColor:"",areaWeight:1,cellPadding:0,valueAlign:"center"}],$ct=["name","fv","object_id","unit","default","isText",{key:"valueFontSize",type:"number",label:"component.options.crdValueFontSize",group:"component.options.crdGroupCellStyle",groupCollapsedByDefault:!0,min:0,max:120},{key:"nameFontSize",type:"number",label:"component.options.crdNameFontSize",group:"component.options.crdGroupCellStyle",min:0,max:120},{key:"valueTextColor",type:"color",label:"component.options.crdValueTextColor",group:"component.options.crdGroupCellStyle"},{key:"valueAlign",type:"select",label:"component.options.crdValueAlign",group:"component.options.crdGroupCellStyle",options:[{label:"component.options.crdValueAlign_left",value:"left"},{label:"component.options.crdValueAlign_center",value:"center"},{label:"component.options.crdValueAlign_right",value:"right"}]},{key:"nameTextColor",type:"color",label:"component.options.crdNameTextColor",group:"component.options.crdGroupCellStyle"},{key:"areaWeight",type:"number",label:"component.options.crdAreaWeight",group:"component.options.crdGroupCellStyle",min:1,max:32},{key:"cellPadding",type:"number",label:"component.options.crdCellPadding",group:"component.options.crdGroupCellStyle",min:0,max:64}],eut=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime","summary"],tut={useAlias:!1,multiObject:!1,source:"mosaic",object_id:"",object_alias:""},nut={DEFAULT:Kct,OPTIONS:Jct,DATA:Qct,PARAMS:$ct,SOURCE:eut,COMMON:tut},rut=o.defineComponent(tt(Ne({},nut),{__name:"crd",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(n){const e={valueFontSize:0,nameFontSize:0,valueTextColor:"",nameTextColor:"",areaWeight:1,cellPadding:0,valueAlign:"center"},t=n;class r extends Cn{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),labelColor:this.getOptionValue("labelColor","#111"),textColor:this.getOptionValue("textColor","#111"),nameSize:this.getOptionValue("nameSize",14),valueSize:this.getOptionValue("valueSize",28),radiusSize:this.getOptionValue("radiusSize",8),isHideTitle:this.getOptionValue("isHideTitle",!0),showTopGradient:this.getOptionValue("showTopGradient",!1),topGradientStart:this.getOptionValue("topGradientStart","#f5a623"),topGradientHeight:this.getOptionValue("topGradientHeight",2),topGradientPosition:this.getOptionValue("topGradientPosition","cardItem"),showBgIcon:this.getOptionValue("showBgIcon",!1),defaultBgIcon:this.getOptionValue("defaultBgIcon",""),bgIconOpacity:this.getOptionValue("bgIconOpacity",.06),bgIconSize:this.getOptionValue("bgIconSize",40),bgIconPosition:this.getOptionValue("bgIconPosition","right"),paramsLayout:this.getOptionValue("paramsLayout","horizontal")}}init(){return Ve(this,null,function*(){var S;this.Style.value=this.extractStyles(),this.applyTheme();const w={name:"参数一",fv:"",object_id:"",unit:"",default:"",isText:!1,flag:[{code:0,text:""}]};if(!((S=this.props.conf.data)!=null&&S.length))this.props.conf.data=[Ne(Ne({},w),e)];else for(const C of this.props.conf.data)if(!(!C||typeof C!="object")){for(const[E,T]of Object.entries(e))C[E]===void 0&&(C[E]=T);C.isText&&(!Array.isArray(C.flag)||C.flag.length===0)&&(C.flag=[{code:0,text:""}])}})}setHistoryData(w){if(!w)return;const{data:S}=this.props.conf;if(!Array.isArray(S)||!S.length)return;let C=!1;S.forEach((E,T)=>{try{const A=w[T].data[0];A!=null&&E.value!==A&&(E.value=A,C=!0)}catch(A){}}),C&&this.notifyDataChanged()}notifyDataChanged(){s.value++}}const i=new r(t,"crd");i.setupLifecycle();const a=i.getStyle(),s=o.ref(0),l=o.computed(()=>$n(t.conf.options)),c=o.computed(()=>{const _=l.value||{},w=parseFloat(String(_.fontSize||"14"))||14,S=String(_.padding||"").split(" ").filter(Boolean),C=S.length>0&&parseFloat(S[0])||0,E=Math.ceil(w*1.5),T=Math.max(0,E+C*2);return tt(Ne({},_),{minHeight:`${T}px`})}),u=o.computed(()=>{const _=a.value,w=Number(_.topGradientHeight)||2,S=_.topGradientStart||"#f5a623";return{height:`${w}px`,background:`linear-gradient(90deg, ${S}, transparent)`}}),d=o.computed(()=>{const _=a.value;return!!_.showTopGradient&&_.topGradientPosition==="aboveTitle"}),f=o.computed(()=>{const _=a.value;return!!_.showTopGradient&&_.topGradientPosition!=="aboveTitle"}),h=o.computed(()=>a.value.paramsLayout==="vertical"),p=o.computed(()=>{var S;const _=a.value,w=_.bgIconPosition==="right";return{opacity:(S=_.bgIconOpacity)!=null?S:.06,fontSize:`${Number(_.bgIconSize)||40}px`,display:"flex",alignItems:"center",justifyContent:w?"flex-end":"flex-start",paddingRight:w?"12px":void 0,paddingLeft:w?void 0:"12px"}});function m(_){s.value;const w=Number(_==null?void 0:_.areaWeight),S=Number.isFinite(w)&&w>0?w:1,C=Number(_==null?void 0:_.cellPadding),E={flex:`${S} 1 0`,minWidth:"0",minHeight:"0"};return Number.isFinite(C)&&C>0&&(E.padding=`${C}px`),E}function v(_){s.value;const w=a.value,S=Number(_==null?void 0:_.valueFontSize),C=Number.isFinite(S)&&S>0?S:w.valueSize,E=typeof(_==null?void 0:_.valueTextColor)=="string"?_.valueTextColor.trim():"",T=_==null?void 0:_.valueAlign,A=T==="left"||T==="right"||T==="center"?T:"center",M=A==="left"?"flex-start":A==="right"?"flex-end":"center";return{color:E||w.textColor,fontSize:`${C}px`,width:"100%",justifyContent:M,textAlign:A}}function g(_){s.value;const w=a.value,S=Number(_==null?void 0:_.nameFontSize),C=Number.isFinite(S)&&S>0?S:w.nameSize;return{color:(typeof(_==null?void 0:_.nameTextColor)=="string"?_.nameTextColor.trim():"")||w.labelColor,fontSize:`${C}px`}}function y(){const _=a.value.defaultBgIcon,w=typeof _=="string"?_.trim():"";return w?Vx(w):""}const b=_=>{var E,T,A,M;if(s.value,!_)return{value:mQ,name:"--",unit:""};const w=(E=_.name)!=null?E:"",S=typeof _.unit=="string"?_.unit.trim():"";return _.isText?{value:(((T=_.flag)==null?void 0:T.find(k=>String(k.code)==String(_.value)))||{}).text||mQ,name:w,unit:S}:{value:(M=(A=_.value)!=null?A:_.default)!=null?M:0,name:w,unit:S}},x=t.conf;return(_,w)=>(o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({background:o.unref(a).bgColor,borderRadius:o.unref(a).radiusSize+"px"})},[d.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"mix-component-top-gradient",style:o.normalizeStyle(u.value)},null,4)):o.createCommentVNode("",!0),o.createElementVNode("div",{class:"mix-title",style:o.normalizeStyle(c.value)},o.toDisplayString(o.unref(x).caption||o.unref(x).name),5),o.createElementVNode("div",{class:o.normalizeClass(["mix-body",{"mix-body--params-vertical":h.value}])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(x).data,(S,C)=>(o.openBlock(),o.createElementBlock("div",{key:C,class:"card-item",style:o.normalizeStyle(m(S))},[o.createElementVNode("div",{class:"card-item-surface",style:o.normalizeStyle({background:o.unref(a).bgColor})},null,4),f.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"card-item-top-gradient",style:o.normalizeStyle(u.value)},null,4)):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(["card-item-inner",{"card-item-inner--row":h.value}])},[o.createElementVNode("div",{class:"value",style:o.normalizeStyle(v(S))},[o.createElementVNode("span",Zct,o.toDisplayString(b(S).value),1),b(S).unit?(o.openBlock(),o.createElementBlock("span",qct,o.toDisplayString(b(S).unit),1)):o.createCommentVNode("",!0)],4),o.createElementVNode("div",{class:"name",style:o.normalizeStyle(g(S))},o.toDisplayString(b(S).name),5)],2)],4))),128)),o.unref(a).showBgIcon&&y()?(o.openBlock(),o.createElementBlock("div",{key:0,class:"mix-body-bg-icon",style:o.normalizeStyle(p.value)},o.toDisplayString(y()),5)):o.createCommentVNode("",!0)],2),o.renderSlot(_.$slots,"default",{},void 0,!0)],4))}})),iut=Dt(rut,[["__scopeId","data-v-f17794e3"]]),aut=Object.freeze(Object.defineProperty({__proto__:null,default:iut},Symbol.toStringTag,{value:"Module"})),Nh="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e事件卡片%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-191.000000,%20-96.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M205.92069,97.4712644%20C206.682471,97.4712644%20207.3,98.0888001%20207.3,98.8505747%20L207.3,98.8505747%20L207.3,109.149425%20C207.3,109.911209%20206.682473,110.528736%20205.92069,110.528736%20L205.92069,110.528736%20L192.67931,110.528736%20C191.917536,110.528736%20191.3,109.911206%20191.3,109.149425%20L191.3,109.149425%20L191.3,98.8505747%20C191.3,98.0888025%20191.917538,97.4712644%20192.67931,97.4712644%20L192.67931,97.4712644%20Z%20M205.92069,98.7586207%20L192.67931,98.7586207%20C192.628525,98.7586207%20192.587356,98.7997897%20192.587356,98.8505747%20L192.587356,98.8505747%20L192.587356,109.149425%20C192.587356,109.200216%20192.62852,109.241379%20192.67931,109.241379%20L192.67931,109.241379%20L205.92069,109.241379%20C205.971486,109.241379%20206.012644,109.200221%20206.012644,109.149425%20L206.012644,109.149425%20L206.012644,98.8505747%20C206.012644,98.7997844%20205.97148,98.7586207%20205.92069,98.7586207%20L205.92069,98.7586207%20Z%20M196.537914,107.926325%20L196.461627,107.89772%20C196.376008,107.859228%20196.300327,107.802566%20196.239493,107.732645%20L196.182458,107.65641%20C196.149793,107.605279%20196.124154,107.549226%20196.106902,107.489611%20L196.088588,107.405463%20C196.083991,107.374424%20196.081609,107.342662%20196.081609,107.310345%20L196.081609,101.425287%20C196.081609,101.296017%20196.119716,101.175647%20196.18531,101.074798%20C196.212059,101.034076%20196.24112,100.998703%20196.273556,100.966746%20C196.325849,100.915252%20196.38674,100.872715%20196.453929,100.841434%20C196.473529,100.832503%20196.487888,100.826598%20196.502497,100.821209%20C196.516162,100.816178%20196.529622,100.811721%20196.54327,100.807705%20C196.543966,100.8075%20196.544993,100.8072%20196.546021,100.806902%20L196.630169,100.788588%20C196.631149,100.788443%20196.63213,100.7883%20196.633112,100.788159%20C196.635183,100.787864%20196.636563,100.787673%20196.637944,100.787485%20L196.725287,100.781609%20L201.874713,100.781609%20C202.230206,100.781609%20202.518391,101.069794%20202.518391,101.425287%20C202.518391,101.751157%20202.276236,102.020467%20201.962056,102.063089%20L201.874713,102.068966%20L197.368,102.068264%20L197.368,103.723264%20L201.874713,103.724138%20C202.230206,103.724138%20202.518391,104.012322%20202.518391,104.367816%20C202.518391,104.693685%20202.276236,104.962996%20201.962056,105.005618%20L201.874713,105.011494%20L197.368,105.011264%20L197.368,106.666264%20L201.874713,106.666667%20C202.230206,106.666667%20202.518391,106.954851%20202.518391,107.310345%20C202.518391,107.636214%20202.276236,107.905525%20201.962056,107.948147%20L201.874713,107.954023%20L196.725287,107.954023%20C196.660114,107.954023%20196.597202,107.944337%20196.537914,107.926325%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Oh="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e事件卡片%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-191.000000,%20-96.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M205.92069,97.4712644%20C206.682471,97.4712644%20207.3,98.0888001%20207.3,98.8505747%20L207.3,98.8505747%20L207.3,109.149425%20C207.3,109.911209%20206.682473,110.528736%20205.92069,110.528736%20L205.92069,110.528736%20L192.67931,110.528736%20C191.917536,110.528736%20191.3,109.911206%20191.3,109.149425%20L191.3,109.149425%20L191.3,98.8505747%20C191.3,98.0888025%20191.917538,97.4712644%20192.67931,97.4712644%20L192.67931,97.4712644%20Z%20M205.92069,98.7586207%20L192.67931,98.7586207%20C192.628525,98.7586207%20192.587356,98.7997897%20192.587356,98.8505747%20L192.587356,98.8505747%20L192.587356,109.149425%20C192.587356,109.200216%20192.62852,109.241379%20192.67931,109.241379%20L192.67931,109.241379%20L205.92069,109.241379%20C205.971486,109.241379%20206.012644,109.200221%20206.012644,109.149425%20L206.012644,109.149425%20L206.012644,98.8505747%20C206.012644,98.7997844%20205.97148,98.7586207%20205.92069,98.7586207%20L205.92069,98.7586207%20Z%20M196.537914,107.926325%20L196.461627,107.89772%20C196.376008,107.859228%20196.300327,107.802566%20196.239493,107.732645%20L196.182458,107.65641%20C196.149793,107.605279%20196.124154,107.549226%20196.106902,107.489611%20L196.088588,107.405463%20C196.083991,107.374424%20196.081609,107.342662%20196.081609,107.310345%20L196.081609,101.425287%20C196.081609,101.296017%20196.119716,101.175647%20196.18531,101.074798%20C196.212059,101.034076%20196.24112,100.998703%20196.273556,100.966746%20C196.325849,100.915252%20196.38674,100.872715%20196.453929,100.841434%20C196.473529,100.832503%20196.487888,100.826598%20196.502497,100.821209%20C196.516162,100.816178%20196.529622,100.811721%20196.54327,100.807705%20C196.543966,100.8075%20196.544993,100.8072%20196.546021,100.806902%20L196.630169,100.788588%20C196.631149,100.788443%20196.63213,100.7883%20196.633112,100.788159%20C196.635183,100.787864%20196.636563,100.787673%20196.637944,100.787485%20L196.725287,100.781609%20L201.874713,100.781609%20C202.230206,100.781609%20202.518391,101.069794%20202.518391,101.425287%20C202.518391,101.751157%20202.276236,102.020467%20201.962056,102.063089%20L201.874713,102.068966%20L197.368,102.068264%20L197.368,103.723264%20L201.874713,103.724138%20C202.230206,103.724138%20202.518391,104.012322%20202.518391,104.367816%20C202.518391,104.693685%20202.276236,104.962996%20201.962056,105.005618%20L201.874713,105.011494%20L197.368,105.011264%20L197.368,106.666264%20L201.874713,106.666667%20C202.230206,106.666667%20202.518391,106.954851%20202.518391,107.310345%20C202.518391,107.636214%20202.276236,107.905525%20201.962056,107.948147%20L201.874713,107.954023%20L196.725287,107.954023%20C196.660114,107.954023%20196.597202,107.944337%20196.537914,107.926325%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",out={class:"mix-body"},sut={class:"mix-footer"},lut={DEFAULT_ICON:Nh,ACTIVE_ICON:Oh,NAME_CN:"状态卡片",NAME_EN:"State",ORDER:3,PLATFORM:["pc","screen","mobile"]},cut={valueSize:36,timeSize:12,radiusSize:8,bgColor:"#fff",titleColor:"#111",titleSize:14,textColor:"#111",isHideTitle:!1,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4},uut=[{fv:"",status_fv:"",object_id:"",status:[{code:0,text:"离线",color:"#a40e0e"}]}],dut=["fv","status_fv"],fut=["mosaic"],hut={useAlias:!1,source:"mosaic",multiObject:!1,hideMultiObject:!0},put=1,mut={DEFAULT:lut,OPTIONS:cut,DATA:uut,PARAMS:dut,SOURCE:fut,ITEMS:put,COMMON:hut},vut=o.defineComponent(tt(Ne({},mut),{__name:"evn",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(n){const e=n,t=o.ref(mt().format("YYYY-MM-DD HH:mm:ss"));class r extends Cn{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),valueSize:this.getOptionValue("valueSize",36),timeSize:this.getOptionValue("timeSize",12),radiusSize:this.getOptionValue("radiusSize",8)}}init(){return Ve(this,null,function*(){var h;this.Style.value=this.extractStyles(),this.applyTheme(),(h=this.props.conf.data)!=null&&h.length||(this.props.conf.data=[{fv:"",status_fv:"",object_id:"",status:[{code:0,text:"离线",color:"#a40e0e"}]}])})}setHistoryData(h){if(!h)return;const{data:p}=this.props.conf;!p||!Array.isArray(p)||!p.length||(p.forEach((m,v)=>{var g;try{const y=h[v].data[0];if(!y)return;const b=m==null?void 0:m.fv,x=m==null?void 0:m.status_fv;if(b){const w=y==null?void 0:y[b];w!=null&&(m.value=w)}if(x){const w=y==null?void 0:y[x];w!=null&&(m.statusValue=w)}const _=(g=y==null?void 0:y.time)!=null?g:y==null?void 0:y.datetime;_&&(t.value=_)}catch(y){}}),this.notifyDataChanged())}setSocketData(h){if(!h)return;const{data:p}=this.props.conf;!p||!Array.isArray(p)||(p.forEach(m=>{try{if(!this.shouldApplyRealtimeToItem(h,m))return;const v=this.extractDataValue(h,m.fv,m);v!=null&&(m.value=v);const g=this.extractDataValue(h,m.status_fv,m);g!=null&&(m.statusValue=g),h.datetime&&(t.value=h.datetime)}catch(v){}}),this.notifyDataChanged())}notifyDataChanged(){l.value++}}const i=new r(e,"evn");i.setupLifecycle();const a=i.getStyle(),s=e.conf,l=o.ref(0),c=o.computed(()=>$n(e.conf.options)),u=o.computed(()=>{var f,h;return l.value,(h=(f=e.conf)==null?void 0:f.data)==null?void 0:h[0]}),d=()=>{var m;l.value;const{data:f}=e.conf,h=f[0];let p={color:"",text:""};return(m=h==null?void 0:h.status)==null||m.forEach(v=>{String(v.code)===String(h.statusValue)&&(p={text:v.text,color:v.color})}),p};return(f,h)=>{var p;return o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({background:o.unref(a).bgColor,borderRadius:`${o.unref(a).radiusSize}px`})},[o.createElementVNode("div",{class:"mix-title",style:o.normalizeStyle(c.value)},o.toDisplayString(d().text||o.unref(s).caption||""),5),o.createElementVNode("div",out,[o.createElementVNode("div",{class:"body-value",style:o.normalizeStyle({fontSize:`${o.unref(a).valueSize}px`,color:o.unref(a).textColor})},o.toDisplayString((p=u.value)==null?void 0:p.value),5)]),o.createElementVNode("div",sut,[o.createElementVNode("div",{class:"footer-time",style:o.normalizeStyle({fontSize:`${o.unref(a).timeSize}px`,color:o.unref(a).textColor})},o.toDisplayString(t.value),5)]),o.renderSlot(f.$slots,"default",{},void 0,!0)],4)}}})),gut=Dt(vut,[["__scopeId","data-v-ccafbe3e"]]),yut=Object.freeze(Object.defineProperty({__proto__:null,default:gut},Symbol.toStringTag,{value:"Module"})),but="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e卡片组%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-649.000000,%20-221.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cg%20id='卡片查看模式_view-grid-card'%20transform='translate(649.583607,%20224.127953)'%3e%3cpath%20d='M14.4615385,0%20C15.3112073,0%2016,0.688792693%2016,1.53846154%20L16,1.53846154%20L16,10.4477993%20C16,11.2974681%2015.3112073,11.9862608%2014.4615385,11.9862608%20L14.4615385,11.9862608%20L1.53846154,11.9862608%20C0.688792693,11.9862608%200,11.2974681%200,10.4477993%20L0,10.4477993%20L0,1.53846154%20C0,0.688792693%200.688792693,0%201.53846154,0%20L1.53846154,0%20Z%20M14.4615385,1.23076923%20L1.53846154,1.23076923%20C1.36852777,1.23076923%201.23076923,1.36852777%201.23076923,1.53846154%20L1.23076923,1.53846154%20L1.23076923,10.4477993%20C1.23076923,10.6177331%201.36852777,10.7554916%201.53846154,10.7554916%20L1.53846154,10.7554916%20L14.4615385,10.7554916%20C14.6314722,10.7554916%2014.7692308,10.6177331%2014.7692308,10.4477993%20L14.7692308,10.4477993%20L14.7692308,1.53846154%20C14.7692308,1.36852777%2014.6314722,1.23076923%2014.4615385,1.23076923%20L14.4615385,1.23076923%20Z%20M6.14307642,3.81624937%20C6.48294396,3.81624937%206.75846104,4.09176645%206.75846104,4.43163399%20L6.75846104,4.43163399%20L6.75846104,7.55462685%20C6.75846104,7.89449439%206.48294396,8.17001146%206.14307642,8.17001146%20L6.14307642,8.17001146%20L2.95665531,8.17001146%20C2.61678777,8.17001146%202.3412707,7.89449439%202.3412707,7.55462685%20L2.3412707,7.55462685%20L2.3412707,4.43163399%20C2.3412707,4.09176645%202.61678777,3.81624937%202.95665531,3.81624937%20L2.95665531,3.81624937%20Z%20M13.247791,3.81624937%20C13.5876586,3.81624937%2013.8631757,4.09176645%2013.8631757,4.43163399%20L13.8631757,4.43163399%20L13.8631757,7.55462685%20C13.8631757,7.89449439%2013.5876586,8.17001146%2013.247791,8.17001146%20L13.247791,8.17001146%20L8.17088167,8.17001146%20C7.83101413,8.17001146%207.55549706,7.89449439%207.55549706,7.55462685%20L7.55549706,7.55462685%20L7.55549706,4.43163399%20C7.55549706,4.09176645%207.83101413,3.81624937%208.17088167,3.81624937%20L8.17088167,3.81624937%20Z%20M5.52707692,5.04615385%20L3.572,5.04615385%20L3.572,6.93846154%20L5.52707692,6.93846154%20L5.52707692,5.04615385%20Z%20M12.632,5.04615385%20L8.78553846,5.04615385%20L8.78553846,6.93846154%20L12.632,6.93846154%20L12.632,5.04615385%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",xut="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e卡片组%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-649.000000,%20-221.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cg%20id='卡片查看模式_view-grid-card'%20transform='translate(649.583607,%20224.127953)'%3e%3cpath%20d='M14.4615385,0%20C15.3112073,0%2016,0.688792693%2016,1.53846154%20L16,1.53846154%20L16,10.4477993%20C16,11.2974681%2015.3112073,11.9862608%2014.4615385,11.9862608%20L14.4615385,11.9862608%20L1.53846154,11.9862608%20C0.688792693,11.9862608%200,11.2974681%200,10.4477993%20L0,10.4477993%20L0,1.53846154%20C0,0.688792693%200.688792693,0%201.53846154,0%20L1.53846154,0%20Z%20M14.4615385,1.23076923%20L1.53846154,1.23076923%20C1.36852777,1.23076923%201.23076923,1.36852777%201.23076923,1.53846154%20L1.23076923,1.53846154%20L1.23076923,10.4477993%20C1.23076923,10.6177331%201.36852777,10.7554916%201.53846154,10.7554916%20L1.53846154,10.7554916%20L14.4615385,10.7554916%20C14.6314722,10.7554916%2014.7692308,10.6177331%2014.7692308,10.4477993%20L14.7692308,10.4477993%20L14.7692308,1.53846154%20C14.7692308,1.36852777%2014.6314722,1.23076923%2014.4615385,1.23076923%20L14.4615385,1.23076923%20Z%20M6.14307642,3.81624937%20C6.48294396,3.81624937%206.75846104,4.09176645%206.75846104,4.43163399%20L6.75846104,4.43163399%20L6.75846104,7.55462685%20C6.75846104,7.89449439%206.48294396,8.17001146%206.14307642,8.17001146%20L6.14307642,8.17001146%20L2.95665531,8.17001146%20C2.61678777,8.17001146%202.3412707,7.89449439%202.3412707,7.55462685%20L2.3412707,7.55462685%20L2.3412707,4.43163399%20C2.3412707,4.09176645%202.61678777,3.81624937%202.95665531,3.81624937%20L2.95665531,3.81624937%20Z%20M13.247791,3.81624937%20C13.5876586,3.81624937%2013.8631757,4.09176645%2013.8631757,4.43163399%20L13.8631757,4.43163399%20L13.8631757,7.55462685%20C13.8631757,7.89449439%2013.5876586,8.17001146%2013.247791,8.17001146%20L13.247791,8.17001146%20L8.17088167,8.17001146%20C7.83101413,8.17001146%207.55549706,7.89449439%207.55549706,7.55462685%20L7.55549706,7.55462685%20L7.55549706,4.43163399%20C7.55549706,4.09176645%207.83101413,3.81624937%208.17088167,3.81624937%20L8.17088167,3.81624937%20Z%20M5.52707692,5.04615385%20L3.572,5.04615385%20L3.572,6.93846154%20L5.52707692,6.93846154%20L5.52707692,5.04615385%20Z%20M12.632,5.04615385%20L8.78553846,5.04615385%20L8.78553846,6.93846154%20L12.632,6.93846154%20L12.632,5.04615385%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",_ut={class:"mix-body"},Sut=["onClick"],wut={class:"p-1.5 flex flex-wrap overflow-y-auto"},Cut={class:"h-1/2 flex items-center"},Eut={class:"h-1/2 flex items-center"},Aut={DEFAULT_ICON:but,ACTIVE_ICON:xut,NAME_CN:"卡片组",NAME_EN:"Group Card",ORDER:5,PLATFORM:["pc","screen","mobile"]},Tut={bgColor:"#fff",titleColor:"#111",textColor:"#111",itemColor:"#e5e5e5",titleSize:14,textSize:13,radiusSize:8,isHideTitle:{value:!1,type:"checkbox",label:"component.options.isHideTitle",repel:"isDynamic"},isDynamic:!1,cardWidth:{value:150,type:"number",label:"component.card.cardWidth",dependent:"isDynamic"},cardHeight:{value:100,type:"number",label:"component.card.cardHeight",dependent:"isDynamic"},tags:{value:[{label:"TAB1",flag:[]}],type:"tags",label:"component.card.tags",dependent:"isDynamic"},titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4},n0e=[{name:"",fv:"",object_id:""}],Mut=["name","fv","object_id"],Dut=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],Lut={useAlias:!1,source:"mosaic",multiObject:!1},Nut={DEFAULT:Aut,OPTIONS:Tut,DATA:n0e,PARAMS:Mut,SOURCE:Dut,COMMON:Lut},Out=o.defineComponent(tt(Ne({},Nut),{__name:"groupCard",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){const e=n,t="--";class r extends Cn{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),itemColor:this.getOptionValue("itemColor","#e5e5e5"),titleSize:this.getOptionValue("titleSize",14),textSize:this.getOptionValue("textSize",13),radiusSize:this.getOptionValue("radiusSize",8),cardHeight:this.getOptionValue("cardHeight",100),cardWidth:this.getOptionValue("cardWidth",150),isHideTitle:this.getOptionValue("isHideTitle",!1),isDynamic:this.getOptionValue("isDynamic",!1),tags:this.getOptionValue("tags",[])}}init(){return Ve(this,null,function*(){var m;this.Style.value=this.extractStyles(),this.applyTheme(),(m=this.props.conf.data)!=null&&m.length||(this.props.conf.data=n0e)})}setHistoryData(m){if(!m)return;const{data:v}=this.props.conf;if(!Array.isArray(v)||!v.length)return;let g=!1;v.forEach((y,b)=>{const x=m[b].data[0];x!=null&&y.value!==x&&(y.value=x,g=!0)}),g&&this.notifyDataChanged()}setSocketData(m){if(!m)return;const{data:v}=this.props.conf;if(!Array.isArray(v)||!v.length)return;let g=!1;v.forEach(y=>{if(!this.shouldApplyRealtimeToItem(m,y))return;const b=this.extractDataValue(m,y.fv,y);b!=null&&y.value!==b&&(y.value=b,g=!0)}),g&&this.notifyDataChanged()}notifyDataChanged(){l.value++}}const i=new r(e,"groupCard");i.setupLifecycle();const a=i.getStyle(),s=e.conf,l=o.ref(0),c=o.computed(()=>$n(e.conf.options)),u=o.computed(()=>(l.value,e.conf.data||[])),d=o.ref(0),f=o.computed(()=>{var g;l.value;const{data:p,options:m}=e.conf,v=((g=m.tags)==null?void 0:g.value)||[];return p.filter(y=>{var b,x;return(x=(b=v[d.value])==null?void 0:b.flag)==null?void 0:x.includes(y.fv)})}),h=p=>{d.value=p};return(p,m)=>(o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({background:o.unref(a).bgColor,borderRadius:`${o.unref(a).radiusSize}px`})},[o.unref(a).isDynamic?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("div",{class:"flex border-b border-gray-200 px-3",style:o.normalizeStyle({color:o.unref(a).titleColor,fontSize:`${o.unref(a).titleSize}px`})},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(a).tags,(v,g)=>(o.openBlock(),o.createElementBlock("div",{key:g,class:o.normalizeClass(["py-2 px-3 cursor-pointer",{actived:d.value===Number(g)}]),style:{"margin-right":"10px"},onClick:y=>h(Number(g))},o.toDisplayString(v.label),11,Sut))),128))],4),o.createElementVNode("div",wut,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.value,(v,g)=>(o.openBlock(),o.createElementBlock("div",{key:g,class:"flex flex-col items-center rounded m-1.5",style:o.normalizeStyle({width:`${o.unref(a).cardWidth}px`,height:`${o.unref(a).cardHeight}px`,background:o.unref(a).itemColor,fontSize:`${o.unref(a).textSize}px`,color:`${o.unref(a).textColor}`})},[o.createElementVNode("div",Cut,o.toDisplayString((v==null?void 0:v.value)||t),1),o.createElementVNode("div",Eut,o.toDisplayString(v==null?void 0:v.name),1)],4))),128))])],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("div",{class:"mix-title",style:o.normalizeStyle(c.value)},o.toDisplayString(o.unref(s).caption||o.unref(s).name),5),o.createElementVNode("div",_ut,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(u.value,(v,g)=>(o.openBlock(),o.createElementBlock("div",{key:g,class:"flex-1 flex mx-3 px-4 mb-3 first:mt-3 rounded items-center justify-between",style:o.normalizeStyle({background:o.unref(a).itemColor,color:o.unref(a).textColor,fontSize:`${o.unref(a).textSize}px`})},[o.createElementVNode("div",null,o.toDisplayString(v.name),1),o.createElementVNode("div",null,o.toDisplayString(v.value),1)],4))),128))])],64)),o.renderSlot(p.$slots,"default",{},void 0,!0)],4))}})),Put=Dt(Out,[["__scopeId","data-v-2a1f99f4"]]),kut=Object.freeze(Object.defineProperty({__proto__:null,default:Put},Symbol.toStringTag,{value:"Module"})),Cu="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e数值卡片%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-263.000000,%20-96.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M277.92069,97.4712644%20C278.682471,97.4712644%20279.3,98.0888001%20279.3,98.8505747%20L279.3,98.8505747%20L279.3,109.149425%20C279.3,109.911209%20278.682473,110.528736%20277.92069,110.528736%20L277.92069,110.528736%20L264.67931,110.528736%20C263.917536,110.528736%20263.3,109.911206%20263.3,109.149425%20L263.3,109.149425%20L263.3,98.8505747%20C263.3,98.0888025%20263.917538,97.4712644%20264.67931,97.4712644%20L264.67931,97.4712644%20Z%20M277.92069,98.7586207%20L264.67931,98.7586207%20C264.628525,98.7586207%20264.587356,98.7997897%20264.587356,98.8505747%20L264.587356,98.8505747%20L264.587356,109.149425%20C264.587356,109.200216%20264.62852,109.241379%20264.67931,109.241379%20L264.67931,109.241379%20L277.92069,109.241379%20C277.971486,109.241379%20278.012644,109.200221%20278.012644,109.149425%20L278.012644,109.149425%20L278.012644,98.8505747%20C278.012644,98.7997844%20277.97148,98.7586207%20277.92069,98.7586207%20L277.92069,98.7586207%20Z%20M273.874713,100.66937%20C274.200582,100.66937%20274.469893,100.911525%20274.512515,101.225705%20L274.518391,101.313048%20L274.518391,107.198106%20L274.513991,107.281483%20C274.538251,107.487919%20274.462246,107.702261%20274.292161,107.847183%20C274.044098,108.058501%20273.682057,108.048825%20273.445862,107.837313%20L273.384745,107.774638%20L269.368,103.060264%20L269.368966,107.198106%20C269.368966,107.553599%20269.080781,107.841784%20268.725287,107.841784%20C268.399418,107.841784%20268.130107,107.599629%20268.087485,107.285449%20L268.081609,107.198106%20L268.081609,101.313048%20L268.082187,101.285675%20C268.082816,101.270976%20268.083946,101.256302%20268.085574,101.24168%20L268.081609,101.313048%20C268.081609,101.26688%20268.08647,101.221847%20268.095707,101.178434%20C268.097405,101.170903%20268.099263,101.1629%20268.101275,101.154931%20C268.107261,101.130888%20268.114565,101.107741%20268.123099,101.085199%20C268.126373,101.076657%20268.129862,101.067978%20268.133545,101.059367%20C268.141412,101.041006%20268.150086,101.023157%20268.159537,101.005792%20C268.166518,100.992781%20268.174321,100.979531%20268.182629,100.966529%20C268.189963,100.955262%20268.197427,100.944361%20268.205211,100.933708%20C268.213941,100.92154%20268.223634,100.909215%20268.23383,100.897194%20C268.282315,100.841529%20268.332493,100.798881%20268.388316,100.764515%20L268.307839,100.823066%20C268.339551,100.796052%20268.373125,100.772649%20268.408061,100.752818%20C268.429973,100.740403%20268.452735,100.729194%20268.476205,100.719335%20C268.486406,100.715037%20268.496705,100.711027%20268.507074,100.707293%20C268.525188,100.700768%20268.543849,100.694982%20268.562851,100.690041%20C268.578079,100.686087%20268.593439,100.682694%20268.608873,100.679872%20C268.624283,100.677053%20268.639962,100.674777%20268.655813,100.673076%20C268.673322,100.671183%20268.69078,100.670023%20268.708242,100.669572%20L268.725287,100.66937%20L268.725287,100.66937%20L268.747519,100.669748%20C268.767719,100.670452%20268.787878,100.672102%20268.807925,100.674691%20L268.725287,100.66937%20C268.772556,100.66937%20268.818635,100.674465%20268.863005,100.684136%20C268.872752,100.686367%20268.882402,100.688708%20268.892,100.691272%20C268.915006,100.69732%20268.937508,100.704716%20268.959426,100.713279%20C268.969115,100.717097%20268.979031,100.721241%20268.988855,100.725641%20C269.007259,100.733908%20269.025055,100.742939%20269.042352,100.752748%20C269.0816,100.774844%20269.119243,100.801687%20269.154138,100.832936%20L269.185324,100.862839%20C269.195227,100.872957%20269.204798,100.883399%20269.214021,100.894149%20L269.215255,100.895611%20L273.231,105.609264%20L273.231034,101.313048%20C273.231034,100.957555%20273.519219,100.66937%20273.874713,100.66937%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Eu="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e数值卡片%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-263.000000,%20-96.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M277.92069,97.4712644%20C278.682471,97.4712644%20279.3,98.0888001%20279.3,98.8505747%20L279.3,98.8505747%20L279.3,109.149425%20C279.3,109.911209%20278.682473,110.528736%20277.92069,110.528736%20L277.92069,110.528736%20L264.67931,110.528736%20C263.917536,110.528736%20263.3,109.911206%20263.3,109.149425%20L263.3,109.149425%20L263.3,98.8505747%20C263.3,98.0888025%20263.917538,97.4712644%20264.67931,97.4712644%20L264.67931,97.4712644%20Z%20M277.92069,98.7586207%20L264.67931,98.7586207%20C264.628525,98.7586207%20264.587356,98.7997897%20264.587356,98.8505747%20L264.587356,98.8505747%20L264.587356,109.149425%20C264.587356,109.200216%20264.62852,109.241379%20264.67931,109.241379%20L264.67931,109.241379%20L277.92069,109.241379%20C277.971486,109.241379%20278.012644,109.200221%20278.012644,109.149425%20L278.012644,109.149425%20L278.012644,98.8505747%20C278.012644,98.7997844%20277.97148,98.7586207%20277.92069,98.7586207%20L277.92069,98.7586207%20Z%20M273.874713,100.66937%20C274.200582,100.66937%20274.469893,100.911525%20274.512515,101.225705%20L274.518391,101.313048%20L274.518391,107.198106%20L274.513991,107.281483%20C274.538251,107.487919%20274.462246,107.702261%20274.292161,107.847183%20C274.044098,108.058501%20273.682057,108.048825%20273.445862,107.837313%20L273.384745,107.774638%20L269.368,103.060264%20L269.368966,107.198106%20C269.368966,107.553599%20269.080781,107.841784%20268.725287,107.841784%20C268.399418,107.841784%20268.130107,107.599629%20268.087485,107.285449%20L268.081609,107.198106%20L268.081609,101.313048%20L268.082187,101.285675%20C268.082816,101.270976%20268.083946,101.256302%20268.085574,101.24168%20L268.081609,101.313048%20C268.081609,101.26688%20268.08647,101.221847%20268.095707,101.178434%20C268.097405,101.170903%20268.099263,101.1629%20268.101275,101.154931%20C268.107261,101.130888%20268.114565,101.107741%20268.123099,101.085199%20C268.126373,101.076657%20268.129862,101.067978%20268.133545,101.059367%20C268.141412,101.041006%20268.150086,101.023157%20268.159537,101.005792%20C268.166518,100.992781%20268.174321,100.979531%20268.182629,100.966529%20C268.189963,100.955262%20268.197427,100.944361%20268.205211,100.933708%20C268.213941,100.92154%20268.223634,100.909215%20268.23383,100.897194%20C268.282315,100.841529%20268.332493,100.798881%20268.388316,100.764515%20L268.307839,100.823066%20C268.339551,100.796052%20268.373125,100.772649%20268.408061,100.752818%20C268.429973,100.740403%20268.452735,100.729194%20268.476205,100.719335%20C268.486406,100.715037%20268.496705,100.711027%20268.507074,100.707293%20C268.525188,100.700768%20268.543849,100.694982%20268.562851,100.690041%20C268.578079,100.686087%20268.593439,100.682694%20268.608873,100.679872%20C268.624283,100.677053%20268.639962,100.674777%20268.655813,100.673076%20C268.673322,100.671183%20268.69078,100.670023%20268.708242,100.669572%20L268.725287,100.66937%20L268.725287,100.66937%20L268.747519,100.669748%20C268.767719,100.670452%20268.787878,100.672102%20268.807925,100.674691%20L268.725287,100.66937%20C268.772556,100.66937%20268.818635,100.674465%20268.863005,100.684136%20C268.872752,100.686367%20268.882402,100.688708%20268.892,100.691272%20C268.915006,100.69732%20268.937508,100.704716%20268.959426,100.713279%20C268.969115,100.717097%20268.979031,100.721241%20268.988855,100.725641%20C269.007259,100.733908%20269.025055,100.742939%20269.042352,100.752748%20C269.0816,100.774844%20269.119243,100.801687%20269.154138,100.832936%20L269.185324,100.862839%20C269.195227,100.872957%20269.204798,100.883399%20269.214021,100.894149%20L269.215255,100.895611%20L273.231,105.609264%20L273.231034,101.313048%20C273.231034,100.957555%20273.519219,100.66937%20273.874713,100.66937%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Iut={class:"mix-body"},Rut={class:"mix-footer"},Vut="--",But="--",Fut={DEFAULT_ICON:Cu,ACTIVE_ICON:Eu,NAME_CN:"数值卡片",NAME_EN:"Value",ORDER:3,PLATFORM:["pc","screen","mobile"]},zut={valueSize:36,timeSize:12,radiusSize:8,bgColor:"#fff",titleColor:"#111",titleSize:14,textColor:"#111",isHideTitle:!1,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4},Uut=[{name:"参数一",fv:"",object_id:""}],Hut=["name","fv","object_id"],jut=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],Gut={useAlias:!1,multiObject:!1,hideMultiObject:!0,source:"mosaic"},Yut=1,Wut={DEFAULT:Fut,OPTIONS:zut,DATA:Uut,PARAMS:Hut,SOURCE:jut,ITEMS:Yut,COMMON:Gut},Xut=o.defineComponent(tt(Ne({},Wut),{__name:"vlu",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(n){const e=n,t=o.ref(mt().format("YYYY-MM-DD HH:mm:ss"));class r extends Cn{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),valueSize:this.getOptionValue("valueSize",36),timeSize:this.getOptionValue("timeSize",12),radiusSize:this.getOptionValue("radiusSize",8)}}init(){return Ve(this,null,function*(){var f;this.Style.value=this.extractStyles(),this.applyTheme(),(f=this.props.conf.data)!=null&&f.length||(this.props.conf.data=[{name:"参数一",fv:"",object_id:""}])})}setHistoryData(f){if(!f)return;const{data:h}=this.props.conf;!Array.isArray(h)||!h.length||(h.forEach((p,m)=>{var v;try{const g=f[m].data[0];g!=null&&(p.value=g);const y=(v=f[m])==null?void 0:v.time[0];y&&(t.value=y)}catch(g){}}),this.notifyDataChanged())}notifyDataChanged(){l.value++}setSocketData(f){super.setSocketData(f),f&&f.datetime&&(t.value=f.datetime)}}const i=new r(e,"vlu");i.setupLifecycle();const a=i.getStyle(),s=e.conf,l=o.ref(0),c=o.computed(()=>$n(e.conf.options)),u=o.computed(()=>{var d,f;return l.value,(f=(d=e.conf)==null?void 0:d.data)==null?void 0:f[0]});return(d,f)=>{var h,p;return o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({background:o.unref(a).bgColor,borderRadius:`${o.unref(a).radiusSize}px`})},[o.createElementVNode("div",{class:"mix-title",style:o.normalizeStyle(c.value)},o.toDisplayString(((h=u.value)==null?void 0:h.name)||o.unref(s).caption||But),5),o.createElementVNode("div",Iut,[o.createElementVNode("div",{class:"body-value",style:o.normalizeStyle({fontSize:`${o.unref(a).valueSize}px`,color:o.unref(a).textColor})},o.toDisplayString(((p=u.value)==null?void 0:p.value)||Vut),5)]),o.createElementVNode("div",Rut,[o.createElementVNode("div",{class:"footer-time",style:o.normalizeStyle({fontSize:`${o.unref(a).timeSize}px`,color:o.unref(a).textColor})},o.toDisplayString(t.value),5)]),o.renderSlot(d.$slots,"default",{},void 0,!0)],4)}}})),Zut=Dt(Xut,[["__scopeId","data-v-d7b7e652"]]),qut=Object.freeze(Object.defineProperty({__proto__:null,default:Zut},Symbol.toStringTag,{value:"Module"})),r0e="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='1722502024182'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='21866'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='16'%20height='16'%3e%3cpath%20d='M1023.500049%2027.197344c-0.299971-2.099795-0.899912-4.19959-1.599844-6.099404l-0.599941-1.499854c-0.799922-1.899814-1.799824-3.699639-2.999707-5.399473-0.299971-0.399961-0.599941-0.799922-0.899913-1.299873-1.199883-1.599844-2.599746-3.199688-4.099599-4.49956-0.399961-0.299971-0.799922-0.699932-1.199883-0.999903-1.599844-1.299873-3.299678-2.499756-5.099502-3.499658-4.499561-2.499756-9.699053-3.899619-15.198516-3.899619H607.940631c-5.499463%200-10.698955%201.399863-15.198516%203.899619-1.799824%200.999902-3.499658%202.099795-5.099502%203.499658-0.399961%200.299971-0.799922%200.699932-1.199883%200.999903-1.499854%201.399863-2.899717%202.899717-4.099599%204.49956-0.299971%200.399961-0.599941%200.799922-0.899913%201.299873-1.199883%201.699834-2.099795%203.499658-2.999707%205.399473l-0.599941%201.499854c-0.699932%201.999805-1.299873%203.999609-1.599844%206.099404-0.19998%201.599844-0.399961%203.199688-0.399961%204.899522v447.956254h-63.99375v-351.965629c0-1.699834-0.09999-3.299678-0.399961-4.899521-0.299971-2.099795-0.899912-4.19959-1.599844-6.099404l-0.599941-1.499854c-0.799922-1.899814-1.799824-3.699639-2.999708-5.399473-0.299971-0.399961-0.599941-0.799922-0.899912-1.299873-1.199883-1.599844-2.599746-3.199688-4.099599-4.49956-0.399961-0.299971-0.799922-0.699932-1.199883-0.999903-1.599844-1.299873-3.299678-2.499756-5.099502-3.499658-4.499561-2.499756-9.699053-3.899619-15.198516-3.899619H319.968753v-63.993751c0-17.598281-14.398594-31.996875-31.996875-31.996875H31.996875c-17.598281%200-31.996875%2014.398594-31.996875%2031.996875v191.981252c0%2017.598281%2014.398594%2031.996875%2031.996875%2031.996875h255.975003c17.598281%200%2031.996875-14.398594%2031.996875-31.996875v-63.99375h127.987501v319.968753H319.968753v-63.993751c0-17.598281-14.398594-31.996875-31.996875-31.996875H31.996875c-17.598281%200-31.996875%2014.398594-31.996875%2031.996875v191.981252c0%2017.598281%2014.398594%2031.996875%2031.996875%2031.996875h255.975003c17.598281%200%2031.996875-14.398594%2031.996875-31.996875v-63.993751h127.987501v319.968753H319.968753v-63.99375c0-17.598281-14.398594-31.996875-31.996875-31.996876H31.996875c-17.598281%200-31.996875%2014.398594-31.996875%2031.996876v191.981251c0%2017.598281%2014.398594%2031.996875%2031.996875%2031.996876h255.975003c17.598281%200%2031.996875-14.398594%2031.996875-31.996876v-63.99375h159.984377c17.598281%200%2031.996875-14.398594%2031.996875-31.996875v-351.965629h63.99375v447.956254c0%2017.598281%2014.398594%2031.996875%2031.996876%2031.996876h383.962503c17.598281%200%2031.996875-14.398594%2031.996876-31.996876v-959.906259c0-1.599844-0.09999-3.199688-0.399961-4.799531zM255.975002%20192.081242H63.993751v-127.987501h191.981251v127.987501z%20m0%20383.962504H63.993751v-127.987501h191.981251v127.987501z%20m0%20383.962503H63.993751v-127.987501h191.981251v127.987501z%20m383.962504-895.912508h319.968753v895.912508H639.937506v-895.912508z'%20fill='%23030000'%20p-id='21867'%3e%3c/path%3e%3cpath%20d='M703.931257%20128.087491h63.99375v63.993751h-63.99375zM831.918758%20128.087491h63.993751v63.993751h-63.993751zM703.931257%20256.074993h63.99375v63.99375h-63.99375zM831.918758%20256.074993h63.993751v63.99375h-63.993751zM703.931257%20384.062494h63.99375v63.993751h-63.99375zM831.918758%20384.062494h63.993751v63.993751h-63.993751zM703.931257%20512.049995h63.99375v63.993751h-63.99375zM831.918758%20512.049995h63.993751v63.993751h-63.993751zM703.931257%20640.037496h63.99375v63.993751h-63.99375zM831.918758%20640.037496h63.993751v63.993751h-63.993751zM703.931257%20768.024998h63.99375v63.99375h-63.99375zM831.918758%20768.024998h63.993751v63.99375h-63.993751z'%20fill='%23030000'%20p-id='21868'%3e%3c/path%3e%3c/svg%3e",i0e="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='1722502024182'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='21866'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='16'%20height='16'%3e%3cpath%20d='M1023.500049%2027.197344c-0.299971-2.099795-0.899912-4.19959-1.599844-6.099404l-0.599941-1.499854c-0.799922-1.899814-1.799824-3.699639-2.999707-5.399473-0.299971-0.399961-0.599941-0.799922-0.899913-1.299873-1.199883-1.599844-2.599746-3.199688-4.099599-4.49956-0.399961-0.299971-0.799922-0.699932-1.199883-0.999903-1.599844-1.299873-3.299678-2.499756-5.099502-3.499658-4.499561-2.499756-9.699053-3.899619-15.198516-3.899619H607.940631c-5.499463%200-10.698955%201.399863-15.198516%203.899619-1.799824%200.999902-3.499658%202.099795-5.099502%203.499658-0.399961%200.299971-0.799922%200.699932-1.199883%200.999903-1.499854%201.399863-2.899717%202.899717-4.099599%204.49956-0.299971%200.399961-0.599941%200.799922-0.899913%201.299873-1.199883%201.699834-2.099795%203.499658-2.999707%205.399473l-0.599941%201.499854c-0.699932%201.999805-1.299873%203.999609-1.599844%206.099404-0.19998%201.599844-0.399961%203.199688-0.399961%204.899522v447.956254h-63.99375v-351.965629c0-1.699834-0.09999-3.299678-0.399961-4.899521-0.299971-2.099795-0.899912-4.19959-1.599844-6.099404l-0.599941-1.499854c-0.799922-1.899814-1.799824-3.699639-2.999708-5.399473-0.299971-0.399961-0.599941-0.799922-0.899912-1.299873-1.199883-1.599844-2.599746-3.199688-4.099599-4.49956-0.399961-0.299971-0.799922-0.699932-1.199883-0.999903-1.599844-1.299873-3.299678-2.499756-5.099502-3.499658-4.499561-2.499756-9.699053-3.899619-15.198516-3.899619H319.968753v-63.993751c0-17.598281-14.398594-31.996875-31.996875-31.996875H31.996875c-17.598281%200-31.996875%2014.398594-31.996875%2031.996875v191.981252c0%2017.598281%2014.398594%2031.996875%2031.996875%2031.996875h255.975003c17.598281%200%2031.996875-14.398594%2031.996875-31.996875v-63.99375h127.987501v319.968753H319.968753v-63.993751c0-17.598281-14.398594-31.996875-31.996875-31.996875H31.996875c-17.598281%200-31.996875%2014.398594-31.996875%2031.996875v191.981252c0%2017.598281%2014.398594%2031.996875%2031.996875%2031.996875h255.975003c17.598281%200%2031.996875-14.398594%2031.996875-31.996875v-63.993751h127.987501v319.968753H319.968753v-63.99375c0-17.598281-14.398594-31.996875-31.996875-31.996876H31.996875c-17.598281%200-31.996875%2014.398594-31.996875%2031.996876v191.981251c0%2017.598281%2014.398594%2031.996875%2031.996875%2031.996876h255.975003c17.598281%200%2031.996875-14.398594%2031.996875-31.996876v-63.99375h159.984377c17.598281%200%2031.996875-14.398594%2031.996875-31.996875v-351.965629h63.99375v447.956254c0%2017.598281%2014.398594%2031.996875%2031.996876%2031.996876h383.962503c17.598281%200%2031.996875-14.398594%2031.996876-31.996876v-959.906259c0-1.599844-0.09999-3.199688-0.399961-4.799531zM255.975002%20192.081242H63.993751v-127.987501h191.981251v127.987501z%20m0%20383.962504H63.993751v-127.987501h191.981251v127.987501z%20m0%20383.962503H63.993751v-127.987501h191.981251v127.987501z%20m383.962504-895.912508h319.968753v895.912508H639.937506v-895.912508z'%20fill='%23FFFFFF'%20p-id='21867'%3e%3c/path%3e%3cpath%20d='M703.931257%20128.087491h63.99375v63.993751h-63.99375zM831.918758%20128.087491h63.993751v63.993751h-63.993751zM703.931257%20256.074993h63.99375v63.99375h-63.99375zM831.918758%20256.074993h63.993751v63.99375h-63.993751zM703.931257%20384.062494h63.99375v63.993751h-63.99375zM831.918758%20384.062494h63.993751v63.993751h-63.993751zM703.931257%20512.049995h63.99375v63.993751h-63.99375zM831.918758%20512.049995h63.993751v63.993751h-63.993751zM703.931257%20640.037496h63.99375v63.993751h-63.99375zM831.918758%20640.037496h63.993751v63.993751h-63.993751zM703.931257%20768.024998h63.99375v63.99375h-63.99375zM831.918758%20768.024998h63.993751v63.99375h-63.993751z'%20fill='%23FFFFFF'%20p-id='21868'%3e%3c/path%3e%3c/svg%3e",Kut={class:"item-val"},Jut={class:"w-full flex justify-end"},Qut={DEFAULT_ICON:r0e,ACTIVE_ICON:i0e,NAME_CN:"项目采集",NAME_EN:"Project",ORDER:1,PLATFORM:["pc","screen","mobile"]},$ut={bgColor:"#fff",projectColor:"#999",projectSize:14,paramColor:"#333",labelWidth:64,paramSize:12,paramHeight:32,radiusSize:8,type:{value:"project",type:"radio",option:[{value:"project",label:"component.collect.projectType"},{value:"object",label:"component.collect.objectType"}],label:"component.collect.collectType"},isHideTitle:!1,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4},e1t=[{project_id:"",object_id:""}],t1t=["project_id","object_id"],n1t={DEFAULT:Qut,OPTIONS:$ut,DATA:e1t,PARAMS:t1t,COMMON:{}},r1t=o.defineComponent(tt(Ne({},n1t),{__name:"clt",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){const e=n;class t extends Cn{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),projectColor:this.getOptionValue("projectColor","#999"),projectSize:this.getOptionValue("projectSize",14),paramColor:this.getOptionValue("paramColor","#333"),labelWidth:this.getOptionValue("labelWidth",64),paramSize:this.getOptionValue("paramSize",12),paramHeight:this.getOptionValue("paramHeight",32),radiusSize:this.getOptionValue("radiusSize",4),isHideTitle:this.getOptionValue("isHideTitle",!1),type:this.getOptionValue("type","project")}}init(){return Ve(this,null,function*(){this.Style.value=this.extractStyles(),this.applyTheme(),u()})}}const r=new t(e,"clt");r.setupLifecycle();const i=r.getStyle(),a=e.conf,s=o.computed(()=>$n(e.conf.options)),l=o.ref([{name:"离线项目",data:[{name:"采集项",type:"Integer",unit:"℃",value:""}]}]);let c=0;const u=()=>Ve(null,null,function*(){const{data:v}=e.conf;l.value=[];const g=v.filter(w=>w.project_id).map(w=>w.project_id);if(!g.length)return;const y=++c,b={where_in:JSON.stringify([["uid",g.join(",")]])},{result:x}=yield Bt.http("get_collect_list",b);if(y!==c)return;const _=x==null?void 0:x.data;Array.isArray(_)&&_.length>0&&(l.value=_.map(w=>({name:w.name,uid:w.uid,object_id:w.object_id,data:d(w.script)})))}),d=v=>{const g=[];return v.forEach(y=>{g.push({name:y.label_loc,type:y.type,unit:y.unit,key:y.key})}),g},f=o.computed(()=>{let v=!0;return l.value.forEach(g=>{g.data.forEach(y=>{(y.value||y.value===0)&&(v=!1)})}),v}),h=()=>{e.mode!=="edit"&&(i.value.type==="object"?m():p())},p=()=>{const v=[],g=xi.getMixIotInfo()||xi.getUser();l.value.forEach(y=>{const b={};if(y.data.forEach(_=>{(_.value||_.value===0)&&(b[_.key]=["Integer","Float"].includes(_.type)?Number(_.value):_.type==="Bool"?!!_.value:_.value)}),!Object.keys(b).length)return;const x={name:y.name,value:b,collect_id:y.uid,collector:g.name||g.username};v.push(Bt.http("add_collect_value_without_object",x))}),Promise.all(v).then(y=>{let b=!0;y.forEach(x=>{x.code!==200&&(b=!1,Ue.ElMessage.error(x.msg))}),b&&Ue.ElMessage.success("操作成功")})},m=()=>{const v=[],g=xi.getMixIotInfo()||xi.getUser();l.value.forEach(y=>{const b={};if(y.data.forEach(_=>{(_.value||_.value===0)&&(b[_.key]=["Integer","Float"].includes(_.type)?Number(_.value):_.type==="Bool"?!!_.value:_.value)}),!Object.keys(b).length)return;const x={name:y.name,value:b,collect_id:y.uid,object_id:y.object_id||e.uid,collector:g.name||g.username};v.push(Bt.http("add_collect_value",x))}),Promise.all(v).then(y=>{let b=!0;y.forEach(x=>{x.code!==200&&(b=!1,Ue.ElMessage.error(x.msg))}),b&&Ue.ElMessage.success("操作成功")})};return(v,g)=>{const y=Se.ElInput,b=Se.ElInputNumber,x=Se.ElRadio,_=Se.ElRadioGroup,w=Se.ElButton;return o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({backgroundColor:o.unref(i).bgColor,borderRadius:`${o.unref(i).radiusSize}px`})},[o.createElementVNode("div",{class:"mix-title",style:o.normalizeStyle(s.value)},o.toDisplayString(o.unref(a).caption||o.unref(a).name),5),o.createElementVNode("div",{class:"mix-body",style:o.normalizeStyle({height:o.unref(i).isHideTitle?"100%":"calc(100% - 42px)"})},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l.value,(S,C)=>(o.openBlock(),o.createElementBlock("div",{key:C},[o.createElementVNode("div",{class:"item-title",style:o.normalizeStyle({fontSize:`${o.unref(i).projectSize}px`,color:o.unref(i).projectColor})},o.toDisplayString(S.name),5),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(S.data,(E,T)=>(o.openBlock(),o.createElementBlock("div",{class:"item-wrap",key:`${C}_${T}`},[o.createElementVNode("div",{class:"item-item",style:o.normalizeStyle({width:`${o.unref(i).labelWidth}px`,fontSize:`${o.unref(i).paramSize}px`,color:o.unref(i).paramColor,height:`${o.unref(i).paramHeight}px`})},o.toDisplayString(E.name)+": ",5),o.createElementVNode("div",Kut,[E.type==="String"?(o.openBlock(),o.createBlock(y,{key:0,type:"text",modelValue:E.value,"onUpdate:modelValue":A=>E.value=A},{suffix:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(E.unit),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])):o.createCommentVNode("",!0),E.type==="Integer"?(o.openBlock(),o.createBlock(b,{key:1,style:{width:"100%"},modelValue:E.value,"onUpdate:modelValue":A=>E.value=A,align:"left",precision:0,controls:!1},{suffix:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(E.unit),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])):o.createCommentVNode("",!0),E.type==="Float"?(o.openBlock(),o.createBlock(b,{key:2,style:{width:"100%"},modelValue:E.value,"onUpdate:modelValue":A=>E.value=A,align:"left",controls:!1},{suffix:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(E.unit),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])):o.createCommentVNode("",!0),E.type==="Bool"?(o.openBlock(),o.createBlock(_,{key:3,value:E.value,"onUpdate:value":A=>E.value=A},{default:o.withCtx(()=>[o.createVNode(x,{value:1},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(v.$t("common.yes")),1)]),_:1}),o.createVNode(x,{value:0},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(v.$t("common.no")),1)]),_:1})]),_:1},8,["value","onUpdate:value"])):o.createCommentVNode("",!0)])]))),128))]))),128)),o.createElementVNode("div",Jut,[o.createVNode(w,{type:f.value?"default":"primary",disabled:f.value,onClick:h},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(v.$t("common.confirm")),1)]),_:1},8,["type","disabled"])])],4),o.renderSlot(v.$slots,"default",{},void 0,!0)],4)}}})),i1t=Dt(r1t,[["__scopeId","data-v-58df742e"]]),a1t=Object.freeze(Object.defineProperty({__proto__:null,default:i1t},Symbol.toStringTag,{value:"Module"})),o1t={class:"item-val"},s1t={key:0,class:"btn-wrap"},l1t={DEFAULT_ICON:r0e,ACTIVE_ICON:i0e,NAME_CN:"定制采集",NAME_EN:"Customer",ORDER:2,PLATFORM:["pc","screen","mobile"]},c1t={bgColor:"#fff",titleColor:"#111",paramColor:"#333",labelWidth:64,titleSize:14,paramSize:12,paramHeight:32,radiusSize:8,isHideTitle:!1,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4},u1t=[{object_id:"",project_id:"",collect:"",label_cn:"",fv:"",unit:""}],d1t=["mosaic"],f1t=["object_id","project_id","collect","label_cn","fv","unit"],h1t={DEFAULT:l1t,OPTIONS:c1t,DATA:u1t,PARAMS:f1t,SOURCE:d1t,COMMON:{}},p1t=o.defineComponent(tt(Ne({},h1t),{__name:"cmc",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"},sourceData:{type:Object,default:()=>({})}},setup(n){const{proxy:e}=o.getCurrentInstance(),t=n,r="--";class i extends Cn{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),paramColor:this.getOptionValue("paramColor","#333"),labelWidth:this.getOptionValue("labelWidth",64),titleSize:this.getOptionValue("titleSize",14),paramSize:this.getOptionValue("paramSize",12),paramHeight:this.getOptionValue("paramHeight",32),radiusSize:this.getOptionValue("radiusSize",4),isHideTitle:this.getOptionValue("isHideTitle",!1),type:this.getOptionValue("type","project")}}init(){return Ve(this,null,function*(){this.Style.value=this.extractStyles(),this.applyTheme(),f()})}setHistoryData(v){const{data:g}=this.props.conf;let y=!1;g.forEach((b,x)=>{var w;const _=(w=v[x].data[0])!=null?w:r;b.value!==_&&(b.value=_,y=!0)}),y&&this.notifyDataChanged()}setSocketData(v){const{common:g,data:y,uid:b}=this.props.conf;console.log(v,"result socket");let x=!1;y.forEach(_=>{var S;const w=(S=v.data[_.fv])!=null?S:r;_.value!==w&&(_.value=w,x=!0)}),x&&this.notifyDataChanged()}notifyDataChanged(){c.value++}}const a=new i(t,"cmc");a.setupLifecycle();const s=a.getStyle(),l=t.conf,c=o.ref(0),u=o.computed(()=>$n(t.conf.options)),d=o.computed(()=>(c.value,t.conf.data||[])),f=()=>Ve(null,null,function*(){const{data:m}=t.conf;if(!m||m.length===0)return;const v=m.filter(x=>x.project_id).map(x=>x.project_id);if(!v.length){t.mode==="edit"&&m.forEach(x=>{x.label_cn=x.label_cn||e.$t("component.collect.collectItem"),x.type=x.type||"Integer",x.unit=x.unit||""});return}let g={where_in:JSON.stringify([["uid",v.join(",")]])};const{result:y}=yield Bt.http("get_collect_list",g,!0),b={};y.data.forEach(x=>{b[x.uid]=x}),m.forEach(x=>{var _;if((_=b[x.project_id])!=null&&_.script){const w=b[x.project_id].script.find(S=>S.key===x.collect);x.unit=w==null?void 0:w.unit,x.label_cn=x.label_cn||(w==null?void 0:w.label_loc),x.type=w==null?void 0:w.type}})}),h=o.computed(()=>{const{data:m}=t.conf;let v=!0;return m.forEach(g=>{(g.setting||g.setting===0)&&(v=!1)}),v}),p=()=>Ve(null,null,function*(){if(t.mode==="edit")return;const{data:m,common:v}=t.conf;JSON.parse(sessionStorage.getItem(t3)||"{}");const g=[],y=xi.getMixIotInfo()||xi.getUser();m.forEach(b=>{const x=jr(b,v.useAlias,t.uid);if((b.setting||b.setting===0)&&x){let _={collect_id:b.project_id,object_id:x,value:{[b.collect]:["Integer","Float"].includes(b.type)?Number(b.setting):b.setting},name:b.label_cn,collector:y.name||y.username};g.push(Bt.http("add_collect_value",_))}}),Promise.all(g).then(b=>{console.log(b),b.every(x=>x.code===200)&&Ue.ElMessage.success("操作成功")})});return o.watchEffect(()=>{t.conf.socketData&&a.setSocketData(t.conf.socketData)}),(m,v)=>{var w,S;const g=Se.ElInput,y=Se.ElInputNumber,b=Se.ElRadio,x=Se.ElRadioGroup,_=Se.ElButton;return o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({backgroundColor:o.unref(s).bgColor,borderRadius:`${o.unref(s).radiusSize}px`})},[o.createElementVNode("div",{class:"mix-title",style:o.normalizeStyle(u.value)},o.toDisplayString(o.unref(l).caption||o.unref(l).name),5),o.createElementVNode("div",{class:"mix-body",style:o.normalizeStyle({height:o.unref(s).isHideTitle?"100%":"calc(100% - 42px)"})},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(d.value,(C,E)=>(o.openBlock(),o.createElementBlock("div",{key:E,class:"item-wrap"},[o.createElementVNode("div",{class:"item-item",style:o.normalizeStyle({width:`${o.unref(s).labelWidth}px`,fontSize:`${o.unref(s).paramSize}px`,color:o.unref(s).paramColor})},o.toDisplayString(C.label_cn)+": ",5),o.createElementVNode("div",o1t,[C.type==="String"?(o.openBlock(),o.createBlock(g,{key:0,type:"text",class:"w-full",modelValue:C.setting,"onUpdate:modelValue":T=>C.setting=T},{suffix:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(C.unit),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])):o.createCommentVNode("",!0),C.type==="Integer"?(o.openBlock(),o.createBlock(y,{key:1,style:{width:"100%"},modelValue:C.setting,"onUpdate:modelValue":T=>C.setting=T,align:"left",precision:0,controls:!1},{suffix:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(C.unit),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])):o.createCommentVNode("",!0),C.type==="Float"?(o.openBlock(),o.createBlock(y,{key:2,style:{width:"100%"},modelValue:C.setting,"onUpdate:modelValue":T=>C.setting=T,align:"left",controls:!1},{suffix:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(C.unit),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])):o.createCommentVNode("",!0),C.type==="Boolean"?(o.openBlock(),o.createBlock(x,{key:3,class:"w-full",modelValue:C.setting,"onUpdate:modelValue":T=>C.setting=T},{default:o.withCtx(()=>[o.createVNode(b,{value:1},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(m.$t("common.yes")),1)]),_:1}),o.createVNode(b,{value:0},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(m.$t("common.no")),1)]),_:1})]),_:1},8,["modelValue","onUpdate:modelValue"])):o.createCommentVNode("",!0)]),o.createElementVNode("div",{class:"item-label",style:o.normalizeStyle({fontSize:`${o.unref(s).paramSize}px`})},o.toDisplayString(C.value||"--"),5)]))),128)),(S=(w=o.unref(l))==null?void 0:w.data)!=null&&S.length?(o.openBlock(),o.createElementBlock("div",s1t,[o.createVNode(_,{type:h.value?"default":"primary",disabled:h.value,onClick:p},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(m.$t("common.confirm")),1)]),_:1},8,["type","disabled"])])):o.createCommentVNode("",!0)],4),o.renderSlot(m.$slots,"default",{},void 0,!0)],4)}}})),m1t=Dt(p1t,[["__scopeId","data-v-4d0f3a6c"]]),v1t=Object.freeze(Object.defineProperty({__proto__:null,default:m1t},Symbol.toStringTag,{value:"Module"})),g1t={class:"mix-body"},y1t={key:0,class:"json-editor"},b1t={class:"editor-header"},x1t={key:1,class:"edit-toolbar"},_1t={key:2,class:"empty-state"},S1t={key:3,class:"form-content"},w1t={key:0,class:"form-description"},C1t={DEFAULT_ICON:e0e,ACTIVE_ICON:t0e,NAME_CN:"动态表单",NAME_EN:"ActionItem",ORDER:1,PLATFORM:["pc","screen","mobile"]},E1t={titleColor:"#111",bgColor:"#fff",radiusSize:8,labelWidth:100,isHideTitle:!1,showButtons:!0,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4},A1t={},T1t=[],M1t=[],D1t={},L1t={DEFAULT:C1t,OPTIONS:E1t,DATA:A1t,PARAMS:T1t,SOURCE:M1t,COMMON:D1t},N1t=o.defineComponent(tt(Ne({},L1t),{__name:"actionItem",props:{conf:{type:Object,default:()=>({})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},emits:["submit","generate"],setup(n,{emit:e}){const t=n,r=o.ref(!1),i=o.ref(""),a=e,s=Na(),l=o.ref(),c=new GI(t);c.setupLifecycle(),c.watchParams();const u=c.getStyle(),d=o.computed(()=>t.conf||{}),f=o.computed(()=>$n(t.conf.options));function h(C,E){return E.split(".").reduce((T,A)=>T==null?void 0:T[A],C)}function p(C,E,T){const A=E.split("."),M=A.pop(),D=A.reduce((k,P)=>((!k[P]||typeof k[P]!="object")&&(k[P]={}),k[P]),C);D[M]=T}function m(C,E,T){var A,M,D;if(!((A=C.rules)!=null&&A.length))return!1;for(const k of C.rules){const P=k.related_key;if(!P)continue;const I=E?`${E}.${P}`:P,N=h(T,I),R=(M=k.conditions)==null?void 0:M.find(V=>V.value===N);if((D=R==null?void 0:R.property)!=null&&D.hidden)return!0}return!1}const v=o.defineComponent({name:"FormField",props:{param:{type:Object,required:!0},rootData:{type:Object,required:!0},actionItem:{type:Object,required:!0},parentPath:{type:String,default:""}},setup(C){var I;const E=C.param,T=C.rootData,A=C.actionItem,M=E.key,D=C.parentPath?`${C.parentPath}.${M}`:M,k=E.form_type==="sub_form"&&E.properties&&!E.items,P=E.form_type==="sub_form"&&((I=E.items)==null?void 0:I.properties);return()=>{if(m(E,C.parentPath,T))return null;if(k){let R=h(T,D);(!R||typeof R!="object"||Array.isArray(R))&&p(T,D,{});const V=E.properties.filter(B=>!m(B,D,T));return o.h("div",{class:"nested-group"},[o.h("div",{class:"nested-title"},E.cn_name),o.h("div",{class:"nested-content"},V.map(B=>o.h(v,{param:B,rootData:T,actionItem:A,key:B.key,parentPath:D})))])}if(P){let R=h(T,D);Array.isArray(R)||(p(T,D,[]),R=h(T,D));const V=E.items.properties;return o.h(Ue.ElFormItem,{label:E.cn_name},()=>[o.h("div",{class:"sub-form"},[...R.map((B,F)=>o.h("div",{class:"sub-item",key:F},[o.h("div",{class:"sub-fields"},V.map(G=>o.h("div",{class:"sub-field",key:G.key},[o.h("span",{class:"sub-label"},[G.required?o.h("span",{class:"required-star"},"*"):null,G.cn_name]),y(G,B,A)]))),o.h(Ue.ElButton,{type:"danger",icon:qt.Delete,circle:!0,size:"small",onClick:()=>R.splice(F,1)})])),o.h(Ue.ElButton,{type:"primary",icon:qt.Plus,onClick:()=>{const B={};V.forEach(F=>{B[F.key]=b(F)}),R.push(B)}},()=>"添加")])])}const N={label:E.cn_name,prop:D};return E.required&&(N.rules=[{required:!0,message:`请输入${E.cn_name}`,trigger:"blur"}]),o.h(Ue.ElFormItem,N,()=>g(E,D,T,A))}}});function g(C,E,T,A){var P,I;const M=A.isFieldDisabled(C),D=h(T,E),k=N=>p(T,E,N);switch(C.form_type){case"text":return o.h(Ue.ElInput,{modelValue:D!=null?D:"","onUpdate:modelValue":k,placeholder:C.description||`请输入${C.cn_name}`,disabled:M,size:"small"});case"textarea":return o.h(Ue.ElInput,{type:"textarea",modelValue:D!=null?D:"","onUpdate:modelValue":k,placeholder:C.description,disabled:M,rows:3});case"select":return o.h(Ue.ElSelect,{modelValue:D!=null?D:"","onUpdate:modelValue":k,placeholder:`请选择${C.cn_name}`,disabled:M,style:"width:100%",size:"small"},()=>(C.enum||[]).map(R=>o.h(Ue.ElOption,{key:R.value,label:R.cn_name,value:R.value})));case"number":return o.h(Ue.ElInputNumber,{modelValue:D!=null?D:0,"onUpdate:modelValue":k,disabled:M,min:(P=C.format)==null?void 0:P.min,max:(I=C.format)==null?void 0:I.max,style:"width:100%",size:"small"});case"switch":const N=D===!0||D==="true";return o.h(Ue.ElSwitch,{modelValue:N,"onUpdate:modelValue":k,disabled:M});default:return o.h(Ue.ElInput,{modelValue:D!=null?D:"","onUpdate:modelValue":k,disabled:M,size:"small"})}}function y(C,E,T){var D,k,P,I,N,R;const A=C.key,M=T.isFieldDisabled(C);switch(C.form_type){case"text":return o.h(Ue.ElInput,{modelValue:(D=E[A])!=null?D:"","onUpdate:modelValue":B=>E[A]=B,placeholder:C.description||`请输入${C.cn_name}`,disabled:M,size:"small"});case"select":return o.h(Ue.ElSelect,{modelValue:(k=E[A])!=null?k:"","onUpdate:modelValue":B=>E[A]=B,placeholder:`请选择${C.cn_name}`,disabled:M,style:"width:100%",size:"small"},()=>(C.enum||[]).map(B=>o.h(Ue.ElOption,{key:B.value,label:B.cn_name,value:B.value})));case"number":return o.h(Ue.ElInputNumber,{modelValue:(P=E[A])!=null?P:0,"onUpdate:modelValue":B=>E[A]=B,disabled:M,min:(I=C.format)==null?void 0:I.min,max:(N=C.format)==null?void 0:N.max,style:"width:100%",size:"small"});case"switch":const V=E[A]===!0||E[A]==="true";return o.h(Ue.ElSwitch,{modelValue:V,"onUpdate:modelValue":B=>E[A]=B,disabled:M});default:return o.h(Ue.ElInput,{modelValue:(R=E[A])!=null?R:"","onUpdate:modelValue":B=>E[A]=B,disabled:M,size:"small"})}}function b(C){var E,T;return C.default_value!==void 0?C.default_value:C.form_type==="switch"?!1:C.form_type==="checkbox_group"?[]:C.form_type==="number"?(T=(E=C.format)==null?void 0:E.min)!=null?T:0:""}const x=()=>{const C=c.applyJson();C.success?Ue.ElMessage.success("JSON 配置已应用"):Ue.ElMessage.error(C.error||"JSON 格式错误")},_=()=>{c.saveFormData(),Ue.ElMessage.success("保存成功")},w=()=>Ve(null,null,function*(){var C;try{yield(C=l.value)==null?void 0:C.validate();const E=c.exportTargetJson();i.value=JSON.stringify(E,null,2),r.value=!0,a("generate",E)}catch(E){Ue.ElMessage.error("请先完善必填项")}}),S=()=>{try{const C=document.createElement("textarea");C.value=i.value,C.style.position="fixed",C.style.opacity="0",document.body.appendChild(C),C.select(),document.execCommand("copy"),document.body.removeChild(C),Ue.ElMessage.success("已复制到剪贴板")}catch(C){Ue.ElMessage.error("复制失败")}};return o.onMounted(()=>{s.registerInstance(t.uid,c)}),o.onUnmounted(()=>{s.unregisterInstance(t.uid)}),o.watchEffect(()=>{t.conf.socketData&&c.setSocketData(t.conf.socketData)}),(C,E)=>{const T=Se.ElEmpty,A=Se.ElForm;return o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({background:o.unref(u).bgColor,borderRadius:o.unref(u).radiusSize+"px"})},[o.createElementVNode("div",{class:"mix-title",style:o.normalizeStyle(f.value)},o.toDisplayString(d.value.action_name||d.value.caption||d.value.name),5),o.createElementVNode("div",g1t,[n.mode==="edit"&&o.unref(c).showJsonEditor.value?(o.openBlock(),o.createElementBlock("div",y1t,[o.createElementVNode("div",b1t,[E[8]||(E[8]=o.createElementVNode("span",null,"JSON 配置",-1)),o.createVNode(o.unref(Ue.ElButton),{size:"small",onClick:x},{default:o.withCtx(()=>[...E[6]||(E[6]=[o.createTextVNode("应用",-1)])]),_:1}),o.createVNode(o.unref(Ue.ElButton),{size:"small",onClick:E[0]||(E[0]=M=>o.unref(c).showJsonEditor.value=!1)},{default:o.withCtx(()=>[...E[7]||(E[7]=[o.createTextVNode("关闭",-1)])]),_:1})]),o.createVNode(o.unref(Ue.ElInput),{type:"textarea",modelValue:o.unref(c).jsonInput.value,"onUpdate:modelValue":E[1]||(E[1]=M=>o.unref(c).jsonInput.value=M),rows:12,placeholder:"粘贴 action_item JSON..."},null,8,["modelValue"])])):o.createCommentVNode("",!0),n.mode==="edit"&&!o.unref(c).showJsonEditor.value?(o.openBlock(),o.createElementBlock("div",x1t,[o.createVNode(o.unref(Ue.ElButton),{size:"small",type:"primary",onClick:E[2]||(E[2]=M=>o.unref(c).showJsonEditor.value=!0)},{default:o.withCtx(()=>[...E[9]||(E[9]=[o.createTextVNode("编辑 JSON",-1)])]),_:1})])):o.createCommentVNode("",!0),o.createVNode(o.unref(Ue.ElDialog),{modelValue:r.value,"onUpdate:modelValue":E[5]||(E[5]=M=>r.value=M),title:"生成的目标JSON",width:"600px","close-on-click-modal":!1},{footer:o.withCtx(()=>[o.createVNode(o.unref(Ue.ElButton),{onClick:S},{default:o.withCtx(()=>[...E[10]||(E[10]=[o.createTextVNode("复制",-1)])]),_:1}),o.createVNode(o.unref(Ue.ElButton),{type:"primary",onClick:E[4]||(E[4]=M=>r.value=!1)},{default:o.withCtx(()=>[...E[11]||(E[11]=[o.createTextVNode("关闭",-1)])]),_:1})]),default:o.withCtx(()=>[o.createVNode(o.unref(Ue.ElInput),{type:"textarea",modelValue:i.value,"onUpdate:modelValue":E[3]||(E[3]=M=>i.value=M),rows:16,readonly:""},null,8,["modelValue"])]),_:1},8,["modelValue"]),!o.unref(c).hasParams&&n.mode!=="edit"?(o.openBlock(),o.createElementBlock("div",_1t,[o.createVNode(T,{description:"等待表单配置...","image-size":80})])):o.createCommentVNode("",!0),o.unref(c).hasParams?(o.openBlock(),o.createElementBlock("div",S1t,[d.value.description?(o.openBlock(),o.createElementBlock("div",w1t,[o.createElementVNode("p",null,o.toDisplayString(d.value.description),1)])):o.createCommentVNode("",!0),o.createVNode(A,{ref_key:"formRef",ref:l,model:o.unref(c).formData,rules:o.unref(c).getFormRules(),"label-width":o.unref(u).labelWidth+"px"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(c).getVisibleParams(),M=>(o.openBlock(),o.createBlock(o.unref(v),{key:M.key,param:M,rootData:o.unref(c).formData,actionItem:o.unref(c)},null,8,["param","rootData","actionItem"]))),128)),o.unref(u).showButtons?(o.openBlock(),o.createBlock(o.unref(Ue.ElFormItem),{key:0,class:"form-buttons"},{default:o.withCtx(()=>[o.createVNode(o.unref(Ue.ElButton),{type:"primary",onClick:_},{default:o.withCtx(()=>[...E[12]||(E[12]=[o.createTextVNode("保存",-1)])]),_:1}),o.createVNode(o.unref(Ue.ElButton),{type:"success",onClick:w},{default:o.withCtx(()=>[...E[13]||(E[13]=[o.createTextVNode("生成JSON",-1)])]),_:1})]),_:1})):o.createCommentVNode("",!0)]),_:1},8,["model","rules","label-width"])])):o.createCommentVNode("",!0)]),o.renderSlot(C.$slots,"default",{},void 0,!0)],4)}}})),O1t=Dt(N1t,[["__scopeId","data-v-5198cc32"]]),P1t=Object.freeze(Object.defineProperty({__proto__:null,default:O1t},Symbol.toStringTag,{value:"Module"})),a0e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='17px'%20viewBox='0%200%2016%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e组合盒子%3c/title%3e%3cg%20id='box-icon'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20transform='translate(0.000000,%200.500000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3c!--%20外框%20--%3e%3cpath%20d='M14,0%20C15.1045695,0%2016,0.8954305%2016,2%20L16,14%20C16,15.1045695%2015.1045695,16%2014,16%20L2,16%20C0.8954305,16%200,15.1045695%200,14%20L0,2%20C0,0.8954305%200.8954305,0%202,0%20L14,0%20Z%20M14,1.2%20L2,1.2%20C1.55817,1.2%201.2,1.55817%201.2,2%20L1.2,14%20C1.2,14.44183%201.55817,14.8%202,14.8%20L14,14.8%20C14.44183,14.8%2014.8,14.44183%2014.8,14%20L14.8,2%20C14.8,1.55817%2014.44183,1.2%2014,1.2%20Z'/%3e%3c!--%20左侧插槽%20--%3e%3crect%20x='2.5'%20y='2.5'%20width='4.5'%20height='11'%20rx='0.5'/%3e%3c!--%20右侧插槽%20--%3e%3crect%20x='9'%20y='2.5'%20width='4.5'%20height='11'%20rx='0.5'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",o0e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='17px'%20viewBox='0%200%2016%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e组合盒子%3c/title%3e%3cg%20id='box-icon-active'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20transform='translate(0.000000,%200.500000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3c!--%20外框%20--%3e%3cpath%20d='M14,0%20C15.1045695,0%2016,0.8954305%2016,2%20L16,14%20C16,15.1045695%2015.1045695,16%2014,16%20L2,16%20C0.8954305,16%200,15.1045695%200,14%20L0,2%20C0,0.8954305%200.8954305,0%202,0%20L14,0%20Z%20M14,1.2%20L2,1.2%20C1.55817,1.2%201.2,1.55817%201.2,2%20L1.2,14%20C1.2,14.44183%201.55817,14.8%202,14.8%20L14,14.8%20C14.44183,14.8%2014.8,14.44183%2014.8,14%20L14.8,2%20C14.8,1.55817%2014.44183,1.2%2014,1.2%20Z'/%3e%3c!--%20左侧插槽%20--%3e%3crect%20x='2.5'%20y='2.5'%20width='4.5'%20height='11'%20rx='0.5'/%3e%3c!--%20右侧插槽%20--%3e%3crect%20x='9'%20y='2.5'%20width='4.5'%20height='11'%20rx='0.5'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",k1t=["onClick"],I1t=["onClick"],R1t={key:1,class:"slot-placeholder"},V1t={key:2,class:"slot-actions"},B1t={class:"component-selector"},F1t={class:"component-grid"},z1t=["onClick"],U1t={class:"comp-icon"},H1t=["src","alt"],j1t={class:"comp-name"},G1t={DEFAULT_ICON:a0e,ACTIVE_ICON:o0e,NAME_CN:"组合盒子",NAME_EN:"Box",ORDER:0,PLATFORM:["pc","screen","mobile"]},Y1t={layoutType:{value:"horizontal",type:"select",label:"布局方式",options:[{label:"水平排列",value:"horizontal"},{label:"垂直排列",value:"vertical"},{label:"自由布局",value:"free"},{label:"网格布局",value:"grid"}]},slotCount:{value:2,type:"number",label:"插槽数量",min:1,max:12},gridCols:{value:2,type:"number",label:"网格列数",min:1,max:6},gap:{value:8,type:"number",label:"间距(px)",min:0,max:50},padding:{value:8,type:"number",label:"内边距(px)",min:0,max:50},backgroundColor:{value:"transparent",type:"color",label:"背景色"},borderWidth:{value:0,type:"number",label:"边框宽度",min:0,max:10},borderColor:{value:"#e5e7eb",type:"color",label:"边框颜色"},borderRadius:{value:4,type:"number",label:"圆角(px)",min:0,max:50},slotsConfig:{value:"[]",type:"textarea",label:"插槽配置(JSON)",placeholder:'[{"x":0,"y":0,"w":50,"h":100},{"x":50,"y":0,"w":50,"h":100}]'}},W1t=[],X1t=[],Z1t=[],q1t={},K1t={DEFAULT:G1t,OPTIONS:Y1t,DATA:W1t,PARAMS:X1t,SOURCE:Z1t,COMMON:q1t},J1t=o.defineComponent(tt(Ne({},K1t),{__name:"box",props:{conf:{type:Object,default:()=>({data:[],options:{}})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){const e=n,t=o.shallowRef({}),r=o.ref({}),i=o.ref(!1),a=o.ref([]),s=o.ref(-1),l=o.ref(-1);o.onMounted(()=>Ve(null,null,function*(){t.value=F9.loadComponents(),r.value=yield F9.getElementsMap()}));class c extends Cn{extractStyles(){return{layoutType:this.getOptionValue("layoutType","horizontal"),slotCount:this.getOptionValue("slotCount",2),gridCols:this.getOptionValue("gridCols",2),gap:this.getOptionValue("gap",8),padding:this.getOptionValue("padding",8),backgroundColor:this.getOptionValue("backgroundColor","transparent"),borderWidth:this.getOptionValue("borderWidth",0),borderColor:this.getOptionValue("borderColor","#e5e7eb"),borderRadius:this.getOptionValue("borderRadius",4),slotsConfig:this.getOptionValue("slotsConfig","[]")}}init(){this.Style.value=this.extractStyles(),this.applyTheme(),h()}}const u=new c(e,"box");u.setupLifecycle();const d=u.getStyle(),f=o.ref([]),h=()=>{var E,T,A,M,D,k,P,I;const x=((E=d.value)==null?void 0:E.slotCount)||2,_=((T=d.value)==null?void 0:T.layoutType)||"horizontal",w=((A=e.conf)==null?void 0:A.slots)||[];let S=[];try{const N=((M=d.value)==null?void 0:M.slotsConfig)||"[]";S=JSON.parse(N)}catch(N){S=[]}const C=[];for(let N=0;N<x;N++){const R=w[N],V=S[N];let B={x:0,y:0,w:100,h:100};_==="free"&&V?B={x:(D=V.x)!=null?D:0,y:(k=V.y)!=null?k:0,w:(P=V.w)!=null?P:50,h:(I=V.h)!=null?I:100}:_==="horizontal"?B={x:100/x*N,y:0,w:100/x,h:100}:_==="vertical"&&(B={x:0,y:100/x*N,w:100,h:100/x}),C.push(tt(Ne({id:(R==null?void 0:R.id)||`slot-${Date.now()}-${N}`,name:(R==null?void 0:R.name)||(V==null?void 0:V.name)||`插槽 ${N+1}`},B),{component:(R==null?void 0:R.component)||null}))}f.value=C,e.conf&&(e.conf.slots=C)},p=o.computed(()=>{const x=d.value,_=(x==null?void 0:x.layoutType)||"horizontal",w={width:"100%",height:"100%",backgroundColor:(x==null?void 0:x.backgroundColor)||"transparent",borderWidth:`${(x==null?void 0:x.borderWidth)||0}px`,borderStyle:(x==null?void 0:x.borderWidth)>0?"solid":"none",borderColor:(x==null?void 0:x.borderColor)||"#e5e7eb",borderRadius:`${(x==null?void 0:x.borderRadius)||4}px`,padding:`${(x==null?void 0:x.padding)||8}px`,boxSizing:"border-box",overflow:"hidden"};return _==="horizontal"?tt(Ne({},w),{display:"flex",flexDirection:"row",gap:`${(x==null?void 0:x.gap)||8}px`}):_==="vertical"?tt(Ne({},w),{display:"flex",flexDirection:"column",gap:`${(x==null?void 0:x.gap)||8}px`}):_==="grid"?tt(Ne({},w),{display:"grid",gridTemplateColumns:`repeat(${(x==null?void 0:x.gridCols)||2}, 1fr)`,gap:`${(x==null?void 0:x.gap)||8}px`}):tt(Ne({},w),{position:"relative"})}),m=x=>{var w;const _=((w=d.value)==null?void 0:w.layoutType)||"horizontal";return _==="free"?{position:"absolute",left:`${x.x}%`,top:`${x.y}%`,width:`${x.w}%`,height:`${x.h}%`}:{flex:_==="horizontal"||_==="vertical"?1:void 0,minWidth:0,minHeight:0,overflow:"hidden"}},v=(x,_)=>{e.mode==="edit"&&(x.component||(s.value=_,i.value=!0))},g=(x,_)=>{var S;if(e.mode!=="edit"||!x.component)return;l.value=_;const w=new CustomEvent("box-component-selected",{bubbles:!0,detail:{component:x.component,boxId:(S=e.conf)==null?void 0:S.id,slotIndex:_}});document.dispatchEvent(w)},y=x=>{if(s.value<0)return;const w=F9.getAllExposedProps()[x.type]||{},S={id:`box-comp-${Date.now()}`,type:x.type,i:`box-comp-${Date.now()}`,x:0,y:0,w:1,h:1,options:JSON.parse(JSON.stringify(w.OPTIONS||{})),data:JSON.parse(JSON.stringify(w.DATA||[])),common:JSON.parse(JSON.stringify(w.COMMON||{}))};f.value[s.value].component=S,e.conf&&(e.conf.slots=f.value),i.value=!1,s.value=-1},b=x=>{f.value[x].component=null,e.conf&&(e.conf.slots=f.value)};return o.watch(()=>{var x,_,w;return[(x=d.value)==null?void 0:x.slotCount,(_=d.value)==null?void 0:_.layoutType,(w=d.value)==null?void 0:w.slotsConfig]},()=>{h()},{deep:!0}),(x,_)=>{const w=Se.ElIcon,S=Se.ElButton,C=Se.ElCollapseItem,E=Se.ElCollapse,T=Se.ElDialog;return o.openBlock(),o.createElementBlock("div",{class:"box-container",style:o.normalizeStyle(p.value)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.value,(A,M)=>(o.openBlock(),o.createElementBlock("div",{key:A.id,class:o.normalizeClass(["box-slot",{"slot-empty":!A.component,"slot-hover":n.mode==="edit"&&!A.component}]),style:o.normalizeStyle(m(A)),onClick:o.withModifiers(D=>v(A,M),["stop"])},[A.component&&t.value[A.component.type]?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["slot-component-wrapper",{"slot-component-selected":n.mode==="edit"&&l.value===M}]),onClick:o.withModifiers(D=>g(A,M),["stop"])},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(t.value[A.component.type]),{conf:A.component,theme:n.theme,mode:n.mode,class:"slot-component"},null,8,["conf","theme","mode"]))],10,I1t)):n.mode==="edit"?(o.openBlock(),o.createElementBlock("div",R1t,[o.createVNode(w,{size:24},{default:o.withCtx(()=>[o.createVNode(o.unref(qt.Plus))]),_:1}),o.createElementVNode("span",null,o.toDisplayString(A.name||`插槽 ${M+1}`),1)])):o.createCommentVNode("",!0),n.mode==="edit"&&A.component?(o.openBlock(),o.createElementBlock("div",V1t,[o.createVNode(S,{type:"danger",size:"small",circle:"",onClick:o.withModifiers(D=>b(M),["stop"])},{default:o.withCtx(()=>[o.createVNode(w,null,{default:o.withCtx(()=>[o.createVNode(o.unref(qt.Close))]),_:1})]),_:1},8,["onClick"])])):o.createCommentVNode("",!0)],14,k1t))),128)),o.renderSlot(x.$slots,"default",{},void 0,!0),o.createVNode(T,{modelValue:i.value,"onUpdate:modelValue":_[1]||(_[1]=A=>i.value=A),title:"选择组件",width:"600px","append-to-body":!0,"close-on-click-modal":!0,"destroy-on-close":""},{default:o.withCtx(()=>[o.createElementVNode("div",B1t,[o.createVNode(E,{modelValue:a.value,"onUpdate:modelValue":_[0]||(_[0]=A=>a.value=A)},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.value,(A,M)=>(o.openBlock(),o.createBlock(C,{key:M,title:A.name,name:M},{default:o.withCtx(()=>[o.createElementVNode("div",F1t,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.data,D=>(o.openBlock(),o.createElementBlock("div",{key:D.type,class:"component-item",onClick:k=>y(D)},[o.createElementVNode("div",U1t,[o.createElementVNode("img",{src:D.default_icon,alt:D.name},null,8,H1t)]),o.createElementVNode("div",j1t,o.toDisplayString(D.name),1)],8,z1t))),128))])]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])])]),_:1},8,["modelValue"])],4)}}})),Q1t=Dt(J1t,[["__scopeId","data-v-61ed94fc"]]),$1t=Object.freeze(Object.defineProperty({__proto__:null,default:Q1t},Symbol.toStringTag,{value:"Module"})),fF="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e时间%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-646.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M657.730732,99.4163895%20C658.056601,99.4163895%20658.325912,99.6585445%20658.368534,99.9727243%20L658.37441,100.060068%20L658.374333,100.577389%20L661.215306,100.577914%20C661.952401,100.577914%20662.55813,101.14029%20662.626842,101.859376%20L662.633333,101.995942%20L662.633333,113.998362%20C662.633333,114.781529%20661.998472,115.416389%20661.215306,115.416389%20L661.215306,115.416389%20L648.051361,115.416389%20C647.268203,115.416389%20646.633333,114.781526%20646.633333,113.998362%20L646.633333,113.998362%20L646.633333,101.995942%20C646.633333,101.212786%20647.268206,100.577914%20648.051361,100.577914%20L648.051361,100.577914%20L650.891333,100.577389%20L650.892257,100.060068%20C650.892257,99.704574%20651.180441,99.4163895%20651.535935,99.4163895%20C651.861804,99.4163895%20652.131115,99.6585445%20652.173737,99.9727243%20L652.179613,100.060068%20L652.179333,100.577389%20L657.086333,100.577389%20L657.087054,100.060068%20C657.087054,99.704574%20657.375238,99.4163895%20657.730732,99.4163895%20Z%20M661.34567,106.510687%20L647.920383,106.510687%20L647.92069,113.998362%20C647.92069,114.056101%20647.958128,114.105087%20648.010057,114.122372%20L648.010057,114.122372%20L648.051361,114.129033%20L661.215306,114.129033%20C661.287485,114.129033%20661.345977,114.070541%20661.345977,113.998362%20L661.345977,113.998362%20L661.34567,106.510687%20Z%20M658.505082,111.031634%20C658.860575,111.031634%20659.14876,111.319819%20659.14876,111.675313%20C659.14876,112.001182%20658.906605,112.270493%20658.592425,112.313115%20L658.505082,112.318991%20L656.182033,112.318991%20C655.826539,112.318991%20655.538355,112.030806%20655.538355,111.675313%20C655.538355,111.349443%20655.78051,111.080133%20656.094689,111.037511%20L656.182033,111.031634%20L658.505082,111.031634%20Z%20M653.084634,111.031634%20C653.440128,111.031634%20653.728312,111.319819%20653.728312,111.675313%20C653.728312,112.001182%20653.486157,112.270493%20653.171977,112.313115%20L653.084634,112.318991%20L650.761585,112.318991%20C650.406091,112.318991%20650.117907,112.030806%20650.117907,111.675313%20C650.117907,111.349443%20650.360062,111.080133%20650.674242,111.037511%20L650.761585,111.031634%20L653.084634,111.031634%20Z%20M658.505082,107.934236%20C658.860575,107.934236%20659.14876,108.22242%20659.14876,108.577914%20C659.14876,108.903783%20658.906605,109.173094%20658.592425,109.215716%20L658.505082,109.221592%20L656.182033,109.221592%20C655.826539,109.221592%20655.538355,108.933408%20655.538355,108.577914%20C655.538355,108.252045%20655.78051,107.982734%20656.094689,107.940112%20L656.182033,107.934236%20L658.505082,107.934236%20Z%20M653.084634,107.934236%20C653.440128,107.934236%20653.728312,108.22242%20653.728312,108.577914%20C653.728312,108.903783%20653.486157,109.173094%20653.171977,109.215716%20L653.084634,109.221592%20L650.761585,109.221592%20C650.406091,109.221592%20650.117907,108.933408%20650.117907,108.577914%20C650.117907,108.252045%20650.360062,107.982734%20650.674242,107.940112%20L650.761585,107.934236%20L653.084634,107.934236%20Z%20M650.891333,101.864389%20L648.051361,101.86527%20C647.979193,101.86527%20647.92069,101.923774%20647.92069,101.995942%20L647.92069,101.995942%20L647.920383,105.223331%20L661.34567,105.223331%20L661.345977,101.995942%20C661.345977,101.938203%20661.308539,101.889217%20661.25661,101.871931%20L661.25661,101.871931%20L661.215306,101.86527%20L658.374333,101.864389%20L658.37441,103.157466%20C658.37441,103.51296%20658.086226,103.801144%20657.730732,103.801144%20C657.404863,103.801144%20657.135552,103.558989%20657.09293,103.24481%20L657.087054,103.157466%20L657.086333,101.864389%20L652.179333,101.864389%20L652.179613,103.157466%20C652.179613,103.51296%20651.891428,103.801144%20651.535935,103.801144%20C651.210066,103.801144%20650.940755,103.558989%20650.898133,103.24481%20L650.892257,103.157466%20L650.891333,101.864389%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",hF="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e时间%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-646.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M657.730732,99.4163895%20C658.056601,99.4163895%20658.325912,99.6585445%20658.368534,99.9727243%20L658.37441,100.060068%20L658.374333,100.577389%20L661.215306,100.577914%20C661.952401,100.577914%20662.55813,101.14029%20662.626842,101.859376%20L662.633333,101.995942%20L662.633333,113.998362%20C662.633333,114.781529%20661.998472,115.416389%20661.215306,115.416389%20L661.215306,115.416389%20L648.051361,115.416389%20C647.268203,115.416389%20646.633333,114.781526%20646.633333,113.998362%20L646.633333,113.998362%20L646.633333,101.995942%20C646.633333,101.212786%20647.268206,100.577914%20648.051361,100.577914%20L648.051361,100.577914%20L650.891333,100.577389%20L650.892257,100.060068%20C650.892257,99.704574%20651.180441,99.4163895%20651.535935,99.4163895%20C651.861804,99.4163895%20652.131115,99.6585445%20652.173737,99.9727243%20L652.179613,100.060068%20L652.179333,100.577389%20L657.086333,100.577389%20L657.087054,100.060068%20C657.087054,99.704574%20657.375238,99.4163895%20657.730732,99.4163895%20Z%20M661.34567,106.510687%20L647.920383,106.510687%20L647.92069,113.998362%20C647.92069,114.056101%20647.958128,114.105087%20648.010057,114.122372%20L648.010057,114.122372%20L648.051361,114.129033%20L661.215306,114.129033%20C661.287485,114.129033%20661.345977,114.070541%20661.345977,113.998362%20L661.345977,113.998362%20L661.34567,106.510687%20Z%20M658.505082,111.031634%20C658.860575,111.031634%20659.14876,111.319819%20659.14876,111.675313%20C659.14876,112.001182%20658.906605,112.270493%20658.592425,112.313115%20L658.505082,112.318991%20L656.182033,112.318991%20C655.826539,112.318991%20655.538355,112.030806%20655.538355,111.675313%20C655.538355,111.349443%20655.78051,111.080133%20656.094689,111.037511%20L656.182033,111.031634%20L658.505082,111.031634%20Z%20M653.084634,111.031634%20C653.440128,111.031634%20653.728312,111.319819%20653.728312,111.675313%20C653.728312,112.001182%20653.486157,112.270493%20653.171977,112.313115%20L653.084634,112.318991%20L650.761585,112.318991%20C650.406091,112.318991%20650.117907,112.030806%20650.117907,111.675313%20C650.117907,111.349443%20650.360062,111.080133%20650.674242,111.037511%20L650.761585,111.031634%20L653.084634,111.031634%20Z%20M658.505082,107.934236%20C658.860575,107.934236%20659.14876,108.22242%20659.14876,108.577914%20C659.14876,108.903783%20658.906605,109.173094%20658.592425,109.215716%20L658.505082,109.221592%20L656.182033,109.221592%20C655.826539,109.221592%20655.538355,108.933408%20655.538355,108.577914%20C655.538355,108.252045%20655.78051,107.982734%20656.094689,107.940112%20L656.182033,107.934236%20L658.505082,107.934236%20Z%20M653.084634,107.934236%20C653.440128,107.934236%20653.728312,108.22242%20653.728312,108.577914%20C653.728312,108.903783%20653.486157,109.173094%20653.171977,109.215716%20L653.084634,109.221592%20L650.761585,109.221592%20C650.406091,109.221592%20650.117907,108.933408%20650.117907,108.577914%20C650.117907,108.252045%20650.360062,107.982734%20650.674242,107.940112%20L650.761585,107.934236%20L653.084634,107.934236%20Z%20M650.891333,101.864389%20L648.051361,101.86527%20C647.979193,101.86527%20647.92069,101.923774%20647.92069,101.995942%20L647.92069,101.995942%20L647.920383,105.223331%20L661.34567,105.223331%20L661.345977,101.995942%20C661.345977,101.938203%20661.308539,101.889217%20661.25661,101.871931%20L661.25661,101.871931%20L661.215306,101.86527%20L658.374333,101.864389%20L658.37441,103.157466%20C658.37441,103.51296%20658.086226,103.801144%20657.730732,103.801144%20C657.404863,103.801144%20657.135552,103.558989%20657.09293,103.24481%20L657.087054,103.157466%20L657.086333,101.864389%20L652.179333,101.864389%20L652.179613,103.157466%20C652.179613,103.51296%20651.891428,103.801144%20651.535935,103.801144%20C651.210066,103.801144%20650.940755,103.558989%20650.898133,103.24481%20L650.892257,103.157466%20L650.891333,101.864389%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",edt={key:0,class:"digital-clock"},tdt={key:1,class:"analog-clock-wrapper"},ndt=["width","height"],rdt=["r","stroke","stroke-width"],idt=["r","fill"],adt=["x1","y1","x2","y2","stroke"],odt={key:0},sdt=["x","y","fill","font-size"],ldt=["x2","y2","stroke","stroke-width"],cdt=["x2","y2","stroke","stroke-width"],udt=["x2","y2","stroke","stroke-width"],ddt=["r","fill"],fdt={DEFAULT_ICON:fF,ACTIVE_ICON:hF,NAME_CN:"钟表",NAME_EN:"Clock",ORDER:5,PLATFORM:["pc","screen","mobile"]},hdt={clockType:{value:"analog",type:"select",label:"时钟类型",options:[{label:"模拟时钟",value:"analog"},{label:"数字时钟",value:"digital"}]},timeFormat:{value:"24",type:"select",label:"时间格式",options:[{label:"24小时制",value:"24"},{label:"12小时制",value:"12"}]},showDate:{value:!0,type:"checkbox",label:"显示日期"},showSecondHand:{value:!0,type:"checkbox",label:"显示秒针"},showNumbers:{value:!0,type:"checkbox",label:"显示数字"},digitalFontSize:32,digitalColor:"#1f2937",digitalDateSize:14,digitalDateColor:"#6b7280",clockSize:200,backgroundColor:"#ffffff",borderColor:"#374151",borderWidth:2,tickColor:"#374151",numberColor:"#1f2937",numberSize:14,hourHandColor:"#374151",minuteHandColor:"#374151",secondHandColor:"#ef4444",centerDotColor:"#374151"},pdt=[],mdt=[],vdt=[],gdt={},ydt={DEFAULT:fdt,OPTIONS:hdt,DATA:pdt,PARAMS:mdt,SOURCE:vdt,COMMON:gdt},bdt=o.defineComponent(tt(Ne({},ydt),{__name:"clock",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){const e=n;class t extends Cn{constructor(){super(...arguments),this.timer=null}extractStyles(){return{clockType:this.getOptionValue("clockType","analog"),timeFormat:this.getOptionValue("timeFormat","24"),showDate:this.getOptionValue("showDate",!0),showSecondHand:this.getOptionValue("showSecondHand",!0),showNumbers:this.getOptionValue("showNumbers",!0),clockSize:this.getOptionValue("clockSize",200),backgroundColor:this.getOptionValue("backgroundColor","#ffffff"),borderColor:this.getOptionValue("borderColor","#374151"),borderWidth:this.getOptionValue("borderWidth",2),tickColor:this.getOptionValue("tickColor","#374151"),numberColor:this.getOptionValue("numberColor","#1f2937"),numberSize:this.getOptionValue("numberSize",14),hourHandColor:this.getOptionValue("hourHandColor","#374151"),minuteHandColor:this.getOptionValue("minuteHandColor","#374151"),secondHandColor:this.getOptionValue("secondHandColor","#ef4444"),centerDotColor:this.getOptionValue("centerDotColor","#374151"),digitalFontSize:this.getOptionValue("digitalFontSize",32),digitalColor:this.getOptionValue("digitalColor","#1f2937"),digitalDateSize:this.getOptionValue("digitalDateSize",14),digitalDateColor:this.getOptionValue("digitalDateColor","#6b7280")}}init(){this.Style.value=this.extractStyles(),this.applyTheme(),this.timer&&clearInterval(this.timer),U(),this.timer=setInterval(U,1e3)}cleanup(){this.timer&&clearInterval(this.timer)}}const r=new t(e,"clock");r.setupLifecycle();const i=r.getStyle(),a=o.ref(""),s=o.ref(""),l=o.ref(0),c=o.ref(0),u=o.ref(0),d=o.computed(()=>({width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"})),f=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.clockType)||"analog"}),h=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.timeFormat)||"24"}),p=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.showDate)!==!1}),m=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.showSecondHand)!==!1}),v=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.showNumbers)!==!1}),g=o.computed(()=>{var W;const z=(W=i.value)==null?void 0:W.clockSize,j=Number(z);return typeof j=="number"&&!Number.isNaN(j)&&j>0?j:200}),y=o.computed(()=>{const z=g.value;return typeof z=="number"&&!Number.isNaN(z)?z*.45:90}),b=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.backgroundColor)||"#ffffff"}),x=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.borderColor)||"#374151"}),_=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.borderWidth)||2}),w=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.tickColor)||"#374151"}),S=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.numberColor)||"#1f2937"}),C=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.numberSize)||14}),E=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.hourHandColor)||"#374151"}),T=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.minuteHandColor)||"#374151"}),A=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.secondHandColor)||"#ef4444"}),M=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.centerDotColor)||"#374151"}),D=o.computed(()=>y.value*.5),k=o.computed(()=>y.value*.7),P=o.computed(()=>y.value*.8),I=o.computed(()=>Math.max(3,g.value*.015)),N=o.computed(()=>Math.max(2,g.value*.01)),R=o.computed(()=>Math.max(1,g.value*.005)),V=o.computed(()=>Math.max(3,g.value*.015)),B=o.computed(()=>({width:`${g.value}px`,height:`${g.value}px`,maxWidth:"100%",maxHeight:"100%"})),F=o.computed(()=>{var z,j;return{fontSize:`${((z=i.value)==null?void 0:z.digitalFontSize)||32}px`,color:((j=i.value)==null?void 0:j.digitalColor)||"#1f2937",fontWeight:"bold",fontFamily:"monospace"}}),G=o.computed(()=>{var z,j;return{fontSize:`${((z=i.value)==null?void 0:z.digitalDateSize)||14}px`,color:((j=i.value)==null?void 0:j.digitalDateColor)||"#6b7280",fontFamily:"monospace",marginTop:"8px"}}),U=()=>{const z=new Date;l.value=z.getHours(),c.value=z.getMinutes(),u.value=z.getSeconds();let j=l.value,W="";h.value==="12"&&(W=j>=12?" PM":" AM",j=j%12,j===0&&(j=12)),a.value=`${j.toString().padStart(2,"0")}:${c.value.toString().padStart(2,"0")}:${u.value.toString().padStart(2,"0")}${W}`;const Y=z.getFullYear(),re=(z.getMonth()+1).toString().padStart(2,"0"),Q=z.getDate().toString().padStart(2,"0"),$=["周日","周一","周二","周三","周四","周五","周六"];s.value=`${Y}-${re}-${Q} ${$[z.getDay()]}`};return o.onMounted(()=>U()),(z,j)=>(o.openBlock(),o.createElementBlock("div",{style:o.normalizeStyle(d.value),class:"mix-component"},[f.value==="digital"?(o.openBlock(),o.createElementBlock("div",edt,[o.createElementVNode("div",{class:"time-display",style:o.normalizeStyle(F.value)},o.toDisplayString(a.value),5),p.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"date-display",style:o.normalizeStyle(G.value)},o.toDisplayString(s.value),5)):o.createCommentVNode("",!0)])):(o.openBlock(),o.createElementBlock("div",tdt,[o.createElementVNode("div",{class:"analog-clock",style:o.normalizeStyle(B.value)},[(o.openBlock(),o.createElementBlock("svg",{width:g.value,height:g.value,viewBox:"0 0 200 200",class:"clock-svg"},[o.createElementVNode("circle",{cx:"100",cy:"100",r:y.value,stroke:x.value,"stroke-width":_.value,fill:"none"},null,8,rdt),o.createElementVNode("circle",{cx:"100",cy:"100",r:y.value-_.value/2,fill:b.value},null,8,idt),(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(12,W=>o.createElementVNode("g",{key:`hour-${W}`},[o.createElementVNode("line",{x1:100+(y.value-15)*Math.cos((W*30-90)*Math.PI/180),y1:100+(y.value-15)*Math.sin((W*30-90)*Math.PI/180),x2:100+(y.value-5)*Math.cos((W*30-90)*Math.PI/180),y2:100+(y.value-5)*Math.sin((W*30-90)*Math.PI/180),stroke:w.value,"stroke-width":"2"},null,8,adt)])),64)),v.value?(o.openBlock(),o.createElementBlock("g",odt,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(12,W=>o.createElementVNode("text",{key:`number-${W}`,x:100+(y.value-25)*Math.cos((W*30-90)*Math.PI/180),y:100+(y.value-25)*Math.sin((W*30-90)*Math.PI/180),"text-anchor":"middle","dominant-baseline":"central",fill:S.value,"font-size":C.value,"font-weight":"bold"},o.toDisplayString(W),9,sdt)),64))])):o.createCommentVNode("",!0),o.createElementVNode("line",{x1:"100",y1:"100",x2:100+D.value*Math.cos((l.value*30+c.value*.5-90)*Math.PI/180),y2:100+D.value*Math.sin((l.value*30+c.value*.5-90)*Math.PI/180),stroke:E.value,"stroke-width":I.value,"stroke-linecap":"round"},null,8,ldt),o.createElementVNode("line",{x1:"100",y1:"100",x2:100+k.value*Math.cos((c.value*6-90)*Math.PI/180),y2:100+k.value*Math.sin((c.value*6-90)*Math.PI/180),stroke:T.value,"stroke-width":N.value,"stroke-linecap":"round"},null,8,cdt),m.value?(o.openBlock(),o.createElementBlock("line",{key:1,x1:"100",y1:"100",x2:100+P.value*Math.cos((u.value*6-90)*Math.PI/180),y2:100+P.value*Math.sin((u.value*6-90)*Math.PI/180),stroke:A.value,"stroke-width":R.value,"stroke-linecap":"round"},null,8,udt)):o.createCommentVNode("",!0),o.createElementVNode("circle",{cx:"100",cy:"100",r:V.value,fill:M.value},null,8,ddt)],8,ndt))],4),p.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"date-display",style:o.normalizeStyle(G.value)},o.toDisplayString(s.value),5)):o.createCommentVNode("",!0)])),o.renderSlot(z.$slots,"default",{},void 0,!0)],4))}})),xdt=Dt(bdt,[["__scopeId","data-v-d8289d01"]]),_dt=Object.freeze(Object.defineProperty({__proto__:null,default:xdt},Symbol.toStringTag,{value:"Module"})),Sdt={class:"mix-component"},wdt={DEFAULT_ICON:fF,ACTIVE_ICON:hF,NAME_CN:"时间",NAME_EN:"Date Time",ORDER:1,PLATFORM:["pc","screen","mobile"]},Cdt={bgColor:"#fff",textColor:"#111",textSize:16,radiusSize:8,format:{value:"YYYY-MM-DD HH:mm:ss",type:"select",label:"component.customized.format",options:[{label:"component.customized.dateTimeFormat1",value:"YYYY-MM-DD HH:mm:ss"},{label:"component.customized.dateTimeFormat2",value:"YYYY年MM月DD日 HH:mm:ss"},{label:"component.customized.dateTimeFormat3",value:"YYYY/MM/DD HH:mm:ss"},{label:"component.customized.dateFormat",value:"YYYY-MM-DD"},{label:"component.customized.timeFormat",value:"HH:mm:ss"}]}},Edt={DEFAULT:wdt,OPTIONS:Cdt,COMMON:{}},Adt=o.defineComponent(tt(Ne({},Edt),{__name:"datetime",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){const e=n,t=o.ref("");let r=null;class i extends Cn{extractStyles(){const{options:u}=this.props.conf,d=(f,h)=>{const p=u==null?void 0:u[f];return p==null?h:typeof p=="object"&&"value"in p?p.value:p};return{bgColor:d("bgColor","#fff"),textColor:d("textColor","#303133"),textSize:d("textSize",16),radiusSize:d("radiusSize",8)}}init(){super.init(),r&&clearInterval(r),a(),r=setInterval(()=>{a()},1e3)}cleanup(){r&&(clearInterval(r),r=null)}}const a=()=>{const{options:c}=e.conf,u=c==null?void 0:c.format,d=u&&typeof u=="object"&&"value"in u?u.value:u||"YYYY-MM-DD HH:mm:ss";t.value=mt().format(d)},s=new i(e,"datetime");s.setupLifecycle();const l=s.getStyle();return o.watch(()=>{var c;return(c=e.conf)==null?void 0:c.options},c=>{c&&(l.value=s.extractStyles(),a())},{deep:!0}),(c,u)=>(o.openBlock(),o.createElementBlock("div",Sdt,[o.createElementVNode("div",{class:"flex flex-1 px-[12px] items-center justify-center flex-nowrap",style:o.normalizeStyle({backgroundColor:o.unref(l).bgColor,color:o.unref(l).textColor,borderRadius:`${o.unref(l).radiusSize}px`,fontSize:`${o.unref(l).textSize}px`})},o.toDisplayString(t.value),5),o.renderSlot(c.$slots,"default",{},void 0,!0)]))}})),Tdt=Dt(Adt,[["__scopeId","data-v-7961577a"]]),Mdt=Object.freeze(Object.defineProperty({__proto__:null,default:Tdt},Symbol.toStringTag,{value:"Module"})),Ddt=["data-placeholder-id","data-placeholder-name","data-x","data-y","data-w","data-h"],Ldt={key:0,class:"mix-placeholder__label"},Ndt={class:"mix-placeholder__title"},Odt={key:0,class:"mix-placeholder__name"},Pdt={class:"mix-placeholder__meta"},kdt={key:0,class:"mix-placeholder__pixel"},Idt={class:"mix-placeholder__pixel-pos"},Rdt={key:1,class:"mix-placeholder__desc"},Vdt={key:0,class:"mix-placeholder__name-runtime"},Bdt={DEFAULT_ICON:a0e,ACTIVE_ICON:o0e,NAME_CN:"占位组件",NAME_EN:"Placeholder",ORDER:99,PLATFORM:["pc","screen","mobile"]},Fdt={placeholderName:{value:"",type:"string",label:"占位组件名称"},description:{value:"",type:"string",label:"描述"},bgColor:{value:"rgba(64, 158, 255, 0.08)",type:"color",label:"填充色"},borderColor:{value:"#409EFF",type:"color",label:"边框颜色"},borderWidth:{value:2,type:"number",label:"边框宽度",min:0,max:10},borderStyle:{value:"dashed",type:"radio",label:"边框样式",option:[{label:"实线",value:"solid"},{label:"虚线",value:"dashed"},{label:"点线",value:"dotted"}]},radiusSize:{value:4,type:"number",label:"圆角",min:0,max:50},showLabel:{value:!0,type:"checkbox",label:"显示标签"},showInPreview:{value:!1,type:"checkbox",label:"运行时显示边框"}},zdt=[],Udt={},Hdt={DEFAULT:Bdt,OPTIONS:Fdt,SOURCE:zdt,COMMON:Udt},jdt=o.defineComponent(tt(Ne({},Hdt),{__name:"placeholder",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){const e=n,t=(m,v)=>{var y,b;const g=(b=(y=e.conf)==null?void 0:y.options)==null?void 0:b[m];return g==null?v:typeof g=="object"&&"value"in g?g.value:g},r=o.computed(()=>({placeholderName:t("placeholderName",""),description:t("description",""),bgColor:t("bgColor","rgba(64, 158, 255, 0.08)"),borderColor:t("borderColor","#409EFF"),borderWidth:Number(t("borderWidth",2))||0,borderStyle:t("borderStyle","dashed"),radiusSize:Number(t("radiusSize",4))||0,showLabel:t("showLabel",!0)!==!1,showInPreview:t("showInPreview",!1)===!0})),i=o.computed(()=>{var m,v;return r.value.placeholderName||((m=e.conf)==null?void 0:m.name)||((v=e.conf)==null?void 0:v.id)||""}),a=o.computed(()=>{var m,v;return r.value.placeholderName||((m=e.conf)==null?void 0:m.caption)||((v=e.conf)==null?void 0:v.name)||""}),s=o.computed(()=>({backgroundColor:r.value.bgColor,borderColor:r.value.borderColor,borderStyle:r.value.borderStyle,borderWidth:`${r.value.borderWidth}px`,borderRadius:`${r.value.radiusSize}px`})),l=o.computed(()=>({borderColor:r.value.borderColor,borderStyle:r.value.borderStyle,borderWidth:`${Math.max(1,r.value.borderWidth)}px`,borderRadius:`${r.value.radiusSize}px`,backgroundColor:"transparent"})),c=o.ref(null),u=o.useTemplateRef("rootRef"),d=()=>{const m=u.value;if(!m)return{gridItem:null,canvas:null};const v=m.closest(".vgl-item")||m.closest(".vue-grid-item"),g=m.closest(".canvas");return{gridItem:v,canvas:g}},f=()=>{const{gridItem:m,canvas:v}=d();if(!m||!v)return;const g=m.getBoundingClientRect(),y=v.getBoundingClientRect(),b=v.offsetWidth||1,x=y.width/b||1,_=x===0?1:x;c.value={left:Math.round((g.left-y.left)/_),top:Math.round((g.top-y.top)/_),width:Math.round(g.width/_),height:Math.round(g.height/_)}},h=m=>{var v,g,y,b,x,_,w,S,C;if(typeof window!="undefined")try{window.dispatchEvent(new CustomEvent(`mix-placeholder:${m}`,{detail:{id:((v=e.conf)==null?void 0:v.id)||"",name:i.value,grid:{x:(y=(g=e.conf)==null?void 0:g.x)!=null?y:0,y:(x=(b=e.conf)==null?void 0:b.y)!=null?x:0,w:(w=(_=e.conf)==null?void 0:_.w)!=null?w:0,h:(C=(S=e.conf)==null?void 0:S.h)!=null?C:0},pixel:c.value,mode:e.mode}}))}catch(E){}};let p=null;return o.onMounted(()=>{o.nextTick(()=>{f(),h("registered");const{gridItem:m}=d();m&&typeof ResizeObserver!="undefined"&&(p=new ResizeObserver(()=>{f(),h("updated")}),p.observe(m))})}),o.onBeforeUnmount(()=>{p==null||p.disconnect(),p=null,h("unregistered")}),o.watch(()=>{var m,v,g,y,b;return[(m=e.conf)==null?void 0:m.x,(v=e.conf)==null?void 0:v.y,(g=e.conf)==null?void 0:g.w,(y=e.conf)==null?void 0:y.h,(b=e.conf)==null?void 0:b.options,e.mode]},()=>{o.nextTick(()=>{f(),h("updated")})},{deep:!0}),(m,v)=>{var g,y,b,x,_,w,S,C,E,T,A,M,D,k,P,I,N;return o.openBlock(),o.createElementBlock("div",{ref_key:"rootRef",ref:u,class:"mix-placeholder",style:o.normalizeStyle({pointerEvents:n.mode==="edit"?"auto":void 0}),"data-placeholder-id":((g=n.conf)==null?void 0:g.id)||"","data-placeholder-name":i.value,"data-x":(b=(y=n.conf)==null?void 0:y.x)!=null?b:0,"data-y":(_=(x=n.conf)==null?void 0:x.y)!=null?_:0,"data-w":(S=(w=n.conf)==null?void 0:w.w)!=null?S:0,"data-h":(E=(C=n.conf)==null?void 0:C.h)!=null?E:0},[n.mode==="edit"?(o.openBlock(),o.createElementBlock("div",{key:0,class:"mix-placeholder__frame mix-placeholder__frame--edit",style:o.normalizeStyle(s.value)},[r.value.showLabel?(o.openBlock(),o.createElementBlock("div",Ldt,[o.createElementVNode("div",Ndt,[v[0]||(v[0]=o.createElementVNode("span",{class:"mix-placeholder__tag"},"占位组件",-1)),a.value?(o.openBlock(),o.createElementBlock("span",Odt,o.toDisplayString(a.value),1)):o.createCommentVNode("",!0)]),o.createElementVNode("div",Pdt,[o.createElementVNode("span",null,"x:"+o.toDisplayString((A=(T=n.conf)==null?void 0:T.x)!=null?A:0),1),o.createElementVNode("span",null,"y:"+o.toDisplayString((D=(M=n.conf)==null?void 0:M.y)!=null?D:0),1),o.createElementVNode("span",null,"w:"+o.toDisplayString((P=(k=n.conf)==null?void 0:k.w)!=null?P:0),1),o.createElementVNode("span",null,"h:"+o.toDisplayString((N=(I=n.conf)==null?void 0:I.h)!=null?N:0),1)]),c.value?(o.openBlock(),o.createElementBlock("div",kdt,[o.createTextVNode(o.toDisplayString(c.value.width)+"px × "+o.toDisplayString(c.value.height)+"px ",1),o.createElementVNode("span",Idt,"@("+o.toDisplayString(c.value.left)+", "+o.toDisplayString(c.value.top)+")",1)])):o.createCommentVNode("",!0),r.value.description?(o.openBlock(),o.createElementBlock("div",Rdt,o.toDisplayString(r.value.description),1)):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)],4)):r.value.showInPreview?(o.openBlock(),o.createElementBlock("div",{key:1,class:"mix-placeholder__frame mix-placeholder__frame--runtime",style:o.normalizeStyle(l.value)},[r.value.showLabel&&a.value?(o.openBlock(),o.createElementBlock("span",Vdt,o.toDisplayString(a.value),1)):o.createCommentVNode("",!0)],4)):o.createCommentVNode("",!0),o.renderSlot(m.$slots,"default",{},void 0,!0)],12,Ddt)}}})),Gdt=Dt(jdt,[["__scopeId","data-v-d6ad7f4c"]]),Ydt=Object.freeze(Object.defineProperty({__proto__:null,default:Gdt},Symbol.toStringTag,{value:"Module"}));var Ku=function(){return Ku=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++){t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},Ku.apply(this,arguments)};var Zp;(function(n){var e=(function(){function s(l,c,u,d){if(this.version=l,this.errorCorrectionLevel=c,this.modules=[],this.isFunction=[],l<s.MIN_VERSION||l>s.MAX_VERSION)throw new RangeError("Version value out of range");if(d<-1||d>7)throw new RangeError("Mask value out of range");this.size=l*4+17;for(var f=[],h=0;h<this.size;h++)f.push(!1);for(var h=0;h<this.size;h++)this.modules.push(f.slice()),this.isFunction.push(f.slice());this.drawFunctionPatterns();var p=this.addEccAndInterleave(u);if(this.drawCodewords(p),d==-1)for(var m=1e9,h=0;h<8;h++){this.applyMask(h),this.drawFormatBits(h);var v=this.getPenaltyScore();v<m&&(d=h,m=v),this.applyMask(h)}i(0<=d&&d<=7),this.mask=d,this.applyMask(d),this.drawFormatBits(d),this.isFunction=[]}return s.encodeText=function(l,c){var u=n.QrSegment.makeSegments(l);return s.encodeSegments(u,c)},s.encodeBinary=function(l,c){var u=n.QrSegment.makeBytes(l);return s.encodeSegments([u],c)},s.encodeSegments=function(l,c,u,d,f,h){if(u===void 0&&(u=1),d===void 0&&(d=40),f===void 0&&(f=-1),h===void 0&&(h=!0),!(s.MIN_VERSION<=u&&u<=d&&d<=s.MAX_VERSION)||f<-1||f>7)throw new RangeError("Invalid value");var p,m;for(p=u;;p++){var v=s.getNumDataCodewords(p,c)*8,g=a.getTotalBits(l,p);if(g<=v){m=g;break}if(p>=d)throw new RangeError("Data too long")}for(var y=0,b=[s.Ecc.MEDIUM,s.Ecc.QUARTILE,s.Ecc.HIGH];y<b.length;y++){var x=b[y];h&&m<=s.getNumDataCodewords(p,x)*8&&(c=x)}for(var _=[],w=0,S=l;w<S.length;w++){var C=S[w];t(C.mode.modeBits,4,_),t(C.numChars,C.mode.numCharCountBits(p),_);for(var E=0,T=C.getData();E<T.length;E++){var A=T[E];_.push(A)}}i(_.length==m);var M=s.getNumDataCodewords(p,c)*8;i(_.length<=M),t(0,Math.min(4,M-_.length),_),t(0,(8-_.length%8)%8,_),i(_.length%8==0);for(var D=236;_.length<M;D^=253)t(D,8,_);for(var k=[];k.length*8<_.length;)k.push(0);return _.forEach(function(P,I){return k[I>>>3]|=P<<7-(I&7)}),new s(p,c,k,f)},s.prototype.getModule=function(l,c){return 0<=l&&l<this.size&&0<=c&&c<this.size&&this.modules[c][l]},s.prototype.getModules=function(){return this.modules},s.prototype.drawFunctionPatterns=function(){for(var l=0;l<this.size;l++)this.setFunctionModule(6,l,l%2==0),this.setFunctionModule(l,6,l%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);for(var c=this.getAlignmentPatternPositions(),u=c.length,l=0;l<u;l++)for(var d=0;d<u;d++)l==0&&d==0||l==0&&d==u-1||l==u-1&&d==0||this.drawAlignmentPattern(c[l],c[d]);this.drawFormatBits(0),this.drawVersion()},s.prototype.drawFormatBits=function(l){for(var c=this.errorCorrectionLevel.formatBits<<3|l,u=c,d=0;d<10;d++)u=u<<1^(u>>>9)*1335;var f=(c<<10|u)^21522;i(f>>>15==0);for(var d=0;d<=5;d++)this.setFunctionModule(8,d,r(f,d));this.setFunctionModule(8,7,r(f,6)),this.setFunctionModule(8,8,r(f,7)),this.setFunctionModule(7,8,r(f,8));for(var d=9;d<15;d++)this.setFunctionModule(14-d,8,r(f,d));for(var d=0;d<8;d++)this.setFunctionModule(this.size-1-d,8,r(f,d));for(var d=8;d<15;d++)this.setFunctionModule(8,this.size-15+d,r(f,d));this.setFunctionModule(8,this.size-8,!0)},s.prototype.drawVersion=function(){if(!(this.version<7)){for(var l=this.version,c=0;c<12;c++)l=l<<1^(l>>>11)*7973;var u=this.version<<12|l;i(u>>>18==0);for(var c=0;c<18;c++){var d=r(u,c),f=this.size-11+c%3,h=Math.floor(c/3);this.setFunctionModule(f,h,d),this.setFunctionModule(h,f,d)}}},s.prototype.drawFinderPattern=function(l,c){for(var u=-4;u<=4;u++)for(var d=-4;d<=4;d++){var f=Math.max(Math.abs(d),Math.abs(u)),h=l+d,p=c+u;0<=h&&h<this.size&&0<=p&&p<this.size&&this.setFunctionModule(h,p,f!=2&&f!=4)}},s.prototype.drawAlignmentPattern=function(l,c){for(var u=-2;u<=2;u++)for(var d=-2;d<=2;d++)this.setFunctionModule(l+d,c+u,Math.max(Math.abs(d),Math.abs(u))!=1)},s.prototype.setFunctionModule=function(l,c,u){this.modules[c][l]=u,this.isFunction[c][l]=!0},s.prototype.addEccAndInterleave=function(l){var c=this.version,u=this.errorCorrectionLevel;if(l.length!=s.getNumDataCodewords(c,u))throw new RangeError("Invalid argument");for(var d=s.NUM_ERROR_CORRECTION_BLOCKS[u.ordinal][c],f=s.ECC_CODEWORDS_PER_BLOCK[u.ordinal][c],h=Math.floor(s.getNumRawDataModules(c)/8),p=d-h%d,m=Math.floor(h/d),v=[],g=s.reedSolomonComputeDivisor(f),y=0,b=0;y<d;y++){var x=l.slice(b,b+m-f+(y<p?0:1));b+=x.length;var _=s.reedSolomonComputeRemainder(x,g);y<p&&x.push(0),v.push(x.concat(_))}for(var w=[],S=function(C){v.forEach(function(E,T){(C!=m-f||T>=p)&&w.push(E[C])})},y=0;y<v[0].length;y++)S(y);return i(w.length==h),w},s.prototype.drawCodewords=function(l){if(l.length!=Math.floor(s.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");for(var c=0,u=this.size-1;u>=1;u-=2){u==6&&(u=5);for(var d=0;d<this.size;d++)for(var f=0;f<2;f++){var h=u-f,p=(u+1&2)==0,m=p?this.size-1-d:d;!this.isFunction[m][h]&&c<l.length*8&&(this.modules[m][h]=r(l[c>>>3],7-(c&7)),c++)}}i(c==l.length*8)},s.prototype.applyMask=function(l){if(l<0||l>7)throw new RangeError("Mask value out of range");for(var c=0;c<this.size;c++)for(var u=0;u<this.size;u++){var d=void 0;switch(l){case 0:d=(u+c)%2==0;break;case 1:d=c%2==0;break;case 2:d=u%3==0;break;case 3:d=(u+c)%3==0;break;case 4:d=(Math.floor(u/3)+Math.floor(c/2))%2==0;break;case 5:d=u*c%2+u*c%3==0;break;case 6:d=(u*c%2+u*c%3)%2==0;break;case 7:d=((u+c)%2+u*c%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[c][u]&&d&&(this.modules[c][u]=!this.modules[c][u])}},s.prototype.getPenaltyScore=function(){for(var l=0,c=0;c<this.size;c++){for(var u=!1,d=0,f=[0,0,0,0,0,0,0],h=0;h<this.size;h++)this.modules[c][h]==u?(d++,d==5?l+=s.PENALTY_N1:d>5&&l++):(this.finderPenaltyAddHistory(d,f),u||(l+=this.finderPenaltyCountPatterns(f)*s.PENALTY_N3),u=this.modules[c][h],d=1);l+=this.finderPenaltyTerminateAndCount(u,d,f)*s.PENALTY_N3}for(var h=0;h<this.size;h++){for(var u=!1,p=0,f=[0,0,0,0,0,0,0],c=0;c<this.size;c++)this.modules[c][h]==u?(p++,p==5?l+=s.PENALTY_N1:p>5&&l++):(this.finderPenaltyAddHistory(p,f),u||(l+=this.finderPenaltyCountPatterns(f)*s.PENALTY_N3),u=this.modules[c][h],p=1);l+=this.finderPenaltyTerminateAndCount(u,p,f)*s.PENALTY_N3}for(var c=0;c<this.size-1;c++)for(var h=0;h<this.size-1;h++){var m=this.modules[c][h];m==this.modules[c][h+1]&&m==this.modules[c+1][h]&&m==this.modules[c+1][h+1]&&(l+=s.PENALTY_N2)}for(var v=0,g=0,y=this.modules;g<y.length;g++){var b=y[g];v=b.reduce(function(w,S){return w+(S?1:0)},v)}var x=this.size*this.size,_=Math.ceil(Math.abs(v*20-x*10)/x)-1;return i(0<=_&&_<=9),l+=_*s.PENALTY_N4,i(0<=l&&l<=2568888),l},s.prototype.getAlignmentPatternPositions=function(){if(this.version==1)return[];for(var l=Math.floor(this.version/7)+2,c=Math.floor((this.version*8+l*3+5)/(l*4-4))*2,u=[6],d=this.size-7;u.length<l;d-=c)u.splice(1,0,d);return u},s.getNumRawDataModules=function(l){if(l<s.MIN_VERSION||l>s.MAX_VERSION)throw new RangeError("Version number out of range");var c=(16*l+128)*l+64;if(l>=2){var u=Math.floor(l/7)+2;c-=(25*u-10)*u-55,l>=7&&(c-=36)}return i(208<=c&&c<=29648),c},s.getNumDataCodewords=function(l,c){return Math.floor(s.getNumRawDataModules(l)/8)-s.ECC_CODEWORDS_PER_BLOCK[c.ordinal][l]*s.NUM_ERROR_CORRECTION_BLOCKS[c.ordinal][l]},s.reedSolomonComputeDivisor=function(l){if(l<1||l>255)throw new RangeError("Degree out of range");for(var c=[],u=0;u<l-1;u++)c.push(0);c.push(1);for(var d=1,u=0;u<l;u++){for(var f=0;f<c.length;f++)c[f]=s.reedSolomonMultiply(c[f],d),f+1<c.length&&(c[f]^=c[f+1]);d=s.reedSolomonMultiply(d,2)}return c},s.reedSolomonComputeRemainder=function(l,c){for(var u=c.map(function(m){return 0}),d=function(m){var v=m^u.shift();u.push(0),c.forEach(function(g,y){return u[y]^=s.reedSolomonMultiply(g,v)})},f=0,h=l;f<h.length;f++){var p=h[f];d(p)}return u},s.reedSolomonMultiply=function(l,c){if(l>>>8||c>>>8)throw new RangeError("Byte out of range");for(var u=0,d=7;d>=0;d--)u=u<<1^(u>>>7)*285,u^=(c>>>d&1)*l;return i(u>>>8==0),u},s.prototype.finderPenaltyCountPatterns=function(l){var c=l[1];i(c<=this.size*3);var u=c>0&&l[2]==c&&l[3]==c*3&&l[4]==c&&l[5]==c;return(u&&l[0]>=c*4&&l[6]>=c?1:0)+(u&&l[6]>=c*4&&l[0]>=c?1:0)},s.prototype.finderPenaltyTerminateAndCount=function(l,c,u){return l&&(this.finderPenaltyAddHistory(c,u),c=0),c+=this.size,this.finderPenaltyAddHistory(c,u),this.finderPenaltyCountPatterns(u)},s.prototype.finderPenaltyAddHistory=function(l,c){c[0]==0&&(l+=this.size),c.pop(),c.unshift(l)},s.MIN_VERSION=1,s.MAX_VERSION=40,s.PENALTY_N1=3,s.PENALTY_N2=3,s.PENALTY_N3=40,s.PENALTY_N4=10,s.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],s.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],s})();n.QrCode=e;function t(s,l,c){if(l<0||l>31||s>>>l)throw new RangeError("Value out of range");for(var u=l-1;u>=0;u--)c.push(s>>>u&1)}function r(s,l){return(s>>>l&1)!=0}function i(s){if(!s)throw new Error("Assertion error")}var a=(function(){function s(l,c,u){if(this.mode=l,this.numChars=c,this.bitData=u,c<0)throw new RangeError("Invalid argument");this.bitData=u.slice()}return s.makeBytes=function(l){for(var c=[],u=0,d=l;u<d.length;u++){var f=d[u];t(f,8,c)}return new s(s.Mode.BYTE,l.length,c)},s.makeNumeric=function(l){if(!s.isNumeric(l))throw new RangeError("String contains non-numeric characters");for(var c=[],u=0;u<l.length;){var d=Math.min(l.length-u,3);t(parseInt(l.substring(u,u+d),10),d*3+1,c),u+=d}return new s(s.Mode.NUMERIC,l.length,c)},s.makeAlphanumeric=function(l){if(!s.isAlphanumeric(l))throw new RangeError("String contains unencodable characters in alphanumeric mode");var c=[],u;for(u=0;u+2<=l.length;u+=2){var d=s.ALPHANUMERIC_CHARSET.indexOf(l.charAt(u))*45;d+=s.ALPHANUMERIC_CHARSET.indexOf(l.charAt(u+1)),t(d,11,c)}return u<l.length&&t(s.ALPHANUMERIC_CHARSET.indexOf(l.charAt(u)),6,c),new s(s.Mode.ALPHANUMERIC,l.length,c)},s.makeSegments=function(l){return l==""?[]:s.isNumeric(l)?[s.makeNumeric(l)]:s.isAlphanumeric(l)?[s.makeAlphanumeric(l)]:[s.makeBytes(s.toUtf8ByteArray(l))]},s.makeEci=function(l){var c=[];if(l<0)throw new RangeError("ECI assignment value out of range");if(l<128)t(l,8,c);else if(l<16384)t(2,2,c),t(l,14,c);else if(l<1e6)t(6,3,c),t(l,21,c);else throw new RangeError("ECI assignment value out of range");return new s(s.Mode.ECI,0,c)},s.isNumeric=function(l){return s.NUMERIC_REGEX.test(l)},s.isAlphanumeric=function(l){return s.ALPHANUMERIC_REGEX.test(l)},s.prototype.getData=function(){return this.bitData.slice()},s.getTotalBits=function(l,c){for(var u=0,d=0,f=l;d<f.length;d++){var h=f[d],p=h.mode.numCharCountBits(c);if(h.numChars>=1<<p)return 1/0;u+=4+p+h.bitData.length}return u},s.toUtf8ByteArray=function(l){l=encodeURI(l);for(var c=[],u=0;u<l.length;u++)l.charAt(u)!="%"?c.push(l.charCodeAt(u)):(c.push(parseInt(l.substring(u+1,u+3),16)),u+=2);return c},s.NUMERIC_REGEX=/^[0-9]*$/,s.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,s.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",s})();n.QrSegment=a})(Zp||(Zp={}));(function(n){(function(e){var t=(function(){function r(i,a){this.ordinal=i,this.formatBits=a}return r.LOW=new r(0,1),r.MEDIUM=new r(1,0),r.QUARTILE=new r(2,3),r.HIGH=new r(3,2),r})();e.Ecc=t})(n.QrCode||(n.QrCode={}))})(Zp||(Zp={}));(function(n){(function(e){var t=(function(){function r(i,a){this.modeBits=i,this.numBitsCharCount=a}return r.prototype.numCharCountBits=function(i){return this.numBitsCharCount[Math.floor((i+7)/17)]},r.NUMERIC=new r(1,[10,12,14]),r.ALPHANUMERIC=new r(2,[9,11,13]),r.BYTE=new r(4,[8,16,16]),r.KANJI=new r(8,[8,10,12]),r.ECI=new r(7,[0,0,0]),r})();e.Mode=t})(n.QrSegment||(n.QrSegment={}))})(Zp||(Zp={}));var X5=Zp,Wdt=0;function Xdt(n){return n||"v-".concat(Wdt++)}var s0e="L",Zdt=100,l0e=0,qdt=.1,Kdt=2,c0e={L:X5.QrCode.Ecc.LOW,M:X5.QrCode.Ecc.MEDIUM,Q:X5.QrCode.Ecc.QUARTILE,H:X5.QrCode.Ecc.HIGH},Jdt=(function(){try{new Path2D().addPath(new Path2D)}catch(n){return!1}return!0})();function u0e(n){return n in c0e}function Qdt(n,e,t){var r=e>0?n[e-1][t]:!1,i=e<n.length-1?n[e+1][t]:!1,a=t>0?n[e][t-1]:!1,s=t<n[e].length-1?n[e][t+1]:!1;return{nw:!r&&!a,ne:!r&&!s,se:!i&&!s,sw:!i&&!a}}function $dt(n,e,t){e===void 0&&(e=0),t===void 0&&(t=0);for(var r=[],i=Math.min(t,.5),a=0;a<n.length;a++)for(var s=0;s<n[a].length;s++)if(n[a][s]){var l=Qdt(n,a,s),c=l.nw,u=l.ne,d=l.se,f=l.sw,h=s+e,p=a+e;r.push("M".concat(h+(c?i:0)," ").concat(p),"L".concat(h+1-(u?i:0)," ").concat(p)),u&&r.push("A".concat(i," ").concat(i," 0 0 1 ").concat(h+1," ").concat(p+i)),r.push("L".concat(h+1," ").concat(p+1-(d?i:0))),d&&r.push("A".concat(i," ").concat(i," 0 0 1 ").concat(h+1-i," ").concat(p+1)),r.push("L".concat(h+(f?i:0)," ").concat(p+1)),f&&r.push("A".concat(i," ").concat(i," 0 0 1 ").concat(h," ").concat(p+1-i)),r.push("L".concat(h," ").concat(p+(c?i:0))),c&&r.push("A".concat(i," ").concat(i," 0 0 1 ").concat(h+i," ").concat(p)),r.push("z")}return r.join("")}function e0t(n,e){e===void 0&&(e=0);for(var t=[],r=0;r<n.length;r++)for(var i=n[r],a=null,s=0;s<i.length;s++){var l=i[s];if(!l&&a!==null){t.push("M".concat(a+e," ").concat(r+e,"h").concat(s-a,"v1H").concat(a+e,"z")),a=null;continue}if(s===i.length-1){if(!l)continue;a===null?t.push("M".concat(s+e,",").concat(r+e," h1v1H").concat(s+e,"z")):t.push("M".concat(a+e,",").concat(r+e," h").concat(s+1-a,"v1H").concat(a+e,"z"));continue}l&&a===null&&(a=s)}return t.join("")}function t0t(n,e,t,r){var i=r.width,a=r.height,s=r.x,l=r.y,c=n.length+t*2,u=Math.floor(e*qdt),d=c/e,f=(i||u)*d,h=(a||u)*d,p=s==null?n.length/2-f/2:s*d,m=l==null?n.length/2-h/2:l*d,v=(r.borderRadius||0)*d;return{x:p,y:m,h,w:f,borderRadius:v}}function d0e(n){var e=o.computed(function(){var l;return((l=n.margin)!==null&&l!==void 0?l:l0e)>>>0}),t=o.computed(function(){var l=u0e(n.level)?n.level:s0e;return X5.QrCode.encodeText(n.value,c0e[l]).getModules()}),r=o.computed(function(){return t.value.length+e.value*2}),i=o.computed(function(){return n.radius>0?$dt(t.value,e.value,n.radius):e0t(t.value,e.value)}),a=o.computed(function(){if(!n.imageSettings.src)return null;var l=t0t(t.value,n.size,e.value,n.imageSettings);return{x:l.x+e.value,y:l.y+e.value,width:l.w,height:l.h,borderRadius:l.borderRadius}}),s=o.computed(function(){if(!n.imageSettings.excavate||!a.value)return null;var l=Kdt/(n.size/r.value);return{x:a.value.x-l,y:a.value.y-l,width:a.value.width+l*2,height:a.value.height+l*2,borderRadius:a.value.borderRadius}});return{margin:e,numCells:r,cells:t,fgPath:i,imageProps:a,imageBorderProps:s}}var pF={value:{type:String,required:!0,default:""},size:{type:Number,default:Zdt},level:{type:String,default:s0e,validator:function(n){return u0e(n)}},background:{type:String,default:"#fff"},foreground:{type:String,default:"#000"},margin:{type:Number,required:!1,default:l0e},imageSettings:{type:Object,required:!1,default:function(){return{}}},gradient:{type:Boolean,required:!1,default:!1},gradientType:{type:String,required:!1,default:"linear",validator:function(n){return["linear","radial"].indexOf(n)>-1}},gradientStartColor:{type:String,required:!1,default:"#000"},gradientEndColor:{type:String,required:!1,default:"#fff"},radius:{type:Number,required:!1,default:0,validator:function(n){return!isNaN(n)&&n>=0&&n<=.5}},id:{type:String,required:!1}},n0t=Ku(Ku({},pF),{renderAs:{type:String,required:!1,default:"canvas",validator:function(n){return["canvas","svg"].indexOf(n)>-1}}}),r0t=o.defineComponent({name:"QRCodeSvg",props:pF,setup:function(n){var e=d0e(n),t=e.numCells,r=e.fgPath,i=e.imageProps,a=e.imageBorderProps,s=Xdt(n.id),l="qrcode.vue-gradient-".concat(s),c="qrcode.vue-logo-clip-path-".concat(s),u=o.computed(function(){if(!n.gradient)return null;var f=n.gradientType==="linear"?{x1:"0%",y1:"0%",x2:"100%",y2:"100%"}:{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"};return o.h(n.gradientType==="linear"?"linearGradient":"radialGradient",Ku({id:l},f),[o.h("stop",{offset:"0%",style:{stopColor:n.gradientStartColor}}),o.h("stop",{offset:"100%",style:{stopColor:n.gradientEndColor}})])}),d=o.computed(function(){if(!i.value)return null;var f=i.value.borderRadius;return f<=0?null:o.h("clipPath",{id:c},[o.h("rect",{x:i.value.x,y:i.value.y,width:i.value.width,height:i.value.height,rx:f,ry:f})])});return function(){return o.h("svg",{width:n.size,height:n.size,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(t.value," ").concat(t.value),role:"img","aria-label":n.value},[o.h("defs",{},[u.value,d.value]),o.h("rect",{width:"100%",height:"100%",fill:n.background}),o.h("path",{fill:n.gradient?"url(#".concat(l,")"):n.foreground,d:r.value}),a.value&&o.h("rect",{x:a.value.x,y:a.value.y,width:a.value.width,height:a.value.height,fill:n.background,rx:a.value.borderRadius,ry:a.value.borderRadius}),n.imageSettings.src&&i.value&&o.h("image",Ku(Ku({href:n.imageSettings.src},i.value),i.value.borderRadius>0?{"clip-path":"url(#".concat(c,")")}:{}))])}}}),i0t=o.defineComponent({name:"QRCodeCanvas",props:pF,setup:function(n,e){var t=d0e(n),r=t.margin,i=t.cells,a=t.numCells,s=t.fgPath,l=t.imageProps,c=t.imageBorderProps,u=o.ref(null),d=o.ref(null),f=function(p,m,v,g,y,b){p.beginPath(),p.roundRect?p.roundRect(m,v,g,y,b):p.rect(m,v,g,y)},h=function(){var p=n.size,m=n.background,v=n.foreground,g=n.gradient,y=n.gradientType,b=n.gradientStartColor,x=n.gradientEndColor,_=u.value;if(_){var w=_.getContext("2d");if(w){var S=d.value,C=typeof window!="undefined"&&window.devicePixelRatio||1,E=p/a.value*C;if(_.height=_.width=p*C,w.setTransform(E,0,0,E,0,0),w.fillStyle=m,w.fillRect(0,0,a.value,a.value),g){var T=void 0;y==="linear"?T=w.createLinearGradient(0,0,a.value,a.value):T=w.createRadialGradient(a.value/2,a.value/2,0,a.value/2,a.value/2,a.value/2),T.addColorStop(0,b),T.addColorStop(1,x),w.fillStyle=T}else w.fillStyle=v;Jdt?w.fill(new Path2D(s.value)):i.value.forEach(function(k,P){k.forEach(function(I,N){I&&w.fillRect(N+r.value,P+r.value,1,1)})});var A=n.imageSettings.src&&S&&S.naturalWidth!==0&&S.naturalHeight!==0;if(A&&l.value){if(c.value){var M=c.value;w.fillStyle=n.background,f(w,M.x,M.y,M.width,M.height,M.borderRadius),w.fill()}var D=l.value.borderRadius;D>0?(w.save(),f(w,l.value.x,l.value.y,l.value.width,l.value.height,D),w.clip(),w.drawImage(S,l.value.x,l.value.y,l.value.width,l.value.height),w.restore()):w.drawImage(S,l.value.x,l.value.y,l.value.width,l.value.height)}}}};return o.onMounted(h),o.watchEffect(h),function(){return o.h(o.Fragment,[o.h("canvas",Ku(Ku({},e.attrs),{ref:u,role:"img","aria-label":n.value,style:Ku(Ku({},e.attrs.style),{width:"".concat(n.size,"px"),height:"".concat(n.size,"px")})})),n.imageSettings.src&&o.h("img",{ref:d,src:n.imageSettings.src,style:{display:"none"},onLoad:h})])}}}),a0t=o.defineComponent({name:"Qrcode",props:n0t,setup:function(n){return function(){return o.h(n.renderAs==="svg"?r0t:i0t,{value:n.value,size:n.size,margin:n.margin,level:n.level,background:n.background,foreground:n.foreground,imageSettings:n.imageSettings,gradient:n.gradient,gradientType:n.gradientType,gradientStartColor:n.gradientStartColor,gradientEndColor:n.gradientEndColor,radius:n.radius,id:n.id})}}});const o0t="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3crect%20x='3'%20y='3'%20width='7'%20height='7'%20rx='1'/%3e%3crect%20x='14'%20y='3'%20width='7'%20height='7'%20rx='1'/%3e%3crect%20x='3'%20y='14'%20width='7'%20height='7'%20rx='1'/%3e%3crect%20x='14'%20y='14'%20width='3'%20height='3'/%3e%3crect%20x='18'%20y='14'%20width='3'%20height='3'/%3e%3crect%20x='14'%20y='18'%20width='3'%20height='3'/%3e%3crect%20x='18'%20y='18'%20width='3'%20height='3'/%3e%3crect%20x='5'%20y='5'%20width='3'%20height='3'%20fill='currentColor'/%3e%3crect%20x='16'%20y='5'%20width='3'%20height='3'%20fill='currentColor'/%3e%3crect%20x='5'%20y='16'%20width='3'%20height='3'%20fill='currentColor'/%3e%3c/svg%3e",s0t="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%234162ff'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3crect%20x='3'%20y='3'%20width='7'%20height='7'%20rx='1'/%3e%3crect%20x='14'%20y='3'%20width='7'%20height='7'%20rx='1'/%3e%3crect%20x='3'%20y='14'%20width='7'%20height='7'%20rx='1'/%3e%3crect%20x='14'%20y='14'%20width='3'%20height='3'/%3e%3crect%20x='18'%20y='14'%20width='3'%20height='3'/%3e%3crect%20x='14'%20y='18'%20width='3'%20height='3'/%3e%3crect%20x='18'%20y='18'%20width='3'%20height='3'/%3e%3crect%20x='5'%20y='5'%20width='3'%20height='3'%20fill='%234162ff'/%3e%3crect%20x='16'%20y='5'%20width='3'%20height='3'%20fill='%234162ff'/%3e%3crect%20x='5'%20y='16'%20width='3'%20height='3'%20fill='%234162ff'/%3e%3c/svg%3e",l0t={class:"mix-body"},c0t={DEFAULT_ICON:o0t,ACTIVE_ICON:s0t,NAME_CN:"二维码",NAME_EN:"QR Code",ORDER:10,PLATFORM:["pc","screen","mobile"]},u0t={titleColor:"#111",bgColor:"#fff",radiusSize:8,isHideTitle:!1,titleSize:14,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4,qrColor:{value:"#000000",type:"color",label:"component.qrcode.qrColor"},qrBgColor:{value:"#ffffff",type:"color",label:"component.qrcode.qrBgColor"},showBorder:{value:!0,type:"checkbox",label:"component.qrcode.showBorder"},borderColor:{value:"#e5e7eb",type:"color",label:"setting.borderColor",dependent:"showBorder"},borderWidth:{value:1,type:"number",label:"component.qrcode.borderWidth",min:1,max:10,dependent:"showBorder"},qrSize:{value:200,type:"number",label:"component.qrcode.qrSize",min:50,max:500},defaultContent:{value:"http://www.mixlinker.com",type:"textarea",label:"component.qrcode.defaultContent"},errorLevel:{value:"M",type:"select",label:"component.qrcode.errorLevel",options:[{label:"低 (L)",value:"L"},{label:"中 (M)",value:"M"},{label:"较高 (Q)",value:"Q"},{label:"高 (H)",value:"H"}]}},d0t=[],f0t=[],h0t=[],p0t={},m0t={DEFAULT:c0t,OPTIONS:u0t,DATA:d0t,PARAMS:f0t,SOURCE:h0t,COMMON:p0t},v0t=o.defineComponent(tt(Ne({},m0t),{__name:"qrcode",props:{conf:{type:Object,default:()=>({})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(n){const e=n;class t extends Cn{extractStyles(){return tt(Ne({},super.extractStyles()),{titleColor:this.getOptionValue("titleColor","#111"),bgColor:this.getOptionValue("bgColor","#fff"),radiusSize:this.getOptionValue("radiusSize",8),isHideTitle:this.getOptionValue("isHideTitle",!1),qrColor:this.getOptionValue("qrColor","#000000"),qrBgColor:this.getOptionValue("qrBgColor","#ffffff"),showBorder:this.getOptionValue("showBorder",!0),borderColor:this.getOptionValue("borderColor","#e5e7eb"),borderWidth:this.getOptionValue("borderWidth",1),qrSize:this.getOptionValue("qrSize",200),defaultContent:this.getOptionValue("defaultContent","http://www.mixlinker.com"),errorLevel:this.getOptionValue("errorLevel","M")})}init(){this.Style.value=this.extractStyles(),this.applyTheme()}}const r=new t(e,"qrcode");r.setupLifecycle();const i=r.getStyle(),a=e.conf,s=o.computed(()=>$n(e.conf.options)),l=o.computed(()=>i.value.defaultContent||"http://www.mixlinker.com"),c=o.computed(()=>Math.min(i.value.qrSize,300)),u=o.computed(()=>({border:i.value.showBorder?`${i.value.borderWidth}px solid ${i.value.borderColor}`:"none",padding:i.value.showBorder?"8px":"0",background:i.value.qrBgColor,borderRadius:"4px"}));return(d,f)=>(o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({background:o.unref(i).bgColor,borderRadius:`${o.unref(i).radiusSize}px`})},[o.createElementVNode("div",{class:"mix-title",style:o.normalizeStyle(s.value)},o.toDisplayString(o.unref(a).caption||o.unref(a).name),5),o.createElementVNode("div",l0t,[o.createElementVNode("div",{class:"qrcode-wrapper",style:o.normalizeStyle(u.value)},[o.createVNode(a0t,{value:l.value,size:c.value,level:o.unref(i).errorLevel,"render-as":"svg",foreground:o.unref(i).qrColor,background:o.unref(i).qrBgColor},null,8,["value","size","level","foreground","background"])],4)]),o.renderSlot(d.$slots,"default",{},void 0,!0)],4))}})),g0t=Dt(v0t,[["__scopeId","data-v-3ff68f63"]]),y0t=Object.freeze(Object.defineProperty({__proto__:null,default:g0t},Symbol.toStringTag,{value:"Module"})),b0t="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e轮播%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-1062.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M1072.93793,113.477011%20C1073.29342,113.477011%201073.58161,113.765196%201073.58161,114.12069%20C1073.58161,114.446559%201073.33945,114.71587%201073.02527,114.758492%20L1072.93793,114.764368%20L1069.9954,114.764368%20C1069.63991,114.764368%201069.35172,114.476183%201069.35172,114.12069%20C1069.35172,113.79482%201069.59388,113.52551%201069.90806,113.482888%20L1069.9954,113.477011%20L1072.93793,113.477011%20Z%20M1075.88046,113.477011%20C1076.23595,113.477011%201076.52414,113.765196%201076.52414,114.12069%20C1076.52414,114.446559%201076.28198,114.71587%201075.9678,114.758492%20L1075.88046,114.764368%20L1075.14483,114.764368%20C1074.78933,114.764368%201074.50115,114.476183%201074.50115,114.12069%20C1074.50115,113.79482%201074.7433,113.52551%201075.05748,113.482888%20L1075.14483,113.477011%20L1075.88046,113.477011%20Z%20M1064.84598,113.477011%20C1065.20147,113.477011%201065.48966,113.765196%201065.48966,114.12069%20C1065.48966,114.446559%201065.2475,114.71587%201064.93332,114.758492%20L1064.84598,114.764368%20L1064.11034,114.764368%20C1063.75485,114.764368%201063.46667,114.476183%201063.46667,114.12069%20C1063.46667,113.79482%201063.70882,113.52551%201064.023,113.482888%20L1064.11034,113.477011%20L1064.84598,113.477011%20Z%20M1078.82299,113.477011%20C1079.17848,113.477011%201079.46667,113.765196%201079.46667,114.12069%20C1079.46667,114.446559%201079.22451,114.71587%201078.91033,114.758492%20L1078.82299,114.764368%20L1078.08736,114.764368%20C1077.73186,114.764368%201077.44368,114.476183%201077.44368,114.12069%20C1077.44368,113.79482%201077.68583,113.52551%201078.00001,113.482888%20L1078.08736,113.477011%20L1078.82299,113.477011%20Z%20M1067.78851,113.477011%20C1068.144,113.477011%201068.43218,113.765196%201068.43218,114.12069%20C1068.43218,114.446559%201068.19003,114.71587%201067.87585,114.758492%20L1067.78851,114.764368%20L1067.05287,114.764368%20C1066.69738,114.764368%201066.4092,114.476183%201066.4092,114.12069%20C1066.4092,113.79482%201066.65135,113.52551%201066.96553,113.482888%20L1067.05287,113.477011%20L1067.78851,113.477011%20Z%20M1078.20996,100.235632%20C1078.90402,100.235632%201079.46667,100.798278%201079.46667,101.492337%20L1079.46667,101.492337%20L1079.46667,111.300766%20C1079.46667,111.994825%201078.90402,112.557471%201078.20996,112.557471%20L1078.20996,112.557471%20L1064.72337,112.557471%20C1064.02931,112.557471%201063.46667,111.994825%201063.46667,111.300766%20L1063.46667,111.300766%20L1063.46667,101.492337%20C1063.46667,100.798278%201064.02931,100.235632%201064.72337,100.235632%20L1064.72337,100.235632%20Z%20M1078.1787,101.522114%20L1064.75341,101.522114%20L1064.75341,111.26924%20L1078.1787,111.26924%20L1078.1787,101.522114%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",x0t="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e轮播%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-1062.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M1072.93793,113.477011%20C1073.29342,113.477011%201073.58161,113.765196%201073.58161,114.12069%20C1073.58161,114.446559%201073.33945,114.71587%201073.02527,114.758492%20L1072.93793,114.764368%20L1069.9954,114.764368%20C1069.63991,114.764368%201069.35172,114.476183%201069.35172,114.12069%20C1069.35172,113.79482%201069.59388,113.52551%201069.90806,113.482888%20L1069.9954,113.477011%20L1072.93793,113.477011%20Z%20M1075.88046,113.477011%20C1076.23595,113.477011%201076.52414,113.765196%201076.52414,114.12069%20C1076.52414,114.446559%201076.28198,114.71587%201075.9678,114.758492%20L1075.88046,114.764368%20L1075.14483,114.764368%20C1074.78933,114.764368%201074.50115,114.476183%201074.50115,114.12069%20C1074.50115,113.79482%201074.7433,113.52551%201075.05748,113.482888%20L1075.14483,113.477011%20L1075.88046,113.477011%20Z%20M1064.84598,113.477011%20C1065.20147,113.477011%201065.48966,113.765196%201065.48966,114.12069%20C1065.48966,114.446559%201065.2475,114.71587%201064.93332,114.758492%20L1064.84598,114.764368%20L1064.11034,114.764368%20C1063.75485,114.764368%201063.46667,114.476183%201063.46667,114.12069%20C1063.46667,113.79482%201063.70882,113.52551%201064.023,113.482888%20L1064.11034,113.477011%20L1064.84598,113.477011%20Z%20M1078.82299,113.477011%20C1079.17848,113.477011%201079.46667,113.765196%201079.46667,114.12069%20C1079.46667,114.446559%201079.22451,114.71587%201078.91033,114.758492%20L1078.82299,114.764368%20L1078.08736,114.764368%20C1077.73186,114.764368%201077.44368,114.476183%201077.44368,114.12069%20C1077.44368,113.79482%201077.68583,113.52551%201078.00001,113.482888%20L1078.08736,113.477011%20L1078.82299,113.477011%20Z%20M1067.78851,113.477011%20C1068.144,113.477011%201068.43218,113.765196%201068.43218,114.12069%20C1068.43218,114.446559%201068.19003,114.71587%201067.87585,114.758492%20L1067.78851,114.764368%20L1067.05287,114.764368%20C1066.69738,114.764368%201066.4092,114.476183%201066.4092,114.12069%20C1066.4092,113.79482%201066.65135,113.52551%201066.96553,113.482888%20L1067.05287,113.477011%20L1067.78851,113.477011%20Z%20M1078.20996,100.235632%20C1078.90402,100.235632%201079.46667,100.798278%201079.46667,101.492337%20L1079.46667,101.492337%20L1079.46667,111.300766%20C1079.46667,111.994825%201078.90402,112.557471%201078.20996,112.557471%20L1078.20996,112.557471%20L1064.72337,112.557471%20C1064.02931,112.557471%201063.46667,111.994825%201063.46667,111.300766%20L1063.46667,111.300766%20L1063.46667,101.492337%20C1063.46667,100.798278%201064.02931,100.235632%201064.72337,100.235632%20L1064.72337,100.235632%20Z%20M1078.1787,101.522114%20L1064.75341,101.522114%20L1064.75341,111.26924%20L1078.1787,111.26924%20L1078.1787,101.522114%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",_0t={class:"mix-component"},S0t=["src","height","width"],w0t=["src"],C0t={DEFAULT_ICON:b0t,ACTIVE_ICON:x0t,NAME_CN:"轮播",NAME_EN:"Swiper",ORDER:5,PLATFORM:["pc","screen","mobile"]},E0t={bgColor:"#fff",radiusSize:8,interval:10,type:{value:"img",type:"radio",option:[{value:"img",label:"component.customized.img"},{value:"url",label:"component.customized.url"}],label:"component.customized.type"}},A0t=[{url:""}],T0t=[{key:"url",label:"setting.paramField.url",type:"image",typeByOption:{option:"type",map:{img:"image",url:"text"}}}],M0t={DEFAULT:C0t,OPTIONS:E0t,DATA:A0t,PARAMS:T0t,COMMON:{}},D0t=o.defineComponent(tt(Ne({},M0t),{__name:"swiper",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){const e=n,t={height:1080,width:1920};class r extends Cn{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),radiusSize:this.getOptionValue("radiusSize",8),interval:this.getOptionValue("interval",10),type:this.getOptionValue("type","img")}}}const i=new r(e,"swiper");i.setupLifecycle();const a=i.getStyle(),s=o.ref({});let l=[],c=0,u=null;const d=o.computed(()=>{var y;const g=(y=e.conf)==null?void 0:y.data;return Array.isArray(g)?g.map(b=>String((b==null?void 0:b.url)||"").trim()):[]}),f=g=>g.includes("/yunuis/material/file/")||g.startsWith("yunuis/material/file/")||g.startsWith("/material/file/")||g.startsWith("material/file/")||g.startsWith("/mixservice/storage/")||g.startsWith("mixservice/storage/"),h=()=>{l.forEach(g=>URL.revokeObjectURL(g)),l=[]},p=g=>{const y=String(g||"").trim();return y?y.startsWith("data:")||y.startsWith("blob:")?y:f(y)?yp(y):y.startsWith(Ao)||y.startsWith("http")?y:Ao+y:""},m=g=>{const y=String(g||"").trim();return s.value[y]||p(y)};function v(){return Ve(this,null,function*(){const g=++c;u==null||u.abort(),u=new AbortController,h();const y={},b=[...new Set(d.value)];yield Promise.all(b.map(x=>Ve(null,null,function*(){if(!x){y[x]="";return}if(x.startsWith("blob:")||x.startsWith("data:")||!f(x)){y[x]=p(x);return}const _=Pw(yp(x));if(!_){y[x]="";return}try{const w={},S=U6();S&&(w.Authorization=`Bearer ${S}`);const C=yield fetch(_,{mode:"cors",credentials:"include",signal:u==null?void 0:u.signal,headers:w});if(g!==c)return;if(!C.ok){console.warn("[swiper] image load failed",C.status,_),y[x]="";return}const E=yield C.blob();if(g!==c)return;if(!E.size){y[x]="";return}const T=URL.createObjectURL(E);l.push(T),y[x]=T}catch(w){if((w==null?void 0:w.name)==="AbortError"||g!==c)return;console.warn("[swiper] image fetch error",w),y[x]=""}}))),g===c&&(s.value=y)})}return o.watch(()=>d.value.join(`
3946
- `),()=>{v()},{immediate:!0}),o.onBeforeUnmount(()=>{c++,u==null||u.abort(),h(),s.value={}}),(g,y)=>{const b=Se.ElCarouselItem,x=Se.ElCarousel;return o.openBlock(),o.createElementBlock("div",_0t,[o.createElementVNode("div",{class:"swiper-wrap",style:o.normalizeStyle({backgroundColor:o.unref(a).bgColor,borderRadius:`${o.unref(a).radiusSize}px`})},[o.createVNode(x,{autoplay:"","pause-on-hover":!1,interval:1e3*o.unref(a).interval,"indicator-position":"none",style:{width:"100%",height:"100%"}},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.conf.data,(_,w)=>(o.openBlock(),o.createBlock(b,{key:w},{default:o.withCtx(()=>[o.unref(a).type==="url"&&n.mode==="preview"?(o.openBlock(),o.createElementBlock("iframe",{key:0,src:_.url,frameborder:"0",height:t.height,width:t.width,class:"w-full h-full"},null,8,S0t)):(o.openBlock(),o.createElementBlock("img",{key:1,class:"w-full h-full object-cover",src:m(_.url),alt:"轮播图片"},null,8,w0t))]),_:2},1024))),128))]),_:1},8,["interval"])],4),o.renderSlot(g.$slots,"default",{},void 0,!0)])}}})),L0t=Dt(D0t,[["__scopeId","data-v-bab73c2c"]]),N0t=Object.freeze(Object.defineProperty({__proto__:null,default:L0t},Symbol.toStringTag,{value:"Module"})),vQ="mix-header-tabs",O0t="mix-header-active-tab",VD=n=>{try{return decodeURIComponent(n)}catch(e){return n}},f0e=(n,e)=>{const t=VD(n),r=sessionStorage.getItem(vQ);let i=[];if(r)try{i=JSON.parse(r)}catch(s){i=[]}const a=i.find(s=>VD(s.key)===t||VD(s.path)===t);a?(a.key=t,a.path=t,e&&(a.title=e)):i.push({key:t,path:t,title:e||"frame",closable:!0}),sessionStorage.setItem(vQ,JSON.stringify(i)),sessionStorage.setItem(O0t,t)},h0e=n=>typeof n=="string"||typeof n=="number"?String(n).trim():String((n==null?void 0:n.uid)||(n==null?void 0:n.object_id)||(n==null?void 0:n.objectid)||"").trim(),P0t=n=>Ve(null,null,function*(){var e;try{const{result:t}=yield Bt.post("get_object_item",{uid:n},!0),r=(e=t==null?void 0:t.dashboard_list)==null?void 0:e.find(i=>i.type==="screen_dashboard"||i.type==="show");return r?{url:`${location.origin}/mixui/frame/${encodeURIComponent(r.uid)}?object_id=${encodeURIComponent(n)}`,path:`/frame/${r.uid}?object_id=${n}`,name:r.name}:(Ue.ElMessage({message:"该对象未配置大屏脚本",type:"warning"}),null)}catch(t){return Ue.ElMessage.error("获取跳转信息失败"),null}}),k0t=(n,e="_self")=>Ve(null,null,function*(){const t=h0e(n);if(!t){Ue.ElMessage.error("未设置跳转参数");return}const r=yield P0t(t);r&&(f0e(r.path,r.name),window.open(r.url,e))}),gQ=(n,e="_self")=>{if(!n){Ue.ElMessage.error("未设置跳转参数");return}try{const t=new URL(n,location.origin);t.pathname.match(/^\/frame\/(.+)$/)&&f0e(`${t.pathname}${t.search}`)}catch(t){}window.open(n,e)},mF=n=>{const e=h0e(n);if(!e){Ue.ElMessage.error("未配置跳转参数");return}let t=location.href;t.indexOf("?object_id=")>-1&&(t=t.split("?object_id=")[0]),location.href=`${t}?object_id=${e}`,location.reload()},p0e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e文本%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-735.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M750.086782,99.5%20C750.950123,99.5%20751.65,100.199877%20751.65,101.063218%20L751.65,101.063218%20L751.65,113.936782%20C751.65,114.800123%20750.950123,115.5%20750.086782,115.5%20L750.086782,115.5%20L737.213218,115.5%20C736.349877,115.5%20735.65,114.800123%20735.65,113.936782%20L735.65,113.936782%20L735.65,101.063218%20C735.65,100.199877%20736.349877,99.5%20737.213218,99.5%20L737.213218,99.5%20Z%20M750.086782,100.787356%20L737.213218,100.787356%20C737.060864,100.787356%20736.937356,100.910864%20736.937356,101.063218%20L736.937356,101.063218%20L736.937356,113.936782%20C736.937356,114.089136%20737.060864,114.212644%20737.213218,114.212644%20L737.213218,114.212644%20L750.086782,114.212644%20C750.239136,114.212644%20750.362644,114.089136%20750.362644,113.936782%20L750.362644,113.936782%20L750.362644,101.063218%20C750.362644,100.910864%20750.239136,100.787356%20750.086782,100.787356%20L750.086782,100.787356%20Z%20M742.832631,112.230524%20C742.477137,112.230524%20742.188953,111.942339%20742.188953,111.586845%20C742.188953,111.260976%20742.431108,110.991665%20742.745288,110.949043%20L742.832631,110.943167%20L743.006,110.943%20L743.006322,105.047893%20C743.006322,104.987519%20743.014634,104.929087%20743.030176,104.873678%20L741.023793,104.873531%20L741.024202,105.456577%20C741.024202,105.782446%20740.782047,106.051757%20740.467867,106.094379%20L740.380524,106.100255%20C740.054654,106.100255%20739.785344,105.8581%20739.742721,105.543921%20L739.736845,105.456577%20L739.736845,104.230524%20C739.736845,103.904654%20739.979001,103.635344%20740.29318,103.592721%20L740.380524,103.586845%20L746.919476,103.586845%20C747.245346,103.586845%20747.514656,103.829001%20747.557279,104.14318%20L747.563155,104.230524%20L747.563155,105.456577%20C747.563155,105.812071%20747.27497,106.100255%20746.919476,106.100255%20C746.593607,106.100255%20746.324296,105.8581%20746.281674,105.543921%20L746.275798,105.456577%20L746.275287,104.873531%20L744.269773,104.873494%20C744.277714,104.901773%20744.283772,104.930839%20744.287802,104.960549%20L744.293678,105.047893%20L744.293,110.943%20L744.467369,110.943167%20C744.822863,110.943167%20745.111047,111.231352%20745.111047,111.586845%20C745.111047,111.912715%20744.868892,112.182025%20744.554712,112.224648%20L744.467369,112.230524%20L742.832631,112.230524%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",m0e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e文本%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-735.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M750.086782,99.5%20C750.950123,99.5%20751.65,100.199877%20751.65,101.063218%20L751.65,101.063218%20L751.65,113.936782%20C751.65,114.800123%20750.950123,115.5%20750.086782,115.5%20L750.086782,115.5%20L737.213218,115.5%20C736.349877,115.5%20735.65,114.800123%20735.65,113.936782%20L735.65,113.936782%20L735.65,101.063218%20C735.65,100.199877%20736.349877,99.5%20737.213218,99.5%20L737.213218,99.5%20Z%20M750.086782,100.787356%20L737.213218,100.787356%20C737.060864,100.787356%20736.937356,100.910864%20736.937356,101.063218%20L736.937356,101.063218%20L736.937356,113.936782%20C736.937356,114.089136%20737.060864,114.212644%20737.213218,114.212644%20L737.213218,114.212644%20L750.086782,114.212644%20C750.239136,114.212644%20750.362644,114.089136%20750.362644,113.936782%20L750.362644,113.936782%20L750.362644,101.063218%20C750.362644,100.910864%20750.239136,100.787356%20750.086782,100.787356%20L750.086782,100.787356%20Z%20M742.832631,112.230524%20C742.477137,112.230524%20742.188953,111.942339%20742.188953,111.586845%20C742.188953,111.260976%20742.431108,110.991665%20742.745288,110.949043%20L742.832631,110.943167%20L743.006,110.943%20L743.006322,105.047893%20C743.006322,104.987519%20743.014634,104.929087%20743.030176,104.873678%20L741.023793,104.873531%20L741.024202,105.456577%20C741.024202,105.782446%20740.782047,106.051757%20740.467867,106.094379%20L740.380524,106.100255%20C740.054654,106.100255%20739.785344,105.8581%20739.742721,105.543921%20L739.736845,105.456577%20L739.736845,104.230524%20C739.736845,103.904654%20739.979001,103.635344%20740.29318,103.592721%20L740.380524,103.586845%20L746.919476,103.586845%20C747.245346,103.586845%20747.514656,103.829001%20747.557279,104.14318%20L747.563155,104.230524%20L747.563155,105.456577%20C747.563155,105.812071%20747.27497,106.100255%20746.919476,106.100255%20C746.593607,106.100255%20746.324296,105.8581%20746.281674,105.543921%20L746.275798,105.456577%20L746.275287,104.873531%20L744.269773,104.873494%20C744.277714,104.901773%20744.283772,104.930839%20744.287802,104.960549%20L744.293678,105.047893%20L744.293,110.943%20L744.467369,110.943167%20C744.822863,110.943167%20745.111047,111.231352%20745.111047,111.586845%20C745.111047,111.912715%20744.868892,112.182025%20744.554712,112.224648%20L744.467369,112.230524%20L742.832631,112.230524%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",I0t={class:"mix-component"},R0t={DEFAULT_ICON:p0e,ACTIVE_ICON:m0e,NAME_CN:"文本",NAME_EN:"Textbox",ORDER:2,PLATFORM:["pc","screen","mobile"]},V0t={bgColor:{value:"#fff",type:"color",label:"component.options.bgColor"},textColor:{value:"#111",type:"color",label:"component.options.textColor"},textSize:{value:14,type:"number",label:"component.options.textSize",min:10,max:100},radiusSize:{value:8,type:"number",label:"component.options.radiusSize",min:0,max:50},letterSpacing:{value:2,type:"number",label:"component.options.letterSpacing",min:0,max:20},name:{value:"",type:"string",label:"component.customized.name"},bgImg:{value:"",type:"image",label:"component.customized.bgImg"},textAlign:{value:"center",type:"radio",option:[{value:"left",label:"component.list.left"},{value:"center",label:"component.list.center"},{value:"right",label:"component.list.right"}],label:"component.customized.textAlign"},isBold:!1,autoWrap:{value:!1,type:"checkbox",label:"自动换行"},isJump:!1,jumpType:{value:"url",type:"radio",option:[{value:"url",label:"component.customized.address"},{value:"uid",label:"component.customized.dashboard"}],label:"component.customized.jumpType",dependent:"isJump"},jumpParam:{value:"",type:"string",label:"跳转参数",dependent:"isJump"}},B0t={DEFAULT:R0t,OPTIONS:V0t,COMMON:{}},F0t=o.defineComponent(tt(Ne({},B0t),{__name:"textbox",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){const e=n,t={left:"flex-start",center:"center",right:"flex-end"};class r extends Cn{extractStyles(){var f,h,p,m,v,g,y,b,x,_,w,S,C,E,T,A,M,D,k,P,I,N,R,V,B,F,G,U;const{options:d}=this.props.conf;return{bgColor:(p=(h=(f=d==null?void 0:d.bgColor)==null?void 0:f.value)!=null?h:d==null?void 0:d.bgColor)!=null?p:"#fff",textColor:(g=(v=(m=d==null?void 0:d.textColor)==null?void 0:m.value)!=null?v:d==null?void 0:d.textColor)!=null?g:"#303133",textSize:(x=(b=(y=d==null?void 0:d.textSize)==null?void 0:y.value)!=null?b:d==null?void 0:d.textSize)!=null?x:14,radiusSize:(S=(w=(_=d==null?void 0:d.radiusSize)==null?void 0:_.value)!=null?w:d==null?void 0:d.radiusSize)!=null?S:8,letterSpacing:(T=(E=(C=d==null?void 0:d.letterSpacing)==null?void 0:C.value)!=null?E:d==null?void 0:d.letterSpacing)!=null?T:2,textAlign:(M=(A=d==null?void 0:d.textAlign)==null?void 0:A.value)!=null?M:"center",isBold:(P=(k=(D=d==null?void 0:d.isBold)==null?void 0:D.value)!=null?k:d==null?void 0:d.isBold)!=null?P:!1,autoWrap:(R=(N=(I=d==null?void 0:d.autoWrap)==null?void 0:I.value)!=null?N:d==null?void 0:d.autoWrap)!=null?R:!1,bgImg:(B=(V=d==null?void 0:d.bgImg)==null?void 0:V.value)!=null?B:"",isJump:(U=(G=(F=d==null?void 0:d.isJump)==null?void 0:F.value)!=null?G:d==null?void 0:d.isJump)!=null?U:!1}}}const i=new r(e,"textbox");i.setupLifecycle();const a=i.getStyle(),s=u=>u?u.startsWith(Ao)||u.startsWith("http")?u:Ao+u:"",l=()=>Ve(null,null,function*(){var f,h;const{options:u}=e.conf,d=(f=u.jumpParam)==null?void 0:f.value;if(!d){gQ("");return}((h=u.jumpType)==null?void 0:h.value)==="url"?gQ(d):yield k0t(d)}),c=()=>{e.mode==="preview"&&a.value.isJump&&l()};return(u,d)=>{var f,h,p;return o.openBlock(),o.createElementBlock("div",I0t,[o.createElementVNode("div",{class:o.normalizeClass(["textbox-wrap",{"is-auto-wrap":o.unref(a).autoWrap}]),style:o.normalizeStyle({backgroundColor:o.unref(a).bgColor,color:o.unref(a).textColor,borderRadius:`${o.unref(a).radiusSize}px`,fontSize:`${o.unref(a).textSize}px`,backgroundImage:o.unref(a).bgImg?`url(${s(o.unref(a).bgImg)})`:"",justifyContent:t[o.unref(a).textAlign]||"center",textAlign:o.unref(a).autoWrap&&o.unref(a).textAlign==="left"?"justify":o.unref(a).textAlign||"center",textAlignLast:o.unref(a).autoWrap&&o.unref(a).textAlign==="left"?"left":"auto",fontWeight:o.unref(a).isBold?"600":"400",letterSpacing:`${o.unref(a).letterSpacing}px`,whiteSpace:o.unref(a).autoWrap?"normal":"nowrap",overflowWrap:o.unref(a).autoWrap?"break-word":"normal",wordBreak:o.unref(a).autoWrap?"break-word":"normal",cursor:o.unref(a).isJump?"pointer":"default"}),onClick:c},o.toDisplayString(((p=(h=(f=n.conf)==null?void 0:f.options)==null?void 0:h.name)==null?void 0:p.value)||""),7),o.renderSlot(u.$slots,"default",{},void 0,!0)])}}})),z0t=Dt(F0t,[["__scopeId","data-v-8fe54553"]]),U0t=Object.freeze(Object.defineProperty({__proto__:null,default:z0t},Symbol.toStringTag,{value:"Module"})),Kg="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e设置%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化'%20transform='translate(-428.000000,%20-1211.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cg%20id='编组-35'%20transform='translate(428.226222,%201211.735632)'%3e%3cpath%20d='M13.9770115,0%20C15.0942772,0%2016,0.905722805%2016,2.02298851%20L16,2.02298851%20L16,12.5057471%20C16,13.6230128%2015.0942772,14.5287356%2013.9770115,14.5287356%20L13.9770115,14.5287356%20L2.02298851,14.5287356%20C0.905722805,14.5287356%200,13.6230128%200,12.5057471%20L0,12.5057471%20L0,2.02298851%20C0,0.905722805%200.905722805,0%202.02298851,0%20L2.02298851,0%20Z%20M13.9770115,1.28735632%20L2.02298851,1.28735632%20C1.61671007,1.28735632%201.28735632,1.61671007%201.28735632,2.02298851%20L1.28735632,2.02298851%20L1.28735632,12.5057471%20C1.28735632,12.9120256%201.61671007,13.2413793%202.02298851,13.2413793%20L2.02298851,13.2413793%20L13.9770115,13.2413793%20C14.3832899,13.2413793%2014.7126437,12.9120256%2014.7126437,12.5057471%20L14.7126437,12.5057471%20L14.7126437,2.02298851%20C14.7126437,1.61671007%2014.3832899,1.28735632%2013.9770115,1.28735632%20L13.9770115,1.28735632%20Z%20M12.2612343,8.64367816%20C12.6167279,8.64367816%2012.9049125,8.93186269%2012.9049125,9.28735632%20C12.9049125,9.61322548%2012.6627574,9.8825363%2012.3485776,9.92515846%20L12.2612343,9.93103448%20L3.5862069,9.93103448%20C3.23071326,9.93103448%202.94252874,9.64284995%202.94252874,9.28735632%20C2.94252874,8.96148716%203.18468379,8.69217634%203.49886358,8.64955418%20L3.5862069,8.64367816%20L12.2612343,8.64367816%20Z%20M12.4137931,4.65837915%20C12.7692867,4.65837915%2013.0574713,4.94656368%2013.0574713,5.30205731%20C13.0574713,5.62792647%2012.8153162,5.89723729%2012.5011364,5.93985945%20L12.4137931,5.94573547%20L6.52873563,5.94573547%20C6.173242,5.94573547%205.88505747,5.65755094%205.88505747,5.30205731%20C5.88505747,4.97618815%206.12721253,4.70687733%206.44139232,4.66425517%20L6.52873563,4.65837915%20L12.4137931,4.65837915%20Z%20M4.32183908,4.65837915%20C4.67733271,4.65837915%204.96551724,4.94656368%204.96551724,5.30205731%20C4.96551724,5.62792647%204.72336219,5.89723729%204.40918239,5.93985945%20L4.32183908,5.94573547%20L3.5862069,5.94573547%20C3.23071326,5.94573547%202.94252874,5.65755094%202.94252874,5.30205731%20C2.94252874,4.97618815%203.18468379,4.70687733%203.49886358,4.66425517%20L3.5862069,4.65837915%20L4.32183908,4.65837915%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Jg="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e设置%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-433.000000,%20-1211.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cg%20id='编组-35'%20transform='translate(433.664368,%201211.735632)'%3e%3cpath%20d='M13.9770115,0%20C15.0942772,0%2016,0.905722805%2016,2.02298851%20L16,2.02298851%20L16,12.5057471%20C16,13.6230128%2015.0942772,14.5287356%2013.9770115,14.5287356%20L13.9770115,14.5287356%20L2.02298851,14.5287356%20C0.905722805,14.5287356%200,13.6230128%200,12.5057471%20L0,12.5057471%20L0,2.02298851%20C0,0.905722805%200.905722805,0%202.02298851,0%20L2.02298851,0%20Z%20M13.9770115,1.28735632%20L2.02298851,1.28735632%20C1.61671007,1.28735632%201.28735632,1.61671007%201.28735632,2.02298851%20L1.28735632,2.02298851%20L1.28735632,12.5057471%20C1.28735632,12.9120256%201.61671007,13.2413793%202.02298851,13.2413793%20L2.02298851,13.2413793%20L13.9770115,13.2413793%20C14.3832899,13.2413793%2014.7126437,12.9120256%2014.7126437,12.5057471%20L14.7126437,12.5057471%20L14.7126437,2.02298851%20C14.7126437,1.61671007%2014.3832899,1.28735632%2013.9770115,1.28735632%20L13.9770115,1.28735632%20Z%20M12.2612343,8.64367816%20C12.6167279,8.64367816%2012.9049125,8.93186269%2012.9049125,9.28735632%20C12.9049125,9.61322548%2012.6627574,9.8825363%2012.3485776,9.92515846%20L12.2612343,9.93103448%20L3.5862069,9.93103448%20C3.23071326,9.93103448%202.94252874,9.64284995%202.94252874,9.28735632%20C2.94252874,8.96148716%203.18468379,8.69217634%203.49886358,8.64955418%20L3.5862069,8.64367816%20L12.2612343,8.64367816%20Z%20M12.4137931,4.65837915%20C12.7692867,4.65837915%2013.0574713,4.94656368%2013.0574713,5.30205731%20C13.0574713,5.62792647%2012.8153162,5.89723729%2012.5011364,5.93985945%20L12.4137931,5.94573547%20L6.52873563,5.94573547%20C6.173242,5.94573547%205.88505747,5.65755094%205.88505747,5.30205731%20C5.88505747,4.97618815%206.12721253,4.70687733%206.44139232,4.66425517%20L6.52873563,4.65837915%20L12.4137931,4.65837915%20Z%20M4.32183908,4.65837915%20C4.67733271,4.65837915%204.96551724,4.94656368%204.96551724,5.30205731%20C4.96551724,5.62792647%204.72336219,5.89723729%204.40918239,5.93985945%20L4.32183908,5.94573547%20L3.5862069,5.94573547%20C3.23071326,5.94573547%202.94252874,5.65755094%202.94252874,5.30205731%20C2.94252874,4.97618815%203.18468379,4.70687733%203.49886358,4.66425517%20L3.5862069,4.65837915%20L4.32183908,4.65837915%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",H0t={key:0,class:"config-section"},j0t={class:"section-header"},G0t={class:"section-title"},Y0t={key:0,class:"granularity-switch"},W0t=["onClick"],X0t=["onClick"],Z0t={key:0,class:"quick-range"},q0t=["onClick"],K0t={key:1,class:"date-inputs"},J0t={key:1,class:"config-section"},Q0t={class:"section-header"},$0t={class:"section-title"},eft={key:0,class:"list-actions"},tft={class:"selected-count"},nft={class:"select-list"},rft={key:2,class:"config-section"},ift={class:"section-header"},aft={class:"section-title"},oft={class:"switch-options"},sft={key:3,class:"config-section"},lft={class:"section-header"},cft={class:"section-title"},uft={class:"range-inputs"},dft={key:0,class:"range-unit"},fft={key:4,class:"config-section"},hft={DEFAULT_ICON:Kg,ACTIVE_ICON:Jg,NAME_CN:"通用控制面板",NAME_EN:"Universal Config Panel",ORDER:20,PLATFORM:["pc","screen","mobile"]},pft={bindId:{value:"",type:"string",label:"component.deepDisplacement.bindId"},bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},accentColor:{value:"#409eff",type:"color",label:"component.options.accentColor"},borderColor:{value:"#e5e5e5",type:"color",label:"component.options.borderColor"},bindMode:{value:"channel",type:"select",label:"绑定模式",options:[{label:"频道模式",value:"channel"},{label:"直接绑定",value:"direct"}]},linkChannel:{value:"deepDisplacement",type:"select",label:"联动频道",options:[{label:"深部位移",value:"deepDisplacement"},{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"设备联动",value:"device"},{label:"告警联动",value:"alarm"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"自定义频道名",showWhen:{linkChannel:"custom"}}},mft=[{type:"timeRange",label:"时间段",key:"timeRange",targetIds:"",showGranularity:!0,showQuickRange:!0,dateType:"datetime",dateFormat:"YYYY-MM-DD HH:mm:ss"},{type:"selectList",label:"节点列表",key:"nodeList",targetIds:"",multiple:!1,options:[{label:"-123米",value:-123},{label:"-126米",value:-126},{label:"-129米",value:-129}]}],vft=["type","label","key","targetIds","showGranularity","showQuickRange","dateType","dateFormat","multiple","options","minPlaceholder","maxPlaceholder","unit","buttonType","icon"],gft=[],yft={useAlias:!1,multiObject:!1,source:""},bft={DEFAULT:hft,OPTIONS:pft,DATA:mft,PARAMS:vft,SOURCE:gft,COMMON:yft},xft=o.defineComponent(tt(Ne({},bft),{__name:"universalConfigPanel",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){o.useCssVars(x=>({v10edae52:c.value.backgroundColor,a9b6f6d8:c.value.borderColor,d418e10a:r.value.textColor,v0bdaaa9c:r.value.borderColor,ca35c684:r.value.accentColor}));const e=ua(),t=n,r=o.computed(()=>{var C,E,T,A,M,D,k,P;const{options:x}=t.conf||{},_=((C=x==null?void 0:x.linkChannel)==null?void 0:C.value)||"deepDisplacement",w=((E=x==null?void 0:x.customChannel)==null?void 0:E.value)||"",S=_==="custom"&&w?w:_;return{bindId:((T=x==null?void 0:x.bindId)==null?void 0:T.value)||"",bgColor:((A=x==null?void 0:x.bgColor)==null?void 0:A.value)||"#ffffff",textColor:((M=x==null?void 0:x.textColor)==null?void 0:M.value)||"#333333",accentColor:((D=x==null?void 0:x.accentColor)==null?void 0:D.value)||"#409eff",borderColor:((k=x==null?void 0:x.borderColor)==null?void 0:k.value)||"#e5e5e5",bindMode:((P=x==null?void 0:x.bindMode)==null?void 0:P.value)||"channel",linkChannel:S}}),i=o.computed(()=>r.value.bindId||t.uid||""),a=o.computed(()=>{var x;return((x=t.conf)==null?void 0:x.data)||[]}),s=o.ref({}),l=[{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],c=o.computed(()=>({backgroundColor:r.value.bgColor,color:r.value.textColor,borderColor:r.value.borderColor})),u=()=>{s.value={},a.value.forEach((x,_)=>{var w,S,C;if(s.value[_]={},x.type==="timeRange"){s.value[_]={granularity:"day",quickRange:"week",startDate:"",endDate:""};const E=mt();s.value[_].endDate=E.format(x.dateFormat||"YYYY-MM-DD HH:mm:ss"),s.value[_].startDate=E.subtract(7,"day").format(x.dateFormat||"YYYY-MM-DD HH:mm:ss")}else if(x.type==="selectList")s.value[_]={selectedValues:x.multiple?[]:"",selectedValue:x.multiple?void 0:((S=(w=x.options)==null?void 0:w[0])==null?void 0:S.value)||"",selectAll:!1},x.multiple&&x.options&&(s.value[_].selectedValues=x.options.map(E=>E.value),s.value[_].selectAll=!0);else if(x.type==="switch"){const E={};(C=x.options)==null||C.forEach(T=>{E[T.value]=T.defaultValue!==!1}),s.value[_]=E}else x.type==="range"&&(s.value[_]={min:"",max:""})})},d=()=>{const x={};return a.value.forEach((_,w)=>{if(_.key&&s.value[w]){const S=s.value[w];_.type==="timeRange"?x[_.key]={granularity:S.granularity,startDate:S.startDate,endDate:S.endDate,quickRange:S.quickRange}:_.type==="selectList"?x[_.key]=_.multiple?S.selectedValues:S.selectedValue:_.type==="switch"?x[_.key]=Ne({},S):_.type==="range"&&(x[_.key]={min:S.min===""?null:parseFloat(S.min),max:S.max===""?null:parseFloat(S.max)})}}),x},f=()=>{const x=d(),_=i.value,w=r.value.bindMode,S=r.value.linkChannel;_&&(console.log("[UniversalConfigPanel] 广播配置:",{id:_,bindMode:w,linkChannel:S,config:x}),w==="channel"?e.publish(S,"universalConfigPanel",{objectId:_,type:"config",fv:x}):a.value.forEach(C=>{if(!C.targetIds)return;C.targetIds.split(",").map(T=>T.trim()).filter(Boolean).forEach(T=>{e.publish(S,"universalConfigPanel",{objectId:T,type:"bindConfig",fv:tt(Ne({},x),{[C.key]:x[C.key]})})})}))},h=(x,_)=>{s.value[x]&&(s.value[x].granularity=_,m())},p=(x,_)=>{if(!s.value[x])return;const w=a.value[x],S=mt(),C=w.dateFormat||"YYYY-MM-DD HH:mm:ss";s.value[x].quickRange=_,s.value[x].endDate=S.format(C),_==="week"?s.value[x].startDate=S.subtract(7,"day").format(C):_==="month"?s.value[x].startDate=S.subtract(30,"day").format(C):_==="quarter"&&(s.value[x].startDate=S.subtract(90,"day").format(C)),m()},m=x=>{f()},v=x=>{var w;const _=a.value[x];!_.multiple||!s.value[x]||(s.value[x].selectAll?s.value[x].selectedValues=((w=_.options)==null?void 0:w.map(S=>S.value))||[]:s.value[x].selectedValues=[],m())},g=x=>{s.value[x]&&(s.value[x].selectedValues=[],s.value[x].selectAll=!1,m())},y=x=>{var w;const _=a.value[x];_.multiple&&s.value[x]&&(s.value[x].selectAll=s.value[x].selectedValues.length===(((w=_.options)==null?void 0:w.length)||0)),m()},b=x=>{var S;const _=a.value[x],w=d();r.value.bindMode==="channel"?e.publish(r.value.linkChannel,"universalConfigPanel",{objectId:i.value,type:"action",action:_.key,fv:w}):(((S=_.targetIds)==null?void 0:S.split(",").map(E=>E.trim()).filter(Boolean))||[]).forEach(E=>{e.publish(r.value.linkChannel,"universalConfigPanel",{objectId:E,type:"action",action:_.key,fv:w})})};return o.watch(a,()=>{u(),setTimeout(f,300)},{immediate:!1,deep:!0,flush:"sync"}),o.onMounted(()=>{u(),setTimeout(f,300)}),(x,_)=>{const w=Se.ElDatePicker,S=Se.ElCheckbox,C=Se.ElIcon,E=Se.ElButton,T=Se.ElCheckboxGroup,A=Se.ElRadio,M=Se.ElRadioGroup,D=Se.ElInput;return o.openBlock(),o.createElementBlock("div",{class:"universal-config-panel",style:o.normalizeStyle(c.value)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.value,(k,P)=>{var I,N;return o.openBlock(),o.createElementBlock(o.Fragment,{key:P},[k.type==="timeRange"?(o.openBlock(),o.createElementBlock("div",H0t,[o.createElementVNode("div",j0t,[o.createElementVNode("span",G0t,o.toDisplayString(k.label||"时间段"),1),k.showGranularity&&s.value[P]?(o.openBlock(),o.createElementBlock("div",Y0t,[o.createElementVNode("span",{class:o.normalizeClass(["switch-item",{active:((I=s.value[P])==null?void 0:I.granularity)==="day"}]),onClick:R=>h(P,"day")}," 日均 ",10,W0t),o.createElementVNode("span",{class:o.normalizeClass(["switch-item",{active:((N=s.value[P])==null?void 0:N.granularity)==="hour"}]),onClick:R=>h(P,"hour")}," 小时 ",10,X0t)])):o.createCommentVNode("",!0)]),k.showQuickRange&&s.value[P]?(o.openBlock(),o.createElementBlock("div",Z0t,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(l,R=>{var V;return o.createElementVNode("span",{key:R.value,class:o.normalizeClass(["range-item",{active:((V=s.value[P])==null?void 0:V.quickRange)===R.value}]),onClick:B=>p(P,R.value)},o.toDisplayString(R.label),11,q0t)}),64))])):o.createCommentVNode("",!0),s.value[P]?(o.openBlock(),o.createElementBlock("div",K0t,[o.createVNode(w,{modelValue:s.value[P].startDate,"onUpdate:modelValue":R=>s.value[P].startDate=R,type:k.dateType||"datetime",placeholder:"开始时间",format:k.dateFormat||"YYYY-MM-DD HH:mm:ss","value-format":k.dateFormat||"YYYY-MM-DD HH:mm:ss",size:"small",class:"date-picker",onChange:R=>m()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"]),o.createVNode(w,{modelValue:s.value[P].endDate,"onUpdate:modelValue":R=>s.value[P].endDate=R,type:k.dateType||"datetime",placeholder:"结束时间",format:k.dateFormat||"YYYY-MM-DD HH:mm:ss","value-format":k.dateFormat||"YYYY-MM-DD HH:mm:ss",size:"small",class:"date-picker",onChange:R=>m()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"])])):o.createCommentVNode("",!0)])):k.type==="selectList"&&s.value[P]?(o.openBlock(),o.createElementBlock("div",J0t,[o.createElementVNode("div",Q0t,[o.createElementVNode("span",$0t,o.toDisplayString(k.label||"选择列表"),1)]),k.multiple?(o.openBlock(),o.createElementBlock("div",eft,[o.createVNode(S,{modelValue:s.value[P].selectAll,"onUpdate:modelValue":R=>s.value[P].selectAll=R,onChange:R=>v(P)},{default:o.withCtx(()=>[..._[0]||(_[0]=[o.createTextVNode("全选",-1)])]),_:1},8,["modelValue","onUpdate:modelValue","onChange"]),o.createVNode(E,{size:"small",text:"",onClick:R=>g(P)},{default:o.withCtx(()=>[o.createVNode(C,null,{default:o.withCtx(()=>[o.createVNode(o.unref(qt.Delete))]),_:1}),_[1]||(_[1]=o.createTextVNode("清空 ",-1))]),_:1},8,["onClick"]),o.createElementVNode("span",tft,[_[2]||(_[2]=o.createTextVNode("已选 ",-1)),o.createElementVNode("em",null,o.toDisplayString(s.value[P].selectedValues&&s.value[P].selectedValues.length||0),1),_[3]||(_[3]=o.createTextVNode(" 项",-1))])])):o.createCommentVNode("",!0),o.createElementVNode("div",nft,[k.multiple?(o.openBlock(),o.createBlock(T,{key:0,modelValue:s.value[P].selectedValues,"onUpdate:modelValue":R=>s.value[P].selectedValues=R,onChange:R=>y(P)},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(k.options,R=>(o.openBlock(),o.createBlock(S,{key:R.value,value:R.value,class:"list-checkbox"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(R.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])):(o.openBlock(),o.createBlock(M,{key:1,modelValue:s.value[P].selectedValue,"onUpdate:modelValue":R=>s.value[P].selectedValue=R,onChange:R=>y(P)},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(k.options,R=>(o.openBlock(),o.createBlock(A,{key:R.value,value:R.value,class:"list-radio"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(R.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))])])):k.type==="switch"&&s.value[P]?(o.openBlock(),o.createElementBlock("div",rft,[o.createElementVNode("div",ift,[o.createElementVNode("span",aft,o.toDisplayString(k.label||"开关"),1)]),o.createElementVNode("div",oft,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(k.options,R=>(o.openBlock(),o.createBlock(S,{key:R.value,modelValue:s.value[P][R.value],"onUpdate:modelValue":V=>s.value[P][R.value]=V,onChange:V=>m()},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(R.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))),128))])])):k.type==="range"&&s.value[P]?(o.openBlock(),o.createElementBlock("div",sft,[o.createElementVNode("div",lft,[o.createElementVNode("span",cft,o.toDisplayString(k.label||"范围设置"),1)]),o.createElementVNode("div",uft,[o.createVNode(D,{modelValue:s.value[P].min,"onUpdate:modelValue":R=>s.value[P].min=R,size:"small",placeholder:k.minPlaceholder||"最小值",class:"range-input",onChange:R=>m()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),_[4]||(_[4]=o.createElementVNode("span",{class:"range-sep"},"~",-1)),o.createVNode(D,{modelValue:s.value[P].max,"onUpdate:modelValue":R=>s.value[P].max=R,size:"small",placeholder:k.maxPlaceholder||"最大值",class:"range-input",onChange:R=>m()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),k.unit?(o.openBlock(),o.createElementBlock("span",dft,o.toDisplayString(k.unit),1)):o.createCommentVNode("",!0)])])):k.type==="button"?(o.openBlock(),o.createElementBlock("div",fft,[o.createVNode(E,{size:"small",onClick:R=>b(P),class:"action-btn",type:k.buttonType||"primary"},{default:o.withCtx(()=>[k.icon?(o.openBlock(),o.createBlock(C,{key:0},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(k.icon)))]),_:2},1024)):o.createCommentVNode("",!0),o.createTextVNode(" "+o.toDisplayString(k.label||"执行操作"),1)]),_:2},1032,["onClick","type"])])):o.createCommentVNode("",!0)],64)}),128)),o.renderSlot(x.$slots,"default",{},void 0,!0)],4)}}})),_ft=Dt(xft,[["__scopeId","data-v-60e3fc69"]]),Sft=Object.freeze(Object.defineProperty({__proto__:null,default:_ft},Symbol.toStringTag,{value:"Module"})),wft="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='18px'%20viewBox='0%200%2017%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e天气%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-807.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M817.945888,102.796609%20C819.683477,102.796609%20821.092089,104.205221%20821.092089,105.94281%20C821.092089,106.628082%20820.872999,107.262185%20820.501044,107.778896%20C822.196583,108.244456%20823.44069,109.818548%20823.44069,111.684342%20C823.44069,113.306186%20822.492183,114.753742%20821.051831,115.394536%20C820.713416,115.545093%20820.317026,115.392803%20820.16647,115.054388%20C820.015913,114.715973%20820.168202,114.319583%20820.506617,114.169026%20C821.464713,113.742782%20822.099373,112.774201%20822.099373,111.684342%20C822.099373,110.1861%20820.911369,108.976414%20819.451995,108.976414%20C819.031723,108.976414%20818.626762,109.07618%20818.260607,109.265341%20C817.879726,109.46211%20817.414554,109.255909%20817.304572,108.841551%20C816.799872,106.94008%20815.102249,105.597863%20813.147731,105.597863%20C810.772103,105.597863%20808.841317,107.563868%20808.841317,109.995048%20C808.841317,111.399401%20809.489548,112.691456%20810.568916,113.516983%20C810.863125,113.742002%20810.919215,114.162919%20810.694196,114.457127%20C810.469178,114.751336%20810.048261,114.807426%20809.754052,114.582408%20C808.345227,113.504903%20807.5,111.820195%20807.5,109.995048%20C807.5,106.828451%20810.025832,104.256546%20813.147731,104.256546%20C813.829302,104.256546%20814.486533,104.3802%20815.096693,104.608218%20C815.601039,103.529357%20816.696718,102.796609%20817.945888,102.796609%20Z%20M813.280439,107.176421%20C814.048868,107.176421%20814.770636,107.481714%20815.303171,108.014297%20C815.565067,108.276218%20815.565048,108.700855%20815.303127,108.962752%20C815.041206,109.224648%20814.616569,109.224629%20814.354672,108.962708%20C814.071197,108.679207%20813.689455,108.517738%20813.280439,108.517738%20C812.441385,108.517738%20811.761192,109.197931%20811.761192,110.036985%20C811.761192,110.446001%20811.922661,110.827743%20812.206162,111.111218%20C812.468083,111.373115%20812.468102,111.797752%20812.206206,112.059673%20C811.944309,112.321594%20811.519672,112.321613%20811.257751,112.059717%20C810.725168,111.527182%20810.419875,110.805414%20810.419875,110.036985%20C810.419875,108.457142%20811.700596,107.176421%20813.280439,107.176421%20Z%20M817.945888,104.137926%20C817.210393,104.137926%20816.567249,104.581189%20816.288327,105.226532%20C817.155696,105.815582%20817.856037,106.643608%20818.294581,107.628501%20L818.3271,107.70736%20C819.140827,107.532395%20819.750772,106.808824%20819.750772,105.94281%20C819.750772,104.94601%20818.942688,104.137926%20817.945888,104.137926%20Z%20M822.770031,105.657173%20C823.173193,105.657173%20823.5,105.98398%20823.5,106.387142%20C823.5,106.790304%20823.173193,107.117111%20822.770031,107.117111%20C822.36687,107.117111%20822.040063,106.790304%20822.040063,106.387142%20C822.040063,105.98398%20822.36687,105.657173%20822.770031,105.657173%20Z%20M822.040063,102.372314%20C822.443224,102.372314%20822.770031,102.699132%20822.770031,103.102283%20C822.770031,103.505445%20822.443224,103.832252%20822.040063,103.832252%20C821.636901,103.832252%20821.310094,103.505445%20821.310094,103.102283%20C821.310094,102.699132%20821.636901,102.372314%20822.040063,102.372314%20Z%20M814.740376,101.642346%20C815.143538,101.642346%20815.470345,101.969164%20815.470345,102.372314%20C815.470345,102.775465%20815.143538,103.102283%20814.740376,103.102283%20C814.337215,103.102283%20814.010408,102.775465%20814.010408,102.372314%20C814.010408,101.969164%20814.337215,101.642346%20814.740376,101.642346%20Z%20M818.755204,100.547393%20C819.158366,100.547393%20819.485173,100.874211%20819.485173,101.277361%20C819.485173,101.680512%20819.158366,102.00733%20818.755204,102.00733%20C818.352042,102.00733%20818.025235,101.680512%20818.025235,101.277361%20C818.025235,100.874211%20818.352042,100.547393%20818.755204,100.547393%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Cft="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='18px'%20viewBox='0%200%2017%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e天气%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-807.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M817.945888,102.796609%20C819.683477,102.796609%20821.092089,104.205221%20821.092089,105.94281%20C821.092089,106.628082%20820.872999,107.262185%20820.501044,107.778896%20C822.196583,108.244456%20823.44069,109.818548%20823.44069,111.684342%20C823.44069,113.306186%20822.492183,114.753742%20821.051831,115.394536%20C820.713416,115.545093%20820.317026,115.392803%20820.16647,115.054388%20C820.015913,114.715973%20820.168202,114.319583%20820.506617,114.169026%20C821.464713,113.742782%20822.099373,112.774201%20822.099373,111.684342%20C822.099373,110.1861%20820.911369,108.976414%20819.451995,108.976414%20C819.031723,108.976414%20818.626762,109.07618%20818.260607,109.265341%20C817.879726,109.46211%20817.414554,109.255909%20817.304572,108.841551%20C816.799872,106.94008%20815.102249,105.597863%20813.147731,105.597863%20C810.772103,105.597863%20808.841317,107.563868%20808.841317,109.995048%20C808.841317,111.399401%20809.489548,112.691456%20810.568916,113.516983%20C810.863125,113.742002%20810.919215,114.162919%20810.694196,114.457127%20C810.469178,114.751336%20810.048261,114.807426%20809.754052,114.582408%20C808.345227,113.504903%20807.5,111.820195%20807.5,109.995048%20C807.5,106.828451%20810.025832,104.256546%20813.147731,104.256546%20C813.829302,104.256546%20814.486533,104.3802%20815.096693,104.608218%20C815.601039,103.529357%20816.696718,102.796609%20817.945888,102.796609%20Z%20M813.280439,107.176421%20C814.048868,107.176421%20814.770636,107.481714%20815.303171,108.014297%20C815.565067,108.276218%20815.565048,108.700855%20815.303127,108.962752%20C815.041206,109.224648%20814.616569,109.224629%20814.354672,108.962708%20C814.071197,108.679207%20813.689455,108.517738%20813.280439,108.517738%20C812.441385,108.517738%20811.761192,109.197931%20811.761192,110.036985%20C811.761192,110.446001%20811.922661,110.827743%20812.206162,111.111218%20C812.468083,111.373115%20812.468102,111.797752%20812.206206,112.059673%20C811.944309,112.321594%20811.519672,112.321613%20811.257751,112.059717%20C810.725168,111.527182%20810.419875,110.805414%20810.419875,110.036985%20C810.419875,108.457142%20811.700596,107.176421%20813.280439,107.176421%20Z%20M817.945888,104.137926%20C817.210393,104.137926%20816.567249,104.581189%20816.288327,105.226532%20C817.155696,105.815582%20817.856037,106.643608%20818.294581,107.628501%20L818.3271,107.70736%20C819.140827,107.532395%20819.750772,106.808824%20819.750772,105.94281%20C819.750772,104.94601%20818.942688,104.137926%20817.945888,104.137926%20Z%20M822.770031,105.657173%20C823.173193,105.657173%20823.5,105.98398%20823.5,106.387142%20C823.5,106.790304%20823.173193,107.117111%20822.770031,107.117111%20C822.36687,107.117111%20822.040063,106.790304%20822.040063,106.387142%20C822.040063,105.98398%20822.36687,105.657173%20822.770031,105.657173%20Z%20M822.040063,102.372314%20C822.443224,102.372314%20822.770031,102.699132%20822.770031,103.102283%20C822.770031,103.505445%20822.443224,103.832252%20822.040063,103.832252%20C821.636901,103.832252%20821.310094,103.505445%20821.310094,103.102283%20C821.310094,102.699132%20821.636901,102.372314%20822.040063,102.372314%20Z%20M814.740376,101.642346%20C815.143538,101.642346%20815.470345,101.969164%20815.470345,102.372314%20C815.470345,102.775465%20815.143538,103.102283%20814.740376,103.102283%20C814.337215,103.102283%20814.010408,102.775465%20814.010408,102.372314%20C814.010408,101.969164%20814.337215,101.642346%20814.740376,101.642346%20Z%20M818.755204,100.547393%20C819.158366,100.547393%20819.485173,100.874211%20819.485173,101.277361%20C819.485173,101.680512%20819.158366,102.00733%20818.755204,102.00733%20C818.352042,102.00733%20818.025235,101.680512%20818.025235,101.277361%20C818.025235,100.874211%20818.352042,100.547393%20818.755204,100.547393%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Eft={class:"mix-component"},Aft=["src"],Tft={DEFAULT_ICON:wft,ACTIVE_ICON:Cft,NAME_CN:"天气",NAME_EN:"Weather",ORDER:4,PLATFORM:["pc","screen","mobile"]},Mft={transparent:{value:!1,type:"checkbox",label:"component.options.transparent"},bgColor:"#fff",textColor:{value:"#00B0F0",type:"color",label:"component.options.textColor",hideAlpha:!0},radiusSize:8,bgImg:{value:"",type:"image",label:"component.customized.bgImg"}},Dft={DEFAULT:Tft,OPTIONS:Mft,COMMON:{}},Lft=o.defineComponent(tt(Ne({},Dft),{__name:"weather",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){const e=n;class t extends Cn{extractStyles(){const{options:c}=this.props.conf,u=(d,f)=>d==null?f:typeof d=="object"&&"value"in d?d.value:d;return{bgColor:u(c==null?void 0:c.bgColor,"#fff"),textColor:u(c==null?void 0:c.textColor,"#00B0F0"),radiusSize:u(c==null?void 0:c.radiusSize,8),bgImg:u(c==null?void 0:c.bgImg,""),transparent:u(c==null?void 0:c.transparent,!1)}}}const r=new t(e,"weather");r.setupLifecycle();const i=r.getStyle(),a=l=>l?l.startsWith(Ao)||l.startsWith("http")?l:Ao+l:"",s=o.computed(()=>{var l,c;return((c=(l=i.value)==null?void 0:l.textColor)==null?void 0:c.replace("#",""))||"00B0F0"});return(l,c)=>(o.openBlock(),o.createElementBlock("div",Eft,[o.createElementVNode("div",{class:"weather-wrap",style:o.normalizeStyle({backgroundColor:o.unref(i).transparent?"transparent":o.unref(i).bgColor,borderRadius:`${o.unref(i).radiusSize}px`,backgroundImage:o.unref(i).bgImg?`url(${a(o.unref(i).bgImg)})`:""})},[o.createElementVNode("iframe",{width:"200",scrolling:"no",height:"60",frameborder:"0",allowtransparency:"true",src:`https://i.tianqi.com?c=code&id=12&color=%23${s.value}&icon=1&num=1&site=15&align=center`},null,8,Aft)],4),o.renderSlot(l.$slots,"default",{},void 0,!0)]))}})),Nft=Dt(Lft,[["__scopeId","data-v-dfc24c16"]]),Oft=Object.freeze(Object.defineProperty({__proto__:null,default:Nft},Symbol.toStringTag,{value:"Module"}));function Ph(n={}){let e=null;try{e=vh().t}catch(r){e=null}return{t:(r,...i)=>{var a;if(e)try{const s=e(r,...i);if(s&&s!==r)return String(s)}catch(s){}return(a=n[r])!=null?a:r}}}var D1=ld.CMD;function ov(n,e){return Math.abs(n-e)<1e-5}function bk(n){var e=n.data,t=n.len(),r=[],i,a=0,s=0,l=0,c=0;function u(k,P){i&&i.length>2&&r.push(i),i=[k,P]}function d(k,P,I,N){ov(k,I)&&ov(P,N)||i.push(k,P,I,N,I,N)}function f(k,P,I,N,R,V){var B=Math.abs(P-k),F=Math.tan(B/4)*4/3,G=P<k?-1:1,U=Math.cos(k),z=Math.sin(k),j=Math.cos(P),W=Math.sin(P),Y=U*R+I,re=z*V+N,Q=j*R+I,$=W*V+N,ee=R*F*G,X=V*F*G;i.push(Y-ee*z,re+X*U,Q+ee*W,$-X*j,Q,$)}for(var h,p,m,v,g=0;g<t;){var y=e[g++],b=g===1;switch(b&&(a=e[g],s=e[g+1],l=a,c=s,(y===D1.L||y===D1.C||y===D1.Q)&&(i=[l,c])),y){case D1.M:a=l=e[g++],s=c=e[g++],u(l,c);break;case D1.L:h=e[g++],p=e[g++],d(a,s,h,p),a=h,s=p;break;case D1.C:i.push(e[g++],e[g++],e[g++],e[g++],a=e[g++],s=e[g++]);break;case D1.Q:h=e[g++],p=e[g++],m=e[g++],v=e[g++],i.push(a+2/3*(h-a),s+2/3*(p-s),m+2/3*(h-m),v+2/3*(p-v),m,v),a=m,s=v;break;case D1.A:var x=e[g++],_=e[g++],w=e[g++],S=e[g++],C=e[g++],E=e[g++]+C;g+=1;var T=!e[g++];h=Math.cos(C)*w+x,p=Math.sin(C)*S+_,b?(l=h,c=p,u(l,c)):d(a,s,h,p),a=Math.cos(E)*w+x,s=Math.sin(E)*S+_;for(var A=(T?-1:1)*Math.PI/2,M=C;T?M>E:M<E;M+=A){var D=T?Math.max(M+A,E):Math.min(M+A,E);f(M,D,x,_,w,S)}break;case D1.R:l=a=e[g++],c=s=e[g++],h=l+e[g++],p=c+e[g++],u(h,c),d(h,c,h,p),d(h,p,l,p),d(l,p,l,c),d(l,c,h,c);break;case D1.Z:i&&d(a,s,l,c),a=l,s=c;break}}return i&&i.length>2&&r.push(i),r}function xk(n,e,t,r,i,a,s,l,c,u){if(ov(n,t)&&ov(e,r)&&ov(i,s)&&ov(a,l)){c.push(s,l);return}var d=2/u,f=d*d,h=s-n,p=l-e,m=Math.sqrt(h*h+p*p);h/=m,p/=m;var v=t-n,g=r-e,y=i-s,b=a-l,x=v*v+g*g,_=y*y+b*b;if(x<f&&_<f){c.push(s,l);return}var w=h*v+p*g,S=-h*y-p*b,C=x-w*w,E=_-S*S;if(C<f&&w>=0&&E<f&&S>=0){c.push(s,l);return}var T=[],A=[];th(n,t,i,s,.5,T),th(e,r,a,l,.5,A),xk(T[0],A[0],T[1],A[1],T[2],A[2],T[3],A[3],c,u),xk(T[4],A[4],T[5],A[5],T[6],A[6],T[7],A[7],c,u)}function Pft(n,e){var t=bk(n),r=[];e=e||1;for(var i=0;i<t.length;i++){var a=t[i],s=[],l=a[0],c=a[1];s.push(l,c);for(var u=2;u<a.length;){var d=a[u++],f=a[u++],h=a[u++],p=a[u++],m=a[u++],v=a[u++];xk(l,c,d,f,h,p,m,v,s,e),l=m,c=v}r.push(s)}return r}function v0e(n,e,t){var r=n[e],i=n[1-e],a=Math.abs(r/i),s=Math.ceil(Math.sqrt(a*t)),l=Math.floor(t/s);l===0&&(l=1,s=t);for(var c=[],u=0;u<s;u++)c.push(l);var d=s*l,f=t-d;if(f>0)for(var u=0;u<f;u++)c[u%s]+=1;return c}function yQ(n,e,t){for(var r=n.r0,i=n.r,a=n.startAngle,s=n.endAngle,l=Math.abs(s-a),c=l*i,u=i-r,d=c>Math.abs(u),f=v0e([c,u],d?0:1,e),h=(d?l:u)/f.length,p=0;p<f.length;p++)for(var m=(d?u:l)/f[p],v=0;v<f[p];v++){var g={};d?(g.startAngle=a+h*p,g.endAngle=a+h*(p+1),g.r0=r+m*v,g.r=r+m*(v+1)):(g.startAngle=a+m*v,g.endAngle=a+m*(v+1),g.r0=r+h*p,g.r=r+h*(p+1)),g.clockwise=n.clockwise,g.cx=n.cx,g.cy=n.cy,t.push(g)}}function kft(n,e,t){for(var r=n.width,i=n.height,a=r>i,s=v0e([r,i],a?0:1,e),l=a?"width":"height",c=a?"height":"width",u=a?"x":"y",d=a?"y":"x",f=n[l]/s.length,h=0;h<s.length;h++)for(var p=n[c]/s[h],m=0;m<s[h];m++){var v={};v[u]=h*f,v[d]=m*p,v[l]=f,v[c]=p,v.x+=n.x,v.y+=n.y,t.push(v)}}function bQ(n,e,t,r){return n*r-t*e}function Ift(n,e,t,r,i,a,s,l){var c=t-n,u=r-e,d=s-i,f=l-a,h=bQ(d,f,c,u);if(Math.abs(h)<1e-6)return null;var p=n-i,m=e-a,v=bQ(p,m,d,f)/h;return v<0||v>1?null:new _r(v*c+n,v*u+e)}function Rft(n,e,t){var r=new _r;_r.sub(r,t,e),r.normalize();var i=new _r;_r.sub(i,n,e);var a=i.dot(r);return a}function bm(n,e){var t=n[n.length-1];t&&t[0]===e[0]&&t[1]===e[1]||n.push(e)}function Vft(n,e,t){for(var r=n.length,i=[],a=0;a<r;a++){var s=n[a],l=n[(a+1)%r],c=Ift(s[0],s[1],l[0],l[1],e.x,e.y,t.x,t.y);c&&i.push({projPt:Rft(c,e,t),pt:c,idx:a})}if(i.length<2)return[{points:n},{points:n}];i.sort(function(g,y){return g.projPt-y.projPt});var u=i[0],d=i[i.length-1];if(d.idx<u.idx){var f=u;u=d,d=f}for(var h=[u.pt.x,u.pt.y],p=[d.pt.x,d.pt.y],m=[h],v=[p],a=u.idx+1;a<=d.idx;a++)bm(m,n[a].slice());bm(m,p),bm(m,h);for(var a=d.idx+1;a<=u.idx+r;a++)bm(v,n[a%r].slice());return bm(v,h),bm(v,p),[{points:m},{points:v}]}function xQ(n){var e=n.points,t=[],r=[];Kw(e,t,r);var i=new xr(t[0],t[1],r[0]-t[0],r[1]-t[1]),a=i.width,s=i.height,l=i.x,c=i.y,u=new _r,d=new _r;return a>s?(u.x=d.x=l+a/2,u.y=c,d.y=c+s):(u.y=d.y=c+s/2,u.x=l,d.x=l+a),Vft(e,u,d)}function KS(n,e,t,r){if(t===1)r.push(e);else{var i=Math.floor(t/2),a=n(e);KS(n,a[0],i,r),KS(n,a[1],t-i,r)}return r}function Bft(n,e){for(var t=[],r=0;r<e;r++)t.push(vR(n));return t}function Fft(n,e){e.setStyle(n.style),e.z=n.z,e.z2=n.z2,e.zlevel=n.zlevel}function zft(n){for(var e=[],t=0;t<n.length;)e.push([n[t++],n[t++]]);return e}function Uft(n,e){var t=[],r=n.shape,i;switch(n.type){case"rect":kft(r,e,t),i=Yr;break;case"sector":yQ(r,e,t),i=Ws;break;case"circle":yQ({r0:0,r:r.r,startAngle:0,endAngle:Math.PI*2,cx:r.cx,cy:r.cy},e,t),i=Ws;break;default:var a=n.getComputedTransform(),s=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,l=rn(Pft(n.getUpdatedPathProxy(),s),function(y){return zft(y)}),c=l.length;if(c===0)KS(xQ,{points:l[0]},e,t);else if(c===e)for(var u=0;u<c;u++)t.push({points:l[u]});else{var d=0,f=rn(l,function(y){var b=[],x=[];Kw(y,b,x);var _=(x[1]-b[1])*(x[0]-b[0]);return d+=_,{poly:y,area:_}});f.sort(function(y,b){return b.area-y.area});for(var h=e,u=0;u<c;u++){var p=f[u];if(h<=0)break;var m=u===c-1?h:Math.ceil(p.area/d*e);m<0||(KS(xQ,{points:p.poly},m,t),h-=m)}}i=Xs;break}if(!i)return Bft(n,e);for(var v=[],u=0;u<t.length;u++){var g=new i;g.setShape(t[u]),Fft(n,g),v.push(g)}return v}function Hft(n,e){var t=n.length,r=e.length;if(t===r)return[n,e];for(var i=[],a=[],s=t<r?n:e,l=Math.min(t,r),c=Math.abs(r-t)/6,u=(l-2)/6,d=Math.ceil(c/u)+1,f=[s[0],s[1]],h=c,p=2;p<l;){var m=s[p-2],v=s[p-1],g=s[p++],y=s[p++],b=s[p++],x=s[p++],_=s[p++],w=s[p++];if(h<=0){f.push(g,y,b,x,_,w);continue}for(var S=Math.min(h,d-1)+1,C=1;C<=S;C++){var E=C/S;th(m,g,b,_,E,i),th(v,y,x,w,E,a),m=i[3],v=a[3],f.push(i[1],a[1],i[2],a[2],m,v),g=i[5],y=a[5],b=i[6],x=a[6]}h-=S-1}return s===n?[f,e]:[n,f]}function _Q(n,e){for(var t=n.length,r=n[t-2],i=n[t-1],a=[],s=0;s<e.length;)a[s++]=r,a[s++]=i;return a}function jft(n,e){for(var t,r,i,a=[],s=[],l=0;l<Math.max(n.length,e.length);l++){var c=n[l],u=e[l],d=void 0,f=void 0;c?u?(t=Hft(c,u),d=t[0],f=t[1],r=d,i=f):(f=_Q(i||c,c),d=c):(d=_Q(r||u,u),f=u),a.push(d),s.push(f)}return[a,s]}function SQ(n){for(var e=0,t=0,r=0,i=n.length,a=0,s=i-2;a<i;s=a,a+=2){var l=n[s],c=n[s+1],u=n[a],d=n[a+1],f=l*d-u*c;e+=f,t+=(l+u)*f,r+=(c+d)*f}return e===0?[n[0]||0,n[1]||0]:[t/e/3,r/e/3,e]}function Gft(n,e,t,r){for(var i=(n.length-2)/6,a=1/0,s=0,l=n.length,c=l-2,u=0;u<i;u++){for(var d=u*6,f=0,h=0;h<l;h+=2){var p=h===0?d:(d+h-2)%c+2,m=n[p]-t[0],v=n[p+1]-t[1],g=e[h]-r[0],y=e[h+1]-r[1],b=g-m,x=y-v;f+=b*b+x*x}f<a&&(a=f,s=u)}return s}function Yft(n){for(var e=[],t=n.length,r=0;r<t;r+=2)e[r]=n[t-r-2],e[r+1]=n[t-r-1];return e}function Wft(n,e,t,r){for(var i=[],a,s=0;s<n.length;s++){var l=n[s],c=e[s],u=SQ(l),d=SQ(c);a==null&&(a=u[2]<0!=d[2]<0);var f=[],h=[],p=0,m=1/0,v=[],g=l.length;a&&(l=Yft(l));for(var y=Gft(l,c,u,d)*6,b=g-2,x=0;x<b;x+=2){var _=(y+x)%b+2;f[x+2]=l[_]-u[0],f[x+3]=l[_+1]-u[1]}f[0]=l[y]-u[0],f[1]=l[y+1]-u[1];for(var w=r/t,S=-r/2;S<=r/2;S+=w){for(var C=Math.sin(S),E=Math.cos(S),T=0,x=0;x<l.length;x+=2){var A=f[x],M=f[x+1],D=c[x]-d[0],k=c[x+1]-d[1],P=D*E-k*C,I=D*C+k*E;v[x]=P,v[x+1]=I;var N=P-A,R=I-M;T+=N*N+R*R}if(T<m){m=T,p=S;for(var V=0;V<v.length;V++)h[V]=v[V]}}i.push({from:f,to:h,fromCp:u,toCp:d,rotation:-p})}return i}function JS(n){return n.__isCombineMorphing}var g0e="__mOriginal_";function QS(n,e,t){var r=g0e+e,i=n[r]||n[e];n[r]||(n[r]=n[e]);var a=t.replace,s=t.after,l=t.before;n[e]=function(){var c=arguments,u;return l&&l.apply(this,c),a?u=a.apply(this,c):u=i.apply(this,c),s&&s.apply(this,c),u}}function M9(n,e){var t=g0e+e;n[t]&&(n[e]=n[t],n[t]=null)}function wQ(n,e){for(var t=0;t<n.length;t++)for(var r=n[t],i=0;i<r.length;){var a=r[i],s=r[i+1];r[i++]=e[0]*a+e[2]*s+e[4],r[i++]=e[1]*a+e[3]*s+e[5]}}function y0e(n,e){var t=n.getUpdatedPathProxy(),r=e.getUpdatedPathProxy(),i=jft(bk(t),bk(r)),a=i[0],s=i[1],l=n.getComputedTransform(),c=e.getComputedTransform();function u(){this.transform=null}l&&wQ(a,l),c&&wQ(s,c),QS(e,"updateTransform",{replace:u}),e.transform=null;var d=Wft(a,s,10,Math.PI),f=[];QS(e,"buildPath",{replace:function(h){for(var p=e.__morphT,m=1-p,v=[],g=0;g<d.length;g++){var y=d[g],b=y.from,x=y.to,_=y.rotation*p,w=y.fromCp,S=y.toCp,C=Math.sin(_),E=Math.cos(_);s9(v,w,S,p);for(var T=0;T<b.length;T+=2){var A=b[T],M=b[T+1],D=x[T],k=x[T+1],P=A*m+D*p,I=M*m+k*p;f[T]=P*E-I*C+v[0],f[T+1]=P*C+I*E+v[1]}var N=f[0],R=f[1];h.moveTo(N,R);for(var T=2;T<b.length;){var D=f[T++],k=f[T++],V=f[T++],B=f[T++],F=f[T++],G=f[T++];N===D&&R===k&&V===F&&B===G?h.lineTo(F,G):h.bezierCurveTo(D,k,V,B,F,G),N=F,R=G}}}})}function vF(n,e,t){if(!n||!e)return e;var r=t.done,i=t.during;y0e(n,e),e.__morphT=0;function a(){M9(e,"buildPath"),M9(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},Wn({during:function(s){e.dirtyShape(),i&&i(s)},done:function(){a(),r&&r()}},t)),e}function Xft(n,e,t,r,i,a){var s=16;n=i===t?0:Math.round(32767*(n-t)/(i-t)),e=a===r?0:Math.round(32767*(e-r)/(a-r));for(var l=0,c,u=(1<<s)/2;u>0;u/=2){var d=0,f=0;(n&u)>0&&(d=1),(e&u)>0&&(f=1),l+=u*u*(3*d^f),f===0&&(d===1&&(n=u-1-n,e=u-1-e),c=n,n=e,e=c)}return l}function $S(n){var e=1/0,t=1/0,r=-1/0,i=-1/0,a=rn(n,function(l){var c=l.getBoundingRect(),u=l.getComputedTransform(),d=c.x+c.width/2+(u?u[4]:0),f=c.y+c.height/2+(u?u[5]:0);return e=Math.min(d,e),t=Math.min(f,t),r=Math.max(d,r),i=Math.max(f,i),[d,f]}),s=rn(a,function(l,c){return{cp:l,z:Xft(l[0],l[1],e,t,r,i),path:n[c]}});return s.sort(function(l,c){return l.z-c.z}).map(function(l){return l.path})}function b0e(n){return Uft(n.path,n.count)}function _k(){return{fromIndividuals:[],toIndividuals:[],count:0}}function Zft(n,e,t){var r=[];function i(w){for(var S=0;S<w.length;S++){var C=w[S];JS(C)?i(C.childrenRef()):C instanceof Pr&&r.push(C)}}i(n);var a=r.length;if(!a)return _k();var s=t.dividePath||b0e,l=s({path:e,count:a});if(l.length!==a)return console.error("Invalid morphing: unmatched splitted path"),_k();r=$S(r),l=$S(l);for(var c=t.done,u=t.during,d=t.individualDelay,f=new t0,h=0;h<a;h++){var p=r[h],m=l[h];m.parent=e,m.copyTransform(f),d||y0e(p,m)}e.__isCombineMorphing=!0,e.childrenRef=function(){return l};function v(w){for(var S=0;S<l.length;S++)l[S].addSelfToZr(w)}QS(e,"addSelfToZr",{after:function(w){v(w)}}),QS(e,"removeSelfFromZr",{after:function(w){for(var S=0;S<l.length;S++)l[S].removeSelfFromZr(w)}});function g(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,M9(e,"addSelfToZr"),M9(e,"removeSelfFromZr")}var y=l.length;if(d)for(var b=y,x=function(){b--,b===0&&(g(),c&&c())},h=0;h<y;h++){var _=d?Wn({delay:(t.delay||0)+d(h,y,r[h],l[h]),done:x},t):t;vF(r[h],l[h],_)}else e.__morphT=0,e.animateTo({__morphT:1},Wn({during:function(w){for(var S=0;S<y;S++){var C=l[S];C.__morphT=e.__morphT,C.dirtyShape()}u&&u(w)},done:function(){g();for(var w=0;w<n.length;w++)M9(n[w],"updateTransform");c&&c()}},t));return e.__zr&&v(e.__zr),{fromIndividuals:r,toIndividuals:l,count:y}}function qft(n,e,t){var r=e.length,i=[],a=t.dividePath||b0e;function s(p){for(var m=0;m<p.length;m++){var v=p[m];JS(v)?s(v.childrenRef()):v instanceof Pr&&i.push(v)}}if(JS(n)){s(n.childrenRef());var l=i.length;if(l<r)for(var c=0,u=l;u<r;u++)i.push(vR(i[c++%l]));i.length=r}else{i=a({path:n,count:r});for(var d=n.getComputedTransform(),u=0;u<i.length;u++)i[u].setLocalTransform(d);if(i.length!==r)return console.error("Invalid morphing: unmatched splitted path"),_k()}i=$S(i),e=$S(e);for(var f=t.individualDelay,u=0;u<r;u++){var h=f?Wn({delay:(t.delay||0)+f(u,r,i[u],e[u])},t):t;vF(i[u],e[u],h)}return{fromIndividuals:i,toIndividuals:e,count:e.length}}function CQ(n){return Qt(n[0])}function EQ(n,e){for(var t=[],r=n.length,i=0;i<r;i++)t.push({one:n[i],many:[]});for(var i=0;i<e.length;i++){var a=e[i].length,s=void 0;for(s=0;s<a;s++)t[s%r].many.push(e[i][s])}for(var l=0,i=r-1;i>=0;i--)if(!t[i].many.length){var c=t[l].many;if(c.length<=1)if(l)l=0;else return t;var a=c.length,u=Math.ceil(a/2);t[i].many=c.slice(u,a),t[l].many=c.slice(0,u),l++}return t}var Kft={clone:function(n){for(var e=[],t=1-Math.pow(1-n.path.style.opacity,1/n.count),r=0;r<n.count;r++){var i=vR(n.path);i.setStyle("opacity",t),e.push(i)}return e},split:null};function BD(n,e,t,r,i,a){if(!n.length||!e.length)return;var s=Dg("update",r,i);if(!(s&&s.duration>0))return;var l=r.getModel("universalTransition").get("delay"),c=Object.assign({setToFinal:!0},s),u,d;CQ(n)&&(u=n,d=e),CQ(e)&&(u=e,d=n);function f(y,b,x,_,w){var S=y.many,C=y.one;if(S.length===1&&!w){var E=b?S[0]:C,T=b?C:S[0];if(JS(E))f({many:[E],one:T},!0,x,_,!0);else{var A=l?Wn({delay:l(x,_)},c):c;vF(E,T,A),a(E,T,E,T,A)}}else for(var M=Wn({dividePath:Kft[t],individualDelay:l&&function(R,V,B,F){return l(R+x,_)}},c),D=b?Zft(S,C,M):qft(C,S,M),k=D.fromIndividuals,P=D.toIndividuals,I=k.length,N=0;N<I;N++){var A=l?Wn({delay:l(N,I)},c):c;a(k[N],P[N],b?S[N]:y.one,b?y.one:S[N],A)}}for(var h=u?u===n:n.length>e.length,p=u?EQ(d,u):EQ(h?e:n,[h?n:e]),m=0,v=0;v<p.length;v++)m+=p[v].many.length;for(var g=0,v=0;v<p.length;v++)f(p[v],h,g,m),g+=p[v].many.length}function X2(n){if(!n)return[];if(Qt(n)){for(var e=[],t=0;t<n.length;t++)e.push(X2(n[t]));return e}var r=[];return n.traverse(function(i){i instanceof Pr&&!i.disableMorphing&&!i.invisible&&!i.ignore&&r.push(i)}),r}var x0e=1e4,Jft=0,AQ=1,TQ=2,Qft=Jr();function $ft(n,e){for(var t=n.dimensions,r=0;r<t.length;r++){var i=n.getDimensionInfo(t[r]);if(i&&i.otherDims[e]===0)return t[r]}}function eht(n,e,t){var r=n.getDimensionInfo(t),i=r&&r.ordinalMeta;if(r){var a=n.get(r.name,e);return i&&i.categories[a]||a+""}}function MQ(n,e,t,r){var i=r?"itemChildGroupId":"itemGroupId",a=$ft(n,i);if(a){var s=eht(n,e,a);return s}var l=n.getRawDataItem(e),c=r?"childGroupId":"groupId";if(l&&l[c])return l[c]+"";if(!r)return t||n.getId(e)}function DQ(n){var e=[];return Te(n,function(t){var r=t.data,i=t.dataGroupId;if(r.count()>x0e){process.env.NODE_ENV!=="production"&&Sa("Universal transition is disabled on large data > 10k.");return}for(var a=r.getIndices(),s=0;s<a.length;s++)e.push({data:r,groupId:MQ(r,s,i,!1),childGroupId:MQ(r,s,i,!0),divide:t.divide,dataIndex:s})}),e}function FD(n,e,t){n.traverse(function(r){r instanceof Pr&&la(r,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function zD(n){if(n.parent){var e=n.getComputedTransform();n.setLocalTransform(e),n.parent.remove(n)}}function xm(n){n.stopAnimation(),n.isGroup&&n.traverse(function(e){e.stopAnimation()})}function tht(n,e,t){var r=Dg("update",t,e);r&&n.traverse(function(i){if(i instanceof fu){var a=$7e(i);a&&i.animateFrom({style:a},r)}})}function nht(n,e){var t=n.length;if(t!==e.length)return!1;for(var r=0;r<t;r++){var i=n[r],a=e[r];if(i.data.getId(i.dataIndex)!==a.data.getId(a.dataIndex))return!1}return!0}function _0e(n,e,t){var r=DQ(n),i=DQ(e);function a(x,_,w,S,C){(w||x)&&_.animateFrom({style:w&&w!==x?Jt(Jt({},w.style),x.style):x.style},C)}var s=!1,l=Jft,c=Yn(),u=Yn();r.forEach(function(x){x.groupId&&c.set(x.groupId,!0),x.childGroupId&&u.set(x.childGroupId,!0)});for(var d=0;d<i.length;d++){var f=i[d].groupId;if(u.get(f)){l=AQ;break}var h=i[d].childGroupId;if(h&&c.get(h)){l=TQ;break}}function p(x,_){return function(w){var S=w.data,C=w.dataIndex;return _?S.getId(C):x?l===AQ?w.childGroupId:w.groupId:l===TQ?w.childGroupId:w.groupId}}var m=nht(r,i),v={};if(!m)for(var d=0;d<i.length;d++){var g=i[d],y=g.data.getItemGraphicEl(g.dataIndex);y&&(v[y.id]=!0)}function b(x,_){var w=r[_],S=i[x],C=S.data.hostModel,E=w.data.getItemGraphicEl(w.dataIndex),T=S.data.getItemGraphicEl(S.dataIndex);if(E===T){T&&tht(T,S.dataIndex,C);return}E&&v[E.id]||T&&(xm(T),E?(xm(E),zD(E),s=!0,BD(X2(E),X2(T),S.divide,C,x,a)):FD(T,C,x))}new g0(r,i,p(!0,m),p(!1,m),null,"multiple").update(b).updateManyToOne(function(x,_){var w=i[x],S=w.data,C=S.hostModel,E=S.getItemGraphicEl(w.dataIndex),T=ui(rn(_,function(A){return r[A].data.getItemGraphicEl(r[A].dataIndex)}),function(A){return A&&A!==E&&!v[A.id]});E&&(xm(E),T.length?(Te(T,function(A){xm(A),zD(A)}),s=!0,BD(X2(T),X2(E),w.divide,C,x,a)):FD(E,C,w.dataIndex))}).updateOneToMany(function(x,_){var w=r[_],S=w.data.getItemGraphicEl(w.dataIndex);if(!(S&&v[S.id])){var C=ui(rn(x,function(T){return i[T].data.getItemGraphicEl(i[T].dataIndex)}),function(T){return T&&T!==S}),E=i[x[0]].data.hostModel;C.length&&(Te(C,function(T){return xm(T)}),S?(xm(S),zD(S),s=!0,BD(X2(S),X2(C),w.divide,E,x[0],a)):Te(C,function(T){return FD(T,E,x[0])}))}}).updateManyToMany(function(x,_){new g0(_,x,function(w){return r[w].data.getId(r[w].dataIndex)},function(w){return i[w].data.getId(i[w].dataIndex)}).update(function(w,S){b(x[w],_[S])}).execute()}).execute(),s&&Te(e,function(x){var _=x.data,w=_.hostModel,S=w&&t.getViewOfSeriesModel(w),C=Dg("update",w,0);S&&w.isAnimationEnabled()&&C&&C.duration>0&&S.group.traverse(function(E){E instanceof Pr&&!E.animators.length&&E.animateFrom({style:{opacity:0}},C)})})}function LQ(n){var e=n.getModel("universalTransition").get("seriesKey");return e||n.id}function NQ(n){return Qt(n)?n.sort().join(","):n}function vf(n){if(n.hostModel)return n.hostModel.getModel("universalTransition").get("divideShape")}function rht(n,e){var t=Yn(),r=Yn(),i=Yn();Te(n.oldSeries,function(s,l){var c=n.oldDataGroupIds[l],u=n.oldData[l],d=LQ(s),f=NQ(d);r.set(f,{dataGroupId:c,data:u}),Qt(d)&&Te(d,function(h){i.set(h,{key:f,dataGroupId:c,data:u})})});function a(s){t.get(s)&&Sa("Duplicated seriesKey in universalTransition "+s)}return Te(e.updatedSeries,function(s){if(s.isUniversalTransitionEnabled()&&s.isAnimationEnabled()){var l=s.get("dataGroupId"),c=s.getData(),u=LQ(s),d=NQ(u),f=r.get(d);if(f)process.env.NODE_ENV!=="production"&&a(d),t.set(d,{oldSeries:[{dataGroupId:f.dataGroupId,divide:vf(f.data),data:f.data}],newSeries:[{dataGroupId:l,divide:vf(c),data:c}]});else if(Qt(u)){process.env.NODE_ENV!=="production"&&a(d);var h=[];Te(u,function(v){var g=r.get(v);g.data&&h.push({dataGroupId:g.dataGroupId,divide:vf(g.data),data:g.data})}),h.length&&t.set(d,{oldSeries:h,newSeries:[{dataGroupId:l,data:c,divide:vf(c)}]})}else{var p=i.get(u);if(p){var m=t.get(p.key);m||(m={oldSeries:[{dataGroupId:p.dataGroupId,data:p.data,divide:vf(p.data)}],newSeries:[]},t.set(p.key,m)),m.newSeries.push({dataGroupId:l,data:c,divide:vf(c)})}}}}),t}function OQ(n,e){for(var t=0;t<n.length;t++){var r=e.seriesIndex!=null&&e.seriesIndex===n[t].seriesIndex||e.seriesId!=null&&e.seriesId===n[t].id;if(r)return t}}function iht(n,e,t,r){var i=[],a=[];Te(Ri(n.from),function(s){var l=OQ(e.oldSeries,s);l>=0&&i.push({dataGroupId:e.oldDataGroupIds[l],data:e.oldData[l],divide:vf(e.oldData[l]),groupIdDim:s.dimension})}),Te(Ri(n.to),function(s){var l=OQ(t.updatedSeries,s);if(l>=0){var c=t.updatedSeries[l].getData();a.push({dataGroupId:e.oldDataGroupIds[l],data:c,divide:vf(c),groupIdDim:s.dimension})}}),i.length>0&&a.length>0&&_0e(i,a,r)}function qC(n){n.registerUpdateLifecycle("series:beforeupdate",function(e,t,r){Te(Ri(r.seriesTransition),function(i){Te(Ri(i.to),function(a){for(var s=r.updatedSeries,l=0;l<s.length;l++)(a.seriesIndex!=null&&a.seriesIndex===s[l].seriesIndex||a.seriesId!=null&&a.seriesId===s[l].id)&&(s[l][kx]=!0)})})}),n.registerUpdateLifecycle("series:transition",function(e,t,r){var i=Qft(t);if(i.oldSeries&&r.updatedSeries&&r.optionChanged){var a=r.seriesTransition;if(a)Te(Ri(a),function(p){iht(p,i,r,t)});else{var s=rht(i,r);Te(s.keys(),function(p){var m=s.get(p);_0e(m.oldSeries,m.newSeries,t)})}Te(r.updatedSeries,function(p){p[kx]&&(p[kx]=!1)})}for(var l=e.getSeries(),c=i.oldSeries=[],u=i.oldDataGroupIds=[],d=i.oldData=[],f=0;f<l.length;f++){var h=l[f].getData();h.count()<x0e&&(c.push(l[f]),u.push(l[f].get("dataGroupId")),d.push(h))}})}Ln([zi]);Ln([hBe]);Ln([Al,Hg,LC,qV,KV,EPe,$Pe,Oke,Kke,aB,uIe,xIe,Mce,tRe,Pce,kce,DRe,Bce,WRe,QRe,lVe,Kce]);Ln(Va);Ln(aTe);Ln(TV);Ln(rMe);Ln(tle);Ln(YMe);Ln(ule);Ln(gle);Ln(Zi);Ln(C6);Ln(Ele);Ln(Do);Ln(YLe);Ln($Le);Ln(DC);Ln(Nle);Ln(Ba);Ln(Mh);Ln(Rle);Ln(Vle);Ln(Dh);Ln(Hle);Ln(jle);Ln(lOe);Ln(_Oe);Ln(Yle);Ln(qC);Ln(Hoe);const aht={class:"chart-header"},oht={class:"chart-title"},sht={class:"chart-actions"},lht=["id"],cht={DEFAULT_ICON:Cu,ACTIVE_ICON:Eu,NAME_CN:"裂缝演变图",NAME_EN:"EvolutionChart",ORDER:2,PLATFORM:["pc","screen"]},uht={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},titleSize:{value:14,type:"number",label:"component.options.titleSize"},showLegend:{value:!0,type:"switch",label:"component.options.showLegend"},showDataZoom:{value:!0,type:"switch",label:"component.crack.showDataZoom"},lineWidth:{value:3,type:"number",label:"component.options.lineWidth"},showArea:{value:!0,type:"switch",label:"component.line.showArea"},linkChannel:{value:"crack",type:"select",label:"component.linkChannel",options:[{label:"裂缝监测",value:"crack"},{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"深部位移",value:"deepDisplacement"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},dht=[{name:"宽度累计变化量",fv:"",fvDeviceName:"",object_id:""}],fht=["name","fv","fvDeviceName","object_id"],hht=["mosaic","statistics","calculate"],pht={useAlias:!1,multiObject:!0,source:"mosaic"},mht=50,vht={DEFAULT:cht,OPTIONS:uht,DATA:dht,PARAMS:fht,SOURCE:hht,ITEMS:mht,COMMON:pht},ght=o.defineComponent(tt(Ne({},vht),{__name:"evolutionChart",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(n){const{t:e}=Ph({"component.crack.evolutionChart":"裂缝演变图","component.crack.exportImage":"导出图像","component.crack.widthCumulativeChangeUnit":"宽度累计变化量(mm)"}),t=n,r=o.ref(new Map),i=o.ref(new Map),a=o.ref([]);let s=0;class l extends Mr{constructor(){super(...arguments),this.deviceColors=["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4"],this.yAxisLabel="",this.currentObjectId=""}getCurrentObjectId(){return this.currentObjectId}setCurrentObjectId(x){this.currentObjectId=x}extractStyles(){const x=this.getOptionValue("linkChannel","crack"),_=this.getOptionValue("customChannel","");return tt(Ne({},super.extractStyles()),{showLegend:this.getOptionValue("showLegend",!0),showDataZoom:this.getOptionValue("showDataZoom",!0),lineWidth:this.getOptionValue("lineWidth",3),showArea:this.getOptionValue("showArea",!0),linkChannel:x==="custom"&&_?_:x})}setYAxisLabel(x){this.yAxisLabel=x}needsHistoryData(){return!1}onPreview(){return Ve(this,null,function*(){const{common:x,data:_}=this.props.conf,w=[];if(x.multiObject&&Array.isArray(_)){const S=new Set;for(const C of _){const E=yield this.resolveObjectId(C);!E||S.has(E)||(S.add(E),w.push(E))}}else{const S=yield this.resolveObjectId();S&&(this.currentObjectId=S,w.push(S))}w.length>0&&p({payload:{type:"filter",objectIds:w}})})}onLinkEvent(x){p(x)}getChartOption(){const{data:x,common:_}=this.props.conf,w=this.Style.value,S=a.value,C=S.length>1;let E;if(this.props.mode==="edit"){E=[];for(let M=30;M>=0;M--)E.push(mt().subtract(M,"day").format("MM-DD"))}else{const M=new Set;if(C)for(const D of S)x.forEach(k=>{const P=`${D}-${k.name||k.fv||"default"}`;(r.value.get(P)||[]).forEach(N=>M.add(N.time))});else x.forEach(D=>{const k=_.multiObject?this.resolveObjectId(D):this.currentObjectId||this.resolveObjectId();if(!k)return;const P=`${k}-${D.name||D.fv||"default"}`;(r.value.get(P)||[]).forEach(N=>M.add(N.time))});E=Array.from(M).sort()}const T=[];let A=0;if(C&&this.props.mode!=="edit")for(const M of S){const D=i.value.get(M)||M.slice(-6);for(const k of x){const P=this.deviceColors[A%this.deviceColors.length],I=`${M}-${k.name||k.fv||"default"}`,N=`${D}-${k.name||k.fv||"default"}`;T.push({name:N,type:"line",smooth:!0,showSymbol:!0,symbol:"circle",symbolSize:6,connectNulls:!0,lineStyle:{color:P,width:w.lineWidth},itemStyle:{color:P},areaStyle:w.showArea?{color:new xo(0,0,0,1,[{offset:0,color:`${P}4D`},{offset:1,color:`${P}0D`}])}:void 0,data:this.getEvolutionData(I,E)}),A++}}else x.filter(M=>(_.multiObject?this.resolveObjectId(M):this.currentObjectId||this.resolveObjectId())||this.props.mode==="edit").forEach((M,D)=>{const k=this.deviceColors[D%this.deviceColors.length],P=_.multiObject?this.resolveObjectId(M):this.currentObjectId||this.resolveObjectId(),I=`${P}-${M.name||M.fv||"default"}`,N=M.name||M.fv||"default",R=P&&i.value.get(P)||"",V=R?`${R}-${N}`:N;T.push({name:V,type:"line",smooth:!0,showSymbol:!0,symbol:"circle",symbolSize:6,connectNulls:!0,lineStyle:{color:k,width:w.lineWidth},itemStyle:{color:k},areaStyle:w.showArea?{color:new xo(0,0,0,1,[{offset:0,color:`${k}4D`},{offset:1,color:`${k}0D`}])}:void 0,data:this.getEvolutionData(I,E)})});return{tooltip:{trigger:"axis",axisPointer:{type:"cross"},formatter:M=>{let D=`<div style="font-weight: bold;">${M[0].axisValue}</div>`;return M.forEach(k=>{var P;D+=`<div>${k.marker} ${k.seriesName}: ${(P=k.value)!=null?P:"--"} mm</div>`}),D}},legend:{show:w.showLegend,type:"scroll",top:10,textStyle:{color:w.textColor}},grid:{top:60,left:60,right:40,bottom:w.showDataZoom?80:40},xAxis:{type:"category",data:E,axisLabel:{interval:"auto",rotate:15,fontSize:10,color:w.textColor}},yAxis:{type:"value",name:this.yAxisLabel||"宽度累计变化量(mm)",nameTextStyle:{color:w.textColor},axisLabel:{color:w.textColor},splitLine:{lineStyle:{type:"dashed",opacity:.5}}},dataZoom:w.showDataZoom?[{type:"inside"},{type:"slider",bottom:10,height:15}]:[],series:T}}generateTimeLabels(){return[]}getEvolutionData(x,_){if(this.props.mode==="edit"){const S=[];for(let T=30;T>=0;T--)S.push(mt().subtract(T,"day").format("MM-DD"));const C=.1,E=.02+Math.random()*.03;return Array.from({length:S.length},(T,A)=>{const M=C+E*A;return parseFloat(M.toFixed(2))})}return(r.value.get(x)||[]).map(S=>S.value)}setSocketData(x){if(!x)return;const _=x.object_id||x.objectId||"";if(_&&a.value.length>0&&!a.value.includes(_))return;super.setSocketData(x);const{data:w,common:S}=this.props.conf,C=mt().format("MM-DD HH:mm:ss"),E=a.value.length>1;w.forEach((A,M)=>{const D=E&&_?_:S.multiObject?this.resolveObjectId(A):this.currentObjectId||this.resolveObjectId();if(!D)return;if(A.fvDeviceName){const P=this.extractDataValue(x,A.fvDeviceName);P?i.value.set(D,String(P)):x.data&&x.data[A.fvDeviceName]&&i.value.set(D,String(x.data[A.fvDeviceName]))}let k=A.value;if((!k||k==="--")&&(k=this.extractDataValue(x,A.fv)),k!=null&&k!=="--"){const P=`${D}-${A.name||A.fv||"default"}`,I=r.value.get(P)||[],N=typeof k=="number"?k:parseFloat(k);if(isNaN(N))return;I.push({time:C,value:N}),I.length>200&&I.shift(),r.value.set(P,I)}});const T=this.getChartInstance();T&&T.setOption(this.getChartOption())}}const c=new l(t,"evolutionChart");c.setYAxisLabel(e("component.crack.widthCumulativeChangeUnit")),c.setupLifecycle();const u=c.getStyle(),d=c.getEchartId();let f=null,h=!1;const p=b=>Ve(null,null,function*(){var k;const{payload:x}=b;if(!x)return;x.dateRange&&Array.isArray(x.dateRange)&&x.dateRange.length===2&&(f={start_time:x.dateRange[0],end_time:x.dateRange[1]});const _=x.objectIds&&x.objectIds.length>0?x.objectIds:x.objectId||x.object_id?[x.objectId||x.object_id]:[];if(!_.length||t.mode!=="preview")return;h=!0;const w=++s;a.value=_,c.setCurrentObjectId([..._].sort().join(",")),r.value.clear(),i.value.clear();const S=(k=c.session)==null?void 0:k.value;if(!S){h=!1;return}const C=t.conf.id;S.componentRequests&&S.componentRequests.delete(C),typeof S.unsubscribeComponent=="function"&&S.unsubscribeComponent(C);const{data:E,common:T}=t.conf;f&&(T.historyTimeRange=f),t.conf.options||(t.conf.options={});const A=t.conf.options.points,M=Object.prototype.hasOwnProperty.call(t.conf.options,"points");(!A||Number(A)<24)&&(t.conf.options.points=24);for(const P of _){if(s!==w){h=!1;return}Array.isArray(E)&&E.forEach(N=>{N.object_id=P}),T.multiObject||(T.object_id=P);try{const N=yield Promise.resolve().then(()=>pd),V=yield new N.default().getHistoryData(t,"evolutionChart");if(s!==w){h=!1;return}const B=(V==null?void 0:V.history)||(Array.isArray(V)?V:[]);B.length>0&&E.forEach((F,G)=>{if(!F.fv)return;const U=`${P}-${F.name||F.fv||"default"}`,z=B[G];if(!Array.isArray(z)){r.value.set(U,[]);return}const j=[...z].sort((Y,re)=>new Date(Y.time||Y.datetime||"").getTime()-new Date(re.time||re.datetime||"").getTime()),W=[];j.forEach(Y=>{const re=Y.time||Y.datetime,Q=Y[F.fv];if(re&&Q!=null){const $=parseFloat(Q);isNaN($)||W.push({time:mt(re).format("MM-DD HH:mm:ss"),value:$})}F.fvDeviceName&&Y[F.fvDeviceName]&&i.value.set(P,String(Y[F.fvDeviceName]))}),r.value.set(U,W)})}catch(N){console.warn("[裂缝演变图] 历史数据获取失败:",N)}if(s!==w){h=!1;return}const I=c.getSource();c.subscribeBySource(I,P),E&&Array.isArray(E)&&E.forEach(N=>{const R=`${P}-${N.name||N.fv||"default"}`;r.value.has(R)||r.value.set(R,[])})}if(M?t.conf.options.points=A:delete t.conf.options.points,h=!1,s!==w)return;const D=c.getChartInstance();D&&D.setOption(c.getChartOption(),!0),S.registerComponent({id:C,request:null,onUpdate:(P,I)=>{s===w&&P==="realtime"&&c.setSocketData(I)}})}),m=o.computed(()=>({background:u.value.bgColor,color:u.value.textColor})),v=o.computed(()=>e("component.crack.evolutionChart")),g=o.computed(()=>e("component.crack.exportImage"));o.watch(()=>e("component.crack.widthCumulativeChangeUnit"),b=>{c.setYAxisLabel(b),c.init()});const y=()=>{const b=c.getChartInstance();if(!b)return;const x=document.createElement("a");x.href=b.getDataURL({type:"png",pixelRatio:2,backgroundColor:"#fff"}),x.download=`${e("component.crack.evolutionChart")}_${mt().format("YYYYMMDDHHmmss")}.png`,x.click()};return(b,x)=>{const _=Se.ElButton;return o.openBlock(),o.createElementBlock("div",{class:"mix-component crack-evolution",style:o.normalizeStyle(m.value)},[o.createElementVNode("div",aht,[o.createElementVNode("span",oht,"📊 "+o.toDisplayString(v.value),1),o.createElementVNode("div",sht,[o.createVNode(_,{size:"small",onClick:y},{default:o.withCtx(()=>[o.createTextVNode("💾 "+o.toDisplayString(g.value),1)]),_:1})])]),o.createElementVNode("div",{id:o.unref(d),class:"chart-container"},null,8,lht),o.renderSlot(b.$slots,"default",{},void 0,!0)],4)}}})),yht=Dt(ght,[["__scopeId","data-v-da6b39e5"]]),bht=Object.freeze(Object.defineProperty({__proto__:null,default:yht},Symbol.toStringTag,{value:"Module"})),xht={class:"filter-left-group"},_ht={class:"filter-item"},Sht={class:"filter-item"},wht=["onClick"],Cht={class:"item-label"},Eht={key:0,class:"item-region"},Aht={key:0,class:"monitor-dropdown-empty"},Tht={class:"filter-item time-range"},Mht={DEFAULT_ICON:Cu,ACTIVE_ICON:Eu,NAME_CN:"筛选条件栏",NAME_EN:"FilterBar",ORDER:4,PLATFORM:["pc","screen"]},Dht={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},borderColor:{value:"#e8ecef",type:"color",label:"边框颜色"},padding:{value:15,type:"number",label:"component.options.padding"},defaultQuickTime:{value:"today",type:"select",label:"默认快捷时间",options:[{label:"一天内",value:"today"},{label:"一周内",value:"week"},{label:"一个月内",value:"month"},{label:"一年内",value:"year"},{label:"无",value:""}]},linkChannel:{value:"crack",type:"select",label:"component.linkChannel",options:[{label:"裂缝监测",value:"crack"},{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"深部位移",value:"deepDisplacement"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},Lht=[{name:"CRACK4",fv:"",object_id:"",region:"中央区"},{name:"CRACK15",fv:"",object_id:"",region:"北帮"},{name:"CRACK26",fv:"",object_id:"",region:"南帮"},{name:"CRACK37",fv:"",object_id:"",region:"西帮"},{name:"CRACK48",fv:"",object_id:"",region:"东帮"}],Nht=["name","fv","object_id","region"],Oht=[],Pht={useAlias:!1,multiObject:!0,source:"mosaic"},kht=50,Iht={DEFAULT:Mht,OPTIONS:Dht,DATA:Lht,PARAMS:Nht,SOURCE:Oht,ITEMS:kht,COMMON:Pht},Rht=o.defineComponent(tt(Ne({},Iht),{__name:"filterBar",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(n){const e=n,t=o.ref(""),r=o.ref([]),i=o.ref(""),a=o.ref(""),s=o.ref("today"),l=o.ref(!1),c=o.ref(null),u=o.ref(null),d=o.ref({}),f=o.computed(()=>{const N=e.conf.data;return!N||!Array.isArray(N)?[]:N.filter(R=>R.name)}),h=o.computed(()=>{const N=new Set;return f.value.forEach(R=>{R.region&&N.add(R.region)}),Array.from(N)}),p=o.computed(()=>t.value?f.value.filter(N=>N.region===t.value):f.value),m=o.computed(()=>r.value.length===0?"":r.value.join("、")),v=o.computed(()=>{const N=p.value;return N.length>0&&N.every(R=>r.value.includes(R.name))}),g=o.computed(()=>{const N=p.value,R=N.filter(V=>r.value.includes(V.name)).length;return R>0&&R<N.length});class y extends Cn{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#ffffff"),textColor:this.getOptionValue("textColor","#333333"),borderColor:this.getOptionValue("borderColor","#e8ecef"),padding:this.getOptionValue("padding",15),linkChannel:this.getOptionValue("linkChannel","crack"),defaultQuickTime:this.getOptionValue("defaultQuickTime","today")}}init(){this.Style.value=this.extractStyles(),this.applyTheme();const R=this.Style.value.defaultQuickTime||"today";s.value=R,M(R),this.props.mode==="preview"&&f.value.length>0&&r.value.length===0&&(r.value=[f.value[0].name],P())}setSocketData(R){}}const b=new y(e,"filterBar");b.setupLifecycle();const x=b.getStyle(),_=o.computed(()=>({background:x.value.bgColor,color:x.value.textColor,padding:`${x.value.padding}px 25px`,borderBottom:`1px solid ${x.value.borderColor}`})),w=()=>{l.value=!l.value,l.value&&S()};function S(){if(!c.value)return;const N=c.value.getBoundingClientRect();d.value={position:"fixed",top:`${N.bottom+4}px`,left:`${N.left}px`,zIndex:"9999"}}const C=N=>{const R=c.value,V=u.value;R&&!R.contains(N.target)&&V&&!V.contains(N.target)&&(l.value=!1)};o.onMounted(()=>{document.addEventListener("click",C)}),o.onBeforeUnmount(()=>{document.removeEventListener("click",C)});const E=()=>{const N=p.value;if(v.value){const R=N.map(V=>V.name);r.value=r.value.filter(V=>!R.includes(V))}else{const R=new Set(r.value);N.forEach(V=>R.add(V.name)),r.value=Array.from(R)}},T=N=>{const R=r.value.indexOf(N.name);R>-1?r.value.splice(R,1):r.value.push(N.name)},A=()=>{};function M(N){const R=mt();switch(a.value=R.format("YYYY/MM/DD HH:mm"),N){case"today":i.value=R.subtract(1,"day").format("YYYY/MM/DD HH:mm");break;case"week":i.value=R.subtract(7,"day").format("YYYY/MM/DD HH:mm");break;case"month":i.value=R.subtract(1,"month").format("YYYY/MM/DD HH:mm");break;case"year":i.value=R.subtract(1,"year").format("YYYY/MM/DD HH:mm");break}}const D=N=>{s.value=N,M(N)},k=()=>{s.value=""},P=()=>{if(e.mode!=="preview")return;const N=f.value.filter(V=>r.value.includes(V.name)),R=[...new Set(N.map(V=>V.object_id).filter(Boolean))];b.publish({type:"filter",region:t.value,selectedMonitors:r.value,objectId:R.length===1?R[0]:R[0]||"",objectIds:R,timeRange:s.value||"custom",dateRange:[i.value,a.value]})},I=()=>{P()};return(N,R)=>{const V=Se.ElOption,B=Se.ElSelect,F=Se.ElIcon,G=Se.ElInput,U=Se.ElCheckbox,z=Se.ElButton,j=Se.ElDatePicker;return o.openBlock(),o.createElementBlock("div",{class:"mix-component crack-filter-bar",style:o.normalizeStyle(_.value)},[o.createElementVNode("div",xht,[o.createElementVNode("div",_ht,[R[8]||(R[8]=o.createElementVNode("span",{class:"filter-label"},"区域位置:",-1)),o.createVNode(B,{modelValue:t.value,"onUpdate:modelValue":R[0]||(R[0]=W=>t.value=W),placeholder:"全部区域",size:"default",style:{width:"120px"},onChange:A},{default:o.withCtx(()=>[o.createVNode(V,{label:"全部区域",value:""}),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(h.value,W=>(o.openBlock(),o.createBlock(V,{key:W,label:W,value:W},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),o.createElementVNode("div",Sht,[R[10]||(R[10]=o.createElementVNode("span",{class:"filter-label"},"监测点:",-1)),o.createElementVNode("div",{class:"monitor-select-wrapper",ref_key:"monitorWrapperRef",ref:c},[o.createVNode(G,{modelValue:m.value,"onUpdate:modelValue":R[1]||(R[1]=W=>m.value=W),placeholder:"输入编号(如11)或选择",size:"default",style:{width:"180px"},readonly:"",onClick:w,onFocus:w},{suffix:o.withCtx(()=>[o.createVNode(F,{class:o.normalizeClass(["dropdown-arrow",{"is-open":l.value}])},{default:o.withCtx(()=>[o.createVNode(o.unref(qt.ArrowDown))]),_:1},8,["class"])]),_:1},8,["modelValue"]),(o.openBlock(),o.createBlock(o.Teleport,{to:"body"},[o.withDirectives(o.createElementVNode("div",{class:"monitor-dropdown",style:o.normalizeStyle(d.value),ref_key:"dropdownRef",ref:u},[o.createElementVNode("div",{class:"monitor-dropdown-item",onClick:o.withModifiers(E,["stop"])},[o.createVNode(U,{"model-value":v.value,indeterminate:g.value,onChange:E},null,8,["model-value","indeterminate"]),R[9]||(R[9]=o.createElementVNode("span",{class:"item-label",style:{"font-weight":"bold"}},"全选",-1))]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(p.value,W=>(o.openBlock(),o.createElementBlock("div",{key:W.name,class:"monitor-dropdown-item",onClick:o.withModifiers(Y=>T(W),["stop"])},[o.createVNode(U,{"model-value":r.value.includes(W.name),onChange:Y=>T(W)},null,8,["model-value","onChange"]),o.createElementVNode("span",Cht,[o.createTextVNode(o.toDisplayString(W.name)+" ",1),W.region?(o.openBlock(),o.createElementBlock("span",Eht,"("+o.toDisplayString(W.region)+")",1)):o.createCommentVNode("",!0)])],8,wht))),128)),p.value.length===0?(o.openBlock(),o.createElementBlock("div",Aht," 暂无监测点,请在右侧数据面板配置 ")):o.createCommentVNode("",!0)],4),[[o.vShow,l.value]])]))],512)]),o.createVNode(z,{type:s.value==="today"?"primary":"default",size:"default",onClick:R[2]||(R[2]=W=>D("today"))},{default:o.withCtx(()=>[...R[11]||(R[11]=[o.createTextVNode("一天内",-1)])]),_:1},8,["type"]),o.createVNode(z,{type:s.value==="week"?"primary":"default",size:"default",onClick:R[3]||(R[3]=W=>D("week"))},{default:o.withCtx(()=>[...R[12]||(R[12]=[o.createTextVNode("一周内",-1)])]),_:1},8,["type"]),o.createVNode(z,{type:s.value==="month"?"primary":"default",size:"default",onClick:R[4]||(R[4]=W=>D("month"))},{default:o.withCtx(()=>[...R[13]||(R[13]=[o.createTextVNode("一个月内",-1)])]),_:1},8,["type"]),o.createVNode(z,{type:s.value==="year"?"primary":"default",size:"default",onClick:R[5]||(R[5]=W=>D("year"))},{default:o.withCtx(()=>[...R[14]||(R[14]=[o.createTextVNode("一年内",-1)])]),_:1},8,["type"]),o.createElementVNode("div",Tht,[R[15]||(R[15]=o.createElementVNode("span",{class:"filter-label"},"时间范围:",-1)),o.createVNode(j,{modelValue:i.value,"onUpdate:modelValue":R[6]||(R[6]=W=>i.value=W),type:"datetime",placeholder:"开始时间",size:"default",format:"YYYY/MM/DD HH:mm","value-format":"YYYY/MM/DD HH:mm",style:{width:"175px"},onChange:k},null,8,["modelValue"]),R[16]||(R[16]=o.createElementVNode("span",{class:"time-separator"},"至",-1)),o.createVNode(j,{modelValue:a.value,"onUpdate:modelValue":R[7]||(R[7]=W=>a.value=W),type:"datetime",placeholder:"结束时间",size:"default",format:"YYYY/MM/DD HH:mm","value-format":"YYYY/MM/DD HH:mm",style:{width:"175px"},onChange:k},null,8,["modelValue"])]),o.createVNode(z,{type:"primary",size:"default",onClick:I},{default:o.withCtx(()=>[...R[17]||(R[17]=[o.createTextVNode("查询",-1)])]),_:1})]),o.renderSlot(N.$slots,"default",{},void 0,!0)],4)}}})),Vht=Dt(Rht,[["__scopeId","data-v-476c8b69"]]),Bht=Object.freeze(Object.defineProperty({__proto__:null,default:Vht},Symbol.toStringTag,{value:"Module"})),Fht=["id"],zht={key:0,class:"timeline-player"},Uht={key:0},Hht={key:1},jht=["onClick"],Ght={class:"timeline-labels"},Yht={DEFAULT_ICON:Cu,ACTIVE_ICON:Eu,NAME_CN:"实时裂缝演变分布图",NAME_EN:"RealtimeEvolutionMap",ORDER:3,PLATFORM:["pc","screen"]},Wht={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},minPointSize:{value:6,type:"number",label:"最小散点大小",min:2,max:20},maxPointSize:{value:24,type:"number",label:"最大散点大小",min:10,max:60},baseColor:{value:"#ee6666",type:"color",label:"散点颜色"},playInterval:{value:2e3,type:"number",label:"播放间隔(ms)",min:500,max:1e4},linkChannel:{value:"crack",type:"select",label:"component.linkChannel",options:[{label:"裂缝监测",value:"crack"},{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},Xht=[{name:"裂缝写实1",fvX:"",fvY:"",fvWidth:"",fvDeviceName:"",object_id:""}],Zht=["name","fvX","fvY","fvWidth","fvDeviceName","object_id"],qht=["mosaic","statistics","calculate"],Kht={useAlias:!1,multiObject:!0,source:"mosaic"},Jht=200,Qht={DEFAULT:Yht,OPTIONS:Wht,DATA:Xht,PARAMS:Zht,SOURCE:qht,ITEMS:Jht,COMMON:Kht},$ht=o.defineComponent(tt(Ne({},Qht),{__name:"realtimeEvolutionMap",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(n){const e=n,t=o.ref([]),r=o.ref(0),i=o.ref(!1),a=o.ref(null);let s=null;const l=o.computed(()=>t.value.length<=1?0:r.value/(t.value.length-1)*100),c=S=>t.value.length<=1?50:S/(t.value.length-1)*100;class u extends Mr{constructor(){super(...arguments),this.currentObjectId=""}getCurrentObjectId(){return this.currentObjectId}setCurrentObjectId(C){this.currentObjectId=C}extractStyles(){return tt(Ne({},super.extractStyles()),{minPointSize:this.getOptionValue("minPointSize",6),maxPointSize:this.getOptionValue("maxPointSize",24),baseColor:this.getOptionValue("baseColor","#ee6666"),playInterval:this.getOptionValue("playInterval",2e3),linkChannel:this.getOptionValue("linkChannel","crack")})}onPreview(){return Ve(this,null,function*(){const{common:C,data:E}=this.props.conf,T=this.getSource();if(C.multiObject&&Array.isArray(E)){const A=new Set;for(const M of E){const D=yield this.resolveObjectId(M);!D||A.has(D)||(A.add(D),this.subscribeBySource(T,D,M.uid))}}else{const A=yield this.resolveObjectId();A&&(this.currentObjectId=A,this.subscribeBySource(T,A))}})}onLinkEvent(C){x(C)}generateTimeLabels(){return[]}initHistory(){return Ve(this,null,function*(){const{data:C}=this.props.conf||{};if(!Array.isArray(C)||!C.length)return[];const E=yield this.resolveObjectId();if(!E)return[];const T=24;return Promise.all(C.map(A=>new Promise(M=>{const D=[A.fvX,A.fvY,A.fvWidth,A.fvDeviceName].filter(Boolean);if(!D.length){M([]);return}Bt.platform(k=>{var P;M(((P=k==null?void 0:k.result)==null?void 0:P.data)||[])},{action:"get_mosaic_list",keys:D,object_id:E,page_index:1,page_size:T})})))})}setHistoryData(C){var M;if(!this.hasData()||!C||!Array.isArray(C))return;const E=((M=this.props.conf)==null?void 0:M.data)||[];if(!Array.isArray(E)||!E.length)return;const T=new Map;if(E.forEach((D,k)=>{const P=C[k];Array.isArray(P)&&P.forEach(I=>{const N=I.time||I.datetime;if(!N)return;const R=parseFloat(I[D.fvX]),V=parseFloat(I[D.fvY]),B=D.fvWidth?I[D.fvWidth]:0,F=parseFloat(B!=null?B:"0");if(isNaN(R)||isNaN(V))return;const G=String(N).split(".")[0];T.has(G)||T.set(G,{label:mt(G).isValid()?mt(G).format("HH:mm"):G,time:mt(G).isValid()?mt(G).format("MM-DD HH:mm:ss"):G,points:[]}),T.get(G).points.push({name:D.name||`crack_${k}`,x:R,y:V,width:isNaN(F)?0:F})})}),T.size===0)return;const A=Array.from(T.entries()).sort((D,k)=>new Date(D[0]).getTime()-new Date(k[0]).getTime()).map(D=>D[1]).slice(-50);t.value=A,r.value=A.length-1,b()}getChartOption(){const C=this.Style.value;return{backgroundColor:"transparent",tooltip:{trigger:"item",formatter:E=>{if(!E.value)return"";const[T,A,M,D,k]=E.value;return`<b>${M}</b><br/>时间: ${k}<br/>X: ${T}<br/>Y: ${A}<br/>宽度: ${D} mm`}},legend:{show:!0,top:6,right:20,textStyle:{color:C.textColor,fontSize:13,fontWeight:"bold"}},grid:{top:40,left:50,right:30,bottom:20},xAxis:{type:"value",name:"x",nameLocation:"end",nameTextStyle:{color:C.textColor,fontSize:13,fontWeight:"bold"},axisLine:{show:!0,lineStyle:{color:"#999"}},axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}},yAxis:{type:"value",name:"y",nameLocation:"end",nameTextStyle:{color:C.textColor,fontSize:13,fontWeight:"bold"},axisLine:{show:!0,lineStyle:{color:"#999"}},axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}},series:this.buildCumulativeSeries(C)}}buildCumulativeSeries(C){const E=r.value,T=t.value.slice(0,E+1);if(T.length===0)return[];const A=new Map;T.forEach((G,U)=>{G.points.forEach(z=>{A.has(z.name)||A.set(z.name,[]),A.get(z.name).push({x:z.x,y:z.y,width:z.width,time:G.label,timeIdx:U})})});let M=1/0,D=-1/0;A.forEach(G=>G.forEach(U=>{M=Math.min(M,U.width),D=Math.max(D,U.width)})),M===1/0&&(M=0,D=1);const k=D-M||1,P=C.baseColor||"#ee6666",I=C.minPointSize||6,N=C.maxPointSize||24,R=t.value.length||1,V=[P,"#5470c6","#91cc75","#fac858","#73c0de","#fc8452","#9a60b4"],B=[];let F=0;return A.forEach((G,U)=>{const z=V[F%V.length],j=G.map(Y=>[Y.x,Y.y,U,Y.width,Y.time]),W=Y=>{const Q=((Y[3]||0)-M)/k;return I+Q*(N-I)};B.push({name:U,type:"scatter",data:j,symbolSize:W,itemStyle:{color:Y=>{var $,ee;const Q=.2+.8*(((ee=($=G[Y.dataIndex])==null?void 0:$.timeIdx)!=null?ee:0)/(R-1||1));return this.hexToRgba(z,Q)}},emphasis:{itemStyle:{borderColor:"#333",borderWidth:2}}}),F++}),B}hexToRgba(C,E){const T=C.replace("#",""),A=parseInt(T.substring(0,2),16),M=parseInt(T.substring(2,4),16),D=parseInt(T.substring(4,6),16);return`rgba(${A},${M},${D},${E})`}setSocketData(C){super.setSocketData(C);const{data:E}=this.props.conf,T=mt().format("HH:mm"),A=mt().format("MM-DD HH:mm:ss"),M=[];E.forEach(D=>{const k=this.extractDataValue(C,D.fvX),P=this.extractDataValue(C,D.fvY),I=this.extractDataValue(C,D.fvWidth);if(k!=null&&P!=null){const N=parseFloat(k),R=parseFloat(P),V=I!=null?parseFloat(I):0;!isNaN(N)&&!isNaN(R)&&M.push({name:D.name||"default",x:N,y:R,width:isNaN(V)?0:V})}}),M.length>0&&(t.value.push({label:T,time:A,points:M}),t.value.length>50&&t.value.shift(),(i.value||r.value>=t.value.length-2)&&(r.value=t.value.length-1),b())}}const d=new u(e,"realtimeEvolutionMap");d.setupLifecycle();const f=d.getStyle(),h=d.getEchartId(),p=()=>{i.value?v():m()},m=()=>{t.value.length<=1||(i.value=!0,s=setInterval(()=>{r.value=r.value<t.value.length-1?r.value+1:0,b()},f.value.playInterval||2e3))},v=()=>{i.value=!1,s&&(clearInterval(s),s=null)},g=S=>{r.value=S,b()},y=S=>{if(!a.value||t.value.length<=1)return;const C=a.value.getBoundingClientRect(),E=(S.clientX-C.left)/C.width;g(Math.max(0,Math.min(Math.round(E*(t.value.length-1)),t.value.length-1)))},b=()=>{const S=d.getChartInstance();S&&S.setOption(d.getChartOption(),!0)};o.watch(r,()=>b());const x=S=>Ve(null,null,function*(){var k;const{payload:C}=S;if(!C)return;const E=C.objectIds&&C.objectIds.length>0?C.objectIds:C.objectId||C.object_id?[C.objectId||C.object_id]:[];if(!E.length||e.mode!=="preview")return;const T=E.sort().join(",");if(d.getCurrentObjectId()===T)return;d.setCurrentObjectId(T),t.value=[],r.value=0,v();const{data:A}=e.conf,M=(k=d.session)==null?void 0:k.value;if(!M)return;const D=e.conf.id;M.componentRequests&&M.componentRequests.delete(D);for(const P of E)Array.isArray(A)&&A.forEach(I=>{I.object_id=P}),d.subscribeBySource(d.getSource(),P);M.registerComponent({id:D,request:null,onUpdate:(P,I)=>{P==="realtime"&&d.setSocketData(I)}})}),_=()=>{var T;if(e.mode!=="edit")return;const S=((T=e.conf)==null?void 0:T.data)||[],C=mt(),E=[];for(let A=9;A>=0;A--){const M=C.subtract(A*160,"minute"),D=[];S.forEach((k,P)=>{const I=k.name||`裂缝写实${P+1}`,N=(10-A)/10,R=20+P*20+N*30+(Math.random()-.5)*8,V=15+P*10+N*20+(Math.random()-.5)*8,B=.1+N*2.5+Math.random()*.3;D.push({name:I,x:+R.toFixed(1),y:+V.toFixed(1),width:+B.toFixed(2)})}),E.push({label:M.format("HH:mm"),time:M.format("MM-DD HH:mm:ss"),points:D})}t.value=E,r.value=E.length-1},w=o.computed(()=>({background:f.value.bgColor,color:f.value.textColor}));return o.onMounted(()=>{e.mode==="edit"&&_()}),o.onUnmounted(()=>v()),o.watch(()=>e.conf,()=>{e.mode==="edit"&&_()},{deep:!0}),(S,C)=>(o.openBlock(),o.createElementBlock("div",{class:"mix-component crack-realtime-evolution",style:o.normalizeStyle(w.value)},[C[1]||(C[1]=o.createElementVNode("div",{class:"chart-header"},[o.createElementVNode("span",{class:"chart-title"},"▎实时裂缝演变分布图 (动态轨迹)")],-1)),o.createElementVNode("div",{id:o.unref(h),class:"chart-container"},null,8,Fht),t.value.length>0?(o.openBlock(),o.createElementBlock("div",zht,[o.createElementVNode("button",{class:"play-btn",onClick:p},[i.value?(o.openBlock(),o.createElementBlock("span",Uht,"⏸")):(o.openBlock(),o.createElementBlock("span",Hht,"▶"))]),o.createElementVNode("div",{class:"timeline-track",ref_key:"trackRef",ref:a,onClick:y},[C[0]||(C[0]=o.createElementVNode("div",{class:"track-line"},null,-1)),o.createElementVNode("div",{class:"track-progress",style:o.normalizeStyle({width:l.value+"%"})},null,4),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.value,(E,T)=>(o.openBlock(),o.createElementBlock("div",{key:T,class:o.normalizeClass(["track-dot",{active:T<=r.value,current:T===r.value}]),style:o.normalizeStyle({left:c(T)+"%"}),onClick:o.withModifiers(A=>g(T),["stop"])},null,14,jht))),128))],512),o.createElementVNode("div",Ght,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.value,(E,T)=>(o.openBlock(),o.createElementBlock("span",{key:T,class:o.normalizeClass(["time-label",{active:T<=r.value}]),style:o.normalizeStyle({left:c(T)+"%"})},o.toDisplayString(E.label),7))),128))])])):o.createCommentVNode("",!0),o.renderSlot(S.$slots,"default",{},void 0,!0)],4))}})),e2t=Dt($ht,[["__scopeId","data-v-c4a95d59"]]),t2t=Object.freeze(Object.defineProperty({__proto__:null,default:e2t},Symbol.toStringTag,{value:"Module"})),n2t={class:"chart-header"},r2t={class:"chart-title"},i2t={class:"chart-actions"},a2t=["onClick"],o2t={class:"item-label"},s2t=["id"],l2t={DEFAULT_ICON:Cu,ACTIVE_ICON:Eu,NAME_CN:"指标时序演变曲线",NAME_EN:"TimeSeriesCurve",ORDER:1,PLATFORM:["pc","screen"]},c2t={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},titleSize:{value:14,type:"number",label:"component.options.titleSize"},showLegend:{value:!0,type:"switch",label:"component.options.showLegend"},showDataZoom:{value:!0,type:"switch",label:"component.crack.showDataZoom"},lineWidth:{value:2.5,type:"number",label:"component.options.lineWidth"},linkChannel:{value:"crack",type:"select",label:"component.linkChannel",options:[{label:"裂缝监测",value:"crack"},{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"深部位移",value:"deepDisplacement"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},u2t=[{name:"宽度累计变化量",fv:"",object_id:"",device:"",color:"#5470c6"},{name:"宽度日变化量",fv:"",object_id:"",device:"",color:"#91cc75"},{name:"x方向加速度",fv:"",object_id:"",device:"",color:"#fac858"},{name:"y方向加速度",fv:"",object_id:"",device:"",color:"#ee6666"},{name:"z方向加速度",fv:"",object_id:"",device:"",color:"#73c0de"},{name:"x方向倾角",fv:"",object_id:"",device:"",color:"#3ba272"},{name:"y方向倾角",fv:"",object_id:"",device:"",color:"#fc8452"},{name:"z方向倾角",fv:"",object_id:"",device:"",color:"#9a60b4"}],d2t=["name","fv","object_id","device","color"],f2t=["mosaic","statistics","calculate"],h2t={useAlias:!1,multiObject:!1,hideMultiObject:!0,source:"mosaic"},p2t=50,m2t={DEFAULT:l2t,OPTIONS:c2t,DATA:u2t,PARAMS:d2t,SOURCE:f2t,ITEMS:p2t,COMMON:h2t},v2t=o.defineComponent(tt(Ne({},m2t),{__name:"timeSeriesCurve",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(n){var R,V;const{t:e}=Ph({"component.crack.timeSeriesCurve":"指标时序演变曲线"}),t=n,r=o.ref([]),i=o.computed(()=>t.conf.data||[]),a=o.ref([]);let s=0;class l extends Mr{constructor(){super(...arguments),this.deviceColors=["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4"],this.realTimeData=new Map,this.deviceNameMap=new Map,this.currentObjectId=""}getCurrentObjectId(){return this.currentObjectId}setCurrentObjectId(F){this.currentObjectId=F}extractStyles(){return tt(Ne({},super.extractStyles()),{showLegend:this.getOptionValue("showLegend",!0),showDataZoom:this.getOptionValue("showDataZoom",!0),lineWidth:this.getOptionValue("lineWidth",2.5),linkChannel:this.getOptionValue("linkChannel","crack")})}needsHistoryData(){return!1}onPreview(){return Ve(this,null,function*(){const{common:F,data:G}=this.props.conf,U=[];if(F.multiObject&&Array.isArray(G)){const z=new Set;for(const j of G){const W=yield this.resolveObjectId(j);!W||z.has(W)||(z.add(W),U.push(W))}}else{const z=yield this.resolveObjectId();z&&(this.currentObjectId=z,U.push(z))}U.length>0&&(a.value=U,yield m(U))})}onLinkEvent(F){p(F)}getChartOption(){const{data:F}=this.props.conf,G=this.Style.value,U=a.value,z=U.length>1,j=r.value.length===0?[]:F.filter(Q=>r.value.includes(Q.name));let W=[];if(this.props.mode==="edit")W=this.generateTimeLabels();else for(const[,Q]of this.realTimeData)Q.times.length>W.length&&(W=Q.times);const Y=[];let re=0;if(z&&this.props.mode!=="edit")for(const Q of U){const $=this.deviceNameMap.get(Q)||Q.slice(-6);for(const ee of j){if(!ee.fv)continue;const X=`${Q}:${ee.name}`,ne=`${$}-${ee.name}`,K=ee.color||this.deviceColors[re%this.deviceColors.length],Z=this.realTimeData.get(X);Y.push({name:ne,type:"line",smooth:!0,showSymbol:!1,lineStyle:{color:K,type:"solid",width:G.lineWidth},itemStyle:{color:K},data:Z?Z.values:[]}),re++}}else j.filter(Q=>Q.fv||this.props.mode==="edit").forEach((Q,$)=>{const ee=Q.device&&this.deviceNameMap.get(Q.device)||"",X=ee?`${ee}-${Q.name}`:Q.name,ne=Q.color||this.deviceColors[$%this.deviceColors.length];let K;if(this.props.mode!=="edit"){const Z=this.realTimeData.get(Q.name);K=Z?Z.values:[]}else K=this.generateSeriesData(Q,W);Y.push({name:X,type:"line",smooth:!0,showSymbol:!1,lineStyle:{color:ne,type:"solid",width:G.lineWidth},itemStyle:{color:ne},data:K})});return{tooltip:{trigger:"axis",axisPointer:{type:"cross"}},legend:{show:G.showLegend,type:"scroll",top:10,textStyle:{color:G.textColor}},grid:{top:60,left:60,right:40,bottom:G.showDataZoom?80:40},xAxis:{type:"category",data:W,axisLabel:{interval:"auto",rotate:15,fontSize:10,color:G.textColor}},yAxis:{type:"value",name:"值",nameTextStyle:{color:G.textColor},axisLabel:{color:G.textColor},splitLine:{lineStyle:{type:"dashed",opacity:.5}}},dataZoom:G.showDataZoom?[{type:"inside"},{type:"slider",bottom:10,height:15}]:[],series:Y}}generateTimeLabels(){const F=[];for(let G=24;G>=0;G--){const U=mt().subtract(G,"hour");F.push(U.format("MM-DD HH:mm"))}return F}generateSeriesData(F,G){const U=F.name,z=this.realTimeData.get(U);if(z&&z.times.length>0){const j=new Map;return z.times.forEach((W,Y)=>j.set(W,z.values[Y])),G.map(W=>{var Y;return(Y=j.get(W))!=null?Y:null})}if(this.props.mode==="edit"){const j=Math.random()*10+5;return Array.from({length:G.length},(W,Y)=>{const re=Math.sin(Y*.5)*.3;return parseFloat((j*(.8+re)).toFixed(2))})}return new Array(G.length).fill(null)}setSocketData(F){if(!F)return;const{data:G}=this.props.conf;if(!G||!Array.isArray(G))return;const U=F.object_id||F.objectId||"";if(U&&a.value.length>0&&!a.value.includes(U))return;const z=F.datetime?F.datetime.split(".")[0]:mt().format("MM-DD HH:mm:ss"),j=mt(z).format("MM-DD HH:mm:ss"),W=a.value.length>1;G.forEach(re=>{if(!re.fv)return;if(re.device){const $=this.extractDataValue(F,re.device);$!=null&&(W&&U?this.deviceNameMap.set(U,String($)):this.deviceNameMap.set(re.device,String($)))}const Q=this.extractDataValue(F,re.fv);if(Q!=null){const $=parseFloat(Q);if(!isNaN($)){const ee=W&&U?`${U}:${re.name}`:re.name;let X=this.realTimeData.get(ee);X||(X={times:[],values:[]},this.realTimeData.set(ee,X)),X.times.push(j),X.values.push($),X.times.length>200&&(X.times.shift(),X.values.shift()),re.value=$}}});const Y=this.getChartInstance();Y&&Y.setOption(this.getChartOption())}}const c=new l(t,"timeSeriesCurve");c.setupLifecycle();const u=c.getStyle(),d=c.getEchartId();let f=null,h=!1;const p=B=>{const{payload:F}=B;if(!F)return;F.dateRange&&Array.isArray(F.dateRange)&&F.dateRange.length===2&&(f={start_time:F.dateRange[0],end_time:F.dateRange[1]});const G=F.objectIds&&F.objectIds.length>0?F.objectIds:F.objectId||F.object_id?[F.objectId||F.object_id]:[];G.length>0&&(a.value=G,m(G))},m=B=>Ve(null,null,function*(){var $;if(!B.length||t.mode!=="preview")return;h=!0;const F=++s;c.setCurrentObjectId([...B].sort().join(",")),c.realTimeData.clear(),c.deviceNameMap.clear();const G=($=c.session)==null?void 0:$.value;if(!G){h=!1;return}const U=t.conf.id;G.componentRequests&&G.componentRequests.delete(U),typeof G.unsubscribeComponent=="function"&&G.unsubscribeComponent(U);const{data:z,common:j}=t.conf,W=B.length>1;f&&(j.historyTimeRange=f),t.conf.options||(t.conf.options={});const Y=t.conf.options.points,re=Object.prototype.hasOwnProperty.call(t.conf.options,"points");(!Y||Number(Y)<24)&&(t.conf.options.points=24);for(const ee of B){if(s!==F){h=!1;return}Array.isArray(z)&&z.forEach(ne=>{ne.object_id=ee}),j.multiObject||(j.object_id=ee);try{const ne=yield Promise.resolve().then(()=>pd),Z=yield new ne.default().getHistoryData(t,"timeSeriesCurve");if(s!==F){h=!1;return}Z&&Z.history&&Array.isArray(Z.history)&&z.forEach((me,be)=>{if(!me.fv)return;const ye=Z.history[be];if(!Array.isArray(ye))return;const ie=[...ye].sort((de,Ae)=>new Date(de.time||de.datetime||"").getTime()-new Date(Ae.time||Ae.datetime||"").getTime()),ue=W?`${ee}:${me.name}`:me.name,le=[],oe=[];ie.forEach(de=>{const Ae=de.time||de.datetime,pe=de[me.fv];if(Ae&&pe!=null){const se=parseFloat(pe);isNaN(se)||(le.push(mt(Ae).format("MM-DD HH:mm:ss")),oe.push(se))}W&&me.device&&de[me.device]&&c.deviceNameMap.set(ee,String(de[me.device]))}),le.length>0&&c.realTimeData.set(ue,{times:le,values:oe})})}catch(ne){console.warn("[指标时序演变曲线] 历史数据获取失败:",ne)}if(s!==F){h=!1;return}const X=c.getSource();c.subscribeBySource(X,ee)}if(re?t.conf.options.points=Y:delete t.conf.options.points,h=!1,s!==F)return;const Q=c.getChartInstance();Q&&Q.setOption(c.getChartOption(),!0),G.registerComponent({id:U,request:null,onUpdate:(ee,X)=>{s===F&&ee==="realtime"&&c.setSocketData(X)}})}),v=o.computed(()=>({background:u.value.bgColor,color:u.value.textColor})),g=o.computed(()=>"指标时序演变曲线"),y=o.computed(()=>"导出图像"),b=o.computed(()=>"选择监测指标");t.mode==="edit"&&i.value.length>0&&(r.value=[(R=i.value[0])==null?void 0:R.name,(V=i.value[1])==null?void 0:V.name].filter(Boolean));const x=o.ref(!1),_=o.ref(null),w=o.ref(null),S=o.ref({}),C=o.computed(()=>r.value.length===0?"":r.value.length===i.value.length?"全部":r.value.join("、")),E=o.computed(()=>{const B=i.value;return B.length>0&&B.every(F=>r.value.includes(F.name))}),T=o.computed(()=>{const B=i.value,F=B.filter(G=>r.value.includes(G.name)).length;return F>0&&F<B.length}),A=()=>{x.value=!x.value,x.value&&M()};function M(){if(!_.value)return;const B=_.value.getBoundingClientRect();S.value={position:"fixed",top:`${B.bottom+4}px`,left:`${B.left}px`,zIndex:"9999"}}const D=B=>{const F=_.value,G=w.value;F&&!F.contains(B.target)&&G&&!G.contains(B.target)&&(x.value=!1)};o.onMounted(()=>{document.addEventListener("click",D)}),o.onBeforeUnmount(()=>{document.removeEventListener("click",D)});const k=()=>{E.value?r.value=[]:r.value=i.value.map(B=>B.name),I()},P=B=>{const F=r.value.indexOf(B.name);F>-1?r.value.splice(F,1):r.value.push(B.name),I()},I=()=>{const B=c.getChartInstance();B&&B.setOption(c.getChartOption(),!0)};o.watch(()=>t.conf.data,B=>{var F,G;h||B&&B.length>0&&r.value.length===0&&(r.value=[(F=B[0])==null?void 0:F.name,(G=B[1])==null?void 0:G.name].filter(Boolean))},{immediate:!0});const N=()=>{const B=c.getChartInstance();if(!B)return;const F=document.createElement("a");F.href=B.getDataURL({type:"png",pixelRatio:2,backgroundColor:"#fff"}),F.download=`${e("component.crack.timeSeriesCurve")}_${mt().format("YYYYMMDDHHmmss")}.png`,F.click()};return(B,F)=>{const G=Se.ElIcon,U=Se.ElInput,z=Se.ElCheckbox,j=Se.ElButton;return o.openBlock(),o.createElementBlock("div",{class:"mix-component crack-time-series",style:o.normalizeStyle(v.value)},[o.createElementVNode("div",n2t,[o.createElementVNode("span",r2t,"📉 "+o.toDisplayString(g.value),1),o.createElementVNode("div",i2t,[o.createElementVNode("div",{class:"metrics-select-wrapper",ref_key:"metricsWrapperRef",ref:_},[o.createVNode(U,{"model-value":C.value,placeholder:b.value,size:"small",style:{width:"220px"},readonly:"",onClick:A},{suffix:o.withCtx(()=>[o.createVNode(G,{class:o.normalizeClass(["metrics-arrow",{"is-open":x.value}])},{default:o.withCtx(()=>[o.createVNode(o.unref(qt.ArrowDown))]),_:1},8,["class"])]),_:1},8,["model-value","placeholder"]),(o.openBlock(),o.createBlock(o.Teleport,{to:"body"},[o.withDirectives(o.createElementVNode("div",{class:"metrics-dropdown",style:o.normalizeStyle(S.value),ref_key:"metricsDropdownRef",ref:w},[o.createElementVNode("div",{class:"metrics-dropdown-item",onClick:o.withModifiers(k,["stop"])},[o.createVNode(z,{"model-value":E.value,indeterminate:T.value,onChange:k},null,8,["model-value","indeterminate"]),F[0]||(F[0]=o.createElementVNode("span",{class:"item-label",style:{"font-weight":"bold"}},"全部",-1))]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,W=>(o.openBlock(),o.createElementBlock("div",{key:W.name,class:"metrics-dropdown-item",onClick:o.withModifiers(Y=>P(W),["stop"])},[o.createVNode(z,{"model-value":r.value.includes(W.name),onChange:Y=>P(W)},null,8,["model-value","onChange"]),o.createElementVNode("span",o2t,o.toDisplayString(W.name),1)],8,a2t))),128))],4),[[o.vShow,x.value]])]))],512),o.createVNode(j,{size:"small",onClick:N},{default:o.withCtx(()=>[o.createTextVNode("💾 "+o.toDisplayString(y.value),1)]),_:1})])]),o.createElementVNode("div",{id:o.unref(d),class:"chart-container"},null,8,s2t),o.renderSlot(B.$slots,"default",{},void 0,!0)],4)}}})),g2t=Dt(v2t,[["__scopeId","data-v-6b410ecb"]]),y2t=Object.freeze(Object.defineProperty({__proto__:null,default:g2t},Symbol.toStringTag,{value:"Module"})),b2t={class:"chart-config-panel"},x2t={key:0,class:"config-section"},_2t={class:"section-header"},S2t={class:"section-title"},w2t={class:"granularity-switch"},C2t={class:"quick-range"},E2t=["onClick"],A2t={class:"date-inputs"},T2t={key:1,class:"config-section"},M2t={class:"section-header"},D2t={class:"section-title"},L2t={class:"time-list-actions"},N2t={class:"selected-count"},O2t={class:"time-list"},P2t={key:2,class:"config-section"},k2t={class:"section-title"},I2t={key:3,class:"config-section"},R2t={class:"section-title"},V2t={class:"direction-tabs"},B2t=["onClick"],F2t={key:4,class:"config-section"},z2t={class:"section-title"},U2t={class:"range-inputs"},H2t={key:5,class:"config-section"},j2t={class:"section-title"},G2t={class:"range-inputs"},Y2t={key:6,class:"config-section"},W2t={class:"section-title"},X2t={class:"function-options"},Z2t={key:7,class:"config-section"},q2t={DEFAULT_ICON:Kg,ACTIVE_ICON:Jg,NAME_CN:"图表配置面板",NAME_EN:"Chart Config Panel",ORDER:14,PLATFORM:["pc","screen"]},K2t={bindId:{value:"",type:"string",label:"component.deepDisplacement.bindId"},bgColor:{value:"#ffffff",type:"color",label:"component.options.bgColor"},textColor:{value:"#333333",type:"color",label:"component.options.textColor"},accentColor:{value:"#409eff",type:"color",label:"component.options.accentColor"},borderColor:{value:"#e5e5e5",type:"color",label:"component.options.borderColor"}},J2t=[{type:"timeRange",label:"时间段",targetId:""},{type:"timeList",label:"采集时间列表",targetId:""},{type:"direction",label:"位移方向",targetId:""},{type:"dispSwitch",label:"累计/相对切换",targetId:""}],Q2t=["type","label","targetId"],$2t=[],ept={useAlias:!1,multiObject:!1,source:""},tpt={DEFAULT:q2t,OPTIONS:K2t,DATA:J2t,PARAMS:Q2t,SOURCE:$2t,COMMON:ept},npt=o.defineComponent(tt(Ne({},tpt),{__name:"chartConfigPanel",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){o.useCssVars(G=>({v7cc69559:r.value.bgColor,v520c1f5c:r.value.borderColor,v07166a9e:r.value.textColor,v66046274:r.value.accentColor}));const e=ua(),t=n,r=o.computed(()=>{var U,z,j,W,Y;const{options:G}=t.conf||{};return{bindId:((U=G==null?void 0:G.bindId)==null?void 0:U.value)||"",bgColor:((z=G==null?void 0:G.bgColor)==null?void 0:z.value)||"#ffffff",textColor:((j=G==null?void 0:G.textColor)==null?void 0:j.value)||"#333333",accentColor:((W=G==null?void 0:G.accentColor)==null?void 0:W.value)||"#409eff",borderColor:((Y=G==null?void 0:G.borderColor)==null?void 0:Y.value)||"#e5e5e5"}}),i=o.computed(()=>{var G;return((G=t.conf)==null?void 0:G.data)||[]}),a=o.computed(()=>r.value.bindId||t.uid||""),s=o.ref("day"),l=o.ref("week"),c=o.ref(""),u=o.ref(""),d=[{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],f=o.ref([]),h=o.ref([]),p=o.ref(!0),m=o.ref("relative"),v=o.ref("total"),g=[{label:"合",value:"total"},{label:"X轴",value:"x"},{label:"Y轴",value:"y"}],y=o.ref(""),b=o.ref(""),x=o.ref(""),_=o.ref(""),w=o.ref(!0),S=o.ref(!0),C=()=>({granularity:s.value,startDate:c.value,endDate:u.value,selectedTimes:h.value,chartType:m.value,direction:v.value,dispRange:{min:parseFloat(y.value)||null,max:parseFloat(b.value)||null},relativeDispRange:{min:parseFloat(x.value)||null,max:parseFloat(_.value)||null},showDisp:w.value,showRelativeDisp:S.value}),E=()=>{const G=C(),U=i.value,z=a.value;z&&(console.log("[ConfigPanel] 广播配置 (uid):",z,G),e.publish("deepDisplacement","chartConfigPanel",{objectId:z,type:"config",fv:G})),U.forEach(j=>{const W=j.targetId;W&&(j.type==="dispSwitch"?W.split(",").map(re=>re.trim()).forEach((re,Q)=>{if(!re)return;const $=Q===0?w.value:S.value;e.publish("deepDisplacement","chartConfigPanel",{objectId:re,type:"bindConfig",fv:tt(Ne({},G),{visible:$})})}):e.publish("deepDisplacement","chartConfigPanel",{objectId:W,type:"bindConfig",fv:G}))})},T=G=>{s.value=G,E()},A=G=>{l.value=G;const U=mt();u.value=U.format("YYYY-MM-DD"),G==="week"?c.value=U.subtract(7,"day").format("YYYY-MM-DD"):G==="month"?c.value=U.subtract(30,"day").format("YYYY-MM-DD"):G==="quarter"&&(c.value=U.subtract(90,"day").format("YYYY-MM-DD")),D(),E()},M=()=>{c.value&&u.value&&(D(),E())},D=()=>{const G=mt(c.value),U=mt(u.value),z=[];let j=U;for(;j.isAfter(G)||j.isSame(G);)z.push(j.format("YYYY-MM-DD")),j=j.subtract(1,"day");f.value=z,h.value=[...z],p.value=!0},k=G=>{h.value=G?[...f.value]:[],E()},P=()=>{h.value=[],p.value=!1,E()},I=()=>{p.value=h.value.length===f.value.length,E()},N=()=>{E()},R=G=>{v.value=G,E()},V=()=>{E()},B=()=>{E()},F=()=>{const G=a.value;G&&e.publish("deepDisplacement",{objectId:G,type:"export",fv:{type:"chart",config:C()},source:"chartConfigPanel"})};return o.onMounted(()=>{A("week"),setTimeout(E,300)}),(G,U)=>{const z=Se.ElDatePicker,j=Se.ElCheckbox,W=Se.ElIcon,Y=Se.ElButton,re=Se.ElCheckboxGroup,Q=Se.ElRadio,$=Se.ElRadioGroup,ee=Se.ElInput;return o.openBlock(),o.createElementBlock("div",b2t,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,(X,ne)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:ne},[X.type==="timeRange"?(o.openBlock(),o.createElementBlock("div",x2t,[o.createElementVNode("div",_2t,[o.createElementVNode("span",S2t,o.toDisplayString(X.label||"时间段"),1),o.createElementVNode("div",w2t,[o.createElementVNode("span",{class:o.normalizeClass(["switch-item",{active:s.value==="day"}]),onClick:U[0]||(U[0]=K=>T("day"))},"日均",2),o.createElementVNode("span",{class:o.normalizeClass(["switch-item",{active:s.value==="hour"}]),onClick:U[1]||(U[1]=K=>T("hour"))},"小时",2)])]),o.createElementVNode("div",C2t,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(d,K=>o.createElementVNode("span",{key:K.value,class:o.normalizeClass(["range-item",{active:l.value===K.value}]),onClick:Z=>A(K.value)},o.toDisplayString(K.label),11,E2t)),64))]),o.createElementVNode("div",A2t,[o.createVNode(z,{modelValue:c.value,"onUpdate:modelValue":U[2]||(U[2]=K=>c.value=K),type:"date",placeholder:"开始日期",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",size:"small",class:"date-picker",onChange:M},null,8,["modelValue"]),o.createVNode(z,{modelValue:u.value,"onUpdate:modelValue":U[3]||(U[3]=K=>u.value=K),type:"date",placeholder:"结束日期",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",size:"small",class:"date-picker",onChange:M},null,8,["modelValue"])])])):X.type==="timeList"?(o.openBlock(),o.createElementBlock("div",T2t,[o.createElementVNode("div",M2t,[o.createElementVNode("span",D2t,o.toDisplayString(X.label||"采集时间列表"),1)]),o.createElementVNode("div",L2t,[o.createVNode(j,{modelValue:p.value,"onUpdate:modelValue":U[4]||(U[4]=K=>p.value=K),onChange:k},{default:o.withCtx(()=>[...U[13]||(U[13]=[o.createTextVNode("全选",-1)])]),_:1},8,["modelValue"]),o.createVNode(Y,{size:"small",text:"",onClick:P},{default:o.withCtx(()=>[o.createVNode(W,null,{default:o.withCtx(()=>[o.createVNode(o.unref(qt.Delete))]),_:1}),U[14]||(U[14]=o.createTextVNode("清空",-1))]),_:1}),o.createElementVNode("span",N2t,[U[15]||(U[15]=o.createTextVNode("已选 ",-1)),o.createElementVNode("em",null,o.toDisplayString(h.value.length),1),U[16]||(U[16]=o.createTextVNode(" 项",-1))])]),o.createElementVNode("div",O2t,[o.createVNode(re,{modelValue:h.value,"onUpdate:modelValue":U[5]||(U[5]=K=>h.value=K),onChange:I},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.value,K=>(o.openBlock(),o.createBlock(j,{key:K,value:K,class:"time-checkbox"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(K),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])])):X.type==="chartType"?(o.openBlock(),o.createElementBlock("div",P2t,[o.createElementVNode("div",k2t,o.toDisplayString(X.label||"图类型"),1),o.createVNode($,{modelValue:m.value,"onUpdate:modelValue":U[6]||(U[6]=K=>m.value=K),class:"chart-type-group",onChange:N},{default:o.withCtx(()=>[o.createVNode(Q,{value:"relative"},{default:o.withCtx(()=>[...U[17]||(U[17]=[o.createTextVNode("相对位移",-1)])]),_:1}),o.createVNode(Q,{value:"cluster"},{default:o.withCtx(()=>[...U[18]||(U[18]=[o.createTextVNode("滑面聚类判识",-1)])]),_:1}),o.createVNode(Q,{value:"borehole"},{default:o.withCtx(()=>[...U[19]||(U[19]=[o.createTextVNode("钻孔柱状图",-1)])]),_:1}),o.createVNode(Q,{value:"sensor"},{default:o.withCtx(()=>[...U[20]||(U[20]=[o.createTextVNode("传感器分布图",-1)])]),_:1})]),_:1},8,["modelValue"])])):X.type==="direction"?(o.openBlock(),o.createElementBlock("div",I2t,[o.createElementVNode("div",R2t,o.toDisplayString(X.label||"位移方向"),1),o.createElementVNode("div",V2t,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(g,K=>o.createElementVNode("span",{key:K.value,class:o.normalizeClass(["direction-item",{active:v.value===K.value}]),onClick:Z=>R(K.value)},o.toDisplayString(K.label),11,B2t)),64))])])):X.type==="dispRange"?(o.openBlock(),o.createElementBlock("div",F2t,[o.createElementVNode("div",z2t,o.toDisplayString(X.label||"累计位移区间"),1),o.createElementVNode("div",U2t,[o.createVNode(ee,{modelValue:y.value,"onUpdate:modelValue":U[7]||(U[7]=K=>y.value=K),size:"small",placeholder:"最小值",class:"range-input",onChange:V},null,8,["modelValue"]),U[21]||(U[21]=o.createElementVNode("span",{class:"range-sep"},"~",-1)),o.createVNode(ee,{modelValue:b.value,"onUpdate:modelValue":U[8]||(U[8]=K=>b.value=K),size:"small",placeholder:"最大值",class:"range-input",onChange:V},null,8,["modelValue"]),U[22]||(U[22]=o.createElementVNode("span",{class:"range-unit"},"mm",-1))])])):X.type==="relativeDispRange"?(o.openBlock(),o.createElementBlock("div",H2t,[o.createElementVNode("div",j2t,o.toDisplayString(X.label||"相对位移区间"),1),o.createElementVNode("div",G2t,[o.createVNode(ee,{modelValue:x.value,"onUpdate:modelValue":U[9]||(U[9]=K=>x.value=K),size:"small",placeholder:"最小值",class:"range-input",onChange:V},null,8,["modelValue"]),U[23]||(U[23]=o.createElementVNode("span",{class:"range-sep"},"~",-1)),o.createVNode(ee,{modelValue:_.value,"onUpdate:modelValue":U[10]||(U[10]=K=>_.value=K),size:"small",placeholder:"最大值",class:"range-input",onChange:V},null,8,["modelValue"]),U[24]||(U[24]=o.createElementVNode("span",{class:"range-unit"},"mm",-1))])])):X.type==="dispSwitch"?(o.openBlock(),o.createElementBlock("div",Y2t,[o.createElementVNode("div",W2t,o.toDisplayString(X.label||"功能"),1),o.createElementVNode("div",X2t,[o.createVNode(j,{modelValue:w.value,"onUpdate:modelValue":U[11]||(U[11]=K=>w.value=K),onChange:B},{default:o.withCtx(()=>[...U[25]||(U[25]=[o.createTextVNode("累计位移",-1)])]),_:1},8,["modelValue"]),o.createVNode(j,{modelValue:S.value,"onUpdate:modelValue":U[12]||(U[12]=K=>S.value=K),onChange:B},{default:o.withCtx(()=>[...U[26]||(U[26]=[o.createTextVNode("相对位移",-1)])]),_:1},8,["modelValue"])])])):X.type==="export"?(o.openBlock(),o.createElementBlock("div",Z2t,[o.createVNode(Y,{size:"small",onClick:F,class:"export-btn"},{default:o.withCtx(()=>[o.createVNode(W,null,{default:o.withCtx(()=>[o.createVNode(o.unref(qt.Upload))]),_:1}),o.createTextVNode(o.toDisplayString(X.label||"导出图"),1)]),_:2},1024)])):o.createCommentVNode("",!0)],64))),128)),o.renderSlot(G.$slots,"default",{},void 0,!0)])}}})),rpt=Dt(npt,[["__scopeId","data-v-8b0e3d68"]]),ipt=Object.freeze(Object.defineProperty({__proto__:null,default:rpt},Symbol.toStringTag,{value:"Module"})),S0e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e双X轴%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-261.000000,%20-190.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M261.943678,190.71954%20C262.269547,190.71954%20262.538858,190.961695%20262.58148,191.275875%20L262.587356,191.363218%20L262.587356,205.432184%20L276.656322,205.432184%20C276.982191,205.432184%20277.251502,205.674339%20277.294124,205.988519%20L277.3,206.075862%20C277.3,206.401731%20277.057845,206.671042%20276.743665,206.713664%20L276.656322,206.71954%20L261.943678,206.71954%20C261.617809,206.71954%20261.348498,206.477385%20261.305876,206.163205%20L261.3,206.075862%20L261.3,191.363218%20C261.3,191.007725%20261.588185,190.71954%20261.943678,190.71954%20Z%20M275.92069,201.754023%20C276.276183,201.754023%20276.564368,202.042208%20276.564368,202.397701%20C276.564368,202.72357%20276.322213,202.992881%20276.008033,203.035503%20L275.92069,203.041379%20L264.886207,203.041379%20C264.530713,203.041379%20264.242529,202.753195%20264.242529,202.397701%20C264.242529,202.071832%20264.484684,201.802521%20264.798864,201.759899%20L264.886207,201.754023%20L275.92069,201.754023%20Z%20M267.46092,195.133333%20C268.751499,195.133333%20269.611523,195.601341%20270.148649,196.415716%20C270.290746,196.631159%20270.503972,197.084502%20270.61416,197.394442%20L270.648966,197.50023%20L270.597245,197.301589%20C271.106782,198.211476%20271.67562,198.746129%20272.675247,198.80588%20L272.867816,198.811494%20C273.440204,198.811494%20273.863943,198.569358%20274.192294,198.142928%20C274.399952,197.873242%20274.521197,197.599759%20274.565219,197.442537%20C274.66107,197.100209%20275.016285,196.900401%20275.358612,196.996253%20C275.70094,197.092105%20275.900748,197.447319%20275.804896,197.789647%20C275.720183,198.092195%20275.53568,198.508367%20275.212304,198.928336%20C274.655597,199.651332%20273.872439,200.098851%20272.867816,200.098851%20C271.896559,200.098851%20271.089782,199.765036%20270.443714,199.18819%20C270.052821,198.839178%20269.807088,198.50782%20269.482578,197.814453%20L269.391954,197.616092%20L269.474019,197.930595%20L269.240518,197.436037%20L269.148886,197.255161%20C269.120289,197.201186%20269.094481,197.155581%20269.07399,197.124514%20C268.773906,196.669535%20268.316621,196.42069%20267.46092,196.42069%20C266.75894,196.42069%20266.259435,196.675539%20265.894017,197.11056%20C265.671566,197.375383%20265.54775,197.640703%20265.506046,197.789647%20C265.410194,198.131974%20265.05498,198.331783%20264.712652,198.235931%20C264.370324,198.140079%20264.170516,197.784865%20264.266368,197.442537%20C264.353399,197.131711%20264.551422,196.707376%20264.908282,196.282543%20C265.508381,195.568139%20266.3606,195.133333%20267.46092,195.133333%20Z%20M275.92069,192.926437%20C276.276183,192.926437%20276.564368,193.214621%20276.564368,193.570115%20C276.564368,193.895984%20276.322213,194.165295%20276.008033,194.207917%20L275.92069,194.213793%20L264.886207,194.213793%20C264.530713,194.213793%20264.242529,193.925609%20264.242529,193.570115%20C264.242529,193.244246%20264.484684,192.974935%20264.798864,192.932313%20L264.886207,192.926437%20L275.92069,192.926437%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",w0e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e双X轴%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-261.000000,%20-190.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M261.943678,190.71954%20C262.269547,190.71954%20262.538858,190.961695%20262.58148,191.275875%20L262.587356,191.363218%20L262.587356,205.432184%20L276.656322,205.432184%20C276.982191,205.432184%20277.251502,205.674339%20277.294124,205.988519%20L277.3,206.075862%20C277.3,206.401731%20277.057845,206.671042%20276.743665,206.713664%20L276.656322,206.71954%20L261.943678,206.71954%20C261.617809,206.71954%20261.348498,206.477385%20261.305876,206.163205%20L261.3,206.075862%20L261.3,191.363218%20C261.3,191.007725%20261.588185,190.71954%20261.943678,190.71954%20Z%20M275.92069,201.754023%20C276.276183,201.754023%20276.564368,202.042208%20276.564368,202.397701%20C276.564368,202.72357%20276.322213,202.992881%20276.008033,203.035503%20L275.92069,203.041379%20L264.886207,203.041379%20C264.530713,203.041379%20264.242529,202.753195%20264.242529,202.397701%20C264.242529,202.071832%20264.484684,201.802521%20264.798864,201.759899%20L264.886207,201.754023%20L275.92069,201.754023%20Z%20M267.46092,195.133333%20C268.751499,195.133333%20269.611523,195.601341%20270.148649,196.415716%20C270.290746,196.631159%20270.503972,197.084502%20270.61416,197.394442%20L270.648966,197.50023%20L270.597245,197.301589%20C271.106782,198.211476%20271.67562,198.746129%20272.675247,198.80588%20L272.867816,198.811494%20C273.440204,198.811494%20273.863943,198.569358%20274.192294,198.142928%20C274.399952,197.873242%20274.521197,197.599759%20274.565219,197.442537%20C274.66107,197.100209%20275.016285,196.900401%20275.358612,196.996253%20C275.70094,197.092105%20275.900748,197.447319%20275.804896,197.789647%20C275.720183,198.092195%20275.53568,198.508367%20275.212304,198.928336%20C274.655597,199.651332%20273.872439,200.098851%20272.867816,200.098851%20C271.896559,200.098851%20271.089782,199.765036%20270.443714,199.18819%20C270.052821,198.839178%20269.807088,198.50782%20269.482578,197.814453%20L269.391954,197.616092%20L269.474019,197.930595%20L269.240518,197.436037%20L269.148886,197.255161%20C269.120289,197.201186%20269.094481,197.155581%20269.07399,197.124514%20C268.773906,196.669535%20268.316621,196.42069%20267.46092,196.42069%20C266.75894,196.42069%20266.259435,196.675539%20265.894017,197.11056%20C265.671566,197.375383%20265.54775,197.640703%20265.506046,197.789647%20C265.410194,198.131974%20265.05498,198.331783%20264.712652,198.235931%20C264.370324,198.140079%20264.170516,197.784865%20264.266368,197.442537%20C264.353399,197.131711%20264.551422,196.707376%20264.908282,196.282543%20C265.508381,195.568139%20266.3606,195.133333%20267.46092,195.133333%20Z%20M275.92069,192.926437%20C276.276183,192.926437%20276.564368,193.214621%20276.564368,193.570115%20C276.564368,193.895984%20276.322213,194.165295%20276.008033,194.207917%20L275.92069,194.213793%20L264.886207,194.213793%20C264.530713,194.213793%20264.242529,193.925609%20264.242529,193.570115%20C264.242529,193.244246%20264.484684,192.974935%20264.798864,192.932313%20L264.886207,192.926437%20L275.92069,192.926437%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",apt={class:"deep-displacement-chart"},opt={class:"chart-header"},spt={class:"chart-title"},lpt={class:"chart-subtitle"},cpt={DEFAULT_ICON:S0e,ACTIVE_ICON:w0e,NAME_CN:"深部位移曲线图",NAME_EN:"Deep Displacement Chart",ORDER:13,PLATFORM:["pc","screen"]},upt={title:{value:"ZK10-深部位移01",type:"string",label:"component.deepDisplacement.title"},depth:{value:152,type:"number",label:"component.deepDisplacement.depth",min:1,max:500},bgColor:{value:"#ffffff",type:"color",label:"component.options.bgColor"},textColor:{value:"#333333",type:"color",label:"component.options.textColor"},points:{value:30,type:"number",label:"component.options.points",min:5,max:100}},dpt=[{configPanelId:"",name:"ZK10-X位移",object_id:"",points_fv:"points",fv:"disp_x",depth_fv:"depth",color:"#4a90d9"}],fpt=["configPanelId","name","object_id","points_fv","fv","depth_fv","color"],hpt=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],ppt={useAlias:!1,multiObject:!1,source:"mosaic"},mpt={DEFAULT:cpt,OPTIONS:upt,DATA:dpt,PARAMS:fpt,SOURCE:hpt,COMMON:ppt},vpt=o.defineComponent(tt(Ne({},mpt),{__name:"deepDisplacementChart",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){o.useCssVars(y=>({v93f7bd4a:o.unref(f).bgColor,v4701439a:o.unref(f).textColor}));const e=ua(),t=n,r=o.ref({selectedTimes:[],startDate:"",endDate:""}),i=o.ref(new Map),a=`dispChart_${Date.now()}_${Math.random().toString(36).slice(2,8)}`;let s=null,l=null;const c=["#4a90d9","#67c23a","#e6a23c","#f56c6c","#909399","#00bcd4","#9c27b0","#ff9800","#795548","#607d8b"];class u extends Cn{extractStyles(){var x,_,w,S,C;const{options:b}=this.props.conf;return{title:((x=b==null?void 0:b.title)==null?void 0:x.value)||"ZK10-深部位移01",depth:((_=b==null?void 0:b.depth)==null?void 0:_.value)||152,bgColor:((w=b==null?void 0:b.bgColor)==null?void 0:w.value)||"#ffffff",textColor:((S=b==null?void 0:b.textColor)==null?void 0:S.value)||"#333333",points:((C=b==null?void 0:b.points)==null?void 0:C.value)||30}}getDefaultData(){return[{configPanelId:"",name:"ZK10-X位移",object_id:"",points_fv:"points",fv:"disp_x",depth_fv:"depth",color:"#4a90d9"}]}getMockData(){var w;const b=((w=this.props.conf)==null?void 0:w.data)||this.getDefaultData(),x=["2026-01-15","2026-01-14","2026-01-13","2026-01-12","2026-01-11"],_=new Map;return b.forEach((S,C)=>{const E=new Map;x.forEach((T,A)=>{const M=[],D=(x.length-1-A)*5;for(let k=0;k<=30;k++){const P=-122-k,I=(10+D+C*3)*(1+k*.03);M.push({depth:P,value:I+Math.sin(k*.2+C)*2})}E.set(T,M)}),_.set(S.name,E)}),_}onPreview(){return Ve(this,null,function*(){const{data:b}=this.props.conf;b.some(_=>_.object_id&&_.fv)?(console.log("[DeepDisplacementChart] 检测到数据绑定,订阅真实数据"),yield Fi(u.prototype,this,"onPreview").call(this)):(console.log("[DeepDisplacementChart] 未配置数据源,使用模拟数据"),this.getMockData().forEach((w,S)=>i.value.set(S,w)),m())})}setHistoryData(b){var E,T;const{data:x,common:_}=this.props.conf;if(!x||x.length===0||!x.some(A=>A.object_id&&A.fv))return;const S=(_==null?void 0:_.source)||"mosaic";["statistics","calculate"].includes(S)&&(b=Mo(b,x));const C=Gs(b,this.props,"history");if(C){try{i.value.clear();const A=x.find(I=>I.object_id);if(!A)return;const M=x.indexOf(A),D=((E=C.history)==null?void 0:E[M])||[],k=A.points_fv||"points";D.length>0&&Array.isArray((T=D[0])==null?void 0:T[k])?x.forEach(I=>{if(!I.object_id||!I.fv)return;const N=new Map,R=new Map;D.forEach(V=>{const F=(V.time||V.datetime||"").split(" ")[0];R.has(F)||R.set(F,[]),(V[k]||[]).forEach(U=>{var z,j,W;R.get(F).push({depth:(j=(z=U[I.depth_fv])!=null?z:U.depth)!=null?j:0,value:(W=U[I.fv])!=null?W:0})})}),R.forEach((V,B)=>{const F=new Map;V.forEach(U=>F.set(U.depth,U.value));const G=Array.from(F.entries()).map(([U,z])=>({depth:U,value:z})).sort((U,z)=>z.depth-U.depth);N.set(B,G)}),i.value.set(I.name,N)}):x.forEach((I,N)=>{var F;if(!I.object_id||!I.fv)return;const R=((F=C.history)==null?void 0:F[N])||[],V=new Map,B=new Map;R.forEach(G=>{var j,W;const z=(G.time||G.datetime||"").split(" ")[0];B.has(z)||B.set(z,[]),B.get(z).push({depth:(j=G[I.depth_fv])!=null?j:0,value:(W=G[I.fv])!=null?W:0})}),B.forEach((G,U)=>{V.set(U,G)}),i.value.set(I.name,V)})}catch(A){console.error("[Chart] 解析历史数据失败:",A)}m()}}setSocketData(b){b&&console.log("[DeepDisplacementChart] 收到实时数据:",b)}}const d=new u(t,"deepDisplacementChart");(!t.conf.data||t.conf.data.length===0)&&(t.conf.data=d.getDefaultData()),d.setupLifecycle();const f=d.getStyle(),h=o.computed(()=>{const y=r.value.selectedTimes||[];if(y.length===0)return"";const b=[...y].sort(),x=b[0],_=b[b.length-1];return`${x} ~ ${_} [${y.length}天]`}),p=()=>{var A;const y=f.value,b=r.value,x=((A=t.conf)==null?void 0:A.data)||d.getDefaultData();let _=b.selectedTimes||[];if(i.value.size===0&&d.getMockData().forEach((D,k)=>i.value.set(k,D)),_.length===0&&i.value.size>0){const M=i.value.values().next().value;M&&(_=Array.from(M.keys()))}_=[..._].sort().reverse();const w=[];let S=[],C=0;x.forEach(M=>{const D=i.value.get(M.name);if(!D)return;const k=M.color||c[C%c.length];C++,_.forEach((P,I)=>{const N=D.get(P)||[];if(N.length===0)return;N.forEach(B=>S.push(B.depth));const R=1-I*.15,V=k;w.push({name:`${M.name} (${P})`,type:"line",data:N.map(B=>[B.value,B.depth]),smooth:!0,symbol:"circle",symbolSize:4,lineStyle:{color:V,width:2,opacity:R},itemStyle:{color:V,opacity:R}})})}),S.length===0&&(S=[-122,-152]);const E=Math.min(...S),T=Math.max(...S);return{grid:{left:60,right:140,top:30,bottom:60},tooltip:{trigger:"axis",backgroundColor:"rgba(255,255,255,0.95)",borderColor:"#e5e5e5",textStyle:{color:"#333",fontSize:12},formatter:M=>{if(!M||M.length===0)return"";let k=`<div style="padding:8px;max-width:280px;">
3945
+ ${v}`},color:f.textColor,fontSize:f.textSize}}],yAxis:[{type:"value",nameGap:10,nameTextStyle:{align:"right"},splitLine:{lineStyle:{type:"dashed",color:"#e5e5e5"}},axisLabel:{color:f.textColor,fontSize:f.textSize},axisLine:{lineStyle:{color:f.textColor}},splitNumber:4}],series:this.formatSeries()}}formatSeries(){var g,y,b;const f=this.props.conf,h=this.Style.value,p=this.getFixedStatisticsXLabels(),m=(g=this.historyCache)==null?void 0:g.seriesData,v=(b=(y=m==null?void 0:m[0])==null?void 0:y.length)!=null?b:p?p.length:h.points;return f.data.map((x,_)=>{var S;const w=x.color||Hs[_];return{type:"bar",stack:"total",data:(S=m==null?void 0:m[_])!=null?S:vu({num:v,max:200,min:0,mode:this.props.mode,hasDataSource:this.hasData()}),name:x.name,itemStyle:{color:w},label:{show:h.showLabel,position:"inside",color:"#fff"},barWidth:h.barWidth+"%"}})}setSocketData(f){var _;if(!this.hasData()||!this.chartObj||!f)return;const{data:h,common:p}=this.props.conf,m=p.source||"mosaic",v=this.chartObj.getOption(),g=(_=h[0])==null?void 0:_.periodUnit,y=["statistics","calculate"].includes(m)&&g&&!String(g).startsWith("near");if(h.forEach((w,S)=>{const C=this.extractDataValue(f,w.fv);if(["statistics","calculate"].includes(m)&&w.periodUnit&&!String(w.periodUnit).startsWith("near")&&!String(w.periodUnit).startsWith("last")){const T=Iv(f.start_time,w.periodUnit),A=T?v.xAxis[0].data.indexOf(T):-1;A>=0&&(v.series[S].data[A]=C);return}const E=["statistics","calculate"].includes(m)?f.start_time:f.datetime;E!=null&&(S===0&&v.xAxis[0].data.push(E),v.series[S].data.push(C))}),y){this.syncHistoryCache(v.xAxis[0].data,v.series.map(w=>w.data)),this.updateChart(v);return}const b=n3(v.xAxis[0].data,v.series.map(w=>w.data)),x=Number(this.Style.value.points)||10;v.xAxis[0].data=b.times.slice(-x),v.series.forEach((w,S)=>{var C;w.data=((C=b.data[S])==null?void 0:C.slice(-x))||[]}),this.syncHistoryCache(v.xAxis[0].data,v.series.map(w=>w.data)),this.updateChart(v)}setHistoryData(f){var x;if(!(f!=null&&f.length))return;const h=f[0];if(!((x=h==null?void 0:h.time)!=null&&x.length))return;const p=Number(this.Style.value.points)||10,{data:m}=this.props.conf,v=_=>{if(_==null||_===""||_==="-")return null;const w=Number(_);return Number.isFinite(w)?w:null},g=this.getFixedStatisticsXLabels();let y;const b=[];g!=null&&g.length?(y=[...g],f.forEach((_,w)=>{var M;const S=m[w],C=(S==null?void 0:S.periodUnit)||((M=m[0])==null?void 0:M.periodUnit),E=new Array(g.length).fill(null),T=_.time||[],A=_.data||[];for(let D=0;D<T.length;D++){const k=Iv(T[D],String(C||"")),P=k?g.indexOf(k):-1;P>=0&&(E[P]=v(A[D]))}b[w]=E})):(y=h.time.slice(-p),f.forEach((_,w)=>{const S=_.data||[];b[w]=S.map(v).slice(-p)})),this.syncHistoryCache(y,b),this.updateChart({xAxis:[{data:y}],series:b.map(_=>({data:_}))})}}const i=new r(e,"stackedBar");i.setupLifecycle();const a=Na();o.onMounted(()=>{var d;if(a.registerInstance(e.uid,i),e.mode==="preview"){const f=((d=i.getChartInstance)==null?void 0:d.call(i))||i.chartObj;f==null||f.off("click"),f==null||f.on("click",h=>{var m,v,g,y,b,x;const p=h==null?void 0:h.seriesName;if(typeof p=="string"&&p){const _=((v=(m=e.conf)==null?void 0:m.options)==null?void 0:v.linkChannel)==="custom"?(y=(g=e.conf)==null?void 0:g.options)==null?void 0:y.customChannel:(x=(b=e.conf)==null?void 0:b.options)==null?void 0:x.linkChannel;t.publish(_||"stackedBar","stackedBar",{objectId:"",deviceId:"",type:"select",fieldKey:p,fv:Ne({key:p},h),source:"stackedBar"})}})}}),o.onUnmounted(()=>{a.unregisterInstance(e.uid)});const s=i.getStyle(),l=i.getEchartId(),c=e.conf,u=o.computed(()=>$n(e.conf.options));return(d,f)=>(o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({background:o.unref(s).bgColor,borderRadius:`${o.unref(s).radiusSize}px`})},[o.createElementVNode("div",{class:"mix-title",style:o.normalizeStyle(u.value)},o.toDisplayString(o.unref(c).caption||o.unref(c).name),5),o.createElementVNode("div",Ect,[o.createElementVNode("div",{class:"w-full h-full",id:o.unref(l)},null,8,Act)]),o.renderSlot(d.$slots,"default",{},void 0,!0)],4))}})),Ict=Dt(kct,[["__scopeId","data-v-b49ef526"]]),Rct=Object.freeze(Object.defineProperty({__proto__:null,default:Ict},Symbol.toStringTag,{value:"Module"})),Jde="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e数组卡片%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-733.000000,%20-221.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cg%20id='卡片查看模式_view-grid-card备份'%20transform='translate(733.833333,%20222.995324)'%3e%3cpath%20d='M14.4615385,0%20C15.3112073,0%2016,0.688792693%2016,1.53846154%20L16,1.53846154%20L16,12.7130579%20C16,13.5627267%2015.3112073,14.2515194%2014.4615385,14.2515194%20L14.4615385,14.2515194%20L1.53846154,14.2515194%20C0.688792693,14.2515194%200,13.5627267%200,12.7130579%20L0,12.7130579%20L0,1.53846154%20C0,0.688792693%200.688792693,0%201.53846154,0%20L1.53846154,0%20Z%20M14.4615385,1.23076923%20L1.53846154,1.23076923%20C1.36852777,1.23076923%201.23076923,1.36852777%201.23076923,1.53846154%20L1.23076923,1.53846154%20L1.23076923,12.7130579%20C1.23076923,12.8829916%201.36852777,13.0207502%201.53846154,13.0207502%20L1.53846154,13.0207502%20L14.4615385,13.0207502%20C14.6314722,13.0207502%2014.7692308,12.8829916%2014.7692308,12.7130579%20L14.7692308,12.7130579%20L14.7692308,1.53846154%20C14.7692308,1.36852777%2014.6314722,1.23076923%2014.4615385,1.23076923%20L14.4615385,1.23076923%20Z%20M12.6961184,7.52450725%20C13.035986,7.52450725%2013.3115031,7.80002432%2013.3115031,8.13989186%20L13.3115031,8.13989186%20L13.3115031,10.7985846%20C13.3115031,11.1384522%2013.035986,11.4139693%2012.6961184,11.4139693%20L12.6961184,11.4139693%20L3.48717949,11.4139693%20C3.14731195,11.4139693%202.87179487,11.1384522%202.87179487,10.7985846%20L2.87179487,10.7985846%20L2.87179487,8.13989186%20C2.87179487,7.80002432%203.14731195,7.52450725%203.48717949,7.52450725%20L3.48717949,7.52450725%20Z%20M12.08,8.75507692%20L4.10184615,8.75507692%20L4.10184615,10.1830769%20L12.08,10.1830769%20L12.08,8.75507692%20Z%20M12.6961184,2.87179487%20C13.035986,2.87179487%2013.3115031,3.14731195%2013.3115031,3.48717949%20L13.3115031,3.48717949%20L13.3115031,6.14587227%20C13.3115031,6.48573981%2013.035986,6.76125689%2012.6961184,6.76125689%20L12.6961184,6.76125689%20L3.48717949,6.76125689%20C3.14731195,6.76125689%202.87179487,6.48573981%202.87179487,6.14587227%20L2.87179487,6.14587227%20L2.87179487,3.48717949%20C2.87179487,3.14731195%203.14731195,2.87179487%203.48717949,2.87179487%20L3.48717949,2.87179487%20Z%20M12.08,4.10184615%20L4.10184615,4.10184615%20L4.10184615,5.52984615%20L12.08,5.52984615%20L12.08,4.10184615%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Qde="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e数组卡片%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-733.000000,%20-221.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cg%20id='卡片查看模式_view-grid-card备份'%20transform='translate(733.833333,%20222.995324)'%3e%3cpath%20d='M14.4615385,0%20C15.3112073,0%2016,0.688792693%2016,1.53846154%20L16,1.53846154%20L16,12.7130579%20C16,13.5627267%2015.3112073,14.2515194%2014.4615385,14.2515194%20L14.4615385,14.2515194%20L1.53846154,14.2515194%20C0.688792693,14.2515194%200,13.5627267%200,12.7130579%20L0,12.7130579%20L0,1.53846154%20C0,0.688792693%200.688792693,0%201.53846154,0%20L1.53846154,0%20Z%20M14.4615385,1.23076923%20L1.53846154,1.23076923%20C1.36852777,1.23076923%201.23076923,1.36852777%201.23076923,1.53846154%20L1.23076923,1.53846154%20L1.23076923,12.7130579%20C1.23076923,12.8829916%201.36852777,13.0207502%201.53846154,13.0207502%20L1.53846154,13.0207502%20L14.4615385,13.0207502%20C14.6314722,13.0207502%2014.7692308,12.8829916%2014.7692308,12.7130579%20L14.7692308,12.7130579%20L14.7692308,1.53846154%20C14.7692308,1.36852777%2014.6314722,1.23076923%2014.4615385,1.23076923%20L14.4615385,1.23076923%20Z%20M12.6961184,7.52450725%20C13.035986,7.52450725%2013.3115031,7.80002432%2013.3115031,8.13989186%20L13.3115031,8.13989186%20L13.3115031,10.7985846%20C13.3115031,11.1384522%2013.035986,11.4139693%2012.6961184,11.4139693%20L12.6961184,11.4139693%20L3.48717949,11.4139693%20C3.14731195,11.4139693%202.87179487,11.1384522%202.87179487,10.7985846%20L2.87179487,10.7985846%20L2.87179487,8.13989186%20C2.87179487,7.80002432%203.14731195,7.52450725%203.48717949,7.52450725%20L3.48717949,7.52450725%20Z%20M12.08,8.75507692%20L4.10184615,8.75507692%20L4.10184615,10.1830769%20L12.08,10.1830769%20L12.08,8.75507692%20Z%20M12.6961184,2.87179487%20C13.035986,2.87179487%2013.3115031,3.14731195%2013.3115031,3.48717949%20L13.3115031,3.48717949%20L13.3115031,6.14587227%20C13.3115031,6.48573981%2013.035986,6.76125689%2012.6961184,6.76125689%20L12.6961184,6.76125689%20L3.48717949,6.76125689%20C3.14731195,6.76125689%202.87179487,6.48573981%202.87179487,6.14587227%20L2.87179487,6.14587227%20L2.87179487,3.48717949%20C2.87179487,3.14731195%203.14731195,2.87179487%203.48717949,2.87179487%20L3.48717949,2.87179487%20Z%20M12.08,4.10184615%20L4.10184615,4.10184615%20L4.10184615,5.52984615%20L12.08,5.52984615%20L12.08,4.10184615%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Vct={class:"mix-body"},Bct={DEFAULT_ICON:Jde,ACTIVE_ICON:Qde,NAME_CN:"统计",NAME_EN:"Array Card",ORDER:5,PLATFORM:["pc","screen","mobile"]},Fct={titleColor:"#111",titleSize:14,bgColor:"#fff",textColor:"#111",textSize:48,radiusSize:8,isHideTitle:!0,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4},$de=[{fv:"",object_id:""}],zct=["fv","object_id"],Uct=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],Hct=1,jct={useAlias:!1,source:"mosaic",multiObject:!1,hideMultiObject:!0},Gct={DEFAULT:Bct,OPTIONS:Fct,DATA:$de,PARAMS:zct,SOURCE:Uct,ITEMS:Hct,COMMON:jct},Yct=o.defineComponent(tt(Ne({},Gct),{__name:"arrayCard",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(n){const e=n;class t extends Cn{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),textSize:this.getOptionValue("textSize",48),radiusSize:this.getOptionValue("radiusSize",8),isHideTitle:this.getOptionValue("isHideTitle",!0)}}init(){return Ve(this,null,function*(){var d;this.Style.value=this.extractStyles(),this.applyTheme(),(d=this.props.conf.data)!=null&&d.length||(this.props.conf.data=$de)})}setHistoryData(d){if(!d)return;const{data:f}=this.props.conf;if(!Array.isArray(f)||!f.length)return;let h=!1;f.forEach((p,m)=>{try{const v=d[m].data[0];v!=null&&p.value!==v&&(p.value=v,h=!0)}catch(v){}}),h&&this.notifyDataChanged()}setSocketData(d){if(!d)return;const{data:f}=this.props.conf;let h=!1;f.forEach(p=>{if(!this.shouldApplyRealtimeToItem(d,p))return;const m=this.extractDataValue(d,p.fv,p);m!=null&&p.value!==m&&(p.value=m,h=!0)}),h&&this.notifyDataChanged()}notifyDataChanged(){s.value++}}const r=new t(e,"arrayCard");r.setupLifecycle();const i=r.getStyle(),a=e.conf,s=o.ref(0),l=o.computed(()=>$n(e.conf.options)),c=u=>{var m;s.value;const d=((m=u==null?void 0:u[0])==null?void 0:m.value)||0,f=String(Math.floor(Number(d)||0)),h=[];let p=0;for(;p<f.length;)h.push(f.slice(p,p+3)),p+=3;return h.flatMap((v,g)=>g>0?[",",v]:[v])};return(u,d)=>(o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({background:o.unref(i).bgColor,borderRadius:`${o.unref(i).radiusSize}px`})},[o.createElementVNode("div",{class:"mix-title",style:o.normalizeStyle(l.value)},o.toDisplayString(o.unref(a).caption||o.unref(a).name),5),o.createElementVNode("div",Vct,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(c(o.unref(a).data),(f,h)=>(o.openBlock(),o.createElementBlock("div",{key:h,class:o.normalizeClass(["digit-item",{separator:f==","}]),style:o.normalizeStyle({fontSize:`${o.unref(i).textSize}px`,color:o.unref(i).textColor})},o.toDisplayString(f),7))),128))]),o.renderSlot(u.$slots,"default",{},void 0,!0)],4))}})),Wct=Dt(Yct,[["__scopeId","data-v-247945e5"]]),Xct=Object.freeze(Object.defineProperty({__proto__:null,default:Wct},Symbol.toStringTag,{value:"Module"})),e0e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e基础卡片%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-105.000000,%20-96.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M119.607399,97.4683109%20C120.37652,97.4683109%20121,98.0917972%20121,98.860912%20L121,98.860912%20L121,109.139088%20C121,109.908212%20120.376522,110.531689%20119.607399,110.531689%20L119.607399,110.531689%20L106.392601,110.531689%20C105.623486,110.531689%20105,109.908209%20105,109.139088%20L105,109.139088%20L105,98.860912%20C105,98.0917994%20105.623489,97.4683109%20106.392601,97.4683109%20L106.392601,97.4683109%20Z%20M119.607399,98.7852022%20L106.392601,98.7852022%20C106.350788,98.7852022%20106.316891,98.8190984%20106.316891,98.860912%20L106.316891,98.860912%20L106.316891,109.139088%20C106.316891,109.180907%20106.350782,109.214798%20106.392601,109.214798%20L106.392601,109.214798%20L119.607399,109.214798%20C119.649223,109.214798%20119.683109,109.180913%20119.683109,109.139088%20L119.683109,109.139088%20L119.683109,98.860912%20C119.683109,98.8190931%20119.649218,98.7852022%20119.607399,98.7852022%20L119.607399,98.7852022%20Z%20M117.588471,104.993404%20C117.952121,104.993404%20118.246917,105.2882%20118.246917,105.65185%20C118.246917,105.985195%20117.999206,106.260685%20117.677819,106.304285%20L117.588471,106.310295%20L108.411529,106.310295%20C108.047879,106.310295%20107.753083,106.015499%20107.753083,105.65185%20C107.753083,105.318504%20108.000794,105.043015%20108.322181,104.999415%20L108.411529,104.993404%20L117.588471,104.993404%20Z%20M112.449383,100.77201%20C112.813033,100.77201%20113.107829,101.066806%20113.107829,101.430456%20C113.107829,101.763801%20112.860118,102.039291%20112.538731,102.082891%20L112.449383,102.088902%20L108.411529,102.088902%20C108.047879,102.088902%20107.753083,101.794105%20107.753083,101.430456%20C107.753083,101.097111%20108.000794,100.821621%20108.322181,100.778021%20L108.411529,100.77201%20L112.449383,100.77201%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",t0e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e基础卡片%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-105.000000,%20-96.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M119.607399,97.4683109%20C120.37652,97.4683109%20121,98.0917972%20121,98.860912%20L121,98.860912%20L121,109.139088%20C121,109.908212%20120.376522,110.531689%20119.607399,110.531689%20L119.607399,110.531689%20L106.392601,110.531689%20C105.623486,110.531689%20105,109.908209%20105,109.139088%20L105,109.139088%20L105,98.860912%20C105,98.0917994%20105.623489,97.4683109%20106.392601,97.4683109%20L106.392601,97.4683109%20Z%20M119.607399,98.7852022%20L106.392601,98.7852022%20C106.350788,98.7852022%20106.316891,98.8190984%20106.316891,98.860912%20L106.316891,98.860912%20L106.316891,109.139088%20C106.316891,109.180907%20106.350782,109.214798%20106.392601,109.214798%20L106.392601,109.214798%20L119.607399,109.214798%20C119.649223,109.214798%20119.683109,109.180913%20119.683109,109.139088%20L119.683109,109.139088%20L119.683109,98.860912%20C119.683109,98.8190931%20119.649218,98.7852022%20119.607399,98.7852022%20L119.607399,98.7852022%20Z%20M117.588471,104.993404%20C117.952121,104.993404%20118.246917,105.2882%20118.246917,105.65185%20C118.246917,105.985195%20117.999206,106.260685%20117.677819,106.304285%20L117.588471,106.310295%20L108.411529,106.310295%20C108.047879,106.310295%20107.753083,106.015499%20107.753083,105.65185%20C107.753083,105.318504%20108.000794,105.043015%20108.322181,104.999415%20L108.411529,104.993404%20L117.588471,104.993404%20Z%20M112.449383,100.77201%20C112.813033,100.77201%20113.107829,101.066806%20113.107829,101.430456%20C113.107829,101.763801%20112.860118,102.039291%20112.538731,102.082891%20L112.449383,102.088902%20L108.411529,102.088902%20C108.047879,102.088902%20107.753083,101.794105%20107.753083,101.430456%20C107.753083,101.097111%20108.000794,100.821621%20108.322181,100.778021%20L108.411529,100.77201%20L112.449383,100.77201%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Zct={class:"value-main"},qct={key:0,class:"value-unit"},mQ="--",Kct={DEFAULT_ICON:e0e,ACTIVE_ICON:t0e,NAME_CN:"基础卡片",NAME_EN:"Card",ORDER:1,PLATFORM:["pc","screen","mobile"]},Jct={titleColor:"#111",titleSize:14,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4,labelColor:"#111",textColor:"#111",bgColor:"#fff",valueSize:28,nameSize:14,radiusSize:8,isHideTitle:!0,showTopGradient:!1,topGradientStart:{value:"#f5a623",type:"color",label:"component.options.topGradientStart",dependent:"showTopGradient"},topGradientHeight:{value:2,type:"number",min:1,max:16,label:"component.options.topGradientHeight",dependent:"showTopGradient"},topGradientPosition:{value:"cardItem",type:"select",label:"component.options.topGradientPosition",dependent:"showTopGradient",options:[{label:"component.options.topGradientPosition_cardItem",value:"cardItem"},{label:"component.options.topGradientPosition_aboveTitle",value:"aboveTitle"}]},showBgIcon:!1,defaultBgIcon:{value:"",type:"text",label:"component.options.defaultBgIcon",dependent:"showBgIcon"},bgIconOpacity:{value:.06,type:"number",min:0,max:1,step:.01,label:"component.options.bgIconOpacity",dependent:"showBgIcon"},bgIconSize:{value:40,type:"number",min:8,max:120,label:"component.options.bgIconSize",dependent:"showBgIcon"},bgIconPosition:{value:"right",type:"select",label:"component.options.bgIconPosition",dependent:"showBgIcon",options:[{label:"component.options.bgIconPosition_right",value:"right"},{label:"component.options.bgIconPosition_left",value:"left"}]},paramsLayout:{value:"horizontal",type:"select",label:"component.options.paramsLayout",options:[{label:"component.options.paramsLayout_horizontal",value:"horizontal"},{label:"component.options.paramsLayout_vertical",value:"vertical"}]}},Qct=[{name:"参数一",fv:"",object_id:"",unit:"",default:"",isText:!1,flag:[{code:0,text:""}],valueFontSize:0,nameFontSize:0,valueTextColor:"",nameTextColor:"",areaWeight:1,cellPadding:0,valueAlign:"center"}],$ct=["name","fv","object_id","unit","default","isText",{key:"valueFontSize",type:"number",label:"component.options.crdValueFontSize",group:"component.options.crdGroupCellStyle",groupCollapsedByDefault:!0,min:0,max:120},{key:"nameFontSize",type:"number",label:"component.options.crdNameFontSize",group:"component.options.crdGroupCellStyle",min:0,max:120},{key:"valueTextColor",type:"color",label:"component.options.crdValueTextColor",group:"component.options.crdGroupCellStyle"},{key:"valueAlign",type:"select",label:"component.options.crdValueAlign",group:"component.options.crdGroupCellStyle",options:[{label:"component.options.crdValueAlign_left",value:"left"},{label:"component.options.crdValueAlign_center",value:"center"},{label:"component.options.crdValueAlign_right",value:"right"}]},{key:"nameTextColor",type:"color",label:"component.options.crdNameTextColor",group:"component.options.crdGroupCellStyle"},{key:"areaWeight",type:"number",label:"component.options.crdAreaWeight",group:"component.options.crdGroupCellStyle",min:1,max:32},{key:"cellPadding",type:"number",label:"component.options.crdCellPadding",group:"component.options.crdGroupCellStyle",min:0,max:64}],eut=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime","summary"],tut={useAlias:!1,multiObject:!1,source:"mosaic",object_id:"",object_alias:""},nut={DEFAULT:Kct,OPTIONS:Jct,DATA:Qct,PARAMS:$ct,SOURCE:eut,COMMON:tut},rut=o.defineComponent(tt(Ne({},nut),{__name:"crd",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(n){const e={valueFontSize:0,nameFontSize:0,valueTextColor:"",nameTextColor:"",areaWeight:1,cellPadding:0,valueAlign:"center"},t=n;class r extends Cn{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),labelColor:this.getOptionValue("labelColor","#111"),textColor:this.getOptionValue("textColor","#111"),nameSize:this.getOptionValue("nameSize",14),valueSize:this.getOptionValue("valueSize",28),radiusSize:this.getOptionValue("radiusSize",8),isHideTitle:this.getOptionValue("isHideTitle",!0),showTopGradient:this.getOptionValue("showTopGradient",!1),topGradientStart:this.getOptionValue("topGradientStart","#f5a623"),topGradientHeight:this.getOptionValue("topGradientHeight",2),topGradientPosition:this.getOptionValue("topGradientPosition","cardItem"),showBgIcon:this.getOptionValue("showBgIcon",!1),defaultBgIcon:this.getOptionValue("defaultBgIcon",""),bgIconOpacity:this.getOptionValue("bgIconOpacity",.06),bgIconSize:this.getOptionValue("bgIconSize",40),bgIconPosition:this.getOptionValue("bgIconPosition","right"),paramsLayout:this.getOptionValue("paramsLayout","horizontal")}}init(){return Ve(this,null,function*(){var S;this.Style.value=this.extractStyles(),this.applyTheme();const w={name:"参数一",fv:"",object_id:"",unit:"",default:"",isText:!1,flag:[{code:0,text:""}]};if(!((S=this.props.conf.data)!=null&&S.length))this.props.conf.data=[Ne(Ne({},w),e)];else for(const C of this.props.conf.data)if(!(!C||typeof C!="object")){for(const[E,T]of Object.entries(e))C[E]===void 0&&(C[E]=T);C.isText&&(!Array.isArray(C.flag)||C.flag.length===0)&&(C.flag=[{code:0,text:""}])}})}setHistoryData(w){if(!w)return;const{data:S}=this.props.conf;if(!Array.isArray(S)||!S.length)return;let C=!1;S.forEach((E,T)=>{try{const A=w[T].data[0];A!=null&&E.value!==A&&(E.value=A,C=!0)}catch(A){}}),C&&this.notifyDataChanged()}notifyDataChanged(){s.value++}}const i=new r(t,"crd");i.setupLifecycle();const a=i.getStyle(),s=o.ref(0),l=o.computed(()=>$n(t.conf.options)),c=o.computed(()=>{const _=l.value||{},w=parseFloat(String(_.fontSize||"14"))||14,S=String(_.padding||"").split(" ").filter(Boolean),C=S.length>0&&parseFloat(S[0])||0,E=Math.ceil(w*1.5),T=Math.max(0,E+C*2);return tt(Ne({},_),{minHeight:`${T}px`})}),u=o.computed(()=>{const _=a.value,w=Number(_.topGradientHeight)||2,S=_.topGradientStart||"#f5a623";return{height:`${w}px`,background:`linear-gradient(90deg, ${S}, transparent)`}}),d=o.computed(()=>{const _=a.value;return!!_.showTopGradient&&_.topGradientPosition==="aboveTitle"}),f=o.computed(()=>{const _=a.value;return!!_.showTopGradient&&_.topGradientPosition!=="aboveTitle"}),h=o.computed(()=>a.value.paramsLayout==="vertical"),p=o.computed(()=>{var S;const _=a.value,w=_.bgIconPosition==="right";return{opacity:(S=_.bgIconOpacity)!=null?S:.06,fontSize:`${Number(_.bgIconSize)||40}px`,display:"flex",alignItems:"center",justifyContent:w?"flex-end":"flex-start",paddingRight:w?"12px":void 0,paddingLeft:w?void 0:"12px"}});function m(_){s.value;const w=Number(_==null?void 0:_.areaWeight),S=Number.isFinite(w)&&w>0?w:1,C=Number(_==null?void 0:_.cellPadding),E={flex:`${S} 1 0`,minWidth:"0",minHeight:"0"};return Number.isFinite(C)&&C>0&&(E.padding=`${C}px`),E}function v(_){s.value;const w=a.value,S=Number(_==null?void 0:_.valueFontSize),C=Number.isFinite(S)&&S>0?S:w.valueSize,E=typeof(_==null?void 0:_.valueTextColor)=="string"?_.valueTextColor.trim():"",T=_==null?void 0:_.valueAlign,A=T==="left"||T==="right"||T==="center"?T:"center",M=A==="left"?"flex-start":A==="right"?"flex-end":"center";return{color:E||w.textColor,fontSize:`${C}px`,width:"100%",justifyContent:M,textAlign:A}}function g(_){s.value;const w=a.value,S=Number(_==null?void 0:_.nameFontSize),C=Number.isFinite(S)&&S>0?S:w.nameSize;return{color:(typeof(_==null?void 0:_.nameTextColor)=="string"?_.nameTextColor.trim():"")||w.labelColor,fontSize:`${C}px`}}function y(){const _=a.value.defaultBgIcon,w=typeof _=="string"?_.trim():"";return w?Vx(w):""}const b=_=>{var E,T,A,M;if(s.value,!_)return{value:mQ,name:"--",unit:""};const w=(E=_.name)!=null?E:"",S=typeof _.unit=="string"?_.unit.trim():"";return _.isText?{value:(((T=_.flag)==null?void 0:T.find(k=>String(k.code)==String(_.value)))||{}).text||mQ,name:w,unit:S}:{value:(M=(A=_.value)!=null?A:_.default)!=null?M:0,name:w,unit:S}},x=t.conf;return(_,w)=>(o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({background:o.unref(a).bgColor,borderRadius:o.unref(a).radiusSize+"px"})},[d.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"mix-component-top-gradient",style:o.normalizeStyle(u.value)},null,4)):o.createCommentVNode("",!0),o.createElementVNode("div",{class:"mix-title",style:o.normalizeStyle(c.value)},o.toDisplayString(o.unref(x).caption||o.unref(x).name),5),o.createElementVNode("div",{class:o.normalizeClass(["mix-body",{"mix-body--params-vertical":h.value}])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(x).data,(S,C)=>(o.openBlock(),o.createElementBlock("div",{key:C,class:"card-item",style:o.normalizeStyle(m(S))},[o.createElementVNode("div",{class:"card-item-surface",style:o.normalizeStyle({background:o.unref(a).bgColor})},null,4),f.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"card-item-top-gradient",style:o.normalizeStyle(u.value)},null,4)):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(["card-item-inner",{"card-item-inner--row":h.value}])},[o.createElementVNode("div",{class:"value",style:o.normalizeStyle(v(S))},[o.createElementVNode("span",Zct,o.toDisplayString(b(S).value),1),b(S).unit?(o.openBlock(),o.createElementBlock("span",qct,o.toDisplayString(b(S).unit),1)):o.createCommentVNode("",!0)],4),o.createElementVNode("div",{class:"name",style:o.normalizeStyle(g(S))},o.toDisplayString(b(S).name),5)],2)],4))),128)),o.unref(a).showBgIcon&&y()?(o.openBlock(),o.createElementBlock("div",{key:0,class:"mix-body-bg-icon",style:o.normalizeStyle(p.value)},o.toDisplayString(y()),5)):o.createCommentVNode("",!0)],2),o.renderSlot(_.$slots,"default",{},void 0,!0)],4))}})),iut=Dt(rut,[["__scopeId","data-v-f17794e3"]]),aut=Object.freeze(Object.defineProperty({__proto__:null,default:iut},Symbol.toStringTag,{value:"Module"})),Nh="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e事件卡片%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-191.000000,%20-96.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M205.92069,97.4712644%20C206.682471,97.4712644%20207.3,98.0888001%20207.3,98.8505747%20L207.3,98.8505747%20L207.3,109.149425%20C207.3,109.911209%20206.682473,110.528736%20205.92069,110.528736%20L205.92069,110.528736%20L192.67931,110.528736%20C191.917536,110.528736%20191.3,109.911206%20191.3,109.149425%20L191.3,109.149425%20L191.3,98.8505747%20C191.3,98.0888025%20191.917538,97.4712644%20192.67931,97.4712644%20L192.67931,97.4712644%20Z%20M205.92069,98.7586207%20L192.67931,98.7586207%20C192.628525,98.7586207%20192.587356,98.7997897%20192.587356,98.8505747%20L192.587356,98.8505747%20L192.587356,109.149425%20C192.587356,109.200216%20192.62852,109.241379%20192.67931,109.241379%20L192.67931,109.241379%20L205.92069,109.241379%20C205.971486,109.241379%20206.012644,109.200221%20206.012644,109.149425%20L206.012644,109.149425%20L206.012644,98.8505747%20C206.012644,98.7997844%20205.97148,98.7586207%20205.92069,98.7586207%20L205.92069,98.7586207%20Z%20M196.537914,107.926325%20L196.461627,107.89772%20C196.376008,107.859228%20196.300327,107.802566%20196.239493,107.732645%20L196.182458,107.65641%20C196.149793,107.605279%20196.124154,107.549226%20196.106902,107.489611%20L196.088588,107.405463%20C196.083991,107.374424%20196.081609,107.342662%20196.081609,107.310345%20L196.081609,101.425287%20C196.081609,101.296017%20196.119716,101.175647%20196.18531,101.074798%20C196.212059,101.034076%20196.24112,100.998703%20196.273556,100.966746%20C196.325849,100.915252%20196.38674,100.872715%20196.453929,100.841434%20C196.473529,100.832503%20196.487888,100.826598%20196.502497,100.821209%20C196.516162,100.816178%20196.529622,100.811721%20196.54327,100.807705%20C196.543966,100.8075%20196.544993,100.8072%20196.546021,100.806902%20L196.630169,100.788588%20C196.631149,100.788443%20196.63213,100.7883%20196.633112,100.788159%20C196.635183,100.787864%20196.636563,100.787673%20196.637944,100.787485%20L196.725287,100.781609%20L201.874713,100.781609%20C202.230206,100.781609%20202.518391,101.069794%20202.518391,101.425287%20C202.518391,101.751157%20202.276236,102.020467%20201.962056,102.063089%20L201.874713,102.068966%20L197.368,102.068264%20L197.368,103.723264%20L201.874713,103.724138%20C202.230206,103.724138%20202.518391,104.012322%20202.518391,104.367816%20C202.518391,104.693685%20202.276236,104.962996%20201.962056,105.005618%20L201.874713,105.011494%20L197.368,105.011264%20L197.368,106.666264%20L201.874713,106.666667%20C202.230206,106.666667%20202.518391,106.954851%20202.518391,107.310345%20C202.518391,107.636214%20202.276236,107.905525%20201.962056,107.948147%20L201.874713,107.954023%20L196.725287,107.954023%20C196.660114,107.954023%20196.597202,107.944337%20196.537914,107.926325%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Oh="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e事件卡片%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-191.000000,%20-96.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M205.92069,97.4712644%20C206.682471,97.4712644%20207.3,98.0888001%20207.3,98.8505747%20L207.3,98.8505747%20L207.3,109.149425%20C207.3,109.911209%20206.682473,110.528736%20205.92069,110.528736%20L205.92069,110.528736%20L192.67931,110.528736%20C191.917536,110.528736%20191.3,109.911206%20191.3,109.149425%20L191.3,109.149425%20L191.3,98.8505747%20C191.3,98.0888025%20191.917538,97.4712644%20192.67931,97.4712644%20L192.67931,97.4712644%20Z%20M205.92069,98.7586207%20L192.67931,98.7586207%20C192.628525,98.7586207%20192.587356,98.7997897%20192.587356,98.8505747%20L192.587356,98.8505747%20L192.587356,109.149425%20C192.587356,109.200216%20192.62852,109.241379%20192.67931,109.241379%20L192.67931,109.241379%20L205.92069,109.241379%20C205.971486,109.241379%20206.012644,109.200221%20206.012644,109.149425%20L206.012644,109.149425%20L206.012644,98.8505747%20C206.012644,98.7997844%20205.97148,98.7586207%20205.92069,98.7586207%20L205.92069,98.7586207%20Z%20M196.537914,107.926325%20L196.461627,107.89772%20C196.376008,107.859228%20196.300327,107.802566%20196.239493,107.732645%20L196.182458,107.65641%20C196.149793,107.605279%20196.124154,107.549226%20196.106902,107.489611%20L196.088588,107.405463%20C196.083991,107.374424%20196.081609,107.342662%20196.081609,107.310345%20L196.081609,101.425287%20C196.081609,101.296017%20196.119716,101.175647%20196.18531,101.074798%20C196.212059,101.034076%20196.24112,100.998703%20196.273556,100.966746%20C196.325849,100.915252%20196.38674,100.872715%20196.453929,100.841434%20C196.473529,100.832503%20196.487888,100.826598%20196.502497,100.821209%20C196.516162,100.816178%20196.529622,100.811721%20196.54327,100.807705%20C196.543966,100.8075%20196.544993,100.8072%20196.546021,100.806902%20L196.630169,100.788588%20C196.631149,100.788443%20196.63213,100.7883%20196.633112,100.788159%20C196.635183,100.787864%20196.636563,100.787673%20196.637944,100.787485%20L196.725287,100.781609%20L201.874713,100.781609%20C202.230206,100.781609%20202.518391,101.069794%20202.518391,101.425287%20C202.518391,101.751157%20202.276236,102.020467%20201.962056,102.063089%20L201.874713,102.068966%20L197.368,102.068264%20L197.368,103.723264%20L201.874713,103.724138%20C202.230206,103.724138%20202.518391,104.012322%20202.518391,104.367816%20C202.518391,104.693685%20202.276236,104.962996%20201.962056,105.005618%20L201.874713,105.011494%20L197.368,105.011264%20L197.368,106.666264%20L201.874713,106.666667%20C202.230206,106.666667%20202.518391,106.954851%20202.518391,107.310345%20C202.518391,107.636214%20202.276236,107.905525%20201.962056,107.948147%20L201.874713,107.954023%20L196.725287,107.954023%20C196.660114,107.954023%20196.597202,107.944337%20196.537914,107.926325%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",out={class:"mix-body"},sut={class:"mix-footer"},lut={DEFAULT_ICON:Nh,ACTIVE_ICON:Oh,NAME_CN:"状态卡片",NAME_EN:"State",ORDER:3,PLATFORM:["pc","screen","mobile"]},cut={valueSize:36,timeSize:12,radiusSize:8,bgColor:"#fff",titleColor:"#111",titleSize:14,textColor:"#111",isHideTitle:!1,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4},uut=[{fv:"",status_fv:"",object_id:"",status:[{code:0,text:"离线",color:"#a40e0e"}]}],dut=["fv","status_fv"],fut=["mosaic"],hut={useAlias:!1,source:"mosaic",multiObject:!1,hideMultiObject:!0},put=1,mut={DEFAULT:lut,OPTIONS:cut,DATA:uut,PARAMS:dut,SOURCE:fut,ITEMS:put,COMMON:hut},vut=o.defineComponent(tt(Ne({},mut),{__name:"evn",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(n){const e=n,t=o.ref(mt().format("YYYY-MM-DD HH:mm:ss"));class r extends Cn{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),valueSize:this.getOptionValue("valueSize",36),timeSize:this.getOptionValue("timeSize",12),radiusSize:this.getOptionValue("radiusSize",8)}}init(){return Ve(this,null,function*(){var h;this.Style.value=this.extractStyles(),this.applyTheme(),(h=this.props.conf.data)!=null&&h.length||(this.props.conf.data=[{fv:"",status_fv:"",object_id:"",status:[{code:0,text:"离线",color:"#a40e0e"}]}])})}setHistoryData(h){if(!h)return;const{data:p}=this.props.conf;!p||!Array.isArray(p)||!p.length||(p.forEach((m,v)=>{var g;try{const y=h[v].data[0];if(!y)return;const b=m==null?void 0:m.fv,x=m==null?void 0:m.status_fv;if(b){const w=y==null?void 0:y[b];w!=null&&(m.value=w)}if(x){const w=y==null?void 0:y[x];w!=null&&(m.statusValue=w)}const _=(g=y==null?void 0:y.time)!=null?g:y==null?void 0:y.datetime;_&&(t.value=_)}catch(y){}}),this.notifyDataChanged())}setSocketData(h){if(!h)return;const{data:p}=this.props.conf;!p||!Array.isArray(p)||(p.forEach(m=>{try{if(!this.shouldApplyRealtimeToItem(h,m))return;const v=this.extractDataValue(h,m.fv,m);v!=null&&(m.value=v);const g=this.extractDataValue(h,m.status_fv,m);g!=null&&(m.statusValue=g),h.datetime&&(t.value=h.datetime)}catch(v){}}),this.notifyDataChanged())}notifyDataChanged(){l.value++}}const i=new r(e,"evn");i.setupLifecycle();const a=i.getStyle(),s=e.conf,l=o.ref(0),c=o.computed(()=>$n(e.conf.options)),u=o.computed(()=>{var f,h;return l.value,(h=(f=e.conf)==null?void 0:f.data)==null?void 0:h[0]}),d=()=>{var m;l.value;const{data:f}=e.conf,h=f[0];let p={color:"",text:""};return(m=h==null?void 0:h.status)==null||m.forEach(v=>{String(v.code)===String(h.statusValue)&&(p={text:v.text,color:v.color})}),p};return(f,h)=>{var p;return o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({background:o.unref(a).bgColor,borderRadius:`${o.unref(a).radiusSize}px`})},[o.createElementVNode("div",{class:"mix-title",style:o.normalizeStyle(c.value)},o.toDisplayString(d().text||o.unref(s).caption||""),5),o.createElementVNode("div",out,[o.createElementVNode("div",{class:"body-value",style:o.normalizeStyle({fontSize:`${o.unref(a).valueSize}px`,color:o.unref(a).textColor})},o.toDisplayString((p=u.value)==null?void 0:p.value),5)]),o.createElementVNode("div",sut,[o.createElementVNode("div",{class:"footer-time",style:o.normalizeStyle({fontSize:`${o.unref(a).timeSize}px`,color:o.unref(a).textColor})},o.toDisplayString(t.value),5)]),o.renderSlot(f.$slots,"default",{},void 0,!0)],4)}}})),gut=Dt(vut,[["__scopeId","data-v-ccafbe3e"]]),yut=Object.freeze(Object.defineProperty({__proto__:null,default:gut},Symbol.toStringTag,{value:"Module"})),but="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e卡片组%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-649.000000,%20-221.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cg%20id='卡片查看模式_view-grid-card'%20transform='translate(649.583607,%20224.127953)'%3e%3cpath%20d='M14.4615385,0%20C15.3112073,0%2016,0.688792693%2016,1.53846154%20L16,1.53846154%20L16,10.4477993%20C16,11.2974681%2015.3112073,11.9862608%2014.4615385,11.9862608%20L14.4615385,11.9862608%20L1.53846154,11.9862608%20C0.688792693,11.9862608%200,11.2974681%200,10.4477993%20L0,10.4477993%20L0,1.53846154%20C0,0.688792693%200.688792693,0%201.53846154,0%20L1.53846154,0%20Z%20M14.4615385,1.23076923%20L1.53846154,1.23076923%20C1.36852777,1.23076923%201.23076923,1.36852777%201.23076923,1.53846154%20L1.23076923,1.53846154%20L1.23076923,10.4477993%20C1.23076923,10.6177331%201.36852777,10.7554916%201.53846154,10.7554916%20L1.53846154,10.7554916%20L14.4615385,10.7554916%20C14.6314722,10.7554916%2014.7692308,10.6177331%2014.7692308,10.4477993%20L14.7692308,10.4477993%20L14.7692308,1.53846154%20C14.7692308,1.36852777%2014.6314722,1.23076923%2014.4615385,1.23076923%20L14.4615385,1.23076923%20Z%20M6.14307642,3.81624937%20C6.48294396,3.81624937%206.75846104,4.09176645%206.75846104,4.43163399%20L6.75846104,4.43163399%20L6.75846104,7.55462685%20C6.75846104,7.89449439%206.48294396,8.17001146%206.14307642,8.17001146%20L6.14307642,8.17001146%20L2.95665531,8.17001146%20C2.61678777,8.17001146%202.3412707,7.89449439%202.3412707,7.55462685%20L2.3412707,7.55462685%20L2.3412707,4.43163399%20C2.3412707,4.09176645%202.61678777,3.81624937%202.95665531,3.81624937%20L2.95665531,3.81624937%20Z%20M13.247791,3.81624937%20C13.5876586,3.81624937%2013.8631757,4.09176645%2013.8631757,4.43163399%20L13.8631757,4.43163399%20L13.8631757,7.55462685%20C13.8631757,7.89449439%2013.5876586,8.17001146%2013.247791,8.17001146%20L13.247791,8.17001146%20L8.17088167,8.17001146%20C7.83101413,8.17001146%207.55549706,7.89449439%207.55549706,7.55462685%20L7.55549706,7.55462685%20L7.55549706,4.43163399%20C7.55549706,4.09176645%207.83101413,3.81624937%208.17088167,3.81624937%20L8.17088167,3.81624937%20Z%20M5.52707692,5.04615385%20L3.572,5.04615385%20L3.572,6.93846154%20L5.52707692,6.93846154%20L5.52707692,5.04615385%20Z%20M12.632,5.04615385%20L8.78553846,5.04615385%20L8.78553846,6.93846154%20L12.632,6.93846154%20L12.632,5.04615385%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",xut="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e卡片组%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-649.000000,%20-221.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cg%20id='卡片查看模式_view-grid-card'%20transform='translate(649.583607,%20224.127953)'%3e%3cpath%20d='M14.4615385,0%20C15.3112073,0%2016,0.688792693%2016,1.53846154%20L16,1.53846154%20L16,10.4477993%20C16,11.2974681%2015.3112073,11.9862608%2014.4615385,11.9862608%20L14.4615385,11.9862608%20L1.53846154,11.9862608%20C0.688792693,11.9862608%200,11.2974681%200,10.4477993%20L0,10.4477993%20L0,1.53846154%20C0,0.688792693%200.688792693,0%201.53846154,0%20L1.53846154,0%20Z%20M14.4615385,1.23076923%20L1.53846154,1.23076923%20C1.36852777,1.23076923%201.23076923,1.36852777%201.23076923,1.53846154%20L1.23076923,1.53846154%20L1.23076923,10.4477993%20C1.23076923,10.6177331%201.36852777,10.7554916%201.53846154,10.7554916%20L1.53846154,10.7554916%20L14.4615385,10.7554916%20C14.6314722,10.7554916%2014.7692308,10.6177331%2014.7692308,10.4477993%20L14.7692308,10.4477993%20L14.7692308,1.53846154%20C14.7692308,1.36852777%2014.6314722,1.23076923%2014.4615385,1.23076923%20L14.4615385,1.23076923%20Z%20M6.14307642,3.81624937%20C6.48294396,3.81624937%206.75846104,4.09176645%206.75846104,4.43163399%20L6.75846104,4.43163399%20L6.75846104,7.55462685%20C6.75846104,7.89449439%206.48294396,8.17001146%206.14307642,8.17001146%20L6.14307642,8.17001146%20L2.95665531,8.17001146%20C2.61678777,8.17001146%202.3412707,7.89449439%202.3412707,7.55462685%20L2.3412707,7.55462685%20L2.3412707,4.43163399%20C2.3412707,4.09176645%202.61678777,3.81624937%202.95665531,3.81624937%20L2.95665531,3.81624937%20Z%20M13.247791,3.81624937%20C13.5876586,3.81624937%2013.8631757,4.09176645%2013.8631757,4.43163399%20L13.8631757,4.43163399%20L13.8631757,7.55462685%20C13.8631757,7.89449439%2013.5876586,8.17001146%2013.247791,8.17001146%20L13.247791,8.17001146%20L8.17088167,8.17001146%20C7.83101413,8.17001146%207.55549706,7.89449439%207.55549706,7.55462685%20L7.55549706,7.55462685%20L7.55549706,4.43163399%20C7.55549706,4.09176645%207.83101413,3.81624937%208.17088167,3.81624937%20L8.17088167,3.81624937%20Z%20M5.52707692,5.04615385%20L3.572,5.04615385%20L3.572,6.93846154%20L5.52707692,6.93846154%20L5.52707692,5.04615385%20Z%20M12.632,5.04615385%20L8.78553846,5.04615385%20L8.78553846,6.93846154%20L12.632,6.93846154%20L12.632,5.04615385%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",_ut={class:"mix-body"},Sut=["onClick"],wut={class:"p-1.5 flex flex-wrap overflow-y-auto"},Cut={class:"h-1/2 flex items-center"},Eut={class:"h-1/2 flex items-center"},Aut={DEFAULT_ICON:but,ACTIVE_ICON:xut,NAME_CN:"卡片组",NAME_EN:"Group Card",ORDER:5,PLATFORM:["pc","screen","mobile"]},Tut={bgColor:"#fff",titleColor:"#111",textColor:"#111",itemColor:"#e5e5e5",titleSize:14,textSize:13,radiusSize:8,isHideTitle:{value:!1,type:"checkbox",label:"component.options.isHideTitle",repel:"isDynamic"},isDynamic:!1,cardWidth:{value:150,type:"number",label:"component.card.cardWidth",dependent:"isDynamic"},cardHeight:{value:100,type:"number",label:"component.card.cardHeight",dependent:"isDynamic"},tags:{value:[{label:"TAB1",flag:[]}],type:"tags",label:"component.card.tags",dependent:"isDynamic"},titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4},n0e=[{name:"",fv:"",object_id:""}],Mut=["name","fv","object_id"],Dut=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],Lut={useAlias:!1,source:"mosaic",multiObject:!1},Nut={DEFAULT:Aut,OPTIONS:Tut,DATA:n0e,PARAMS:Mut,SOURCE:Dut,COMMON:Lut},Out=o.defineComponent(tt(Ne({},Nut),{__name:"groupCard",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){const e=n,t="--";class r extends Cn{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),itemColor:this.getOptionValue("itemColor","#e5e5e5"),titleSize:this.getOptionValue("titleSize",14),textSize:this.getOptionValue("textSize",13),radiusSize:this.getOptionValue("radiusSize",8),cardHeight:this.getOptionValue("cardHeight",100),cardWidth:this.getOptionValue("cardWidth",150),isHideTitle:this.getOptionValue("isHideTitle",!1),isDynamic:this.getOptionValue("isDynamic",!1),tags:this.getOptionValue("tags",[])}}init(){return Ve(this,null,function*(){var m;this.Style.value=this.extractStyles(),this.applyTheme(),(m=this.props.conf.data)!=null&&m.length||(this.props.conf.data=n0e)})}setHistoryData(m){if(!m)return;const{data:v}=this.props.conf;if(!Array.isArray(v)||!v.length)return;let g=!1;v.forEach((y,b)=>{const x=m[b].data[0];x!=null&&y.value!==x&&(y.value=x,g=!0)}),g&&this.notifyDataChanged()}setSocketData(m){if(!m)return;const{data:v}=this.props.conf;if(!Array.isArray(v)||!v.length)return;let g=!1;v.forEach(y=>{if(!this.shouldApplyRealtimeToItem(m,y))return;const b=this.extractDataValue(m,y.fv,y);b!=null&&y.value!==b&&(y.value=b,g=!0)}),g&&this.notifyDataChanged()}notifyDataChanged(){l.value++}}const i=new r(e,"groupCard");i.setupLifecycle();const a=i.getStyle(),s=e.conf,l=o.ref(0),c=o.computed(()=>$n(e.conf.options)),u=o.computed(()=>(l.value,e.conf.data||[])),d=o.ref(0),f=o.computed(()=>{var g;l.value;const{data:p,options:m}=e.conf,v=((g=m.tags)==null?void 0:g.value)||[];return p.filter(y=>{var b,x;return(x=(b=v[d.value])==null?void 0:b.flag)==null?void 0:x.includes(y.fv)})}),h=p=>{d.value=p};return(p,m)=>(o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({background:o.unref(a).bgColor,borderRadius:`${o.unref(a).radiusSize}px`})},[o.unref(a).isDynamic?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("div",{class:"flex border-b border-gray-200 px-3",style:o.normalizeStyle({color:o.unref(a).titleColor,fontSize:`${o.unref(a).titleSize}px`})},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(a).tags,(v,g)=>(o.openBlock(),o.createElementBlock("div",{key:g,class:o.normalizeClass(["py-2 px-3 cursor-pointer",{actived:d.value===Number(g)}]),style:{"margin-right":"10px"},onClick:y=>h(Number(g))},o.toDisplayString(v.label),11,Sut))),128))],4),o.createElementVNode("div",wut,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.value,(v,g)=>(o.openBlock(),o.createElementBlock("div",{key:g,class:"flex flex-col items-center rounded m-1.5",style:o.normalizeStyle({width:`${o.unref(a).cardWidth}px`,height:`${o.unref(a).cardHeight}px`,background:o.unref(a).itemColor,fontSize:`${o.unref(a).textSize}px`,color:`${o.unref(a).textColor}`})},[o.createElementVNode("div",Cut,o.toDisplayString((v==null?void 0:v.value)||t),1),o.createElementVNode("div",Eut,o.toDisplayString(v==null?void 0:v.name),1)],4))),128))])],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("div",{class:"mix-title",style:o.normalizeStyle(c.value)},o.toDisplayString(o.unref(s).caption||o.unref(s).name),5),o.createElementVNode("div",_ut,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(u.value,(v,g)=>(o.openBlock(),o.createElementBlock("div",{key:g,class:"flex-1 flex mx-3 px-4 mb-3 first:mt-3 rounded items-center justify-between",style:o.normalizeStyle({background:o.unref(a).itemColor,color:o.unref(a).textColor,fontSize:`${o.unref(a).textSize}px`})},[o.createElementVNode("div",null,o.toDisplayString(v.name),1),o.createElementVNode("div",null,o.toDisplayString(v.value),1)],4))),128))])],64)),o.renderSlot(p.$slots,"default",{},void 0,!0)],4))}})),Put=Dt(Out,[["__scopeId","data-v-2a1f99f4"]]),kut=Object.freeze(Object.defineProperty({__proto__:null,default:Put},Symbol.toStringTag,{value:"Module"})),Cu="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e数值卡片%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-263.000000,%20-96.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M277.92069,97.4712644%20C278.682471,97.4712644%20279.3,98.0888001%20279.3,98.8505747%20L279.3,98.8505747%20L279.3,109.149425%20C279.3,109.911209%20278.682473,110.528736%20277.92069,110.528736%20L277.92069,110.528736%20L264.67931,110.528736%20C263.917536,110.528736%20263.3,109.911206%20263.3,109.149425%20L263.3,109.149425%20L263.3,98.8505747%20C263.3,98.0888025%20263.917538,97.4712644%20264.67931,97.4712644%20L264.67931,97.4712644%20Z%20M277.92069,98.7586207%20L264.67931,98.7586207%20C264.628525,98.7586207%20264.587356,98.7997897%20264.587356,98.8505747%20L264.587356,98.8505747%20L264.587356,109.149425%20C264.587356,109.200216%20264.62852,109.241379%20264.67931,109.241379%20L264.67931,109.241379%20L277.92069,109.241379%20C277.971486,109.241379%20278.012644,109.200221%20278.012644,109.149425%20L278.012644,109.149425%20L278.012644,98.8505747%20C278.012644,98.7997844%20277.97148,98.7586207%20277.92069,98.7586207%20L277.92069,98.7586207%20Z%20M273.874713,100.66937%20C274.200582,100.66937%20274.469893,100.911525%20274.512515,101.225705%20L274.518391,101.313048%20L274.518391,107.198106%20L274.513991,107.281483%20C274.538251,107.487919%20274.462246,107.702261%20274.292161,107.847183%20C274.044098,108.058501%20273.682057,108.048825%20273.445862,107.837313%20L273.384745,107.774638%20L269.368,103.060264%20L269.368966,107.198106%20C269.368966,107.553599%20269.080781,107.841784%20268.725287,107.841784%20C268.399418,107.841784%20268.130107,107.599629%20268.087485,107.285449%20L268.081609,107.198106%20L268.081609,101.313048%20L268.082187,101.285675%20C268.082816,101.270976%20268.083946,101.256302%20268.085574,101.24168%20L268.081609,101.313048%20C268.081609,101.26688%20268.08647,101.221847%20268.095707,101.178434%20C268.097405,101.170903%20268.099263,101.1629%20268.101275,101.154931%20C268.107261,101.130888%20268.114565,101.107741%20268.123099,101.085199%20C268.126373,101.076657%20268.129862,101.067978%20268.133545,101.059367%20C268.141412,101.041006%20268.150086,101.023157%20268.159537,101.005792%20C268.166518,100.992781%20268.174321,100.979531%20268.182629,100.966529%20C268.189963,100.955262%20268.197427,100.944361%20268.205211,100.933708%20C268.213941,100.92154%20268.223634,100.909215%20268.23383,100.897194%20C268.282315,100.841529%20268.332493,100.798881%20268.388316,100.764515%20L268.307839,100.823066%20C268.339551,100.796052%20268.373125,100.772649%20268.408061,100.752818%20C268.429973,100.740403%20268.452735,100.729194%20268.476205,100.719335%20C268.486406,100.715037%20268.496705,100.711027%20268.507074,100.707293%20C268.525188,100.700768%20268.543849,100.694982%20268.562851,100.690041%20C268.578079,100.686087%20268.593439,100.682694%20268.608873,100.679872%20C268.624283,100.677053%20268.639962,100.674777%20268.655813,100.673076%20C268.673322,100.671183%20268.69078,100.670023%20268.708242,100.669572%20L268.725287,100.66937%20L268.725287,100.66937%20L268.747519,100.669748%20C268.767719,100.670452%20268.787878,100.672102%20268.807925,100.674691%20L268.725287,100.66937%20C268.772556,100.66937%20268.818635,100.674465%20268.863005,100.684136%20C268.872752,100.686367%20268.882402,100.688708%20268.892,100.691272%20C268.915006,100.69732%20268.937508,100.704716%20268.959426,100.713279%20C268.969115,100.717097%20268.979031,100.721241%20268.988855,100.725641%20C269.007259,100.733908%20269.025055,100.742939%20269.042352,100.752748%20C269.0816,100.774844%20269.119243,100.801687%20269.154138,100.832936%20L269.185324,100.862839%20C269.195227,100.872957%20269.204798,100.883399%20269.214021,100.894149%20L269.215255,100.895611%20L273.231,105.609264%20L273.231034,101.313048%20C273.231034,100.957555%20273.519219,100.66937%20273.874713,100.66937%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Eu="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e数值卡片%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-263.000000,%20-96.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M277.92069,97.4712644%20C278.682471,97.4712644%20279.3,98.0888001%20279.3,98.8505747%20L279.3,98.8505747%20L279.3,109.149425%20C279.3,109.911209%20278.682473,110.528736%20277.92069,110.528736%20L277.92069,110.528736%20L264.67931,110.528736%20C263.917536,110.528736%20263.3,109.911206%20263.3,109.149425%20L263.3,109.149425%20L263.3,98.8505747%20C263.3,98.0888025%20263.917538,97.4712644%20264.67931,97.4712644%20L264.67931,97.4712644%20Z%20M277.92069,98.7586207%20L264.67931,98.7586207%20C264.628525,98.7586207%20264.587356,98.7997897%20264.587356,98.8505747%20L264.587356,98.8505747%20L264.587356,109.149425%20C264.587356,109.200216%20264.62852,109.241379%20264.67931,109.241379%20L264.67931,109.241379%20L277.92069,109.241379%20C277.971486,109.241379%20278.012644,109.200221%20278.012644,109.149425%20L278.012644,109.149425%20L278.012644,98.8505747%20C278.012644,98.7997844%20277.97148,98.7586207%20277.92069,98.7586207%20L277.92069,98.7586207%20Z%20M273.874713,100.66937%20C274.200582,100.66937%20274.469893,100.911525%20274.512515,101.225705%20L274.518391,101.313048%20L274.518391,107.198106%20L274.513991,107.281483%20C274.538251,107.487919%20274.462246,107.702261%20274.292161,107.847183%20C274.044098,108.058501%20273.682057,108.048825%20273.445862,107.837313%20L273.384745,107.774638%20L269.368,103.060264%20L269.368966,107.198106%20C269.368966,107.553599%20269.080781,107.841784%20268.725287,107.841784%20C268.399418,107.841784%20268.130107,107.599629%20268.087485,107.285449%20L268.081609,107.198106%20L268.081609,101.313048%20L268.082187,101.285675%20C268.082816,101.270976%20268.083946,101.256302%20268.085574,101.24168%20L268.081609,101.313048%20C268.081609,101.26688%20268.08647,101.221847%20268.095707,101.178434%20C268.097405,101.170903%20268.099263,101.1629%20268.101275,101.154931%20C268.107261,101.130888%20268.114565,101.107741%20268.123099,101.085199%20C268.126373,101.076657%20268.129862,101.067978%20268.133545,101.059367%20C268.141412,101.041006%20268.150086,101.023157%20268.159537,101.005792%20C268.166518,100.992781%20268.174321,100.979531%20268.182629,100.966529%20C268.189963,100.955262%20268.197427,100.944361%20268.205211,100.933708%20C268.213941,100.92154%20268.223634,100.909215%20268.23383,100.897194%20C268.282315,100.841529%20268.332493,100.798881%20268.388316,100.764515%20L268.307839,100.823066%20C268.339551,100.796052%20268.373125,100.772649%20268.408061,100.752818%20C268.429973,100.740403%20268.452735,100.729194%20268.476205,100.719335%20C268.486406,100.715037%20268.496705,100.711027%20268.507074,100.707293%20C268.525188,100.700768%20268.543849,100.694982%20268.562851,100.690041%20C268.578079,100.686087%20268.593439,100.682694%20268.608873,100.679872%20C268.624283,100.677053%20268.639962,100.674777%20268.655813,100.673076%20C268.673322,100.671183%20268.69078,100.670023%20268.708242,100.669572%20L268.725287,100.66937%20L268.725287,100.66937%20L268.747519,100.669748%20C268.767719,100.670452%20268.787878,100.672102%20268.807925,100.674691%20L268.725287,100.66937%20C268.772556,100.66937%20268.818635,100.674465%20268.863005,100.684136%20C268.872752,100.686367%20268.882402,100.688708%20268.892,100.691272%20C268.915006,100.69732%20268.937508,100.704716%20268.959426,100.713279%20C268.969115,100.717097%20268.979031,100.721241%20268.988855,100.725641%20C269.007259,100.733908%20269.025055,100.742939%20269.042352,100.752748%20C269.0816,100.774844%20269.119243,100.801687%20269.154138,100.832936%20L269.185324,100.862839%20C269.195227,100.872957%20269.204798,100.883399%20269.214021,100.894149%20L269.215255,100.895611%20L273.231,105.609264%20L273.231034,101.313048%20C273.231034,100.957555%20273.519219,100.66937%20273.874713,100.66937%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Iut={class:"mix-body"},Rut={class:"mix-footer"},Vut="--",But="--",Fut={DEFAULT_ICON:Cu,ACTIVE_ICON:Eu,NAME_CN:"数值卡片",NAME_EN:"Value",ORDER:3,PLATFORM:["pc","screen","mobile"]},zut={valueSize:36,timeSize:12,radiusSize:8,bgColor:"#fff",titleColor:"#111",titleSize:14,textColor:"#111",isHideTitle:!1,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4},Uut=[{name:"参数一",fv:"",object_id:""}],Hut=["name","fv","object_id"],jut=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],Gut={useAlias:!1,multiObject:!1,hideMultiObject:!0,source:"mosaic"},Yut=1,Wut={DEFAULT:Fut,OPTIONS:zut,DATA:Uut,PARAMS:Hut,SOURCE:jut,ITEMS:Yut,COMMON:Gut},Xut=o.defineComponent(tt(Ne({},Wut),{__name:"vlu",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(n){const e=n,t=o.ref(mt().format("YYYY-MM-DD HH:mm:ss"));class r extends Cn{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),valueSize:this.getOptionValue("valueSize",36),timeSize:this.getOptionValue("timeSize",12),radiusSize:this.getOptionValue("radiusSize",8)}}init(){return Ve(this,null,function*(){var f;this.Style.value=this.extractStyles(),this.applyTheme(),(f=this.props.conf.data)!=null&&f.length||(this.props.conf.data=[{name:"参数一",fv:"",object_id:""}])})}setHistoryData(f){if(!f)return;const{data:h}=this.props.conf;!Array.isArray(h)||!h.length||(h.forEach((p,m)=>{var v;try{const g=f[m].data[0];g!=null&&(p.value=g);const y=(v=f[m])==null?void 0:v.time[0];y&&(t.value=y)}catch(g){}}),this.notifyDataChanged())}notifyDataChanged(){l.value++}setSocketData(f){super.setSocketData(f),f&&f.datetime&&(t.value=f.datetime)}}const i=new r(e,"vlu");i.setupLifecycle();const a=i.getStyle(),s=e.conf,l=o.ref(0),c=o.computed(()=>$n(e.conf.options)),u=o.computed(()=>{var d,f;return l.value,(f=(d=e.conf)==null?void 0:d.data)==null?void 0:f[0]});return(d,f)=>{var h,p;return o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({background:o.unref(a).bgColor,borderRadius:`${o.unref(a).radiusSize}px`})},[o.createElementVNode("div",{class:"mix-title",style:o.normalizeStyle(c.value)},o.toDisplayString(((h=u.value)==null?void 0:h.name)||o.unref(s).caption||But),5),o.createElementVNode("div",Iut,[o.createElementVNode("div",{class:"body-value",style:o.normalizeStyle({fontSize:`${o.unref(a).valueSize}px`,color:o.unref(a).textColor})},o.toDisplayString(((p=u.value)==null?void 0:p.value)||Vut),5)]),o.createElementVNode("div",Rut,[o.createElementVNode("div",{class:"footer-time",style:o.normalizeStyle({fontSize:`${o.unref(a).timeSize}px`,color:o.unref(a).textColor})},o.toDisplayString(t.value),5)]),o.renderSlot(d.$slots,"default",{},void 0,!0)],4)}}})),Zut=Dt(Xut,[["__scopeId","data-v-d7b7e652"]]),qut=Object.freeze(Object.defineProperty({__proto__:null,default:Zut},Symbol.toStringTag,{value:"Module"})),r0e="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='1722502024182'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='21866'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='16'%20height='16'%3e%3cpath%20d='M1023.500049%2027.197344c-0.299971-2.099795-0.899912-4.19959-1.599844-6.099404l-0.599941-1.499854c-0.799922-1.899814-1.799824-3.699639-2.999707-5.399473-0.299971-0.399961-0.599941-0.799922-0.899913-1.299873-1.199883-1.599844-2.599746-3.199688-4.099599-4.49956-0.399961-0.299971-0.799922-0.699932-1.199883-0.999903-1.599844-1.299873-3.299678-2.499756-5.099502-3.499658-4.499561-2.499756-9.699053-3.899619-15.198516-3.899619H607.940631c-5.499463%200-10.698955%201.399863-15.198516%203.899619-1.799824%200.999902-3.499658%202.099795-5.099502%203.499658-0.399961%200.299971-0.799922%200.699932-1.199883%200.999903-1.499854%201.399863-2.899717%202.899717-4.099599%204.49956-0.299971%200.399961-0.599941%200.799922-0.899913%201.299873-1.199883%201.699834-2.099795%203.499658-2.999707%205.399473l-0.599941%201.499854c-0.699932%201.999805-1.299873%203.999609-1.599844%206.099404-0.19998%201.599844-0.399961%203.199688-0.399961%204.899522v447.956254h-63.99375v-351.965629c0-1.699834-0.09999-3.299678-0.399961-4.899521-0.299971-2.099795-0.899912-4.19959-1.599844-6.099404l-0.599941-1.499854c-0.799922-1.899814-1.799824-3.699639-2.999708-5.399473-0.299971-0.399961-0.599941-0.799922-0.899912-1.299873-1.199883-1.599844-2.599746-3.199688-4.099599-4.49956-0.399961-0.299971-0.799922-0.699932-1.199883-0.999903-1.599844-1.299873-3.299678-2.499756-5.099502-3.499658-4.499561-2.499756-9.699053-3.899619-15.198516-3.899619H319.968753v-63.993751c0-17.598281-14.398594-31.996875-31.996875-31.996875H31.996875c-17.598281%200-31.996875%2014.398594-31.996875%2031.996875v191.981252c0%2017.598281%2014.398594%2031.996875%2031.996875%2031.996875h255.975003c17.598281%200%2031.996875-14.398594%2031.996875-31.996875v-63.99375h127.987501v319.968753H319.968753v-63.993751c0-17.598281-14.398594-31.996875-31.996875-31.996875H31.996875c-17.598281%200-31.996875%2014.398594-31.996875%2031.996875v191.981252c0%2017.598281%2014.398594%2031.996875%2031.996875%2031.996875h255.975003c17.598281%200%2031.996875-14.398594%2031.996875-31.996875v-63.993751h127.987501v319.968753H319.968753v-63.99375c0-17.598281-14.398594-31.996875-31.996875-31.996876H31.996875c-17.598281%200-31.996875%2014.398594-31.996875%2031.996876v191.981251c0%2017.598281%2014.398594%2031.996875%2031.996875%2031.996876h255.975003c17.598281%200%2031.996875-14.398594%2031.996875-31.996876v-63.99375h159.984377c17.598281%200%2031.996875-14.398594%2031.996875-31.996875v-351.965629h63.99375v447.956254c0%2017.598281%2014.398594%2031.996875%2031.996876%2031.996876h383.962503c17.598281%200%2031.996875-14.398594%2031.996876-31.996876v-959.906259c0-1.599844-0.09999-3.199688-0.399961-4.799531zM255.975002%20192.081242H63.993751v-127.987501h191.981251v127.987501z%20m0%20383.962504H63.993751v-127.987501h191.981251v127.987501z%20m0%20383.962503H63.993751v-127.987501h191.981251v127.987501z%20m383.962504-895.912508h319.968753v895.912508H639.937506v-895.912508z'%20fill='%23030000'%20p-id='21867'%3e%3c/path%3e%3cpath%20d='M703.931257%20128.087491h63.99375v63.993751h-63.99375zM831.918758%20128.087491h63.993751v63.993751h-63.993751zM703.931257%20256.074993h63.99375v63.99375h-63.99375zM831.918758%20256.074993h63.993751v63.99375h-63.993751zM703.931257%20384.062494h63.99375v63.993751h-63.99375zM831.918758%20384.062494h63.993751v63.993751h-63.993751zM703.931257%20512.049995h63.99375v63.993751h-63.99375zM831.918758%20512.049995h63.993751v63.993751h-63.993751zM703.931257%20640.037496h63.99375v63.993751h-63.99375zM831.918758%20640.037496h63.993751v63.993751h-63.993751zM703.931257%20768.024998h63.99375v63.99375h-63.99375zM831.918758%20768.024998h63.993751v63.99375h-63.993751z'%20fill='%23030000'%20p-id='21868'%3e%3c/path%3e%3c/svg%3e",i0e="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='1722502024182'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='21866'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='16'%20height='16'%3e%3cpath%20d='M1023.500049%2027.197344c-0.299971-2.099795-0.899912-4.19959-1.599844-6.099404l-0.599941-1.499854c-0.799922-1.899814-1.799824-3.699639-2.999707-5.399473-0.299971-0.399961-0.599941-0.799922-0.899913-1.299873-1.199883-1.599844-2.599746-3.199688-4.099599-4.49956-0.399961-0.299971-0.799922-0.699932-1.199883-0.999903-1.599844-1.299873-3.299678-2.499756-5.099502-3.499658-4.499561-2.499756-9.699053-3.899619-15.198516-3.899619H607.940631c-5.499463%200-10.698955%201.399863-15.198516%203.899619-1.799824%200.999902-3.499658%202.099795-5.099502%203.499658-0.399961%200.299971-0.799922%200.699932-1.199883%200.999903-1.499854%201.399863-2.899717%202.899717-4.099599%204.49956-0.299971%200.399961-0.599941%200.799922-0.899913%201.299873-1.199883%201.699834-2.099795%203.499658-2.999707%205.399473l-0.599941%201.499854c-0.699932%201.999805-1.299873%203.999609-1.599844%206.099404-0.19998%201.599844-0.399961%203.199688-0.399961%204.899522v447.956254h-63.99375v-351.965629c0-1.699834-0.09999-3.299678-0.399961-4.899521-0.299971-2.099795-0.899912-4.19959-1.599844-6.099404l-0.599941-1.499854c-0.799922-1.899814-1.799824-3.699639-2.999708-5.399473-0.299971-0.399961-0.599941-0.799922-0.899912-1.299873-1.199883-1.599844-2.599746-3.199688-4.099599-4.49956-0.399961-0.299971-0.799922-0.699932-1.199883-0.999903-1.599844-1.299873-3.299678-2.499756-5.099502-3.499658-4.499561-2.499756-9.699053-3.899619-15.198516-3.899619H319.968753v-63.993751c0-17.598281-14.398594-31.996875-31.996875-31.996875H31.996875c-17.598281%200-31.996875%2014.398594-31.996875%2031.996875v191.981252c0%2017.598281%2014.398594%2031.996875%2031.996875%2031.996875h255.975003c17.598281%200%2031.996875-14.398594%2031.996875-31.996875v-63.99375h127.987501v319.968753H319.968753v-63.993751c0-17.598281-14.398594-31.996875-31.996875-31.996875H31.996875c-17.598281%200-31.996875%2014.398594-31.996875%2031.996875v191.981252c0%2017.598281%2014.398594%2031.996875%2031.996875%2031.996875h255.975003c17.598281%200%2031.996875-14.398594%2031.996875-31.996875v-63.993751h127.987501v319.968753H319.968753v-63.99375c0-17.598281-14.398594-31.996875-31.996875-31.996876H31.996875c-17.598281%200-31.996875%2014.398594-31.996875%2031.996876v191.981251c0%2017.598281%2014.398594%2031.996875%2031.996875%2031.996876h255.975003c17.598281%200%2031.996875-14.398594%2031.996875-31.996876v-63.99375h159.984377c17.598281%200%2031.996875-14.398594%2031.996875-31.996875v-351.965629h63.99375v447.956254c0%2017.598281%2014.398594%2031.996875%2031.996876%2031.996876h383.962503c17.598281%200%2031.996875-14.398594%2031.996876-31.996876v-959.906259c0-1.599844-0.09999-3.199688-0.399961-4.799531zM255.975002%20192.081242H63.993751v-127.987501h191.981251v127.987501z%20m0%20383.962504H63.993751v-127.987501h191.981251v127.987501z%20m0%20383.962503H63.993751v-127.987501h191.981251v127.987501z%20m383.962504-895.912508h319.968753v895.912508H639.937506v-895.912508z'%20fill='%23FFFFFF'%20p-id='21867'%3e%3c/path%3e%3cpath%20d='M703.931257%20128.087491h63.99375v63.993751h-63.99375zM831.918758%20128.087491h63.993751v63.993751h-63.993751zM703.931257%20256.074993h63.99375v63.99375h-63.99375zM831.918758%20256.074993h63.993751v63.99375h-63.993751zM703.931257%20384.062494h63.99375v63.993751h-63.99375zM831.918758%20384.062494h63.993751v63.993751h-63.993751zM703.931257%20512.049995h63.99375v63.993751h-63.99375zM831.918758%20512.049995h63.993751v63.993751h-63.993751zM703.931257%20640.037496h63.99375v63.993751h-63.99375zM831.918758%20640.037496h63.993751v63.993751h-63.993751zM703.931257%20768.024998h63.99375v63.99375h-63.99375zM831.918758%20768.024998h63.993751v63.99375h-63.993751z'%20fill='%23FFFFFF'%20p-id='21868'%3e%3c/path%3e%3c/svg%3e",Kut={class:"item-val"},Jut={class:"w-full flex justify-end"},Qut={DEFAULT_ICON:r0e,ACTIVE_ICON:i0e,NAME_CN:"项目采集",NAME_EN:"Project",ORDER:1,PLATFORM:["pc","screen","mobile"]},$ut={bgColor:"#fff",projectColor:"#999",projectSize:14,paramColor:"#333",labelWidth:64,paramSize:12,paramHeight:32,radiusSize:8,type:{value:"project",type:"radio",option:[{value:"project",label:"component.collect.projectType"},{value:"object",label:"component.collect.objectType"}],label:"component.collect.collectType"},isHideTitle:!1,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4},e1t=[{project_id:"",object_id:""}],t1t=["project_id","object_id"],n1t={DEFAULT:Qut,OPTIONS:$ut,DATA:e1t,PARAMS:t1t,COMMON:{}},r1t=o.defineComponent(tt(Ne({},n1t),{__name:"clt",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){const e=n;class t extends Cn{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),projectColor:this.getOptionValue("projectColor","#999"),projectSize:this.getOptionValue("projectSize",14),paramColor:this.getOptionValue("paramColor","#333"),labelWidth:this.getOptionValue("labelWidth",64),paramSize:this.getOptionValue("paramSize",12),paramHeight:this.getOptionValue("paramHeight",32),radiusSize:this.getOptionValue("radiusSize",4),isHideTitle:this.getOptionValue("isHideTitle",!1),type:this.getOptionValue("type","project")}}init(){return Ve(this,null,function*(){this.Style.value=this.extractStyles(),this.applyTheme(),u()})}}const r=new t(e,"clt");r.setupLifecycle();const i=r.getStyle(),a=e.conf,s=o.computed(()=>$n(e.conf.options)),l=o.ref([{name:"离线项目",data:[{name:"采集项",type:"Integer",unit:"℃",value:""}]}]);let c=0;const u=()=>Ve(null,null,function*(){const{data:v}=e.conf;l.value=[];const g=v.filter(w=>w.project_id).map(w=>w.project_id);if(!g.length)return;const y=++c,b={where_in:JSON.stringify([["uid",g.join(",")]])},{result:x}=yield Bt.http("get_collect_list",b);if(y!==c)return;const _=x==null?void 0:x.data;Array.isArray(_)&&_.length>0&&(l.value=_.map(w=>({name:w.name,uid:w.uid,object_id:w.object_id,data:d(w.script)})))}),d=v=>{const g=[];return v.forEach(y=>{g.push({name:y.label_loc,type:y.type,unit:y.unit,key:y.key})}),g},f=o.computed(()=>{let v=!0;return l.value.forEach(g=>{g.data.forEach(y=>{(y.value||y.value===0)&&(v=!1)})}),v}),h=()=>{e.mode!=="edit"&&(i.value.type==="object"?m():p())},p=()=>{const v=[],g=xi.getMixIotInfo()||xi.getUser();l.value.forEach(y=>{const b={};if(y.data.forEach(_=>{(_.value||_.value===0)&&(b[_.key]=["Integer","Float"].includes(_.type)?Number(_.value):_.type==="Bool"?!!_.value:_.value)}),!Object.keys(b).length)return;const x={name:y.name,value:b,collect_id:y.uid,collector:g.name||g.username};v.push(Bt.http("add_collect_value_without_object",x))}),Promise.all(v).then(y=>{let b=!0;y.forEach(x=>{x.code!==200&&(b=!1,Ue.ElMessage.error(x.msg))}),b&&Ue.ElMessage.success("操作成功")})},m=()=>{const v=[],g=xi.getMixIotInfo()||xi.getUser();l.value.forEach(y=>{const b={};if(y.data.forEach(_=>{(_.value||_.value===0)&&(b[_.key]=["Integer","Float"].includes(_.type)?Number(_.value):_.type==="Bool"?!!_.value:_.value)}),!Object.keys(b).length)return;const x={name:y.name,value:b,collect_id:y.uid,object_id:y.object_id||e.uid,collector:g.name||g.username};v.push(Bt.http("add_collect_value",x))}),Promise.all(v).then(y=>{let b=!0;y.forEach(x=>{x.code!==200&&(b=!1,Ue.ElMessage.error(x.msg))}),b&&Ue.ElMessage.success("操作成功")})};return(v,g)=>{const y=Se.ElInput,b=Se.ElInputNumber,x=Se.ElRadio,_=Se.ElRadioGroup,w=Se.ElButton;return o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({backgroundColor:o.unref(i).bgColor,borderRadius:`${o.unref(i).radiusSize}px`})},[o.createElementVNode("div",{class:"mix-title",style:o.normalizeStyle(s.value)},o.toDisplayString(o.unref(a).caption||o.unref(a).name),5),o.createElementVNode("div",{class:"mix-body",style:o.normalizeStyle({height:o.unref(i).isHideTitle?"100%":"calc(100% - 42px)"})},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l.value,(S,C)=>(o.openBlock(),o.createElementBlock("div",{key:C},[o.createElementVNode("div",{class:"item-title",style:o.normalizeStyle({fontSize:`${o.unref(i).projectSize}px`,color:o.unref(i).projectColor})},o.toDisplayString(S.name),5),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(S.data,(E,T)=>(o.openBlock(),o.createElementBlock("div",{class:"item-wrap",key:`${C}_${T}`},[o.createElementVNode("div",{class:"item-item",style:o.normalizeStyle({width:`${o.unref(i).labelWidth}px`,fontSize:`${o.unref(i).paramSize}px`,color:o.unref(i).paramColor,height:`${o.unref(i).paramHeight}px`})},o.toDisplayString(E.name)+": ",5),o.createElementVNode("div",Kut,[E.type==="String"?(o.openBlock(),o.createBlock(y,{key:0,type:"text",modelValue:E.value,"onUpdate:modelValue":A=>E.value=A},{suffix:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(E.unit),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])):o.createCommentVNode("",!0),E.type==="Integer"?(o.openBlock(),o.createBlock(b,{key:1,style:{width:"100%"},modelValue:E.value,"onUpdate:modelValue":A=>E.value=A,align:"left",precision:0,controls:!1},{suffix:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(E.unit),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])):o.createCommentVNode("",!0),E.type==="Float"?(o.openBlock(),o.createBlock(b,{key:2,style:{width:"100%"},modelValue:E.value,"onUpdate:modelValue":A=>E.value=A,align:"left",controls:!1},{suffix:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(E.unit),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])):o.createCommentVNode("",!0),E.type==="Bool"?(o.openBlock(),o.createBlock(_,{key:3,value:E.value,"onUpdate:value":A=>E.value=A},{default:o.withCtx(()=>[o.createVNode(x,{value:1},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(v.$t("common.yes")),1)]),_:1}),o.createVNode(x,{value:0},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(v.$t("common.no")),1)]),_:1})]),_:1},8,["value","onUpdate:value"])):o.createCommentVNode("",!0)])]))),128))]))),128)),o.createElementVNode("div",Jut,[o.createVNode(w,{type:f.value?"default":"primary",disabled:f.value,onClick:h},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(v.$t("common.confirm")),1)]),_:1},8,["type","disabled"])])],4),o.renderSlot(v.$slots,"default",{},void 0,!0)],4)}}})),i1t=Dt(r1t,[["__scopeId","data-v-58df742e"]]),a1t=Object.freeze(Object.defineProperty({__proto__:null,default:i1t},Symbol.toStringTag,{value:"Module"})),o1t={class:"item-val"},s1t={key:0,class:"btn-wrap"},l1t={DEFAULT_ICON:r0e,ACTIVE_ICON:i0e,NAME_CN:"定制采集",NAME_EN:"Customer",ORDER:2,PLATFORM:["pc","screen","mobile"]},c1t={bgColor:"#fff",titleColor:"#111",paramColor:"#333",labelWidth:64,titleSize:14,paramSize:12,paramHeight:32,radiusSize:8,isHideTitle:!1,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4},u1t=[{object_id:"",project_id:"",collect:"",label_cn:"",fv:"",unit:""}],d1t=["mosaic"],f1t=["object_id","project_id","collect","label_cn","fv","unit"],h1t={DEFAULT:l1t,OPTIONS:c1t,DATA:u1t,PARAMS:f1t,SOURCE:d1t,COMMON:{}},p1t=o.defineComponent(tt(Ne({},h1t),{__name:"cmc",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"},sourceData:{type:Object,default:()=>({})}},setup(n){const{proxy:e}=o.getCurrentInstance(),t=n,r="--";class i extends Cn{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),paramColor:this.getOptionValue("paramColor","#333"),labelWidth:this.getOptionValue("labelWidth",64),titleSize:this.getOptionValue("titleSize",14),paramSize:this.getOptionValue("paramSize",12),paramHeight:this.getOptionValue("paramHeight",32),radiusSize:this.getOptionValue("radiusSize",4),isHideTitle:this.getOptionValue("isHideTitle",!1),type:this.getOptionValue("type","project")}}init(){return Ve(this,null,function*(){this.Style.value=this.extractStyles(),this.applyTheme(),f()})}setHistoryData(v){const{data:g}=this.props.conf;let y=!1;g.forEach((b,x)=>{var w;const _=(w=v[x].data[0])!=null?w:r;b.value!==_&&(b.value=_,y=!0)}),y&&this.notifyDataChanged()}setSocketData(v){const{common:g,data:y,uid:b}=this.props.conf;console.log(v,"result socket");let x=!1;y.forEach(_=>{var S;const w=(S=v.data[_.fv])!=null?S:r;_.value!==w&&(_.value=w,x=!0)}),x&&this.notifyDataChanged()}notifyDataChanged(){c.value++}}const a=new i(t,"cmc");a.setupLifecycle();const s=a.getStyle(),l=t.conf,c=o.ref(0),u=o.computed(()=>$n(t.conf.options)),d=o.computed(()=>(c.value,t.conf.data||[])),f=()=>Ve(null,null,function*(){const{data:m}=t.conf;if(!m||m.length===0)return;const v=m.filter(x=>x.project_id).map(x=>x.project_id);if(!v.length){t.mode==="edit"&&m.forEach(x=>{x.label_cn=x.label_cn||e.$t("component.collect.collectItem"),x.type=x.type||"Integer",x.unit=x.unit||""});return}let g={where_in:JSON.stringify([["uid",v.join(",")]])};const{result:y}=yield Bt.http("get_collect_list",g,!0),b={};y.data.forEach(x=>{b[x.uid]=x}),m.forEach(x=>{var _;if((_=b[x.project_id])!=null&&_.script){const w=b[x.project_id].script.find(S=>S.key===x.collect);x.unit=w==null?void 0:w.unit,x.label_cn=x.label_cn||(w==null?void 0:w.label_loc),x.type=w==null?void 0:w.type}})}),h=o.computed(()=>{const{data:m}=t.conf;let v=!0;return m.forEach(g=>{(g.setting||g.setting===0)&&(v=!1)}),v}),p=()=>Ve(null,null,function*(){if(t.mode==="edit")return;const{data:m,common:v}=t.conf;JSON.parse(sessionStorage.getItem(t3)||"{}");const g=[],y=xi.getMixIotInfo()||xi.getUser();m.forEach(b=>{const x=jr(b,v.useAlias,t.uid);if((b.setting||b.setting===0)&&x){let _={collect_id:b.project_id,object_id:x,value:{[b.collect]:["Integer","Float"].includes(b.type)?Number(b.setting):b.setting},name:b.label_cn,collector:y.name||y.username};g.push(Bt.http("add_collect_value",_))}}),Promise.all(g).then(b=>{console.log(b),b.every(x=>x.code===200)&&Ue.ElMessage.success("操作成功")})});return o.watchEffect(()=>{t.conf.socketData&&a.setSocketData(t.conf.socketData)}),(m,v)=>{var w,S;const g=Se.ElInput,y=Se.ElInputNumber,b=Se.ElRadio,x=Se.ElRadioGroup,_=Se.ElButton;return o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({backgroundColor:o.unref(s).bgColor,borderRadius:`${o.unref(s).radiusSize}px`})},[o.createElementVNode("div",{class:"mix-title",style:o.normalizeStyle(u.value)},o.toDisplayString(o.unref(l).caption||o.unref(l).name),5),o.createElementVNode("div",{class:"mix-body",style:o.normalizeStyle({height:o.unref(s).isHideTitle?"100%":"calc(100% - 42px)"})},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(d.value,(C,E)=>(o.openBlock(),o.createElementBlock("div",{key:E,class:"item-wrap"},[o.createElementVNode("div",{class:"item-item",style:o.normalizeStyle({width:`${o.unref(s).labelWidth}px`,fontSize:`${o.unref(s).paramSize}px`,color:o.unref(s).paramColor})},o.toDisplayString(C.label_cn)+": ",5),o.createElementVNode("div",o1t,[C.type==="String"?(o.openBlock(),o.createBlock(g,{key:0,type:"text",class:"w-full",modelValue:C.setting,"onUpdate:modelValue":T=>C.setting=T},{suffix:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(C.unit),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])):o.createCommentVNode("",!0),C.type==="Integer"?(o.openBlock(),o.createBlock(y,{key:1,style:{width:"100%"},modelValue:C.setting,"onUpdate:modelValue":T=>C.setting=T,align:"left",precision:0,controls:!1},{suffix:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(C.unit),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])):o.createCommentVNode("",!0),C.type==="Float"?(o.openBlock(),o.createBlock(y,{key:2,style:{width:"100%"},modelValue:C.setting,"onUpdate:modelValue":T=>C.setting=T,align:"left",controls:!1},{suffix:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(C.unit),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])):o.createCommentVNode("",!0),C.type==="Boolean"?(o.openBlock(),o.createBlock(x,{key:3,class:"w-full",modelValue:C.setting,"onUpdate:modelValue":T=>C.setting=T},{default:o.withCtx(()=>[o.createVNode(b,{value:1},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(m.$t("common.yes")),1)]),_:1}),o.createVNode(b,{value:0},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(m.$t("common.no")),1)]),_:1})]),_:1},8,["modelValue","onUpdate:modelValue"])):o.createCommentVNode("",!0)]),o.createElementVNode("div",{class:"item-label",style:o.normalizeStyle({fontSize:`${o.unref(s).paramSize}px`})},o.toDisplayString(C.value||"--"),5)]))),128)),(S=(w=o.unref(l))==null?void 0:w.data)!=null&&S.length?(o.openBlock(),o.createElementBlock("div",s1t,[o.createVNode(_,{type:h.value?"default":"primary",disabled:h.value,onClick:p},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(m.$t("common.confirm")),1)]),_:1},8,["type","disabled"])])):o.createCommentVNode("",!0)],4),o.renderSlot(m.$slots,"default",{},void 0,!0)],4)}}})),m1t=Dt(p1t,[["__scopeId","data-v-4d0f3a6c"]]),v1t=Object.freeze(Object.defineProperty({__proto__:null,default:m1t},Symbol.toStringTag,{value:"Module"})),g1t={class:"mix-body"},y1t={key:0,class:"json-editor"},b1t={class:"editor-header"},x1t={key:1,class:"edit-toolbar"},_1t={key:2,class:"empty-state"},S1t={key:3,class:"form-content"},w1t={key:0,class:"form-description"},C1t={DEFAULT_ICON:e0e,ACTIVE_ICON:t0e,NAME_CN:"动态表单",NAME_EN:"ActionItem",ORDER:1,PLATFORM:["pc","screen","mobile"]},E1t={titleColor:"#111",bgColor:"#fff",radiusSize:8,labelWidth:100,isHideTitle:!1,showButtons:!0,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4},A1t={},T1t=[],M1t=[],D1t={},L1t={DEFAULT:C1t,OPTIONS:E1t,DATA:A1t,PARAMS:T1t,SOURCE:M1t,COMMON:D1t},N1t=o.defineComponent(tt(Ne({},L1t),{__name:"actionItem",props:{conf:{type:Object,default:()=>({})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},emits:["submit","generate"],setup(n,{emit:e}){const t=n,r=o.ref(!1),i=o.ref(""),a=e,s=Na(),l=o.ref(),c=new GI(t);c.setupLifecycle(),c.watchParams();const u=c.getStyle(),d=o.computed(()=>t.conf||{}),f=o.computed(()=>$n(t.conf.options));function h(C,E){return E.split(".").reduce((T,A)=>T==null?void 0:T[A],C)}function p(C,E,T){const A=E.split("."),M=A.pop(),D=A.reduce((k,P)=>((!k[P]||typeof k[P]!="object")&&(k[P]={}),k[P]),C);D[M]=T}function m(C,E,T){var A,M,D;if(!((A=C.rules)!=null&&A.length))return!1;for(const k of C.rules){const P=k.related_key;if(!P)continue;const I=E?`${E}.${P}`:P,N=h(T,I),R=(M=k.conditions)==null?void 0:M.find(V=>V.value===N);if((D=R==null?void 0:R.property)!=null&&D.hidden)return!0}return!1}const v=o.defineComponent({name:"FormField",props:{param:{type:Object,required:!0},rootData:{type:Object,required:!0},actionItem:{type:Object,required:!0},parentPath:{type:String,default:""}},setup(C){var I;const E=C.param,T=C.rootData,A=C.actionItem,M=E.key,D=C.parentPath?`${C.parentPath}.${M}`:M,k=E.form_type==="sub_form"&&E.properties&&!E.items,P=E.form_type==="sub_form"&&((I=E.items)==null?void 0:I.properties);return()=>{if(m(E,C.parentPath,T))return null;if(k){let R=h(T,D);(!R||typeof R!="object"||Array.isArray(R))&&p(T,D,{});const V=E.properties.filter(B=>!m(B,D,T));return o.h("div",{class:"nested-group"},[o.h("div",{class:"nested-title"},E.cn_name),o.h("div",{class:"nested-content"},V.map(B=>o.h(v,{param:B,rootData:T,actionItem:A,key:B.key,parentPath:D})))])}if(P){let R=h(T,D);Array.isArray(R)||(p(T,D,[]),R=h(T,D));const V=E.items.properties;return o.h(Ue.ElFormItem,{label:E.cn_name},()=>[o.h("div",{class:"sub-form"},[...R.map((B,F)=>o.h("div",{class:"sub-item",key:F},[o.h("div",{class:"sub-fields"},V.map(G=>o.h("div",{class:"sub-field",key:G.key},[o.h("span",{class:"sub-label"},[G.required?o.h("span",{class:"required-star"},"*"):null,G.cn_name]),y(G,B,A)]))),o.h(Ue.ElButton,{type:"danger",icon:qt.Delete,circle:!0,size:"small",onClick:()=>R.splice(F,1)})])),o.h(Ue.ElButton,{type:"primary",icon:qt.Plus,onClick:()=>{const B={};V.forEach(F=>{B[F.key]=b(F)}),R.push(B)}},()=>"添加")])])}const N={label:E.cn_name,prop:D};return E.required&&(N.rules=[{required:!0,message:`请输入${E.cn_name}`,trigger:"blur"}]),o.h(Ue.ElFormItem,N,()=>g(E,D,T,A))}}});function g(C,E,T,A){var P,I;const M=A.isFieldDisabled(C),D=h(T,E),k=N=>p(T,E,N);switch(C.form_type){case"text":return o.h(Ue.ElInput,{modelValue:D!=null?D:"","onUpdate:modelValue":k,placeholder:C.description||`请输入${C.cn_name}`,disabled:M,size:"small"});case"textarea":return o.h(Ue.ElInput,{type:"textarea",modelValue:D!=null?D:"","onUpdate:modelValue":k,placeholder:C.description,disabled:M,rows:3});case"select":return o.h(Ue.ElSelect,{modelValue:D!=null?D:"","onUpdate:modelValue":k,placeholder:`请选择${C.cn_name}`,disabled:M,style:"width:100%",size:"small"},()=>(C.enum||[]).map(R=>o.h(Ue.ElOption,{key:R.value,label:R.cn_name,value:R.value})));case"number":return o.h(Ue.ElInputNumber,{modelValue:D!=null?D:0,"onUpdate:modelValue":k,disabled:M,min:(P=C.format)==null?void 0:P.min,max:(I=C.format)==null?void 0:I.max,style:"width:100%",size:"small"});case"switch":const N=D===!0||D==="true";return o.h(Ue.ElSwitch,{modelValue:N,"onUpdate:modelValue":k,disabled:M});default:return o.h(Ue.ElInput,{modelValue:D!=null?D:"","onUpdate:modelValue":k,disabled:M,size:"small"})}}function y(C,E,T){var D,k,P,I,N,R;const A=C.key,M=T.isFieldDisabled(C);switch(C.form_type){case"text":return o.h(Ue.ElInput,{modelValue:(D=E[A])!=null?D:"","onUpdate:modelValue":B=>E[A]=B,placeholder:C.description||`请输入${C.cn_name}`,disabled:M,size:"small"});case"select":return o.h(Ue.ElSelect,{modelValue:(k=E[A])!=null?k:"","onUpdate:modelValue":B=>E[A]=B,placeholder:`请选择${C.cn_name}`,disabled:M,style:"width:100%",size:"small"},()=>(C.enum||[]).map(B=>o.h(Ue.ElOption,{key:B.value,label:B.cn_name,value:B.value})));case"number":return o.h(Ue.ElInputNumber,{modelValue:(P=E[A])!=null?P:0,"onUpdate:modelValue":B=>E[A]=B,disabled:M,min:(I=C.format)==null?void 0:I.min,max:(N=C.format)==null?void 0:N.max,style:"width:100%",size:"small"});case"switch":const V=E[A]===!0||E[A]==="true";return o.h(Ue.ElSwitch,{modelValue:V,"onUpdate:modelValue":B=>E[A]=B,disabled:M});default:return o.h(Ue.ElInput,{modelValue:(R=E[A])!=null?R:"","onUpdate:modelValue":B=>E[A]=B,disabled:M,size:"small"})}}function b(C){var E,T;return C.default_value!==void 0?C.default_value:C.form_type==="switch"?!1:C.form_type==="checkbox_group"?[]:C.form_type==="number"?(T=(E=C.format)==null?void 0:E.min)!=null?T:0:""}const x=()=>{const C=c.applyJson();C.success?Ue.ElMessage.success("JSON 配置已应用"):Ue.ElMessage.error(C.error||"JSON 格式错误")},_=()=>{c.saveFormData(),Ue.ElMessage.success("保存成功")},w=()=>Ve(null,null,function*(){var C;try{yield(C=l.value)==null?void 0:C.validate();const E=c.exportTargetJson();i.value=JSON.stringify(E,null,2),r.value=!0,a("generate",E)}catch(E){Ue.ElMessage.error("请先完善必填项")}}),S=()=>{try{const C=document.createElement("textarea");C.value=i.value,C.style.position="fixed",C.style.opacity="0",document.body.appendChild(C),C.select(),document.execCommand("copy"),document.body.removeChild(C),Ue.ElMessage.success("已复制到剪贴板")}catch(C){Ue.ElMessage.error("复制失败")}};return o.onMounted(()=>{s.registerInstance(t.uid,c)}),o.onUnmounted(()=>{s.unregisterInstance(t.uid)}),o.watchEffect(()=>{t.conf.socketData&&c.setSocketData(t.conf.socketData)}),(C,E)=>{const T=Se.ElEmpty,A=Se.ElForm;return o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({background:o.unref(u).bgColor,borderRadius:o.unref(u).radiusSize+"px"})},[o.createElementVNode("div",{class:"mix-title",style:o.normalizeStyle(f.value)},o.toDisplayString(d.value.action_name||d.value.caption||d.value.name),5),o.createElementVNode("div",g1t,[n.mode==="edit"&&o.unref(c).showJsonEditor.value?(o.openBlock(),o.createElementBlock("div",y1t,[o.createElementVNode("div",b1t,[E[8]||(E[8]=o.createElementVNode("span",null,"JSON 配置",-1)),o.createVNode(o.unref(Ue.ElButton),{size:"small",onClick:x},{default:o.withCtx(()=>[...E[6]||(E[6]=[o.createTextVNode("应用",-1)])]),_:1}),o.createVNode(o.unref(Ue.ElButton),{size:"small",onClick:E[0]||(E[0]=M=>o.unref(c).showJsonEditor.value=!1)},{default:o.withCtx(()=>[...E[7]||(E[7]=[o.createTextVNode("关闭",-1)])]),_:1})]),o.createVNode(o.unref(Ue.ElInput),{type:"textarea",modelValue:o.unref(c).jsonInput.value,"onUpdate:modelValue":E[1]||(E[1]=M=>o.unref(c).jsonInput.value=M),rows:12,placeholder:"粘贴 action_item JSON..."},null,8,["modelValue"])])):o.createCommentVNode("",!0),n.mode==="edit"&&!o.unref(c).showJsonEditor.value?(o.openBlock(),o.createElementBlock("div",x1t,[o.createVNode(o.unref(Ue.ElButton),{size:"small",type:"primary",onClick:E[2]||(E[2]=M=>o.unref(c).showJsonEditor.value=!0)},{default:o.withCtx(()=>[...E[9]||(E[9]=[o.createTextVNode("编辑 JSON",-1)])]),_:1})])):o.createCommentVNode("",!0),o.createVNode(o.unref(Ue.ElDialog),{modelValue:r.value,"onUpdate:modelValue":E[5]||(E[5]=M=>r.value=M),title:"生成的目标JSON",width:"600px","close-on-click-modal":!1},{footer:o.withCtx(()=>[o.createVNode(o.unref(Ue.ElButton),{onClick:S},{default:o.withCtx(()=>[...E[10]||(E[10]=[o.createTextVNode("复制",-1)])]),_:1}),o.createVNode(o.unref(Ue.ElButton),{type:"primary",onClick:E[4]||(E[4]=M=>r.value=!1)},{default:o.withCtx(()=>[...E[11]||(E[11]=[o.createTextVNode("关闭",-1)])]),_:1})]),default:o.withCtx(()=>[o.createVNode(o.unref(Ue.ElInput),{type:"textarea",modelValue:i.value,"onUpdate:modelValue":E[3]||(E[3]=M=>i.value=M),rows:16,readonly:""},null,8,["modelValue"])]),_:1},8,["modelValue"]),!o.unref(c).hasParams&&n.mode!=="edit"?(o.openBlock(),o.createElementBlock("div",_1t,[o.createVNode(T,{description:"等待表单配置...","image-size":80})])):o.createCommentVNode("",!0),o.unref(c).hasParams?(o.openBlock(),o.createElementBlock("div",S1t,[d.value.description?(o.openBlock(),o.createElementBlock("div",w1t,[o.createElementVNode("p",null,o.toDisplayString(d.value.description),1)])):o.createCommentVNode("",!0),o.createVNode(A,{ref_key:"formRef",ref:l,model:o.unref(c).formData,rules:o.unref(c).getFormRules(),"label-width":o.unref(u).labelWidth+"px"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(c).getVisibleParams(),M=>(o.openBlock(),o.createBlock(o.unref(v),{key:M.key,param:M,rootData:o.unref(c).formData,actionItem:o.unref(c)},null,8,["param","rootData","actionItem"]))),128)),o.unref(u).showButtons?(o.openBlock(),o.createBlock(o.unref(Ue.ElFormItem),{key:0,class:"form-buttons"},{default:o.withCtx(()=>[o.createVNode(o.unref(Ue.ElButton),{type:"primary",onClick:_},{default:o.withCtx(()=>[...E[12]||(E[12]=[o.createTextVNode("保存",-1)])]),_:1}),o.createVNode(o.unref(Ue.ElButton),{type:"success",onClick:w},{default:o.withCtx(()=>[...E[13]||(E[13]=[o.createTextVNode("生成JSON",-1)])]),_:1})]),_:1})):o.createCommentVNode("",!0)]),_:1},8,["model","rules","label-width"])])):o.createCommentVNode("",!0)]),o.renderSlot(C.$slots,"default",{},void 0,!0)],4)}}})),O1t=Dt(N1t,[["__scopeId","data-v-5198cc32"]]),P1t=Object.freeze(Object.defineProperty({__proto__:null,default:O1t},Symbol.toStringTag,{value:"Module"})),a0e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='17px'%20viewBox='0%200%2016%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e组合盒子%3c/title%3e%3cg%20id='box-icon'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20transform='translate(0.000000,%200.500000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3c!--%20外框%20--%3e%3cpath%20d='M14,0%20C15.1045695,0%2016,0.8954305%2016,2%20L16,14%20C16,15.1045695%2015.1045695,16%2014,16%20L2,16%20C0.8954305,16%200,15.1045695%200,14%20L0,2%20C0,0.8954305%200.8954305,0%202,0%20L14,0%20Z%20M14,1.2%20L2,1.2%20C1.55817,1.2%201.2,1.55817%201.2,2%20L1.2,14%20C1.2,14.44183%201.55817,14.8%202,14.8%20L14,14.8%20C14.44183,14.8%2014.8,14.44183%2014.8,14%20L14.8,2%20C14.8,1.55817%2014.44183,1.2%2014,1.2%20Z'/%3e%3c!--%20左侧插槽%20--%3e%3crect%20x='2.5'%20y='2.5'%20width='4.5'%20height='11'%20rx='0.5'/%3e%3c!--%20右侧插槽%20--%3e%3crect%20x='9'%20y='2.5'%20width='4.5'%20height='11'%20rx='0.5'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",o0e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='17px'%20viewBox='0%200%2016%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e组合盒子%3c/title%3e%3cg%20id='box-icon-active'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20transform='translate(0.000000,%200.500000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3c!--%20外框%20--%3e%3cpath%20d='M14,0%20C15.1045695,0%2016,0.8954305%2016,2%20L16,14%20C16,15.1045695%2015.1045695,16%2014,16%20L2,16%20C0.8954305,16%200,15.1045695%200,14%20L0,2%20C0,0.8954305%200.8954305,0%202,0%20L14,0%20Z%20M14,1.2%20L2,1.2%20C1.55817,1.2%201.2,1.55817%201.2,2%20L1.2,14%20C1.2,14.44183%201.55817,14.8%202,14.8%20L14,14.8%20C14.44183,14.8%2014.8,14.44183%2014.8,14%20L14.8,2%20C14.8,1.55817%2014.44183,1.2%2014,1.2%20Z'/%3e%3c!--%20左侧插槽%20--%3e%3crect%20x='2.5'%20y='2.5'%20width='4.5'%20height='11'%20rx='0.5'/%3e%3c!--%20右侧插槽%20--%3e%3crect%20x='9'%20y='2.5'%20width='4.5'%20height='11'%20rx='0.5'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",k1t=["onClick"],I1t=["onClick"],R1t={key:1,class:"slot-placeholder"},V1t={key:2,class:"slot-actions"},B1t={class:"component-selector"},F1t={class:"component-grid"},z1t=["onClick"],U1t={class:"comp-icon"},H1t=["src","alt"],j1t={class:"comp-name"},G1t={DEFAULT_ICON:a0e,ACTIVE_ICON:o0e,NAME_CN:"组合盒子",NAME_EN:"Box",ORDER:0,PLATFORM:["pc","screen","mobile"]},Y1t={layoutType:{value:"horizontal",type:"select",label:"布局方式",options:[{label:"水平排列",value:"horizontal"},{label:"垂直排列",value:"vertical"},{label:"自由布局",value:"free"},{label:"网格布局",value:"grid"}]},slotCount:{value:2,type:"number",label:"插槽数量",min:1,max:12},gridCols:{value:2,type:"number",label:"网格列数",min:1,max:6},gap:{value:8,type:"number",label:"间距(px)",min:0,max:50},padding:{value:8,type:"number",label:"内边距(px)",min:0,max:50},backgroundColor:{value:"transparent",type:"color",label:"背景色"},borderWidth:{value:0,type:"number",label:"边框宽度",min:0,max:10},borderColor:{value:"#e5e7eb",type:"color",label:"边框颜色"},borderRadius:{value:4,type:"number",label:"圆角(px)",min:0,max:50},slotsConfig:{value:"[]",type:"textarea",label:"插槽配置(JSON)",placeholder:'[{"x":0,"y":0,"w":50,"h":100},{"x":50,"y":0,"w":50,"h":100}]'}},W1t=[],X1t=[],Z1t=[],q1t={},K1t={DEFAULT:G1t,OPTIONS:Y1t,DATA:W1t,PARAMS:X1t,SOURCE:Z1t,COMMON:q1t},J1t=o.defineComponent(tt(Ne({},K1t),{__name:"box",props:{conf:{type:Object,default:()=>({data:[],options:{}})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){const e=n,t=o.shallowRef({}),r=o.ref({}),i=o.ref(!1),a=o.ref([]),s=o.ref(-1),l=o.ref(-1);o.onMounted(()=>Ve(null,null,function*(){t.value=F9.loadComponents(),r.value=yield F9.getElementsMap()}));class c extends Cn{extractStyles(){return{layoutType:this.getOptionValue("layoutType","horizontal"),slotCount:this.getOptionValue("slotCount",2),gridCols:this.getOptionValue("gridCols",2),gap:this.getOptionValue("gap",8),padding:this.getOptionValue("padding",8),backgroundColor:this.getOptionValue("backgroundColor","transparent"),borderWidth:this.getOptionValue("borderWidth",0),borderColor:this.getOptionValue("borderColor","#e5e7eb"),borderRadius:this.getOptionValue("borderRadius",4),slotsConfig:this.getOptionValue("slotsConfig","[]")}}init(){this.Style.value=this.extractStyles(),this.applyTheme(),h()}}const u=new c(e,"box");u.setupLifecycle();const d=u.getStyle(),f=o.ref([]),h=()=>{var E,T,A,M,D,k,P,I;const x=((E=d.value)==null?void 0:E.slotCount)||2,_=((T=d.value)==null?void 0:T.layoutType)||"horizontal",w=((A=e.conf)==null?void 0:A.slots)||[];let S=[];try{const N=((M=d.value)==null?void 0:M.slotsConfig)||"[]";S=JSON.parse(N)}catch(N){S=[]}const C=[];for(let N=0;N<x;N++){const R=w[N],V=S[N];let B={x:0,y:0,w:100,h:100};_==="free"&&V?B={x:(D=V.x)!=null?D:0,y:(k=V.y)!=null?k:0,w:(P=V.w)!=null?P:50,h:(I=V.h)!=null?I:100}:_==="horizontal"?B={x:100/x*N,y:0,w:100/x,h:100}:_==="vertical"&&(B={x:0,y:100/x*N,w:100,h:100/x}),C.push(tt(Ne({id:(R==null?void 0:R.id)||`slot-${Date.now()}-${N}`,name:(R==null?void 0:R.name)||(V==null?void 0:V.name)||`插槽 ${N+1}`},B),{component:(R==null?void 0:R.component)||null}))}f.value=C,e.conf&&(e.conf.slots=C)},p=o.computed(()=>{const x=d.value,_=(x==null?void 0:x.layoutType)||"horizontal",w={width:"100%",height:"100%",backgroundColor:(x==null?void 0:x.backgroundColor)||"transparent",borderWidth:`${(x==null?void 0:x.borderWidth)||0}px`,borderStyle:(x==null?void 0:x.borderWidth)>0?"solid":"none",borderColor:(x==null?void 0:x.borderColor)||"#e5e7eb",borderRadius:`${(x==null?void 0:x.borderRadius)||4}px`,padding:`${(x==null?void 0:x.padding)||8}px`,boxSizing:"border-box",overflow:"hidden"};return _==="horizontal"?tt(Ne({},w),{display:"flex",flexDirection:"row",gap:`${(x==null?void 0:x.gap)||8}px`}):_==="vertical"?tt(Ne({},w),{display:"flex",flexDirection:"column",gap:`${(x==null?void 0:x.gap)||8}px`}):_==="grid"?tt(Ne({},w),{display:"grid",gridTemplateColumns:`repeat(${(x==null?void 0:x.gridCols)||2}, 1fr)`,gap:`${(x==null?void 0:x.gap)||8}px`}):tt(Ne({},w),{position:"relative"})}),m=x=>{var w;const _=((w=d.value)==null?void 0:w.layoutType)||"horizontal";return _==="free"?{position:"absolute",left:`${x.x}%`,top:`${x.y}%`,width:`${x.w}%`,height:`${x.h}%`}:{flex:_==="horizontal"||_==="vertical"?1:void 0,minWidth:0,minHeight:0,overflow:"hidden"}},v=(x,_)=>{e.mode==="edit"&&(x.component||(s.value=_,i.value=!0))},g=(x,_)=>{var S;if(e.mode!=="edit"||!x.component)return;l.value=_;const w=new CustomEvent("box-component-selected",{bubbles:!0,detail:{component:x.component,boxId:(S=e.conf)==null?void 0:S.id,slotIndex:_}});document.dispatchEvent(w)},y=x=>{if(s.value<0)return;const w=F9.getAllExposedProps()[x.type]||{},S={id:`box-comp-${Date.now()}`,type:x.type,i:`box-comp-${Date.now()}`,x:0,y:0,w:1,h:1,options:JSON.parse(JSON.stringify(w.OPTIONS||{})),data:JSON.parse(JSON.stringify(w.DATA||[])),common:JSON.parse(JSON.stringify(w.COMMON||{}))};f.value[s.value].component=S,e.conf&&(e.conf.slots=f.value),i.value=!1,s.value=-1},b=x=>{f.value[x].component=null,e.conf&&(e.conf.slots=f.value)};return o.watch(()=>{var x,_,w;return[(x=d.value)==null?void 0:x.slotCount,(_=d.value)==null?void 0:_.layoutType,(w=d.value)==null?void 0:w.slotsConfig]},()=>{h()},{deep:!0}),(x,_)=>{const w=Se.ElIcon,S=Se.ElButton,C=Se.ElCollapseItem,E=Se.ElCollapse,T=Se.ElDialog;return o.openBlock(),o.createElementBlock("div",{class:"box-container",style:o.normalizeStyle(p.value)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.value,(A,M)=>(o.openBlock(),o.createElementBlock("div",{key:A.id,class:o.normalizeClass(["box-slot",{"slot-empty":!A.component,"slot-hover":n.mode==="edit"&&!A.component}]),style:o.normalizeStyle(m(A)),onClick:o.withModifiers(D=>v(A,M),["stop"])},[A.component&&t.value[A.component.type]?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["slot-component-wrapper",{"slot-component-selected":n.mode==="edit"&&l.value===M}]),onClick:o.withModifiers(D=>g(A,M),["stop"])},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(t.value[A.component.type]),{conf:A.component,theme:n.theme,mode:n.mode,class:"slot-component"},null,8,["conf","theme","mode"]))],10,I1t)):n.mode==="edit"?(o.openBlock(),o.createElementBlock("div",R1t,[o.createVNode(w,{size:24},{default:o.withCtx(()=>[o.createVNode(o.unref(qt.Plus))]),_:1}),o.createElementVNode("span",null,o.toDisplayString(A.name||`插槽 ${M+1}`),1)])):o.createCommentVNode("",!0),n.mode==="edit"&&A.component?(o.openBlock(),o.createElementBlock("div",V1t,[o.createVNode(S,{type:"danger",size:"small",circle:"",onClick:o.withModifiers(D=>b(M),["stop"])},{default:o.withCtx(()=>[o.createVNode(w,null,{default:o.withCtx(()=>[o.createVNode(o.unref(qt.Close))]),_:1})]),_:1},8,["onClick"])])):o.createCommentVNode("",!0)],14,k1t))),128)),o.renderSlot(x.$slots,"default",{},void 0,!0),o.createVNode(T,{modelValue:i.value,"onUpdate:modelValue":_[1]||(_[1]=A=>i.value=A),title:"选择组件",width:"600px","append-to-body":!0,"close-on-click-modal":!0,"destroy-on-close":""},{default:o.withCtx(()=>[o.createElementVNode("div",B1t,[o.createVNode(E,{modelValue:a.value,"onUpdate:modelValue":_[0]||(_[0]=A=>a.value=A)},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.value,(A,M)=>(o.openBlock(),o.createBlock(C,{key:M,title:A.name,name:M},{default:o.withCtx(()=>[o.createElementVNode("div",F1t,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.data,D=>(o.openBlock(),o.createElementBlock("div",{key:D.type,class:"component-item",onClick:k=>y(D)},[o.createElementVNode("div",U1t,[o.createElementVNode("img",{src:D.default_icon,alt:D.name},null,8,H1t)]),o.createElementVNode("div",j1t,o.toDisplayString(D.name),1)],8,z1t))),128))])]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])])]),_:1},8,["modelValue"])],4)}}})),Q1t=Dt(J1t,[["__scopeId","data-v-61ed94fc"]]),$1t=Object.freeze(Object.defineProperty({__proto__:null,default:Q1t},Symbol.toStringTag,{value:"Module"})),fF="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e时间%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-646.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M657.730732,99.4163895%20C658.056601,99.4163895%20658.325912,99.6585445%20658.368534,99.9727243%20L658.37441,100.060068%20L658.374333,100.577389%20L661.215306,100.577914%20C661.952401,100.577914%20662.55813,101.14029%20662.626842,101.859376%20L662.633333,101.995942%20L662.633333,113.998362%20C662.633333,114.781529%20661.998472,115.416389%20661.215306,115.416389%20L661.215306,115.416389%20L648.051361,115.416389%20C647.268203,115.416389%20646.633333,114.781526%20646.633333,113.998362%20L646.633333,113.998362%20L646.633333,101.995942%20C646.633333,101.212786%20647.268206,100.577914%20648.051361,100.577914%20L648.051361,100.577914%20L650.891333,100.577389%20L650.892257,100.060068%20C650.892257,99.704574%20651.180441,99.4163895%20651.535935,99.4163895%20C651.861804,99.4163895%20652.131115,99.6585445%20652.173737,99.9727243%20L652.179613,100.060068%20L652.179333,100.577389%20L657.086333,100.577389%20L657.087054,100.060068%20C657.087054,99.704574%20657.375238,99.4163895%20657.730732,99.4163895%20Z%20M661.34567,106.510687%20L647.920383,106.510687%20L647.92069,113.998362%20C647.92069,114.056101%20647.958128,114.105087%20648.010057,114.122372%20L648.010057,114.122372%20L648.051361,114.129033%20L661.215306,114.129033%20C661.287485,114.129033%20661.345977,114.070541%20661.345977,113.998362%20L661.345977,113.998362%20L661.34567,106.510687%20Z%20M658.505082,111.031634%20C658.860575,111.031634%20659.14876,111.319819%20659.14876,111.675313%20C659.14876,112.001182%20658.906605,112.270493%20658.592425,112.313115%20L658.505082,112.318991%20L656.182033,112.318991%20C655.826539,112.318991%20655.538355,112.030806%20655.538355,111.675313%20C655.538355,111.349443%20655.78051,111.080133%20656.094689,111.037511%20L656.182033,111.031634%20L658.505082,111.031634%20Z%20M653.084634,111.031634%20C653.440128,111.031634%20653.728312,111.319819%20653.728312,111.675313%20C653.728312,112.001182%20653.486157,112.270493%20653.171977,112.313115%20L653.084634,112.318991%20L650.761585,112.318991%20C650.406091,112.318991%20650.117907,112.030806%20650.117907,111.675313%20C650.117907,111.349443%20650.360062,111.080133%20650.674242,111.037511%20L650.761585,111.031634%20L653.084634,111.031634%20Z%20M658.505082,107.934236%20C658.860575,107.934236%20659.14876,108.22242%20659.14876,108.577914%20C659.14876,108.903783%20658.906605,109.173094%20658.592425,109.215716%20L658.505082,109.221592%20L656.182033,109.221592%20C655.826539,109.221592%20655.538355,108.933408%20655.538355,108.577914%20C655.538355,108.252045%20655.78051,107.982734%20656.094689,107.940112%20L656.182033,107.934236%20L658.505082,107.934236%20Z%20M653.084634,107.934236%20C653.440128,107.934236%20653.728312,108.22242%20653.728312,108.577914%20C653.728312,108.903783%20653.486157,109.173094%20653.171977,109.215716%20L653.084634,109.221592%20L650.761585,109.221592%20C650.406091,109.221592%20650.117907,108.933408%20650.117907,108.577914%20C650.117907,108.252045%20650.360062,107.982734%20650.674242,107.940112%20L650.761585,107.934236%20L653.084634,107.934236%20Z%20M650.891333,101.864389%20L648.051361,101.86527%20C647.979193,101.86527%20647.92069,101.923774%20647.92069,101.995942%20L647.92069,101.995942%20L647.920383,105.223331%20L661.34567,105.223331%20L661.345977,101.995942%20C661.345977,101.938203%20661.308539,101.889217%20661.25661,101.871931%20L661.25661,101.871931%20L661.215306,101.86527%20L658.374333,101.864389%20L658.37441,103.157466%20C658.37441,103.51296%20658.086226,103.801144%20657.730732,103.801144%20C657.404863,103.801144%20657.135552,103.558989%20657.09293,103.24481%20L657.087054,103.157466%20L657.086333,101.864389%20L652.179333,101.864389%20L652.179613,103.157466%20C652.179613,103.51296%20651.891428,103.801144%20651.535935,103.801144%20C651.210066,103.801144%20650.940755,103.558989%20650.898133,103.24481%20L650.892257,103.157466%20L650.891333,101.864389%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",hF="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e时间%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-646.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M657.730732,99.4163895%20C658.056601,99.4163895%20658.325912,99.6585445%20658.368534,99.9727243%20L658.37441,100.060068%20L658.374333,100.577389%20L661.215306,100.577914%20C661.952401,100.577914%20662.55813,101.14029%20662.626842,101.859376%20L662.633333,101.995942%20L662.633333,113.998362%20C662.633333,114.781529%20661.998472,115.416389%20661.215306,115.416389%20L661.215306,115.416389%20L648.051361,115.416389%20C647.268203,115.416389%20646.633333,114.781526%20646.633333,113.998362%20L646.633333,113.998362%20L646.633333,101.995942%20C646.633333,101.212786%20647.268206,100.577914%20648.051361,100.577914%20L648.051361,100.577914%20L650.891333,100.577389%20L650.892257,100.060068%20C650.892257,99.704574%20651.180441,99.4163895%20651.535935,99.4163895%20C651.861804,99.4163895%20652.131115,99.6585445%20652.173737,99.9727243%20L652.179613,100.060068%20L652.179333,100.577389%20L657.086333,100.577389%20L657.087054,100.060068%20C657.087054,99.704574%20657.375238,99.4163895%20657.730732,99.4163895%20Z%20M661.34567,106.510687%20L647.920383,106.510687%20L647.92069,113.998362%20C647.92069,114.056101%20647.958128,114.105087%20648.010057,114.122372%20L648.010057,114.122372%20L648.051361,114.129033%20L661.215306,114.129033%20C661.287485,114.129033%20661.345977,114.070541%20661.345977,113.998362%20L661.345977,113.998362%20L661.34567,106.510687%20Z%20M658.505082,111.031634%20C658.860575,111.031634%20659.14876,111.319819%20659.14876,111.675313%20C659.14876,112.001182%20658.906605,112.270493%20658.592425,112.313115%20L658.505082,112.318991%20L656.182033,112.318991%20C655.826539,112.318991%20655.538355,112.030806%20655.538355,111.675313%20C655.538355,111.349443%20655.78051,111.080133%20656.094689,111.037511%20L656.182033,111.031634%20L658.505082,111.031634%20Z%20M653.084634,111.031634%20C653.440128,111.031634%20653.728312,111.319819%20653.728312,111.675313%20C653.728312,112.001182%20653.486157,112.270493%20653.171977,112.313115%20L653.084634,112.318991%20L650.761585,112.318991%20C650.406091,112.318991%20650.117907,112.030806%20650.117907,111.675313%20C650.117907,111.349443%20650.360062,111.080133%20650.674242,111.037511%20L650.761585,111.031634%20L653.084634,111.031634%20Z%20M658.505082,107.934236%20C658.860575,107.934236%20659.14876,108.22242%20659.14876,108.577914%20C659.14876,108.903783%20658.906605,109.173094%20658.592425,109.215716%20L658.505082,109.221592%20L656.182033,109.221592%20C655.826539,109.221592%20655.538355,108.933408%20655.538355,108.577914%20C655.538355,108.252045%20655.78051,107.982734%20656.094689,107.940112%20L656.182033,107.934236%20L658.505082,107.934236%20Z%20M653.084634,107.934236%20C653.440128,107.934236%20653.728312,108.22242%20653.728312,108.577914%20C653.728312,108.903783%20653.486157,109.173094%20653.171977,109.215716%20L653.084634,109.221592%20L650.761585,109.221592%20C650.406091,109.221592%20650.117907,108.933408%20650.117907,108.577914%20C650.117907,108.252045%20650.360062,107.982734%20650.674242,107.940112%20L650.761585,107.934236%20L653.084634,107.934236%20Z%20M650.891333,101.864389%20L648.051361,101.86527%20C647.979193,101.86527%20647.92069,101.923774%20647.92069,101.995942%20L647.92069,101.995942%20L647.920383,105.223331%20L661.34567,105.223331%20L661.345977,101.995942%20C661.345977,101.938203%20661.308539,101.889217%20661.25661,101.871931%20L661.25661,101.871931%20L661.215306,101.86527%20L658.374333,101.864389%20L658.37441,103.157466%20C658.37441,103.51296%20658.086226,103.801144%20657.730732,103.801144%20C657.404863,103.801144%20657.135552,103.558989%20657.09293,103.24481%20L657.087054,103.157466%20L657.086333,101.864389%20L652.179333,101.864389%20L652.179613,103.157466%20C652.179613,103.51296%20651.891428,103.801144%20651.535935,103.801144%20C651.210066,103.801144%20650.940755,103.558989%20650.898133,103.24481%20L650.892257,103.157466%20L650.891333,101.864389%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",edt={key:0,class:"digital-clock"},tdt={key:1,class:"analog-clock-wrapper"},ndt=["width","height"],rdt=["r","stroke","stroke-width"],idt=["r","fill"],adt=["x1","y1","x2","y2","stroke"],odt={key:0},sdt=["x","y","fill","font-size"],ldt=["x2","y2","stroke","stroke-width"],cdt=["x2","y2","stroke","stroke-width"],udt=["x2","y2","stroke","stroke-width"],ddt=["r","fill"],fdt={DEFAULT_ICON:fF,ACTIVE_ICON:hF,NAME_CN:"钟表",NAME_EN:"Clock",ORDER:5,PLATFORM:["pc","screen","mobile"]},hdt={clockType:{value:"analog",type:"select",label:"时钟类型",options:[{label:"模拟时钟",value:"analog"},{label:"数字时钟",value:"digital"}]},timeFormat:{value:"24",type:"select",label:"时间格式",options:[{label:"24小时制",value:"24"},{label:"12小时制",value:"12"}]},showDate:{value:!0,type:"checkbox",label:"显示日期"},showSecondHand:{value:!0,type:"checkbox",label:"显示秒针"},showNumbers:{value:!0,type:"checkbox",label:"显示数字"},digitalFontSize:32,digitalColor:"#1f2937",digitalDateSize:14,digitalDateColor:"#6b7280",clockSize:200,backgroundColor:"#ffffff",borderColor:"#374151",borderWidth:2,tickColor:"#374151",numberColor:"#1f2937",numberSize:14,hourHandColor:"#374151",minuteHandColor:"#374151",secondHandColor:"#ef4444",centerDotColor:"#374151"},pdt=[],mdt=[],vdt=[],gdt={},ydt={DEFAULT:fdt,OPTIONS:hdt,DATA:pdt,PARAMS:mdt,SOURCE:vdt,COMMON:gdt},bdt=o.defineComponent(tt(Ne({},ydt),{__name:"clock",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){const e=n;class t extends Cn{constructor(){super(...arguments),this.timer=null}extractStyles(){return{clockType:this.getOptionValue("clockType","analog"),timeFormat:this.getOptionValue("timeFormat","24"),showDate:this.getOptionValue("showDate",!0),showSecondHand:this.getOptionValue("showSecondHand",!0),showNumbers:this.getOptionValue("showNumbers",!0),clockSize:this.getOptionValue("clockSize",200),backgroundColor:this.getOptionValue("backgroundColor","#ffffff"),borderColor:this.getOptionValue("borderColor","#374151"),borderWidth:this.getOptionValue("borderWidth",2),tickColor:this.getOptionValue("tickColor","#374151"),numberColor:this.getOptionValue("numberColor","#1f2937"),numberSize:this.getOptionValue("numberSize",14),hourHandColor:this.getOptionValue("hourHandColor","#374151"),minuteHandColor:this.getOptionValue("minuteHandColor","#374151"),secondHandColor:this.getOptionValue("secondHandColor","#ef4444"),centerDotColor:this.getOptionValue("centerDotColor","#374151"),digitalFontSize:this.getOptionValue("digitalFontSize",32),digitalColor:this.getOptionValue("digitalColor","#1f2937"),digitalDateSize:this.getOptionValue("digitalDateSize",14),digitalDateColor:this.getOptionValue("digitalDateColor","#6b7280")}}init(){this.Style.value=this.extractStyles(),this.applyTheme(),this.timer&&clearInterval(this.timer),U(),this.timer=setInterval(U,1e3)}cleanup(){this.timer&&clearInterval(this.timer)}}const r=new t(e,"clock");r.setupLifecycle();const i=r.getStyle(),a=o.ref(""),s=o.ref(""),l=o.ref(0),c=o.ref(0),u=o.ref(0),d=o.computed(()=>({width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"})),f=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.clockType)||"analog"}),h=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.timeFormat)||"24"}),p=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.showDate)!==!1}),m=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.showSecondHand)!==!1}),v=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.showNumbers)!==!1}),g=o.computed(()=>{var W;const z=(W=i.value)==null?void 0:W.clockSize,j=Number(z);return typeof j=="number"&&!Number.isNaN(j)&&j>0?j:200}),y=o.computed(()=>{const z=g.value;return typeof z=="number"&&!Number.isNaN(z)?z*.45:90}),b=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.backgroundColor)||"#ffffff"}),x=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.borderColor)||"#374151"}),_=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.borderWidth)||2}),w=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.tickColor)||"#374151"}),S=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.numberColor)||"#1f2937"}),C=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.numberSize)||14}),E=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.hourHandColor)||"#374151"}),T=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.minuteHandColor)||"#374151"}),A=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.secondHandColor)||"#ef4444"}),M=o.computed(()=>{var z;return((z=i.value)==null?void 0:z.centerDotColor)||"#374151"}),D=o.computed(()=>y.value*.5),k=o.computed(()=>y.value*.7),P=o.computed(()=>y.value*.8),I=o.computed(()=>Math.max(3,g.value*.015)),N=o.computed(()=>Math.max(2,g.value*.01)),R=o.computed(()=>Math.max(1,g.value*.005)),V=o.computed(()=>Math.max(3,g.value*.015)),B=o.computed(()=>({width:`${g.value}px`,height:`${g.value}px`,maxWidth:"100%",maxHeight:"100%"})),F=o.computed(()=>{var z,j;return{fontSize:`${((z=i.value)==null?void 0:z.digitalFontSize)||32}px`,color:((j=i.value)==null?void 0:j.digitalColor)||"#1f2937",fontWeight:"bold",fontFamily:"monospace"}}),G=o.computed(()=>{var z,j;return{fontSize:`${((z=i.value)==null?void 0:z.digitalDateSize)||14}px`,color:((j=i.value)==null?void 0:j.digitalDateColor)||"#6b7280",fontFamily:"monospace",marginTop:"8px"}}),U=()=>{const z=new Date;l.value=z.getHours(),c.value=z.getMinutes(),u.value=z.getSeconds();let j=l.value,W="";h.value==="12"&&(W=j>=12?" PM":" AM",j=j%12,j===0&&(j=12)),a.value=`${j.toString().padStart(2,"0")}:${c.value.toString().padStart(2,"0")}:${u.value.toString().padStart(2,"0")}${W}`;const Y=z.getFullYear(),re=(z.getMonth()+1).toString().padStart(2,"0"),Q=z.getDate().toString().padStart(2,"0"),$=["周日","周一","周二","周三","周四","周五","周六"];s.value=`${Y}-${re}-${Q} ${$[z.getDay()]}`};return o.onMounted(()=>U()),(z,j)=>(o.openBlock(),o.createElementBlock("div",{style:o.normalizeStyle(d.value),class:"mix-component"},[f.value==="digital"?(o.openBlock(),o.createElementBlock("div",edt,[o.createElementVNode("div",{class:"time-display",style:o.normalizeStyle(F.value)},o.toDisplayString(a.value),5),p.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"date-display",style:o.normalizeStyle(G.value)},o.toDisplayString(s.value),5)):o.createCommentVNode("",!0)])):(o.openBlock(),o.createElementBlock("div",tdt,[o.createElementVNode("div",{class:"analog-clock",style:o.normalizeStyle(B.value)},[(o.openBlock(),o.createElementBlock("svg",{width:g.value,height:g.value,viewBox:"0 0 200 200",class:"clock-svg"},[o.createElementVNode("circle",{cx:"100",cy:"100",r:y.value,stroke:x.value,"stroke-width":_.value,fill:"none"},null,8,rdt),o.createElementVNode("circle",{cx:"100",cy:"100",r:y.value-_.value/2,fill:b.value},null,8,idt),(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(12,W=>o.createElementVNode("g",{key:`hour-${W}`},[o.createElementVNode("line",{x1:100+(y.value-15)*Math.cos((W*30-90)*Math.PI/180),y1:100+(y.value-15)*Math.sin((W*30-90)*Math.PI/180),x2:100+(y.value-5)*Math.cos((W*30-90)*Math.PI/180),y2:100+(y.value-5)*Math.sin((W*30-90)*Math.PI/180),stroke:w.value,"stroke-width":"2"},null,8,adt)])),64)),v.value?(o.openBlock(),o.createElementBlock("g",odt,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(12,W=>o.createElementVNode("text",{key:`number-${W}`,x:100+(y.value-25)*Math.cos((W*30-90)*Math.PI/180),y:100+(y.value-25)*Math.sin((W*30-90)*Math.PI/180),"text-anchor":"middle","dominant-baseline":"central",fill:S.value,"font-size":C.value,"font-weight":"bold"},o.toDisplayString(W),9,sdt)),64))])):o.createCommentVNode("",!0),o.createElementVNode("line",{x1:"100",y1:"100",x2:100+D.value*Math.cos((l.value*30+c.value*.5-90)*Math.PI/180),y2:100+D.value*Math.sin((l.value*30+c.value*.5-90)*Math.PI/180),stroke:E.value,"stroke-width":I.value,"stroke-linecap":"round"},null,8,ldt),o.createElementVNode("line",{x1:"100",y1:"100",x2:100+k.value*Math.cos((c.value*6-90)*Math.PI/180),y2:100+k.value*Math.sin((c.value*6-90)*Math.PI/180),stroke:T.value,"stroke-width":N.value,"stroke-linecap":"round"},null,8,cdt),m.value?(o.openBlock(),o.createElementBlock("line",{key:1,x1:"100",y1:"100",x2:100+P.value*Math.cos((u.value*6-90)*Math.PI/180),y2:100+P.value*Math.sin((u.value*6-90)*Math.PI/180),stroke:A.value,"stroke-width":R.value,"stroke-linecap":"round"},null,8,udt)):o.createCommentVNode("",!0),o.createElementVNode("circle",{cx:"100",cy:"100",r:V.value,fill:M.value},null,8,ddt)],8,ndt))],4),p.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"date-display",style:o.normalizeStyle(G.value)},o.toDisplayString(s.value),5)):o.createCommentVNode("",!0)])),o.renderSlot(z.$slots,"default",{},void 0,!0)],4))}})),xdt=Dt(bdt,[["__scopeId","data-v-d8289d01"]]),_dt=Object.freeze(Object.defineProperty({__proto__:null,default:xdt},Symbol.toStringTag,{value:"Module"})),Sdt={class:"mix-component"},wdt={DEFAULT_ICON:fF,ACTIVE_ICON:hF,NAME_CN:"时间",NAME_EN:"Date Time",ORDER:1,PLATFORM:["pc","screen","mobile"]},Cdt={bgColor:"#fff",textColor:"#111",textSize:16,radiusSize:8,format:{value:"YYYY-MM-DD HH:mm:ss",type:"select",label:"component.customized.format",options:[{label:"component.customized.dateTimeFormat1",value:"YYYY-MM-DD HH:mm:ss"},{label:"component.customized.dateTimeFormat2",value:"YYYY年MM月DD日 HH:mm:ss"},{label:"component.customized.dateTimeFormat3",value:"YYYY/MM/DD HH:mm:ss"},{label:"component.customized.dateFormat",value:"YYYY-MM-DD"},{label:"component.customized.timeFormat",value:"HH:mm:ss"}]}},Edt={DEFAULT:wdt,OPTIONS:Cdt,COMMON:{}},Adt=o.defineComponent(tt(Ne({},Edt),{__name:"datetime",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){const e=n,t=o.ref("");let r=null;class i extends Cn{extractStyles(){const{options:u}=this.props.conf,d=(f,h)=>{const p=u==null?void 0:u[f];return p==null?h:typeof p=="object"&&"value"in p?p.value:p};return{bgColor:d("bgColor","#fff"),textColor:d("textColor","#303133"),textSize:d("textSize",16),radiusSize:d("radiusSize",8)}}init(){super.init(),r&&clearInterval(r),a(),r=setInterval(()=>{a()},1e3)}cleanup(){r&&(clearInterval(r),r=null)}}const a=()=>{const{options:c}=e.conf,u=c==null?void 0:c.format,d=u&&typeof u=="object"&&"value"in u?u.value:u||"YYYY-MM-DD HH:mm:ss";t.value=mt().format(d)},s=new i(e,"datetime");s.setupLifecycle();const l=s.getStyle();return o.watch(()=>{var c;return(c=e.conf)==null?void 0:c.options},c=>{c&&(l.value=s.extractStyles(),a())},{deep:!0}),(c,u)=>(o.openBlock(),o.createElementBlock("div",Sdt,[o.createElementVNode("div",{class:"flex flex-1 px-[12px] items-center justify-center flex-nowrap",style:o.normalizeStyle({backgroundColor:o.unref(l).bgColor,color:o.unref(l).textColor,borderRadius:`${o.unref(l).radiusSize}px`,fontSize:`${o.unref(l).textSize}px`})},o.toDisplayString(t.value),5),o.renderSlot(c.$slots,"default",{},void 0,!0)]))}})),Tdt=Dt(Adt,[["__scopeId","data-v-7961577a"]]),Mdt=Object.freeze(Object.defineProperty({__proto__:null,default:Tdt},Symbol.toStringTag,{value:"Module"})),Ddt=["data-placeholder-id","data-placeholder-name","data-x","data-y","data-w","data-h"],Ldt={key:0,class:"mix-placeholder__label"},Ndt={class:"mix-placeholder__title"},Odt={key:0,class:"mix-placeholder__name"},Pdt={class:"mix-placeholder__meta"},kdt={key:0,class:"mix-placeholder__pixel"},Idt={class:"mix-placeholder__pixel-pos"},Rdt={key:1,class:"mix-placeholder__desc"},Vdt={key:0,class:"mix-placeholder__name-runtime"},Bdt={DEFAULT_ICON:a0e,ACTIVE_ICON:o0e,NAME_CN:"占位组件",NAME_EN:"Placeholder",ORDER:99,PLATFORM:["pc","screen","mobile"]},Fdt={placeholderName:{value:"",type:"string",label:"占位组件名称"},description:{value:"",type:"string",label:"描述"},bgColor:{value:"rgba(64, 158, 255, 0.08)",type:"color",label:"填充色"},borderColor:{value:"#409EFF",type:"color",label:"边框颜色"},borderWidth:{value:2,type:"number",label:"边框宽度",min:0,max:10},borderStyle:{value:"dashed",type:"radio",label:"边框样式",option:[{label:"实线",value:"solid"},{label:"虚线",value:"dashed"},{label:"点线",value:"dotted"}]},radiusSize:{value:4,type:"number",label:"圆角",min:0,max:50},showLabel:{value:!0,type:"checkbox",label:"显示标签"},showInPreview:{value:!1,type:"checkbox",label:"运行时显示边框"}},zdt=[],Udt={},Hdt={DEFAULT:Bdt,OPTIONS:Fdt,SOURCE:zdt,COMMON:Udt},jdt=o.defineComponent(tt(Ne({},Hdt),{__name:"placeholder",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){const e=n,t=(m,v)=>{var y,b;const g=(b=(y=e.conf)==null?void 0:y.options)==null?void 0:b[m];return g==null?v:typeof g=="object"&&"value"in g?g.value:g},r=o.computed(()=>({placeholderName:t("placeholderName",""),description:t("description",""),bgColor:t("bgColor","rgba(64, 158, 255, 0.08)"),borderColor:t("borderColor","#409EFF"),borderWidth:Number(t("borderWidth",2))||0,borderStyle:t("borderStyle","dashed"),radiusSize:Number(t("radiusSize",4))||0,showLabel:t("showLabel",!0)!==!1,showInPreview:t("showInPreview",!1)===!0})),i=o.computed(()=>{var m,v;return r.value.placeholderName||((m=e.conf)==null?void 0:m.name)||((v=e.conf)==null?void 0:v.id)||""}),a=o.computed(()=>{var m,v;return r.value.placeholderName||((m=e.conf)==null?void 0:m.caption)||((v=e.conf)==null?void 0:v.name)||""}),s=o.computed(()=>({backgroundColor:r.value.bgColor,borderColor:r.value.borderColor,borderStyle:r.value.borderStyle,borderWidth:`${r.value.borderWidth}px`,borderRadius:`${r.value.radiusSize}px`})),l=o.computed(()=>({borderColor:r.value.borderColor,borderStyle:r.value.borderStyle,borderWidth:`${Math.max(1,r.value.borderWidth)}px`,borderRadius:`${r.value.radiusSize}px`,backgroundColor:"transparent"})),c=o.ref(null),u=o.useTemplateRef("rootRef"),d=()=>{const m=u.value;if(!m)return{gridItem:null,canvas:null};const v=m.closest(".vgl-item")||m.closest(".vue-grid-item"),g=m.closest(".canvas");return{gridItem:v,canvas:g}},f=()=>{const{gridItem:m,canvas:v}=d();if(!m||!v)return;const g=m.getBoundingClientRect(),y=v.getBoundingClientRect(),b=v.offsetWidth||1,x=y.width/b||1,_=x===0?1:x;c.value={left:Math.round((g.left-y.left)/_),top:Math.round((g.top-y.top)/_),width:Math.round(g.width/_),height:Math.round(g.height/_)}},h=m=>{var v,g,y,b,x,_,w,S,C;if(typeof window!="undefined")try{window.dispatchEvent(new CustomEvent(`mix-placeholder:${m}`,{detail:{id:((v=e.conf)==null?void 0:v.id)||"",name:i.value,grid:{x:(y=(g=e.conf)==null?void 0:g.x)!=null?y:0,y:(x=(b=e.conf)==null?void 0:b.y)!=null?x:0,w:(w=(_=e.conf)==null?void 0:_.w)!=null?w:0,h:(C=(S=e.conf)==null?void 0:S.h)!=null?C:0},pixel:c.value,mode:e.mode}}))}catch(E){}};let p=null;return o.onMounted(()=>{o.nextTick(()=>{f(),h("registered");const{gridItem:m}=d();m&&typeof ResizeObserver!="undefined"&&(p=new ResizeObserver(()=>{f(),h("updated")}),p.observe(m))})}),o.onBeforeUnmount(()=>{p==null||p.disconnect(),p=null,h("unregistered")}),o.watch(()=>{var m,v,g,y,b;return[(m=e.conf)==null?void 0:m.x,(v=e.conf)==null?void 0:v.y,(g=e.conf)==null?void 0:g.w,(y=e.conf)==null?void 0:y.h,(b=e.conf)==null?void 0:b.options,e.mode]},()=>{o.nextTick(()=>{f(),h("updated")})},{deep:!0}),(m,v)=>{var g,y,b,x,_,w,S,C,E,T,A,M,D,k,P,I,N;return o.openBlock(),o.createElementBlock("div",{ref_key:"rootRef",ref:u,class:"mix-placeholder",style:o.normalizeStyle({pointerEvents:n.mode==="edit"?"auto":void 0}),"data-placeholder-id":((g=n.conf)==null?void 0:g.id)||"","data-placeholder-name":i.value,"data-x":(b=(y=n.conf)==null?void 0:y.x)!=null?b:0,"data-y":(_=(x=n.conf)==null?void 0:x.y)!=null?_:0,"data-w":(S=(w=n.conf)==null?void 0:w.w)!=null?S:0,"data-h":(E=(C=n.conf)==null?void 0:C.h)!=null?E:0},[n.mode==="edit"?(o.openBlock(),o.createElementBlock("div",{key:0,class:"mix-placeholder__frame mix-placeholder__frame--edit",style:o.normalizeStyle(s.value)},[r.value.showLabel?(o.openBlock(),o.createElementBlock("div",Ldt,[o.createElementVNode("div",Ndt,[v[0]||(v[0]=o.createElementVNode("span",{class:"mix-placeholder__tag"},"占位组件",-1)),a.value?(o.openBlock(),o.createElementBlock("span",Odt,o.toDisplayString(a.value),1)):o.createCommentVNode("",!0)]),o.createElementVNode("div",Pdt,[o.createElementVNode("span",null,"x:"+o.toDisplayString((A=(T=n.conf)==null?void 0:T.x)!=null?A:0),1),o.createElementVNode("span",null,"y:"+o.toDisplayString((D=(M=n.conf)==null?void 0:M.y)!=null?D:0),1),o.createElementVNode("span",null,"w:"+o.toDisplayString((P=(k=n.conf)==null?void 0:k.w)!=null?P:0),1),o.createElementVNode("span",null,"h:"+o.toDisplayString((N=(I=n.conf)==null?void 0:I.h)!=null?N:0),1)]),c.value?(o.openBlock(),o.createElementBlock("div",kdt,[o.createTextVNode(o.toDisplayString(c.value.width)+"px × "+o.toDisplayString(c.value.height)+"px ",1),o.createElementVNode("span",Idt,"@("+o.toDisplayString(c.value.left)+", "+o.toDisplayString(c.value.top)+")",1)])):o.createCommentVNode("",!0),r.value.description?(o.openBlock(),o.createElementBlock("div",Rdt,o.toDisplayString(r.value.description),1)):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)],4)):r.value.showInPreview?(o.openBlock(),o.createElementBlock("div",{key:1,class:"mix-placeholder__frame mix-placeholder__frame--runtime",style:o.normalizeStyle(l.value)},[r.value.showLabel&&a.value?(o.openBlock(),o.createElementBlock("span",Vdt,o.toDisplayString(a.value),1)):o.createCommentVNode("",!0)],4)):o.createCommentVNode("",!0),o.renderSlot(m.$slots,"default",{},void 0,!0)],12,Ddt)}}})),Gdt=Dt(jdt,[["__scopeId","data-v-d6ad7f4c"]]),Ydt=Object.freeze(Object.defineProperty({__proto__:null,default:Gdt},Symbol.toStringTag,{value:"Module"}));var Ku=function(){return Ku=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++){t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},Ku.apply(this,arguments)};var Zp;(function(n){var e=(function(){function s(l,c,u,d){if(this.version=l,this.errorCorrectionLevel=c,this.modules=[],this.isFunction=[],l<s.MIN_VERSION||l>s.MAX_VERSION)throw new RangeError("Version value out of range");if(d<-1||d>7)throw new RangeError("Mask value out of range");this.size=l*4+17;for(var f=[],h=0;h<this.size;h++)f.push(!1);for(var h=0;h<this.size;h++)this.modules.push(f.slice()),this.isFunction.push(f.slice());this.drawFunctionPatterns();var p=this.addEccAndInterleave(u);if(this.drawCodewords(p),d==-1)for(var m=1e9,h=0;h<8;h++){this.applyMask(h),this.drawFormatBits(h);var v=this.getPenaltyScore();v<m&&(d=h,m=v),this.applyMask(h)}i(0<=d&&d<=7),this.mask=d,this.applyMask(d),this.drawFormatBits(d),this.isFunction=[]}return s.encodeText=function(l,c){var u=n.QrSegment.makeSegments(l);return s.encodeSegments(u,c)},s.encodeBinary=function(l,c){var u=n.QrSegment.makeBytes(l);return s.encodeSegments([u],c)},s.encodeSegments=function(l,c,u,d,f,h){if(u===void 0&&(u=1),d===void 0&&(d=40),f===void 0&&(f=-1),h===void 0&&(h=!0),!(s.MIN_VERSION<=u&&u<=d&&d<=s.MAX_VERSION)||f<-1||f>7)throw new RangeError("Invalid value");var p,m;for(p=u;;p++){var v=s.getNumDataCodewords(p,c)*8,g=a.getTotalBits(l,p);if(g<=v){m=g;break}if(p>=d)throw new RangeError("Data too long")}for(var y=0,b=[s.Ecc.MEDIUM,s.Ecc.QUARTILE,s.Ecc.HIGH];y<b.length;y++){var x=b[y];h&&m<=s.getNumDataCodewords(p,x)*8&&(c=x)}for(var _=[],w=0,S=l;w<S.length;w++){var C=S[w];t(C.mode.modeBits,4,_),t(C.numChars,C.mode.numCharCountBits(p),_);for(var E=0,T=C.getData();E<T.length;E++){var A=T[E];_.push(A)}}i(_.length==m);var M=s.getNumDataCodewords(p,c)*8;i(_.length<=M),t(0,Math.min(4,M-_.length),_),t(0,(8-_.length%8)%8,_),i(_.length%8==0);for(var D=236;_.length<M;D^=253)t(D,8,_);for(var k=[];k.length*8<_.length;)k.push(0);return _.forEach(function(P,I){return k[I>>>3]|=P<<7-(I&7)}),new s(p,c,k,f)},s.prototype.getModule=function(l,c){return 0<=l&&l<this.size&&0<=c&&c<this.size&&this.modules[c][l]},s.prototype.getModules=function(){return this.modules},s.prototype.drawFunctionPatterns=function(){for(var l=0;l<this.size;l++)this.setFunctionModule(6,l,l%2==0),this.setFunctionModule(l,6,l%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);for(var c=this.getAlignmentPatternPositions(),u=c.length,l=0;l<u;l++)for(var d=0;d<u;d++)l==0&&d==0||l==0&&d==u-1||l==u-1&&d==0||this.drawAlignmentPattern(c[l],c[d]);this.drawFormatBits(0),this.drawVersion()},s.prototype.drawFormatBits=function(l){for(var c=this.errorCorrectionLevel.formatBits<<3|l,u=c,d=0;d<10;d++)u=u<<1^(u>>>9)*1335;var f=(c<<10|u)^21522;i(f>>>15==0);for(var d=0;d<=5;d++)this.setFunctionModule(8,d,r(f,d));this.setFunctionModule(8,7,r(f,6)),this.setFunctionModule(8,8,r(f,7)),this.setFunctionModule(7,8,r(f,8));for(var d=9;d<15;d++)this.setFunctionModule(14-d,8,r(f,d));for(var d=0;d<8;d++)this.setFunctionModule(this.size-1-d,8,r(f,d));for(var d=8;d<15;d++)this.setFunctionModule(8,this.size-15+d,r(f,d));this.setFunctionModule(8,this.size-8,!0)},s.prototype.drawVersion=function(){if(!(this.version<7)){for(var l=this.version,c=0;c<12;c++)l=l<<1^(l>>>11)*7973;var u=this.version<<12|l;i(u>>>18==0);for(var c=0;c<18;c++){var d=r(u,c),f=this.size-11+c%3,h=Math.floor(c/3);this.setFunctionModule(f,h,d),this.setFunctionModule(h,f,d)}}},s.prototype.drawFinderPattern=function(l,c){for(var u=-4;u<=4;u++)for(var d=-4;d<=4;d++){var f=Math.max(Math.abs(d),Math.abs(u)),h=l+d,p=c+u;0<=h&&h<this.size&&0<=p&&p<this.size&&this.setFunctionModule(h,p,f!=2&&f!=4)}},s.prototype.drawAlignmentPattern=function(l,c){for(var u=-2;u<=2;u++)for(var d=-2;d<=2;d++)this.setFunctionModule(l+d,c+u,Math.max(Math.abs(d),Math.abs(u))!=1)},s.prototype.setFunctionModule=function(l,c,u){this.modules[c][l]=u,this.isFunction[c][l]=!0},s.prototype.addEccAndInterleave=function(l){var c=this.version,u=this.errorCorrectionLevel;if(l.length!=s.getNumDataCodewords(c,u))throw new RangeError("Invalid argument");for(var d=s.NUM_ERROR_CORRECTION_BLOCKS[u.ordinal][c],f=s.ECC_CODEWORDS_PER_BLOCK[u.ordinal][c],h=Math.floor(s.getNumRawDataModules(c)/8),p=d-h%d,m=Math.floor(h/d),v=[],g=s.reedSolomonComputeDivisor(f),y=0,b=0;y<d;y++){var x=l.slice(b,b+m-f+(y<p?0:1));b+=x.length;var _=s.reedSolomonComputeRemainder(x,g);y<p&&x.push(0),v.push(x.concat(_))}for(var w=[],S=function(C){v.forEach(function(E,T){(C!=m-f||T>=p)&&w.push(E[C])})},y=0;y<v[0].length;y++)S(y);return i(w.length==h),w},s.prototype.drawCodewords=function(l){if(l.length!=Math.floor(s.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");for(var c=0,u=this.size-1;u>=1;u-=2){u==6&&(u=5);for(var d=0;d<this.size;d++)for(var f=0;f<2;f++){var h=u-f,p=(u+1&2)==0,m=p?this.size-1-d:d;!this.isFunction[m][h]&&c<l.length*8&&(this.modules[m][h]=r(l[c>>>3],7-(c&7)),c++)}}i(c==l.length*8)},s.prototype.applyMask=function(l){if(l<0||l>7)throw new RangeError("Mask value out of range");for(var c=0;c<this.size;c++)for(var u=0;u<this.size;u++){var d=void 0;switch(l){case 0:d=(u+c)%2==0;break;case 1:d=c%2==0;break;case 2:d=u%3==0;break;case 3:d=(u+c)%3==0;break;case 4:d=(Math.floor(u/3)+Math.floor(c/2))%2==0;break;case 5:d=u*c%2+u*c%3==0;break;case 6:d=(u*c%2+u*c%3)%2==0;break;case 7:d=((u+c)%2+u*c%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[c][u]&&d&&(this.modules[c][u]=!this.modules[c][u])}},s.prototype.getPenaltyScore=function(){for(var l=0,c=0;c<this.size;c++){for(var u=!1,d=0,f=[0,0,0,0,0,0,0],h=0;h<this.size;h++)this.modules[c][h]==u?(d++,d==5?l+=s.PENALTY_N1:d>5&&l++):(this.finderPenaltyAddHistory(d,f),u||(l+=this.finderPenaltyCountPatterns(f)*s.PENALTY_N3),u=this.modules[c][h],d=1);l+=this.finderPenaltyTerminateAndCount(u,d,f)*s.PENALTY_N3}for(var h=0;h<this.size;h++){for(var u=!1,p=0,f=[0,0,0,0,0,0,0],c=0;c<this.size;c++)this.modules[c][h]==u?(p++,p==5?l+=s.PENALTY_N1:p>5&&l++):(this.finderPenaltyAddHistory(p,f),u||(l+=this.finderPenaltyCountPatterns(f)*s.PENALTY_N3),u=this.modules[c][h],p=1);l+=this.finderPenaltyTerminateAndCount(u,p,f)*s.PENALTY_N3}for(var c=0;c<this.size-1;c++)for(var h=0;h<this.size-1;h++){var m=this.modules[c][h];m==this.modules[c][h+1]&&m==this.modules[c+1][h]&&m==this.modules[c+1][h+1]&&(l+=s.PENALTY_N2)}for(var v=0,g=0,y=this.modules;g<y.length;g++){var b=y[g];v=b.reduce(function(w,S){return w+(S?1:0)},v)}var x=this.size*this.size,_=Math.ceil(Math.abs(v*20-x*10)/x)-1;return i(0<=_&&_<=9),l+=_*s.PENALTY_N4,i(0<=l&&l<=2568888),l},s.prototype.getAlignmentPatternPositions=function(){if(this.version==1)return[];for(var l=Math.floor(this.version/7)+2,c=Math.floor((this.version*8+l*3+5)/(l*4-4))*2,u=[6],d=this.size-7;u.length<l;d-=c)u.splice(1,0,d);return u},s.getNumRawDataModules=function(l){if(l<s.MIN_VERSION||l>s.MAX_VERSION)throw new RangeError("Version number out of range");var c=(16*l+128)*l+64;if(l>=2){var u=Math.floor(l/7)+2;c-=(25*u-10)*u-55,l>=7&&(c-=36)}return i(208<=c&&c<=29648),c},s.getNumDataCodewords=function(l,c){return Math.floor(s.getNumRawDataModules(l)/8)-s.ECC_CODEWORDS_PER_BLOCK[c.ordinal][l]*s.NUM_ERROR_CORRECTION_BLOCKS[c.ordinal][l]},s.reedSolomonComputeDivisor=function(l){if(l<1||l>255)throw new RangeError("Degree out of range");for(var c=[],u=0;u<l-1;u++)c.push(0);c.push(1);for(var d=1,u=0;u<l;u++){for(var f=0;f<c.length;f++)c[f]=s.reedSolomonMultiply(c[f],d),f+1<c.length&&(c[f]^=c[f+1]);d=s.reedSolomonMultiply(d,2)}return c},s.reedSolomonComputeRemainder=function(l,c){for(var u=c.map(function(m){return 0}),d=function(m){var v=m^u.shift();u.push(0),c.forEach(function(g,y){return u[y]^=s.reedSolomonMultiply(g,v)})},f=0,h=l;f<h.length;f++){var p=h[f];d(p)}return u},s.reedSolomonMultiply=function(l,c){if(l>>>8||c>>>8)throw new RangeError("Byte out of range");for(var u=0,d=7;d>=0;d--)u=u<<1^(u>>>7)*285,u^=(c>>>d&1)*l;return i(u>>>8==0),u},s.prototype.finderPenaltyCountPatterns=function(l){var c=l[1];i(c<=this.size*3);var u=c>0&&l[2]==c&&l[3]==c*3&&l[4]==c&&l[5]==c;return(u&&l[0]>=c*4&&l[6]>=c?1:0)+(u&&l[6]>=c*4&&l[0]>=c?1:0)},s.prototype.finderPenaltyTerminateAndCount=function(l,c,u){return l&&(this.finderPenaltyAddHistory(c,u),c=0),c+=this.size,this.finderPenaltyAddHistory(c,u),this.finderPenaltyCountPatterns(u)},s.prototype.finderPenaltyAddHistory=function(l,c){c[0]==0&&(l+=this.size),c.pop(),c.unshift(l)},s.MIN_VERSION=1,s.MAX_VERSION=40,s.PENALTY_N1=3,s.PENALTY_N2=3,s.PENALTY_N3=40,s.PENALTY_N4=10,s.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],s.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],s})();n.QrCode=e;function t(s,l,c){if(l<0||l>31||s>>>l)throw new RangeError("Value out of range");for(var u=l-1;u>=0;u--)c.push(s>>>u&1)}function r(s,l){return(s>>>l&1)!=0}function i(s){if(!s)throw new Error("Assertion error")}var a=(function(){function s(l,c,u){if(this.mode=l,this.numChars=c,this.bitData=u,c<0)throw new RangeError("Invalid argument");this.bitData=u.slice()}return s.makeBytes=function(l){for(var c=[],u=0,d=l;u<d.length;u++){var f=d[u];t(f,8,c)}return new s(s.Mode.BYTE,l.length,c)},s.makeNumeric=function(l){if(!s.isNumeric(l))throw new RangeError("String contains non-numeric characters");for(var c=[],u=0;u<l.length;){var d=Math.min(l.length-u,3);t(parseInt(l.substring(u,u+d),10),d*3+1,c),u+=d}return new s(s.Mode.NUMERIC,l.length,c)},s.makeAlphanumeric=function(l){if(!s.isAlphanumeric(l))throw new RangeError("String contains unencodable characters in alphanumeric mode");var c=[],u;for(u=0;u+2<=l.length;u+=2){var d=s.ALPHANUMERIC_CHARSET.indexOf(l.charAt(u))*45;d+=s.ALPHANUMERIC_CHARSET.indexOf(l.charAt(u+1)),t(d,11,c)}return u<l.length&&t(s.ALPHANUMERIC_CHARSET.indexOf(l.charAt(u)),6,c),new s(s.Mode.ALPHANUMERIC,l.length,c)},s.makeSegments=function(l){return l==""?[]:s.isNumeric(l)?[s.makeNumeric(l)]:s.isAlphanumeric(l)?[s.makeAlphanumeric(l)]:[s.makeBytes(s.toUtf8ByteArray(l))]},s.makeEci=function(l){var c=[];if(l<0)throw new RangeError("ECI assignment value out of range");if(l<128)t(l,8,c);else if(l<16384)t(2,2,c),t(l,14,c);else if(l<1e6)t(6,3,c),t(l,21,c);else throw new RangeError("ECI assignment value out of range");return new s(s.Mode.ECI,0,c)},s.isNumeric=function(l){return s.NUMERIC_REGEX.test(l)},s.isAlphanumeric=function(l){return s.ALPHANUMERIC_REGEX.test(l)},s.prototype.getData=function(){return this.bitData.slice()},s.getTotalBits=function(l,c){for(var u=0,d=0,f=l;d<f.length;d++){var h=f[d],p=h.mode.numCharCountBits(c);if(h.numChars>=1<<p)return 1/0;u+=4+p+h.bitData.length}return u},s.toUtf8ByteArray=function(l){l=encodeURI(l);for(var c=[],u=0;u<l.length;u++)l.charAt(u)!="%"?c.push(l.charCodeAt(u)):(c.push(parseInt(l.substring(u+1,u+3),16)),u+=2);return c},s.NUMERIC_REGEX=/^[0-9]*$/,s.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,s.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",s})();n.QrSegment=a})(Zp||(Zp={}));(function(n){(function(e){var t=(function(){function r(i,a){this.ordinal=i,this.formatBits=a}return r.LOW=new r(0,1),r.MEDIUM=new r(1,0),r.QUARTILE=new r(2,3),r.HIGH=new r(3,2),r})();e.Ecc=t})(n.QrCode||(n.QrCode={}))})(Zp||(Zp={}));(function(n){(function(e){var t=(function(){function r(i,a){this.modeBits=i,this.numBitsCharCount=a}return r.prototype.numCharCountBits=function(i){return this.numBitsCharCount[Math.floor((i+7)/17)]},r.NUMERIC=new r(1,[10,12,14]),r.ALPHANUMERIC=new r(2,[9,11,13]),r.BYTE=new r(4,[8,16,16]),r.KANJI=new r(8,[8,10,12]),r.ECI=new r(7,[0,0,0]),r})();e.Mode=t})(n.QrSegment||(n.QrSegment={}))})(Zp||(Zp={}));var X5=Zp,Wdt=0;function Xdt(n){return n||"v-".concat(Wdt++)}var s0e="L",Zdt=100,l0e=0,qdt=.1,Kdt=2,c0e={L:X5.QrCode.Ecc.LOW,M:X5.QrCode.Ecc.MEDIUM,Q:X5.QrCode.Ecc.QUARTILE,H:X5.QrCode.Ecc.HIGH},Jdt=(function(){try{new Path2D().addPath(new Path2D)}catch(n){return!1}return!0})();function u0e(n){return n in c0e}function Qdt(n,e,t){var r=e>0?n[e-1][t]:!1,i=e<n.length-1?n[e+1][t]:!1,a=t>0?n[e][t-1]:!1,s=t<n[e].length-1?n[e][t+1]:!1;return{nw:!r&&!a,ne:!r&&!s,se:!i&&!s,sw:!i&&!a}}function $dt(n,e,t){e===void 0&&(e=0),t===void 0&&(t=0);for(var r=[],i=Math.min(t,.5),a=0;a<n.length;a++)for(var s=0;s<n[a].length;s++)if(n[a][s]){var l=Qdt(n,a,s),c=l.nw,u=l.ne,d=l.se,f=l.sw,h=s+e,p=a+e;r.push("M".concat(h+(c?i:0)," ").concat(p),"L".concat(h+1-(u?i:0)," ").concat(p)),u&&r.push("A".concat(i," ").concat(i," 0 0 1 ").concat(h+1," ").concat(p+i)),r.push("L".concat(h+1," ").concat(p+1-(d?i:0))),d&&r.push("A".concat(i," ").concat(i," 0 0 1 ").concat(h+1-i," ").concat(p+1)),r.push("L".concat(h+(f?i:0)," ").concat(p+1)),f&&r.push("A".concat(i," ").concat(i," 0 0 1 ").concat(h," ").concat(p+1-i)),r.push("L".concat(h," ").concat(p+(c?i:0))),c&&r.push("A".concat(i," ").concat(i," 0 0 1 ").concat(h+i," ").concat(p)),r.push("z")}return r.join("")}function e0t(n,e){e===void 0&&(e=0);for(var t=[],r=0;r<n.length;r++)for(var i=n[r],a=null,s=0;s<i.length;s++){var l=i[s];if(!l&&a!==null){t.push("M".concat(a+e," ").concat(r+e,"h").concat(s-a,"v1H").concat(a+e,"z")),a=null;continue}if(s===i.length-1){if(!l)continue;a===null?t.push("M".concat(s+e,",").concat(r+e," h1v1H").concat(s+e,"z")):t.push("M".concat(a+e,",").concat(r+e," h").concat(s+1-a,"v1H").concat(a+e,"z"));continue}l&&a===null&&(a=s)}return t.join("")}function t0t(n,e,t,r){var i=r.width,a=r.height,s=r.x,l=r.y,c=n.length+t*2,u=Math.floor(e*qdt),d=c/e,f=(i||u)*d,h=(a||u)*d,p=s==null?n.length/2-f/2:s*d,m=l==null?n.length/2-h/2:l*d,v=(r.borderRadius||0)*d;return{x:p,y:m,h,w:f,borderRadius:v}}function d0e(n){var e=o.computed(function(){var l;return((l=n.margin)!==null&&l!==void 0?l:l0e)>>>0}),t=o.computed(function(){var l=u0e(n.level)?n.level:s0e;return X5.QrCode.encodeText(n.value,c0e[l]).getModules()}),r=o.computed(function(){return t.value.length+e.value*2}),i=o.computed(function(){return n.radius>0?$dt(t.value,e.value,n.radius):e0t(t.value,e.value)}),a=o.computed(function(){if(!n.imageSettings.src)return null;var l=t0t(t.value,n.size,e.value,n.imageSettings);return{x:l.x+e.value,y:l.y+e.value,width:l.w,height:l.h,borderRadius:l.borderRadius}}),s=o.computed(function(){if(!n.imageSettings.excavate||!a.value)return null;var l=Kdt/(n.size/r.value);return{x:a.value.x-l,y:a.value.y-l,width:a.value.width+l*2,height:a.value.height+l*2,borderRadius:a.value.borderRadius}});return{margin:e,numCells:r,cells:t,fgPath:i,imageProps:a,imageBorderProps:s}}var pF={value:{type:String,required:!0,default:""},size:{type:Number,default:Zdt},level:{type:String,default:s0e,validator:function(n){return u0e(n)}},background:{type:String,default:"#fff"},foreground:{type:String,default:"#000"},margin:{type:Number,required:!1,default:l0e},imageSettings:{type:Object,required:!1,default:function(){return{}}},gradient:{type:Boolean,required:!1,default:!1},gradientType:{type:String,required:!1,default:"linear",validator:function(n){return["linear","radial"].indexOf(n)>-1}},gradientStartColor:{type:String,required:!1,default:"#000"},gradientEndColor:{type:String,required:!1,default:"#fff"},radius:{type:Number,required:!1,default:0,validator:function(n){return!isNaN(n)&&n>=0&&n<=.5}},id:{type:String,required:!1}},n0t=Ku(Ku({},pF),{renderAs:{type:String,required:!1,default:"canvas",validator:function(n){return["canvas","svg"].indexOf(n)>-1}}}),r0t=o.defineComponent({name:"QRCodeSvg",props:pF,setup:function(n){var e=d0e(n),t=e.numCells,r=e.fgPath,i=e.imageProps,a=e.imageBorderProps,s=Xdt(n.id),l="qrcode.vue-gradient-".concat(s),c="qrcode.vue-logo-clip-path-".concat(s),u=o.computed(function(){if(!n.gradient)return null;var f=n.gradientType==="linear"?{x1:"0%",y1:"0%",x2:"100%",y2:"100%"}:{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"};return o.h(n.gradientType==="linear"?"linearGradient":"radialGradient",Ku({id:l},f),[o.h("stop",{offset:"0%",style:{stopColor:n.gradientStartColor}}),o.h("stop",{offset:"100%",style:{stopColor:n.gradientEndColor}})])}),d=o.computed(function(){if(!i.value)return null;var f=i.value.borderRadius;return f<=0?null:o.h("clipPath",{id:c},[o.h("rect",{x:i.value.x,y:i.value.y,width:i.value.width,height:i.value.height,rx:f,ry:f})])});return function(){return o.h("svg",{width:n.size,height:n.size,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(t.value," ").concat(t.value),role:"img","aria-label":n.value},[o.h("defs",{},[u.value,d.value]),o.h("rect",{width:"100%",height:"100%",fill:n.background}),o.h("path",{fill:n.gradient?"url(#".concat(l,")"):n.foreground,d:r.value}),a.value&&o.h("rect",{x:a.value.x,y:a.value.y,width:a.value.width,height:a.value.height,fill:n.background,rx:a.value.borderRadius,ry:a.value.borderRadius}),n.imageSettings.src&&i.value&&o.h("image",Ku(Ku({href:n.imageSettings.src},i.value),i.value.borderRadius>0?{"clip-path":"url(#".concat(c,")")}:{}))])}}}),i0t=o.defineComponent({name:"QRCodeCanvas",props:pF,setup:function(n,e){var t=d0e(n),r=t.margin,i=t.cells,a=t.numCells,s=t.fgPath,l=t.imageProps,c=t.imageBorderProps,u=o.ref(null),d=o.ref(null),f=function(p,m,v,g,y,b){p.beginPath(),p.roundRect?p.roundRect(m,v,g,y,b):p.rect(m,v,g,y)},h=function(){var p=n.size,m=n.background,v=n.foreground,g=n.gradient,y=n.gradientType,b=n.gradientStartColor,x=n.gradientEndColor,_=u.value;if(_){var w=_.getContext("2d");if(w){var S=d.value,C=typeof window!="undefined"&&window.devicePixelRatio||1,E=p/a.value*C;if(_.height=_.width=p*C,w.setTransform(E,0,0,E,0,0),w.fillStyle=m,w.fillRect(0,0,a.value,a.value),g){var T=void 0;y==="linear"?T=w.createLinearGradient(0,0,a.value,a.value):T=w.createRadialGradient(a.value/2,a.value/2,0,a.value/2,a.value/2,a.value/2),T.addColorStop(0,b),T.addColorStop(1,x),w.fillStyle=T}else w.fillStyle=v;Jdt?w.fill(new Path2D(s.value)):i.value.forEach(function(k,P){k.forEach(function(I,N){I&&w.fillRect(N+r.value,P+r.value,1,1)})});var A=n.imageSettings.src&&S&&S.naturalWidth!==0&&S.naturalHeight!==0;if(A&&l.value){if(c.value){var M=c.value;w.fillStyle=n.background,f(w,M.x,M.y,M.width,M.height,M.borderRadius),w.fill()}var D=l.value.borderRadius;D>0?(w.save(),f(w,l.value.x,l.value.y,l.value.width,l.value.height,D),w.clip(),w.drawImage(S,l.value.x,l.value.y,l.value.width,l.value.height),w.restore()):w.drawImage(S,l.value.x,l.value.y,l.value.width,l.value.height)}}}};return o.onMounted(h),o.watchEffect(h),function(){return o.h(o.Fragment,[o.h("canvas",Ku(Ku({},e.attrs),{ref:u,role:"img","aria-label":n.value,style:Ku(Ku({},e.attrs.style),{width:"".concat(n.size,"px"),height:"".concat(n.size,"px")})})),n.imageSettings.src&&o.h("img",{ref:d,src:n.imageSettings.src,style:{display:"none"},onLoad:h})])}}}),a0t=o.defineComponent({name:"Qrcode",props:n0t,setup:function(n){return function(){return o.h(n.renderAs==="svg"?r0t:i0t,{value:n.value,size:n.size,margin:n.margin,level:n.level,background:n.background,foreground:n.foreground,imageSettings:n.imageSettings,gradient:n.gradient,gradientType:n.gradientType,gradientStartColor:n.gradientStartColor,gradientEndColor:n.gradientEndColor,radius:n.radius,id:n.id})}}});const o0t="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3crect%20x='3'%20y='3'%20width='7'%20height='7'%20rx='1'/%3e%3crect%20x='14'%20y='3'%20width='7'%20height='7'%20rx='1'/%3e%3crect%20x='3'%20y='14'%20width='7'%20height='7'%20rx='1'/%3e%3crect%20x='14'%20y='14'%20width='3'%20height='3'/%3e%3crect%20x='18'%20y='14'%20width='3'%20height='3'/%3e%3crect%20x='14'%20y='18'%20width='3'%20height='3'/%3e%3crect%20x='18'%20y='18'%20width='3'%20height='3'/%3e%3crect%20x='5'%20y='5'%20width='3'%20height='3'%20fill='currentColor'/%3e%3crect%20x='16'%20y='5'%20width='3'%20height='3'%20fill='currentColor'/%3e%3crect%20x='5'%20y='16'%20width='3'%20height='3'%20fill='currentColor'/%3e%3c/svg%3e",s0t="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%234162ff'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3crect%20x='3'%20y='3'%20width='7'%20height='7'%20rx='1'/%3e%3crect%20x='14'%20y='3'%20width='7'%20height='7'%20rx='1'/%3e%3crect%20x='3'%20y='14'%20width='7'%20height='7'%20rx='1'/%3e%3crect%20x='14'%20y='14'%20width='3'%20height='3'/%3e%3crect%20x='18'%20y='14'%20width='3'%20height='3'/%3e%3crect%20x='14'%20y='18'%20width='3'%20height='3'/%3e%3crect%20x='18'%20y='18'%20width='3'%20height='3'/%3e%3crect%20x='5'%20y='5'%20width='3'%20height='3'%20fill='%234162ff'/%3e%3crect%20x='16'%20y='5'%20width='3'%20height='3'%20fill='%234162ff'/%3e%3crect%20x='5'%20y='16'%20width='3'%20height='3'%20fill='%234162ff'/%3e%3c/svg%3e",l0t={class:"mix-body"},c0t={DEFAULT_ICON:o0t,ACTIVE_ICON:s0t,NAME_CN:"二维码",NAME_EN:"QR Code",ORDER:10,PLATFORM:["pc","screen","mobile"]},u0t={titleColor:"#111",bgColor:"#fff",radiusSize:8,isHideTitle:!1,titleSize:14,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4,qrColor:{value:"#000000",type:"color",label:"component.qrcode.qrColor"},qrBgColor:{value:"#ffffff",type:"color",label:"component.qrcode.qrBgColor"},showBorder:{value:!0,type:"checkbox",label:"component.qrcode.showBorder"},borderColor:{value:"#e5e7eb",type:"color",label:"setting.borderColor",dependent:"showBorder"},borderWidth:{value:1,type:"number",label:"component.qrcode.borderWidth",min:1,max:10,dependent:"showBorder"},qrSize:{value:200,type:"number",label:"component.qrcode.qrSize",min:50,max:500},defaultContent:{value:"http://www.mixlinker.com",type:"textarea",label:"component.qrcode.defaultContent"},errorLevel:{value:"M",type:"select",label:"component.qrcode.errorLevel",options:[{label:"低 (L)",value:"L"},{label:"中 (M)",value:"M"},{label:"较高 (Q)",value:"Q"},{label:"高 (H)",value:"H"}]}},d0t=[],f0t=[],h0t=[],p0t={},m0t={DEFAULT:c0t,OPTIONS:u0t,DATA:d0t,PARAMS:f0t,SOURCE:h0t,COMMON:p0t},v0t=o.defineComponent(tt(Ne({},m0t),{__name:"qrcode",props:{conf:{type:Object,default:()=>({})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(n){const e=n;class t extends Cn{extractStyles(){return tt(Ne({},super.extractStyles()),{titleColor:this.getOptionValue("titleColor","#111"),bgColor:this.getOptionValue("bgColor","#fff"),radiusSize:this.getOptionValue("radiusSize",8),isHideTitle:this.getOptionValue("isHideTitle",!1),qrColor:this.getOptionValue("qrColor","#000000"),qrBgColor:this.getOptionValue("qrBgColor","#ffffff"),showBorder:this.getOptionValue("showBorder",!0),borderColor:this.getOptionValue("borderColor","#e5e7eb"),borderWidth:this.getOptionValue("borderWidth",1),qrSize:this.getOptionValue("qrSize",200),defaultContent:this.getOptionValue("defaultContent","http://www.mixlinker.com"),errorLevel:this.getOptionValue("errorLevel","M")})}init(){this.Style.value=this.extractStyles(),this.applyTheme()}}const r=new t(e,"qrcode");r.setupLifecycle();const i=r.getStyle(),a=e.conf,s=o.computed(()=>$n(e.conf.options)),l=o.computed(()=>i.value.defaultContent||"http://www.mixlinker.com"),c=o.computed(()=>Math.min(i.value.qrSize,300)),u=o.computed(()=>({border:i.value.showBorder?`${i.value.borderWidth}px solid ${i.value.borderColor}`:"none",padding:i.value.showBorder?"8px":"0",background:i.value.qrBgColor,borderRadius:"4px"}));return(d,f)=>(o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({background:o.unref(i).bgColor,borderRadius:`${o.unref(i).radiusSize}px`})},[o.createElementVNode("div",{class:"mix-title",style:o.normalizeStyle(s.value)},o.toDisplayString(o.unref(a).caption||o.unref(a).name),5),o.createElementVNode("div",l0t,[o.createElementVNode("div",{class:"qrcode-wrapper",style:o.normalizeStyle(u.value)},[o.createVNode(a0t,{value:l.value,size:c.value,level:o.unref(i).errorLevel,"render-as":"svg",foreground:o.unref(i).qrColor,background:o.unref(i).qrBgColor},null,8,["value","size","level","foreground","background"])],4)]),o.renderSlot(d.$slots,"default",{},void 0,!0)],4))}})),g0t=Dt(v0t,[["__scopeId","data-v-3ff68f63"]]),y0t=Object.freeze(Object.defineProperty({__proto__:null,default:g0t},Symbol.toStringTag,{value:"Module"})),b0t="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e轮播%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-1062.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M1072.93793,113.477011%20C1073.29342,113.477011%201073.58161,113.765196%201073.58161,114.12069%20C1073.58161,114.446559%201073.33945,114.71587%201073.02527,114.758492%20L1072.93793,114.764368%20L1069.9954,114.764368%20C1069.63991,114.764368%201069.35172,114.476183%201069.35172,114.12069%20C1069.35172,113.79482%201069.59388,113.52551%201069.90806,113.482888%20L1069.9954,113.477011%20L1072.93793,113.477011%20Z%20M1075.88046,113.477011%20C1076.23595,113.477011%201076.52414,113.765196%201076.52414,114.12069%20C1076.52414,114.446559%201076.28198,114.71587%201075.9678,114.758492%20L1075.88046,114.764368%20L1075.14483,114.764368%20C1074.78933,114.764368%201074.50115,114.476183%201074.50115,114.12069%20C1074.50115,113.79482%201074.7433,113.52551%201075.05748,113.482888%20L1075.14483,113.477011%20L1075.88046,113.477011%20Z%20M1064.84598,113.477011%20C1065.20147,113.477011%201065.48966,113.765196%201065.48966,114.12069%20C1065.48966,114.446559%201065.2475,114.71587%201064.93332,114.758492%20L1064.84598,114.764368%20L1064.11034,114.764368%20C1063.75485,114.764368%201063.46667,114.476183%201063.46667,114.12069%20C1063.46667,113.79482%201063.70882,113.52551%201064.023,113.482888%20L1064.11034,113.477011%20L1064.84598,113.477011%20Z%20M1078.82299,113.477011%20C1079.17848,113.477011%201079.46667,113.765196%201079.46667,114.12069%20C1079.46667,114.446559%201079.22451,114.71587%201078.91033,114.758492%20L1078.82299,114.764368%20L1078.08736,114.764368%20C1077.73186,114.764368%201077.44368,114.476183%201077.44368,114.12069%20C1077.44368,113.79482%201077.68583,113.52551%201078.00001,113.482888%20L1078.08736,113.477011%20L1078.82299,113.477011%20Z%20M1067.78851,113.477011%20C1068.144,113.477011%201068.43218,113.765196%201068.43218,114.12069%20C1068.43218,114.446559%201068.19003,114.71587%201067.87585,114.758492%20L1067.78851,114.764368%20L1067.05287,114.764368%20C1066.69738,114.764368%201066.4092,114.476183%201066.4092,114.12069%20C1066.4092,113.79482%201066.65135,113.52551%201066.96553,113.482888%20L1067.05287,113.477011%20L1067.78851,113.477011%20Z%20M1078.20996,100.235632%20C1078.90402,100.235632%201079.46667,100.798278%201079.46667,101.492337%20L1079.46667,101.492337%20L1079.46667,111.300766%20C1079.46667,111.994825%201078.90402,112.557471%201078.20996,112.557471%20L1078.20996,112.557471%20L1064.72337,112.557471%20C1064.02931,112.557471%201063.46667,111.994825%201063.46667,111.300766%20L1063.46667,111.300766%20L1063.46667,101.492337%20C1063.46667,100.798278%201064.02931,100.235632%201064.72337,100.235632%20L1064.72337,100.235632%20Z%20M1078.1787,101.522114%20L1064.75341,101.522114%20L1064.75341,111.26924%20L1078.1787,111.26924%20L1078.1787,101.522114%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",x0t="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e轮播%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-1062.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M1072.93793,113.477011%20C1073.29342,113.477011%201073.58161,113.765196%201073.58161,114.12069%20C1073.58161,114.446559%201073.33945,114.71587%201073.02527,114.758492%20L1072.93793,114.764368%20L1069.9954,114.764368%20C1069.63991,114.764368%201069.35172,114.476183%201069.35172,114.12069%20C1069.35172,113.79482%201069.59388,113.52551%201069.90806,113.482888%20L1069.9954,113.477011%20L1072.93793,113.477011%20Z%20M1075.88046,113.477011%20C1076.23595,113.477011%201076.52414,113.765196%201076.52414,114.12069%20C1076.52414,114.446559%201076.28198,114.71587%201075.9678,114.758492%20L1075.88046,114.764368%20L1075.14483,114.764368%20C1074.78933,114.764368%201074.50115,114.476183%201074.50115,114.12069%20C1074.50115,113.79482%201074.7433,113.52551%201075.05748,113.482888%20L1075.14483,113.477011%20L1075.88046,113.477011%20Z%20M1064.84598,113.477011%20C1065.20147,113.477011%201065.48966,113.765196%201065.48966,114.12069%20C1065.48966,114.446559%201065.2475,114.71587%201064.93332,114.758492%20L1064.84598,114.764368%20L1064.11034,114.764368%20C1063.75485,114.764368%201063.46667,114.476183%201063.46667,114.12069%20C1063.46667,113.79482%201063.70882,113.52551%201064.023,113.482888%20L1064.11034,113.477011%20L1064.84598,113.477011%20Z%20M1078.82299,113.477011%20C1079.17848,113.477011%201079.46667,113.765196%201079.46667,114.12069%20C1079.46667,114.446559%201079.22451,114.71587%201078.91033,114.758492%20L1078.82299,114.764368%20L1078.08736,114.764368%20C1077.73186,114.764368%201077.44368,114.476183%201077.44368,114.12069%20C1077.44368,113.79482%201077.68583,113.52551%201078.00001,113.482888%20L1078.08736,113.477011%20L1078.82299,113.477011%20Z%20M1067.78851,113.477011%20C1068.144,113.477011%201068.43218,113.765196%201068.43218,114.12069%20C1068.43218,114.446559%201068.19003,114.71587%201067.87585,114.758492%20L1067.78851,114.764368%20L1067.05287,114.764368%20C1066.69738,114.764368%201066.4092,114.476183%201066.4092,114.12069%20C1066.4092,113.79482%201066.65135,113.52551%201066.96553,113.482888%20L1067.05287,113.477011%20L1067.78851,113.477011%20Z%20M1078.20996,100.235632%20C1078.90402,100.235632%201079.46667,100.798278%201079.46667,101.492337%20L1079.46667,101.492337%20L1079.46667,111.300766%20C1079.46667,111.994825%201078.90402,112.557471%201078.20996,112.557471%20L1078.20996,112.557471%20L1064.72337,112.557471%20C1064.02931,112.557471%201063.46667,111.994825%201063.46667,111.300766%20L1063.46667,111.300766%20L1063.46667,101.492337%20C1063.46667,100.798278%201064.02931,100.235632%201064.72337,100.235632%20L1064.72337,100.235632%20Z%20M1078.1787,101.522114%20L1064.75341,101.522114%20L1064.75341,111.26924%20L1078.1787,111.26924%20L1078.1787,101.522114%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",_0t={class:"mix-component"},S0t=["src","height","width"],w0t=["src"],C0t={DEFAULT_ICON:b0t,ACTIVE_ICON:x0t,NAME_CN:"轮播",NAME_EN:"Swiper",ORDER:5,PLATFORM:["pc","screen","mobile"]},E0t={bgColor:"#fff",radiusSize:8,interval:10,type:{value:"img",type:"radio",option:[{value:"img",label:"component.customized.img"},{value:"url",label:"component.customized.url"}],label:"component.customized.type"}},A0t=[{url:"",materialUid:""}],T0t=[{key:"url",label:"setting.paramField.url",type:"image",typeByOption:{option:"type",map:{img:"image",url:"text"}}}],M0t={DEFAULT:C0t,OPTIONS:E0t,DATA:A0t,PARAMS:T0t,COMMON:{}},D0t=o.defineComponent(tt(Ne({},M0t),{__name:"swiper",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){const e=n,t={height:1080,width:1920};class r extends Cn{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),radiusSize:this.getOptionValue("radiusSize",8),interval:this.getOptionValue("interval",10),type:this.getOptionValue("type","img")}}}const i=new r(e,"swiper");i.setupLifecycle();const a=i.getStyle(),s=o.ref({});let l=[],c=0,u=null;const d=o.computed(()=>{var y;const g=(y=e.conf)==null?void 0:y.data;return Array.isArray(g)?g.map(b=>String((b==null?void 0:b.url)||"").trim()):[]}),f=g=>g.includes("/yunuis/material/file/")||g.startsWith("yunuis/material/file/")||g.startsWith("/material/file/")||g.startsWith("material/file/")||g.startsWith("/mixservice/storage/")||g.startsWith("mixservice/storage/"),h=()=>{l.forEach(g=>URL.revokeObjectURL(g)),l=[]},p=g=>{const y=String(g||"").trim();return y?y.startsWith("data:")||y.startsWith("blob:")?y:f(y)?yp(y):y.startsWith(Ao)||y.startsWith("http")?y:Ao+y:""},m=g=>{const y=String(g||"").trim();return s.value[y]||p(y)};function v(){return Ve(this,null,function*(){const g=++c;u==null||u.abort(),u=new AbortController,h();const y={},b=[...new Set(d.value)];yield Promise.all(b.map(x=>Ve(null,null,function*(){if(!x){y[x]="";return}if(x.startsWith("blob:")||x.startsWith("data:")||!f(x)){y[x]=p(x);return}const _=Pw(yp(x));if(!_){y[x]="";return}try{const w={},S=U6();S&&(w.Authorization=`Bearer ${S}`);const C=yield fetch(_,{mode:"cors",credentials:"include",signal:u==null?void 0:u.signal,headers:w});if(g!==c)return;if(!C.ok){console.warn("[swiper] image load failed",C.status,_),y[x]="";return}const E=yield C.blob();if(g!==c)return;if(!E.size){y[x]="";return}const T=URL.createObjectURL(E);l.push(T),y[x]=T}catch(w){if((w==null?void 0:w.name)==="AbortError"||g!==c)return;console.warn("[swiper] image fetch error",w),y[x]=""}}))),g===c&&(s.value=y)})}return o.watch(()=>d.value.join(`
3946
+ `),()=>{v()},{immediate:!0}),o.onBeforeUnmount(()=>{c++,u==null||u.abort(),h(),s.value={}}),(g,y)=>{const b=Se.ElCarouselItem,x=Se.ElCarousel;return o.openBlock(),o.createElementBlock("div",_0t,[o.createElementVNode("div",{class:"swiper-wrap",style:o.normalizeStyle({backgroundColor:o.unref(a).bgColor,borderRadius:`${o.unref(a).radiusSize}px`})},[o.createVNode(x,{autoplay:"","pause-on-hover":!1,interval:1e3*o.unref(a).interval,"indicator-position":"none",style:{width:"100%",height:"100%"}},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.conf.data,(_,w)=>(o.openBlock(),o.createBlock(b,{key:w},{default:o.withCtx(()=>[o.unref(a).type==="url"&&n.mode==="preview"?(o.openBlock(),o.createElementBlock("iframe",{key:0,src:_.url,frameborder:"0",height:t.height,width:t.width,class:"w-full h-full"},null,8,S0t)):(o.openBlock(),o.createElementBlock("img",{key:1,class:"w-full h-full object-cover",src:m(_.url),alt:"轮播图片"},null,8,w0t))]),_:2},1024))),128))]),_:1},8,["interval"])],4),o.renderSlot(g.$slots,"default",{},void 0,!0)])}}})),L0t=Dt(D0t,[["__scopeId","data-v-8f607688"]]),N0t=Object.freeze(Object.defineProperty({__proto__:null,default:L0t},Symbol.toStringTag,{value:"Module"})),vQ="mix-header-tabs",O0t="mix-header-active-tab",VD=n=>{try{return decodeURIComponent(n)}catch(e){return n}},f0e=(n,e)=>{const t=VD(n),r=sessionStorage.getItem(vQ);let i=[];if(r)try{i=JSON.parse(r)}catch(s){i=[]}const a=i.find(s=>VD(s.key)===t||VD(s.path)===t);a?(a.key=t,a.path=t,e&&(a.title=e)):i.push({key:t,path:t,title:e||"frame",closable:!0}),sessionStorage.setItem(vQ,JSON.stringify(i)),sessionStorage.setItem(O0t,t)},h0e=n=>typeof n=="string"||typeof n=="number"?String(n).trim():String((n==null?void 0:n.uid)||(n==null?void 0:n.object_id)||(n==null?void 0:n.objectid)||"").trim(),P0t=n=>Ve(null,null,function*(){var e;try{const{result:t}=yield Bt.post("get_object_item",{uid:n},!0),r=(e=t==null?void 0:t.dashboard_list)==null?void 0:e.find(i=>i.type==="screen_dashboard"||i.type==="show");return r?{url:`${location.origin}/mixui/frame/${encodeURIComponent(r.uid)}?object_id=${encodeURIComponent(n)}`,path:`/frame/${r.uid}?object_id=${n}`,name:r.name}:(Ue.ElMessage({message:"该对象未配置大屏脚本",type:"warning"}),null)}catch(t){return Ue.ElMessage.error("获取跳转信息失败"),null}}),k0t=(n,e="_self")=>Ve(null,null,function*(){const t=h0e(n);if(!t){Ue.ElMessage.error("未设置跳转参数");return}const r=yield P0t(t);r&&(f0e(r.path,r.name),window.open(r.url,e))}),gQ=(n,e="_self")=>{if(!n){Ue.ElMessage.error("未设置跳转参数");return}try{const t=new URL(n,location.origin);t.pathname.match(/^\/frame\/(.+)$/)&&f0e(`${t.pathname}${t.search}`)}catch(t){}window.open(n,e)},mF=n=>{const e=h0e(n);if(!e){Ue.ElMessage.error("未配置跳转参数");return}let t=location.href;t.indexOf("?object_id=")>-1&&(t=t.split("?object_id=")[0]),location.href=`${t}?object_id=${e}`,location.reload()},p0e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e文本%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-735.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M750.086782,99.5%20C750.950123,99.5%20751.65,100.199877%20751.65,101.063218%20L751.65,101.063218%20L751.65,113.936782%20C751.65,114.800123%20750.950123,115.5%20750.086782,115.5%20L750.086782,115.5%20L737.213218,115.5%20C736.349877,115.5%20735.65,114.800123%20735.65,113.936782%20L735.65,113.936782%20L735.65,101.063218%20C735.65,100.199877%20736.349877,99.5%20737.213218,99.5%20L737.213218,99.5%20Z%20M750.086782,100.787356%20L737.213218,100.787356%20C737.060864,100.787356%20736.937356,100.910864%20736.937356,101.063218%20L736.937356,101.063218%20L736.937356,113.936782%20C736.937356,114.089136%20737.060864,114.212644%20737.213218,114.212644%20L737.213218,114.212644%20L750.086782,114.212644%20C750.239136,114.212644%20750.362644,114.089136%20750.362644,113.936782%20L750.362644,113.936782%20L750.362644,101.063218%20C750.362644,100.910864%20750.239136,100.787356%20750.086782,100.787356%20L750.086782,100.787356%20Z%20M742.832631,112.230524%20C742.477137,112.230524%20742.188953,111.942339%20742.188953,111.586845%20C742.188953,111.260976%20742.431108,110.991665%20742.745288,110.949043%20L742.832631,110.943167%20L743.006,110.943%20L743.006322,105.047893%20C743.006322,104.987519%20743.014634,104.929087%20743.030176,104.873678%20L741.023793,104.873531%20L741.024202,105.456577%20C741.024202,105.782446%20740.782047,106.051757%20740.467867,106.094379%20L740.380524,106.100255%20C740.054654,106.100255%20739.785344,105.8581%20739.742721,105.543921%20L739.736845,105.456577%20L739.736845,104.230524%20C739.736845,103.904654%20739.979001,103.635344%20740.29318,103.592721%20L740.380524,103.586845%20L746.919476,103.586845%20C747.245346,103.586845%20747.514656,103.829001%20747.557279,104.14318%20L747.563155,104.230524%20L747.563155,105.456577%20C747.563155,105.812071%20747.27497,106.100255%20746.919476,106.100255%20C746.593607,106.100255%20746.324296,105.8581%20746.281674,105.543921%20L746.275798,105.456577%20L746.275287,104.873531%20L744.269773,104.873494%20C744.277714,104.901773%20744.283772,104.930839%20744.287802,104.960549%20L744.293678,105.047893%20L744.293,110.943%20L744.467369,110.943167%20C744.822863,110.943167%20745.111047,111.231352%20745.111047,111.586845%20C745.111047,111.912715%20744.868892,112.182025%20744.554712,112.224648%20L744.467369,112.230524%20L742.832631,112.230524%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",m0e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e文本%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-735.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M750.086782,99.5%20C750.950123,99.5%20751.65,100.199877%20751.65,101.063218%20L751.65,101.063218%20L751.65,113.936782%20C751.65,114.800123%20750.950123,115.5%20750.086782,115.5%20L750.086782,115.5%20L737.213218,115.5%20C736.349877,115.5%20735.65,114.800123%20735.65,113.936782%20L735.65,113.936782%20L735.65,101.063218%20C735.65,100.199877%20736.349877,99.5%20737.213218,99.5%20L737.213218,99.5%20Z%20M750.086782,100.787356%20L737.213218,100.787356%20C737.060864,100.787356%20736.937356,100.910864%20736.937356,101.063218%20L736.937356,101.063218%20L736.937356,113.936782%20C736.937356,114.089136%20737.060864,114.212644%20737.213218,114.212644%20L737.213218,114.212644%20L750.086782,114.212644%20C750.239136,114.212644%20750.362644,114.089136%20750.362644,113.936782%20L750.362644,113.936782%20L750.362644,101.063218%20C750.362644,100.910864%20750.239136,100.787356%20750.086782,100.787356%20L750.086782,100.787356%20Z%20M742.832631,112.230524%20C742.477137,112.230524%20742.188953,111.942339%20742.188953,111.586845%20C742.188953,111.260976%20742.431108,110.991665%20742.745288,110.949043%20L742.832631,110.943167%20L743.006,110.943%20L743.006322,105.047893%20C743.006322,104.987519%20743.014634,104.929087%20743.030176,104.873678%20L741.023793,104.873531%20L741.024202,105.456577%20C741.024202,105.782446%20740.782047,106.051757%20740.467867,106.094379%20L740.380524,106.100255%20C740.054654,106.100255%20739.785344,105.8581%20739.742721,105.543921%20L739.736845,105.456577%20L739.736845,104.230524%20C739.736845,103.904654%20739.979001,103.635344%20740.29318,103.592721%20L740.380524,103.586845%20L746.919476,103.586845%20C747.245346,103.586845%20747.514656,103.829001%20747.557279,104.14318%20L747.563155,104.230524%20L747.563155,105.456577%20C747.563155,105.812071%20747.27497,106.100255%20746.919476,106.100255%20C746.593607,106.100255%20746.324296,105.8581%20746.281674,105.543921%20L746.275798,105.456577%20L746.275287,104.873531%20L744.269773,104.873494%20C744.277714,104.901773%20744.283772,104.930839%20744.287802,104.960549%20L744.293678,105.047893%20L744.293,110.943%20L744.467369,110.943167%20C744.822863,110.943167%20745.111047,111.231352%20745.111047,111.586845%20C745.111047,111.912715%20744.868892,112.182025%20744.554712,112.224648%20L744.467369,112.230524%20L742.832631,112.230524%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",I0t={class:"mix-component"},R0t={DEFAULT_ICON:p0e,ACTIVE_ICON:m0e,NAME_CN:"文本",NAME_EN:"Textbox",ORDER:2,PLATFORM:["pc","screen","mobile"]},V0t={bgColor:{value:"#fff",type:"color",label:"component.options.bgColor"},textColor:{value:"#111",type:"color",label:"component.options.textColor"},textSize:{value:14,type:"number",label:"component.options.textSize",min:10,max:100},radiusSize:{value:8,type:"number",label:"component.options.radiusSize",min:0,max:50},letterSpacing:{value:2,type:"number",label:"component.options.letterSpacing",min:0,max:20},name:{value:"",type:"string",label:"component.customized.name"},bgImg:{value:"",type:"image",label:"component.customized.bgImg"},textAlign:{value:"center",type:"radio",option:[{value:"left",label:"component.list.left"},{value:"center",label:"component.list.center"},{value:"right",label:"component.list.right"}],label:"component.customized.textAlign"},isBold:!1,autoWrap:{value:!1,type:"checkbox",label:"自动换行"},isJump:!1,jumpType:{value:"url",type:"radio",option:[{value:"url",label:"component.customized.address"},{value:"uid",label:"component.customized.dashboard"}],label:"component.customized.jumpType",dependent:"isJump"},jumpParam:{value:"",type:"string",label:"跳转参数",dependent:"isJump"}},B0t={DEFAULT:R0t,OPTIONS:V0t,COMMON:{}},F0t=o.defineComponent(tt(Ne({},B0t),{__name:"textbox",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){const e=n,t={left:"flex-start",center:"center",right:"flex-end"};class r extends Cn{extractStyles(){var f,h,p,m,v,g,y,b,x,_,w,S,C,E,T,A,M,D,k,P,I,N,R,V,B,F,G,U;const{options:d}=this.props.conf;return{bgColor:(p=(h=(f=d==null?void 0:d.bgColor)==null?void 0:f.value)!=null?h:d==null?void 0:d.bgColor)!=null?p:"#fff",textColor:(g=(v=(m=d==null?void 0:d.textColor)==null?void 0:m.value)!=null?v:d==null?void 0:d.textColor)!=null?g:"#303133",textSize:(x=(b=(y=d==null?void 0:d.textSize)==null?void 0:y.value)!=null?b:d==null?void 0:d.textSize)!=null?x:14,radiusSize:(S=(w=(_=d==null?void 0:d.radiusSize)==null?void 0:_.value)!=null?w:d==null?void 0:d.radiusSize)!=null?S:8,letterSpacing:(T=(E=(C=d==null?void 0:d.letterSpacing)==null?void 0:C.value)!=null?E:d==null?void 0:d.letterSpacing)!=null?T:2,textAlign:(M=(A=d==null?void 0:d.textAlign)==null?void 0:A.value)!=null?M:"center",isBold:(P=(k=(D=d==null?void 0:d.isBold)==null?void 0:D.value)!=null?k:d==null?void 0:d.isBold)!=null?P:!1,autoWrap:(R=(N=(I=d==null?void 0:d.autoWrap)==null?void 0:I.value)!=null?N:d==null?void 0:d.autoWrap)!=null?R:!1,bgImg:(B=(V=d==null?void 0:d.bgImg)==null?void 0:V.value)!=null?B:"",isJump:(U=(G=(F=d==null?void 0:d.isJump)==null?void 0:F.value)!=null?G:d==null?void 0:d.isJump)!=null?U:!1}}}const i=new r(e,"textbox");i.setupLifecycle();const a=i.getStyle(),s=u=>u?u.startsWith(Ao)||u.startsWith("http")?u:Ao+u:"",l=()=>Ve(null,null,function*(){var f,h;const{options:u}=e.conf,d=(f=u.jumpParam)==null?void 0:f.value;if(!d){gQ("");return}((h=u.jumpType)==null?void 0:h.value)==="url"?gQ(d):yield k0t(d)}),c=()=>{e.mode==="preview"&&a.value.isJump&&l()};return(u,d)=>{var f,h,p;return o.openBlock(),o.createElementBlock("div",I0t,[o.createElementVNode("div",{class:o.normalizeClass(["textbox-wrap",{"is-auto-wrap":o.unref(a).autoWrap}]),style:o.normalizeStyle({backgroundColor:o.unref(a).bgColor,color:o.unref(a).textColor,borderRadius:`${o.unref(a).radiusSize}px`,fontSize:`${o.unref(a).textSize}px`,backgroundImage:o.unref(a).bgImg?`url(${s(o.unref(a).bgImg)})`:"",justifyContent:t[o.unref(a).textAlign]||"center",textAlign:o.unref(a).autoWrap&&o.unref(a).textAlign==="left"?"justify":o.unref(a).textAlign||"center",textAlignLast:o.unref(a).autoWrap&&o.unref(a).textAlign==="left"?"left":"auto",fontWeight:o.unref(a).isBold?"600":"400",letterSpacing:`${o.unref(a).letterSpacing}px`,whiteSpace:o.unref(a).autoWrap?"normal":"nowrap",overflowWrap:o.unref(a).autoWrap?"break-word":"normal",wordBreak:o.unref(a).autoWrap?"break-word":"normal",cursor:o.unref(a).isJump?"pointer":"default"}),onClick:c},o.toDisplayString(((p=(h=(f=n.conf)==null?void 0:f.options)==null?void 0:h.name)==null?void 0:p.value)||""),7),o.renderSlot(u.$slots,"default",{},void 0,!0)])}}})),z0t=Dt(F0t,[["__scopeId","data-v-8fe54553"]]),U0t=Object.freeze(Object.defineProperty({__proto__:null,default:z0t},Symbol.toStringTag,{value:"Module"})),Kg="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e设置%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化'%20transform='translate(-428.000000,%20-1211.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cg%20id='编组-35'%20transform='translate(428.226222,%201211.735632)'%3e%3cpath%20d='M13.9770115,0%20C15.0942772,0%2016,0.905722805%2016,2.02298851%20L16,2.02298851%20L16,12.5057471%20C16,13.6230128%2015.0942772,14.5287356%2013.9770115,14.5287356%20L13.9770115,14.5287356%20L2.02298851,14.5287356%20C0.905722805,14.5287356%200,13.6230128%200,12.5057471%20L0,12.5057471%20L0,2.02298851%20C0,0.905722805%200.905722805,0%202.02298851,0%20L2.02298851,0%20Z%20M13.9770115,1.28735632%20L2.02298851,1.28735632%20C1.61671007,1.28735632%201.28735632,1.61671007%201.28735632,2.02298851%20L1.28735632,2.02298851%20L1.28735632,12.5057471%20C1.28735632,12.9120256%201.61671007,13.2413793%202.02298851,13.2413793%20L2.02298851,13.2413793%20L13.9770115,13.2413793%20C14.3832899,13.2413793%2014.7126437,12.9120256%2014.7126437,12.5057471%20L14.7126437,12.5057471%20L14.7126437,2.02298851%20C14.7126437,1.61671007%2014.3832899,1.28735632%2013.9770115,1.28735632%20L13.9770115,1.28735632%20Z%20M12.2612343,8.64367816%20C12.6167279,8.64367816%2012.9049125,8.93186269%2012.9049125,9.28735632%20C12.9049125,9.61322548%2012.6627574,9.8825363%2012.3485776,9.92515846%20L12.2612343,9.93103448%20L3.5862069,9.93103448%20C3.23071326,9.93103448%202.94252874,9.64284995%202.94252874,9.28735632%20C2.94252874,8.96148716%203.18468379,8.69217634%203.49886358,8.64955418%20L3.5862069,8.64367816%20L12.2612343,8.64367816%20Z%20M12.4137931,4.65837915%20C12.7692867,4.65837915%2013.0574713,4.94656368%2013.0574713,5.30205731%20C13.0574713,5.62792647%2012.8153162,5.89723729%2012.5011364,5.93985945%20L12.4137931,5.94573547%20L6.52873563,5.94573547%20C6.173242,5.94573547%205.88505747,5.65755094%205.88505747,5.30205731%20C5.88505747,4.97618815%206.12721253,4.70687733%206.44139232,4.66425517%20L6.52873563,4.65837915%20L12.4137931,4.65837915%20Z%20M4.32183908,4.65837915%20C4.67733271,4.65837915%204.96551724,4.94656368%204.96551724,5.30205731%20C4.96551724,5.62792647%204.72336219,5.89723729%204.40918239,5.93985945%20L4.32183908,5.94573547%20L3.5862069,5.94573547%20C3.23071326,5.94573547%202.94252874,5.65755094%202.94252874,5.30205731%20C2.94252874,4.97618815%203.18468379,4.70687733%203.49886358,4.66425517%20L3.5862069,4.65837915%20L4.32183908,4.65837915%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Jg="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e设置%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-433.000000,%20-1211.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cg%20id='编组-35'%20transform='translate(433.664368,%201211.735632)'%3e%3cpath%20d='M13.9770115,0%20C15.0942772,0%2016,0.905722805%2016,2.02298851%20L16,2.02298851%20L16,12.5057471%20C16,13.6230128%2015.0942772,14.5287356%2013.9770115,14.5287356%20L13.9770115,14.5287356%20L2.02298851,14.5287356%20C0.905722805,14.5287356%200,13.6230128%200,12.5057471%20L0,12.5057471%20L0,2.02298851%20C0,0.905722805%200.905722805,0%202.02298851,0%20L2.02298851,0%20Z%20M13.9770115,1.28735632%20L2.02298851,1.28735632%20C1.61671007,1.28735632%201.28735632,1.61671007%201.28735632,2.02298851%20L1.28735632,2.02298851%20L1.28735632,12.5057471%20C1.28735632,12.9120256%201.61671007,13.2413793%202.02298851,13.2413793%20L2.02298851,13.2413793%20L13.9770115,13.2413793%20C14.3832899,13.2413793%2014.7126437,12.9120256%2014.7126437,12.5057471%20L14.7126437,12.5057471%20L14.7126437,2.02298851%20C14.7126437,1.61671007%2014.3832899,1.28735632%2013.9770115,1.28735632%20L13.9770115,1.28735632%20Z%20M12.2612343,8.64367816%20C12.6167279,8.64367816%2012.9049125,8.93186269%2012.9049125,9.28735632%20C12.9049125,9.61322548%2012.6627574,9.8825363%2012.3485776,9.92515846%20L12.2612343,9.93103448%20L3.5862069,9.93103448%20C3.23071326,9.93103448%202.94252874,9.64284995%202.94252874,9.28735632%20C2.94252874,8.96148716%203.18468379,8.69217634%203.49886358,8.64955418%20L3.5862069,8.64367816%20L12.2612343,8.64367816%20Z%20M12.4137931,4.65837915%20C12.7692867,4.65837915%2013.0574713,4.94656368%2013.0574713,5.30205731%20C13.0574713,5.62792647%2012.8153162,5.89723729%2012.5011364,5.93985945%20L12.4137931,5.94573547%20L6.52873563,5.94573547%20C6.173242,5.94573547%205.88505747,5.65755094%205.88505747,5.30205731%20C5.88505747,4.97618815%206.12721253,4.70687733%206.44139232,4.66425517%20L6.52873563,4.65837915%20L12.4137931,4.65837915%20Z%20M4.32183908,4.65837915%20C4.67733271,4.65837915%204.96551724,4.94656368%204.96551724,5.30205731%20C4.96551724,5.62792647%204.72336219,5.89723729%204.40918239,5.93985945%20L4.32183908,5.94573547%20L3.5862069,5.94573547%20C3.23071326,5.94573547%202.94252874,5.65755094%202.94252874,5.30205731%20C2.94252874,4.97618815%203.18468379,4.70687733%203.49886358,4.66425517%20L3.5862069,4.65837915%20L4.32183908,4.65837915%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",H0t={key:0,class:"config-section"},j0t={class:"section-header"},G0t={class:"section-title"},Y0t={key:0,class:"granularity-switch"},W0t=["onClick"],X0t=["onClick"],Z0t={key:0,class:"quick-range"},q0t=["onClick"],K0t={key:1,class:"date-inputs"},J0t={key:1,class:"config-section"},Q0t={class:"section-header"},$0t={class:"section-title"},eft={key:0,class:"list-actions"},tft={class:"selected-count"},nft={class:"select-list"},rft={key:2,class:"config-section"},ift={class:"section-header"},aft={class:"section-title"},oft={class:"switch-options"},sft={key:3,class:"config-section"},lft={class:"section-header"},cft={class:"section-title"},uft={class:"range-inputs"},dft={key:0,class:"range-unit"},fft={key:4,class:"config-section"},hft={DEFAULT_ICON:Kg,ACTIVE_ICON:Jg,NAME_CN:"通用控制面板",NAME_EN:"Universal Config Panel",ORDER:20,PLATFORM:["pc","screen","mobile"]},pft={bindId:{value:"",type:"string",label:"component.deepDisplacement.bindId"},bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},accentColor:{value:"#409eff",type:"color",label:"component.options.accentColor"},borderColor:{value:"#e5e5e5",type:"color",label:"component.options.borderColor"},bindMode:{value:"channel",type:"select",label:"绑定模式",options:[{label:"频道模式",value:"channel"},{label:"直接绑定",value:"direct"}]},linkChannel:{value:"deepDisplacement",type:"select",label:"联动频道",options:[{label:"深部位移",value:"deepDisplacement"},{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"设备联动",value:"device"},{label:"告警联动",value:"alarm"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"自定义频道名",showWhen:{linkChannel:"custom"}}},mft=[{type:"timeRange",label:"时间段",key:"timeRange",targetIds:"",showGranularity:!0,showQuickRange:!0,dateType:"datetime",dateFormat:"YYYY-MM-DD HH:mm:ss"},{type:"selectList",label:"节点列表",key:"nodeList",targetIds:"",multiple:!1,options:[{label:"-123米",value:-123},{label:"-126米",value:-126},{label:"-129米",value:-129}]}],vft=["type","label","key","targetIds","showGranularity","showQuickRange","dateType","dateFormat","multiple","options","minPlaceholder","maxPlaceholder","unit","buttonType","icon"],gft=[],yft={useAlias:!1,multiObject:!1,source:""},bft={DEFAULT:hft,OPTIONS:pft,DATA:mft,PARAMS:vft,SOURCE:gft,COMMON:yft},xft=o.defineComponent(tt(Ne({},bft),{__name:"universalConfigPanel",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){o.useCssVars(x=>({v10edae52:c.value.backgroundColor,a9b6f6d8:c.value.borderColor,d418e10a:r.value.textColor,v0bdaaa9c:r.value.borderColor,ca35c684:r.value.accentColor}));const e=ua(),t=n,r=o.computed(()=>{var C,E,T,A,M,D,k,P;const{options:x}=t.conf||{},_=((C=x==null?void 0:x.linkChannel)==null?void 0:C.value)||"deepDisplacement",w=((E=x==null?void 0:x.customChannel)==null?void 0:E.value)||"",S=_==="custom"&&w?w:_;return{bindId:((T=x==null?void 0:x.bindId)==null?void 0:T.value)||"",bgColor:((A=x==null?void 0:x.bgColor)==null?void 0:A.value)||"#ffffff",textColor:((M=x==null?void 0:x.textColor)==null?void 0:M.value)||"#333333",accentColor:((D=x==null?void 0:x.accentColor)==null?void 0:D.value)||"#409eff",borderColor:((k=x==null?void 0:x.borderColor)==null?void 0:k.value)||"#e5e5e5",bindMode:((P=x==null?void 0:x.bindMode)==null?void 0:P.value)||"channel",linkChannel:S}}),i=o.computed(()=>r.value.bindId||t.uid||""),a=o.computed(()=>{var x;return((x=t.conf)==null?void 0:x.data)||[]}),s=o.ref({}),l=[{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],c=o.computed(()=>({backgroundColor:r.value.bgColor,color:r.value.textColor,borderColor:r.value.borderColor})),u=()=>{s.value={},a.value.forEach((x,_)=>{var w,S,C;if(s.value[_]={},x.type==="timeRange"){s.value[_]={granularity:"day",quickRange:"week",startDate:"",endDate:""};const E=mt();s.value[_].endDate=E.format(x.dateFormat||"YYYY-MM-DD HH:mm:ss"),s.value[_].startDate=E.subtract(7,"day").format(x.dateFormat||"YYYY-MM-DD HH:mm:ss")}else if(x.type==="selectList")s.value[_]={selectedValues:x.multiple?[]:"",selectedValue:x.multiple?void 0:((S=(w=x.options)==null?void 0:w[0])==null?void 0:S.value)||"",selectAll:!1},x.multiple&&x.options&&(s.value[_].selectedValues=x.options.map(E=>E.value),s.value[_].selectAll=!0);else if(x.type==="switch"){const E={};(C=x.options)==null||C.forEach(T=>{E[T.value]=T.defaultValue!==!1}),s.value[_]=E}else x.type==="range"&&(s.value[_]={min:"",max:""})})},d=()=>{const x={};return a.value.forEach((_,w)=>{if(_.key&&s.value[w]){const S=s.value[w];_.type==="timeRange"?x[_.key]={granularity:S.granularity,startDate:S.startDate,endDate:S.endDate,quickRange:S.quickRange}:_.type==="selectList"?x[_.key]=_.multiple?S.selectedValues:S.selectedValue:_.type==="switch"?x[_.key]=Ne({},S):_.type==="range"&&(x[_.key]={min:S.min===""?null:parseFloat(S.min),max:S.max===""?null:parseFloat(S.max)})}}),x},f=()=>{const x=d(),_=i.value,w=r.value.bindMode,S=r.value.linkChannel;_&&(console.log("[UniversalConfigPanel] 广播配置:",{id:_,bindMode:w,linkChannel:S,config:x}),w==="channel"?e.publish(S,"universalConfigPanel",{objectId:_,type:"config",fv:x}):a.value.forEach(C=>{if(!C.targetIds)return;C.targetIds.split(",").map(T=>T.trim()).filter(Boolean).forEach(T=>{e.publish(S,"universalConfigPanel",{objectId:T,type:"bindConfig",fv:tt(Ne({},x),{[C.key]:x[C.key]})})})}))},h=(x,_)=>{s.value[x]&&(s.value[x].granularity=_,m())},p=(x,_)=>{if(!s.value[x])return;const w=a.value[x],S=mt(),C=w.dateFormat||"YYYY-MM-DD HH:mm:ss";s.value[x].quickRange=_,s.value[x].endDate=S.format(C),_==="week"?s.value[x].startDate=S.subtract(7,"day").format(C):_==="month"?s.value[x].startDate=S.subtract(30,"day").format(C):_==="quarter"&&(s.value[x].startDate=S.subtract(90,"day").format(C)),m()},m=x=>{f()},v=x=>{var w;const _=a.value[x];!_.multiple||!s.value[x]||(s.value[x].selectAll?s.value[x].selectedValues=((w=_.options)==null?void 0:w.map(S=>S.value))||[]:s.value[x].selectedValues=[],m())},g=x=>{s.value[x]&&(s.value[x].selectedValues=[],s.value[x].selectAll=!1,m())},y=x=>{var w;const _=a.value[x];_.multiple&&s.value[x]&&(s.value[x].selectAll=s.value[x].selectedValues.length===(((w=_.options)==null?void 0:w.length)||0)),m()},b=x=>{var S;const _=a.value[x],w=d();r.value.bindMode==="channel"?e.publish(r.value.linkChannel,"universalConfigPanel",{objectId:i.value,type:"action",action:_.key,fv:w}):(((S=_.targetIds)==null?void 0:S.split(",").map(E=>E.trim()).filter(Boolean))||[]).forEach(E=>{e.publish(r.value.linkChannel,"universalConfigPanel",{objectId:E,type:"action",action:_.key,fv:w})})};return o.watch(a,()=>{u(),setTimeout(f,300)},{immediate:!1,deep:!0,flush:"sync"}),o.onMounted(()=>{u(),setTimeout(f,300)}),(x,_)=>{const w=Se.ElDatePicker,S=Se.ElCheckbox,C=Se.ElIcon,E=Se.ElButton,T=Se.ElCheckboxGroup,A=Se.ElRadio,M=Se.ElRadioGroup,D=Se.ElInput;return o.openBlock(),o.createElementBlock("div",{class:"universal-config-panel",style:o.normalizeStyle(c.value)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.value,(k,P)=>{var I,N;return o.openBlock(),o.createElementBlock(o.Fragment,{key:P},[k.type==="timeRange"?(o.openBlock(),o.createElementBlock("div",H0t,[o.createElementVNode("div",j0t,[o.createElementVNode("span",G0t,o.toDisplayString(k.label||"时间段"),1),k.showGranularity&&s.value[P]?(o.openBlock(),o.createElementBlock("div",Y0t,[o.createElementVNode("span",{class:o.normalizeClass(["switch-item",{active:((I=s.value[P])==null?void 0:I.granularity)==="day"}]),onClick:R=>h(P,"day")}," 日均 ",10,W0t),o.createElementVNode("span",{class:o.normalizeClass(["switch-item",{active:((N=s.value[P])==null?void 0:N.granularity)==="hour"}]),onClick:R=>h(P,"hour")}," 小时 ",10,X0t)])):o.createCommentVNode("",!0)]),k.showQuickRange&&s.value[P]?(o.openBlock(),o.createElementBlock("div",Z0t,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(l,R=>{var V;return o.createElementVNode("span",{key:R.value,class:o.normalizeClass(["range-item",{active:((V=s.value[P])==null?void 0:V.quickRange)===R.value}]),onClick:B=>p(P,R.value)},o.toDisplayString(R.label),11,q0t)}),64))])):o.createCommentVNode("",!0),s.value[P]?(o.openBlock(),o.createElementBlock("div",K0t,[o.createVNode(w,{modelValue:s.value[P].startDate,"onUpdate:modelValue":R=>s.value[P].startDate=R,type:k.dateType||"datetime",placeholder:"开始时间",format:k.dateFormat||"YYYY-MM-DD HH:mm:ss","value-format":k.dateFormat||"YYYY-MM-DD HH:mm:ss",size:"small",class:"date-picker",onChange:R=>m()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"]),o.createVNode(w,{modelValue:s.value[P].endDate,"onUpdate:modelValue":R=>s.value[P].endDate=R,type:k.dateType||"datetime",placeholder:"结束时间",format:k.dateFormat||"YYYY-MM-DD HH:mm:ss","value-format":k.dateFormat||"YYYY-MM-DD HH:mm:ss",size:"small",class:"date-picker",onChange:R=>m()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"])])):o.createCommentVNode("",!0)])):k.type==="selectList"&&s.value[P]?(o.openBlock(),o.createElementBlock("div",J0t,[o.createElementVNode("div",Q0t,[o.createElementVNode("span",$0t,o.toDisplayString(k.label||"选择列表"),1)]),k.multiple?(o.openBlock(),o.createElementBlock("div",eft,[o.createVNode(S,{modelValue:s.value[P].selectAll,"onUpdate:modelValue":R=>s.value[P].selectAll=R,onChange:R=>v(P)},{default:o.withCtx(()=>[..._[0]||(_[0]=[o.createTextVNode("全选",-1)])]),_:1},8,["modelValue","onUpdate:modelValue","onChange"]),o.createVNode(E,{size:"small",text:"",onClick:R=>g(P)},{default:o.withCtx(()=>[o.createVNode(C,null,{default:o.withCtx(()=>[o.createVNode(o.unref(qt.Delete))]),_:1}),_[1]||(_[1]=o.createTextVNode("清空 ",-1))]),_:1},8,["onClick"]),o.createElementVNode("span",tft,[_[2]||(_[2]=o.createTextVNode("已选 ",-1)),o.createElementVNode("em",null,o.toDisplayString(s.value[P].selectedValues&&s.value[P].selectedValues.length||0),1),_[3]||(_[3]=o.createTextVNode(" 项",-1))])])):o.createCommentVNode("",!0),o.createElementVNode("div",nft,[k.multiple?(o.openBlock(),o.createBlock(T,{key:0,modelValue:s.value[P].selectedValues,"onUpdate:modelValue":R=>s.value[P].selectedValues=R,onChange:R=>y(P)},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(k.options,R=>(o.openBlock(),o.createBlock(S,{key:R.value,value:R.value,class:"list-checkbox"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(R.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])):(o.openBlock(),o.createBlock(M,{key:1,modelValue:s.value[P].selectedValue,"onUpdate:modelValue":R=>s.value[P].selectedValue=R,onChange:R=>y(P)},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(k.options,R=>(o.openBlock(),o.createBlock(A,{key:R.value,value:R.value,class:"list-radio"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(R.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))])])):k.type==="switch"&&s.value[P]?(o.openBlock(),o.createElementBlock("div",rft,[o.createElementVNode("div",ift,[o.createElementVNode("span",aft,o.toDisplayString(k.label||"开关"),1)]),o.createElementVNode("div",oft,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(k.options,R=>(o.openBlock(),o.createBlock(S,{key:R.value,modelValue:s.value[P][R.value],"onUpdate:modelValue":V=>s.value[P][R.value]=V,onChange:V=>m()},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(R.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))),128))])])):k.type==="range"&&s.value[P]?(o.openBlock(),o.createElementBlock("div",sft,[o.createElementVNode("div",lft,[o.createElementVNode("span",cft,o.toDisplayString(k.label||"范围设置"),1)]),o.createElementVNode("div",uft,[o.createVNode(D,{modelValue:s.value[P].min,"onUpdate:modelValue":R=>s.value[P].min=R,size:"small",placeholder:k.minPlaceholder||"最小值",class:"range-input",onChange:R=>m()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),_[4]||(_[4]=o.createElementVNode("span",{class:"range-sep"},"~",-1)),o.createVNode(D,{modelValue:s.value[P].max,"onUpdate:modelValue":R=>s.value[P].max=R,size:"small",placeholder:k.maxPlaceholder||"最大值",class:"range-input",onChange:R=>m()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),k.unit?(o.openBlock(),o.createElementBlock("span",dft,o.toDisplayString(k.unit),1)):o.createCommentVNode("",!0)])])):k.type==="button"?(o.openBlock(),o.createElementBlock("div",fft,[o.createVNode(E,{size:"small",onClick:R=>b(P),class:"action-btn",type:k.buttonType||"primary"},{default:o.withCtx(()=>[k.icon?(o.openBlock(),o.createBlock(C,{key:0},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(k.icon)))]),_:2},1024)):o.createCommentVNode("",!0),o.createTextVNode(" "+o.toDisplayString(k.label||"执行操作"),1)]),_:2},1032,["onClick","type"])])):o.createCommentVNode("",!0)],64)}),128)),o.renderSlot(x.$slots,"default",{},void 0,!0)],4)}}})),_ft=Dt(xft,[["__scopeId","data-v-60e3fc69"]]),Sft=Object.freeze(Object.defineProperty({__proto__:null,default:_ft},Symbol.toStringTag,{value:"Module"})),wft="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='18px'%20viewBox='0%200%2017%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e天气%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-807.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M817.945888,102.796609%20C819.683477,102.796609%20821.092089,104.205221%20821.092089,105.94281%20C821.092089,106.628082%20820.872999,107.262185%20820.501044,107.778896%20C822.196583,108.244456%20823.44069,109.818548%20823.44069,111.684342%20C823.44069,113.306186%20822.492183,114.753742%20821.051831,115.394536%20C820.713416,115.545093%20820.317026,115.392803%20820.16647,115.054388%20C820.015913,114.715973%20820.168202,114.319583%20820.506617,114.169026%20C821.464713,113.742782%20822.099373,112.774201%20822.099373,111.684342%20C822.099373,110.1861%20820.911369,108.976414%20819.451995,108.976414%20C819.031723,108.976414%20818.626762,109.07618%20818.260607,109.265341%20C817.879726,109.46211%20817.414554,109.255909%20817.304572,108.841551%20C816.799872,106.94008%20815.102249,105.597863%20813.147731,105.597863%20C810.772103,105.597863%20808.841317,107.563868%20808.841317,109.995048%20C808.841317,111.399401%20809.489548,112.691456%20810.568916,113.516983%20C810.863125,113.742002%20810.919215,114.162919%20810.694196,114.457127%20C810.469178,114.751336%20810.048261,114.807426%20809.754052,114.582408%20C808.345227,113.504903%20807.5,111.820195%20807.5,109.995048%20C807.5,106.828451%20810.025832,104.256546%20813.147731,104.256546%20C813.829302,104.256546%20814.486533,104.3802%20815.096693,104.608218%20C815.601039,103.529357%20816.696718,102.796609%20817.945888,102.796609%20Z%20M813.280439,107.176421%20C814.048868,107.176421%20814.770636,107.481714%20815.303171,108.014297%20C815.565067,108.276218%20815.565048,108.700855%20815.303127,108.962752%20C815.041206,109.224648%20814.616569,109.224629%20814.354672,108.962708%20C814.071197,108.679207%20813.689455,108.517738%20813.280439,108.517738%20C812.441385,108.517738%20811.761192,109.197931%20811.761192,110.036985%20C811.761192,110.446001%20811.922661,110.827743%20812.206162,111.111218%20C812.468083,111.373115%20812.468102,111.797752%20812.206206,112.059673%20C811.944309,112.321594%20811.519672,112.321613%20811.257751,112.059717%20C810.725168,111.527182%20810.419875,110.805414%20810.419875,110.036985%20C810.419875,108.457142%20811.700596,107.176421%20813.280439,107.176421%20Z%20M817.945888,104.137926%20C817.210393,104.137926%20816.567249,104.581189%20816.288327,105.226532%20C817.155696,105.815582%20817.856037,106.643608%20818.294581,107.628501%20L818.3271,107.70736%20C819.140827,107.532395%20819.750772,106.808824%20819.750772,105.94281%20C819.750772,104.94601%20818.942688,104.137926%20817.945888,104.137926%20Z%20M822.770031,105.657173%20C823.173193,105.657173%20823.5,105.98398%20823.5,106.387142%20C823.5,106.790304%20823.173193,107.117111%20822.770031,107.117111%20C822.36687,107.117111%20822.040063,106.790304%20822.040063,106.387142%20C822.040063,105.98398%20822.36687,105.657173%20822.770031,105.657173%20Z%20M822.040063,102.372314%20C822.443224,102.372314%20822.770031,102.699132%20822.770031,103.102283%20C822.770031,103.505445%20822.443224,103.832252%20822.040063,103.832252%20C821.636901,103.832252%20821.310094,103.505445%20821.310094,103.102283%20C821.310094,102.699132%20821.636901,102.372314%20822.040063,102.372314%20Z%20M814.740376,101.642346%20C815.143538,101.642346%20815.470345,101.969164%20815.470345,102.372314%20C815.470345,102.775465%20815.143538,103.102283%20814.740376,103.102283%20C814.337215,103.102283%20814.010408,102.775465%20814.010408,102.372314%20C814.010408,101.969164%20814.337215,101.642346%20814.740376,101.642346%20Z%20M818.755204,100.547393%20C819.158366,100.547393%20819.485173,100.874211%20819.485173,101.277361%20C819.485173,101.680512%20819.158366,102.00733%20818.755204,102.00733%20C818.352042,102.00733%20818.025235,101.680512%20818.025235,101.277361%20C818.025235,100.874211%20818.352042,100.547393%20818.755204,100.547393%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Cft="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='18px'%20viewBox='0%200%2017%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e天气%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-807.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M817.945888,102.796609%20C819.683477,102.796609%20821.092089,104.205221%20821.092089,105.94281%20C821.092089,106.628082%20820.872999,107.262185%20820.501044,107.778896%20C822.196583,108.244456%20823.44069,109.818548%20823.44069,111.684342%20C823.44069,113.306186%20822.492183,114.753742%20821.051831,115.394536%20C820.713416,115.545093%20820.317026,115.392803%20820.16647,115.054388%20C820.015913,114.715973%20820.168202,114.319583%20820.506617,114.169026%20C821.464713,113.742782%20822.099373,112.774201%20822.099373,111.684342%20C822.099373,110.1861%20820.911369,108.976414%20819.451995,108.976414%20C819.031723,108.976414%20818.626762,109.07618%20818.260607,109.265341%20C817.879726,109.46211%20817.414554,109.255909%20817.304572,108.841551%20C816.799872,106.94008%20815.102249,105.597863%20813.147731,105.597863%20C810.772103,105.597863%20808.841317,107.563868%20808.841317,109.995048%20C808.841317,111.399401%20809.489548,112.691456%20810.568916,113.516983%20C810.863125,113.742002%20810.919215,114.162919%20810.694196,114.457127%20C810.469178,114.751336%20810.048261,114.807426%20809.754052,114.582408%20C808.345227,113.504903%20807.5,111.820195%20807.5,109.995048%20C807.5,106.828451%20810.025832,104.256546%20813.147731,104.256546%20C813.829302,104.256546%20814.486533,104.3802%20815.096693,104.608218%20C815.601039,103.529357%20816.696718,102.796609%20817.945888,102.796609%20Z%20M813.280439,107.176421%20C814.048868,107.176421%20814.770636,107.481714%20815.303171,108.014297%20C815.565067,108.276218%20815.565048,108.700855%20815.303127,108.962752%20C815.041206,109.224648%20814.616569,109.224629%20814.354672,108.962708%20C814.071197,108.679207%20813.689455,108.517738%20813.280439,108.517738%20C812.441385,108.517738%20811.761192,109.197931%20811.761192,110.036985%20C811.761192,110.446001%20811.922661,110.827743%20812.206162,111.111218%20C812.468083,111.373115%20812.468102,111.797752%20812.206206,112.059673%20C811.944309,112.321594%20811.519672,112.321613%20811.257751,112.059717%20C810.725168,111.527182%20810.419875,110.805414%20810.419875,110.036985%20C810.419875,108.457142%20811.700596,107.176421%20813.280439,107.176421%20Z%20M817.945888,104.137926%20C817.210393,104.137926%20816.567249,104.581189%20816.288327,105.226532%20C817.155696,105.815582%20817.856037,106.643608%20818.294581,107.628501%20L818.3271,107.70736%20C819.140827,107.532395%20819.750772,106.808824%20819.750772,105.94281%20C819.750772,104.94601%20818.942688,104.137926%20817.945888,104.137926%20Z%20M822.770031,105.657173%20C823.173193,105.657173%20823.5,105.98398%20823.5,106.387142%20C823.5,106.790304%20823.173193,107.117111%20822.770031,107.117111%20C822.36687,107.117111%20822.040063,106.790304%20822.040063,106.387142%20C822.040063,105.98398%20822.36687,105.657173%20822.770031,105.657173%20Z%20M822.040063,102.372314%20C822.443224,102.372314%20822.770031,102.699132%20822.770031,103.102283%20C822.770031,103.505445%20822.443224,103.832252%20822.040063,103.832252%20C821.636901,103.832252%20821.310094,103.505445%20821.310094,103.102283%20C821.310094,102.699132%20821.636901,102.372314%20822.040063,102.372314%20Z%20M814.740376,101.642346%20C815.143538,101.642346%20815.470345,101.969164%20815.470345,102.372314%20C815.470345,102.775465%20815.143538,103.102283%20814.740376,103.102283%20C814.337215,103.102283%20814.010408,102.775465%20814.010408,102.372314%20C814.010408,101.969164%20814.337215,101.642346%20814.740376,101.642346%20Z%20M818.755204,100.547393%20C819.158366,100.547393%20819.485173,100.874211%20819.485173,101.277361%20C819.485173,101.680512%20819.158366,102.00733%20818.755204,102.00733%20C818.352042,102.00733%20818.025235,101.680512%20818.025235,101.277361%20C818.025235,100.874211%20818.352042,100.547393%20818.755204,100.547393%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Eft={class:"mix-component"},Aft=["src"],Tft={DEFAULT_ICON:wft,ACTIVE_ICON:Cft,NAME_CN:"天气",NAME_EN:"Weather",ORDER:4,PLATFORM:["pc","screen","mobile"]},Mft={transparent:{value:!1,type:"checkbox",label:"component.options.transparent"},bgColor:"#fff",textColor:{value:"#00B0F0",type:"color",label:"component.options.textColor",hideAlpha:!0},radiusSize:8,bgImg:{value:"",type:"image",label:"component.customized.bgImg"}},Dft={DEFAULT:Tft,OPTIONS:Mft,COMMON:{}},Lft=o.defineComponent(tt(Ne({},Dft),{__name:"weather",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){const e=n;class t extends Cn{extractStyles(){const{options:c}=this.props.conf,u=(d,f)=>d==null?f:typeof d=="object"&&"value"in d?d.value:d;return{bgColor:u(c==null?void 0:c.bgColor,"#fff"),textColor:u(c==null?void 0:c.textColor,"#00B0F0"),radiusSize:u(c==null?void 0:c.radiusSize,8),bgImg:u(c==null?void 0:c.bgImg,""),transparent:u(c==null?void 0:c.transparent,!1)}}}const r=new t(e,"weather");r.setupLifecycle();const i=r.getStyle(),a=l=>l?l.startsWith(Ao)||l.startsWith("http")?l:Ao+l:"",s=o.computed(()=>{var l,c;return((c=(l=i.value)==null?void 0:l.textColor)==null?void 0:c.replace("#",""))||"00B0F0"});return(l,c)=>(o.openBlock(),o.createElementBlock("div",Eft,[o.createElementVNode("div",{class:"weather-wrap",style:o.normalizeStyle({backgroundColor:o.unref(i).transparent?"transparent":o.unref(i).bgColor,borderRadius:`${o.unref(i).radiusSize}px`,backgroundImage:o.unref(i).bgImg?`url(${a(o.unref(i).bgImg)})`:""})},[o.createElementVNode("iframe",{width:"200",scrolling:"no",height:"60",frameborder:"0",allowtransparency:"true",src:`https://i.tianqi.com?c=code&id=12&color=%23${s.value}&icon=1&num=1&site=15&align=center`},null,8,Aft)],4),o.renderSlot(l.$slots,"default",{},void 0,!0)]))}})),Nft=Dt(Lft,[["__scopeId","data-v-dfc24c16"]]),Oft=Object.freeze(Object.defineProperty({__proto__:null,default:Nft},Symbol.toStringTag,{value:"Module"}));function Ph(n={}){let e=null;try{e=vh().t}catch(r){e=null}return{t:(r,...i)=>{var a;if(e)try{const s=e(r,...i);if(s&&s!==r)return String(s)}catch(s){}return(a=n[r])!=null?a:r}}}var D1=ld.CMD;function ov(n,e){return Math.abs(n-e)<1e-5}function bk(n){var e=n.data,t=n.len(),r=[],i,a=0,s=0,l=0,c=0;function u(k,P){i&&i.length>2&&r.push(i),i=[k,P]}function d(k,P,I,N){ov(k,I)&&ov(P,N)||i.push(k,P,I,N,I,N)}function f(k,P,I,N,R,V){var B=Math.abs(P-k),F=Math.tan(B/4)*4/3,G=P<k?-1:1,U=Math.cos(k),z=Math.sin(k),j=Math.cos(P),W=Math.sin(P),Y=U*R+I,re=z*V+N,Q=j*R+I,$=W*V+N,ee=R*F*G,X=V*F*G;i.push(Y-ee*z,re+X*U,Q+ee*W,$-X*j,Q,$)}for(var h,p,m,v,g=0;g<t;){var y=e[g++],b=g===1;switch(b&&(a=e[g],s=e[g+1],l=a,c=s,(y===D1.L||y===D1.C||y===D1.Q)&&(i=[l,c])),y){case D1.M:a=l=e[g++],s=c=e[g++],u(l,c);break;case D1.L:h=e[g++],p=e[g++],d(a,s,h,p),a=h,s=p;break;case D1.C:i.push(e[g++],e[g++],e[g++],e[g++],a=e[g++],s=e[g++]);break;case D1.Q:h=e[g++],p=e[g++],m=e[g++],v=e[g++],i.push(a+2/3*(h-a),s+2/3*(p-s),m+2/3*(h-m),v+2/3*(p-v),m,v),a=m,s=v;break;case D1.A:var x=e[g++],_=e[g++],w=e[g++],S=e[g++],C=e[g++],E=e[g++]+C;g+=1;var T=!e[g++];h=Math.cos(C)*w+x,p=Math.sin(C)*S+_,b?(l=h,c=p,u(l,c)):d(a,s,h,p),a=Math.cos(E)*w+x,s=Math.sin(E)*S+_;for(var A=(T?-1:1)*Math.PI/2,M=C;T?M>E:M<E;M+=A){var D=T?Math.max(M+A,E):Math.min(M+A,E);f(M,D,x,_,w,S)}break;case D1.R:l=a=e[g++],c=s=e[g++],h=l+e[g++],p=c+e[g++],u(h,c),d(h,c,h,p),d(h,p,l,p),d(l,p,l,c),d(l,c,h,c);break;case D1.Z:i&&d(a,s,l,c),a=l,s=c;break}}return i&&i.length>2&&r.push(i),r}function xk(n,e,t,r,i,a,s,l,c,u){if(ov(n,t)&&ov(e,r)&&ov(i,s)&&ov(a,l)){c.push(s,l);return}var d=2/u,f=d*d,h=s-n,p=l-e,m=Math.sqrt(h*h+p*p);h/=m,p/=m;var v=t-n,g=r-e,y=i-s,b=a-l,x=v*v+g*g,_=y*y+b*b;if(x<f&&_<f){c.push(s,l);return}var w=h*v+p*g,S=-h*y-p*b,C=x-w*w,E=_-S*S;if(C<f&&w>=0&&E<f&&S>=0){c.push(s,l);return}var T=[],A=[];th(n,t,i,s,.5,T),th(e,r,a,l,.5,A),xk(T[0],A[0],T[1],A[1],T[2],A[2],T[3],A[3],c,u),xk(T[4],A[4],T[5],A[5],T[6],A[6],T[7],A[7],c,u)}function Pft(n,e){var t=bk(n),r=[];e=e||1;for(var i=0;i<t.length;i++){var a=t[i],s=[],l=a[0],c=a[1];s.push(l,c);for(var u=2;u<a.length;){var d=a[u++],f=a[u++],h=a[u++],p=a[u++],m=a[u++],v=a[u++];xk(l,c,d,f,h,p,m,v,s,e),l=m,c=v}r.push(s)}return r}function v0e(n,e,t){var r=n[e],i=n[1-e],a=Math.abs(r/i),s=Math.ceil(Math.sqrt(a*t)),l=Math.floor(t/s);l===0&&(l=1,s=t);for(var c=[],u=0;u<s;u++)c.push(l);var d=s*l,f=t-d;if(f>0)for(var u=0;u<f;u++)c[u%s]+=1;return c}function yQ(n,e,t){for(var r=n.r0,i=n.r,a=n.startAngle,s=n.endAngle,l=Math.abs(s-a),c=l*i,u=i-r,d=c>Math.abs(u),f=v0e([c,u],d?0:1,e),h=(d?l:u)/f.length,p=0;p<f.length;p++)for(var m=(d?u:l)/f[p],v=0;v<f[p];v++){var g={};d?(g.startAngle=a+h*p,g.endAngle=a+h*(p+1),g.r0=r+m*v,g.r=r+m*(v+1)):(g.startAngle=a+m*v,g.endAngle=a+m*(v+1),g.r0=r+h*p,g.r=r+h*(p+1)),g.clockwise=n.clockwise,g.cx=n.cx,g.cy=n.cy,t.push(g)}}function kft(n,e,t){for(var r=n.width,i=n.height,a=r>i,s=v0e([r,i],a?0:1,e),l=a?"width":"height",c=a?"height":"width",u=a?"x":"y",d=a?"y":"x",f=n[l]/s.length,h=0;h<s.length;h++)for(var p=n[c]/s[h],m=0;m<s[h];m++){var v={};v[u]=h*f,v[d]=m*p,v[l]=f,v[c]=p,v.x+=n.x,v.y+=n.y,t.push(v)}}function bQ(n,e,t,r){return n*r-t*e}function Ift(n,e,t,r,i,a,s,l){var c=t-n,u=r-e,d=s-i,f=l-a,h=bQ(d,f,c,u);if(Math.abs(h)<1e-6)return null;var p=n-i,m=e-a,v=bQ(p,m,d,f)/h;return v<0||v>1?null:new _r(v*c+n,v*u+e)}function Rft(n,e,t){var r=new _r;_r.sub(r,t,e),r.normalize();var i=new _r;_r.sub(i,n,e);var a=i.dot(r);return a}function bm(n,e){var t=n[n.length-1];t&&t[0]===e[0]&&t[1]===e[1]||n.push(e)}function Vft(n,e,t){for(var r=n.length,i=[],a=0;a<r;a++){var s=n[a],l=n[(a+1)%r],c=Ift(s[0],s[1],l[0],l[1],e.x,e.y,t.x,t.y);c&&i.push({projPt:Rft(c,e,t),pt:c,idx:a})}if(i.length<2)return[{points:n},{points:n}];i.sort(function(g,y){return g.projPt-y.projPt});var u=i[0],d=i[i.length-1];if(d.idx<u.idx){var f=u;u=d,d=f}for(var h=[u.pt.x,u.pt.y],p=[d.pt.x,d.pt.y],m=[h],v=[p],a=u.idx+1;a<=d.idx;a++)bm(m,n[a].slice());bm(m,p),bm(m,h);for(var a=d.idx+1;a<=u.idx+r;a++)bm(v,n[a%r].slice());return bm(v,h),bm(v,p),[{points:m},{points:v}]}function xQ(n){var e=n.points,t=[],r=[];Kw(e,t,r);var i=new xr(t[0],t[1],r[0]-t[0],r[1]-t[1]),a=i.width,s=i.height,l=i.x,c=i.y,u=new _r,d=new _r;return a>s?(u.x=d.x=l+a/2,u.y=c,d.y=c+s):(u.y=d.y=c+s/2,u.x=l,d.x=l+a),Vft(e,u,d)}function KS(n,e,t,r){if(t===1)r.push(e);else{var i=Math.floor(t/2),a=n(e);KS(n,a[0],i,r),KS(n,a[1],t-i,r)}return r}function Bft(n,e){for(var t=[],r=0;r<e;r++)t.push(vR(n));return t}function Fft(n,e){e.setStyle(n.style),e.z=n.z,e.z2=n.z2,e.zlevel=n.zlevel}function zft(n){for(var e=[],t=0;t<n.length;)e.push([n[t++],n[t++]]);return e}function Uft(n,e){var t=[],r=n.shape,i;switch(n.type){case"rect":kft(r,e,t),i=Yr;break;case"sector":yQ(r,e,t),i=Ws;break;case"circle":yQ({r0:0,r:r.r,startAngle:0,endAngle:Math.PI*2,cx:r.cx,cy:r.cy},e,t),i=Ws;break;default:var a=n.getComputedTransform(),s=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,l=rn(Pft(n.getUpdatedPathProxy(),s),function(y){return zft(y)}),c=l.length;if(c===0)KS(xQ,{points:l[0]},e,t);else if(c===e)for(var u=0;u<c;u++)t.push({points:l[u]});else{var d=0,f=rn(l,function(y){var b=[],x=[];Kw(y,b,x);var _=(x[1]-b[1])*(x[0]-b[0]);return d+=_,{poly:y,area:_}});f.sort(function(y,b){return b.area-y.area});for(var h=e,u=0;u<c;u++){var p=f[u];if(h<=0)break;var m=u===c-1?h:Math.ceil(p.area/d*e);m<0||(KS(xQ,{points:p.poly},m,t),h-=m)}}i=Xs;break}if(!i)return Bft(n,e);for(var v=[],u=0;u<t.length;u++){var g=new i;g.setShape(t[u]),Fft(n,g),v.push(g)}return v}function Hft(n,e){var t=n.length,r=e.length;if(t===r)return[n,e];for(var i=[],a=[],s=t<r?n:e,l=Math.min(t,r),c=Math.abs(r-t)/6,u=(l-2)/6,d=Math.ceil(c/u)+1,f=[s[0],s[1]],h=c,p=2;p<l;){var m=s[p-2],v=s[p-1],g=s[p++],y=s[p++],b=s[p++],x=s[p++],_=s[p++],w=s[p++];if(h<=0){f.push(g,y,b,x,_,w);continue}for(var S=Math.min(h,d-1)+1,C=1;C<=S;C++){var E=C/S;th(m,g,b,_,E,i),th(v,y,x,w,E,a),m=i[3],v=a[3],f.push(i[1],a[1],i[2],a[2],m,v),g=i[5],y=a[5],b=i[6],x=a[6]}h-=S-1}return s===n?[f,e]:[n,f]}function _Q(n,e){for(var t=n.length,r=n[t-2],i=n[t-1],a=[],s=0;s<e.length;)a[s++]=r,a[s++]=i;return a}function jft(n,e){for(var t,r,i,a=[],s=[],l=0;l<Math.max(n.length,e.length);l++){var c=n[l],u=e[l],d=void 0,f=void 0;c?u?(t=Hft(c,u),d=t[0],f=t[1],r=d,i=f):(f=_Q(i||c,c),d=c):(d=_Q(r||u,u),f=u),a.push(d),s.push(f)}return[a,s]}function SQ(n){for(var e=0,t=0,r=0,i=n.length,a=0,s=i-2;a<i;s=a,a+=2){var l=n[s],c=n[s+1],u=n[a],d=n[a+1],f=l*d-u*c;e+=f,t+=(l+u)*f,r+=(c+d)*f}return e===0?[n[0]||0,n[1]||0]:[t/e/3,r/e/3,e]}function Gft(n,e,t,r){for(var i=(n.length-2)/6,a=1/0,s=0,l=n.length,c=l-2,u=0;u<i;u++){for(var d=u*6,f=0,h=0;h<l;h+=2){var p=h===0?d:(d+h-2)%c+2,m=n[p]-t[0],v=n[p+1]-t[1],g=e[h]-r[0],y=e[h+1]-r[1],b=g-m,x=y-v;f+=b*b+x*x}f<a&&(a=f,s=u)}return s}function Yft(n){for(var e=[],t=n.length,r=0;r<t;r+=2)e[r]=n[t-r-2],e[r+1]=n[t-r-1];return e}function Wft(n,e,t,r){for(var i=[],a,s=0;s<n.length;s++){var l=n[s],c=e[s],u=SQ(l),d=SQ(c);a==null&&(a=u[2]<0!=d[2]<0);var f=[],h=[],p=0,m=1/0,v=[],g=l.length;a&&(l=Yft(l));for(var y=Gft(l,c,u,d)*6,b=g-2,x=0;x<b;x+=2){var _=(y+x)%b+2;f[x+2]=l[_]-u[0],f[x+3]=l[_+1]-u[1]}f[0]=l[y]-u[0],f[1]=l[y+1]-u[1];for(var w=r/t,S=-r/2;S<=r/2;S+=w){for(var C=Math.sin(S),E=Math.cos(S),T=0,x=0;x<l.length;x+=2){var A=f[x],M=f[x+1],D=c[x]-d[0],k=c[x+1]-d[1],P=D*E-k*C,I=D*C+k*E;v[x]=P,v[x+1]=I;var N=P-A,R=I-M;T+=N*N+R*R}if(T<m){m=T,p=S;for(var V=0;V<v.length;V++)h[V]=v[V]}}i.push({from:f,to:h,fromCp:u,toCp:d,rotation:-p})}return i}function JS(n){return n.__isCombineMorphing}var g0e="__mOriginal_";function QS(n,e,t){var r=g0e+e,i=n[r]||n[e];n[r]||(n[r]=n[e]);var a=t.replace,s=t.after,l=t.before;n[e]=function(){var c=arguments,u;return l&&l.apply(this,c),a?u=a.apply(this,c):u=i.apply(this,c),s&&s.apply(this,c),u}}function M9(n,e){var t=g0e+e;n[t]&&(n[e]=n[t],n[t]=null)}function wQ(n,e){for(var t=0;t<n.length;t++)for(var r=n[t],i=0;i<r.length;){var a=r[i],s=r[i+1];r[i++]=e[0]*a+e[2]*s+e[4],r[i++]=e[1]*a+e[3]*s+e[5]}}function y0e(n,e){var t=n.getUpdatedPathProxy(),r=e.getUpdatedPathProxy(),i=jft(bk(t),bk(r)),a=i[0],s=i[1],l=n.getComputedTransform(),c=e.getComputedTransform();function u(){this.transform=null}l&&wQ(a,l),c&&wQ(s,c),QS(e,"updateTransform",{replace:u}),e.transform=null;var d=Wft(a,s,10,Math.PI),f=[];QS(e,"buildPath",{replace:function(h){for(var p=e.__morphT,m=1-p,v=[],g=0;g<d.length;g++){var y=d[g],b=y.from,x=y.to,_=y.rotation*p,w=y.fromCp,S=y.toCp,C=Math.sin(_),E=Math.cos(_);s9(v,w,S,p);for(var T=0;T<b.length;T+=2){var A=b[T],M=b[T+1],D=x[T],k=x[T+1],P=A*m+D*p,I=M*m+k*p;f[T]=P*E-I*C+v[0],f[T+1]=P*C+I*E+v[1]}var N=f[0],R=f[1];h.moveTo(N,R);for(var T=2;T<b.length;){var D=f[T++],k=f[T++],V=f[T++],B=f[T++],F=f[T++],G=f[T++];N===D&&R===k&&V===F&&B===G?h.lineTo(F,G):h.bezierCurveTo(D,k,V,B,F,G),N=F,R=G}}}})}function vF(n,e,t){if(!n||!e)return e;var r=t.done,i=t.during;y0e(n,e),e.__morphT=0;function a(){M9(e,"buildPath"),M9(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},Wn({during:function(s){e.dirtyShape(),i&&i(s)},done:function(){a(),r&&r()}},t)),e}function Xft(n,e,t,r,i,a){var s=16;n=i===t?0:Math.round(32767*(n-t)/(i-t)),e=a===r?0:Math.round(32767*(e-r)/(a-r));for(var l=0,c,u=(1<<s)/2;u>0;u/=2){var d=0,f=0;(n&u)>0&&(d=1),(e&u)>0&&(f=1),l+=u*u*(3*d^f),f===0&&(d===1&&(n=u-1-n,e=u-1-e),c=n,n=e,e=c)}return l}function $S(n){var e=1/0,t=1/0,r=-1/0,i=-1/0,a=rn(n,function(l){var c=l.getBoundingRect(),u=l.getComputedTransform(),d=c.x+c.width/2+(u?u[4]:0),f=c.y+c.height/2+(u?u[5]:0);return e=Math.min(d,e),t=Math.min(f,t),r=Math.max(d,r),i=Math.max(f,i),[d,f]}),s=rn(a,function(l,c){return{cp:l,z:Xft(l[0],l[1],e,t,r,i),path:n[c]}});return s.sort(function(l,c){return l.z-c.z}).map(function(l){return l.path})}function b0e(n){return Uft(n.path,n.count)}function _k(){return{fromIndividuals:[],toIndividuals:[],count:0}}function Zft(n,e,t){var r=[];function i(w){for(var S=0;S<w.length;S++){var C=w[S];JS(C)?i(C.childrenRef()):C instanceof Pr&&r.push(C)}}i(n);var a=r.length;if(!a)return _k();var s=t.dividePath||b0e,l=s({path:e,count:a});if(l.length!==a)return console.error("Invalid morphing: unmatched splitted path"),_k();r=$S(r),l=$S(l);for(var c=t.done,u=t.during,d=t.individualDelay,f=new t0,h=0;h<a;h++){var p=r[h],m=l[h];m.parent=e,m.copyTransform(f),d||y0e(p,m)}e.__isCombineMorphing=!0,e.childrenRef=function(){return l};function v(w){for(var S=0;S<l.length;S++)l[S].addSelfToZr(w)}QS(e,"addSelfToZr",{after:function(w){v(w)}}),QS(e,"removeSelfFromZr",{after:function(w){for(var S=0;S<l.length;S++)l[S].removeSelfFromZr(w)}});function g(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,M9(e,"addSelfToZr"),M9(e,"removeSelfFromZr")}var y=l.length;if(d)for(var b=y,x=function(){b--,b===0&&(g(),c&&c())},h=0;h<y;h++){var _=d?Wn({delay:(t.delay||0)+d(h,y,r[h],l[h]),done:x},t):t;vF(r[h],l[h],_)}else e.__morphT=0,e.animateTo({__morphT:1},Wn({during:function(w){for(var S=0;S<y;S++){var C=l[S];C.__morphT=e.__morphT,C.dirtyShape()}u&&u(w)},done:function(){g();for(var w=0;w<n.length;w++)M9(n[w],"updateTransform");c&&c()}},t));return e.__zr&&v(e.__zr),{fromIndividuals:r,toIndividuals:l,count:y}}function qft(n,e,t){var r=e.length,i=[],a=t.dividePath||b0e;function s(p){for(var m=0;m<p.length;m++){var v=p[m];JS(v)?s(v.childrenRef()):v instanceof Pr&&i.push(v)}}if(JS(n)){s(n.childrenRef());var l=i.length;if(l<r)for(var c=0,u=l;u<r;u++)i.push(vR(i[c++%l]));i.length=r}else{i=a({path:n,count:r});for(var d=n.getComputedTransform(),u=0;u<i.length;u++)i[u].setLocalTransform(d);if(i.length!==r)return console.error("Invalid morphing: unmatched splitted path"),_k()}i=$S(i),e=$S(e);for(var f=t.individualDelay,u=0;u<r;u++){var h=f?Wn({delay:(t.delay||0)+f(u,r,i[u],e[u])},t):t;vF(i[u],e[u],h)}return{fromIndividuals:i,toIndividuals:e,count:e.length}}function CQ(n){return Qt(n[0])}function EQ(n,e){for(var t=[],r=n.length,i=0;i<r;i++)t.push({one:n[i],many:[]});for(var i=0;i<e.length;i++){var a=e[i].length,s=void 0;for(s=0;s<a;s++)t[s%r].many.push(e[i][s])}for(var l=0,i=r-1;i>=0;i--)if(!t[i].many.length){var c=t[l].many;if(c.length<=1)if(l)l=0;else return t;var a=c.length,u=Math.ceil(a/2);t[i].many=c.slice(u,a),t[l].many=c.slice(0,u),l++}return t}var Kft={clone:function(n){for(var e=[],t=1-Math.pow(1-n.path.style.opacity,1/n.count),r=0;r<n.count;r++){var i=vR(n.path);i.setStyle("opacity",t),e.push(i)}return e},split:null};function BD(n,e,t,r,i,a){if(!n.length||!e.length)return;var s=Dg("update",r,i);if(!(s&&s.duration>0))return;var l=r.getModel("universalTransition").get("delay"),c=Object.assign({setToFinal:!0},s),u,d;CQ(n)&&(u=n,d=e),CQ(e)&&(u=e,d=n);function f(y,b,x,_,w){var S=y.many,C=y.one;if(S.length===1&&!w){var E=b?S[0]:C,T=b?C:S[0];if(JS(E))f({many:[E],one:T},!0,x,_,!0);else{var A=l?Wn({delay:l(x,_)},c):c;vF(E,T,A),a(E,T,E,T,A)}}else for(var M=Wn({dividePath:Kft[t],individualDelay:l&&function(R,V,B,F){return l(R+x,_)}},c),D=b?Zft(S,C,M):qft(C,S,M),k=D.fromIndividuals,P=D.toIndividuals,I=k.length,N=0;N<I;N++){var A=l?Wn({delay:l(N,I)},c):c;a(k[N],P[N],b?S[N]:y.one,b?y.one:S[N],A)}}for(var h=u?u===n:n.length>e.length,p=u?EQ(d,u):EQ(h?e:n,[h?n:e]),m=0,v=0;v<p.length;v++)m+=p[v].many.length;for(var g=0,v=0;v<p.length;v++)f(p[v],h,g,m),g+=p[v].many.length}function X2(n){if(!n)return[];if(Qt(n)){for(var e=[],t=0;t<n.length;t++)e.push(X2(n[t]));return e}var r=[];return n.traverse(function(i){i instanceof Pr&&!i.disableMorphing&&!i.invisible&&!i.ignore&&r.push(i)}),r}var x0e=1e4,Jft=0,AQ=1,TQ=2,Qft=Jr();function $ft(n,e){for(var t=n.dimensions,r=0;r<t.length;r++){var i=n.getDimensionInfo(t[r]);if(i&&i.otherDims[e]===0)return t[r]}}function eht(n,e,t){var r=n.getDimensionInfo(t),i=r&&r.ordinalMeta;if(r){var a=n.get(r.name,e);return i&&i.categories[a]||a+""}}function MQ(n,e,t,r){var i=r?"itemChildGroupId":"itemGroupId",a=$ft(n,i);if(a){var s=eht(n,e,a);return s}var l=n.getRawDataItem(e),c=r?"childGroupId":"groupId";if(l&&l[c])return l[c]+"";if(!r)return t||n.getId(e)}function DQ(n){var e=[];return Te(n,function(t){var r=t.data,i=t.dataGroupId;if(r.count()>x0e){process.env.NODE_ENV!=="production"&&Sa("Universal transition is disabled on large data > 10k.");return}for(var a=r.getIndices(),s=0;s<a.length;s++)e.push({data:r,groupId:MQ(r,s,i,!1),childGroupId:MQ(r,s,i,!0),divide:t.divide,dataIndex:s})}),e}function FD(n,e,t){n.traverse(function(r){r instanceof Pr&&la(r,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function zD(n){if(n.parent){var e=n.getComputedTransform();n.setLocalTransform(e),n.parent.remove(n)}}function xm(n){n.stopAnimation(),n.isGroup&&n.traverse(function(e){e.stopAnimation()})}function tht(n,e,t){var r=Dg("update",t,e);r&&n.traverse(function(i){if(i instanceof fu){var a=$7e(i);a&&i.animateFrom({style:a},r)}})}function nht(n,e){var t=n.length;if(t!==e.length)return!1;for(var r=0;r<t;r++){var i=n[r],a=e[r];if(i.data.getId(i.dataIndex)!==a.data.getId(a.dataIndex))return!1}return!0}function _0e(n,e,t){var r=DQ(n),i=DQ(e);function a(x,_,w,S,C){(w||x)&&_.animateFrom({style:w&&w!==x?Jt(Jt({},w.style),x.style):x.style},C)}var s=!1,l=Jft,c=Yn(),u=Yn();r.forEach(function(x){x.groupId&&c.set(x.groupId,!0),x.childGroupId&&u.set(x.childGroupId,!0)});for(var d=0;d<i.length;d++){var f=i[d].groupId;if(u.get(f)){l=AQ;break}var h=i[d].childGroupId;if(h&&c.get(h)){l=TQ;break}}function p(x,_){return function(w){var S=w.data,C=w.dataIndex;return _?S.getId(C):x?l===AQ?w.childGroupId:w.groupId:l===TQ?w.childGroupId:w.groupId}}var m=nht(r,i),v={};if(!m)for(var d=0;d<i.length;d++){var g=i[d],y=g.data.getItemGraphicEl(g.dataIndex);y&&(v[y.id]=!0)}function b(x,_){var w=r[_],S=i[x],C=S.data.hostModel,E=w.data.getItemGraphicEl(w.dataIndex),T=S.data.getItemGraphicEl(S.dataIndex);if(E===T){T&&tht(T,S.dataIndex,C);return}E&&v[E.id]||T&&(xm(T),E?(xm(E),zD(E),s=!0,BD(X2(E),X2(T),S.divide,C,x,a)):FD(T,C,x))}new g0(r,i,p(!0,m),p(!1,m),null,"multiple").update(b).updateManyToOne(function(x,_){var w=i[x],S=w.data,C=S.hostModel,E=S.getItemGraphicEl(w.dataIndex),T=ui(rn(_,function(A){return r[A].data.getItemGraphicEl(r[A].dataIndex)}),function(A){return A&&A!==E&&!v[A.id]});E&&(xm(E),T.length?(Te(T,function(A){xm(A),zD(A)}),s=!0,BD(X2(T),X2(E),w.divide,C,x,a)):FD(E,C,w.dataIndex))}).updateOneToMany(function(x,_){var w=r[_],S=w.data.getItemGraphicEl(w.dataIndex);if(!(S&&v[S.id])){var C=ui(rn(x,function(T){return i[T].data.getItemGraphicEl(i[T].dataIndex)}),function(T){return T&&T!==S}),E=i[x[0]].data.hostModel;C.length&&(Te(C,function(T){return xm(T)}),S?(xm(S),zD(S),s=!0,BD(X2(S),X2(C),w.divide,E,x[0],a)):Te(C,function(T){return FD(T,E,x[0])}))}}).updateManyToMany(function(x,_){new g0(_,x,function(w){return r[w].data.getId(r[w].dataIndex)},function(w){return i[w].data.getId(i[w].dataIndex)}).update(function(w,S){b(x[w],_[S])}).execute()}).execute(),s&&Te(e,function(x){var _=x.data,w=_.hostModel,S=w&&t.getViewOfSeriesModel(w),C=Dg("update",w,0);S&&w.isAnimationEnabled()&&C&&C.duration>0&&S.group.traverse(function(E){E instanceof Pr&&!E.animators.length&&E.animateFrom({style:{opacity:0}},C)})})}function LQ(n){var e=n.getModel("universalTransition").get("seriesKey");return e||n.id}function NQ(n){return Qt(n)?n.sort().join(","):n}function vf(n){if(n.hostModel)return n.hostModel.getModel("universalTransition").get("divideShape")}function rht(n,e){var t=Yn(),r=Yn(),i=Yn();Te(n.oldSeries,function(s,l){var c=n.oldDataGroupIds[l],u=n.oldData[l],d=LQ(s),f=NQ(d);r.set(f,{dataGroupId:c,data:u}),Qt(d)&&Te(d,function(h){i.set(h,{key:f,dataGroupId:c,data:u})})});function a(s){t.get(s)&&Sa("Duplicated seriesKey in universalTransition "+s)}return Te(e.updatedSeries,function(s){if(s.isUniversalTransitionEnabled()&&s.isAnimationEnabled()){var l=s.get("dataGroupId"),c=s.getData(),u=LQ(s),d=NQ(u),f=r.get(d);if(f)process.env.NODE_ENV!=="production"&&a(d),t.set(d,{oldSeries:[{dataGroupId:f.dataGroupId,divide:vf(f.data),data:f.data}],newSeries:[{dataGroupId:l,divide:vf(c),data:c}]});else if(Qt(u)){process.env.NODE_ENV!=="production"&&a(d);var h=[];Te(u,function(v){var g=r.get(v);g.data&&h.push({dataGroupId:g.dataGroupId,divide:vf(g.data),data:g.data})}),h.length&&t.set(d,{oldSeries:h,newSeries:[{dataGroupId:l,data:c,divide:vf(c)}]})}else{var p=i.get(u);if(p){var m=t.get(p.key);m||(m={oldSeries:[{dataGroupId:p.dataGroupId,data:p.data,divide:vf(p.data)}],newSeries:[]},t.set(p.key,m)),m.newSeries.push({dataGroupId:l,data:c,divide:vf(c)})}}}}),t}function OQ(n,e){for(var t=0;t<n.length;t++){var r=e.seriesIndex!=null&&e.seriesIndex===n[t].seriesIndex||e.seriesId!=null&&e.seriesId===n[t].id;if(r)return t}}function iht(n,e,t,r){var i=[],a=[];Te(Ri(n.from),function(s){var l=OQ(e.oldSeries,s);l>=0&&i.push({dataGroupId:e.oldDataGroupIds[l],data:e.oldData[l],divide:vf(e.oldData[l]),groupIdDim:s.dimension})}),Te(Ri(n.to),function(s){var l=OQ(t.updatedSeries,s);if(l>=0){var c=t.updatedSeries[l].getData();a.push({dataGroupId:e.oldDataGroupIds[l],data:c,divide:vf(c),groupIdDim:s.dimension})}}),i.length>0&&a.length>0&&_0e(i,a,r)}function qC(n){n.registerUpdateLifecycle("series:beforeupdate",function(e,t,r){Te(Ri(r.seriesTransition),function(i){Te(Ri(i.to),function(a){for(var s=r.updatedSeries,l=0;l<s.length;l++)(a.seriesIndex!=null&&a.seriesIndex===s[l].seriesIndex||a.seriesId!=null&&a.seriesId===s[l].id)&&(s[l][kx]=!0)})})}),n.registerUpdateLifecycle("series:transition",function(e,t,r){var i=Qft(t);if(i.oldSeries&&r.updatedSeries&&r.optionChanged){var a=r.seriesTransition;if(a)Te(Ri(a),function(p){iht(p,i,r,t)});else{var s=rht(i,r);Te(s.keys(),function(p){var m=s.get(p);_0e(m.oldSeries,m.newSeries,t)})}Te(r.updatedSeries,function(p){p[kx]&&(p[kx]=!1)})}for(var l=e.getSeries(),c=i.oldSeries=[],u=i.oldDataGroupIds=[],d=i.oldData=[],f=0;f<l.length;f++){var h=l[f].getData();h.count()<x0e&&(c.push(l[f]),u.push(l[f].get("dataGroupId")),d.push(h))}})}Ln([zi]);Ln([hBe]);Ln([Al,Hg,LC,qV,KV,EPe,$Pe,Oke,Kke,aB,uIe,xIe,Mce,tRe,Pce,kce,DRe,Bce,WRe,QRe,lVe,Kce]);Ln(Va);Ln(aTe);Ln(TV);Ln(rMe);Ln(tle);Ln(YMe);Ln(ule);Ln(gle);Ln(Zi);Ln(C6);Ln(Ele);Ln(Do);Ln(YLe);Ln($Le);Ln(DC);Ln(Nle);Ln(Ba);Ln(Mh);Ln(Rle);Ln(Vle);Ln(Dh);Ln(Hle);Ln(jle);Ln(lOe);Ln(_Oe);Ln(Yle);Ln(qC);Ln(Hoe);const aht={class:"chart-header"},oht={class:"chart-title"},sht={class:"chart-actions"},lht=["id"],cht={DEFAULT_ICON:Cu,ACTIVE_ICON:Eu,NAME_CN:"裂缝演变图",NAME_EN:"EvolutionChart",ORDER:2,PLATFORM:["pc","screen"]},uht={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},titleSize:{value:14,type:"number",label:"component.options.titleSize"},showLegend:{value:!0,type:"switch",label:"component.options.showLegend"},showDataZoom:{value:!0,type:"switch",label:"component.crack.showDataZoom"},lineWidth:{value:3,type:"number",label:"component.options.lineWidth"},showArea:{value:!0,type:"switch",label:"component.line.showArea"},linkChannel:{value:"crack",type:"select",label:"component.linkChannel",options:[{label:"裂缝监测",value:"crack"},{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"深部位移",value:"deepDisplacement"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},dht=[{name:"宽度累计变化量",fv:"",fvDeviceName:"",object_id:""}],fht=["name","fv","fvDeviceName","object_id"],hht=["mosaic","statistics","calculate"],pht={useAlias:!1,multiObject:!0,source:"mosaic"},mht=50,vht={DEFAULT:cht,OPTIONS:uht,DATA:dht,PARAMS:fht,SOURCE:hht,ITEMS:mht,COMMON:pht},ght=o.defineComponent(tt(Ne({},vht),{__name:"evolutionChart",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(n){const{t:e}=Ph({"component.crack.evolutionChart":"裂缝演变图","component.crack.exportImage":"导出图像","component.crack.widthCumulativeChangeUnit":"宽度累计变化量(mm)"}),t=n,r=o.ref(new Map),i=o.ref(new Map),a=o.ref([]);let s=0;class l extends Mr{constructor(){super(...arguments),this.deviceColors=["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4"],this.yAxisLabel="",this.currentObjectId=""}getCurrentObjectId(){return this.currentObjectId}setCurrentObjectId(x){this.currentObjectId=x}extractStyles(){const x=this.getOptionValue("linkChannel","crack"),_=this.getOptionValue("customChannel","");return tt(Ne({},super.extractStyles()),{showLegend:this.getOptionValue("showLegend",!0),showDataZoom:this.getOptionValue("showDataZoom",!0),lineWidth:this.getOptionValue("lineWidth",3),showArea:this.getOptionValue("showArea",!0),linkChannel:x==="custom"&&_?_:x})}setYAxisLabel(x){this.yAxisLabel=x}needsHistoryData(){return!1}onPreview(){return Ve(this,null,function*(){const{common:x,data:_}=this.props.conf,w=[];if(x.multiObject&&Array.isArray(_)){const S=new Set;for(const C of _){const E=yield this.resolveObjectId(C);!E||S.has(E)||(S.add(E),w.push(E))}}else{const S=yield this.resolveObjectId();S&&(this.currentObjectId=S,w.push(S))}w.length>0&&p({payload:{type:"filter",objectIds:w}})})}onLinkEvent(x){p(x)}getChartOption(){const{data:x,common:_}=this.props.conf,w=this.Style.value,S=a.value,C=S.length>1;let E;if(this.props.mode==="edit"){E=[];for(let M=30;M>=0;M--)E.push(mt().subtract(M,"day").format("MM-DD"))}else{const M=new Set;if(C)for(const D of S)x.forEach(k=>{const P=`${D}-${k.name||k.fv||"default"}`;(r.value.get(P)||[]).forEach(N=>M.add(N.time))});else x.forEach(D=>{const k=_.multiObject?this.resolveObjectId(D):this.currentObjectId||this.resolveObjectId();if(!k)return;const P=`${k}-${D.name||D.fv||"default"}`;(r.value.get(P)||[]).forEach(N=>M.add(N.time))});E=Array.from(M).sort()}const T=[];let A=0;if(C&&this.props.mode!=="edit")for(const M of S){const D=i.value.get(M)||M.slice(-6);for(const k of x){const P=this.deviceColors[A%this.deviceColors.length],I=`${M}-${k.name||k.fv||"default"}`,N=`${D}-${k.name||k.fv||"default"}`;T.push({name:N,type:"line",smooth:!0,showSymbol:!0,symbol:"circle",symbolSize:6,connectNulls:!0,lineStyle:{color:P,width:w.lineWidth},itemStyle:{color:P},areaStyle:w.showArea?{color:new xo(0,0,0,1,[{offset:0,color:`${P}4D`},{offset:1,color:`${P}0D`}])}:void 0,data:this.getEvolutionData(I,E)}),A++}}else x.filter(M=>(_.multiObject?this.resolveObjectId(M):this.currentObjectId||this.resolveObjectId())||this.props.mode==="edit").forEach((M,D)=>{const k=this.deviceColors[D%this.deviceColors.length],P=_.multiObject?this.resolveObjectId(M):this.currentObjectId||this.resolveObjectId(),I=`${P}-${M.name||M.fv||"default"}`,N=M.name||M.fv||"default",R=P&&i.value.get(P)||"",V=R?`${R}-${N}`:N;T.push({name:V,type:"line",smooth:!0,showSymbol:!0,symbol:"circle",symbolSize:6,connectNulls:!0,lineStyle:{color:k,width:w.lineWidth},itemStyle:{color:k},areaStyle:w.showArea?{color:new xo(0,0,0,1,[{offset:0,color:`${k}4D`},{offset:1,color:`${k}0D`}])}:void 0,data:this.getEvolutionData(I,E)})});return{tooltip:{trigger:"axis",axisPointer:{type:"cross"},formatter:M=>{let D=`<div style="font-weight: bold;">${M[0].axisValue}</div>`;return M.forEach(k=>{var P;D+=`<div>${k.marker} ${k.seriesName}: ${(P=k.value)!=null?P:"--"} mm</div>`}),D}},legend:{show:w.showLegend,type:"scroll",top:10,textStyle:{color:w.textColor}},grid:{top:60,left:60,right:40,bottom:w.showDataZoom?80:40},xAxis:{type:"category",data:E,axisLabel:{interval:"auto",rotate:15,fontSize:10,color:w.textColor}},yAxis:{type:"value",name:this.yAxisLabel||"宽度累计变化量(mm)",nameTextStyle:{color:w.textColor},axisLabel:{color:w.textColor},splitLine:{lineStyle:{type:"dashed",opacity:.5}}},dataZoom:w.showDataZoom?[{type:"inside"},{type:"slider",bottom:10,height:15}]:[],series:T}}generateTimeLabels(){return[]}getEvolutionData(x,_){if(this.props.mode==="edit"){const S=[];for(let T=30;T>=0;T--)S.push(mt().subtract(T,"day").format("MM-DD"));const C=.1,E=.02+Math.random()*.03;return Array.from({length:S.length},(T,A)=>{const M=C+E*A;return parseFloat(M.toFixed(2))})}return(r.value.get(x)||[]).map(S=>S.value)}setSocketData(x){if(!x)return;const _=x.object_id||x.objectId||"";if(_&&a.value.length>0&&!a.value.includes(_))return;super.setSocketData(x);const{data:w,common:S}=this.props.conf,C=mt().format("MM-DD HH:mm:ss"),E=a.value.length>1;w.forEach((A,M)=>{const D=E&&_?_:S.multiObject?this.resolveObjectId(A):this.currentObjectId||this.resolveObjectId();if(!D)return;if(A.fvDeviceName){const P=this.extractDataValue(x,A.fvDeviceName);P?i.value.set(D,String(P)):x.data&&x.data[A.fvDeviceName]&&i.value.set(D,String(x.data[A.fvDeviceName]))}let k=A.value;if((!k||k==="--")&&(k=this.extractDataValue(x,A.fv)),k!=null&&k!=="--"){const P=`${D}-${A.name||A.fv||"default"}`,I=r.value.get(P)||[],N=typeof k=="number"?k:parseFloat(k);if(isNaN(N))return;I.push({time:C,value:N}),I.length>200&&I.shift(),r.value.set(P,I)}});const T=this.getChartInstance();T&&T.setOption(this.getChartOption())}}const c=new l(t,"evolutionChart");c.setYAxisLabel(e("component.crack.widthCumulativeChangeUnit")),c.setupLifecycle();const u=c.getStyle(),d=c.getEchartId();let f=null,h=!1;const p=b=>Ve(null,null,function*(){var k;const{payload:x}=b;if(!x)return;x.dateRange&&Array.isArray(x.dateRange)&&x.dateRange.length===2&&(f={start_time:x.dateRange[0],end_time:x.dateRange[1]});const _=x.objectIds&&x.objectIds.length>0?x.objectIds:x.objectId||x.object_id?[x.objectId||x.object_id]:[];if(!_.length||t.mode!=="preview")return;h=!0;const w=++s;a.value=_,c.setCurrentObjectId([..._].sort().join(",")),r.value.clear(),i.value.clear();const S=(k=c.session)==null?void 0:k.value;if(!S){h=!1;return}const C=t.conf.id;S.componentRequests&&S.componentRequests.delete(C),typeof S.unsubscribeComponent=="function"&&S.unsubscribeComponent(C);const{data:E,common:T}=t.conf;f&&(T.historyTimeRange=f),t.conf.options||(t.conf.options={});const A=t.conf.options.points,M=Object.prototype.hasOwnProperty.call(t.conf.options,"points");(!A||Number(A)<24)&&(t.conf.options.points=24);for(const P of _){if(s!==w){h=!1;return}Array.isArray(E)&&E.forEach(N=>{N.object_id=P}),T.multiObject||(T.object_id=P);try{const N=yield Promise.resolve().then(()=>pd),V=yield new N.default().getHistoryData(t,"evolutionChart");if(s!==w){h=!1;return}const B=(V==null?void 0:V.history)||(Array.isArray(V)?V:[]);B.length>0&&E.forEach((F,G)=>{if(!F.fv)return;const U=`${P}-${F.name||F.fv||"default"}`,z=B[G];if(!Array.isArray(z)){r.value.set(U,[]);return}const j=[...z].sort((Y,re)=>new Date(Y.time||Y.datetime||"").getTime()-new Date(re.time||re.datetime||"").getTime()),W=[];j.forEach(Y=>{const re=Y.time||Y.datetime,Q=Y[F.fv];if(re&&Q!=null){const $=parseFloat(Q);isNaN($)||W.push({time:mt(re).format("MM-DD HH:mm:ss"),value:$})}F.fvDeviceName&&Y[F.fvDeviceName]&&i.value.set(P,String(Y[F.fvDeviceName]))}),r.value.set(U,W)})}catch(N){console.warn("[裂缝演变图] 历史数据获取失败:",N)}if(s!==w){h=!1;return}const I=c.getSource();c.subscribeBySource(I,P),E&&Array.isArray(E)&&E.forEach(N=>{const R=`${P}-${N.name||N.fv||"default"}`;r.value.has(R)||r.value.set(R,[])})}if(M?t.conf.options.points=A:delete t.conf.options.points,h=!1,s!==w)return;const D=c.getChartInstance();D&&D.setOption(c.getChartOption(),!0),S.registerComponent({id:C,request:null,onUpdate:(P,I)=>{s===w&&P==="realtime"&&c.setSocketData(I)}})}),m=o.computed(()=>({background:u.value.bgColor,color:u.value.textColor})),v=o.computed(()=>e("component.crack.evolutionChart")),g=o.computed(()=>e("component.crack.exportImage"));o.watch(()=>e("component.crack.widthCumulativeChangeUnit"),b=>{c.setYAxisLabel(b),c.init()});const y=()=>{const b=c.getChartInstance();if(!b)return;const x=document.createElement("a");x.href=b.getDataURL({type:"png",pixelRatio:2,backgroundColor:"#fff"}),x.download=`${e("component.crack.evolutionChart")}_${mt().format("YYYYMMDDHHmmss")}.png`,x.click()};return(b,x)=>{const _=Se.ElButton;return o.openBlock(),o.createElementBlock("div",{class:"mix-component crack-evolution",style:o.normalizeStyle(m.value)},[o.createElementVNode("div",aht,[o.createElementVNode("span",oht,"📊 "+o.toDisplayString(v.value),1),o.createElementVNode("div",sht,[o.createVNode(_,{size:"small",onClick:y},{default:o.withCtx(()=>[o.createTextVNode("💾 "+o.toDisplayString(g.value),1)]),_:1})])]),o.createElementVNode("div",{id:o.unref(d),class:"chart-container"},null,8,lht),o.renderSlot(b.$slots,"default",{},void 0,!0)],4)}}})),yht=Dt(ght,[["__scopeId","data-v-da6b39e5"]]),bht=Object.freeze(Object.defineProperty({__proto__:null,default:yht},Symbol.toStringTag,{value:"Module"})),xht={class:"filter-left-group"},_ht={class:"filter-item"},Sht={class:"filter-item"},wht=["onClick"],Cht={class:"item-label"},Eht={key:0,class:"item-region"},Aht={key:0,class:"monitor-dropdown-empty"},Tht={class:"filter-item time-range"},Mht={DEFAULT_ICON:Cu,ACTIVE_ICON:Eu,NAME_CN:"筛选条件栏",NAME_EN:"FilterBar",ORDER:4,PLATFORM:["pc","screen"]},Dht={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},borderColor:{value:"#e8ecef",type:"color",label:"边框颜色"},padding:{value:15,type:"number",label:"component.options.padding"},defaultQuickTime:{value:"today",type:"select",label:"默认快捷时间",options:[{label:"一天内",value:"today"},{label:"一周内",value:"week"},{label:"一个月内",value:"month"},{label:"一年内",value:"year"},{label:"无",value:""}]},linkChannel:{value:"crack",type:"select",label:"component.linkChannel",options:[{label:"裂缝监测",value:"crack"},{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"深部位移",value:"deepDisplacement"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},Lht=[{name:"CRACK4",fv:"",object_id:"",region:"中央区"},{name:"CRACK15",fv:"",object_id:"",region:"北帮"},{name:"CRACK26",fv:"",object_id:"",region:"南帮"},{name:"CRACK37",fv:"",object_id:"",region:"西帮"},{name:"CRACK48",fv:"",object_id:"",region:"东帮"}],Nht=["name","fv","object_id","region"],Oht=[],Pht={useAlias:!1,multiObject:!0,source:"mosaic"},kht=50,Iht={DEFAULT:Mht,OPTIONS:Dht,DATA:Lht,PARAMS:Nht,SOURCE:Oht,ITEMS:kht,COMMON:Pht},Rht=o.defineComponent(tt(Ne({},Iht),{__name:"filterBar",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(n){const e=n,t=o.ref(""),r=o.ref([]),i=o.ref(""),a=o.ref(""),s=o.ref("today"),l=o.ref(!1),c=o.ref(null),u=o.ref(null),d=o.ref({}),f=o.computed(()=>{const N=e.conf.data;return!N||!Array.isArray(N)?[]:N.filter(R=>R.name)}),h=o.computed(()=>{const N=new Set;return f.value.forEach(R=>{R.region&&N.add(R.region)}),Array.from(N)}),p=o.computed(()=>t.value?f.value.filter(N=>N.region===t.value):f.value),m=o.computed(()=>r.value.length===0?"":r.value.join("、")),v=o.computed(()=>{const N=p.value;return N.length>0&&N.every(R=>r.value.includes(R.name))}),g=o.computed(()=>{const N=p.value,R=N.filter(V=>r.value.includes(V.name)).length;return R>0&&R<N.length});class y extends Cn{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#ffffff"),textColor:this.getOptionValue("textColor","#333333"),borderColor:this.getOptionValue("borderColor","#e8ecef"),padding:this.getOptionValue("padding",15),linkChannel:this.getOptionValue("linkChannel","crack"),defaultQuickTime:this.getOptionValue("defaultQuickTime","today")}}init(){this.Style.value=this.extractStyles(),this.applyTheme();const R=this.Style.value.defaultQuickTime||"today";s.value=R,M(R),this.props.mode==="preview"&&f.value.length>0&&r.value.length===0&&(r.value=[f.value[0].name],P())}setSocketData(R){}}const b=new y(e,"filterBar");b.setupLifecycle();const x=b.getStyle(),_=o.computed(()=>({background:x.value.bgColor,color:x.value.textColor,padding:`${x.value.padding}px 25px`,borderBottom:`1px solid ${x.value.borderColor}`})),w=()=>{l.value=!l.value,l.value&&S()};function S(){if(!c.value)return;const N=c.value.getBoundingClientRect();d.value={position:"fixed",top:`${N.bottom+4}px`,left:`${N.left}px`,zIndex:"9999"}}const C=N=>{const R=c.value,V=u.value;R&&!R.contains(N.target)&&V&&!V.contains(N.target)&&(l.value=!1)};o.onMounted(()=>{document.addEventListener("click",C)}),o.onBeforeUnmount(()=>{document.removeEventListener("click",C)});const E=()=>{const N=p.value;if(v.value){const R=N.map(V=>V.name);r.value=r.value.filter(V=>!R.includes(V))}else{const R=new Set(r.value);N.forEach(V=>R.add(V.name)),r.value=Array.from(R)}},T=N=>{const R=r.value.indexOf(N.name);R>-1?r.value.splice(R,1):r.value.push(N.name)},A=()=>{};function M(N){const R=mt();switch(a.value=R.format("YYYY/MM/DD HH:mm"),N){case"today":i.value=R.subtract(1,"day").format("YYYY/MM/DD HH:mm");break;case"week":i.value=R.subtract(7,"day").format("YYYY/MM/DD HH:mm");break;case"month":i.value=R.subtract(1,"month").format("YYYY/MM/DD HH:mm");break;case"year":i.value=R.subtract(1,"year").format("YYYY/MM/DD HH:mm");break}}const D=N=>{s.value=N,M(N)},k=()=>{s.value=""},P=()=>{if(e.mode!=="preview")return;const N=f.value.filter(V=>r.value.includes(V.name)),R=[...new Set(N.map(V=>V.object_id).filter(Boolean))];b.publish({type:"filter",region:t.value,selectedMonitors:r.value,objectId:R.length===1?R[0]:R[0]||"",objectIds:R,timeRange:s.value||"custom",dateRange:[i.value,a.value]})},I=()=>{P()};return(N,R)=>{const V=Se.ElOption,B=Se.ElSelect,F=Se.ElIcon,G=Se.ElInput,U=Se.ElCheckbox,z=Se.ElButton,j=Se.ElDatePicker;return o.openBlock(),o.createElementBlock("div",{class:"mix-component crack-filter-bar",style:o.normalizeStyle(_.value)},[o.createElementVNode("div",xht,[o.createElementVNode("div",_ht,[R[8]||(R[8]=o.createElementVNode("span",{class:"filter-label"},"区域位置:",-1)),o.createVNode(B,{modelValue:t.value,"onUpdate:modelValue":R[0]||(R[0]=W=>t.value=W),placeholder:"全部区域",size:"default",style:{width:"120px"},onChange:A},{default:o.withCtx(()=>[o.createVNode(V,{label:"全部区域",value:""}),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(h.value,W=>(o.openBlock(),o.createBlock(V,{key:W,label:W,value:W},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),o.createElementVNode("div",Sht,[R[10]||(R[10]=o.createElementVNode("span",{class:"filter-label"},"监测点:",-1)),o.createElementVNode("div",{class:"monitor-select-wrapper",ref_key:"monitorWrapperRef",ref:c},[o.createVNode(G,{modelValue:m.value,"onUpdate:modelValue":R[1]||(R[1]=W=>m.value=W),placeholder:"输入编号(如11)或选择",size:"default",style:{width:"180px"},readonly:"",onClick:w,onFocus:w},{suffix:o.withCtx(()=>[o.createVNode(F,{class:o.normalizeClass(["dropdown-arrow",{"is-open":l.value}])},{default:o.withCtx(()=>[o.createVNode(o.unref(qt.ArrowDown))]),_:1},8,["class"])]),_:1},8,["modelValue"]),(o.openBlock(),o.createBlock(o.Teleport,{to:"body"},[o.withDirectives(o.createElementVNode("div",{class:"monitor-dropdown",style:o.normalizeStyle(d.value),ref_key:"dropdownRef",ref:u},[o.createElementVNode("div",{class:"monitor-dropdown-item",onClick:o.withModifiers(E,["stop"])},[o.createVNode(U,{"model-value":v.value,indeterminate:g.value,onChange:E},null,8,["model-value","indeterminate"]),R[9]||(R[9]=o.createElementVNode("span",{class:"item-label",style:{"font-weight":"bold"}},"全选",-1))]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(p.value,W=>(o.openBlock(),o.createElementBlock("div",{key:W.name,class:"monitor-dropdown-item",onClick:o.withModifiers(Y=>T(W),["stop"])},[o.createVNode(U,{"model-value":r.value.includes(W.name),onChange:Y=>T(W)},null,8,["model-value","onChange"]),o.createElementVNode("span",Cht,[o.createTextVNode(o.toDisplayString(W.name)+" ",1),W.region?(o.openBlock(),o.createElementBlock("span",Eht,"("+o.toDisplayString(W.region)+")",1)):o.createCommentVNode("",!0)])],8,wht))),128)),p.value.length===0?(o.openBlock(),o.createElementBlock("div",Aht," 暂无监测点,请在右侧数据面板配置 ")):o.createCommentVNode("",!0)],4),[[o.vShow,l.value]])]))],512)]),o.createVNode(z,{type:s.value==="today"?"primary":"default",size:"default",onClick:R[2]||(R[2]=W=>D("today"))},{default:o.withCtx(()=>[...R[11]||(R[11]=[o.createTextVNode("一天内",-1)])]),_:1},8,["type"]),o.createVNode(z,{type:s.value==="week"?"primary":"default",size:"default",onClick:R[3]||(R[3]=W=>D("week"))},{default:o.withCtx(()=>[...R[12]||(R[12]=[o.createTextVNode("一周内",-1)])]),_:1},8,["type"]),o.createVNode(z,{type:s.value==="month"?"primary":"default",size:"default",onClick:R[4]||(R[4]=W=>D("month"))},{default:o.withCtx(()=>[...R[13]||(R[13]=[o.createTextVNode("一个月内",-1)])]),_:1},8,["type"]),o.createVNode(z,{type:s.value==="year"?"primary":"default",size:"default",onClick:R[5]||(R[5]=W=>D("year"))},{default:o.withCtx(()=>[...R[14]||(R[14]=[o.createTextVNode("一年内",-1)])]),_:1},8,["type"]),o.createElementVNode("div",Tht,[R[15]||(R[15]=o.createElementVNode("span",{class:"filter-label"},"时间范围:",-1)),o.createVNode(j,{modelValue:i.value,"onUpdate:modelValue":R[6]||(R[6]=W=>i.value=W),type:"datetime",placeholder:"开始时间",size:"default",format:"YYYY/MM/DD HH:mm","value-format":"YYYY/MM/DD HH:mm",style:{width:"175px"},onChange:k},null,8,["modelValue"]),R[16]||(R[16]=o.createElementVNode("span",{class:"time-separator"},"至",-1)),o.createVNode(j,{modelValue:a.value,"onUpdate:modelValue":R[7]||(R[7]=W=>a.value=W),type:"datetime",placeholder:"结束时间",size:"default",format:"YYYY/MM/DD HH:mm","value-format":"YYYY/MM/DD HH:mm",style:{width:"175px"},onChange:k},null,8,["modelValue"])]),o.createVNode(z,{type:"primary",size:"default",onClick:I},{default:o.withCtx(()=>[...R[17]||(R[17]=[o.createTextVNode("查询",-1)])]),_:1})]),o.renderSlot(N.$slots,"default",{},void 0,!0)],4)}}})),Vht=Dt(Rht,[["__scopeId","data-v-476c8b69"]]),Bht=Object.freeze(Object.defineProperty({__proto__:null,default:Vht},Symbol.toStringTag,{value:"Module"})),Fht=["id"],zht={key:0,class:"timeline-player"},Uht={key:0},Hht={key:1},jht=["onClick"],Ght={class:"timeline-labels"},Yht={DEFAULT_ICON:Cu,ACTIVE_ICON:Eu,NAME_CN:"实时裂缝演变分布图",NAME_EN:"RealtimeEvolutionMap",ORDER:3,PLATFORM:["pc","screen"]},Wht={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},minPointSize:{value:6,type:"number",label:"最小散点大小",min:2,max:20},maxPointSize:{value:24,type:"number",label:"最大散点大小",min:10,max:60},baseColor:{value:"#ee6666",type:"color",label:"散点颜色"},playInterval:{value:2e3,type:"number",label:"播放间隔(ms)",min:500,max:1e4},linkChannel:{value:"crack",type:"select",label:"component.linkChannel",options:[{label:"裂缝监测",value:"crack"},{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},Xht=[{name:"裂缝写实1",fvX:"",fvY:"",fvWidth:"",fvDeviceName:"",object_id:""}],Zht=["name","fvX","fvY","fvWidth","fvDeviceName","object_id"],qht=["mosaic","statistics","calculate"],Kht={useAlias:!1,multiObject:!0,source:"mosaic"},Jht=200,Qht={DEFAULT:Yht,OPTIONS:Wht,DATA:Xht,PARAMS:Zht,SOURCE:qht,ITEMS:Jht,COMMON:Kht},$ht=o.defineComponent(tt(Ne({},Qht),{__name:"realtimeEvolutionMap",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(n){const e=n,t=o.ref([]),r=o.ref(0),i=o.ref(!1),a=o.ref(null);let s=null;const l=o.computed(()=>t.value.length<=1?0:r.value/(t.value.length-1)*100),c=S=>t.value.length<=1?50:S/(t.value.length-1)*100;class u extends Mr{constructor(){super(...arguments),this.currentObjectId=""}getCurrentObjectId(){return this.currentObjectId}setCurrentObjectId(C){this.currentObjectId=C}extractStyles(){return tt(Ne({},super.extractStyles()),{minPointSize:this.getOptionValue("minPointSize",6),maxPointSize:this.getOptionValue("maxPointSize",24),baseColor:this.getOptionValue("baseColor","#ee6666"),playInterval:this.getOptionValue("playInterval",2e3),linkChannel:this.getOptionValue("linkChannel","crack")})}onPreview(){return Ve(this,null,function*(){const{common:C,data:E}=this.props.conf,T=this.getSource();if(C.multiObject&&Array.isArray(E)){const A=new Set;for(const M of E){const D=yield this.resolveObjectId(M);!D||A.has(D)||(A.add(D),this.subscribeBySource(T,D,M.uid))}}else{const A=yield this.resolveObjectId();A&&(this.currentObjectId=A,this.subscribeBySource(T,A))}})}onLinkEvent(C){x(C)}generateTimeLabels(){return[]}initHistory(){return Ve(this,null,function*(){const{data:C}=this.props.conf||{};if(!Array.isArray(C)||!C.length)return[];const E=yield this.resolveObjectId();if(!E)return[];const T=24;return Promise.all(C.map(A=>new Promise(M=>{const D=[A.fvX,A.fvY,A.fvWidth,A.fvDeviceName].filter(Boolean);if(!D.length){M([]);return}Bt.platform(k=>{var P;M(((P=k==null?void 0:k.result)==null?void 0:P.data)||[])},{action:"get_mosaic_list",keys:D,object_id:E,page_index:1,page_size:T})})))})}setHistoryData(C){var M;if(!this.hasData()||!C||!Array.isArray(C))return;const E=((M=this.props.conf)==null?void 0:M.data)||[];if(!Array.isArray(E)||!E.length)return;const T=new Map;if(E.forEach((D,k)=>{const P=C[k];Array.isArray(P)&&P.forEach(I=>{const N=I.time||I.datetime;if(!N)return;const R=parseFloat(I[D.fvX]),V=parseFloat(I[D.fvY]),B=D.fvWidth?I[D.fvWidth]:0,F=parseFloat(B!=null?B:"0");if(isNaN(R)||isNaN(V))return;const G=String(N).split(".")[0];T.has(G)||T.set(G,{label:mt(G).isValid()?mt(G).format("HH:mm"):G,time:mt(G).isValid()?mt(G).format("MM-DD HH:mm:ss"):G,points:[]}),T.get(G).points.push({name:D.name||`crack_${k}`,x:R,y:V,width:isNaN(F)?0:F})})}),T.size===0)return;const A=Array.from(T.entries()).sort((D,k)=>new Date(D[0]).getTime()-new Date(k[0]).getTime()).map(D=>D[1]).slice(-50);t.value=A,r.value=A.length-1,b()}getChartOption(){const C=this.Style.value;return{backgroundColor:"transparent",tooltip:{trigger:"item",formatter:E=>{if(!E.value)return"";const[T,A,M,D,k]=E.value;return`<b>${M}</b><br/>时间: ${k}<br/>X: ${T}<br/>Y: ${A}<br/>宽度: ${D} mm`}},legend:{show:!0,top:6,right:20,textStyle:{color:C.textColor,fontSize:13,fontWeight:"bold"}},grid:{top:40,left:50,right:30,bottom:20},xAxis:{type:"value",name:"x",nameLocation:"end",nameTextStyle:{color:C.textColor,fontSize:13,fontWeight:"bold"},axisLine:{show:!0,lineStyle:{color:"#999"}},axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}},yAxis:{type:"value",name:"y",nameLocation:"end",nameTextStyle:{color:C.textColor,fontSize:13,fontWeight:"bold"},axisLine:{show:!0,lineStyle:{color:"#999"}},axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}},series:this.buildCumulativeSeries(C)}}buildCumulativeSeries(C){const E=r.value,T=t.value.slice(0,E+1);if(T.length===0)return[];const A=new Map;T.forEach((G,U)=>{G.points.forEach(z=>{A.has(z.name)||A.set(z.name,[]),A.get(z.name).push({x:z.x,y:z.y,width:z.width,time:G.label,timeIdx:U})})});let M=1/0,D=-1/0;A.forEach(G=>G.forEach(U=>{M=Math.min(M,U.width),D=Math.max(D,U.width)})),M===1/0&&(M=0,D=1);const k=D-M||1,P=C.baseColor||"#ee6666",I=C.minPointSize||6,N=C.maxPointSize||24,R=t.value.length||1,V=[P,"#5470c6","#91cc75","#fac858","#73c0de","#fc8452","#9a60b4"],B=[];let F=0;return A.forEach((G,U)=>{const z=V[F%V.length],j=G.map(Y=>[Y.x,Y.y,U,Y.width,Y.time]),W=Y=>{const Q=((Y[3]||0)-M)/k;return I+Q*(N-I)};B.push({name:U,type:"scatter",data:j,symbolSize:W,itemStyle:{color:Y=>{var $,ee;const Q=.2+.8*(((ee=($=G[Y.dataIndex])==null?void 0:$.timeIdx)!=null?ee:0)/(R-1||1));return this.hexToRgba(z,Q)}},emphasis:{itemStyle:{borderColor:"#333",borderWidth:2}}}),F++}),B}hexToRgba(C,E){const T=C.replace("#",""),A=parseInt(T.substring(0,2),16),M=parseInt(T.substring(2,4),16),D=parseInt(T.substring(4,6),16);return`rgba(${A},${M},${D},${E})`}setSocketData(C){super.setSocketData(C);const{data:E}=this.props.conf,T=mt().format("HH:mm"),A=mt().format("MM-DD HH:mm:ss"),M=[];E.forEach(D=>{const k=this.extractDataValue(C,D.fvX),P=this.extractDataValue(C,D.fvY),I=this.extractDataValue(C,D.fvWidth);if(k!=null&&P!=null){const N=parseFloat(k),R=parseFloat(P),V=I!=null?parseFloat(I):0;!isNaN(N)&&!isNaN(R)&&M.push({name:D.name||"default",x:N,y:R,width:isNaN(V)?0:V})}}),M.length>0&&(t.value.push({label:T,time:A,points:M}),t.value.length>50&&t.value.shift(),(i.value||r.value>=t.value.length-2)&&(r.value=t.value.length-1),b())}}const d=new u(e,"realtimeEvolutionMap");d.setupLifecycle();const f=d.getStyle(),h=d.getEchartId(),p=()=>{i.value?v():m()},m=()=>{t.value.length<=1||(i.value=!0,s=setInterval(()=>{r.value=r.value<t.value.length-1?r.value+1:0,b()},f.value.playInterval||2e3))},v=()=>{i.value=!1,s&&(clearInterval(s),s=null)},g=S=>{r.value=S,b()},y=S=>{if(!a.value||t.value.length<=1)return;const C=a.value.getBoundingClientRect(),E=(S.clientX-C.left)/C.width;g(Math.max(0,Math.min(Math.round(E*(t.value.length-1)),t.value.length-1)))},b=()=>{const S=d.getChartInstance();S&&S.setOption(d.getChartOption(),!0)};o.watch(r,()=>b());const x=S=>Ve(null,null,function*(){var k;const{payload:C}=S;if(!C)return;const E=C.objectIds&&C.objectIds.length>0?C.objectIds:C.objectId||C.object_id?[C.objectId||C.object_id]:[];if(!E.length||e.mode!=="preview")return;const T=E.sort().join(",");if(d.getCurrentObjectId()===T)return;d.setCurrentObjectId(T),t.value=[],r.value=0,v();const{data:A}=e.conf,M=(k=d.session)==null?void 0:k.value;if(!M)return;const D=e.conf.id;M.componentRequests&&M.componentRequests.delete(D);for(const P of E)Array.isArray(A)&&A.forEach(I=>{I.object_id=P}),d.subscribeBySource(d.getSource(),P);M.registerComponent({id:D,request:null,onUpdate:(P,I)=>{P==="realtime"&&d.setSocketData(I)}})}),_=()=>{var T;if(e.mode!=="edit")return;const S=((T=e.conf)==null?void 0:T.data)||[],C=mt(),E=[];for(let A=9;A>=0;A--){const M=C.subtract(A*160,"minute"),D=[];S.forEach((k,P)=>{const I=k.name||`裂缝写实${P+1}`,N=(10-A)/10,R=20+P*20+N*30+(Math.random()-.5)*8,V=15+P*10+N*20+(Math.random()-.5)*8,B=.1+N*2.5+Math.random()*.3;D.push({name:I,x:+R.toFixed(1),y:+V.toFixed(1),width:+B.toFixed(2)})}),E.push({label:M.format("HH:mm"),time:M.format("MM-DD HH:mm:ss"),points:D})}t.value=E,r.value=E.length-1},w=o.computed(()=>({background:f.value.bgColor,color:f.value.textColor}));return o.onMounted(()=>{e.mode==="edit"&&_()}),o.onUnmounted(()=>v()),o.watch(()=>e.conf,()=>{e.mode==="edit"&&_()},{deep:!0}),(S,C)=>(o.openBlock(),o.createElementBlock("div",{class:"mix-component crack-realtime-evolution",style:o.normalizeStyle(w.value)},[C[1]||(C[1]=o.createElementVNode("div",{class:"chart-header"},[o.createElementVNode("span",{class:"chart-title"},"▎实时裂缝演变分布图 (动态轨迹)")],-1)),o.createElementVNode("div",{id:o.unref(h),class:"chart-container"},null,8,Fht),t.value.length>0?(o.openBlock(),o.createElementBlock("div",zht,[o.createElementVNode("button",{class:"play-btn",onClick:p},[i.value?(o.openBlock(),o.createElementBlock("span",Uht,"⏸")):(o.openBlock(),o.createElementBlock("span",Hht,"▶"))]),o.createElementVNode("div",{class:"timeline-track",ref_key:"trackRef",ref:a,onClick:y},[C[0]||(C[0]=o.createElementVNode("div",{class:"track-line"},null,-1)),o.createElementVNode("div",{class:"track-progress",style:o.normalizeStyle({width:l.value+"%"})},null,4),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.value,(E,T)=>(o.openBlock(),o.createElementBlock("div",{key:T,class:o.normalizeClass(["track-dot",{active:T<=r.value,current:T===r.value}]),style:o.normalizeStyle({left:c(T)+"%"}),onClick:o.withModifiers(A=>g(T),["stop"])},null,14,jht))),128))],512),o.createElementVNode("div",Ght,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.value,(E,T)=>(o.openBlock(),o.createElementBlock("span",{key:T,class:o.normalizeClass(["time-label",{active:T<=r.value}]),style:o.normalizeStyle({left:c(T)+"%"})},o.toDisplayString(E.label),7))),128))])])):o.createCommentVNode("",!0),o.renderSlot(S.$slots,"default",{},void 0,!0)],4))}})),e2t=Dt($ht,[["__scopeId","data-v-c4a95d59"]]),t2t=Object.freeze(Object.defineProperty({__proto__:null,default:e2t},Symbol.toStringTag,{value:"Module"})),n2t={class:"chart-header"},r2t={class:"chart-title"},i2t={class:"chart-actions"},a2t=["onClick"],o2t={class:"item-label"},s2t=["id"],l2t={DEFAULT_ICON:Cu,ACTIVE_ICON:Eu,NAME_CN:"指标时序演变曲线",NAME_EN:"TimeSeriesCurve",ORDER:1,PLATFORM:["pc","screen"]},c2t={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},titleSize:{value:14,type:"number",label:"component.options.titleSize"},showLegend:{value:!0,type:"switch",label:"component.options.showLegend"},showDataZoom:{value:!0,type:"switch",label:"component.crack.showDataZoom"},lineWidth:{value:2.5,type:"number",label:"component.options.lineWidth"},linkChannel:{value:"crack",type:"select",label:"component.linkChannel",options:[{label:"裂缝监测",value:"crack"},{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"深部位移",value:"deepDisplacement"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},u2t=[{name:"宽度累计变化量",fv:"",object_id:"",device:"",color:"#5470c6"},{name:"宽度日变化量",fv:"",object_id:"",device:"",color:"#91cc75"},{name:"x方向加速度",fv:"",object_id:"",device:"",color:"#fac858"},{name:"y方向加速度",fv:"",object_id:"",device:"",color:"#ee6666"},{name:"z方向加速度",fv:"",object_id:"",device:"",color:"#73c0de"},{name:"x方向倾角",fv:"",object_id:"",device:"",color:"#3ba272"},{name:"y方向倾角",fv:"",object_id:"",device:"",color:"#fc8452"},{name:"z方向倾角",fv:"",object_id:"",device:"",color:"#9a60b4"}],d2t=["name","fv","object_id","device","color"],f2t=["mosaic","statistics","calculate"],h2t={useAlias:!1,multiObject:!1,hideMultiObject:!0,source:"mosaic"},p2t=50,m2t={DEFAULT:l2t,OPTIONS:c2t,DATA:u2t,PARAMS:d2t,SOURCE:f2t,ITEMS:p2t,COMMON:h2t},v2t=o.defineComponent(tt(Ne({},m2t),{__name:"timeSeriesCurve",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(n){var R,V;const{t:e}=Ph({"component.crack.timeSeriesCurve":"指标时序演变曲线"}),t=n,r=o.ref([]),i=o.computed(()=>t.conf.data||[]),a=o.ref([]);let s=0;class l extends Mr{constructor(){super(...arguments),this.deviceColors=["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4"],this.realTimeData=new Map,this.deviceNameMap=new Map,this.currentObjectId=""}getCurrentObjectId(){return this.currentObjectId}setCurrentObjectId(F){this.currentObjectId=F}extractStyles(){return tt(Ne({},super.extractStyles()),{showLegend:this.getOptionValue("showLegend",!0),showDataZoom:this.getOptionValue("showDataZoom",!0),lineWidth:this.getOptionValue("lineWidth",2.5),linkChannel:this.getOptionValue("linkChannel","crack")})}needsHistoryData(){return!1}onPreview(){return Ve(this,null,function*(){const{common:F,data:G}=this.props.conf,U=[];if(F.multiObject&&Array.isArray(G)){const z=new Set;for(const j of G){const W=yield this.resolveObjectId(j);!W||z.has(W)||(z.add(W),U.push(W))}}else{const z=yield this.resolveObjectId();z&&(this.currentObjectId=z,U.push(z))}U.length>0&&(a.value=U,yield m(U))})}onLinkEvent(F){p(F)}getChartOption(){const{data:F}=this.props.conf,G=this.Style.value,U=a.value,z=U.length>1,j=r.value.length===0?[]:F.filter(Q=>r.value.includes(Q.name));let W=[];if(this.props.mode==="edit")W=this.generateTimeLabels();else for(const[,Q]of this.realTimeData)Q.times.length>W.length&&(W=Q.times);const Y=[];let re=0;if(z&&this.props.mode!=="edit")for(const Q of U){const $=this.deviceNameMap.get(Q)||Q.slice(-6);for(const ee of j){if(!ee.fv)continue;const X=`${Q}:${ee.name}`,ne=`${$}-${ee.name}`,K=ee.color||this.deviceColors[re%this.deviceColors.length],Z=this.realTimeData.get(X);Y.push({name:ne,type:"line",smooth:!0,showSymbol:!1,lineStyle:{color:K,type:"solid",width:G.lineWidth},itemStyle:{color:K},data:Z?Z.values:[]}),re++}}else j.filter(Q=>Q.fv||this.props.mode==="edit").forEach((Q,$)=>{const ee=Q.device&&this.deviceNameMap.get(Q.device)||"",X=ee?`${ee}-${Q.name}`:Q.name,ne=Q.color||this.deviceColors[$%this.deviceColors.length];let K;if(this.props.mode!=="edit"){const Z=this.realTimeData.get(Q.name);K=Z?Z.values:[]}else K=this.generateSeriesData(Q,W);Y.push({name:X,type:"line",smooth:!0,showSymbol:!1,lineStyle:{color:ne,type:"solid",width:G.lineWidth},itemStyle:{color:ne},data:K})});return{tooltip:{trigger:"axis",axisPointer:{type:"cross"}},legend:{show:G.showLegend,type:"scroll",top:10,textStyle:{color:G.textColor}},grid:{top:60,left:60,right:40,bottom:G.showDataZoom?80:40},xAxis:{type:"category",data:W,axisLabel:{interval:"auto",rotate:15,fontSize:10,color:G.textColor}},yAxis:{type:"value",name:"值",nameTextStyle:{color:G.textColor},axisLabel:{color:G.textColor},splitLine:{lineStyle:{type:"dashed",opacity:.5}}},dataZoom:G.showDataZoom?[{type:"inside"},{type:"slider",bottom:10,height:15}]:[],series:Y}}generateTimeLabels(){const F=[];for(let G=24;G>=0;G--){const U=mt().subtract(G,"hour");F.push(U.format("MM-DD HH:mm"))}return F}generateSeriesData(F,G){const U=F.name,z=this.realTimeData.get(U);if(z&&z.times.length>0){const j=new Map;return z.times.forEach((W,Y)=>j.set(W,z.values[Y])),G.map(W=>{var Y;return(Y=j.get(W))!=null?Y:null})}if(this.props.mode==="edit"){const j=Math.random()*10+5;return Array.from({length:G.length},(W,Y)=>{const re=Math.sin(Y*.5)*.3;return parseFloat((j*(.8+re)).toFixed(2))})}return new Array(G.length).fill(null)}setSocketData(F){if(!F)return;const{data:G}=this.props.conf;if(!G||!Array.isArray(G))return;const U=F.object_id||F.objectId||"";if(U&&a.value.length>0&&!a.value.includes(U))return;const z=F.datetime?F.datetime.split(".")[0]:mt().format("MM-DD HH:mm:ss"),j=mt(z).format("MM-DD HH:mm:ss"),W=a.value.length>1;G.forEach(re=>{if(!re.fv)return;if(re.device){const $=this.extractDataValue(F,re.device);$!=null&&(W&&U?this.deviceNameMap.set(U,String($)):this.deviceNameMap.set(re.device,String($)))}const Q=this.extractDataValue(F,re.fv);if(Q!=null){const $=parseFloat(Q);if(!isNaN($)){const ee=W&&U?`${U}:${re.name}`:re.name;let X=this.realTimeData.get(ee);X||(X={times:[],values:[]},this.realTimeData.set(ee,X)),X.times.push(j),X.values.push($),X.times.length>200&&(X.times.shift(),X.values.shift()),re.value=$}}});const Y=this.getChartInstance();Y&&Y.setOption(this.getChartOption())}}const c=new l(t,"timeSeriesCurve");c.setupLifecycle();const u=c.getStyle(),d=c.getEchartId();let f=null,h=!1;const p=B=>{const{payload:F}=B;if(!F)return;F.dateRange&&Array.isArray(F.dateRange)&&F.dateRange.length===2&&(f={start_time:F.dateRange[0],end_time:F.dateRange[1]});const G=F.objectIds&&F.objectIds.length>0?F.objectIds:F.objectId||F.object_id?[F.objectId||F.object_id]:[];G.length>0&&(a.value=G,m(G))},m=B=>Ve(null,null,function*(){var $;if(!B.length||t.mode!=="preview")return;h=!0;const F=++s;c.setCurrentObjectId([...B].sort().join(",")),c.realTimeData.clear(),c.deviceNameMap.clear();const G=($=c.session)==null?void 0:$.value;if(!G){h=!1;return}const U=t.conf.id;G.componentRequests&&G.componentRequests.delete(U),typeof G.unsubscribeComponent=="function"&&G.unsubscribeComponent(U);const{data:z,common:j}=t.conf,W=B.length>1;f&&(j.historyTimeRange=f),t.conf.options||(t.conf.options={});const Y=t.conf.options.points,re=Object.prototype.hasOwnProperty.call(t.conf.options,"points");(!Y||Number(Y)<24)&&(t.conf.options.points=24);for(const ee of B){if(s!==F){h=!1;return}Array.isArray(z)&&z.forEach(ne=>{ne.object_id=ee}),j.multiObject||(j.object_id=ee);try{const ne=yield Promise.resolve().then(()=>pd),Z=yield new ne.default().getHistoryData(t,"timeSeriesCurve");if(s!==F){h=!1;return}Z&&Z.history&&Array.isArray(Z.history)&&z.forEach((me,be)=>{if(!me.fv)return;const ye=Z.history[be];if(!Array.isArray(ye))return;const ie=[...ye].sort((de,Ae)=>new Date(de.time||de.datetime||"").getTime()-new Date(Ae.time||Ae.datetime||"").getTime()),ue=W?`${ee}:${me.name}`:me.name,le=[],oe=[];ie.forEach(de=>{const Ae=de.time||de.datetime,pe=de[me.fv];if(Ae&&pe!=null){const se=parseFloat(pe);isNaN(se)||(le.push(mt(Ae).format("MM-DD HH:mm:ss")),oe.push(se))}W&&me.device&&de[me.device]&&c.deviceNameMap.set(ee,String(de[me.device]))}),le.length>0&&c.realTimeData.set(ue,{times:le,values:oe})})}catch(ne){console.warn("[指标时序演变曲线] 历史数据获取失败:",ne)}if(s!==F){h=!1;return}const X=c.getSource();c.subscribeBySource(X,ee)}if(re?t.conf.options.points=Y:delete t.conf.options.points,h=!1,s!==F)return;const Q=c.getChartInstance();Q&&Q.setOption(c.getChartOption(),!0),G.registerComponent({id:U,request:null,onUpdate:(ee,X)=>{s===F&&ee==="realtime"&&c.setSocketData(X)}})}),v=o.computed(()=>({background:u.value.bgColor,color:u.value.textColor})),g=o.computed(()=>"指标时序演变曲线"),y=o.computed(()=>"导出图像"),b=o.computed(()=>"选择监测指标");t.mode==="edit"&&i.value.length>0&&(r.value=[(R=i.value[0])==null?void 0:R.name,(V=i.value[1])==null?void 0:V.name].filter(Boolean));const x=o.ref(!1),_=o.ref(null),w=o.ref(null),S=o.ref({}),C=o.computed(()=>r.value.length===0?"":r.value.length===i.value.length?"全部":r.value.join("、")),E=o.computed(()=>{const B=i.value;return B.length>0&&B.every(F=>r.value.includes(F.name))}),T=o.computed(()=>{const B=i.value,F=B.filter(G=>r.value.includes(G.name)).length;return F>0&&F<B.length}),A=()=>{x.value=!x.value,x.value&&M()};function M(){if(!_.value)return;const B=_.value.getBoundingClientRect();S.value={position:"fixed",top:`${B.bottom+4}px`,left:`${B.left}px`,zIndex:"9999"}}const D=B=>{const F=_.value,G=w.value;F&&!F.contains(B.target)&&G&&!G.contains(B.target)&&(x.value=!1)};o.onMounted(()=>{document.addEventListener("click",D)}),o.onBeforeUnmount(()=>{document.removeEventListener("click",D)});const k=()=>{E.value?r.value=[]:r.value=i.value.map(B=>B.name),I()},P=B=>{const F=r.value.indexOf(B.name);F>-1?r.value.splice(F,1):r.value.push(B.name),I()},I=()=>{const B=c.getChartInstance();B&&B.setOption(c.getChartOption(),!0)};o.watch(()=>t.conf.data,B=>{var F,G;h||B&&B.length>0&&r.value.length===0&&(r.value=[(F=B[0])==null?void 0:F.name,(G=B[1])==null?void 0:G.name].filter(Boolean))},{immediate:!0});const N=()=>{const B=c.getChartInstance();if(!B)return;const F=document.createElement("a");F.href=B.getDataURL({type:"png",pixelRatio:2,backgroundColor:"#fff"}),F.download=`${e("component.crack.timeSeriesCurve")}_${mt().format("YYYYMMDDHHmmss")}.png`,F.click()};return(B,F)=>{const G=Se.ElIcon,U=Se.ElInput,z=Se.ElCheckbox,j=Se.ElButton;return o.openBlock(),o.createElementBlock("div",{class:"mix-component crack-time-series",style:o.normalizeStyle(v.value)},[o.createElementVNode("div",n2t,[o.createElementVNode("span",r2t,"📉 "+o.toDisplayString(g.value),1),o.createElementVNode("div",i2t,[o.createElementVNode("div",{class:"metrics-select-wrapper",ref_key:"metricsWrapperRef",ref:_},[o.createVNode(U,{"model-value":C.value,placeholder:b.value,size:"small",style:{width:"220px"},readonly:"",onClick:A},{suffix:o.withCtx(()=>[o.createVNode(G,{class:o.normalizeClass(["metrics-arrow",{"is-open":x.value}])},{default:o.withCtx(()=>[o.createVNode(o.unref(qt.ArrowDown))]),_:1},8,["class"])]),_:1},8,["model-value","placeholder"]),(o.openBlock(),o.createBlock(o.Teleport,{to:"body"},[o.withDirectives(o.createElementVNode("div",{class:"metrics-dropdown",style:o.normalizeStyle(S.value),ref_key:"metricsDropdownRef",ref:w},[o.createElementVNode("div",{class:"metrics-dropdown-item",onClick:o.withModifiers(k,["stop"])},[o.createVNode(z,{"model-value":E.value,indeterminate:T.value,onChange:k},null,8,["model-value","indeterminate"]),F[0]||(F[0]=o.createElementVNode("span",{class:"item-label",style:{"font-weight":"bold"}},"全部",-1))]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,W=>(o.openBlock(),o.createElementBlock("div",{key:W.name,class:"metrics-dropdown-item",onClick:o.withModifiers(Y=>P(W),["stop"])},[o.createVNode(z,{"model-value":r.value.includes(W.name),onChange:Y=>P(W)},null,8,["model-value","onChange"]),o.createElementVNode("span",o2t,o.toDisplayString(W.name),1)],8,a2t))),128))],4),[[o.vShow,x.value]])]))],512),o.createVNode(j,{size:"small",onClick:N},{default:o.withCtx(()=>[o.createTextVNode("💾 "+o.toDisplayString(y.value),1)]),_:1})])]),o.createElementVNode("div",{id:o.unref(d),class:"chart-container"},null,8,s2t),o.renderSlot(B.$slots,"default",{},void 0,!0)],4)}}})),g2t=Dt(v2t,[["__scopeId","data-v-6b410ecb"]]),y2t=Object.freeze(Object.defineProperty({__proto__:null,default:g2t},Symbol.toStringTag,{value:"Module"})),b2t={class:"chart-config-panel"},x2t={key:0,class:"config-section"},_2t={class:"section-header"},S2t={class:"section-title"},w2t={class:"granularity-switch"},C2t={class:"quick-range"},E2t=["onClick"],A2t={class:"date-inputs"},T2t={key:1,class:"config-section"},M2t={class:"section-header"},D2t={class:"section-title"},L2t={class:"time-list-actions"},N2t={class:"selected-count"},O2t={class:"time-list"},P2t={key:2,class:"config-section"},k2t={class:"section-title"},I2t={key:3,class:"config-section"},R2t={class:"section-title"},V2t={class:"direction-tabs"},B2t=["onClick"],F2t={key:4,class:"config-section"},z2t={class:"section-title"},U2t={class:"range-inputs"},H2t={key:5,class:"config-section"},j2t={class:"section-title"},G2t={class:"range-inputs"},Y2t={key:6,class:"config-section"},W2t={class:"section-title"},X2t={class:"function-options"},Z2t={key:7,class:"config-section"},q2t={DEFAULT_ICON:Kg,ACTIVE_ICON:Jg,NAME_CN:"图表配置面板",NAME_EN:"Chart Config Panel",ORDER:14,PLATFORM:["pc","screen"]},K2t={bindId:{value:"",type:"string",label:"component.deepDisplacement.bindId"},bgColor:{value:"#ffffff",type:"color",label:"component.options.bgColor"},textColor:{value:"#333333",type:"color",label:"component.options.textColor"},accentColor:{value:"#409eff",type:"color",label:"component.options.accentColor"},borderColor:{value:"#e5e5e5",type:"color",label:"component.options.borderColor"}},J2t=[{type:"timeRange",label:"时间段",targetId:""},{type:"timeList",label:"采集时间列表",targetId:""},{type:"direction",label:"位移方向",targetId:""},{type:"dispSwitch",label:"累计/相对切换",targetId:""}],Q2t=["type","label","targetId"],$2t=[],ept={useAlias:!1,multiObject:!1,source:""},tpt={DEFAULT:q2t,OPTIONS:K2t,DATA:J2t,PARAMS:Q2t,SOURCE:$2t,COMMON:ept},npt=o.defineComponent(tt(Ne({},tpt),{__name:"chartConfigPanel",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){o.useCssVars(G=>({v7cc69559:r.value.bgColor,v520c1f5c:r.value.borderColor,v07166a9e:r.value.textColor,v66046274:r.value.accentColor}));const e=ua(),t=n,r=o.computed(()=>{var U,z,j,W,Y;const{options:G}=t.conf||{};return{bindId:((U=G==null?void 0:G.bindId)==null?void 0:U.value)||"",bgColor:((z=G==null?void 0:G.bgColor)==null?void 0:z.value)||"#ffffff",textColor:((j=G==null?void 0:G.textColor)==null?void 0:j.value)||"#333333",accentColor:((W=G==null?void 0:G.accentColor)==null?void 0:W.value)||"#409eff",borderColor:((Y=G==null?void 0:G.borderColor)==null?void 0:Y.value)||"#e5e5e5"}}),i=o.computed(()=>{var G;return((G=t.conf)==null?void 0:G.data)||[]}),a=o.computed(()=>r.value.bindId||t.uid||""),s=o.ref("day"),l=o.ref("week"),c=o.ref(""),u=o.ref(""),d=[{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],f=o.ref([]),h=o.ref([]),p=o.ref(!0),m=o.ref("relative"),v=o.ref("total"),g=[{label:"合",value:"total"},{label:"X轴",value:"x"},{label:"Y轴",value:"y"}],y=o.ref(""),b=o.ref(""),x=o.ref(""),_=o.ref(""),w=o.ref(!0),S=o.ref(!0),C=()=>({granularity:s.value,startDate:c.value,endDate:u.value,selectedTimes:h.value,chartType:m.value,direction:v.value,dispRange:{min:parseFloat(y.value)||null,max:parseFloat(b.value)||null},relativeDispRange:{min:parseFloat(x.value)||null,max:parseFloat(_.value)||null},showDisp:w.value,showRelativeDisp:S.value}),E=()=>{const G=C(),U=i.value,z=a.value;z&&(console.log("[ConfigPanel] 广播配置 (uid):",z,G),e.publish("deepDisplacement","chartConfigPanel",{objectId:z,type:"config",fv:G})),U.forEach(j=>{const W=j.targetId;W&&(j.type==="dispSwitch"?W.split(",").map(re=>re.trim()).forEach((re,Q)=>{if(!re)return;const $=Q===0?w.value:S.value;e.publish("deepDisplacement","chartConfigPanel",{objectId:re,type:"bindConfig",fv:tt(Ne({},G),{visible:$})})}):e.publish("deepDisplacement","chartConfigPanel",{objectId:W,type:"bindConfig",fv:G}))})},T=G=>{s.value=G,E()},A=G=>{l.value=G;const U=mt();u.value=U.format("YYYY-MM-DD"),G==="week"?c.value=U.subtract(7,"day").format("YYYY-MM-DD"):G==="month"?c.value=U.subtract(30,"day").format("YYYY-MM-DD"):G==="quarter"&&(c.value=U.subtract(90,"day").format("YYYY-MM-DD")),D(),E()},M=()=>{c.value&&u.value&&(D(),E())},D=()=>{const G=mt(c.value),U=mt(u.value),z=[];let j=U;for(;j.isAfter(G)||j.isSame(G);)z.push(j.format("YYYY-MM-DD")),j=j.subtract(1,"day");f.value=z,h.value=[...z],p.value=!0},k=G=>{h.value=G?[...f.value]:[],E()},P=()=>{h.value=[],p.value=!1,E()},I=()=>{p.value=h.value.length===f.value.length,E()},N=()=>{E()},R=G=>{v.value=G,E()},V=()=>{E()},B=()=>{E()},F=()=>{const G=a.value;G&&e.publish("deepDisplacement",{objectId:G,type:"export",fv:{type:"chart",config:C()},source:"chartConfigPanel"})};return o.onMounted(()=>{A("week"),setTimeout(E,300)}),(G,U)=>{const z=Se.ElDatePicker,j=Se.ElCheckbox,W=Se.ElIcon,Y=Se.ElButton,re=Se.ElCheckboxGroup,Q=Se.ElRadio,$=Se.ElRadioGroup,ee=Se.ElInput;return o.openBlock(),o.createElementBlock("div",b2t,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,(X,ne)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:ne},[X.type==="timeRange"?(o.openBlock(),o.createElementBlock("div",x2t,[o.createElementVNode("div",_2t,[o.createElementVNode("span",S2t,o.toDisplayString(X.label||"时间段"),1),o.createElementVNode("div",w2t,[o.createElementVNode("span",{class:o.normalizeClass(["switch-item",{active:s.value==="day"}]),onClick:U[0]||(U[0]=K=>T("day"))},"日均",2),o.createElementVNode("span",{class:o.normalizeClass(["switch-item",{active:s.value==="hour"}]),onClick:U[1]||(U[1]=K=>T("hour"))},"小时",2)])]),o.createElementVNode("div",C2t,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(d,K=>o.createElementVNode("span",{key:K.value,class:o.normalizeClass(["range-item",{active:l.value===K.value}]),onClick:Z=>A(K.value)},o.toDisplayString(K.label),11,E2t)),64))]),o.createElementVNode("div",A2t,[o.createVNode(z,{modelValue:c.value,"onUpdate:modelValue":U[2]||(U[2]=K=>c.value=K),type:"date",placeholder:"开始日期",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",size:"small",class:"date-picker",onChange:M},null,8,["modelValue"]),o.createVNode(z,{modelValue:u.value,"onUpdate:modelValue":U[3]||(U[3]=K=>u.value=K),type:"date",placeholder:"结束日期",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",size:"small",class:"date-picker",onChange:M},null,8,["modelValue"])])])):X.type==="timeList"?(o.openBlock(),o.createElementBlock("div",T2t,[o.createElementVNode("div",M2t,[o.createElementVNode("span",D2t,o.toDisplayString(X.label||"采集时间列表"),1)]),o.createElementVNode("div",L2t,[o.createVNode(j,{modelValue:p.value,"onUpdate:modelValue":U[4]||(U[4]=K=>p.value=K),onChange:k},{default:o.withCtx(()=>[...U[13]||(U[13]=[o.createTextVNode("全选",-1)])]),_:1},8,["modelValue"]),o.createVNode(Y,{size:"small",text:"",onClick:P},{default:o.withCtx(()=>[o.createVNode(W,null,{default:o.withCtx(()=>[o.createVNode(o.unref(qt.Delete))]),_:1}),U[14]||(U[14]=o.createTextVNode("清空",-1))]),_:1}),o.createElementVNode("span",N2t,[U[15]||(U[15]=o.createTextVNode("已选 ",-1)),o.createElementVNode("em",null,o.toDisplayString(h.value.length),1),U[16]||(U[16]=o.createTextVNode(" 项",-1))])]),o.createElementVNode("div",O2t,[o.createVNode(re,{modelValue:h.value,"onUpdate:modelValue":U[5]||(U[5]=K=>h.value=K),onChange:I},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.value,K=>(o.openBlock(),o.createBlock(j,{key:K,value:K,class:"time-checkbox"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(K),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])])):X.type==="chartType"?(o.openBlock(),o.createElementBlock("div",P2t,[o.createElementVNode("div",k2t,o.toDisplayString(X.label||"图类型"),1),o.createVNode($,{modelValue:m.value,"onUpdate:modelValue":U[6]||(U[6]=K=>m.value=K),class:"chart-type-group",onChange:N},{default:o.withCtx(()=>[o.createVNode(Q,{value:"relative"},{default:o.withCtx(()=>[...U[17]||(U[17]=[o.createTextVNode("相对位移",-1)])]),_:1}),o.createVNode(Q,{value:"cluster"},{default:o.withCtx(()=>[...U[18]||(U[18]=[o.createTextVNode("滑面聚类判识",-1)])]),_:1}),o.createVNode(Q,{value:"borehole"},{default:o.withCtx(()=>[...U[19]||(U[19]=[o.createTextVNode("钻孔柱状图",-1)])]),_:1}),o.createVNode(Q,{value:"sensor"},{default:o.withCtx(()=>[...U[20]||(U[20]=[o.createTextVNode("传感器分布图",-1)])]),_:1})]),_:1},8,["modelValue"])])):X.type==="direction"?(o.openBlock(),o.createElementBlock("div",I2t,[o.createElementVNode("div",R2t,o.toDisplayString(X.label||"位移方向"),1),o.createElementVNode("div",V2t,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(g,K=>o.createElementVNode("span",{key:K.value,class:o.normalizeClass(["direction-item",{active:v.value===K.value}]),onClick:Z=>R(K.value)},o.toDisplayString(K.label),11,B2t)),64))])])):X.type==="dispRange"?(o.openBlock(),o.createElementBlock("div",F2t,[o.createElementVNode("div",z2t,o.toDisplayString(X.label||"累计位移区间"),1),o.createElementVNode("div",U2t,[o.createVNode(ee,{modelValue:y.value,"onUpdate:modelValue":U[7]||(U[7]=K=>y.value=K),size:"small",placeholder:"最小值",class:"range-input",onChange:V},null,8,["modelValue"]),U[21]||(U[21]=o.createElementVNode("span",{class:"range-sep"},"~",-1)),o.createVNode(ee,{modelValue:b.value,"onUpdate:modelValue":U[8]||(U[8]=K=>b.value=K),size:"small",placeholder:"最大值",class:"range-input",onChange:V},null,8,["modelValue"]),U[22]||(U[22]=o.createElementVNode("span",{class:"range-unit"},"mm",-1))])])):X.type==="relativeDispRange"?(o.openBlock(),o.createElementBlock("div",H2t,[o.createElementVNode("div",j2t,o.toDisplayString(X.label||"相对位移区间"),1),o.createElementVNode("div",G2t,[o.createVNode(ee,{modelValue:x.value,"onUpdate:modelValue":U[9]||(U[9]=K=>x.value=K),size:"small",placeholder:"最小值",class:"range-input",onChange:V},null,8,["modelValue"]),U[23]||(U[23]=o.createElementVNode("span",{class:"range-sep"},"~",-1)),o.createVNode(ee,{modelValue:_.value,"onUpdate:modelValue":U[10]||(U[10]=K=>_.value=K),size:"small",placeholder:"最大值",class:"range-input",onChange:V},null,8,["modelValue"]),U[24]||(U[24]=o.createElementVNode("span",{class:"range-unit"},"mm",-1))])])):X.type==="dispSwitch"?(o.openBlock(),o.createElementBlock("div",Y2t,[o.createElementVNode("div",W2t,o.toDisplayString(X.label||"功能"),1),o.createElementVNode("div",X2t,[o.createVNode(j,{modelValue:w.value,"onUpdate:modelValue":U[11]||(U[11]=K=>w.value=K),onChange:B},{default:o.withCtx(()=>[...U[25]||(U[25]=[o.createTextVNode("累计位移",-1)])]),_:1},8,["modelValue"]),o.createVNode(j,{modelValue:S.value,"onUpdate:modelValue":U[12]||(U[12]=K=>S.value=K),onChange:B},{default:o.withCtx(()=>[...U[26]||(U[26]=[o.createTextVNode("相对位移",-1)])]),_:1},8,["modelValue"])])])):X.type==="export"?(o.openBlock(),o.createElementBlock("div",Z2t,[o.createVNode(Y,{size:"small",onClick:F,class:"export-btn"},{default:o.withCtx(()=>[o.createVNode(W,null,{default:o.withCtx(()=>[o.createVNode(o.unref(qt.Upload))]),_:1}),o.createTextVNode(o.toDisplayString(X.label||"导出图"),1)]),_:2},1024)])):o.createCommentVNode("",!0)],64))),128)),o.renderSlot(G.$slots,"default",{},void 0,!0)])}}})),rpt=Dt(npt,[["__scopeId","data-v-8b0e3d68"]]),ipt=Object.freeze(Object.defineProperty({__proto__:null,default:rpt},Symbol.toStringTag,{value:"Module"})),S0e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e双X轴%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-261.000000,%20-190.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M261.943678,190.71954%20C262.269547,190.71954%20262.538858,190.961695%20262.58148,191.275875%20L262.587356,191.363218%20L262.587356,205.432184%20L276.656322,205.432184%20C276.982191,205.432184%20277.251502,205.674339%20277.294124,205.988519%20L277.3,206.075862%20C277.3,206.401731%20277.057845,206.671042%20276.743665,206.713664%20L276.656322,206.71954%20L261.943678,206.71954%20C261.617809,206.71954%20261.348498,206.477385%20261.305876,206.163205%20L261.3,206.075862%20L261.3,191.363218%20C261.3,191.007725%20261.588185,190.71954%20261.943678,190.71954%20Z%20M275.92069,201.754023%20C276.276183,201.754023%20276.564368,202.042208%20276.564368,202.397701%20C276.564368,202.72357%20276.322213,202.992881%20276.008033,203.035503%20L275.92069,203.041379%20L264.886207,203.041379%20C264.530713,203.041379%20264.242529,202.753195%20264.242529,202.397701%20C264.242529,202.071832%20264.484684,201.802521%20264.798864,201.759899%20L264.886207,201.754023%20L275.92069,201.754023%20Z%20M267.46092,195.133333%20C268.751499,195.133333%20269.611523,195.601341%20270.148649,196.415716%20C270.290746,196.631159%20270.503972,197.084502%20270.61416,197.394442%20L270.648966,197.50023%20L270.597245,197.301589%20C271.106782,198.211476%20271.67562,198.746129%20272.675247,198.80588%20L272.867816,198.811494%20C273.440204,198.811494%20273.863943,198.569358%20274.192294,198.142928%20C274.399952,197.873242%20274.521197,197.599759%20274.565219,197.442537%20C274.66107,197.100209%20275.016285,196.900401%20275.358612,196.996253%20C275.70094,197.092105%20275.900748,197.447319%20275.804896,197.789647%20C275.720183,198.092195%20275.53568,198.508367%20275.212304,198.928336%20C274.655597,199.651332%20273.872439,200.098851%20272.867816,200.098851%20C271.896559,200.098851%20271.089782,199.765036%20270.443714,199.18819%20C270.052821,198.839178%20269.807088,198.50782%20269.482578,197.814453%20L269.391954,197.616092%20L269.474019,197.930595%20L269.240518,197.436037%20L269.148886,197.255161%20C269.120289,197.201186%20269.094481,197.155581%20269.07399,197.124514%20C268.773906,196.669535%20268.316621,196.42069%20267.46092,196.42069%20C266.75894,196.42069%20266.259435,196.675539%20265.894017,197.11056%20C265.671566,197.375383%20265.54775,197.640703%20265.506046,197.789647%20C265.410194,198.131974%20265.05498,198.331783%20264.712652,198.235931%20C264.370324,198.140079%20264.170516,197.784865%20264.266368,197.442537%20C264.353399,197.131711%20264.551422,196.707376%20264.908282,196.282543%20C265.508381,195.568139%20266.3606,195.133333%20267.46092,195.133333%20Z%20M275.92069,192.926437%20C276.276183,192.926437%20276.564368,193.214621%20276.564368,193.570115%20C276.564368,193.895984%20276.322213,194.165295%20276.008033,194.207917%20L275.92069,194.213793%20L264.886207,194.213793%20C264.530713,194.213793%20264.242529,193.925609%20264.242529,193.570115%20C264.242529,193.244246%20264.484684,192.974935%20264.798864,192.932313%20L264.886207,192.926437%20L275.92069,192.926437%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",w0e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e双X轴%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-261.000000,%20-190.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M261.943678,190.71954%20C262.269547,190.71954%20262.538858,190.961695%20262.58148,191.275875%20L262.587356,191.363218%20L262.587356,205.432184%20L276.656322,205.432184%20C276.982191,205.432184%20277.251502,205.674339%20277.294124,205.988519%20L277.3,206.075862%20C277.3,206.401731%20277.057845,206.671042%20276.743665,206.713664%20L276.656322,206.71954%20L261.943678,206.71954%20C261.617809,206.71954%20261.348498,206.477385%20261.305876,206.163205%20L261.3,206.075862%20L261.3,191.363218%20C261.3,191.007725%20261.588185,190.71954%20261.943678,190.71954%20Z%20M275.92069,201.754023%20C276.276183,201.754023%20276.564368,202.042208%20276.564368,202.397701%20C276.564368,202.72357%20276.322213,202.992881%20276.008033,203.035503%20L275.92069,203.041379%20L264.886207,203.041379%20C264.530713,203.041379%20264.242529,202.753195%20264.242529,202.397701%20C264.242529,202.071832%20264.484684,201.802521%20264.798864,201.759899%20L264.886207,201.754023%20L275.92069,201.754023%20Z%20M267.46092,195.133333%20C268.751499,195.133333%20269.611523,195.601341%20270.148649,196.415716%20C270.290746,196.631159%20270.503972,197.084502%20270.61416,197.394442%20L270.648966,197.50023%20L270.597245,197.301589%20C271.106782,198.211476%20271.67562,198.746129%20272.675247,198.80588%20L272.867816,198.811494%20C273.440204,198.811494%20273.863943,198.569358%20274.192294,198.142928%20C274.399952,197.873242%20274.521197,197.599759%20274.565219,197.442537%20C274.66107,197.100209%20275.016285,196.900401%20275.358612,196.996253%20C275.70094,197.092105%20275.900748,197.447319%20275.804896,197.789647%20C275.720183,198.092195%20275.53568,198.508367%20275.212304,198.928336%20C274.655597,199.651332%20273.872439,200.098851%20272.867816,200.098851%20C271.896559,200.098851%20271.089782,199.765036%20270.443714,199.18819%20C270.052821,198.839178%20269.807088,198.50782%20269.482578,197.814453%20L269.391954,197.616092%20L269.474019,197.930595%20L269.240518,197.436037%20L269.148886,197.255161%20C269.120289,197.201186%20269.094481,197.155581%20269.07399,197.124514%20C268.773906,196.669535%20268.316621,196.42069%20267.46092,196.42069%20C266.75894,196.42069%20266.259435,196.675539%20265.894017,197.11056%20C265.671566,197.375383%20265.54775,197.640703%20265.506046,197.789647%20C265.410194,198.131974%20265.05498,198.331783%20264.712652,198.235931%20C264.370324,198.140079%20264.170516,197.784865%20264.266368,197.442537%20C264.353399,197.131711%20264.551422,196.707376%20264.908282,196.282543%20C265.508381,195.568139%20266.3606,195.133333%20267.46092,195.133333%20Z%20M275.92069,192.926437%20C276.276183,192.926437%20276.564368,193.214621%20276.564368,193.570115%20C276.564368,193.895984%20276.322213,194.165295%20276.008033,194.207917%20L275.92069,194.213793%20L264.886207,194.213793%20C264.530713,194.213793%20264.242529,193.925609%20264.242529,193.570115%20C264.242529,193.244246%20264.484684,192.974935%20264.798864,192.932313%20L264.886207,192.926437%20L275.92069,192.926437%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",apt={class:"deep-displacement-chart"},opt={class:"chart-header"},spt={class:"chart-title"},lpt={class:"chart-subtitle"},cpt={DEFAULT_ICON:S0e,ACTIVE_ICON:w0e,NAME_CN:"深部位移曲线图",NAME_EN:"Deep Displacement Chart",ORDER:13,PLATFORM:["pc","screen"]},upt={title:{value:"ZK10-深部位移01",type:"string",label:"component.deepDisplacement.title"},depth:{value:152,type:"number",label:"component.deepDisplacement.depth",min:1,max:500},bgColor:{value:"#ffffff",type:"color",label:"component.options.bgColor"},textColor:{value:"#333333",type:"color",label:"component.options.textColor"},points:{value:30,type:"number",label:"component.options.points",min:5,max:100}},dpt=[{configPanelId:"",name:"ZK10-X位移",object_id:"",points_fv:"points",fv:"disp_x",depth_fv:"depth",color:"#4a90d9"}],fpt=["configPanelId","name","object_id","points_fv","fv","depth_fv","color"],hpt=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],ppt={useAlias:!1,multiObject:!1,source:"mosaic"},mpt={DEFAULT:cpt,OPTIONS:upt,DATA:dpt,PARAMS:fpt,SOURCE:hpt,COMMON:ppt},vpt=o.defineComponent(tt(Ne({},mpt),{__name:"deepDisplacementChart",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){o.useCssVars(y=>({v93f7bd4a:o.unref(f).bgColor,v4701439a:o.unref(f).textColor}));const e=ua(),t=n,r=o.ref({selectedTimes:[],startDate:"",endDate:""}),i=o.ref(new Map),a=`dispChart_${Date.now()}_${Math.random().toString(36).slice(2,8)}`;let s=null,l=null;const c=["#4a90d9","#67c23a","#e6a23c","#f56c6c","#909399","#00bcd4","#9c27b0","#ff9800","#795548","#607d8b"];class u extends Cn{extractStyles(){var x,_,w,S,C;const{options:b}=this.props.conf;return{title:((x=b==null?void 0:b.title)==null?void 0:x.value)||"ZK10-深部位移01",depth:((_=b==null?void 0:b.depth)==null?void 0:_.value)||152,bgColor:((w=b==null?void 0:b.bgColor)==null?void 0:w.value)||"#ffffff",textColor:((S=b==null?void 0:b.textColor)==null?void 0:S.value)||"#333333",points:((C=b==null?void 0:b.points)==null?void 0:C.value)||30}}getDefaultData(){return[{configPanelId:"",name:"ZK10-X位移",object_id:"",points_fv:"points",fv:"disp_x",depth_fv:"depth",color:"#4a90d9"}]}getMockData(){var w;const b=((w=this.props.conf)==null?void 0:w.data)||this.getDefaultData(),x=["2026-01-15","2026-01-14","2026-01-13","2026-01-12","2026-01-11"],_=new Map;return b.forEach((S,C)=>{const E=new Map;x.forEach((T,A)=>{const M=[],D=(x.length-1-A)*5;for(let k=0;k<=30;k++){const P=-122-k,I=(10+D+C*3)*(1+k*.03);M.push({depth:P,value:I+Math.sin(k*.2+C)*2})}E.set(T,M)}),_.set(S.name,E)}),_}onPreview(){return Ve(this,null,function*(){const{data:b}=this.props.conf;b.some(_=>_.object_id&&_.fv)?(console.log("[DeepDisplacementChart] 检测到数据绑定,订阅真实数据"),yield Fi(u.prototype,this,"onPreview").call(this)):(console.log("[DeepDisplacementChart] 未配置数据源,使用模拟数据"),this.getMockData().forEach((w,S)=>i.value.set(S,w)),m())})}setHistoryData(b){var E,T;const{data:x,common:_}=this.props.conf;if(!x||x.length===0||!x.some(A=>A.object_id&&A.fv))return;const S=(_==null?void 0:_.source)||"mosaic";["statistics","calculate"].includes(S)&&(b=Mo(b,x));const C=Gs(b,this.props,"history");if(C){try{i.value.clear();const A=x.find(I=>I.object_id);if(!A)return;const M=x.indexOf(A),D=((E=C.history)==null?void 0:E[M])||[],k=A.points_fv||"points";D.length>0&&Array.isArray((T=D[0])==null?void 0:T[k])?x.forEach(I=>{if(!I.object_id||!I.fv)return;const N=new Map,R=new Map;D.forEach(V=>{const F=(V.time||V.datetime||"").split(" ")[0];R.has(F)||R.set(F,[]),(V[k]||[]).forEach(U=>{var z,j,W;R.get(F).push({depth:(j=(z=U[I.depth_fv])!=null?z:U.depth)!=null?j:0,value:(W=U[I.fv])!=null?W:0})})}),R.forEach((V,B)=>{const F=new Map;V.forEach(U=>F.set(U.depth,U.value));const G=Array.from(F.entries()).map(([U,z])=>({depth:U,value:z})).sort((U,z)=>z.depth-U.depth);N.set(B,G)}),i.value.set(I.name,N)}):x.forEach((I,N)=>{var F;if(!I.object_id||!I.fv)return;const R=((F=C.history)==null?void 0:F[N])||[],V=new Map,B=new Map;R.forEach(G=>{var j,W;const z=(G.time||G.datetime||"").split(" ")[0];B.has(z)||B.set(z,[]),B.get(z).push({depth:(j=G[I.depth_fv])!=null?j:0,value:(W=G[I.fv])!=null?W:0})}),B.forEach((G,U)=>{V.set(U,G)}),i.value.set(I.name,V)})}catch(A){console.error("[Chart] 解析历史数据失败:",A)}m()}}setSocketData(b){b&&console.log("[DeepDisplacementChart] 收到实时数据:",b)}}const d=new u(t,"deepDisplacementChart");(!t.conf.data||t.conf.data.length===0)&&(t.conf.data=d.getDefaultData()),d.setupLifecycle();const f=d.getStyle(),h=o.computed(()=>{const y=r.value.selectedTimes||[];if(y.length===0)return"";const b=[...y].sort(),x=b[0],_=b[b.length-1];return`${x} ~ ${_} [${y.length}天]`}),p=()=>{var A;const y=f.value,b=r.value,x=((A=t.conf)==null?void 0:A.data)||d.getDefaultData();let _=b.selectedTimes||[];if(i.value.size===0&&d.getMockData().forEach((D,k)=>i.value.set(k,D)),_.length===0&&i.value.size>0){const M=i.value.values().next().value;M&&(_=Array.from(M.keys()))}_=[..._].sort().reverse();const w=[];let S=[],C=0;x.forEach(M=>{const D=i.value.get(M.name);if(!D)return;const k=M.color||c[C%c.length];C++,_.forEach((P,I)=>{const N=D.get(P)||[];if(N.length===0)return;N.forEach(B=>S.push(B.depth));const R=1-I*.15,V=k;w.push({name:`${M.name} (${P})`,type:"line",data:N.map(B=>[B.value,B.depth]),smooth:!0,symbol:"circle",symbolSize:4,lineStyle:{color:V,width:2,opacity:R},itemStyle:{color:V,opacity:R}})})}),S.length===0&&(S=[-122,-152]);const E=Math.min(...S),T=Math.max(...S);return{grid:{left:60,right:140,top:30,bottom:60},tooltip:{trigger:"axis",backgroundColor:"rgba(255,255,255,0.95)",borderColor:"#e5e5e5",textStyle:{color:"#333",fontSize:12},formatter:M=>{if(!M||M.length===0)return"";let k=`<div style="padding:8px;max-width:280px;">
3947
3947
  <div style="font-weight:600;margin-bottom:6px;">深度: ${M[0].data[1]}m</div>`;return M.forEach(P=>{k+=`<div style="display:flex;align-items:center;margin:2px 0;">
3948
3948
  <span style="display:inline-block;width:8px;height:8px;border-radius:50%;background:${P.color};margin-right:6px;"></span>
3949
3949
  <span style="flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">${P.seriesName}: ${P.data[0].toFixed(3)} mm</span>
@@ -3985,7 +3985,7 @@ ${v}`},color:f.textColor,fontSize:f.textSize}}],yAxis:[{type:"value",nameGap:10,
3985
3985
  `)!==-1&&(e=e.replace(/\\\n/g,""));const r=e.split(`
3986
3986
  `);let i=[];for(let l=0,c=r.length;l<c;l++){const u=r[l].trimStart();if(u.length===0)continue;const d=u.charAt(0);if(d!=="#")if(d==="v"){const f=u.split(m$);switch(f[0]){case"v":t.vertices.push(parseFloat(f[1]),parseFloat(f[2]),parseFloat(f[3])),f.length>=7?(Db.setRGB(parseFloat(f[4]),parseFloat(f[5]),parseFloat(f[6]),co),t.colors.push(Db.r,Db.g,Db.b)):t.colors.push(void 0,void 0,void 0);break;case"vn":t.normals.push(parseFloat(f[1]),parseFloat(f[2]),parseFloat(f[3]));break;case"vt":t.uvs.push(parseFloat(f[1]),parseFloat(f[2]));break}}else if(d==="f"){const h=u.slice(1).trim().split(m$),p=[];for(let v=0,g=h.length;v<g;v++){const y=h[v];if(y.length>0){const b=y.split("/");p.push(b)}}const m=p[0];for(let v=1,g=p.length-1;v<g;v++){const y=p[v],b=p[v+1];t.addFace(m[0],y[0],b[0],m[1],y[1],b[1],m[2],y[2],b[2])}}else if(d==="l"){const f=u.substring(1).trim().split(" ");let h=[];const p=[];if(u.indexOf("/")===-1)h=f;else for(let m=0,v=f.length;m<v;m++){const g=f[m].split("/");g[0]!==""&&h.push(g[0]),g[1]!==""&&p.push(g[1])}t.addLineGeometry(h,p)}else if(d==="p"){const h=u.slice(1).trim().split(" ");t.addPointGeometry(h)}else if((i=$7t.exec(u))!==null){const f=(" "+i[0].slice(1).trim()).slice(1);t.startObject(f)}else if(tyt.test(u))t.object.startMaterial(u.substring(7).trim(),t.materialLibraries);else if(eyt.test(u))t.materialLibraries.push(u.substring(7).trim());else if(nyt.test(u))console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');else if(d==="s"){if(i=u.split(" "),i.length>1){const h=i[1].trim().toLowerCase();t.object.smooth=h!=="0"&&h!=="off"}else t.object.smooth=!0;const f=t.object.currentMaterial();f&&(f.smooth=t.object.smooth)}else{if(u==="\0")continue;console.warn('THREE.OBJLoader: Unexpected line: "'+u+'"')}}t.finalize();const a=new ya;if(a.materialLibraries=[].concat(t.materialLibraries),!(t.objects.length===1&&t.objects[0].geometry.vertices.length===0)===!0)for(let l=0,c=t.objects.length;l<c;l++){const u=t.objects[l],d=u.geometry,f=u.materials,h=d.type==="Line",p=d.type==="Points";let m=!1;if(d.vertices.length===0)continue;const v=new Lr;v.setAttribute("position",new wa(d.vertices,3)),d.normals.length>0&&v.setAttribute("normal",new wa(d.normals,3)),d.colors.length>0&&(m=!0,v.setAttribute("color",new wa(d.colors,3))),d.hasUVIndices===!0&&v.setAttribute("uv",new wa(d.uvs,2));const g=[];for(let b=0,x=f.length;b<x;b++){const _=f[b],w=_.name+"_"+_.smooth+"_"+m;let S=t.materials[w];if(this.materials!==null){if(S=this.materials.create(_.name),h&&S&&!(S instanceof Us)){const C=new Us;Jl.prototype.copy.call(C,S),C.color.copy(S.color),S=C}else if(p&&S&&!(S instanceof a0)){const C=new a0({size:10,sizeAttenuation:!1});Jl.prototype.copy.call(C,S),C.color.copy(S.color),C.map=S.map,S=C}}S===void 0&&(h?S=new Us:p?S=new a0({size:1,sizeAttenuation:!1}):S=new s1e,S.name=_.name,S.flatShading=!_.smooth,S.vertexColors=m,t.materials[w]=S),g.push(S)}let y;if(g.length>1){for(let b=0,x=f.length;b<x;b++){const _=f[b];v.addGroup(_.groupStart,_.groupCount,b)}h?y=new hl(v,g):p?y=new Tp(v,g):y=new wi(v,g)}else h?y=new hl(v,g[0]):p?y=new Tp(v,g[0]):y=new wi(v,g[0]);y.name=u.name,a.add(y)}else if(t.vertices.length>0){const l=new a0({size:1,sizeAttenuation:!1}),c=new Lr;c.setAttribute("position",new wa(t.vertices,3)),t.colors.length>0&&t.colors[0]!==void 0&&(c.setAttribute("color",new wa(t.colors,3)),l.vertexColors=!0);const u=new Tp(c,l);a.add(u)}return a}}function Ms(n){return(e,...t)=>ayt(n,e,t)}function e4(n,e){return Ms(V0e(n,e).get)}const{apply:ayt,getOwnPropertyDescriptor:V0e,getPrototypeOf:AF,ownKeys:oyt}=Reflect,{iterator:G6,toStringTag:syt}=Symbol,lyt=Object,{create:TF,defineProperty:cyt}=lyt,uyt=Array,dyt=uyt.prototype,B0e=dyt[G6],fyt=Ms(B0e),F0e=ArrayBuffer,hyt=F0e.prototype;e4(hyt,"byteLength");const b$=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:null;b$&&e4(b$.prototype,"byteLength");const z0e=AF(Uint8Array);z0e.from;const Ml=z0e.prototype;Ml[G6];Ms(Ml.keys);Ms(Ml.values);Ms(Ml.entries);Ms(Ml.set);Ms(Ml.reverse);Ms(Ml.fill);Ms(Ml.copyWithin);Ms(Ml.sort);Ms(Ml.slice);Ms(Ml.subarray);e4(Ml,"buffer");e4(Ml,"byteOffset");e4(Ml,"length");e4(Ml,syt);const pyt=Uint8Array,U0e=Uint16Array,MF=Uint32Array,myt=Float32Array,k8=AF([][G6]()),H0e=Ms(k8.next),vyt=Ms((function*(){})().next),gyt=AF(k8),yyt=DataView.prototype,byt=Ms(yyt.getUint16),DF=WeakMap,j0e=DF.prototype,G0e=Ms(j0e.get),xyt=Ms(j0e.set),Y0e=new DF,_yt=TF(null,{next:{value:function(){const e=G0e(Y0e,this);return H0e(e)}},[G6]:{value:function(){return this}}});function Syt(n){if(n[G6]===B0e&&k8.next===H0e)return n;const e=TF(_yt);return xyt(Y0e,e,fyt(n)),e}const wyt=new DF,Cyt=TF(gyt,{next:{value:function(){const e=G0e(wyt,this);return vyt(e)},writable:!0,configurable:!0}});for(const n of oyt(k8))n!=="next"&&cyt(Cyt,n,V0e(k8,n));const W0e=new F0e(4),Eyt=new myt(W0e),Ayt=new MF(W0e),L1=new U0e(512),N1=new pyt(512);for(let n=0;n<256;++n){const e=n-127;e<-24?(L1[n]=0,L1[n|256]=32768,N1[n]=24,N1[n|256]=24):e<-14?(L1[n]=1024>>-e-14,L1[n|256]=1024>>-e-14|32768,N1[n]=-e-1,N1[n|256]=-e-1):e<=15?(L1[n]=e+15<<10,L1[n|256]=e+15<<10|32768,N1[n]=13,N1[n|256]=13):e<128?(L1[n]=31744,L1[n|256]=64512,N1[n]=24,N1[n|256]=24):(L1[n]=31744,L1[n|256]=64512,N1[n]=13,N1[n|256]=13)}const LF=new MF(2048);for(let n=1;n<1024;++n){let e=n<<13,t=0;for(;(e&8388608)===0;)e<<=1,t-=8388608;e&=-8388609,t+=947912704,LF[n]=e|t}for(let n=1024;n<2048;++n)LF[n]=939524096+(n-1024<<13);const t4=new MF(64);for(let n=1;n<31;++n)t4[n]=n<<23;t4[31]=1199570944;t4[32]=2147483648;for(let n=33;n<63;++n)t4[n]=2147483648+(n-32<<23);t4[63]=3347054592;const X0e=new U0e(64);for(let n=1;n<64;++n)n!==32&&(X0e[n]=1024);function Tyt(n){const e=n>>10;return Ayt[0]=LF[X0e[e]+(n&1023)]+t4[e],Eyt[0]}function Z0e(n,e,...t){return Tyt(byt(n,e,...Syt(t)))}var Lb={exports:{}},x$;function Myt(){if(x$)return Lb.exports;x$=1;function n(e,t,r){const i=r&&r.debug||!1;i&&console.log("[xml-utils] getting "+t+" in "+e);const a=typeof e=="object"?e.outer:e,s=a.slice(0,a.indexOf(">")+1),l=['"',"'"];for(let c=0;c<l.length;c++){const u=l[c],d=t+"\\="+u+"([^"+u+"]*)"+u;i&&console.log("[xml-utils] pattern:",d);const h=new RegExp(d).exec(s);if(i&&console.log("[xml-utils] match:",h),h)return h[1]}}return Lb.exports=n,Lb.exports.default=n,Lb.exports}var Dyt=Myt();const iL=hd(Dyt);var Nb={exports:{}},Ob={exports:{}},Pb={exports:{}},_$;function Lyt(){if(_$)return Pb.exports;_$=1;function n(e,t,r){const a=new RegExp(t).exec(e.slice(r));return a?r+a.index:-1}return Pb.exports=n,Pb.exports.default=n,Pb.exports}var kb={exports:{}},S$;function Nyt(){if(S$)return kb.exports;S$=1;function n(e,t,r){const a=new RegExp(t).exec(e.slice(r));return a?r+a.index+a[0].length-1:-1}return kb.exports=n,kb.exports.default=n,kb.exports}var Ib={exports:{}},w$;function Oyt(){if(w$)return Ib.exports;w$=1;function n(e,t){const r=new RegExp(t,"g"),i=e.match(r);return i?i.length:0}return Ib.exports=n,Ib.exports.default=n,Ib.exports}var C$;function Pyt(){if(C$)return Ob.exports;C$=1;const n=Lyt(),e=Nyt(),t=Oyt();function r(i,a,s){const l=s&&s.debug||!1,c=!(s&&typeof s.nested===!1),u=s&&s.startIndex||0;l&&console.log("[xml-utils] starting findTagByName with",a," and ",s);const d=n(i,`<${a}[
3987
3987
  >/]`,u);if(l&&console.log("[xml-utils] start:",d),d===-1)return;const f=i.slice(d+a.length);let h=e(f,"^[^<]*[ /]>",0);const p=h!==-1&&f[h-1]==="/";if(l&&console.log("[xml-utils] selfClosing:",p),p===!1)if(c){let y=0,b=1,x=0;for(;(h=e(f,"[ /]"+a+">",y))!==-1;){const _=f.substring(y,h+1);if(b+=t(_,"<"+a+`[
3988
- >]`),x+=t(_,"</"+a+">"),x>=b)break;y=h}}else h=e(f,"[ /]"+a+">",0);const m=d+a.length+h+1;if(l&&console.log("[xml-utils] end:",m),m===-1)return;const v=i.slice(d,m);let g;return p?g=null:g=v.slice(v.indexOf(">")+1,v.lastIndexOf("<")),{inner:g,outer:v,start:d,end:m}}return Ob.exports=r,Ob.exports.default=r,Ob.exports}var E$;function kyt(){if(E$)return Nb.exports;E$=1;const n=Pyt();function e(t,r,i){const a=[],s=i&&i.debug||!1,l=i&&typeof i.nested=="boolean"?i.nested:!0;let c=i&&i.startIndex||0,u;for(;u=n(t,r,{debug:s,startIndex:c});)l?c=u.start+1+r.length:c=u.end,a.push(u);return s&&console.log("findTagsByName found",a.length,"tags"),a}return Nb.exports=e,Nb.exports.default=e,Nb.exports}var Iyt=kyt();const Ryt=hd(Iyt),N9={315:"Artist",258:"BitsPerSample",265:"CellLength",264:"CellWidth",320:"ColorMap",259:"Compression",33432:"Copyright",306:"DateTime",338:"ExtraSamples",266:"FillOrder",289:"FreeByteCounts",288:"FreeOffsets",291:"GrayResponseCurve",290:"GrayResponseUnit",316:"HostComputer",270:"ImageDescription",257:"ImageLength",256:"ImageWidth",271:"Make",281:"MaxSampleValue",280:"MinSampleValue",272:"Model",254:"NewSubfileType",274:"Orientation",262:"PhotometricInterpretation",284:"PlanarConfiguration",296:"ResolutionUnit",278:"RowsPerStrip",277:"SamplesPerPixel",305:"Software",279:"StripByteCounts",273:"StripOffsets",255:"SubfileType",263:"Threshholding",282:"XResolution",283:"YResolution",326:"BadFaxLines",327:"CleanFaxData",343:"ClipPath",328:"ConsecutiveBadFaxLines",433:"Decode",434:"DefaultImageColor",269:"DocumentName",336:"DotRange",321:"HalftoneHints",346:"Indexed",347:"JPEGTables",285:"PageName",297:"PageNumber",317:"Predictor",319:"PrimaryChromaticities",532:"ReferenceBlackWhite",339:"SampleFormat",340:"SMinSampleValue",341:"SMaxSampleValue",559:"StripRowCounts",330:"SubIFDs",292:"T4Options",293:"T6Options",325:"TileByteCounts",323:"TileLength",324:"TileOffsets",322:"TileWidth",301:"TransferFunction",318:"WhitePoint",344:"XClipPathUnits",286:"XPosition",529:"YCbCrCoefficients",531:"YCbCrPositioning",530:"YCbCrSubSampling",345:"YClipPathUnits",287:"YPosition",37378:"ApertureValue",40961:"ColorSpace",36868:"DateTimeDigitized",36867:"DateTimeOriginal",34665:"Exif IFD",36864:"ExifVersion",33434:"ExposureTime",41728:"FileSource",37385:"Flash",40960:"FlashpixVersion",33437:"FNumber",42016:"ImageUniqueID",37384:"LightSource",37500:"MakerNote",37377:"ShutterSpeedValue",37510:"UserComment",33723:"IPTC",34675:"ICC Profile",700:"XMP",42112:"GDAL_METADATA",42113:"GDAL_NODATA",34377:"Photoshop",33550:"ModelPixelScale",33922:"ModelTiepoint",34264:"ModelTransformation",34735:"GeoKeyDirectory",34736:"GeoDoubleParams",34737:"GeoAsciiParams",50674:"LercParameters"},I1={};for(const n in N9)N9.hasOwnProperty(n)&&(I1[N9[n]]=parseInt(n,10));const Vyt=[I1.BitsPerSample,I1.ExtraSamples,I1.SampleFormat,I1.StripByteCounts,I1.StripOffsets,I1.StripRowCounts,I1.TileByteCounts,I1.TileOffsets,I1.SubIFDs],aL={1:"BYTE",2:"ASCII",3:"SHORT",4:"LONG",5:"RATIONAL",6:"SBYTE",7:"UNDEFINED",8:"SSHORT",9:"SLONG",10:"SRATIONAL",11:"FLOAT",12:"DOUBLE",13:"IFD",16:"LONG8",17:"SLONG8",18:"IFD8"},Qr={};for(const n in aL)aL.hasOwnProperty(n)&&(Qr[aL[n]]=parseInt(n,10));const cc={WhiteIsZero:0,BlackIsZero:1,RGB:2,Palette:3,CMYK:5,YCbCr:6,CIELab:8},Byt={Unspecified:0},Fyt={AddCompression:1},zyt={None:0,Deflate:1,Zstandard:2},Uyt={1024:"GTModelTypeGeoKey",1025:"GTRasterTypeGeoKey",1026:"GTCitationGeoKey",2048:"GeographicTypeGeoKey",2049:"GeogCitationGeoKey",2050:"GeogGeodeticDatumGeoKey",2051:"GeogPrimeMeridianGeoKey",2052:"GeogLinearUnitsGeoKey",2053:"GeogLinearUnitSizeGeoKey",2054:"GeogAngularUnitsGeoKey",2055:"GeogAngularUnitSizeGeoKey",2056:"GeogEllipsoidGeoKey",2057:"GeogSemiMajorAxisGeoKey",2058:"GeogSemiMinorAxisGeoKey",2059:"GeogInvFlatteningGeoKey",2060:"GeogAzimuthUnitsGeoKey",2061:"GeogPrimeMeridianLongGeoKey",2062:"GeogTOWGS84GeoKey",3072:"ProjectedCSTypeGeoKey",3073:"PCSCitationGeoKey",3074:"ProjectionGeoKey",3075:"ProjCoordTransGeoKey",3076:"ProjLinearUnitsGeoKey",3077:"ProjLinearUnitSizeGeoKey",3078:"ProjStdParallel1GeoKey",3079:"ProjStdParallel2GeoKey",3080:"ProjNatOriginLongGeoKey",3081:"ProjNatOriginLatGeoKey",3082:"ProjFalseEastingGeoKey",3083:"ProjFalseNorthingGeoKey",3084:"ProjFalseOriginLongGeoKey",3085:"ProjFalseOriginLatGeoKey",3086:"ProjFalseOriginEastingGeoKey",3087:"ProjFalseOriginNorthingGeoKey",3088:"ProjCenterLongGeoKey",3089:"ProjCenterLatGeoKey",3090:"ProjCenterEastingGeoKey",3091:"ProjCenterNorthingGeoKey",3092:"ProjScaleAtNatOriginGeoKey",3093:"ProjScaleAtCenterGeoKey",3094:"ProjAzimuthAngleGeoKey",3095:"ProjStraightVertPoleLongGeoKey",3096:"ProjRectifiedGridAngleGeoKey",4096:"VerticalCSTypeGeoKey",4097:"VerticalCitationGeoKey",4098:"VerticalDatumGeoKey",4099:"VerticalUnitsGeoKey"};function Hyt(n,e){const{width:t,height:r}=n,i=new Uint8Array(t*r*3);let a;for(let s=0,l=0;s<n.length;++s,l+=3)a=256-n[s]/e*256,i[l]=a,i[l+1]=a,i[l+2]=a;return i}function jyt(n,e){const{width:t,height:r}=n,i=new Uint8Array(t*r*3);let a;for(let s=0,l=0;s<n.length;++s,l+=3)a=n[s]/e*256,i[l]=a,i[l+1]=a,i[l+2]=a;return i}function Gyt(n,e){const{width:t,height:r}=n,i=new Uint8Array(t*r*3),a=e.length/3,s=e.length/3*2;for(let l=0,c=0;l<n.length;++l,c+=3){const u=n[l];i[c]=e[u]/65536*256,i[c+1]=e[u+a]/65536*256,i[c+2]=e[u+s]/65536*256}return i}function Yyt(n){const{width:e,height:t}=n,r=new Uint8Array(e*t*3);for(let i=0,a=0;i<n.length;i+=4,a+=3){const s=n[i],l=n[i+1],c=n[i+2],u=n[i+3];r[a]=255*((255-s)/256)*((255-u)/256),r[a+1]=255*((255-l)/256)*((255-u)/256),r[a+2]=255*((255-c)/256)*((255-u)/256)}return r}function Wyt(n){const{width:e,height:t}=n,r=new Uint8ClampedArray(e*t*3);for(let i=0,a=0;i<n.length;i+=3,a+=3){const s=n[i],l=n[i+1],c=n[i+2];r[a]=s+1.402*(c-128),r[a+1]=s-.34414*(l-128)-.71414*(c-128),r[a+2]=s+1.772*(l-128)}return r}const Xyt=.95047,Zyt=1,qyt=1.08883;function Kyt(n){const{width:e,height:t}=n,r=new Uint8Array(e*t*3);for(let i=0,a=0;i<n.length;i+=3,a+=3){const s=n[i+0],l=n[i+1]<<24>>24,c=n[i+2]<<24>>24;let u=(s+16)/116,d=l/500+u,f=u-c/200,h,p,m;d=Xyt*(d*d*d>.008856?d*d*d:(d-16/116)/7.787),u=Zyt*(u*u*u>.008856?u*u*u:(u-16/116)/7.787),f=qyt*(f*f*f>.008856?f*f*f:(f-16/116)/7.787),h=d*3.2406+u*-1.5372+f*-.4986,p=d*-.9689+u*1.8758+f*.0415,m=d*.0557+u*-.204+f*1.057,h=h>.0031308?1.055*fi(h,1/2.4)-.055:12.92*h,p=p>.0031308?1.055*fi(p,1/2.4)-.055:12.92*p,m=m>.0031308?1.055*fi(m,1/2.4)-.055:12.92*m,r[a]=Math.max(0,Math.min(1,h))*255,r[a+1]=Math.max(0,Math.min(1,p))*255,r[a+2]=Math.max(0,Math.min(1,m))*255}return r}const q0e=new Map;function kh(n,e){Array.isArray(n)||(n=[n]),n.forEach(t=>q0e.set(t,e))}function Jyt(n){return Ve(this,null,function*(){const e=q0e.get(n.Compression);if(!e)throw new Error(`Unknown compression method identifier: ${n.Compression}`);const t=yield e();return new t(n)})}kh([void 0,1],()=>Promise.resolve().then(()=>require("./raw-B_Sr9gDq.cjs")).then(n=>n.default));kh(5,()=>Promise.resolve().then(()=>require("./lzw-DA3XeqBg.cjs")).then(n=>n.default));kh(6,()=>{throw new Error("old style JPEG compression is not supported.")});kh(7,()=>Promise.resolve().then(()=>require("./jpeg-DLeEjPcb.cjs")).then(n=>n.default));kh([8,32946],()=>Promise.resolve().then(()=>require("./deflate-De_6nNhk.cjs")).then(n=>n.default));kh(32773,()=>Promise.resolve().then(()=>require("./packbits-fIig5HbM.cjs")).then(n=>n.default));kh(34887,()=>Promise.resolve().then(()=>require("./lerc-BixNxCwe.cjs")).then(n=>Ve(null,null,function*(){return yield n.zstd.init(),n})).then(n=>n.default));kh(50001,()=>Promise.resolve().then(()=>require("./webimage-DQl5wElJ.cjs")).then(n=>n.default));function tE(n,e,t,r=1){return new(Object.getPrototypeOf(n)).constructor(e*t*r)}function Qyt(n,e,t,r,i){const a=e/r,s=t/i;return n.map(l=>{const c=tE(l,r,i);for(let u=0;u<i;++u){const d=Math.min(Math.round(s*u),t-1);for(let f=0;f<r;++f){const h=Math.min(Math.round(a*f),e-1),p=l[d*e+h];c[u*r+f]=p}}return c})}function Mv(n,e,t){return(1-t)*n+t*e}function $yt(n,e,t,r,i){const a=e/r,s=t/i;return n.map(l=>{const c=tE(l,r,i);for(let u=0;u<i;++u){const d=s*u,f=Math.floor(d),h=Math.min(Math.ceil(d),t-1);for(let p=0;p<r;++p){const m=a*p,v=m%1,g=Math.floor(m),y=Math.min(Math.ceil(m),e-1),b=l[f*e+g],x=l[f*e+y],_=l[h*e+g],w=l[h*e+y],S=Mv(Mv(b,x,v),Mv(_,w,v),d%1);c[u*r+p]=S}}return c})}function ebt(n,e,t,r,i,a="nearest"){switch(a.toLowerCase()){case"nearest":return Qyt(n,e,t,r,i);case"bilinear":case"linear":return $yt(n,e,t,r,i);default:throw new Error(`Unsupported resampling method: '${a}'`)}}function tbt(n,e,t,r,i,a){const s=e/r,l=t/i,c=tE(n,r,i,a);for(let u=0;u<i;++u){const d=Math.min(Math.round(l*u),t-1);for(let f=0;f<r;++f){const h=Math.min(Math.round(s*f),e-1);for(let p=0;p<a;++p){const m=n[d*e*a+h*a+p];c[u*r*a+f*a+p]=m}}}return c}function nbt(n,e,t,r,i,a){const s=e/r,l=t/i,c=tE(n,r,i,a);for(let u=0;u<i;++u){const d=l*u,f=Math.floor(d),h=Math.min(Math.ceil(d),t-1);for(let p=0;p<r;++p){const m=s*p,v=m%1,g=Math.floor(m),y=Math.min(Math.ceil(m),e-1);for(let b=0;b<a;++b){const x=n[f*e*a+g*a+b],_=n[f*e*a+y*a+b],w=n[h*e*a+g*a+b],S=n[h*e*a+y*a+b],C=Mv(Mv(x,_,v),Mv(w,S,v),d%1);c[u*r*a+p*a+b]=C}}}return c}function rbt(n,e,t,r,i,a,s="nearest"){switch(s.toLowerCase()){case"nearest":return tbt(n,e,t,r,i,a);case"bilinear":case"linear":return nbt(n,e,t,r,i,a);default:throw new Error(`Unsupported resampling method: '${s}'`)}}function ibt(n,e,t){let r=0;for(let i=e;i<t;++i)r+=n[i];return r}function kk(n,e,t){switch(n){case 1:if(e<=8)return new Uint8Array(t);if(e<=16)return new Uint16Array(t);if(e<=32)return new Uint32Array(t);break;case 2:if(e===8)return new Int8Array(t);if(e===16)return new Int16Array(t);if(e===32)return new Int32Array(t);break;case 3:switch(e){case 16:case 32:return new Float32Array(t);case 64:return new Float64Array(t)}break}throw Error("Unsupported data format/bitsPerSample")}function abt(n,e){return(n===1||n===2)&&e<=32&&e%8===0?!1:!(n===3&&(e===16||e===32||e===64))}function obt(n,e,t,r,i,a,s){const l=new DataView(n),c=t===2?s*a:s*a*r,u=t===2?1:r,d=kk(e,i,c),f=parseInt("1".repeat(i),2);if(e===1){let h;t===1?h=r*i:h=i;let p=a*h;(p&7)!==0&&(p=p+7&-8);for(let m=0;m<s;++m){const v=m*p;for(let g=0;g<a;++g){const y=v+g*u*i;for(let b=0;b<u;++b){const x=y+b*i,_=(m*a+g)*u+b,w=Math.floor(x/8),S=x%8;if(S+i<=8)d[_]=l.getUint8(w)>>8-i-S&f;else if(S+i<=16)d[_]=l.getUint16(w)>>16-i-S&f;else if(S+i<=24){const C=l.getUint16(w)<<8|l.getUint8(w+2);d[_]=C>>24-i-S&f}else d[_]=l.getUint32(w)>>32-i-S&f}}}}return d.buffer}class sbt{constructor(e,t,r,i,a,s){this.fileDirectory=e,this.geoKeys=t,this.dataView=r,this.littleEndian=i,this.tiles=a?{}:null,this.isTiled=!e.StripOffsets;const l=e.PlanarConfiguration;if(this.planarConfiguration=typeof l=="undefined"?1:l,this.planarConfiguration!==1&&this.planarConfiguration!==2)throw new Error("Invalid planar configuration.");this.source=s}getFileDirectory(){return this.fileDirectory}getGeoKeys(){return this.geoKeys}getWidth(){return this.fileDirectory.ImageWidth}getHeight(){return this.fileDirectory.ImageLength}getSamplesPerPixel(){return typeof this.fileDirectory.SamplesPerPixel!="undefined"?this.fileDirectory.SamplesPerPixel:1}getTileWidth(){return this.isTiled?this.fileDirectory.TileWidth:this.getWidth()}getTileHeight(){return this.isTiled?this.fileDirectory.TileLength:typeof this.fileDirectory.RowsPerStrip!="undefined"?Math.min(this.fileDirectory.RowsPerStrip,this.getHeight()):this.getHeight()}getBlockWidth(){return this.getTileWidth()}getBlockHeight(e){return this.isTiled||(e+1)*this.getTileHeight()<=this.getHeight()?this.getTileHeight():this.getHeight()-e*this.getTileHeight()}getBytesPerPixel(){let e=0;for(let t=0;t<this.fileDirectory.BitsPerSample.length;++t)e+=this.getSampleByteSize(t);return e}getSampleByteSize(e){if(e>=this.fileDirectory.BitsPerSample.length)throw new RangeError(`Sample index ${e} is out of range.`);return Math.ceil(this.fileDirectory.BitsPerSample[e]/8)}getReaderForSample(e){const t=this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[e]:1,r=this.fileDirectory.BitsPerSample[e];switch(t){case 1:if(r<=8)return DataView.prototype.getUint8;if(r<=16)return DataView.prototype.getUint16;if(r<=32)return DataView.prototype.getUint32;break;case 2:if(r<=8)return DataView.prototype.getInt8;if(r<=16)return DataView.prototype.getInt16;if(r<=32)return DataView.prototype.getInt32;break;case 3:switch(r){case 16:return function(i,a){return Z0e(this,i,a)};case 32:return DataView.prototype.getFloat32;case 64:return DataView.prototype.getFloat64}break}throw Error("Unsupported data format/bitsPerSample")}getSampleFormat(e=0){return this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[e]:1}getBitsPerSample(e=0){return this.fileDirectory.BitsPerSample[e]}getArrayForSample(e,t){const r=this.getSampleFormat(e),i=this.getBitsPerSample(e);return kk(r,i,t)}getTileOrStrip(e,t,r,i,a){return Ve(this,null,function*(){const s=Math.ceil(this.getWidth()/this.getTileWidth()),l=Math.ceil(this.getHeight()/this.getTileHeight());let c;const{tiles:u}=this;this.planarConfiguration===1?c=t*s+e:this.planarConfiguration===2&&(c=r*s*l+t*s+e);let d,f;this.isTiled?(d=this.fileDirectory.TileOffsets[c],f=this.fileDirectory.TileByteCounts[c]):(d=this.fileDirectory.StripOffsets[c],f=this.fileDirectory.StripByteCounts[c]);const h=(yield this.source.fetch([{offset:d,length:f}],a))[0];let p;return u===null||!u[c]?(p=Ve(this,null,function*(){let m=yield i.decode(this.fileDirectory,h);const v=this.getSampleFormat(),g=this.getBitsPerSample();return abt(v,g)&&(m=obt(m,v,this.planarConfiguration,this.getSamplesPerPixel(),g,this.getTileWidth(),this.getBlockHeight(t))),m}),u!==null&&(u[c]=p)):p=u[c],{x:e,y:t,sample:r,data:yield p}})}_readRaster(e,t,r,i,a,s,l,c,u){return Ve(this,null,function*(){const d=this.getTileWidth(),f=this.getTileHeight(),h=this.getWidth(),p=this.getHeight(),m=Math.max(Math.floor(e[0]/d),0),v=Math.min(Math.ceil(e[2]/d),Math.ceil(h/d)),g=Math.max(Math.floor(e[1]/f),0),y=Math.min(Math.ceil(e[3]/f),Math.ceil(p/f)),b=e[2]-e[0];let x=this.getBytesPerPixel();const _=[],w=[];for(let E=0;E<t.length;++E)this.planarConfiguration===1?_.push(ibt(this.fileDirectory.BitsPerSample,0,t[E])/8):_.push(0),w.push(this.getReaderForSample(t[E]));const S=[],{littleEndian:C}=this;for(let E=g;E<y;++E)for(let T=m;T<v;++T){let A;this.planarConfiguration===1&&(A=this.getTileOrStrip(T,E,0,a,u));for(let M=0;M<t.length;++M){const D=M,k=t[M];this.planarConfiguration===2&&(x=this.getSampleByteSize(k),A=this.getTileOrStrip(T,E,k,a,u));const P=A.then(I=>{const N=I.data,R=new DataView(N),V=this.getBlockHeight(I.y),B=I.y*f,F=I.x*d,G=B+V,U=(I.x+1)*d,z=w[D],j=Math.min(V,V-(G-e[3]),p-B),W=Math.min(d,d-(U-e[2]),h-F);for(let Y=Math.max(0,e[1]-B);Y<j;++Y)for(let re=Math.max(0,e[0]-F);re<W;++re){const Q=(Y*d+re)*x,$=z.call(R,Q+_[D],C);let ee;i?(ee=(Y+B-e[1])*b*t.length+(re+F-e[0])*t.length+D,r[ee]=$):(ee=(Y+B-e[1])*b+re+F-e[0],r[D][ee]=$)}});S.push(P)}}if(yield Promise.all(S),s&&e[2]-e[0]!==s||l&&e[3]-e[1]!==l){let E;return i?E=rbt(r,e[2]-e[0],e[3]-e[1],s,l,t.length,c):E=ebt(r,e[2]-e[0],e[3]-e[1],s,l,c),E.width=s,E.height=l,E}return r.width=s||e[2]-e[0],r.height=l||e[3]-e[1],r})}readRasters(){return Ve(this,arguments,function*({window:e,samples:t=[],interleave:r,pool:i=null,width:a,height:s,resampleMethod:l,fillValue:c,signal:u}={}){const d=e||[0,0,this.getWidth(),this.getHeight()];if(d[0]>d[2]||d[1]>d[3])throw new Error("Invalid subsets");const f=d[2]-d[0],h=d[3]-d[1],p=f*h,m=this.getSamplesPerPixel();if(!t||!t.length)for(let b=0;b<m;++b)t.push(b);else for(let b=0;b<t.length;++b)if(t[b]>=m)return Promise.reject(new RangeError(`Invalid sample index '${t[b]}'.`));let v;if(r){const b=this.fileDirectory.SampleFormat?Math.max.apply(null,this.fileDirectory.SampleFormat):1,x=Math.max.apply(null,this.fileDirectory.BitsPerSample);v=kk(b,x,p*t.length),c&&v.fill(c)}else{v=[];for(let b=0;b<t.length;++b){const x=this.getArrayForSample(t[b],p);Array.isArray(c)&&b<c.length?x.fill(c[b]):c&&!Array.isArray(c)&&x.fill(c),v.push(x)}}const g=i||(yield Jyt(this.fileDirectory));return yield this._readRaster(d,t,v,r,g,a,s,l,u)})}readRGB(){return Ve(this,arguments,function*({window:e,interleave:t=!0,pool:r=null,width:i,height:a,resampleMethod:s,enableAlpha:l=!1,signal:c}={}){const u=e||[0,0,this.getWidth(),this.getHeight()];if(u[0]>u[2]||u[1]>u[3])throw new Error("Invalid subsets");const d=this.fileDirectory.PhotometricInterpretation;if(d===cc.RGB){let y=[0,1,2];if(this.fileDirectory.ExtraSamples!==Byt.Unspecified&&l){y=[];for(let b=0;b<this.fileDirectory.BitsPerSample.length;b+=1)y.push(b)}return this.readRasters({window:e,interleave:t,samples:y,pool:r,width:i,height:a,resampleMethod:s,signal:c})}let f;switch(d){case cc.WhiteIsZero:case cc.BlackIsZero:case cc.Palette:f=[0];break;case cc.CMYK:f=[0,1,2,3];break;case cc.YCbCr:case cc.CIELab:f=[0,1,2];break;default:throw new Error("Invalid or unsupported photometric interpretation.")}const h={window:u,interleave:!0,samples:f,pool:r,width:i,height:a,resampleMethod:s,signal:c},{fileDirectory:p}=this,m=yield this.readRasters(h),v=fi(2,this.fileDirectory.BitsPerSample[0]);let g;switch(d){case cc.WhiteIsZero:g=Hyt(m,v);break;case cc.BlackIsZero:g=jyt(m,v);break;case cc.Palette:g=Gyt(m,p.ColorMap);break;case cc.CMYK:g=Yyt(m);break;case cc.YCbCr:g=Wyt(m);break;case cc.CIELab:g=Kyt(m);break;default:throw new Error("Unsupported photometric interpretation.")}if(!t){const y=new Uint8Array(g.length/3),b=new Uint8Array(g.length/3),x=new Uint8Array(g.length/3);for(let _=0,w=0;_<g.length;_+=3,++w)y[w]=g[_],b[w]=g[_+1],x[w]=g[_+2];g=[y,b,x]}return g.width=m.width,g.height=m.height,g})}getTiePoints(){if(!this.fileDirectory.ModelTiepoint)return[];const e=[];for(let t=0;t<this.fileDirectory.ModelTiepoint.length;t+=6)e.push({i:this.fileDirectory.ModelTiepoint[t],j:this.fileDirectory.ModelTiepoint[t+1],k:this.fileDirectory.ModelTiepoint[t+2],x:this.fileDirectory.ModelTiepoint[t+3],y:this.fileDirectory.ModelTiepoint[t+4],z:this.fileDirectory.ModelTiepoint[t+5]});return e}getGDALMetadata(e=null){const t={};if(!this.fileDirectory.GDAL_METADATA)return null;const r=this.fileDirectory.GDAL_METADATA;let i=Ryt(r,"Item");e===null?i=i.filter(a=>iL(a,"sample")===void 0):i=i.filter(a=>Number(iL(a,"sample"))===e);for(let a=0;a<i.length;++a){const s=i[a];t[iL(s,"name")]=s.inner}return t}getGDALNoData(){if(!this.fileDirectory.GDAL_NODATA)return null;const e=this.fileDirectory.GDAL_NODATA;return Number(e.substring(0,e.length-1))}getOrigin(){const e=this.fileDirectory.ModelTiepoint,t=this.fileDirectory.ModelTransformation;if(e&&e.length===6)return[e[3],e[4],e[5]];if(t)return[t[3],t[7],t[11]];throw new Error("The image does not have an affine transformation.")}getResolution(e=null){const t=this.fileDirectory.ModelPixelScale,r=this.fileDirectory.ModelTransformation;if(t)return[t[0],-t[1],t[2]];if(r)return r[1]===0&&r[4]===0?[r[0],-r[5],r[10]]:[Math.sqrt(r[0]*r[0]+r[4]*r[4]),-Math.sqrt(r[1]*r[1]+r[5]*r[5]),r[10]];if(e){const[i,a,s]=e.getResolution();return[i*e.getWidth()/this.getWidth(),a*e.getHeight()/this.getHeight(),s*e.getWidth()/this.getWidth()]}throw new Error("The image does not have an affine transformation.")}pixelIsArea(){return this.geoKeys.GTRasterTypeGeoKey===1}getBoundingBox(e=!1){const t=this.getHeight(),r=this.getWidth();if(this.fileDirectory.ModelTransformation&&!e){const[i,a,s,l,c,u,d,f]=this.fileDirectory.ModelTransformation,p=[[0,0],[0,t],[r,0],[r,t]].map(([g,y])=>[l+i*g+a*y,f+c*g+u*y]),m=p.map(g=>g[0]),v=p.map(g=>g[1]);return[Math.min(...m),Math.min(...v),Math.max(...m),Math.max(...v)]}else{const i=this.getOrigin(),a=this.getResolution(),s=i[0],l=i[1],c=s+a[0]*r,u=l+a[1]*t;return[Math.min(s,c),Math.min(l,u),Math.max(s,c),Math.max(l,u)]}}}class lbt{constructor(e){this._dataView=new DataView(e)}get buffer(){return this._dataView.buffer}getUint64(e,t){const r=this.getUint32(e,t),i=this.getUint32(e+4,t);let a;if(t){if(a=r+fi(2,32)*i,!Number.isSafeInteger(a))throw new Error(`${a} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return a}if(a=fi(2,32)*r+i,!Number.isSafeInteger(a))throw new Error(`${a} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return a}getInt64(e,t){let r=0;const i=(this._dataView.getUint8(e+(t?7:0))&128)>0;let a=!0;for(let s=0;s<8;s++){let l=this._dataView.getUint8(e+(t?s:7-s));i&&(a?l!==0&&(l=~(l-1)&255,a=!1):l=~l&255),r+=l*fi(256,s)}return i&&(r=-r),r}getUint8(e,t){return this._dataView.getUint8(e,t)}getInt8(e,t){return this._dataView.getInt8(e,t)}getUint16(e,t){return this._dataView.getUint16(e,t)}getInt16(e,t){return this._dataView.getInt16(e,t)}getUint32(e,t){return this._dataView.getUint32(e,t)}getInt32(e,t){return this._dataView.getInt32(e,t)}getFloat16(e,t){return Z0e(this._dataView,e,t)}getFloat32(e,t){return this._dataView.getFloat32(e,t)}getFloat64(e,t){return this._dataView.getFloat64(e,t)}}class cbt{constructor(e,t,r,i){this._dataView=new DataView(e),this._sliceOffset=t,this._littleEndian=r,this._bigTiff=i}get sliceOffset(){return this._sliceOffset}get sliceTop(){return this._sliceOffset+this.buffer.byteLength}get littleEndian(){return this._littleEndian}get bigTiff(){return this._bigTiff}get buffer(){return this._dataView.buffer}covers(e,t){return this.sliceOffset<=e&&this.sliceTop>=e+t}readUint8(e){return this._dataView.getUint8(e-this._sliceOffset,this._littleEndian)}readInt8(e){return this._dataView.getInt8(e-this._sliceOffset,this._littleEndian)}readUint16(e){return this._dataView.getUint16(e-this._sliceOffset,this._littleEndian)}readInt16(e){return this._dataView.getInt16(e-this._sliceOffset,this._littleEndian)}readUint32(e){return this._dataView.getUint32(e-this._sliceOffset,this._littleEndian)}readInt32(e){return this._dataView.getInt32(e-this._sliceOffset,this._littleEndian)}readFloat32(e){return this._dataView.getFloat32(e-this._sliceOffset,this._littleEndian)}readFloat64(e){return this._dataView.getFloat64(e-this._sliceOffset,this._littleEndian)}readUint64(e){const t=this.readUint32(e),r=this.readUint32(e+4);let i;if(this._littleEndian){if(i=t+fi(2,32)*r,!Number.isSafeInteger(i))throw new Error(`${i} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return i}if(i=fi(2,32)*t+r,!Number.isSafeInteger(i))throw new Error(`${i} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return i}readInt64(e){let t=0;const r=(this._dataView.getUint8(e+(this._littleEndian?7:0))&128)>0;let i=!0;for(let a=0;a<8;a++){let s=this._dataView.getUint8(e+(this._littleEndian?a:7-a));r&&(i?s!==0&&(s=~(s-1)&255,i=!1):s=~s&255),t+=s*fi(256,a)}return r&&(t=-t),t}readOffset(e){return this._bigTiff?this.readUint64(e):this.readUint32(e)}}class ubt{fetch(e,t=void 0){return Ve(this,null,function*(){return Promise.all(e.map(r=>this.fetchSlice(r,t)))})}fetchSlice(e){return Ve(this,null,function*(){throw new Error(`fetching of slice ${e} not possible, not implemented`)})}get fileSize(){return null}close(){return Ve(this,null,function*(){})}}class NF extends Error{constructor(e){super(e),Error.captureStackTrace&&Error.captureStackTrace(this,NF),this.name="AbortError"}}class dbt extends ubt{constructor(e){super(),this.arrayBuffer=e}fetchSlice(e,t){if(t&&t.aborted)throw new NF("Request aborted");return this.arrayBuffer.slice(e.offset,e.offset+e.length)}}function fbt(n){return new dbt(n)}function Ik(n){switch(n){case Qr.BYTE:case Qr.ASCII:case Qr.SBYTE:case Qr.UNDEFINED:return 1;case Qr.SHORT:case Qr.SSHORT:return 2;case Qr.LONG:case Qr.SLONG:case Qr.FLOAT:case Qr.IFD:return 4;case Qr.RATIONAL:case Qr.SRATIONAL:case Qr.DOUBLE:case Qr.LONG8:case Qr.SLONG8:case Qr.IFD8:return 8;default:throw new RangeError(`Invalid field type: ${n}`)}}function hbt(n){const e=n.GeoKeyDirectory;if(!e)return null;const t={};for(let r=4;r<=e[3]*4;r+=4){const i=Uyt[e[r]],a=e[r+1]?N9[e[r+1]]:null,s=e[r+2],l=e[r+3];let c=null;if(!a)c=l;else{if(c=n[a],typeof c=="undefined"||c===null)throw new Error(`Could not get value of geoKey '${i}'.`);typeof c=="string"?c=c.substring(l,l+s-1):c.subarray&&(c=c.subarray(l,l+s),s===1&&(c=c[0]))}t[i]=c}return t}function Dm(n,e,t,r){let i=null,a=null;const s=Ik(e);switch(e){case Qr.BYTE:case Qr.ASCII:case Qr.UNDEFINED:i=new Uint8Array(t),a=n.readUint8;break;case Qr.SBYTE:i=new Int8Array(t),a=n.readInt8;break;case Qr.SHORT:i=new Uint16Array(t),a=n.readUint16;break;case Qr.SSHORT:i=new Int16Array(t),a=n.readInt16;break;case Qr.LONG:case Qr.IFD:i=new Uint32Array(t),a=n.readUint32;break;case Qr.SLONG:i=new Int32Array(t),a=n.readInt32;break;case Qr.LONG8:case Qr.IFD8:i=new Array(t),a=n.readUint64;break;case Qr.SLONG8:i=new Array(t),a=n.readInt64;break;case Qr.RATIONAL:i=new Uint32Array(t*2),a=n.readUint32;break;case Qr.SRATIONAL:i=new Int32Array(t*2),a=n.readInt32;break;case Qr.FLOAT:i=new Float32Array(t),a=n.readFloat32;break;case Qr.DOUBLE:i=new Float64Array(t),a=n.readFloat64;break;default:throw new RangeError(`Invalid field type: ${e}`)}if(e===Qr.RATIONAL||e===Qr.SRATIONAL)for(let l=0;l<t;l+=2)i[l]=a.call(n,r+l*s),i[l+1]=a.call(n,r+(l*s+4));else for(let l=0;l<t;++l)i[l]=a.call(n,r+l*s);return e===Qr.ASCII?new TextDecoder("utf-8").decode(i):i}class pbt{constructor(e,t,r){this.fileDirectory=e,this.geoKeyDirectory=t,this.nextIFDByteOffset=r}}class Rb extends Error{constructor(e){super(`No image at index ${e}`),this.index=e}}class mbt{readRasters(){return Ve(this,arguments,function*(e={}){const{window:t,width:r,height:i}=e;let{resX:a,resY:s,bbox:l}=e;const c=yield this.getImage();let u=c;const d=yield this.getImageCount(),f=c.getBoundingBox();if(t&&l)throw new Error('Both "bbox" and "window" passed.');if(r||i){if(t){const[m,v]=c.getOrigin(),[g,y]=c.getResolution();l=[m+t[0]*g,v+t[1]*y,m+t[2]*g,v+t[3]*y]}const p=l||f;if(r){if(a)throw new Error("Both width and resX passed");a=(p[2]-p[0])/r}if(i){if(s)throw new Error("Both width and resY passed");s=(p[3]-p[1])/i}}if(a||s){const p=[];for(let m=0;m<d;++m){const v=yield this.getImage(m),{SubfileType:g,NewSubfileType:y}=v.fileDirectory;(m===0||g===2||y&1)&&p.push(v)}p.sort((m,v)=>m.getWidth()-v.getWidth());for(let m=0;m<p.length;++m){const v=p[m],g=(f[2]-f[0])/v.getWidth(),y=(f[3]-f[1])/v.getHeight();if(u=v,a&&a>g||s&&s>y)break}}let h=t;if(l){const[p,m]=c.getOrigin(),[v,g]=u.getResolution(c);h=[Math.round((l[0]-p)/v),Math.round((l[1]-m)/g),Math.round((l[2]-p)/v),Math.round((l[3]-m)/g)],h=[Math.min(h[0],h[2]),Math.min(h[1],h[3]),Math.max(h[0],h[2]),Math.max(h[1],h[3])]}return u.readRasters(tt(Ne({},e),{window:h}))})}}class OF extends mbt{constructor(e,t,r,i,a={}){super(),this.source=e,this.littleEndian=t,this.bigTiff=r,this.firstIFDOffset=i,this.cache=a.cache||!1,this.ifdRequests=[],this.ghostValues=null}getSlice(e,t){return Ve(this,null,function*(){const r=this.bigTiff?4048:1024;return new cbt((yield this.source.fetch([{offset:e,length:typeof t!="undefined"?t:r}]))[0],e,this.littleEndian,this.bigTiff)})}parseFileDirectoryAt(e){return Ve(this,null,function*(){const t=this.bigTiff?20:12,r=this.bigTiff?8:2;let i=yield this.getSlice(e);const a=this.bigTiff?i.readUint64(e):i.readUint16(e),s=a*t+(this.bigTiff?16:6);i.covers(e,s)||(i=yield this.getSlice(e,s));const l={};let c=e+(this.bigTiff?8:2);for(let f=0;f<a;c+=t,++f){const h=i.readUint16(c),p=i.readUint16(c+2),m=this.bigTiff?i.readUint64(c+4):i.readUint32(c+4);let v,g;const y=Ik(p),b=c+(this.bigTiff?12:8);if(y*m<=(this.bigTiff?8:4))v=Dm(i,p,m,b);else{const x=i.readOffset(b),_=Ik(p)*m;if(i.covers(x,_))v=Dm(i,p,m,x);else{const w=yield this.getSlice(x,_);v=Dm(w,p,m,x)}}m===1&&Vyt.indexOf(h)===-1&&!(p===Qr.RATIONAL||p===Qr.SRATIONAL)?g=v[0]:g=v,l[N9[h]]=g}const u=hbt(l),d=i.readOffset(e+r+t*a);return new pbt(l,u,d)})}requestIFD(e){return Ve(this,null,function*(){if(this.ifdRequests[e])return this.ifdRequests[e];if(e===0)return this.ifdRequests[e]=this.parseFileDirectoryAt(this.firstIFDOffset),this.ifdRequests[e];if(!this.ifdRequests[e-1])try{this.ifdRequests[e-1]=this.requestIFD(e-1)}catch(t){throw t instanceof Rb?new Rb(e):t}return this.ifdRequests[e]=Ve(this,null,function*(){const t=yield this.ifdRequests[e-1];if(t.nextIFDByteOffset===0)throw new Rb(e);return this.parseFileDirectoryAt(t.nextIFDByteOffset)}),this.ifdRequests[e]})}getImage(e=0){return Ve(this,null,function*(){const t=yield this.requestIFD(e);return new sbt(t.fileDirectory,t.geoKeyDirectory,this.dataView,this.littleEndian,this.cache,this.source)})}getImageCount(){return Ve(this,null,function*(){let e=0,t=!0;for(;t;)try{yield this.requestIFD(e),++e}catch(r){if(r instanceof Rb)t=!1;else throw r}return e})}getGhostValues(){return Ve(this,null,function*(){const e=this.bigTiff?16:8;if(this.ghostValues)return this.ghostValues;const t="GDAL_STRUCTURAL_METADATA_SIZE=",r=t.length+100;let i=yield this.getSlice(e,r);if(t===Dm(i,Qr.ASCII,t.length,e)){const s=Dm(i,Qr.ASCII,r,e).split(`
3988
+ >]`),x+=t(_,"</"+a+">"),x>=b)break;y=h}}else h=e(f,"[ /]"+a+">",0);const m=d+a.length+h+1;if(l&&console.log("[xml-utils] end:",m),m===-1)return;const v=i.slice(d,m);let g;return p?g=null:g=v.slice(v.indexOf(">")+1,v.lastIndexOf("<")),{inner:g,outer:v,start:d,end:m}}return Ob.exports=r,Ob.exports.default=r,Ob.exports}var E$;function kyt(){if(E$)return Nb.exports;E$=1;const n=Pyt();function e(t,r,i){const a=[],s=i&&i.debug||!1,l=i&&typeof i.nested=="boolean"?i.nested:!0;let c=i&&i.startIndex||0,u;for(;u=n(t,r,{debug:s,startIndex:c});)l?c=u.start+1+r.length:c=u.end,a.push(u);return s&&console.log("findTagsByName found",a.length,"tags"),a}return Nb.exports=e,Nb.exports.default=e,Nb.exports}var Iyt=kyt();const Ryt=hd(Iyt),N9={315:"Artist",258:"BitsPerSample",265:"CellLength",264:"CellWidth",320:"ColorMap",259:"Compression",33432:"Copyright",306:"DateTime",338:"ExtraSamples",266:"FillOrder",289:"FreeByteCounts",288:"FreeOffsets",291:"GrayResponseCurve",290:"GrayResponseUnit",316:"HostComputer",270:"ImageDescription",257:"ImageLength",256:"ImageWidth",271:"Make",281:"MaxSampleValue",280:"MinSampleValue",272:"Model",254:"NewSubfileType",274:"Orientation",262:"PhotometricInterpretation",284:"PlanarConfiguration",296:"ResolutionUnit",278:"RowsPerStrip",277:"SamplesPerPixel",305:"Software",279:"StripByteCounts",273:"StripOffsets",255:"SubfileType",263:"Threshholding",282:"XResolution",283:"YResolution",326:"BadFaxLines",327:"CleanFaxData",343:"ClipPath",328:"ConsecutiveBadFaxLines",433:"Decode",434:"DefaultImageColor",269:"DocumentName",336:"DotRange",321:"HalftoneHints",346:"Indexed",347:"JPEGTables",285:"PageName",297:"PageNumber",317:"Predictor",319:"PrimaryChromaticities",532:"ReferenceBlackWhite",339:"SampleFormat",340:"SMinSampleValue",341:"SMaxSampleValue",559:"StripRowCounts",330:"SubIFDs",292:"T4Options",293:"T6Options",325:"TileByteCounts",323:"TileLength",324:"TileOffsets",322:"TileWidth",301:"TransferFunction",318:"WhitePoint",344:"XClipPathUnits",286:"XPosition",529:"YCbCrCoefficients",531:"YCbCrPositioning",530:"YCbCrSubSampling",345:"YClipPathUnits",287:"YPosition",37378:"ApertureValue",40961:"ColorSpace",36868:"DateTimeDigitized",36867:"DateTimeOriginal",34665:"Exif IFD",36864:"ExifVersion",33434:"ExposureTime",41728:"FileSource",37385:"Flash",40960:"FlashpixVersion",33437:"FNumber",42016:"ImageUniqueID",37384:"LightSource",37500:"MakerNote",37377:"ShutterSpeedValue",37510:"UserComment",33723:"IPTC",34675:"ICC Profile",700:"XMP",42112:"GDAL_METADATA",42113:"GDAL_NODATA",34377:"Photoshop",33550:"ModelPixelScale",33922:"ModelTiepoint",34264:"ModelTransformation",34735:"GeoKeyDirectory",34736:"GeoDoubleParams",34737:"GeoAsciiParams",50674:"LercParameters"},I1={};for(const n in N9)N9.hasOwnProperty(n)&&(I1[N9[n]]=parseInt(n,10));const Vyt=[I1.BitsPerSample,I1.ExtraSamples,I1.SampleFormat,I1.StripByteCounts,I1.StripOffsets,I1.StripRowCounts,I1.TileByteCounts,I1.TileOffsets,I1.SubIFDs],aL={1:"BYTE",2:"ASCII",3:"SHORT",4:"LONG",5:"RATIONAL",6:"SBYTE",7:"UNDEFINED",8:"SSHORT",9:"SLONG",10:"SRATIONAL",11:"FLOAT",12:"DOUBLE",13:"IFD",16:"LONG8",17:"SLONG8",18:"IFD8"},Qr={};for(const n in aL)aL.hasOwnProperty(n)&&(Qr[aL[n]]=parseInt(n,10));const cc={WhiteIsZero:0,BlackIsZero:1,RGB:2,Palette:3,CMYK:5,YCbCr:6,CIELab:8},Byt={Unspecified:0},Fyt={AddCompression:1},zyt={None:0,Deflate:1,Zstandard:2},Uyt={1024:"GTModelTypeGeoKey",1025:"GTRasterTypeGeoKey",1026:"GTCitationGeoKey",2048:"GeographicTypeGeoKey",2049:"GeogCitationGeoKey",2050:"GeogGeodeticDatumGeoKey",2051:"GeogPrimeMeridianGeoKey",2052:"GeogLinearUnitsGeoKey",2053:"GeogLinearUnitSizeGeoKey",2054:"GeogAngularUnitsGeoKey",2055:"GeogAngularUnitSizeGeoKey",2056:"GeogEllipsoidGeoKey",2057:"GeogSemiMajorAxisGeoKey",2058:"GeogSemiMinorAxisGeoKey",2059:"GeogInvFlatteningGeoKey",2060:"GeogAzimuthUnitsGeoKey",2061:"GeogPrimeMeridianLongGeoKey",2062:"GeogTOWGS84GeoKey",3072:"ProjectedCSTypeGeoKey",3073:"PCSCitationGeoKey",3074:"ProjectionGeoKey",3075:"ProjCoordTransGeoKey",3076:"ProjLinearUnitsGeoKey",3077:"ProjLinearUnitSizeGeoKey",3078:"ProjStdParallel1GeoKey",3079:"ProjStdParallel2GeoKey",3080:"ProjNatOriginLongGeoKey",3081:"ProjNatOriginLatGeoKey",3082:"ProjFalseEastingGeoKey",3083:"ProjFalseNorthingGeoKey",3084:"ProjFalseOriginLongGeoKey",3085:"ProjFalseOriginLatGeoKey",3086:"ProjFalseOriginEastingGeoKey",3087:"ProjFalseOriginNorthingGeoKey",3088:"ProjCenterLongGeoKey",3089:"ProjCenterLatGeoKey",3090:"ProjCenterEastingGeoKey",3091:"ProjCenterNorthingGeoKey",3092:"ProjScaleAtNatOriginGeoKey",3093:"ProjScaleAtCenterGeoKey",3094:"ProjAzimuthAngleGeoKey",3095:"ProjStraightVertPoleLongGeoKey",3096:"ProjRectifiedGridAngleGeoKey",4096:"VerticalCSTypeGeoKey",4097:"VerticalCitationGeoKey",4098:"VerticalDatumGeoKey",4099:"VerticalUnitsGeoKey"};function Hyt(n,e){const{width:t,height:r}=n,i=new Uint8Array(t*r*3);let a;for(let s=0,l=0;s<n.length;++s,l+=3)a=256-n[s]/e*256,i[l]=a,i[l+1]=a,i[l+2]=a;return i}function jyt(n,e){const{width:t,height:r}=n,i=new Uint8Array(t*r*3);let a;for(let s=0,l=0;s<n.length;++s,l+=3)a=n[s]/e*256,i[l]=a,i[l+1]=a,i[l+2]=a;return i}function Gyt(n,e){const{width:t,height:r}=n,i=new Uint8Array(t*r*3),a=e.length/3,s=e.length/3*2;for(let l=0,c=0;l<n.length;++l,c+=3){const u=n[l];i[c]=e[u]/65536*256,i[c+1]=e[u+a]/65536*256,i[c+2]=e[u+s]/65536*256}return i}function Yyt(n){const{width:e,height:t}=n,r=new Uint8Array(e*t*3);for(let i=0,a=0;i<n.length;i+=4,a+=3){const s=n[i],l=n[i+1],c=n[i+2],u=n[i+3];r[a]=255*((255-s)/256)*((255-u)/256),r[a+1]=255*((255-l)/256)*((255-u)/256),r[a+2]=255*((255-c)/256)*((255-u)/256)}return r}function Wyt(n){const{width:e,height:t}=n,r=new Uint8ClampedArray(e*t*3);for(let i=0,a=0;i<n.length;i+=3,a+=3){const s=n[i],l=n[i+1],c=n[i+2];r[a]=s+1.402*(c-128),r[a+1]=s-.34414*(l-128)-.71414*(c-128),r[a+2]=s+1.772*(l-128)}return r}const Xyt=.95047,Zyt=1,qyt=1.08883;function Kyt(n){const{width:e,height:t}=n,r=new Uint8Array(e*t*3);for(let i=0,a=0;i<n.length;i+=3,a+=3){const s=n[i+0],l=n[i+1]<<24>>24,c=n[i+2]<<24>>24;let u=(s+16)/116,d=l/500+u,f=u-c/200,h,p,m;d=Xyt*(d*d*d>.008856?d*d*d:(d-16/116)/7.787),u=Zyt*(u*u*u>.008856?u*u*u:(u-16/116)/7.787),f=qyt*(f*f*f>.008856?f*f*f:(f-16/116)/7.787),h=d*3.2406+u*-1.5372+f*-.4986,p=d*-.9689+u*1.8758+f*.0415,m=d*.0557+u*-.204+f*1.057,h=h>.0031308?1.055*fi(h,1/2.4)-.055:12.92*h,p=p>.0031308?1.055*fi(p,1/2.4)-.055:12.92*p,m=m>.0031308?1.055*fi(m,1/2.4)-.055:12.92*m,r[a]=Math.max(0,Math.min(1,h))*255,r[a+1]=Math.max(0,Math.min(1,p))*255,r[a+2]=Math.max(0,Math.min(1,m))*255}return r}const q0e=new Map;function kh(n,e){Array.isArray(n)||(n=[n]),n.forEach(t=>q0e.set(t,e))}function Jyt(n){return Ve(this,null,function*(){const e=q0e.get(n.Compression);if(!e)throw new Error(`Unknown compression method identifier: ${n.Compression}`);const t=yield e();return new t(n)})}kh([void 0,1],()=>Promise.resolve().then(()=>require("./raw-B_Sr9gDq.cjs")).then(n=>n.default));kh(5,()=>Promise.resolve().then(()=>require("./lzw-DA3XeqBg.cjs")).then(n=>n.default));kh(6,()=>{throw new Error("old style JPEG compression is not supported.")});kh(7,()=>Promise.resolve().then(()=>require("./jpeg-DLeEjPcb.cjs")).then(n=>n.default));kh([8,32946],()=>Promise.resolve().then(()=>require("./deflate-De_6nNhk.cjs")).then(n=>n.default));kh(32773,()=>Promise.resolve().then(()=>require("./packbits-fIig5HbM.cjs")).then(n=>n.default));kh(34887,()=>Promise.resolve().then(()=>require("./lerc-D2j4ZVbw.cjs")).then(n=>Ve(null,null,function*(){return yield n.zstd.init(),n})).then(n=>n.default));kh(50001,()=>Promise.resolve().then(()=>require("./webimage-DQl5wElJ.cjs")).then(n=>n.default));function tE(n,e,t,r=1){return new(Object.getPrototypeOf(n)).constructor(e*t*r)}function Qyt(n,e,t,r,i){const a=e/r,s=t/i;return n.map(l=>{const c=tE(l,r,i);for(let u=0;u<i;++u){const d=Math.min(Math.round(s*u),t-1);for(let f=0;f<r;++f){const h=Math.min(Math.round(a*f),e-1),p=l[d*e+h];c[u*r+f]=p}}return c})}function Mv(n,e,t){return(1-t)*n+t*e}function $yt(n,e,t,r,i){const a=e/r,s=t/i;return n.map(l=>{const c=tE(l,r,i);for(let u=0;u<i;++u){const d=s*u,f=Math.floor(d),h=Math.min(Math.ceil(d),t-1);for(let p=0;p<r;++p){const m=a*p,v=m%1,g=Math.floor(m),y=Math.min(Math.ceil(m),e-1),b=l[f*e+g],x=l[f*e+y],_=l[h*e+g],w=l[h*e+y],S=Mv(Mv(b,x,v),Mv(_,w,v),d%1);c[u*r+p]=S}}return c})}function ebt(n,e,t,r,i,a="nearest"){switch(a.toLowerCase()){case"nearest":return Qyt(n,e,t,r,i);case"bilinear":case"linear":return $yt(n,e,t,r,i);default:throw new Error(`Unsupported resampling method: '${a}'`)}}function tbt(n,e,t,r,i,a){const s=e/r,l=t/i,c=tE(n,r,i,a);for(let u=0;u<i;++u){const d=Math.min(Math.round(l*u),t-1);for(let f=0;f<r;++f){const h=Math.min(Math.round(s*f),e-1);for(let p=0;p<a;++p){const m=n[d*e*a+h*a+p];c[u*r*a+f*a+p]=m}}}return c}function nbt(n,e,t,r,i,a){const s=e/r,l=t/i,c=tE(n,r,i,a);for(let u=0;u<i;++u){const d=l*u,f=Math.floor(d),h=Math.min(Math.ceil(d),t-1);for(let p=0;p<r;++p){const m=s*p,v=m%1,g=Math.floor(m),y=Math.min(Math.ceil(m),e-1);for(let b=0;b<a;++b){const x=n[f*e*a+g*a+b],_=n[f*e*a+y*a+b],w=n[h*e*a+g*a+b],S=n[h*e*a+y*a+b],C=Mv(Mv(x,_,v),Mv(w,S,v),d%1);c[u*r*a+p*a+b]=C}}}return c}function rbt(n,e,t,r,i,a,s="nearest"){switch(s.toLowerCase()){case"nearest":return tbt(n,e,t,r,i,a);case"bilinear":case"linear":return nbt(n,e,t,r,i,a);default:throw new Error(`Unsupported resampling method: '${s}'`)}}function ibt(n,e,t){let r=0;for(let i=e;i<t;++i)r+=n[i];return r}function kk(n,e,t){switch(n){case 1:if(e<=8)return new Uint8Array(t);if(e<=16)return new Uint16Array(t);if(e<=32)return new Uint32Array(t);break;case 2:if(e===8)return new Int8Array(t);if(e===16)return new Int16Array(t);if(e===32)return new Int32Array(t);break;case 3:switch(e){case 16:case 32:return new Float32Array(t);case 64:return new Float64Array(t)}break}throw Error("Unsupported data format/bitsPerSample")}function abt(n,e){return(n===1||n===2)&&e<=32&&e%8===0?!1:!(n===3&&(e===16||e===32||e===64))}function obt(n,e,t,r,i,a,s){const l=new DataView(n),c=t===2?s*a:s*a*r,u=t===2?1:r,d=kk(e,i,c),f=parseInt("1".repeat(i),2);if(e===1){let h;t===1?h=r*i:h=i;let p=a*h;(p&7)!==0&&(p=p+7&-8);for(let m=0;m<s;++m){const v=m*p;for(let g=0;g<a;++g){const y=v+g*u*i;for(let b=0;b<u;++b){const x=y+b*i,_=(m*a+g)*u+b,w=Math.floor(x/8),S=x%8;if(S+i<=8)d[_]=l.getUint8(w)>>8-i-S&f;else if(S+i<=16)d[_]=l.getUint16(w)>>16-i-S&f;else if(S+i<=24){const C=l.getUint16(w)<<8|l.getUint8(w+2);d[_]=C>>24-i-S&f}else d[_]=l.getUint32(w)>>32-i-S&f}}}}return d.buffer}class sbt{constructor(e,t,r,i,a,s){this.fileDirectory=e,this.geoKeys=t,this.dataView=r,this.littleEndian=i,this.tiles=a?{}:null,this.isTiled=!e.StripOffsets;const l=e.PlanarConfiguration;if(this.planarConfiguration=typeof l=="undefined"?1:l,this.planarConfiguration!==1&&this.planarConfiguration!==2)throw new Error("Invalid planar configuration.");this.source=s}getFileDirectory(){return this.fileDirectory}getGeoKeys(){return this.geoKeys}getWidth(){return this.fileDirectory.ImageWidth}getHeight(){return this.fileDirectory.ImageLength}getSamplesPerPixel(){return typeof this.fileDirectory.SamplesPerPixel!="undefined"?this.fileDirectory.SamplesPerPixel:1}getTileWidth(){return this.isTiled?this.fileDirectory.TileWidth:this.getWidth()}getTileHeight(){return this.isTiled?this.fileDirectory.TileLength:typeof this.fileDirectory.RowsPerStrip!="undefined"?Math.min(this.fileDirectory.RowsPerStrip,this.getHeight()):this.getHeight()}getBlockWidth(){return this.getTileWidth()}getBlockHeight(e){return this.isTiled||(e+1)*this.getTileHeight()<=this.getHeight()?this.getTileHeight():this.getHeight()-e*this.getTileHeight()}getBytesPerPixel(){let e=0;for(let t=0;t<this.fileDirectory.BitsPerSample.length;++t)e+=this.getSampleByteSize(t);return e}getSampleByteSize(e){if(e>=this.fileDirectory.BitsPerSample.length)throw new RangeError(`Sample index ${e} is out of range.`);return Math.ceil(this.fileDirectory.BitsPerSample[e]/8)}getReaderForSample(e){const t=this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[e]:1,r=this.fileDirectory.BitsPerSample[e];switch(t){case 1:if(r<=8)return DataView.prototype.getUint8;if(r<=16)return DataView.prototype.getUint16;if(r<=32)return DataView.prototype.getUint32;break;case 2:if(r<=8)return DataView.prototype.getInt8;if(r<=16)return DataView.prototype.getInt16;if(r<=32)return DataView.prototype.getInt32;break;case 3:switch(r){case 16:return function(i,a){return Z0e(this,i,a)};case 32:return DataView.prototype.getFloat32;case 64:return DataView.prototype.getFloat64}break}throw Error("Unsupported data format/bitsPerSample")}getSampleFormat(e=0){return this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[e]:1}getBitsPerSample(e=0){return this.fileDirectory.BitsPerSample[e]}getArrayForSample(e,t){const r=this.getSampleFormat(e),i=this.getBitsPerSample(e);return kk(r,i,t)}getTileOrStrip(e,t,r,i,a){return Ve(this,null,function*(){const s=Math.ceil(this.getWidth()/this.getTileWidth()),l=Math.ceil(this.getHeight()/this.getTileHeight());let c;const{tiles:u}=this;this.planarConfiguration===1?c=t*s+e:this.planarConfiguration===2&&(c=r*s*l+t*s+e);let d,f;this.isTiled?(d=this.fileDirectory.TileOffsets[c],f=this.fileDirectory.TileByteCounts[c]):(d=this.fileDirectory.StripOffsets[c],f=this.fileDirectory.StripByteCounts[c]);const h=(yield this.source.fetch([{offset:d,length:f}],a))[0];let p;return u===null||!u[c]?(p=Ve(this,null,function*(){let m=yield i.decode(this.fileDirectory,h);const v=this.getSampleFormat(),g=this.getBitsPerSample();return abt(v,g)&&(m=obt(m,v,this.planarConfiguration,this.getSamplesPerPixel(),g,this.getTileWidth(),this.getBlockHeight(t))),m}),u!==null&&(u[c]=p)):p=u[c],{x:e,y:t,sample:r,data:yield p}})}_readRaster(e,t,r,i,a,s,l,c,u){return Ve(this,null,function*(){const d=this.getTileWidth(),f=this.getTileHeight(),h=this.getWidth(),p=this.getHeight(),m=Math.max(Math.floor(e[0]/d),0),v=Math.min(Math.ceil(e[2]/d),Math.ceil(h/d)),g=Math.max(Math.floor(e[1]/f),0),y=Math.min(Math.ceil(e[3]/f),Math.ceil(p/f)),b=e[2]-e[0];let x=this.getBytesPerPixel();const _=[],w=[];for(let E=0;E<t.length;++E)this.planarConfiguration===1?_.push(ibt(this.fileDirectory.BitsPerSample,0,t[E])/8):_.push(0),w.push(this.getReaderForSample(t[E]));const S=[],{littleEndian:C}=this;for(let E=g;E<y;++E)for(let T=m;T<v;++T){let A;this.planarConfiguration===1&&(A=this.getTileOrStrip(T,E,0,a,u));for(let M=0;M<t.length;++M){const D=M,k=t[M];this.planarConfiguration===2&&(x=this.getSampleByteSize(k),A=this.getTileOrStrip(T,E,k,a,u));const P=A.then(I=>{const N=I.data,R=new DataView(N),V=this.getBlockHeight(I.y),B=I.y*f,F=I.x*d,G=B+V,U=(I.x+1)*d,z=w[D],j=Math.min(V,V-(G-e[3]),p-B),W=Math.min(d,d-(U-e[2]),h-F);for(let Y=Math.max(0,e[1]-B);Y<j;++Y)for(let re=Math.max(0,e[0]-F);re<W;++re){const Q=(Y*d+re)*x,$=z.call(R,Q+_[D],C);let ee;i?(ee=(Y+B-e[1])*b*t.length+(re+F-e[0])*t.length+D,r[ee]=$):(ee=(Y+B-e[1])*b+re+F-e[0],r[D][ee]=$)}});S.push(P)}}if(yield Promise.all(S),s&&e[2]-e[0]!==s||l&&e[3]-e[1]!==l){let E;return i?E=rbt(r,e[2]-e[0],e[3]-e[1],s,l,t.length,c):E=ebt(r,e[2]-e[0],e[3]-e[1],s,l,c),E.width=s,E.height=l,E}return r.width=s||e[2]-e[0],r.height=l||e[3]-e[1],r})}readRasters(){return Ve(this,arguments,function*({window:e,samples:t=[],interleave:r,pool:i=null,width:a,height:s,resampleMethod:l,fillValue:c,signal:u}={}){const d=e||[0,0,this.getWidth(),this.getHeight()];if(d[0]>d[2]||d[1]>d[3])throw new Error("Invalid subsets");const f=d[2]-d[0],h=d[3]-d[1],p=f*h,m=this.getSamplesPerPixel();if(!t||!t.length)for(let b=0;b<m;++b)t.push(b);else for(let b=0;b<t.length;++b)if(t[b]>=m)return Promise.reject(new RangeError(`Invalid sample index '${t[b]}'.`));let v;if(r){const b=this.fileDirectory.SampleFormat?Math.max.apply(null,this.fileDirectory.SampleFormat):1,x=Math.max.apply(null,this.fileDirectory.BitsPerSample);v=kk(b,x,p*t.length),c&&v.fill(c)}else{v=[];for(let b=0;b<t.length;++b){const x=this.getArrayForSample(t[b],p);Array.isArray(c)&&b<c.length?x.fill(c[b]):c&&!Array.isArray(c)&&x.fill(c),v.push(x)}}const g=i||(yield Jyt(this.fileDirectory));return yield this._readRaster(d,t,v,r,g,a,s,l,u)})}readRGB(){return Ve(this,arguments,function*({window:e,interleave:t=!0,pool:r=null,width:i,height:a,resampleMethod:s,enableAlpha:l=!1,signal:c}={}){const u=e||[0,0,this.getWidth(),this.getHeight()];if(u[0]>u[2]||u[1]>u[3])throw new Error("Invalid subsets");const d=this.fileDirectory.PhotometricInterpretation;if(d===cc.RGB){let y=[0,1,2];if(this.fileDirectory.ExtraSamples!==Byt.Unspecified&&l){y=[];for(let b=0;b<this.fileDirectory.BitsPerSample.length;b+=1)y.push(b)}return this.readRasters({window:e,interleave:t,samples:y,pool:r,width:i,height:a,resampleMethod:s,signal:c})}let f;switch(d){case cc.WhiteIsZero:case cc.BlackIsZero:case cc.Palette:f=[0];break;case cc.CMYK:f=[0,1,2,3];break;case cc.YCbCr:case cc.CIELab:f=[0,1,2];break;default:throw new Error("Invalid or unsupported photometric interpretation.")}const h={window:u,interleave:!0,samples:f,pool:r,width:i,height:a,resampleMethod:s,signal:c},{fileDirectory:p}=this,m=yield this.readRasters(h),v=fi(2,this.fileDirectory.BitsPerSample[0]);let g;switch(d){case cc.WhiteIsZero:g=Hyt(m,v);break;case cc.BlackIsZero:g=jyt(m,v);break;case cc.Palette:g=Gyt(m,p.ColorMap);break;case cc.CMYK:g=Yyt(m);break;case cc.YCbCr:g=Wyt(m);break;case cc.CIELab:g=Kyt(m);break;default:throw new Error("Unsupported photometric interpretation.")}if(!t){const y=new Uint8Array(g.length/3),b=new Uint8Array(g.length/3),x=new Uint8Array(g.length/3);for(let _=0,w=0;_<g.length;_+=3,++w)y[w]=g[_],b[w]=g[_+1],x[w]=g[_+2];g=[y,b,x]}return g.width=m.width,g.height=m.height,g})}getTiePoints(){if(!this.fileDirectory.ModelTiepoint)return[];const e=[];for(let t=0;t<this.fileDirectory.ModelTiepoint.length;t+=6)e.push({i:this.fileDirectory.ModelTiepoint[t],j:this.fileDirectory.ModelTiepoint[t+1],k:this.fileDirectory.ModelTiepoint[t+2],x:this.fileDirectory.ModelTiepoint[t+3],y:this.fileDirectory.ModelTiepoint[t+4],z:this.fileDirectory.ModelTiepoint[t+5]});return e}getGDALMetadata(e=null){const t={};if(!this.fileDirectory.GDAL_METADATA)return null;const r=this.fileDirectory.GDAL_METADATA;let i=Ryt(r,"Item");e===null?i=i.filter(a=>iL(a,"sample")===void 0):i=i.filter(a=>Number(iL(a,"sample"))===e);for(let a=0;a<i.length;++a){const s=i[a];t[iL(s,"name")]=s.inner}return t}getGDALNoData(){if(!this.fileDirectory.GDAL_NODATA)return null;const e=this.fileDirectory.GDAL_NODATA;return Number(e.substring(0,e.length-1))}getOrigin(){const e=this.fileDirectory.ModelTiepoint,t=this.fileDirectory.ModelTransformation;if(e&&e.length===6)return[e[3],e[4],e[5]];if(t)return[t[3],t[7],t[11]];throw new Error("The image does not have an affine transformation.")}getResolution(e=null){const t=this.fileDirectory.ModelPixelScale,r=this.fileDirectory.ModelTransformation;if(t)return[t[0],-t[1],t[2]];if(r)return r[1]===0&&r[4]===0?[r[0],-r[5],r[10]]:[Math.sqrt(r[0]*r[0]+r[4]*r[4]),-Math.sqrt(r[1]*r[1]+r[5]*r[5]),r[10]];if(e){const[i,a,s]=e.getResolution();return[i*e.getWidth()/this.getWidth(),a*e.getHeight()/this.getHeight(),s*e.getWidth()/this.getWidth()]}throw new Error("The image does not have an affine transformation.")}pixelIsArea(){return this.geoKeys.GTRasterTypeGeoKey===1}getBoundingBox(e=!1){const t=this.getHeight(),r=this.getWidth();if(this.fileDirectory.ModelTransformation&&!e){const[i,a,s,l,c,u,d,f]=this.fileDirectory.ModelTransformation,p=[[0,0],[0,t],[r,0],[r,t]].map(([g,y])=>[l+i*g+a*y,f+c*g+u*y]),m=p.map(g=>g[0]),v=p.map(g=>g[1]);return[Math.min(...m),Math.min(...v),Math.max(...m),Math.max(...v)]}else{const i=this.getOrigin(),a=this.getResolution(),s=i[0],l=i[1],c=s+a[0]*r,u=l+a[1]*t;return[Math.min(s,c),Math.min(l,u),Math.max(s,c),Math.max(l,u)]}}}class lbt{constructor(e){this._dataView=new DataView(e)}get buffer(){return this._dataView.buffer}getUint64(e,t){const r=this.getUint32(e,t),i=this.getUint32(e+4,t);let a;if(t){if(a=r+fi(2,32)*i,!Number.isSafeInteger(a))throw new Error(`${a} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return a}if(a=fi(2,32)*r+i,!Number.isSafeInteger(a))throw new Error(`${a} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return a}getInt64(e,t){let r=0;const i=(this._dataView.getUint8(e+(t?7:0))&128)>0;let a=!0;for(let s=0;s<8;s++){let l=this._dataView.getUint8(e+(t?s:7-s));i&&(a?l!==0&&(l=~(l-1)&255,a=!1):l=~l&255),r+=l*fi(256,s)}return i&&(r=-r),r}getUint8(e,t){return this._dataView.getUint8(e,t)}getInt8(e,t){return this._dataView.getInt8(e,t)}getUint16(e,t){return this._dataView.getUint16(e,t)}getInt16(e,t){return this._dataView.getInt16(e,t)}getUint32(e,t){return this._dataView.getUint32(e,t)}getInt32(e,t){return this._dataView.getInt32(e,t)}getFloat16(e,t){return Z0e(this._dataView,e,t)}getFloat32(e,t){return this._dataView.getFloat32(e,t)}getFloat64(e,t){return this._dataView.getFloat64(e,t)}}class cbt{constructor(e,t,r,i){this._dataView=new DataView(e),this._sliceOffset=t,this._littleEndian=r,this._bigTiff=i}get sliceOffset(){return this._sliceOffset}get sliceTop(){return this._sliceOffset+this.buffer.byteLength}get littleEndian(){return this._littleEndian}get bigTiff(){return this._bigTiff}get buffer(){return this._dataView.buffer}covers(e,t){return this.sliceOffset<=e&&this.sliceTop>=e+t}readUint8(e){return this._dataView.getUint8(e-this._sliceOffset,this._littleEndian)}readInt8(e){return this._dataView.getInt8(e-this._sliceOffset,this._littleEndian)}readUint16(e){return this._dataView.getUint16(e-this._sliceOffset,this._littleEndian)}readInt16(e){return this._dataView.getInt16(e-this._sliceOffset,this._littleEndian)}readUint32(e){return this._dataView.getUint32(e-this._sliceOffset,this._littleEndian)}readInt32(e){return this._dataView.getInt32(e-this._sliceOffset,this._littleEndian)}readFloat32(e){return this._dataView.getFloat32(e-this._sliceOffset,this._littleEndian)}readFloat64(e){return this._dataView.getFloat64(e-this._sliceOffset,this._littleEndian)}readUint64(e){const t=this.readUint32(e),r=this.readUint32(e+4);let i;if(this._littleEndian){if(i=t+fi(2,32)*r,!Number.isSafeInteger(i))throw new Error(`${i} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return i}if(i=fi(2,32)*t+r,!Number.isSafeInteger(i))throw new Error(`${i} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return i}readInt64(e){let t=0;const r=(this._dataView.getUint8(e+(this._littleEndian?7:0))&128)>0;let i=!0;for(let a=0;a<8;a++){let s=this._dataView.getUint8(e+(this._littleEndian?a:7-a));r&&(i?s!==0&&(s=~(s-1)&255,i=!1):s=~s&255),t+=s*fi(256,a)}return r&&(t=-t),t}readOffset(e){return this._bigTiff?this.readUint64(e):this.readUint32(e)}}class ubt{fetch(e,t=void 0){return Ve(this,null,function*(){return Promise.all(e.map(r=>this.fetchSlice(r,t)))})}fetchSlice(e){return Ve(this,null,function*(){throw new Error(`fetching of slice ${e} not possible, not implemented`)})}get fileSize(){return null}close(){return Ve(this,null,function*(){})}}class NF extends Error{constructor(e){super(e),Error.captureStackTrace&&Error.captureStackTrace(this,NF),this.name="AbortError"}}class dbt extends ubt{constructor(e){super(),this.arrayBuffer=e}fetchSlice(e,t){if(t&&t.aborted)throw new NF("Request aborted");return this.arrayBuffer.slice(e.offset,e.offset+e.length)}}function fbt(n){return new dbt(n)}function Ik(n){switch(n){case Qr.BYTE:case Qr.ASCII:case Qr.SBYTE:case Qr.UNDEFINED:return 1;case Qr.SHORT:case Qr.SSHORT:return 2;case Qr.LONG:case Qr.SLONG:case Qr.FLOAT:case Qr.IFD:return 4;case Qr.RATIONAL:case Qr.SRATIONAL:case Qr.DOUBLE:case Qr.LONG8:case Qr.SLONG8:case Qr.IFD8:return 8;default:throw new RangeError(`Invalid field type: ${n}`)}}function hbt(n){const e=n.GeoKeyDirectory;if(!e)return null;const t={};for(let r=4;r<=e[3]*4;r+=4){const i=Uyt[e[r]],a=e[r+1]?N9[e[r+1]]:null,s=e[r+2],l=e[r+3];let c=null;if(!a)c=l;else{if(c=n[a],typeof c=="undefined"||c===null)throw new Error(`Could not get value of geoKey '${i}'.`);typeof c=="string"?c=c.substring(l,l+s-1):c.subarray&&(c=c.subarray(l,l+s),s===1&&(c=c[0]))}t[i]=c}return t}function Dm(n,e,t,r){let i=null,a=null;const s=Ik(e);switch(e){case Qr.BYTE:case Qr.ASCII:case Qr.UNDEFINED:i=new Uint8Array(t),a=n.readUint8;break;case Qr.SBYTE:i=new Int8Array(t),a=n.readInt8;break;case Qr.SHORT:i=new Uint16Array(t),a=n.readUint16;break;case Qr.SSHORT:i=new Int16Array(t),a=n.readInt16;break;case Qr.LONG:case Qr.IFD:i=new Uint32Array(t),a=n.readUint32;break;case Qr.SLONG:i=new Int32Array(t),a=n.readInt32;break;case Qr.LONG8:case Qr.IFD8:i=new Array(t),a=n.readUint64;break;case Qr.SLONG8:i=new Array(t),a=n.readInt64;break;case Qr.RATIONAL:i=new Uint32Array(t*2),a=n.readUint32;break;case Qr.SRATIONAL:i=new Int32Array(t*2),a=n.readInt32;break;case Qr.FLOAT:i=new Float32Array(t),a=n.readFloat32;break;case Qr.DOUBLE:i=new Float64Array(t),a=n.readFloat64;break;default:throw new RangeError(`Invalid field type: ${e}`)}if(e===Qr.RATIONAL||e===Qr.SRATIONAL)for(let l=0;l<t;l+=2)i[l]=a.call(n,r+l*s),i[l+1]=a.call(n,r+(l*s+4));else for(let l=0;l<t;++l)i[l]=a.call(n,r+l*s);return e===Qr.ASCII?new TextDecoder("utf-8").decode(i):i}class pbt{constructor(e,t,r){this.fileDirectory=e,this.geoKeyDirectory=t,this.nextIFDByteOffset=r}}class Rb extends Error{constructor(e){super(`No image at index ${e}`),this.index=e}}class mbt{readRasters(){return Ve(this,arguments,function*(e={}){const{window:t,width:r,height:i}=e;let{resX:a,resY:s,bbox:l}=e;const c=yield this.getImage();let u=c;const d=yield this.getImageCount(),f=c.getBoundingBox();if(t&&l)throw new Error('Both "bbox" and "window" passed.');if(r||i){if(t){const[m,v]=c.getOrigin(),[g,y]=c.getResolution();l=[m+t[0]*g,v+t[1]*y,m+t[2]*g,v+t[3]*y]}const p=l||f;if(r){if(a)throw new Error("Both width and resX passed");a=(p[2]-p[0])/r}if(i){if(s)throw new Error("Both width and resY passed");s=(p[3]-p[1])/i}}if(a||s){const p=[];for(let m=0;m<d;++m){const v=yield this.getImage(m),{SubfileType:g,NewSubfileType:y}=v.fileDirectory;(m===0||g===2||y&1)&&p.push(v)}p.sort((m,v)=>m.getWidth()-v.getWidth());for(let m=0;m<p.length;++m){const v=p[m],g=(f[2]-f[0])/v.getWidth(),y=(f[3]-f[1])/v.getHeight();if(u=v,a&&a>g||s&&s>y)break}}let h=t;if(l){const[p,m]=c.getOrigin(),[v,g]=u.getResolution(c);h=[Math.round((l[0]-p)/v),Math.round((l[1]-m)/g),Math.round((l[2]-p)/v),Math.round((l[3]-m)/g)],h=[Math.min(h[0],h[2]),Math.min(h[1],h[3]),Math.max(h[0],h[2]),Math.max(h[1],h[3])]}return u.readRasters(tt(Ne({},e),{window:h}))})}}class OF extends mbt{constructor(e,t,r,i,a={}){super(),this.source=e,this.littleEndian=t,this.bigTiff=r,this.firstIFDOffset=i,this.cache=a.cache||!1,this.ifdRequests=[],this.ghostValues=null}getSlice(e,t){return Ve(this,null,function*(){const r=this.bigTiff?4048:1024;return new cbt((yield this.source.fetch([{offset:e,length:typeof t!="undefined"?t:r}]))[0],e,this.littleEndian,this.bigTiff)})}parseFileDirectoryAt(e){return Ve(this,null,function*(){const t=this.bigTiff?20:12,r=this.bigTiff?8:2;let i=yield this.getSlice(e);const a=this.bigTiff?i.readUint64(e):i.readUint16(e),s=a*t+(this.bigTiff?16:6);i.covers(e,s)||(i=yield this.getSlice(e,s));const l={};let c=e+(this.bigTiff?8:2);for(let f=0;f<a;c+=t,++f){const h=i.readUint16(c),p=i.readUint16(c+2),m=this.bigTiff?i.readUint64(c+4):i.readUint32(c+4);let v,g;const y=Ik(p),b=c+(this.bigTiff?12:8);if(y*m<=(this.bigTiff?8:4))v=Dm(i,p,m,b);else{const x=i.readOffset(b),_=Ik(p)*m;if(i.covers(x,_))v=Dm(i,p,m,x);else{const w=yield this.getSlice(x,_);v=Dm(w,p,m,x)}}m===1&&Vyt.indexOf(h)===-1&&!(p===Qr.RATIONAL||p===Qr.SRATIONAL)?g=v[0]:g=v,l[N9[h]]=g}const u=hbt(l),d=i.readOffset(e+r+t*a);return new pbt(l,u,d)})}requestIFD(e){return Ve(this,null,function*(){if(this.ifdRequests[e])return this.ifdRequests[e];if(e===0)return this.ifdRequests[e]=this.parseFileDirectoryAt(this.firstIFDOffset),this.ifdRequests[e];if(!this.ifdRequests[e-1])try{this.ifdRequests[e-1]=this.requestIFD(e-1)}catch(t){throw t instanceof Rb?new Rb(e):t}return this.ifdRequests[e]=Ve(this,null,function*(){const t=yield this.ifdRequests[e-1];if(t.nextIFDByteOffset===0)throw new Rb(e);return this.parseFileDirectoryAt(t.nextIFDByteOffset)}),this.ifdRequests[e]})}getImage(e=0){return Ve(this,null,function*(){const t=yield this.requestIFD(e);return new sbt(t.fileDirectory,t.geoKeyDirectory,this.dataView,this.littleEndian,this.cache,this.source)})}getImageCount(){return Ve(this,null,function*(){let e=0,t=!0;for(;t;)try{yield this.requestIFD(e),++e}catch(r){if(r instanceof Rb)t=!1;else throw r}return e})}getGhostValues(){return Ve(this,null,function*(){const e=this.bigTiff?16:8;if(this.ghostValues)return this.ghostValues;const t="GDAL_STRUCTURAL_METADATA_SIZE=",r=t.length+100;let i=yield this.getSlice(e,r);if(t===Dm(i,Qr.ASCII,t.length,e)){const s=Dm(i,Qr.ASCII,r,e).split(`
3989
3989
  `)[0],l=Number(s.split("=")[1].split(" ")[0])+s.length;l>r&&(i=yield this.getSlice(e,l));const c=Dm(i,Qr.ASCII,l,e);this.ghostValues={},c.split(`
3990
3990
  `).filter(u=>u.length>0).map(u=>u.split("=")).forEach(([u,d])=>{this.ghostValues[u]=d})}return this.ghostValues})}static fromSource(e,t,r){return Ve(this,null,function*(){const i=(yield e.fetch([{offset:0,length:1024}],r))[0],a=new lbt(i),s=a.getUint16(0,0);let l;if(s===18761)l=!0;else if(s===19789)l=!1;else throw new TypeError("Invalid byte order value.");const c=a.getUint16(2,l);let u;if(c===42)u=!1;else if(c===43){if(u=!0,a.getUint16(4,l)!==8)throw new Error("Unsupported offset byte-size.")}else throw new TypeError("Invalid magic number.");const d=u?a.getUint64(8,l):a.getUint32(4,l);return new OF(e,l,u,d,t)})}close(){return typeof this.source.close=="function"?this.source.close():!1}}function vbt(n,e){return Ve(this,null,function*(){return OF.fromSource(fbt(n),e)})}class gbt{constructor(e){this.scene=null,this.camera=null,this.renderer=null,this.controls=null,this.animationId=null,this.container=null,this.resizeHandler=null,this.dblClickHandler=null,this.animate=()=>{this.animationId=requestAnimationFrame(this.animate),this.controls&&this.controls.update(),this.renderer&&this.scene&&this.camera&&this.renderer.render(this.scene,this.camera)},this.container=e,this.init()}init(){if(!this.container)return;this.dispose();const e=this.container.clientWidth,t=this.container.clientHeight;this.scene=new B6,this.scene.background=new sr(16777215),this.camera=new ns(75,e/t,.1,1e4),this.camera.position.z=5,this.renderer=new V6({antialias:!0,alpha:!0}),this.renderer.setSize(e,t),this.renderer.setPixelRatio(window.devicePixelRatio),this.container.appendChild(this.renderer.domElement),this.controls=new QC(this.camera,this.renderer.domElement),this.controls.enableDamping=!0,this.controls.dampingFactor=.08,this.controls.screenSpacePanning=!0,this.controls.enablePan=!0,this.controls.minDistance=1,this.controls.maxDistance=5e3,this.controls.target.set(0,0,0),this.controls.update(),this.dblClickHandler=a=>{this.container&&this.container.contains(a.target)&&this.resetView()},this.container.addEventListener("dblclick",this.dblClickHandler);const r=new sg(16777215,.6);this.scene.add(r);const i=new qf(16777215,.8);i.position.set(5,10,5),this.scene.add(i),this.resizeHandler=()=>this.onWindowResize(),window.addEventListener("resize",this.resizeHandler),this.animate()}onWindowResize(){if(!this.container||!this.camera||!this.renderer)return;const e=this.container.clientWidth,t=this.container.clientHeight;this.camera.aspect=e/t,this.camera.updateProjectionMatrix(),this.renderer.setSize(e,t)}resetView(){!this.camera||!this.controls||(this.camera.position.set(0,0,5),this.controls.target.set(0,0,0),this.camera.lookAt(0,0,0),this.controls.update())}fitCameraToObject(e){if(!this.camera||!this.controls)return;const t=new Wi().setFromObject(e),r=t.getSize(new it),i=t.getCenter(new it),a=Math.max(r.x,r.y,r.z)||1,s=this.camera.fov*(Math.PI/180),l=a/2/Math.tan(s/2)*1.6;this.camera.position.set(i.x,i.y,i.z+l),this.camera.near=Math.max(.1,l/1e3),this.camera.far=Math.max(1e4,l*10),this.camera.updateProjectionMatrix(),this.controls.target.copy(i),this.controls.update()}loadGeologyModel(e){return Ve(this,null,function*(){if(!this.scene||!e)return;e.toLowerCase().endsWith(".glb")||e.toLowerCase().endsWith(".gltf")?new k0e().load(e,i=>{this.scene.add(i.scene);const s=new Wi().setFromObject(i.scene).getSize(new it),c=4/(Math.max(s.x,s.y,s.z)||1);i.scene.scale.multiplyScalar(c),this.fitCameraToObject(i.scene)},void 0,i=>{console.error("Failed to load GLTF model:",i)}):new iyt().load(e,i=>{this.scene.add(i);const s=new Wi().setFromObject(i).getSize(new it),c=4/(Math.max(s.x,s.y,s.z)||1);i.scale.multiplyScalar(c),this.fitCameraToObject(i)},void 0,i=>{console.error("Failed to load OBJ model:",i)})})}loadDTMTerrain(e){return Ve(this,null,function*(){if(!(!this.scene||!e))try{const r=yield(yield fetch(e)).arrayBuffer(),a=yield(yield vbt(r)).getImage(),s=yield a.readRasters(),l=a.getWidth(),c=a.getHeight(),u=s[0],d=Math.max(1,Math.floor(Math.max(l,c)/100)),f=new Lr,h=[],p=[];let m=0;for(let y=0;y<u.length;y+=d)m=Math.max(m,u[y]);for(let y=0;y<c;y+=d)for(let b=0;b<l;b+=d){const x=y*l+b,_=(u[x]||0)/m*3-1.5;h.push(b/l*4-2,_,y/c*4-2);const w=u[x]/m,S=new sr().setHSL(.6-w*.6,1,.5);p.push(S.r,S.g,S.b)}f.setAttribute("position",new Or(new Float32Array(h),3)),f.setAttribute("color",new Or(new Float32Array(p),3)),f.computeVertexNormals();const v=new s1e({vertexColors:!0,side:zs}),g=new wi(f,v);this.scene.add(g),this.fitCameraToObject(g)}catch(t){console.error("Failed to load DTM TIFF:",t)}})}loadUAVImage(e){return Ve(this,null,function*(){if(!this.scene||!e)return;new d1e().load(e,r=>{const i=r.image.width/r.image.height,a=new Wg(4*i,4),s=new $c({map:r}),l=new wi(a,s);this.scene.add(l),this.fitCameraToObject(l)},void 0,r=>{console.error("Failed to load UAV image:",r)})})}clearScene(){if(!this.scene)return;for(;this.scene.children.length>0;){const r=this.scene.children[0];r instanceof wi&&(r.geometry.dispose(),Array.isArray(r.material)?r.material.forEach(i=>i.dispose()):r.material.dispose()),this.scene.remove(r)}const e=new sg(16777215,.6);this.scene.add(e);const t=new qf(16777215,.8);t.position.set(5,10,5),this.scene.add(t)}dispose(){this.animationId&&cancelAnimationFrame(this.animationId),this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.container&&this.dblClickHandler&&(this.container.removeEventListener("dblclick",this.dblClickHandler),this.dblClickHandler=null),this.controls&&(this.controls.dispose(),this.controls=null),this.renderer&&this.container&&this.renderer.domElement.parentNode===this.container&&this.container.removeChild(this.renderer.domElement),this.renderer&&this.renderer.dispose(),this.scene=null,this.camera=null,this.renderer=null,this.animationId=null}}const ybt={class:"filter-tabs"},bbt={class:"toolbar-right"},xbt={key:0,class:"pick-hint-bar"},_bt={class:"map-model-overlay"},Sbt={key:0,class:"map-mode-edit-tip"},wbt=["viewBox"],Cbt=["d","stroke"],Ebt=["x1","y1","x2","y2"],Abt=["onClick","onMouseenter"],Tbt={class:"point-bubble"},Mbt={class:"point-id"},Dbt=["innerHTML"],Lbt={class:"drawer-cards"},Nbt=["onClick"],Obt={class:"card-icon"},Pbt={class:"card-label"},kbt={class:"profile-dialog-header"},Ibt={class:"profile-header-btns"},Rbt={DEFAULT_ICON:Ei,ACTIVE_ICON:Ai,NAME_CN:"GNSS地图监测视图",NAME_EN:"GNSS Map Monitor View",ORDER:10,PLATFORM:["pc","screen"]},Vbt={bgColor:{value:"#0b1a31",type:"color",label:"setting.bgColor"},toolbarBg:{value:"#ffffff",type:"color",label:"工具栏背景色"},toolbarFontSize:{value:12,type:"number",label:"工具栏字体大小",min:10,max:20},geologyMapUrl:{value:"",type:"string",label:"地质模型地图URL"},dtmMapUrl:{value:"",type:"string",label:"DTM面地图URL"},uavMapUrl:{value:"",type:"string",label:"无人机地图URL"},satelliteMapUrl:{value:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",type:"string",label:"Esri卫星影像URL"},mapCenterLon:{value:119.40331,type:"number",label:"地图中心经度",min:-180,max:180},mapCenterLat:{value:45.369465,type:"number",label:"地图中心纬度",min:-90,max:90},mapZoomLevel:{value:10,type:"number",label:"地图缩放级别",min:1,max:18},mapElevation:{value:1e3,type:"number",label:"参考高程(m)"},pointCount:{value:80,type:"number",label:"模拟监测点数量",min:20,max:200},linkChannel:{value:"gnss",type:"select",label:"联动频道",options:[{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"自定义频道名",showWhen:{linkChannel:"custom"}}},Bbt=[{name:"GNSS001",object_id:"",fvDeviceName:"",deviceType:"GNSS",x:1e3,y:400,elevation:"",region:"北帮",lineName:"北帮线",row1Label:"累计位移",row1FV:"",row1Unit:"mm",row2Label:"当前速度",row2FV:"",row2Unit:"mm/h",row3Label:"X/Y/H变化",row3FV:"",row3Unit:"mm",row4Label:"",row4FV:"",row4Unit:"",row5Label:"",row5FV:"",row5Unit:"",arrowXFV:"",arrowYFV:""},{name:"GNSS002",object_id:"",fvDeviceName:"",deviceType:"GNSS",x:1300,y:400,elevation:"",region:"北帮",lineName:"北帮线",row1Label:"累计位移",row1FV:"",row1Unit:"mm",row2Label:"当前速度",row2FV:"",row2Unit:"mm/h",row3Label:"X/Y/H变化",row3FV:"",row3Unit:"mm",row4Label:"",row4FV:"",row4Unit:"",row5Label:"",row5FV:"",row5Unit:"",arrowXFV:"",arrowYFV:""},{name:"GNSS003",object_id:"",fvDeviceName:"",deviceType:"GNSS",x:1600,y:400,elevation:"",region:"北帮",lineName:"北帮线",row1Label:"累计位移",row1FV:"",row1Unit:"mm",row2Label:"当前速度",row2FV:"",row2Unit:"mm/h",row3Label:"X/Y/H变化",row3FV:"",row3Unit:"mm",row4Label:"",row4FV:"",row4Unit:"",row5Label:"",row5FV:"",row5Unit:"",arrowXFV:"",arrowYFV:""},{name:"DEEP001",object_id:"",fvDeviceName:"",deviceType:"深部位移",x:500,y:1200,elevation:"",region:"西帮",lineName:"",row1Label:"深层位移",row1FV:"",row1Unit:"mm",row2Label:"测斜深度",row2FV:"",row2Unit:"m",row3Label:"",row3FV:"",row3Unit:"",row4Label:"",row4FV:"",row4Unit:"",row5Label:"",row5FV:"",row5Unit:"",arrowXFV:"",arrowYFV:""},{name:"RADAR001",object_id:"",fvDeviceName:"",deviceType:"雷达",x:2500,y:1e3,elevation:"",region:"东帮",lineName:"",row1Label:"形变量",row1FV:"",row1Unit:"mm",row2Label:"形变速度",row2FV:"",row2Unit:"mm/d",row3Label:"",row3FV:"",row3Unit:"",row4Label:"",row4FV:"",row4Unit:"",row5Label:"",row5FV:"",row5Unit:"",arrowXFV:"",arrowYFV:""},{name:"CRACK001",object_id:"",fvDeviceName:"",deviceType:"裂缝",x:1500,y:1250,elevation:"",region:"中央区",lineName:"",row1Label:"裂缝宽度",row1FV:"",row1Unit:"mm",row2Label:"开裂速度",row2FV:"",row2Unit:"mm/d",row3Label:"",row3FV:"",row3Unit:"",row4Label:"",row4FV:"",row4Unit:"",row5Label:"",row5FV:"",row5Unit:"",arrowXFV:"",arrowYFV:""},{name:"FIRE001",object_id:"",fvDeviceName:"",deviceType:"煤自燃",x:1200,y:2100,elevation:"",region:"南帮",lineName:"",row1Label:"温度",row1FV:"",row1Unit:"℃",row2Label:"CO浓度",row2FV:"",row2Unit:"ppm",row3Label:"",row3FV:"",row3Unit:"",row4Label:"",row4FV:"",row4Unit:"",row5Label:"",row5FV:"",row5Unit:"",arrowXFV:"",arrowYFV:""},{name:"WATER001",object_id:"",fvDeviceName:"",deviceType:"降雨",x:1800,y:2100,elevation:"",region:"南帮",lineName:"",row1Label:"降雨量",row1FV:"",row1Unit:"mm",row2Label:"雨强",row2FV:"",row2Unit:"mm/h",row3Label:"",row3FV:"",row3Unit:"",row4Label:"",row4FV:"",row4Unit:"",row5Label:"",row5FV:"",row5Unit:"",arrowXFV:"",arrowYFV:""}],Fbt=["object_id","name","fvDeviceName","deviceType","x","y","elevation","region","lineName","row1Label","row1FV","row1Unit","row2Label","row2FV","row2Unit","row3Label","row3FV","row3Unit","row4Label","row4FV","row4Unit","row5Label","row5FV","row5Unit","arrowXFV","arrowYFV"],zbt=["mosaic"],Ubt={useAlias:!1,multiObject:!0,source:"mosaic"},Hbt=200,jbt={DEFAULT:Rbt,OPTIONS:Vbt,DATA:Bbt,PARAMS:Fbt,SOURCE:zbt,COMMON:Ubt,ITEMS:Hbt},Gbt=o.defineComponent(tt(Ne({},jbt),{__name:"gnssMapView",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){const e=n,t=3e3,r=2500,i={GNSS:"GNSS",gnss:"GNSS",DEEP:"DEEP",deep:"DEEP",深部位移:"DEEP",RADAR:"RADAR",radar:"RADAR",雷达:"RADAR",SURFACE:"SURFACE",surface:"SURFACE",地表:"SURFACE",CRACK:"CRACK",crack:"CRACK",裂缝:"CRACK",FIRE:"FIRE",fire:"FIRE",煤自燃:"FIRE",WATER:"WATER",water:"WATER",降雨:"WATER",GROUND:"GROUND",ground:"GROUND",地下水:"GROUND",STRESS:"STRESS",stress:"STRESS",应力:"STRESS",VIB:"VIB",vib:"VIB",爆破震动:"VIB",SAT:"SAT",sat:"SAT",遥感卫星:"SAT"},a={GNSS:"📍",DEEP:"⚓",RADAR:"📡",SURFACE:"📐",CRACK:"🧱",FIRE:"🔥",WATER:"💧",GROUND:"🌍",STRESS:"📊",VIB:"💥",SAT:"🛸"},s=[{key:"GNSS",label:"GNSS监测",icon:"📍"},{key:"DEEP",label:"深部位移监测",icon:"⚓"},{key:"RADAR",label:"雷达监测",icon:"📡"},{key:"SURFACE",label:"地质写实",icon:"📐"},{key:"CRACK",label:"裂缝监测",icon:"🧱"},{key:"FIRE",label:"煤自燃监测",icon:"🔥"},{key:"WATER",label:"降雨监测",icon:"💧"},{key:"GROUND",label:"地下水监测",icon:"🌍"},{key:"STRESS",label:"应力监测",icon:"📊"},{key:"VIB",label:"振动监测",icon:"💥"},{key:"SAT",label:"遥感监测",icon:"🛸"}],l=["#F57676","#FFA500","#fadb14","#66B1FF","#71C446"],c=[{name:"北帮",xRange:[800,2200],yRange:[200,600]},{name:"南帮",xRange:[800,2200],yRange:[1900,2300]},{name:"西帮",xRange:[200,700],yRange:[800,1700]},{name:"东帮",xRange:[2300,2800],yRange:[800,1700]},{name:"中央区",xRange:[1100,1900],yRange:[1e3,1500]}],u=["#F57676","#FFA500","#66B1FF","#71C446","#9254de","#13c2c2"];class d extends Cn{extractStyles(){var _e,ze,Pe,Be,at,ft,Mt,Vt,xn,sn,Tt,ct,At,Yt,un,Mn,Xt,Bn,_t;const Ie=(_e=this.props.conf)==null?void 0:_e.options,xe=((ze=Ie==null?void 0:Ie.linkChannel)==null?void 0:ze.value)||"gnss",he=((Pe=Ie==null?void 0:Ie.customChannel)==null?void 0:Pe.value)||"";return{bgColor:((Be=Ie==null?void 0:Ie.bgColor)==null?void 0:Be.value)||"#0b1a31",toolbarBg:((at=Ie==null?void 0:Ie.toolbarBg)==null?void 0:at.value)||"#ffffff",toolbarFontSize:((ft=Ie==null?void 0:Ie.toolbarFontSize)==null?void 0:ft.value)||12,geologyMapUrl:((Mt=Ie==null?void 0:Ie.geologyMapUrl)==null?void 0:Mt.value)||"",dtmMapUrl:((Vt=Ie==null?void 0:Ie.dtmMapUrl)==null?void 0:Vt.value)||"",uavMapUrl:((xn=Ie==null?void 0:Ie.uavMapUrl)==null?void 0:xn.value)||"",satelliteMapUrl:((sn=Ie==null?void 0:Ie.satelliteMapUrl)==null?void 0:sn.value)||"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",mapCenterLon:(ct=(Tt=Ie==null?void 0:Ie.mapCenterLon)==null?void 0:Tt.value)!=null?ct:119.40331,mapCenterLat:(Yt=(At=Ie==null?void 0:Ie.mapCenterLat)==null?void 0:At.value)!=null?Yt:45.369465,mapZoomLevel:(Mn=(un=Ie==null?void 0:Ie.mapZoomLevel)==null?void 0:un.value)!=null?Mn:10,mapElevation:(Bn=(Xt=Ie==null?void 0:Ie.mapElevation)==null?void 0:Xt.value)!=null?Bn:1e3,pointCount:((_t=Ie==null?void 0:Ie.pointCount)==null?void 0:_t.value)||80,linkChannel:xe==="custom"&&he?he:xe}}onLinkEvent(Ie){pe(Ie)}setSocketData(Ie){if(!(Ie!=null&&Ie.data))return;const xe=Ie.object_id||"";if(!xe)return;const he=_.value.find(Be=>Be.objectId===xe);if(!he)return;const _e=Ie.data,ze=Be=>{const at=parseFloat(Be);return isNaN(at)?String(Be):at.toFixed(2)};let Pe=!1;if(he.fvXCoord&&_e[he.fvXCoord]!=null){const Be=parseFloat(_e[he.fvXCoord]);isNaN(Be)||(he.x=Be,Pe=!0)}if(he.fvYCoord&&_e[he.fvYCoord]!=null){const Be=parseFloat(_e[he.fvYCoord]);isNaN(Be)||(he.y=Be,Pe=!0)}if(Pe&&K(_.value),he.fvDeviceName&&_e[he.fvDeviceName]!=null&&(he.liveValues.deviceName=String(_e[he.fvDeviceName])),he.fvElevation&&_e[he.fvElevation]!=null&&(he.liveValues.elevation=ze(_e[he.fvElevation])),he.rows.forEach((Be,at)=>{if(!Be.fv)return;const Mt=Be.fv.split("|").map(Vt=>Vt.trim()).map(Vt=>_e[Vt]!=null?ze(_e[Vt]):null).filter(Boolean);Mt.length&&(he.liveValues[`row_${at}`]=Mt.join("/"))}),he.arrowXFV&&_e[he.arrowXFV]!=null&&(he.liveValues.arrowX=ze(_e[he.arrowXFV])),he.arrowYFV&&_e[he.arrowYFV]!=null&&(he.liveValues.arrowY=ze(_e[he.arrowYFV])),he.arrowXFV||he.arrowYFV){const Be=parseFloat(he.liveValues.arrowX||"0")||0,at=parseFloat(he.liveValues.arrowY||"0")||0;(Be!==0||at!==0)&&(he.liveValues.arrowAngle=String(Math.round(Math.atan2(at,Be)*180/Math.PI*10)/10))}}}const f=new d(e,"gnssMapView");f.setupLifecycle();const h=f.getStyle(),p=o.ref(null),m=o.ref(null),v=o.ref(null),g=o.ref(null),y=o.ref(!1),b=o.reactive(new Set(s.map(Fe=>Fe.key)));let x=null;const _=o.ref([]),w=o.ref([]),S=o.reactive({scale:.4,posX:0,posY:0,displayMode:"geology",selectedRegion:"全部",selectedLine:"全部",selectedPoints:["__ALL__"]});let C=null,E=null;const T=o.ref(!1),A=o.reactive({x:0,y:0}),M=o.reactive({visible:!1,x:0,y:0,content:""}),D=o.reactive({picking:!1,pickedPoints:[],dialogVisible:!1});let k=null;const P=o.ref(""),I={onWheel:Fe=>{Fe.preventDefault(),Z(Fe)},onMousedown:Fe=>me(Fe),onMousemove:Fe=>be(Fe),onMouseup:()=>ye(),onMouseleave:()=>ye()},N=o.computed(()=>({backgroundColor:h.value.bgColor})),R=o.computed(()=>({geology:h.value.geologyMapUrl,dtm:h.value.dtmMapUrl,uav:h.value.uavMapUrl,leaflet:h.value.satelliteMapUrl})[S.displayMode]||""),V=o.computed(()=>({transform:`translate(${S.posX}px, ${S.posY}px) scale(${S.scale})`,width:t+"px",height:r+"px",backgroundImage:R.value?`url(${R.value})`:"none"})),B=o.computed(()=>{const Fe=new Set;return _.value.forEach(Ie=>{Ie.region&&Fe.add(Ie.region)}),Array.from(Fe)}),F=o.computed(()=>w.value.map(Fe=>Fe.name)),G=o.computed(()=>_.value.filter(Fe=>{const Ie=S.selectedRegion==="全部"||Fe.region===S.selectedRegion,xe=S.selectedLine==="全部"||Fe.lineName===S.selectedLine;return Ie&&xe}).map(Fe=>({value:Fe.id,label:`${Fe.deviceId}${Fe.region?`(${Fe.region})`:""}`}))),U=o.computed(()=>{const Fe=S.selectedPoints||[];if(Fe.length===0||Fe.includes("__ALL__"))return"全部监测点";if(Fe.length===1){const Ie=G.value.find(xe=>xe.value===Fe[0]);return(Ie==null?void 0:Ie.label)||"已选1个监测点"}return`已选${Fe.length}个监测点`}),z=o.computed(()=>{const Fe=S.selectedPoints||[],Ie=Fe.length===0||Fe.includes("__ALL__");return _.value.filter(xe=>{const he=b.has(xe.type),_e=S.selectedRegion==="全部"||xe.region===S.selectedRegion,ze=S.selectedLine==="全部"||xe.lineName===S.selectedLine,Pe=Ie||Fe.includes(xe.id);return he&&_e&&ze&&Pe})}),j=Fe=>{if(!Array.isArray(Fe)){S.selectedPoints=["__ALL__"];return}const Ie=new Set(G.value.map(he=>he.value));let xe=Fe.filter(he=>he==="__ALL__"||Ie.has(he));if(xe.includes("__ALL__")&&xe.length>1&&(xe=xe.filter(he=>he!=="__ALL__")),xe.length===0){S.selectedPoints=["__ALL__"];return}S.selectedPoints=xe},W=o.computed(()=>b.has("GNSS")?w.value.filter(Fe=>S.selectedRegion!=="全部"&&Fe.region!==S.selectedRegion||S.selectedLine!=="全部"&&Fe.name!==S.selectedLine?!1:Fe.pointIds.filter(xe=>z.value.some(he=>he.id===xe)).length>=2):[]),Y=Fe=>{const Ie=Fe.isOnline?l[Fe.alarmIdx]||"#71C446":"#999";return{left:Fe.x+"px",top:Fe.y+"px",backgroundColor:Ie,color:Ie}},re=Fe=>D.pickedPoints.some(Ie=>Ie.id===Fe.id),Q=o.computed(()=>{var Fe;return((Fe=e.conf)==null?void 0:Fe.data)||[]}),$=()=>{const Fe=Q.value;Fe.length>0?X(Fe):ne()},ee={GNSS:[{label:"累计位移",unit:"mm"},{label:"当前速度",unit:"mm/h"},{label:"X/Y/H变化",unit:"mm"}],DEEP:[{label:"深层位移",unit:"mm"},{label:"测斜深度",unit:"m"}],RADAR:[{label:"形变量",unit:"mm"},{label:"形变速度",unit:"mm/d"}],SURFACE:[{label:"垂直位移",unit:"mm"},{label:"水平位移",unit:"mm"}],CRACK:[{label:"裂缝宽度",unit:"mm"},{label:"开列速度",unit:"mm/d"}],FIRE:[{label:"温度",unit:"℃"},{label:"CO浓度",unit:"ppm"}],WATER:[{label:"降雨量",unit:"mm"},{label:"雨强",unit:"mm/h"}],GROUND:[{label:"水位",unit:"m"},{label:"渗透压力",unit:"kPa"}],STRESS:[{label:"应力值",unit:"MPa"},{label:"变化量",unit:"MPa"}],VIB:[{label:"振动速度",unit:"cm/s"},{label:"振动频率",unit:"Hz"}],SAT:[{label:"地表形变",unit:"mm"},{label:"变化速率",unit:"mm/y"}]},X=Fe=>{const Ie=[];Fe.forEach((xe,he)=>{var Yt,un,Mn,Xt,Bn,_t,gt,jt,zn,Ge;const _e=xe.name||xe.deviceId||"",ze=xe.deviceType||xe.type||"GNSS",Pe=i[ze]||i[(Yt=ze.toUpperCase)==null?void 0:Yt.call(ze)]||"GNSS",Be=xe.x,at=xe.y,ft=Be!==""&&Be!=null&&!isNaN(Number(Be)),Mt=at!==""&&at!=null&&!isNaN(Number(at)),Vt=ft?Number(Be):-9999,xn=Mt?Number(at):-9999,sn=ft?"":String(Be||""),Tt=Mt?"":String(at||""),ct=ee[Pe]||[],At=[];for(let pt=0;pt<5;pt++){const vt=xe[`row${pt+1}FV`]||"",Pt=xe[`row${pt+1}Label`]||((un=ct[pt])==null?void 0:un.label)||"",Ee=(Xt=xe[`row${pt+1}Unit`])!=null?Xt:((Mn=ct[pt])==null?void 0:Mn.unit)||"";(vt||Pt)&&At.push({label:Pt,fv:vt,unit:Ee})}if(At.length===0){xe.fvDisplacement&&At.push({label:((Bn=ct[0])==null?void 0:Bn.label)||"累计位移",fv:xe.fvDisplacement,unit:((_t=ct[0])==null?void 0:_t.unit)||xe.unitDisplacement||"mm"}),xe.fvSpeed&&At.push({label:((gt=ct[1])==null?void 0:gt.label)||"当前速度",fv:xe.fvSpeed,unit:((jt=ct[1])==null?void 0:jt.unit)||xe.unitSpeed||"mm/h"});const pt=[xe.fvX,xe.fvY,xe.fvH].filter(Boolean);pt.length&&At.push({label:((zn=ct[2])==null?void 0:zn.label)||"X/Y/H变化",fv:pt.join("|"),unit:((Ge=ct[2])==null?void 0:Ge.unit)||xe.unitXYH||"mm"})}Ie.push({id:_e||`pt-${he}`,type:Pe,alarmIdx:typeof xe.alarmIdx=="number"?xe.alarmIdx:4,isOnline:xe.isOnline!==!1,deviceId:_e||`${Pe}${he}`,region:xe.region||"未分区",x:Vt,y:xn,isOnDetectionLine:!!xe.lineName,lineName:xe.lineName||"",objectId:xe.object_id||"",fvDeviceName:xe.fvDeviceName||"",fvXCoord:sn,fvYCoord:Tt,fvElevation:xe.elevation||xe.高程||"",rows:At,arrowXFV:xe.arrowXFV||"",arrowYFV:xe.arrowYFV||"",liveValues:{}})}),_.value=Ie,K(Ie)},ne=()=>{const Fe=h.value.pointCount||80,Ie=Object.keys(a),xe=[],he=[],_e=60,ze={};c.forEach(Pe=>ze[Pe.name]=0);for(let Pe=0;Pe<Fe;Pe++){let Be=Ie[Pe%Ie.length];Pe<7?Be="RADAR":Be==="RADAR"&&(Be="GNSS");const at=Pe*7%5,ft=Pe%8!==0,Mt=c[Pe%c.length];let Vt=!1,xn="";Be==="GNSS"&&ze[Mt.name]<3&&(Vt=!0,xn=`${Mt.name}线`,ze[Mt.name]++);let sn=0,Tt=0,ct=0;for(;ct<100;){if(Vt){const Yt=ze[Mt.name]-1;Mt.name==="北帮"||Mt.name==="南帮"?(Tt=(Mt.yRange[0]+Mt.yRange[1])/2,sn=Mt.xRange[0]+300+Yt*250):(sn=(Mt.xRange[0]+Mt.xRange[1])/2,Tt=Mt.yRange[0]+300+Yt*250)}else sn=Mt.xRange[0]+Math.random()*(Mt.xRange[1]-Mt.xRange[0]),Tt=Mt.yRange[0]+Math.random()*(Mt.yRange[1]-Mt.yRange[0]);if(!he.some(Yt=>Math.hypot(sn-Yt.x,Tt-Yt.y)<_e))break;ct++}he.push({x:sn,y:Tt}),xe.push({id:`pt-${Pe}`,type:Be,alarmIdx:at,isOnline:ft,deviceId:`${Be}${Pe}`,region:Mt.name,x:sn,y:Tt,isOnDetectionLine:Vt,lineName:xn,objectId:"",fvDeviceName:"",fvXCoord:"",fvYCoord:"",fvElevation:"",rows:[],arrowXFV:"",arrowYFV:"",liveValues:{}})}_.value=xe,K(xe)},K=Fe=>{const Ie=new Map;Fe.filter(_e=>_e.lineName&&_e.x!==-9999&&_e.y!==-9999).forEach(_e=>{Ie.has(_e.lineName)||Ie.set(_e.lineName,[]),Ie.get(_e.lineName).push(_e)});const xe=[];let he=0;Ie.forEach((_e,ze)=>{var at,ft,Mt,Vt;const Pe=Math.abs(((at=_e[_e.length-1])==null?void 0:at.x)-((ft=_e[0])==null?void 0:ft.x)),Be=Math.abs(((Mt=_e[_e.length-1])==null?void 0:Mt.y)-((Vt=_e[0])==null?void 0:Vt.y));if(_e.sort((xn,sn)=>Pe>=Be?xn.x-sn.x:xn.y-sn.y),_e.length>=2){const xn=`M ${_e[0].x+16} ${_e[0].y+16} `+_e.slice(1).map(Tt=>`L ${Tt.x+16} ${Tt.y+16}`).join(" "),sn=_e[0].region||"";xe.push({name:ze,region:sn,color:u[he%u.length],path:xn,pointIds:_e.map(Tt=>Tt.id)}),he++}}),w.value=xe},Z=Fe=>{const Ie=p.value;if(!Ie)return;const xe=Math.min(Math.max(.15,S.scale+Fe.deltaY*-.001),2.5),he=Ie.getBoundingClientRect(),_e=Fe.clientX-he.left,ze=Fe.clientY-he.top,Pe=xe/S.scale;S.posX=_e-(_e-S.posX)*Pe,S.posY=ze-(ze-S.posY)*Pe,S.scale=xe},me=Fe=>{Fe.button===0&&(T.value=!0,A.x=Fe.clientX-S.posX,A.y=Fe.clientY-S.posY)},be=Fe=>{T.value&&(S.posX=Fe.clientX-A.x,S.posY=Fe.clientY-A.y)},ye=()=>{T.value=!1},ie=()=>{const Fe=p.value;if(!Fe){S.scale=.4,S.posX=0,S.posY=0;return}const Ie=Fe.clientWidth,xe=Fe.clientHeight;if(Ie===0||xe===0){S.scale=.4,S.posX=0,S.posY=0;return}const he=Ie/t,_e=xe/r,ze=Math.min(he,_e)*.9;S.scale=Math.max(.15,Math.min(ze,1.5)),S.posX=(Ie-t*S.scale)/2,S.posY=(xe-r*S.scale)/2},ue=Fe=>{if(e.mode!=="edit"){if(D.picking){const Ie=D.pickedPoints.findIndex(xe=>xe.id===Fe.id);if(Ie>=0){D.pickedPoints.splice(Ie,1);return}D.pickedPoints.length<2&&D.pickedPoints.push(Fe),D.pickedPoints.length===2&&(D.picking=!1,D.dialogVisible=!0);return}Fe.isOnline&&(P.value=Fe.id,setTimeout(()=>{P.value===Fe.id&&(P.value="")},3e3),f.publish({objectId:Fe.objectId,deviceId:Fe.deviceId,point:Fe.deviceId,deviceType:Fe.type,region:Fe.region,alarmIdx:Fe.alarmIdx}))}},le=(Fe,Ie)=>{var ze,Pe;M.visible=!0,M.x=Fe.clientX-(((ze=p.value)==null?void 0:ze.getBoundingClientRect().left)||0)+15,M.y=Fe.clientY-(((Pe=p.value)==null?void 0:Pe.getBoundingClientRect().top)||0)+15;const xe=Ie.liveValues;let he="";Ie.rows.forEach((Be,at)=>{var Vt;if(!Be.fv)return;const ft=(Vt=xe[`row_${at}`])!=null?Vt:"--",Mt=Be.label||"测量值";he+=`<div>${Mt}: <b style="color:#fff">${ft}</b>${Be.unit?" "+Be.unit:""}</div>`}),he||(he='<div style="color:rgba(255,255,255,0.4);font-size:11px">暂未配置测量字段</div>');const _e=Ie.fvDeviceName&&xe.deviceName?xe.deviceName:Ie.deviceId;M.content=`
3991
3991
  <b style="color:#85C6F1;">[${Ie.region}] ${_e}</b>
@@ -8992,4 +8992,4 @@ function sendPendingMessages() {\r
8992
8992
  // 清空待处理列表\r
8993
8993
  pendingMessages = [];\r
8994
8994
  }\r
8995
- `,Aln="MixDashboards-DataChannel";function Tln(){const n=localStorage.getItem("dashboardUseLocalToken");return n==="1"||n==="true"}function Mln(n){const e=o.ref(!1),t=new hI;let r=null;if(n)try{{const l=new Blob([Eln],{type:"application/javascript"}),c=URL.createObjectURL(l);r=new SharedWorker(c,{type:"classic",name:Aln}),console.log("✅ [BasePreview] SharedWorker 已创建 (内联 Blob,适配 npm 单包)")}}catch(l){console.warn("⚠️ [BasePreview] SharedWorker 创建失败:",l)}const i=()=>Ve(null,null,function*(){const l=localStorage.getItem("globalApiUrl"),c=localStorage.getItem("globalAppId"),u=localStorage.getItem("globalAppSecret"),d=localStorage.getItem("globalApiToken");if((Number(localStorage.getItem("dashboardIsMixiot")||"1")||0)===1)return!!d;if(!l&&!c&&!u)return!0;if(!l)return yield Ue.ElMessageBox.alert("请先在全局设置中配置平台地址","配置错误",{confirmButtonText:"确定",type:"warning"}),!1;if(!Tln()&&(!c||!u))return yield Ue.ElMessageBox.alert("请先在全局设置中配置授权编号和授权密钥","配置错误",{confirmButtonText:"确定",type:"warning"}),!1;if(!d)return yield Ue.ElMessageBox.alert("Token 不存在,请检查网络连接或重新配置授权信息","Token 错误",{confirmButtonText:"确定",type:"error"}),!1;try{return(yield bf.getValidToken())?!0:(yield Ue.ElMessageBox.alert("Token 无效或已过期,请重新配置授权信息","Token 错误",{confirmButtonText:"确定",type:"error"}),!1)}catch(h){return console.error("[预览] Token 验证失败:",h),yield Ue.ElMessageBox.alert("Token 验证失败,请检查网络连接或重新配置授权信息","Token 错误",{confirmButtonText:"确定",type:"error"}),!1}}),a=()=>Ve(null,null,function*(){var p;const l=localStorage.getItem("globalApiUrl"),c=localStorage.getItem("globalAppId"),u=localStorage.getItem("globalAppSecret");(Number(localStorage.getItem("dashboardIsMixiot")||"1")||0)===1?e.value=!!(l&&localStorage.getItem("globalApiToken")):e.value=!!(l&&c&&u);let f="";if(e.value)try{f=yield bf.getValidToken()}catch(m){console.error("[WebSocket] 获取 ApiProxy Token 失败:",m),Ue.ElMessage.error("获取平台 Token 失败,实时数据可能无法正常显示");return}else f=((p=xi.getUser())==null?void 0:p.token)||"";const h=B5e();r.port.postMessage({type:"reconnect",url:h,token:f,sysMode:localStorage.getItem("sys_mode")||"",useApiProxy:e.value})}),s=()=>Ve(null,null,function*(){if(!n){console.log("[F12][BasePreview] initDataConnection skipped (enableWebSocket=false)");return}try{const{getAuthToken:l}=yield Promise.resolve().then(()=>Pnt);let c="";try{c=yield l()}catch(p){if((p instanceof Error?p.message:String(p)).includes("本地登录 token 不存在,请先登录")){console.warn("[F12][BasePreview] initDataConnection skipped: no local token",p);return}else throw p}const u=localStorage.getItem("globalApiUrl")||"",d=Number(localStorage.getItem("dashboardIsMixiot")||"1")||0;console.log("[F12][BasePreview] initDataConnection config",{isMixiot:d,globalApiUrl:u,hasToken:!!c});const f=!!c&&d!==1&&!u;if(d!==1&&!u&&!c){Ue.ElMessage.error("请先在全局设置中配置平台地址"),console.error("[F12][BasePreview] initDataConnection abort: globalApiUrl missing in non-local mode");return}let h="";if(d===1||f){let m=(u||`${location.protocol}//${location.host}`).replace(/^http/,"ws");m.endsWith("/")||(m+="/"),h=`${m}ws/api`}else if(u){let p=u.replace(/^http/,"ws");p.endsWith("/")||(p+="/"),h=`${p}apiproxy/ws/api`}r&&(r.port.postMessage({type:"init_connection",url:h,token:c}),console.log("[F12][BasePreview] data connection initialized",{wsUrl:h}))}catch(l){console.error("[F12][BasePreview] initDataConnection failed:",l),Ue.ElMessage.error("数据连接初始化失败")}});return r&&(t.init(r),r.port.onmessage=l=>{t.processWorkerMessage(l)}),{sharedWorker:r,session:t,useApiProxy:e,checkApiProxyConfig:i,initWebSocketConnection:a,initDataConnection:s}}const Dte={pc_pro:"ProContainer",mobile_pro:"AppContainer",pc_dashboard:"ProContainer",mobile_dashboard:"AppContainer",screen_dashboard:"ShowContainer"};function Dln(n,e,t,r,i={}){const a=i.themeRootRef,s=()=>{var S;if(a!=null&&a.value)return a.value;const _=m(),w=(S=Dte[_])!=null?S:Dte[Rp];return w?document.getElementById(w):null},l=o.reactive({margin:[10,10],height:40}),c=o.computed(()=>{const _=Number(l.height);return typeof _=="number"&&!Number.isNaN(_)&&_>0?_:40});let u=null;const d=(_,w=40)=>{const S=Number(_);return typeof S=="number"&&!Number.isNaN(S)&&S>0?S:w},f=_=>(Array.isArray(_==null?void 0:_.layers)?_.layers:[]).flatMap(S=>Array.isArray(S==null?void 0:S.components)?S.components:[]),h=(_,w)=>{if(w<80)return!1;const S=f(_).map(C=>Number(C==null?void 0:C.h)).filter(C=>Number.isFinite(C)&&C>0);return S.length?Math.max(...S)<=5:!1},p=(_,w)=>h(_,w)?Math.max(1,Math.round(w/5)):w,m=()=>{var _;return i9((_=e.value)==null?void 0:_.type)},v=()=>{const _=n.value;if(!_)return;const w=m();let S=_.col||20;S=Math.max(1,S);const C=l.margin[0];if(w===Ff){const E=p(_,Math.max(1,_.col||100));let T=Number(_.screenHeight)||1080;T=T-(E+1)*C,l.height=d(T/E,40);return}if(w===Rp){const E=Math.max(1,Number(_.screenWidth)||1920),T=p(_,S),A=E-(T+1)*C;l.height=d(Math.round(A/T),40);return}if(w===Y1){const T=359-(S+1)*C;l.height=d(Math.round(T/S),40);return}},g=()=>{var S;const _=t.value;_&&(_.style.width="",_.style.height="",_.style.transform="",_.style.transformOrigin="");const w=m();if(w!==Ff){const C=s();C&&(C.style.width="",C.style.height="",C.style.transform="",C.style.transformOrigin="")}if(w===Ff){const C=n.value,E=Number(C==null?void 0:C.screenWidth),T=Number(C==null?void 0:C.screenHeight);if(!E||!T){v();return}const A=s();if(!A){v();return}const M=A,D=typeof window!="undefined"&&new URLSearchParams(window.location.search).get("embed")==="1",k=A.parentElement,I=(D?M==null?void 0:M.parentElement:null)||k||r.value||((S=t.value)==null?void 0:S.parentElement)||document.documentElement,N=I.getBoundingClientRect(),R=Math.max(1,N.width||I.clientWidth),V=Math.max(1,N.height||I.clientHeight),B=V/T,F=R/E,G=Math.min(F,B),U=(R-E*G)/2,z=(V-T*G)/2;A.style.width=`${E}px`,A.style.height=`${T}px`,A.style.transformOrigin="top left",A.style.transform=`scale(${G}, ${G}) translate(${U/G}px, ${z/G}px)`,v();return}v()},y=()=>{g()};return{grid:l,safeRowHeight:c,getHeight:v,autoSize:g,refitLayout:y,initResizeObserver:()=>{var w,S;const _=r.value||((S=(w=t.value)==null?void 0:w.parentElement)==null?void 0:S.parentElement)||t.value;_&&(u=new ResizeObserver(()=>{y()}),u.observe(_))},cleanup:()=>{u&&(u.disconnect(),u=null)}}}function Lln(n,e){n&&o.nextTick(()=>{var a;let t=0;n.querySelectorAll(".vgl-layout").forEach(s=>{t=Math.max(t,s.offsetHeight)});const r=((a=n.parentElement)==null?void 0:a.clientHeight)||n.clientHeight,i=Math.max(r,t+8);i>0?n.style.minHeight=`${i}px`:n.style.minHeight=""})}function Lte(n){n&&n.querySelectorAll(".vgl-layout").forEach(e=>{e.style.width="100%";const t=e.__resizeCallback;typeof t=="function"&&t({target:e,contentRect:e.getBoundingClientRect()})})}const Nln=["data-theme"],Oln=["id","data-theme"],Pln=["src"],kln=["data-layer-id"],Iln={key:1,class:"preview-global-loading","aria-busy":"true","aria-live":"polite"},Rln=o.defineComponent({name:"MixBasePreview",__name:"index",props:{script:{},uid:{},mixiotDashboardUid:{},enableWebSocket:{type:Boolean,default:!0},followHostTheme:{type:Boolean,default:!1},hostProMenuTitle:{default:""},hostMenuToSheetRules:{},isProduct:{type:Boolean,default:!1},agent:{default:""},releaseEmbedAgentOnUnmount:{type:Boolean,default:!0},mobileEmbed:{type:Boolean,default:!1}},emits:["ready"],setup(n,{expose:e,emit:t}){var Pt;const r=n,i=t,a=o.computed(()=>!!r.followHostTheme),s={pc_pro:"ProContainer",mobile_pro:"AppContainer",pc_dashboard:"ProContainer",mobile_dashboard:"AppContainer",screen_dashboard:"ShowContainer",pro:"ProContainer",app:"AppContainer",show:"ShowContainer"},l=o.ref({sheets:[],type:""}),c=o.computed(()=>{var Oe;const Ee=i9((Oe=l.value)==null?void 0:Oe.type);return Ee===Rp||Ee===Y1}),u=o.computed(()=>{var Ee;return i9((Ee=l.value)==null?void 0:Ee.type)===Y1}),d=o.computed(()=>!!r.mobileEmbed&&u.value),f=o.ref(0),h=o.computed(()=>l.value.sheets[f.value]),p=o.ref(null),m=o.ref(null),v=o.ref(null),{currentTheme:g,initTheme:y,cleanup:b}=vln(a),{grid:x,safeRowHeight:_,getHeight:w,autoSize:S,refitLayout:C,initResizeObserver:E,cleanup:T}=Dln(h,l,p,m,{themeRootRef:v}),{tabDisplayMode:A,isTabVisible:M,visibleSheetIndexes:D,visibleSheets:k,hideTabs:P,showTabs:I,getSheetItemStyle:N,sheetWrapStyle:R,checkItem:V,initTabTimer:B,cleanup:F}=gln(l,f,()=>Ae()),{orderedLayers:G,visibleModalType:U,visibleModalOpen:z,visibleModalRenderLayer:j,visibleModalSheet:W,visibleModalSheetStickyLayer:Y,showModal:re,hideModalLayer:Q,toggleModal:$,handleComponentEvent:ee,isComponentBoundToMarker:X,getModalContainerStyle:ne,handleLinkHubModalEvent:K}=yln(h,l,f),Z=o.ref({});let me={};const be=o.ref(!1),ye=o.ref(!0);let ie=0,ue=!1;typeof window!="undefined"&&(window.__mix_base_preview_active=!0);const le=o.ref(0);o.provide(kte,le);const oe=()=>Ve(null,null,function*(){yield o.nextTick(),yield new Promise(Ee=>requestAnimationFrame(()=>Ee())),yield new Promise(Ee=>requestAnimationFrame(()=>Ee()))}),de=()=>{S()},Ae=()=>Ve(null,null,function*(){var Oe;de(),yield oe();const Ee=(Oe=p.value)!=null?Oe:v.value;Lte(Ee),le.value++,yield oe(),Lte(Ee),se()}),pe=()=>Ve(null,null,function*(){window.__mix_preview_params=l.value,yield o.nextTick(),yield Ae()}),se=()=>{var Oe,ve,ce;if(i9((Oe=l.value)==null?void 0:Oe.type)!==Rp)return;const Ee=(ce=p.value)!=null?ce:(ve=v.value)==null?void 0:ve.querySelector(".layout .canvas");Lln(Ee)},Me=()=>{Ae(),se()},He=o.computed(()=>{var Ee;return(Ee=r.hostProMenuTitle)!=null?Ee:""}),ot=o.computed(()=>r.hostMenuToSheetRules),{activeDashboardUid:nt,boardSwitchEpoch:Re,showProAppMenu:Ze,visibleProMenuRows:qe,isProMenuGroupExpanded:je,toggleProMenuGroup:Je,applyProApplicationScript:$e,handleProMenuRowClick:kt,resetProMenu:Rt,getProAppActiveMenuTitle:xt,resolveInitialSheetIndexFromHostMenuTitle:Fe,applyHostMenuInitialSheet:Ie,firstVisibleSheetIndex:xe}=Cln(l,f,pe,me,He,ot),{sharedWorker:he,session:_e,initDataConnection:ze}=Mln((Pt=r.enableWebSocket)!=null?Pt:!0),Pe=Ee=>({x:Ee.x,y:Ee.y,w:Ee.w,h:Ee.h,i:Ee.i}),Be=o.computed(()=>{var Oe;const Ee=(Oe=h.value)==null?void 0:Oe.background;return Ee?Ee==="defaultBg1"?`url(${Psn})`:Ee==="defaultBg2"?`url(${ksn})`:Ee.startsWith("#")||Ee.startsWith("rgb")||Ee.startsWith("rgba")?Ee:"transparent":""}),at=o.ref("");let ft=null,Mt=0,Vt=null;const xn=()=>{ft&&(URL.revokeObjectURL(ft),ft=null)};function sn(){return Ve(this,null,function*(){var ce,Le;const Ee=(Le=(ce=h.value)==null?void 0:ce.background)==null?void 0:Le.trim(),Oe=++Mt;if(Vt==null||Vt.abort(),Vt=new AbortController,!Ee){xn(),at.value="";return}if(Ee==="defaultBg1"||Ee==="defaultBg2"){xn(),at.value="";return}if(Ee.startsWith("#")||Ee.startsWith("rgb")||Ee.startsWith("rgba")){xn(),at.value="";return}if(Ee.startsWith("blob:")||Ee.startsWith("data:")){xn(),at.value=Ee;return}const ve=Pw(yp(Ee));if(!ve){xn(),at.value="";return}try{xn();const Ke={},yt=U6();yt&&(Ke.Authorization=`Bearer ${yt}`);const ht=yield fetch(ve,{mode:"cors",credentials:"include",signal:Vt.signal,headers:Ke});if(Oe!==Mt)return;if(!ht.ok){console.warn("[Preview] background fetch failed",ht.status,ve),at.value="";return}const Nt=yield ht.blob();if(Oe!==Mt)return;if(!Nt.size){at.value="";return}ft=URL.createObjectURL(Nt),at.value=ft}catch(Ke){if((Ke==null?void 0:Ke.name)==="AbortError"||Oe!==Mt)return;console.warn("[Preview] background fetch error",Ke),at.value=""}})}o.watch(()=>{var Ee;return(Ee=h.value)==null?void 0:Ee.background},()=>{sn()},{immediate:!0});const Tt=Ee=>Ve(null,null,function*(){if(!Ee||!be.value)return;const Oe=Cp(Ee),ve=cCe(Ee),ce=rse(Oe||ve);if(ce){const Le=tse(ce);Le&&(A.value=Le)}(yield $e(Oe))||(Rt(),l.value=nse(ve||Ee,me),f.value=0,Ie(),yield pe())});function ct(Ee){var ce,Le;const Oe=Number((ce=Ee.order)!=null?ce:0),ve=Ee.isSticky?1e3+Oe:Oe;return{opacity:((Le=Ee.opacity)!=null?Le:100)/100,zIndex:ve,pointerEvents:"none"}}function At(){o.nextTick(()=>{se(),le.value++})}const Yt=Ee=>{var Le,Ke;const Oe=(Le=Ee==null?void 0:Ee.detail)==null?void 0:Le.layerId;if(typeof Oe!="string"||!Oe)return;const ve=(Ke=h.value)==null?void 0:Ke.layers;if(!(ve!=null&&ve.length)||!ve.some(yt=>yt.id===Oe))return;wte(ve,Oe,"top");const ce=ve.find(yt=>yt.id===Oe);ce&&(ce.visible=!0),At()},un=Ee=>{var Le,Ke;const Oe=(Le=Ee==null?void 0:Ee.detail)==null?void 0:Le.layerId;if(typeof Oe!="string"||!Oe)return;const ve=(Ke=h.value)==null?void 0:Ke.layers;if(!(ve!=null&&ve.length)||!ve.some(yt=>yt.id===Oe))return;wte(ve,Oe,"bottom");const ce=ve.find(yt=>yt.id===Oe);ce&&(ce.visible=!1),At()},Mn=Ee=>{const Oe=(Ee==null?void 0:Ee.detail)||{},ve=Oe.action||"show";if(!(!Oe.layerId&&ve!=="hide")){if(ve==="hide"){Q();return}if(ve==="toggle"){$(Oe);return}re(Oe)}},Xt=()=>Ve(null,null,function*(){return{}}),Bn=ua(),_t=new Set;let gt=null,jt=null;const zn=()=>{var Oe;const Ee=(Oe=m.value)!=null?Oe:v.value;!Ee||typeof IntersectionObserver=="undefined"||(jt==null||jt.disconnect(),jt=new IntersectionObserver(ve=>{ve.some(ce=>ce.isIntersecting&&ce.intersectionRatio>0)&&Ae()},{threshold:[0,.01]}),jt.observe(Ee))};o.onMounted(()=>Ve(null,null,function*(){(window.opener||window.parent!==window)&&document.body.classList.add("mix-preview-mode"),yield Ge(),window.addEventListener("mix-modal",Mn),window.addEventListener("mix-layer-bring-top",Yt),window.addEventListener("mix-layer-send-bottom",un),y(C);const Ee=yield Xt();Ee&&Object.keys(Ee).length>0&&sessionStorage.setItem("object_alias_uid_mapping",JSON.stringify(Ee));try{Z.value=yield F9.loadComponents(),me=yield F9.getAllExposedProps(),be.value=!0}catch(Oe){console.error("[BasePreview] elements 加载失败:",Oe),Z.value={},me={},be.value=!0}yield ze(),window.__mix_preview_params=l.value,yield o.nextTick(),C(),E(),zn(),gt=o.watch(()=>Bn.channels,Oe=>{!l.value||!l.value.sheets||l.value.sheets.length===0||Object.keys(Oe).forEach(ve=>{const ce=Oe[ve];if(!ce||!ce.topic)return;const Le=ce.topic.uniqueId;_t.has(Le)||(_t.add(Le),console.log("[LinkHub Modal] 检测到新事件:",{channel:ve,newEventId:Le,event:JSON.parse(JSON.stringify(ce))}),K(ve,ce))})},{deep:!0,immediate:!1}),o.nextTick(()=>{w(),se(),B()}),(l.value.type==="screen_dashboard"||l.value.type==="show")&&(o.nextTick(()=>{S()}),window.onresize=()=>{S()})}));const Ge=()=>Ve(null,null,function*(){var Le,Ke;const Ee=((Le=xi.getMixIotInfo())==null?void 0:Le.uid)||((Ke=xi.getUser())==null?void 0:Ke.uid);W5e(),YE();let Oe;try{Oe=yield Bt.http("get_user_final_data_permission",{user_uid:Ee},!0)}catch(yt){console.warn("[BasePreview] data permission preload failed, continue with default permission:",yt),YE();return}const ve={type:"black_list",entities:{}},ce=Oe==null?void 0:Oe.result;ce&&((ce.auth_type==="white_list"||ce.auth_type==="black_list")&&(ve.type=ce.auth_type),ce.entities&&typeof ce.entities=="object"&&(ve.entities=ce.entities)),sessionStorage.setItem(Iw,JSON.stringify(ve)),YE()});o.onUnmounted(()=>{ue=!0,Mt++,Vt==null||Vt.abort(),xn(),at.value="",typeof window!="undefined"&&(window.__mix_base_preview_active=!1),nH(!1),document.body.classList.remove("mix-preview-mode"),window.removeEventListener("mix-modal",Mn),window.removeEventListener("mix-layer-bring-top",Yt),window.removeEventListener("mix-layer-send-bottom",un),F(),b(),gt&&(gt(),gt=null),T(),jt&&(jt.disconnect(),jt=null),_e&&_e.close(),sessionStorage.removeItem("object_alias_uid_mapping"),r.releaseEmbedAgentOnUnmount&&Gv("")}),o.watch(()=>r.isProduct,Ee=>nH(!!Ee),{immediate:!0}),o.watch(()=>r.agent,Ee=>Gv(Ee),{immediate:!0}),o.watch(()=>[r.script,r.uid,be.value],ve=>Ve(null,[ve],function*([Ee,,Oe]){if(!Oe){ye.value=!0;return}const ce=++ie;ye.value=!0;try{yield Tt(Ee)}finally{if(ce!==ie||ue||(yield oe(),ce!==ie||ue)||(yield Ae(),ce!==ie||ue))return;ye.value=!1,i("ready")}}),{immediate:!0});const pt=Ee=>String(Ee!=null?Ee:"").trim().replace(/\s+/g," ");o.watch(()=>[pt(r.hostProMenuTitle),r.hostMenuToSheetRules],()=>{var ve;const Ee=((ve=l.value)==null?void 0:ve.sheets)||[];if(!Array.isArray(Ee)||Ee.length<=1)return;const Oe=Fe(Ee);if(r.hostMenuToSheetRules!==void 0)f.value=Oe>=0?Oe:xe(Ee);else{if(Oe<0)return;f.value=Oe}o.nextTick(()=>{de()})},{deep:!0}),o.watch(f,()=>{se(),Ae()}),o.watch(Re,()=>{Ae(),se()}),o.watch(()=>[l.value.type,G.value,x.height,f.value],()=>se(),{deep:!0}),o.provide("sharedWorker",he),o.provide("session",_e),o.provide("switchSheet",Ee=>{Ee>=0&&Ee<l.value.sheets.length&&(f.value=Ee)});function vt(Ee){var Le;const Oe=String(Ee!=null?Ee:"").trim();if(!Oe)return-1;const ve=((Le=l.value)==null?void 0:Le.sheets)||[],ce=ve.findIndex(Ke=>Ke&&(String(Ke.id)===Oe||String(Ke.name)===Oe||String(Ke.caption)===Oe));return ce>=0&&ce<ve.length?(f.value=ce,o.nextTick(()=>{de()}),ce):-1}return o.provide("switchSheetByPageKey",vt),e({switchSheetByPageKey:vt}),o.provide("getSheets",()=>l.value.sheets),o.provide("getCurrentSheet",()=>f.value),o.provide("getProAppActiveMenuTitle",xt),o.provide("boardSwitchEpoch",Re),o.provide("mixDashboardIsProduct",o.computed(()=>!!r.isProduct)),(Ee,Oe)=>(o.openBlock(),o.createElementBlock("div",{class:"mix-base-preview-outer w-[100%] h-full min-h-0 relative","data-theme":o.unref(g)},[l.value.sheets.length>0?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"themeRootRef",ref:v,id:s[l.value.type],class:o.normalizeClass(["w-[100%] h-full min-h-0",{"mix-base-preview--fill":a.value,"mix-base-preview--pro-app":c.value,"is-mobile-preview":u.value&&!d.value,"is-mobile-embed-preview":d.value}]),"data-theme":o.unref(g)},[o.createElementVNode("div",{class:o.normalizeClass(["preview-shell",{"preview-shell--with-menu":o.unref(Ze)}])},[o.unref(Ze)?(o.openBlock(),o.createBlock(Usn,{key:0,theme:o.unref(g),rows:o.unref(qe),"active-dashboard-uid":o.unref(nt),"is-group-expanded":o.unref(je),onToggleGroup:o.unref(Je),onRowClick:o.unref(kt)},null,8,["theme","rows","active-dashboard-uid","is-group-expanded","onToggleGroup","onRowClick"])):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"previewStageRef",ref:m,class:o.normalizeClass(["preview-stage",{"preview-stage--pro-app":c.value}])},[o.createElementVNode("div",{class:"layout",style:o.normalizeStyle({background:Be.value,position:"relative"})},[h.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"canvas",ref_key:"canvasRef",ref:p},[at.value?(o.openBlock(),o.createElementBlock("img",{key:0,class:"sheet-bg-img",src:at.value,alt:"",draggable:"false"},null,8,Pln)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(G),ve=>(o.openBlock(),o.createElementBlock("div",{key:ve.id,class:"layer-container","data-layer-id":ve.id,style:o.normalizeStyle(ct(ve))},[ve.visible?(o.openBlock(),o.createBlock(o.unref(hx),{key:0,layout:ve.components,"onUpdate:layout":ce=>ve.components=ce,"col-num":h.value.col,"row-height":o.unref(_),margin:o.unref(x).margin,"is-draggable":!1,"is-resizable":!1,"is-mirrored":!1,"vertical-compact":!1,"prevent-collision":!1,"allow-collision":!0,"use-css-transforms":!0,onLayoutReady:Me},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(ve.components,ce=>{var Le;return o.openBlock(),o.createBlock(o.unref(dv),o.mergeProps({key:ce.i},{ref_for:!0},Pe(ce),{"data-id":ce.id,"data-component-id":ce.id,style:{pointerEvents:"auto",visibility:o.unref(X)(ce.id)?"hidden":"visible",zIndex:(Le=ce.zIndex)!=null?Le:1},onClick:Ke=>o.unref(ee)(ce,"click"),onDblclick:Ke=>o.unref(ee)(ce,"dblclick")}),{default:o.withCtx(()=>[Z.value[ce.type]?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(Z.value[ce.type]),{key:0,conf:ce,theme:o.unref(g),uid:r.uid,"mixiot-dashboard-uid":r.mixiotDashboardUid,mode:"preview"},{default:o.withCtx(()=>[ce.type==="placeholder"&&Ee.$slots.placeholder?o.renderSlot(Ee.$slots,"placeholder",{key:0,id:ce.id,placeholderName:ce.name||ce.caption||ce.id,conf:ce},void 0,!0):o.createCommentVNode("",!0)]),_:2},1032,["conf","theme","uid","mixiot-dashboard-uid"])):o.createCommentVNode("",!0)]),_:2},1040,["data-id","data-component-id","style","onClick","onDblclick"])}),128))]),_:2},1032,["layout","onUpdate:layout","col-num","row-height","margin"])):o.createCommentVNode("",!0),ve.visible?(o.openBlock(),o.createBlock(E_,{key:1,layer:ve},null,8,["layer"])):o.createCommentVNode("",!0)],12,kln))),128))],512)):o.createCommentVNode("",!0)],4),o.unref(k).length>1&&o.unref(A)!=="hide"?(o.openBlock(),o.createBlock(Wsn,{key:0,"tab-display-mode":o.unref(A),"is-tab-visible":o.unref(M),"current-theme":o.unref(g),"sheet-wrap-style":o.unref(R),"visible-sheets":o.unref(k),"visible-sheet-indexes":o.unref(D),"current-sheet":f.value,"get-sheet-item-style":o.unref(N),onShowTabs:o.unref(I),onHideTabs:o.unref(P),onSelect:o.unref(V)},null,8,["tab-display-mode","is-tab-visible","current-theme","sheet-wrap-style","visible-sheets","visible-sheet-indexes","current-sheet","get-sheet-item-style","onShowTabs","onHideTabs","onSelect"])):o.createCommentVNode("",!0)],2)],2),o.unref(z)?(o.openBlock(),o.createBlock(mln,{key:0,"modal-type":o.unref(U),"modal-sheet":o.unref(W),"sticky-layer":o.unref(Y),"render-layer":o.unref(j),"sheet-col":h.value.col,"safe-row-height":o.unref(_),"grid-margin":o.unref(x).margin,"element-components":Z.value,theme:o.unref(g),uid:r.uid,"mixiot-dashboard-uid":r.mixiotDashboardUid,"container-style":o.unref(ne)(o.unref(j)),"get-grid-item-props":Pe,onClose:o.unref(Q)},null,8,["modal-type","modal-sheet","sticky-layer","render-layer","sheet-col","safe-row-height","grid-margin","element-components","theme","uid","mixiot-dashboard-uid","container-style","onClose"])):o.createCommentVNode("",!0)],10,Oln)):o.createCommentVNode("",!0),ye.value?(o.openBlock(),o.createElementBlock("div",Iln,[...Oe[0]||(Oe[0]=[o.createElementVNode("div",{class:"preview-global-loading__spinner"},null,-1),o.createElementVNode("span",{class:"preview-global-loading__text"},"加载中…",-1)])])):o.createCommentVNode("",!0)],8,Nln))}}),Nv=Dt(Rln,[["__scopeId","data-v-f023cec7"]]),K8=o.defineComponent({name:"MixDesignShow",__name:"DesignShow",props:{script:{},uid:{},mixiotDashboardUid:{},enableWebSocket:{type:Boolean,default:!0},followHostTheme:{type:Boolean,default:!1},isProduct:{type:Boolean,default:!0},agent:{default:""},releaseEmbedAgentOnUnmount:{type:Boolean,default:!0}},emits:["ready"],setup(n,{emit:e}){const t=e,r=n;return(i,a)=>(o.openBlock(),o.createBlock(Nv,{script:r.script,uid:r.uid,"mixiot-dashboard-uid":r.mixiotDashboardUid,enableWebSocket:r.enableWebSocket,"follow-host-theme":r.followHostTheme,"is-product":r.isProduct,agent:r.agent,"release-embed-agent-on-unmount":r.releaseEmbedAgentOnUnmount,onReady:a[0]||(a[0]=s=>t("ready"))},o.createSlots({_:2},[i.$slots.placeholder?{name:"placeholder",fn:o.withCtx(s=>[o.renderSlot(i.$slots,"placeholder",o.normalizeProps(o.guardReactiveProps(s)))]),key:"0"}:void 0]),1032,["script","uid","mixiot-dashboard-uid","enableWebSocket","follow-host-theme","is-product","agent","release-embed-agent-on-unmount"]))}}),Vln="1.1.50";typeof console!="undefined"&&console.info&&console.info("[MixDashboards] 版本:",Vln);const Bln=[K8,d3,Mf],Fln=function(n){Bln.forEach(e=>{n.component(e.name||e.__name,e)})},zln={install:Fln,DesignShow:K8,DesignPro:d3,DesignApp:Mf};exports.LercAddCompression=zyt;exports.LercParameters=Fyt;exports._sfc_main=Mf;exports._sfc_main$1=d3;exports._sfc_main$2=K8;exports.configureAuth=m1e;exports.getAuthToken=g1e;exports.getDefaultExportFromCjs=hd;exports.getWsUrl=v1e;exports.index=zln;
8995
+ `,Aln="MixDashboards-DataChannel";function Tln(){const n=localStorage.getItem("dashboardUseLocalToken");return n==="1"||n==="true"}function Mln(n){const e=o.ref(!1),t=new hI;let r=null;if(n)try{{const l=new Blob([Eln],{type:"application/javascript"}),c=URL.createObjectURL(l);r=new SharedWorker(c,{type:"classic",name:Aln}),console.log("✅ [BasePreview] SharedWorker 已创建 (内联 Blob,适配 npm 单包)")}}catch(l){console.warn("⚠️ [BasePreview] SharedWorker 创建失败:",l)}const i=()=>Ve(null,null,function*(){const l=localStorage.getItem("globalApiUrl"),c=localStorage.getItem("globalAppId"),u=localStorage.getItem("globalAppSecret"),d=localStorage.getItem("globalApiToken");if((Number(localStorage.getItem("dashboardIsMixiot")||"1")||0)===1)return!!d;if(!l&&!c&&!u)return!0;if(!l)return yield Ue.ElMessageBox.alert("请先在全局设置中配置平台地址","配置错误",{confirmButtonText:"确定",type:"warning"}),!1;if(!Tln()&&(!c||!u))return yield Ue.ElMessageBox.alert("请先在全局设置中配置授权编号和授权密钥","配置错误",{confirmButtonText:"确定",type:"warning"}),!1;if(!d)return yield Ue.ElMessageBox.alert("Token 不存在,请检查网络连接或重新配置授权信息","Token 错误",{confirmButtonText:"确定",type:"error"}),!1;try{return(yield bf.getValidToken())?!0:(yield Ue.ElMessageBox.alert("Token 无效或已过期,请重新配置授权信息","Token 错误",{confirmButtonText:"确定",type:"error"}),!1)}catch(h){return console.error("[预览] Token 验证失败:",h),yield Ue.ElMessageBox.alert("Token 验证失败,请检查网络连接或重新配置授权信息","Token 错误",{confirmButtonText:"确定",type:"error"}),!1}}),a=()=>Ve(null,null,function*(){var p;const l=localStorage.getItem("globalApiUrl"),c=localStorage.getItem("globalAppId"),u=localStorage.getItem("globalAppSecret");(Number(localStorage.getItem("dashboardIsMixiot")||"1")||0)===1?e.value=!!(l&&localStorage.getItem("globalApiToken")):e.value=!!(l&&c&&u);let f="";if(e.value)try{f=yield bf.getValidToken()}catch(m){console.error("[WebSocket] 获取 ApiProxy Token 失败:",m),Ue.ElMessage.error("获取平台 Token 失败,实时数据可能无法正常显示");return}else f=((p=xi.getUser())==null?void 0:p.token)||"";const h=B5e();r.port.postMessage({type:"reconnect",url:h,token:f,sysMode:localStorage.getItem("sys_mode")||"",useApiProxy:e.value})}),s=()=>Ve(null,null,function*(){if(!n){console.log("[F12][BasePreview] initDataConnection skipped (enableWebSocket=false)");return}try{const{getAuthToken:l}=yield Promise.resolve().then(()=>Pnt);let c="";try{c=yield l()}catch(p){if((p instanceof Error?p.message:String(p)).includes("本地登录 token 不存在,请先登录")){console.warn("[F12][BasePreview] initDataConnection skipped: no local token",p);return}else throw p}const u=localStorage.getItem("globalApiUrl")||"",d=Number(localStorage.getItem("dashboardIsMixiot")||"1")||0;console.log("[F12][BasePreview] initDataConnection config",{isMixiot:d,globalApiUrl:u,hasToken:!!c});const f=!!c&&d!==1&&!u;if(d!==1&&!u&&!c){Ue.ElMessage.error("请先在全局设置中配置平台地址"),console.error("[F12][BasePreview] initDataConnection abort: globalApiUrl missing in non-local mode");return}let h="";if(d===1||f){let m=(u||`${location.protocol}//${location.host}`).replace(/^http/,"ws");m.endsWith("/")||(m+="/"),h=`${m}ws/api`}else if(u){let p=u.replace(/^http/,"ws");p.endsWith("/")||(p+="/"),h=`${p}apiproxy/ws/api`}r&&(r.port.postMessage({type:"init_connection",url:h,token:c}),console.log("[F12][BasePreview] data connection initialized",{wsUrl:h}))}catch(l){console.error("[F12][BasePreview] initDataConnection failed:",l),Ue.ElMessage.error("数据连接初始化失败")}});return r&&(t.init(r),r.port.onmessage=l=>{t.processWorkerMessage(l)}),{sharedWorker:r,session:t,useApiProxy:e,checkApiProxyConfig:i,initWebSocketConnection:a,initDataConnection:s}}const Dte={pc_pro:"ProContainer",mobile_pro:"AppContainer",pc_dashboard:"ProContainer",mobile_dashboard:"AppContainer",screen_dashboard:"ShowContainer"};function Dln(n,e,t,r,i={}){const a=i.themeRootRef,s=()=>{var S;if(a!=null&&a.value)return a.value;const _=m(),w=(S=Dte[_])!=null?S:Dte[Rp];return w?document.getElementById(w):null},l=o.reactive({margin:[10,10],height:40}),c=o.computed(()=>{const _=Number(l.height);return typeof _=="number"&&!Number.isNaN(_)&&_>0?_:40});let u=null;const d=(_,w=40)=>{const S=Number(_);return typeof S=="number"&&!Number.isNaN(S)&&S>0?S:w},f=_=>(Array.isArray(_==null?void 0:_.layers)?_.layers:[]).flatMap(S=>Array.isArray(S==null?void 0:S.components)?S.components:[]),h=(_,w)=>{if(w<80)return!1;const S=f(_).map(C=>Number(C==null?void 0:C.h)).filter(C=>Number.isFinite(C)&&C>0);return S.length?Math.max(...S)<=5:!1},p=(_,w)=>h(_,w)?Math.max(1,Math.round(w/5)):w,m=()=>{var _;return i9((_=e.value)==null?void 0:_.type)},v=()=>{const _=n.value;if(!_)return;const w=m();let S=_.col||20;S=Math.max(1,S);const C=l.margin[0];if(w===Ff){const E=p(_,Math.max(1,_.col||100));let T=Number(_.screenHeight)||1080;T=T-(E+1)*C,l.height=d(T/E,40);return}if(w===Rp){const E=Math.max(1,Number(_.screenWidth)||1920),T=p(_,S),A=E-(T+1)*C;l.height=d(Math.round(A/T),40);return}if(w===Y1){const T=359-(S+1)*C;l.height=d(Math.round(T/S),40);return}},g=()=>{var S;const _=t.value;_&&(_.style.width="",_.style.height="",_.style.transform="",_.style.transformOrigin="");const w=m();if(w!==Ff){const C=s();C&&(C.style.width="",C.style.height="",C.style.transform="",C.style.transformOrigin="")}if(w===Ff){const C=n.value,E=Number(C==null?void 0:C.screenWidth),T=Number(C==null?void 0:C.screenHeight);if(!E||!T){v();return}const A=s();if(!A){v();return}const M=A,D=typeof window!="undefined"&&new URLSearchParams(window.location.search).get("embed")==="1",k=A.parentElement,I=(D?M==null?void 0:M.parentElement:null)||k||r.value||((S=t.value)==null?void 0:S.parentElement)||document.documentElement,N=I.getBoundingClientRect(),R=Math.max(1,N.width||I.clientWidth),V=Math.max(1,N.height||I.clientHeight),B=V/T,F=R/E,G=Math.min(F,B),U=(R-E*G)/2,z=(V-T*G)/2;A.style.width=`${E}px`,A.style.height=`${T}px`,A.style.transformOrigin="top left",A.style.transform=`scale(${G}, ${G}) translate(${U/G}px, ${z/G}px)`,v();return}v()},y=()=>{g()};return{grid:l,safeRowHeight:c,getHeight:v,autoSize:g,refitLayout:y,initResizeObserver:()=>{var w,S;const _=r.value||((S=(w=t.value)==null?void 0:w.parentElement)==null?void 0:S.parentElement)||t.value;_&&(u=new ResizeObserver(()=>{y()}),u.observe(_))},cleanup:()=>{u&&(u.disconnect(),u=null)}}}function Lln(n,e){n&&o.nextTick(()=>{var a;let t=0;n.querySelectorAll(".vgl-layout").forEach(s=>{t=Math.max(t,s.offsetHeight)});const r=((a=n.parentElement)==null?void 0:a.clientHeight)||n.clientHeight,i=Math.max(r,t+8);i>0?n.style.minHeight=`${i}px`:n.style.minHeight=""})}function Lte(n){n&&n.querySelectorAll(".vgl-layout").forEach(e=>{e.style.width="100%";const t=e.__resizeCallback;typeof t=="function"&&t({target:e,contentRect:e.getBoundingClientRect()})})}const Nln=["data-theme"],Oln=["id","data-theme"],Pln=["src"],kln=["data-layer-id"],Iln={key:1,class:"preview-global-loading","aria-busy":"true","aria-live":"polite"},Rln=o.defineComponent({name:"MixBasePreview",__name:"index",props:{script:{},uid:{},mixiotDashboardUid:{},enableWebSocket:{type:Boolean,default:!0},followHostTheme:{type:Boolean,default:!1},hostProMenuTitle:{default:""},hostMenuToSheetRules:{},isProduct:{type:Boolean,default:!1},agent:{default:""},releaseEmbedAgentOnUnmount:{type:Boolean,default:!0},mobileEmbed:{type:Boolean,default:!1}},emits:["ready"],setup(n,{expose:e,emit:t}){var Pt;const r=n,i=t,a=o.computed(()=>!!r.followHostTheme),s={pc_pro:"ProContainer",mobile_pro:"AppContainer",pc_dashboard:"ProContainer",mobile_dashboard:"AppContainer",screen_dashboard:"ShowContainer",pro:"ProContainer",app:"AppContainer",show:"ShowContainer"},l=o.ref({sheets:[],type:""}),c=o.computed(()=>{var Oe;const Ee=i9((Oe=l.value)==null?void 0:Oe.type);return Ee===Rp||Ee===Y1}),u=o.computed(()=>{var Ee;return i9((Ee=l.value)==null?void 0:Ee.type)===Y1}),d=o.computed(()=>!!r.mobileEmbed&&u.value),f=o.ref(0),h=o.computed(()=>l.value.sheets[f.value]),p=o.ref(null),m=o.ref(null),v=o.ref(null),{currentTheme:g,initTheme:y,cleanup:b}=vln(a),{grid:x,safeRowHeight:_,getHeight:w,autoSize:S,refitLayout:C,initResizeObserver:E,cleanup:T}=Dln(h,l,p,m,{themeRootRef:v}),{tabDisplayMode:A,isTabVisible:M,visibleSheetIndexes:D,visibleSheets:k,hideTabs:P,showTabs:I,getSheetItemStyle:N,sheetWrapStyle:R,checkItem:V,initTabTimer:B,cleanup:F}=gln(l,f,()=>Ae()),{orderedLayers:G,visibleModalType:U,visibleModalOpen:z,visibleModalRenderLayer:j,visibleModalSheet:W,visibleModalSheetStickyLayer:Y,showModal:re,hideModalLayer:Q,toggleModal:$,handleComponentEvent:ee,isComponentBoundToMarker:X,getModalContainerStyle:ne,handleLinkHubModalEvent:K}=yln(h,l,f),Z=o.ref({});let me={};const be=o.ref(!1),ye=o.ref(!0);let ie=0,ue=!1;typeof window!="undefined"&&(window.__mix_base_preview_active=!0);const le=o.ref(0);o.provide(kte,le);const oe=()=>Ve(null,null,function*(){yield o.nextTick(),yield new Promise(Ee=>requestAnimationFrame(()=>Ee())),yield new Promise(Ee=>requestAnimationFrame(()=>Ee()))}),de=()=>{S()},Ae=()=>Ve(null,null,function*(){var Oe;de(),yield oe();const Ee=(Oe=p.value)!=null?Oe:v.value;Lte(Ee),le.value++,yield oe(),Lte(Ee),se()}),pe=()=>Ve(null,null,function*(){window.__mix_preview_params=l.value,yield o.nextTick(),yield Ae()}),se=()=>{var Oe,ve,ce;if(i9((Oe=l.value)==null?void 0:Oe.type)!==Rp)return;const Ee=(ce=p.value)!=null?ce:(ve=v.value)==null?void 0:ve.querySelector(".layout .canvas");Lln(Ee)},Me=()=>{Ae(),se()},He=o.computed(()=>{var Ee;return(Ee=r.hostProMenuTitle)!=null?Ee:""}),ot=o.computed(()=>r.hostMenuToSheetRules),{activeDashboardUid:nt,boardSwitchEpoch:Re,showProAppMenu:Ze,visibleProMenuRows:qe,isProMenuGroupExpanded:je,toggleProMenuGroup:Je,applyProApplicationScript:$e,handleProMenuRowClick:kt,resetProMenu:Rt,getProAppActiveMenuTitle:xt,resolveInitialSheetIndexFromHostMenuTitle:Fe,applyHostMenuInitialSheet:Ie,firstVisibleSheetIndex:xe}=Cln(l,f,pe,me,He,ot),{sharedWorker:he,session:_e,initDataConnection:ze}=Mln((Pt=r.enableWebSocket)!=null?Pt:!0),Pe=Ee=>({x:Ee.x,y:Ee.y,w:Ee.w,h:Ee.h,i:Ee.i}),Be=o.computed(()=>{var Oe;const Ee=(Oe=h.value)==null?void 0:Oe.background;return Ee?Ee==="defaultBg1"?`url(${Psn})`:Ee==="defaultBg2"?`url(${ksn})`:Ee.startsWith("#")||Ee.startsWith("rgb")||Ee.startsWith("rgba")?Ee:"transparent":""}),at=o.ref("");let ft=null,Mt=0,Vt=null;const xn=()=>{ft&&(URL.revokeObjectURL(ft),ft=null)};function sn(){return Ve(this,null,function*(){var ce,Le;const Ee=(Le=(ce=h.value)==null?void 0:ce.background)==null?void 0:Le.trim(),Oe=++Mt;if(Vt==null||Vt.abort(),Vt=new AbortController,!Ee){xn(),at.value="";return}if(Ee==="defaultBg1"||Ee==="defaultBg2"){xn(),at.value="";return}if(Ee.startsWith("#")||Ee.startsWith("rgb")||Ee.startsWith("rgba")){xn(),at.value="";return}if(Ee.startsWith("blob:")||Ee.startsWith("data:")){xn(),at.value=Ee;return}const ve=Pw(yp(Ee));if(!ve){xn(),at.value="";return}try{xn();const Ke={},yt=U6();yt&&(Ke.Authorization=`Bearer ${yt}`);const ht=yield fetch(ve,{mode:"cors",credentials:"include",signal:Vt.signal,headers:Ke});if(Oe!==Mt)return;if(!ht.ok){console.warn("[Preview] background fetch failed",ht.status,ve),at.value="";return}const Nt=yield ht.blob();if(Oe!==Mt)return;if(!Nt.size){at.value="";return}ft=URL.createObjectURL(Nt),at.value=ft}catch(Ke){if((Ke==null?void 0:Ke.name)==="AbortError"||Oe!==Mt)return;console.warn("[Preview] background fetch error",Ke),at.value=""}})}o.watch(()=>{var Ee;return(Ee=h.value)==null?void 0:Ee.background},()=>{sn()},{immediate:!0});const Tt=Ee=>Ve(null,null,function*(){if(!Ee||!be.value)return;const Oe=Cp(Ee),ve=cCe(Ee),ce=rse(Oe||ve);if(ce){const Le=tse(ce);Le&&(A.value=Le)}(yield $e(Oe))||(Rt(),l.value=nse(ve||Ee,me),f.value=0,Ie(),yield pe())});function ct(Ee){var ce,Le;const Oe=Number((ce=Ee.order)!=null?ce:0),ve=Ee.isSticky?1e3+Oe:Oe;return{opacity:((Le=Ee.opacity)!=null?Le:100)/100,zIndex:ve,pointerEvents:"none"}}function At(){o.nextTick(()=>{se(),le.value++})}const Yt=Ee=>{var Le,Ke;const Oe=(Le=Ee==null?void 0:Ee.detail)==null?void 0:Le.layerId;if(typeof Oe!="string"||!Oe)return;const ve=(Ke=h.value)==null?void 0:Ke.layers;if(!(ve!=null&&ve.length)||!ve.some(yt=>yt.id===Oe))return;wte(ve,Oe,"top");const ce=ve.find(yt=>yt.id===Oe);ce&&(ce.visible=!0),At()},un=Ee=>{var Le,Ke;const Oe=(Le=Ee==null?void 0:Ee.detail)==null?void 0:Le.layerId;if(typeof Oe!="string"||!Oe)return;const ve=(Ke=h.value)==null?void 0:Ke.layers;if(!(ve!=null&&ve.length)||!ve.some(yt=>yt.id===Oe))return;wte(ve,Oe,"bottom");const ce=ve.find(yt=>yt.id===Oe);ce&&(ce.visible=!1),At()},Mn=Ee=>{const Oe=(Ee==null?void 0:Ee.detail)||{},ve=Oe.action||"show";if(!(!Oe.layerId&&ve!=="hide")){if(ve==="hide"){Q();return}if(ve==="toggle"){$(Oe);return}re(Oe)}},Xt=()=>Ve(null,null,function*(){return{}}),Bn=ua(),_t=new Set;let gt=null,jt=null;const zn=()=>{var Oe;const Ee=(Oe=m.value)!=null?Oe:v.value;!Ee||typeof IntersectionObserver=="undefined"||(jt==null||jt.disconnect(),jt=new IntersectionObserver(ve=>{ve.some(ce=>ce.isIntersecting&&ce.intersectionRatio>0)&&Ae()},{threshold:[0,.01]}),jt.observe(Ee))};o.onMounted(()=>Ve(null,null,function*(){(window.opener||window.parent!==window)&&document.body.classList.add("mix-preview-mode"),yield Ge(),window.addEventListener("mix-modal",Mn),window.addEventListener("mix-layer-bring-top",Yt),window.addEventListener("mix-layer-send-bottom",un),y(C);const Ee=yield Xt();Ee&&Object.keys(Ee).length>0&&sessionStorage.setItem("object_alias_uid_mapping",JSON.stringify(Ee));try{Z.value=yield F9.loadComponents(),me=yield F9.getAllExposedProps(),be.value=!0}catch(Oe){console.error("[BasePreview] elements 加载失败:",Oe),Z.value={},me={},be.value=!0}yield ze(),window.__mix_preview_params=l.value,yield o.nextTick(),C(),E(),zn(),gt=o.watch(()=>Bn.channels,Oe=>{!l.value||!l.value.sheets||l.value.sheets.length===0||Object.keys(Oe).forEach(ve=>{const ce=Oe[ve];if(!ce||!ce.topic)return;const Le=ce.topic.uniqueId;_t.has(Le)||(_t.add(Le),console.log("[LinkHub Modal] 检测到新事件:",{channel:ve,newEventId:Le,event:JSON.parse(JSON.stringify(ce))}),K(ve,ce))})},{deep:!0,immediate:!1}),o.nextTick(()=>{w(),se(),B()}),(l.value.type==="screen_dashboard"||l.value.type==="show")&&(o.nextTick(()=>{S()}),window.onresize=()=>{S()})}));const Ge=()=>Ve(null,null,function*(){var Le,Ke;const Ee=((Le=xi.getMixIotInfo())==null?void 0:Le.uid)||((Ke=xi.getUser())==null?void 0:Ke.uid);W5e(),YE();let Oe;try{Oe=yield Bt.http("get_user_final_data_permission",{user_uid:Ee},!0)}catch(yt){console.warn("[BasePreview] data permission preload failed, continue with default permission:",yt),YE();return}const ve={type:"black_list",entities:{}},ce=Oe==null?void 0:Oe.result;ce&&((ce.auth_type==="white_list"||ce.auth_type==="black_list")&&(ve.type=ce.auth_type),ce.entities&&typeof ce.entities=="object"&&(ve.entities=ce.entities)),sessionStorage.setItem(Iw,JSON.stringify(ve)),YE()});o.onUnmounted(()=>{ue=!0,Mt++,Vt==null||Vt.abort(),xn(),at.value="",typeof window!="undefined"&&(window.__mix_base_preview_active=!1),nH(!1),document.body.classList.remove("mix-preview-mode"),window.removeEventListener("mix-modal",Mn),window.removeEventListener("mix-layer-bring-top",Yt),window.removeEventListener("mix-layer-send-bottom",un),F(),b(),gt&&(gt(),gt=null),T(),jt&&(jt.disconnect(),jt=null),_e&&_e.close(),sessionStorage.removeItem("object_alias_uid_mapping"),r.releaseEmbedAgentOnUnmount&&Gv("")}),o.watch(()=>r.isProduct,Ee=>nH(!!Ee),{immediate:!0}),o.watch(()=>r.agent,Ee=>Gv(Ee),{immediate:!0}),o.watch(()=>[r.script,r.uid,be.value],ve=>Ve(null,[ve],function*([Ee,,Oe]){if(!Oe){ye.value=!0;return}const ce=++ie;ye.value=!0;try{yield Tt(Ee)}finally{if(ce!==ie||ue||(yield oe(),ce!==ie||ue)||(yield Ae(),ce!==ie||ue))return;ye.value=!1,i("ready")}}),{immediate:!0});const pt=Ee=>String(Ee!=null?Ee:"").trim().replace(/\s+/g," ");o.watch(()=>[pt(r.hostProMenuTitle),r.hostMenuToSheetRules],()=>{var ve;const Ee=((ve=l.value)==null?void 0:ve.sheets)||[];if(!Array.isArray(Ee)||Ee.length<=1)return;const Oe=Fe(Ee);if(r.hostMenuToSheetRules!==void 0)f.value=Oe>=0?Oe:xe(Ee);else{if(Oe<0)return;f.value=Oe}o.nextTick(()=>{de()})},{deep:!0}),o.watch(f,()=>{se(),Ae()}),o.watch(Re,()=>{Ae(),se()}),o.watch(()=>[l.value.type,G.value,x.height,f.value],()=>se(),{deep:!0}),o.provide("sharedWorker",he),o.provide("session",_e),o.provide("switchSheet",Ee=>{Ee>=0&&Ee<l.value.sheets.length&&(f.value=Ee)});function vt(Ee){var Le;const Oe=String(Ee!=null?Ee:"").trim();if(!Oe)return-1;const ve=((Le=l.value)==null?void 0:Le.sheets)||[],ce=ve.findIndex(Ke=>Ke&&(String(Ke.id)===Oe||String(Ke.name)===Oe||String(Ke.caption)===Oe));return ce>=0&&ce<ve.length?(f.value=ce,o.nextTick(()=>{de()}),ce):-1}return o.provide("switchSheetByPageKey",vt),e({switchSheetByPageKey:vt}),o.provide("getSheets",()=>l.value.sheets),o.provide("getCurrentSheet",()=>f.value),o.provide("getProAppActiveMenuTitle",xt),o.provide("boardSwitchEpoch",Re),o.provide("mixDashboardIsProduct",o.computed(()=>!!r.isProduct)),(Ee,Oe)=>(o.openBlock(),o.createElementBlock("div",{class:"mix-base-preview-outer w-[100%] h-full min-h-0 relative","data-theme":o.unref(g)},[l.value.sheets.length>0?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"themeRootRef",ref:v,id:s[l.value.type],class:o.normalizeClass(["w-[100%] h-full min-h-0",{"mix-base-preview--fill":a.value,"mix-base-preview--pro-app":c.value,"is-mobile-preview":u.value&&!d.value,"is-mobile-embed-preview":d.value}]),"data-theme":o.unref(g)},[o.createElementVNode("div",{class:o.normalizeClass(["preview-shell",{"preview-shell--with-menu":o.unref(Ze)}])},[o.unref(Ze)?(o.openBlock(),o.createBlock(Usn,{key:0,theme:o.unref(g),rows:o.unref(qe),"active-dashboard-uid":o.unref(nt),"is-group-expanded":o.unref(je),onToggleGroup:o.unref(Je),onRowClick:o.unref(kt)},null,8,["theme","rows","active-dashboard-uid","is-group-expanded","onToggleGroup","onRowClick"])):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"previewStageRef",ref:m,class:o.normalizeClass(["preview-stage",{"preview-stage--pro-app":c.value}])},[o.createElementVNode("div",{class:"layout",style:o.normalizeStyle({background:Be.value,position:"relative"})},[h.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"canvas",ref_key:"canvasRef",ref:p},[at.value?(o.openBlock(),o.createElementBlock("img",{key:0,class:"sheet-bg-img",src:at.value,alt:"",draggable:"false"},null,8,Pln)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(G),ve=>(o.openBlock(),o.createElementBlock("div",{key:ve.id,class:"layer-container","data-layer-id":ve.id,style:o.normalizeStyle(ct(ve))},[ve.visible?(o.openBlock(),o.createBlock(o.unref(hx),{key:0,layout:ve.components,"onUpdate:layout":ce=>ve.components=ce,"col-num":h.value.col,"row-height":o.unref(_),margin:o.unref(x).margin,"is-draggable":!1,"is-resizable":!1,"is-mirrored":!1,"vertical-compact":!1,"prevent-collision":!1,"allow-collision":!0,"use-css-transforms":!0,onLayoutReady:Me},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(ve.components,ce=>{var Le;return o.openBlock(),o.createBlock(o.unref(dv),o.mergeProps({key:ce.i},{ref_for:!0},Pe(ce),{"data-id":ce.id,"data-component-id":ce.id,style:{pointerEvents:"auto",visibility:o.unref(X)(ce.id)?"hidden":"visible",zIndex:(Le=ce.zIndex)!=null?Le:1},onClick:Ke=>o.unref(ee)(ce,"click"),onDblclick:Ke=>o.unref(ee)(ce,"dblclick")}),{default:o.withCtx(()=>[Z.value[ce.type]?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(Z.value[ce.type]),{key:0,conf:ce,theme:o.unref(g),uid:r.uid,"mixiot-dashboard-uid":r.mixiotDashboardUid,mode:"preview"},{default:o.withCtx(()=>[ce.type==="placeholder"&&Ee.$slots.placeholder?o.renderSlot(Ee.$slots,"placeholder",{key:0,id:ce.id,placeholderName:ce.name||ce.caption||ce.id,conf:ce},void 0,!0):o.createCommentVNode("",!0)]),_:2},1032,["conf","theme","uid","mixiot-dashboard-uid"])):o.createCommentVNode("",!0)]),_:2},1040,["data-id","data-component-id","style","onClick","onDblclick"])}),128))]),_:2},1032,["layout","onUpdate:layout","col-num","row-height","margin"])):o.createCommentVNode("",!0),ve.visible?(o.openBlock(),o.createBlock(E_,{key:1,layer:ve},null,8,["layer"])):o.createCommentVNode("",!0)],12,kln))),128))],512)):o.createCommentVNode("",!0)],4),o.unref(k).length>1&&o.unref(A)!=="hide"?(o.openBlock(),o.createBlock(Wsn,{key:0,"tab-display-mode":o.unref(A),"is-tab-visible":o.unref(M),"current-theme":o.unref(g),"sheet-wrap-style":o.unref(R),"visible-sheets":o.unref(k),"visible-sheet-indexes":o.unref(D),"current-sheet":f.value,"get-sheet-item-style":o.unref(N),onShowTabs:o.unref(I),onHideTabs:o.unref(P),onSelect:o.unref(V)},null,8,["tab-display-mode","is-tab-visible","current-theme","sheet-wrap-style","visible-sheets","visible-sheet-indexes","current-sheet","get-sheet-item-style","onShowTabs","onHideTabs","onSelect"])):o.createCommentVNode("",!0)],2)],2),o.unref(z)?(o.openBlock(),o.createBlock(mln,{key:0,"modal-type":o.unref(U),"modal-sheet":o.unref(W),"sticky-layer":o.unref(Y),"render-layer":o.unref(j),"sheet-col":h.value.col,"safe-row-height":o.unref(_),"grid-margin":o.unref(x).margin,"element-components":Z.value,theme:o.unref(g),uid:r.uid,"mixiot-dashboard-uid":r.mixiotDashboardUid,"container-style":o.unref(ne)(o.unref(j)),"get-grid-item-props":Pe,onClose:o.unref(Q)},null,8,["modal-type","modal-sheet","sticky-layer","render-layer","sheet-col","safe-row-height","grid-margin","element-components","theme","uid","mixiot-dashboard-uid","container-style","onClose"])):o.createCommentVNode("",!0)],10,Oln)):o.createCommentVNode("",!0),ye.value?(o.openBlock(),o.createElementBlock("div",Iln,[...Oe[0]||(Oe[0]=[o.createElementVNode("div",{class:"preview-global-loading__spinner"},null,-1),o.createElementVNode("span",{class:"preview-global-loading__text"},"加载中…",-1)])])):o.createCommentVNode("",!0)],8,Nln))}}),Nv=Dt(Rln,[["__scopeId","data-v-f023cec7"]]),K8=o.defineComponent({name:"MixDesignShow",__name:"DesignShow",props:{script:{},uid:{},mixiotDashboardUid:{},enableWebSocket:{type:Boolean,default:!0},followHostTheme:{type:Boolean,default:!1},isProduct:{type:Boolean,default:!0},agent:{default:""},releaseEmbedAgentOnUnmount:{type:Boolean,default:!0}},emits:["ready"],setup(n,{emit:e}){const t=e,r=n;return(i,a)=>(o.openBlock(),o.createBlock(Nv,{script:r.script,uid:r.uid,"mixiot-dashboard-uid":r.mixiotDashboardUid,enableWebSocket:r.enableWebSocket,"follow-host-theme":r.followHostTheme,"is-product":r.isProduct,agent:r.agent,"release-embed-agent-on-unmount":r.releaseEmbedAgentOnUnmount,onReady:a[0]||(a[0]=s=>t("ready"))},o.createSlots({_:2},[i.$slots.placeholder?{name:"placeholder",fn:o.withCtx(s=>[o.renderSlot(i.$slots,"placeholder",o.normalizeProps(o.guardReactiveProps(s)))]),key:"0"}:void 0]),1032,["script","uid","mixiot-dashboard-uid","enableWebSocket","follow-host-theme","is-product","agent","release-embed-agent-on-unmount"]))}}),Vln="1.1.52";typeof console!="undefined"&&console.info&&console.info("[MixDashboards] 版本:",Vln);const Bln=[K8,d3,Mf],Fln=function(n){Bln.forEach(e=>{n.component(e.name||e.__name,e)})},zln={install:Fln,DesignShow:K8,DesignPro:d3,DesignApp:Mf};exports.LercAddCompression=zyt;exports.LercParameters=Fyt;exports._sfc_main=Mf;exports._sfc_main$1=d3;exports._sfc_main$2=K8;exports.configureAuth=m1e;exports.getAuthToken=g1e;exports.getDefaultExportFromCjs=hd;exports.getWsUrl=v1e;exports.index=zln;