"use strict";(self["webpackChunkaida"]=self["webpackChunkaida"]||[]).push([[4760,7910],{37230:function(e,t){t["Z"]={id:1,testUrl:"http://192.168.1.5:10086",zIndex:2,setColor:(e,t,a)=>new Promise((i=>{var r=void 0==a?.min?5:a.min,o=void 0==a?.max?5:a.max,s=new Image;s.src=t;s.onload=()=>{const t=s.width,a=s.height,l=document.createElement("canvas");l.width=t,l.height=a;var c=l.getContext("2d");c.drawImage(s,0,0);var n=c.getImageData(0,0,t,a),d=[];for(let i=0;i<e.length;i++){var g=0;for(let t=0;t<n.data.length;t+=4){var y=n.data[t],v=n.data[t+1],p=n.data[t+2];n.data[t+3];y-r<e[i][0]&&y+o>e[i][0]&&v-r<e[i][1]&&v+o>e[i][1]&&p-r<e[i][2]&&p+o>e[i][2]&&g++}let l={rgb:e[i],ratio:parseInt(String((g/(t*a)*100).toFixed(6)))};d.push(l),s.remove()}i({width:t,height:a,ratio:d})}}))}},97910:function(e,t,a){a.r(t),a.d(t,{default:function(){return u}});var i=a(66252),r=a(3577),o=a(49963);const s={class:"operate_file_block"},l={class:"select_img_type"},c=["onClick"];function n(e,t,a,n,d,g){return(0,i.wg)(),(0,i.iD)("div",s,[(0,i._)("div",l,[(0,i._)("div",{class:(0,r.C_)(["select_category",e.driverClass.class1]),onClick:t[0]||(t[0]=(0,o.iM)((t=>e.showFileCategory(e.item)),["stop"]))},[(0,i.Uk)((0,r.zw)(e.item.category)+" ",1),(0,i.wy)((0,i._)("div",{class:(0,r.C_)(["icon","iconfont","icon-xiala",e.item.categoryShow?"icon_rotate":""])},null,2),[[o.F8,!e.isSpread]])],2),e.isSpread?(0,i.kq)("",!0):(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{key:0,class:(0,r.C_)(["category_list",[e.driver__?"showEvents":"",e.driverClass.class2]])},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.disignTypeList,((t,a)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,r.C_)(["category_item",e.item.categoryValue==t.value?"select_category_item":""]),key:a,onClick:(0,o.iM)((a=>e.selectFileCategory(e.item,t)),["stop"])},(0,r.zw)(t.name),11,c)))),128))],2)),[[o.F8,e.item.categoryShow]])])])}var d=a(74961),g=a(4272),y=(0,i.aZ)({name:"filterComponent",emits:["upTypeSucced"],props:{disignTypeList:{type:Object,default:{}},item:{type:Object},generateList:{type:Array},isSetSketchCategory:{type:Boolean,default:!1},isSpread:{type:Boolean,default:!1},driver__:{type:Boolean,default:!1},driverClass:{type:Object,default:{class1:"",class2:""}}},setup(e,{emit:t}){let a=t=>{(0,i.Y3)().then((()=>{e.driver__&&g.RX.moveNext()})),e.isSpread||(t.categoryShow=!0,document.addEventListener("click",r))},r=()=>{for(let t of e.generateList)t.categoryShow=!1;document.removeEventListener("click",r)},o=(t,a)=>{for(let i of e.generateList)i.categoryShow=!1;t.level2Type=a.value,t.categoryValue=a.value,t.category=a.name,e.isSetSketchCategory&&s(e.item),e.driver__&&g.RX.moveNext()},s=e=>{let a={libraryId:[e.id],level2Type:e.categoryValue};d.V.axiosPost(d.V.httpUrls.setSketchLibrary,a).then((e=>{t("upTypeSucced")})).catch((e=>{}))};return{showFileCategory:a,selectFileCategory:o}}}),v=a(83744);const p=(0,v.Z)(y,[["render",n],["__scopeId","data-v-7e0c0f6a"]]);var u=p}}]);