"use strict";(self["webpackChunkset_vue"]=self["webpackChunkset_vue"]||[]).push([[619],{1125:function(){},4259:function(){},696:function(e,t,l){l.r(t),l.d(t,{default:function(){return Ut}});var o=l(6769),n=l(6987),a=(l(6463),l(4726)),i=l(6768),r=l(144),s=l(5828),u=l(6370),c=l(8442),d=l(240),v=l(7905),p=l(9725),m=l(6591),h=l(4390),f=l(6145);const[b,g]=(0,s.YX)("swipe-cell"),w={name:(0,u.TU)(""),disabled:Boolean,leftWidth:u.VQ,rightWidth:u.VQ,beforeClose:Function,stopPropagation:Boolean};var k=(0,i.pM)({name:b,props:w,emits:["open","close","click"],setup(e,{emit:t,slots:l}){let o,n,a,s;const u=(0,r.KR)(),b=(0,r.KR)(),w=(0,r.KR)(),k=(0,r.Kh)({offset:0,dragging:!1}),y=(0,h.P)(),C=e=>e.value?(0,m.yD)(e).width:0,V=(0,i.EW)((()=>(0,c.C8)(e.leftWidth)?+e.leftWidth:C(b))),x=(0,i.EW)((()=>(0,c.C8)(e.rightWidth)?+e.rightWidth:C(w))),F=l=>{k.offset="left"===l?V.value:-x.value,o||(o=!0,t("open",{name:e.name,position:l}))},S=l=>{k.offset=0,o&&(o=!1,t("close",{name:e.name,position:l}))},R=e=>{const t=Math.abs(k.offset),l=.15,n=o?1-l:l,a="left"===e?V.value:x.value;a&&t>a*n?F(e):S(e)},T=t=>{e.disabled||(a=k.offset,y.start(t))},_=t=>{if(e.disabled)return;const{deltaX:l}=y;if(y.move(t),y.isHorizontal()){n=!0,k.dragging=!0;const i=!o||l.value*a<0;i&&(0,d.wo)(t,e.stopPropagation),k.offset=(0,v.qE)(l.value+a,-x.value,V.value)}},I=()=>{k.dragging&&(k.dragging=!1,R(k.offset>0?"left":"right"),setTimeout((()=>{n=!1}),0))},B=(l="outside")=>{s||(t("click",l),o&&!n&&(s=!0,(0,p.m)(e.beforeClose,{args:[{name:e.name,position:l}],done:()=>{s=!1,S(l)},canceled:()=>s=!1,error:()=>s=!1})))},P=(e,t)=>l=>{t&&l.stopPropagation(),B(e)},E=(e,t)=>{const o=l[e];if(o)return(0,i.bF)("div",{ref:t,class:g(e),onClick:P(e,!0)},[o()])};return(0,f.c)({open:F,close:S}),(0,m.W3)(u,(()=>B("outside")),{eventName:"touchstart"}),(0,m.ML)("touchmove",_,{target:u}),()=>{var e;const t={transform:`translate3d(${k.offset}px, 0, 0)`,transitionDuration:k.dragging?"0s":".6s"};return(0,i.bF)("div",{ref:u,class:g(),onClick:P("cell",n),onTouchstartPassive:T,onTouchend:I,onTouchcancel:I},[(0,i.bF)("div",{class:g("wrapper"),style:t},[E("left",b),null==(e=l.default)?void 0:e.call(l),E("right",w)])])}}});const y=(0,a.G)(k);l(6647);var C=l(5632),V=(l(7708),l(7484),l(122)),x=(l(9998),l(3064)),F=(l(269),l(4371),l(4612));l(4114);const[S,R,T]=(0,s.YX)("picker"),_=e=>e.find((e=>!e.disabled))||e[0];function I(e,t){const l=e[0];if(l){if(Array.isArray(l))return"multiple";if(t.children in l)return"cascade"}return"default"}function B(e,t){t=(0,v.qE)(t,0,e.length);for(let l=t;l=0;l--)if(!e[l].disabled)return l;return 0}const P=(e,t,l)=>void 0!==t&&!!e.find((e=>e[l.value]===t));function E(e,t,l){const o=e.findIndex((e=>e[l.value]===t)),n=B(e,o);return e[n]}function U(e,t,l){const o=[];let n={[t.children]:e},a=0;while(n&&n[t.children]){const e=n[t.children],i=l.value[a];if(n=(0,c.C8)(i)?E(e,i,t):void 0,!n&&e.length){const l=_(e)[t.value];n=E(e,l,t)}a++,o.push(e)}return o}function K(e){const{transform:t}=window.getComputedStyle(e),l=t.slice(7,t.length-1).split(", ")[5];return Number(l)}function O(e){return(0,c.X$)({text:"text",value:"value",children:"children"},e)}var W=l(2094);const $=200,M=300,L=15,[N,X]=(0,s.YX)("picker-column"),z=Symbol(N);var Y=(0,i.pM)({name:N,props:{value:u.VQ,fields:(0,u.$g)(Object),options:(0,u.zj)(),readonly:Boolean,allowHtml:Boolean,optionHeight:(0,u.$g)(Number),swipeDuration:(0,u.$g)(u.VQ),visibleOptionNum:(0,u.$g)(u.VQ)},emits:["change","clickOption","scrollInto"],setup(e,{emit:t,slots:l}){let o,n,a,s,u;const c=(0,r.KR)(),p=(0,r.KR)(),b=(0,r.KR)(0),g=(0,r.KR)(0),w=(0,h.P)(),k=()=>e.options.length,y=()=>e.optionHeight*(+e.visibleOptionNum-1)/2,C=l=>{let n=B(e.options,l);const a=-n*e.optionHeight,i=()=>{n>k()-1&&(n=B(e.options,l));const o=e.options[n][e.fields.value];o!==e.value&&t("change",o)};o&&a!==b.value?u=i:i(),b.value=a},V=()=>e.readonly||!e.options.length,x=l=>{o||V()||(u=null,g.value=$,C(l),t("clickOption",e.options[l]))},F=t=>(0,v.qE)(Math.round(-t/e.optionHeight),0,k()-1),S=(0,i.EW)((()=>F(b.value))),R=(t,l)=>{const o=Math.abs(t/l);t=b.value+o/.003*(t<0?-1:1);const n=F(t);g.value=+e.swipeDuration,C(n)},T=()=>{o=!1,g.value=0,u&&(u(),u=null)},_=e=>{if(!V()){if(w.start(e),o){const e=K(p.value);b.value=Math.min(0,e-y())}g.value=0,n=b.value,a=Date.now(),s=n,u=null}},I=l=>{if(V())return;w.move(l),w.isVertical()&&(o=!0,(0,d.wo)(l,!0));const i=(0,v.qE)(n+w.deltaY.value,-k()*e.optionHeight,e.optionHeight),r=F(i);r!==S.value&&t("scrollInto",e.options[r]),b.value=i;const u=Date.now();u-a>M&&(a=u,s=i)},P=()=>{if(V())return;const e=b.value-s,t=Date.now()-a,l=tL;if(l)return void R(e,t);const n=F(b.value);g.value=$,C(n),setTimeout((()=>{o=!1}),0)},E=()=>{const t={height:`${e.optionHeight}px`};return e.options.map(((o,n)=>{const a=o[e.fields.text],{disabled:r}=o,s=o[e.fields.value],u={role:"button",style:t,tabindex:r?-1:0,class:[X("item",{disabled:r,selected:s===e.value}),o.className],onClick:()=>x(n)},c={class:"van-ellipsis",[e.allowHtml?"innerHTML":"textContent"]:a};return(0,i.bF)("li",u,[l.option?l.option(o,n):(0,i.bF)("div",c,null)])}))};return(0,m.cJ)(z),(0,f.c)({stopMomentum:T}),(0,i.nT)((()=>{const t=o?Math.floor(-b.value/e.optionHeight):e.options.findIndex((t=>t[e.fields.value]===e.value)),l=B(e.options,t),n=-l*e.optionHeight;o&&l(0,i.bF)("div",{ref:c,class:X(),onTouchstartPassive:_,onTouchend:P,onTouchcancel:P},[(0,i.bF)("ul",{ref:p,style:{transform:`translate3d(0, ${b.value+y()}px, 0)`,transitionDuration:`${g.value}ms`,transitionProperty:g.value?"all":"none"},class:X("wrapper"),onTransitionend:T},[E()])])}});const[D]=(0,s.YX)("picker-toolbar"),H={title:String,cancelButtonText:String,confirmButtonText:String},A=["cancel","confirm","title","toolbar"],Q=Object.keys(H);var j=(0,i.pM)({name:D,props:H,emits:["confirm","cancel"],setup(e,{emit:t,slots:l}){const o=()=>l.title?l.title():e.title?(0,i.bF)("div",{class:[R("title"),"van-ellipsis"]},[e.title]):void 0,n=()=>t("cancel"),a=()=>t("confirm"),r=()=>{var t;const o=null!=(t=e.cancelButtonText)?t:T("cancel");if(l.cancel||o)return(0,i.bF)("button",{type:"button",class:[R("cancel"),F.Dk],onClick:n},[l.cancel?l.cancel():o])},s=()=>{var t;const o=null!=(t=e.confirmButtonText)?t:T("confirm");if(l.confirm||o)return(0,i.bF)("button",{type:"button",class:[R("confirm"),F.Dk],onClick:a},[l.confirm?l.confirm():o])};return()=>(0,i.bF)("div",{class:R("toolbar")},[l.toolbar?l.toolbar():[r(),o(),s()]])}});const G=(e,t)=>{const l=(0,r.KR)(e());return(0,i.wB)(e,(e=>{e!==l.value&&(l.value=e)})),(0,i.wB)(l,(l=>{l!==e()&&t(l)})),l};var q=l(5130),J=l(4232);function Z(e,t,l){let o,n=0;const a=e.scrollLeft,i=0===l?1:Math.round(1e3*l/16);function r(){(0,m.SA)(o)}function s(){e.scrollLeft+=(t-a)/i,++nt||!i&&at?n=(0,m.er)(c):o&&(n=(0,m.er)(o))}return c(),u}var te=l(9614),le=l(4548);function oe(){const e=(0,r.KR)([]),t=[];(0,i.Ic)((()=>{e.value=[]}));const l=l=>(t[l]||(t[l]=t=>{e.value[l]=t}),t[l]);return[e,l]}var ne=l(8957);function ae(e,t){if(!c.M||!window.IntersectionObserver)return;const l=new IntersectionObserver((e=>{t(e[0].intersectionRatio>0)}),{root:document.body}),o=()=>{e.value&&l.observe(e.value)},n=()=>{e.value&&l.unobserve(e.value)};(0,i.Y4)(n),(0,i.xo)(n),(0,m.kz)(o)}const[ie,re]=(0,s.YX)("sticky"),se={zIndex:u.VQ,position:(0,u.Ts)("top"),container:Object,offsetTop:(0,u.TU)(0),offsetBottom:(0,u.TU)(0)};var ue=(0,i.pM)({name:ie,props:se,emits:["scroll","change"],setup(e,{emit:t,slots:l}){const o=(0,r.KR)(),n=(0,m.f$)(o),a=(0,r.Kh)({fixed:!1,width:0,height:0,transform:0}),s=(0,r.KR)(!1),u=(0,i.EW)((()=>(0,v.S7)("top"===e.position?e.offsetTop:e.offsetBottom))),p=(0,i.EW)((()=>{if(s.value)return;const{fixed:e,height:t,width:l}=a;return e?{width:`${l}px`,height:`${t}px`}:void 0})),h=(0,i.EW)((()=>{if(!a.fixed||s.value)return;const t=(0,c.X$)((0,v.AO)(e.zIndex),{width:`${a.width}px`,height:`${a.height}px`,[e.position]:`${u.value}px`});return a.transform&&(t.transform=`translate3d(0, ${a.transform}px, 0)`),t})),f=e=>t("scroll",{scrollTop:e,isFixed:a.fixed}),b=()=>{if(!o.value||(0,d.dK)(o))return;const{container:t,position:l}=e,n=(0,m.yD)(o),i=(0,d.hY)(window);if(a.width=n.width,a.height=n.height,"top"===l)if(t){const e=(0,m.yD)(t),l=e.bottom-u.value-a.height;a.fixed=u.value>n.top&&e.bottom>0,a.transform=l<0?l:0}else a.fixed=u.value>n.top;else{const{clientHeight:e}=document.documentElement;if(t){const l=(0,m.yD)(t),o=e-l.top-u.value-a.height;a.fixed=e-u.valuel.top,a.transform=o<0?-o:0}else a.fixed=e-u.valuea.fixed),(e=>t("change",e))),(0,m.ML)("scroll",b,{target:n,passive:!0}),ae(o,b),(0,i.wB)([d.Xw,d.C7],(()=>{o.value&&!(0,d.dK)(o)&&a.fixed&&(s.value=!0,(0,i.dY)((()=>{const e=(0,m.yD)(o);a.width=e.width,a.height=e.height,s.value=!1})))})),()=>{var e;return(0,i.bF)("div",{ref:o,style:p.value},[(0,i.bF)("div",{class:re({fixed:a.fixed&&!s.value}),style:h.value},[null==(e=l.default)?void 0:e.call(l)])])}}});const ce=(0,a.G)(ue);var de=l(9265);const[ve,pe]=(0,s.YX)("tabs");var me=(0,i.pM)({name:ve,props:{count:(0,u.$g)(Number),inited:Boolean,animated:Boolean,duration:(0,u.$g)(u.VQ),swipeable:Boolean,lazyRender:Boolean,currentIndex:(0,u.$g)(Number)},emits:["change"],setup(e,{emit:t,slots:l}){const o=(0,r.KR)(),n=e=>t("change",e),a=()=>{var t;const a=null==(t=l.default)?void 0:t.call(l);return e.animated||e.swipeable?(0,i.bF)(de.Hp,{ref:o,loop:!1,class:pe("track"),duration:1e3*+e.duration,touchable:e.swipeable,lazyRender:e.lazyRender,showIndicators:!1,onChange:n},{default:()=>[a]}):a},s=t=>{const l=o.value;l&&l.state.active!==t&&l.swipeTo(t,{immediate:!e.inited})};return(0,i.wB)((()=>e.currentIndex),s),(0,i.sV)((()=>{s(e.currentIndex)})),(0,f.c)({swipeRef:o}),()=>(0,i.bF)("div",{class:pe("content",{animated:e.animated||e.swipeable})},[a()])}});const[he,fe]=(0,s.YX)("tabs"),be={type:(0,u.Ts)("line"),color:String,border:Boolean,sticky:Boolean,shrink:Boolean,active:(0,u.TU)(0),duration:(0,u.TU)(.3),animated:Boolean,ellipsis:u.Rd,swipeable:Boolean,scrollspy:Boolean,offsetTop:(0,u.TU)(0),background:String,lazyRender:u.Rd,showHeader:u.Rd,lineWidth:u.VQ,lineHeight:u.VQ,beforeChange:Function,swipeThreshold:(0,u.TU)(5),titleActiveColor:String,titleInactiveColor:String},ge=Symbol(he);var we=(0,i.pM)({name:he,props:be,emits:["change","scroll","rendered","clickTab","update:active"],setup(e,{emit:t,slots:l}){let o,n,a,s,u;const h=(0,r.KR)(),b=(0,r.KR)(),g=(0,r.KR)(),w=(0,r.KR)(),k=(0,te.B)(),y=(0,m.f$)(h),[C,V]=oe(),{children:x,linkChildren:S}=(0,m.Py)(ge),R=(0,r.Kh)({inited:!1,position:"",lineStyle:{},currentIndex:-1}),T=(0,i.EW)((()=>x.length>+e.swipeThreshold||!e.ellipsis||e.shrink)),_=(0,i.EW)((()=>({borderColor:e.color,background:e.background}))),I=(e,t)=>{var l;return null!=(l=e.name)?l:t},B=(0,i.EW)((()=>{const e=x[R.currentIndex];if(e)return I(e,R.currentIndex)})),P=(0,i.EW)((()=>(0,v.S7)(e.offsetTop))),E=(0,i.EW)((()=>e.sticky?P.value+o:0)),U=t=>{const l=b.value,o=C.value;if(!T.value||!l||!o||!o[R.currentIndex])return;const n=o[R.currentIndex].$el,a=n.offsetLeft-(l.offsetWidth-n.offsetWidth)/2;s&&s(),s=Z(l,a,t?0:+e.duration)},K=()=>{const t=R.inited;(0,i.dY)((()=>{const l=C.value;if(!l||!l[R.currentIndex]||"line"!==e.type||(0,d.dK)(h.value))return;const o=l[R.currentIndex].$el,{lineWidth:n,lineHeight:a}=e,i=o.offsetLeft+o.offsetWidth/2,r={width:(0,v._V)(n),backgroundColor:e.color,transform:`translateX(${i}px) translateX(-50%)`};if(t&&(r.transitionDuration=`${e.duration}s`),(0,c.C8)(a)){const e=(0,v._V)(a);r.height=e,r.borderRadius=e}R.lineStyle=r}))},O=e=>{const t=e=0&&e{const n=O(l);if(!(0,c.C8)(n))return;const i=x[n],r=I(i,n),s=null!==R.currentIndex;R.currentIndex!==n&&(R.currentIndex=n,o||U(),K()),r!==e.active&&(t("update:active",r),s&&t("change",r,i.title)),a&&!e.scrollspy&&(0,d.Fk)(Math.ceil((0,d.mk)(h.value)-P.value))},$=(e,t)=>{const l=x.find(((t,l)=>I(t,l)===e)),o=l?x.indexOf(l):0;W(o,t)},M=(t=!1)=>{if(e.scrollspy){const l=x[R.currentIndex].$el;if(l&&y.value){const o=(0,d.mk)(l,y.value)-E.value;n=!0,u&&u(),u=ee(y.value,o,t?0:+e.duration,(()=>{n=!1}))}}},L=(l,o,n)=>{const{title:a,disabled:i}=x[o],r=I(x[o],o);i||((0,p.m)(e.beforeChange,{args:[r],done:()=>{W(o),M()}}),(0,le.wE)(l)),t("clickTab",{name:r,title:a,event:n,disabled:i})},N=e=>{a=e.isFixed,t("scroll",e)},X=e=>{(0,i.dY)((()=>{$(e),M(!0)}))},z=()=>{for(let e=0;eE.value)return 0===e?0:e-1}return x.length-1},Y=()=>{if(e.scrollspy&&!n){const e=z();W(e)}},D=()=>{if("line"===e.type&&x.length)return(0,i.bF)("div",{class:fe("line"),style:R.lineStyle},null)},H=()=>{var t,o,n;const{type:a,border:r,sticky:s}=e,u=[(0,i.bF)("div",{ref:s?void 0:g,class:[fe("wrap"),{[F.pT]:"line"===a&&r}]},[(0,i.bF)("div",{ref:b,role:"tablist",class:fe("nav",[a,{shrink:e.shrink,complete:T.value}]),style:_.value,"aria-orientation":"horizontal"},[null==(t=l["nav-left"])?void 0:t.call(l),x.map((e=>e.renderTitle(L))),D(),null==(o=l["nav-right"])?void 0:o.call(l)])]),null==(n=l["nav-bottom"])?void 0:n.call(l)];return s?(0,i.bF)("div",{ref:g},[u]):u},A=()=>{K(),(0,i.dY)((()=>{var e,t;U(!0),null==(t=null==(e=w.value)?void 0:e.swipeRef.value)||t.resize()}))};(0,i.wB)((()=>[e.color,e.duration,e.lineWidth,e.lineHeight]),K),(0,i.wB)(d.Xw,A),(0,i.wB)((()=>e.active),(e=>{e!==B.value&&$(e)})),(0,i.wB)((()=>x.length),(()=>{R.inited&&($(e.active),K(),(0,i.dY)((()=>{U(!0)})))}));const Q=()=>{$(e.active,!0),(0,i.dY)((()=>{R.inited=!0,g.value&&(o=(0,m.yD)(g.value).height),U(!0)}))},j=(e,l)=>t("rendered",e,l);return(0,f.c)({resize:A,scrollTo:X}),(0,i.n)(K),(0,ne.V)(K),(0,m.kz)(Q),ae(h,K),(0,m.ML)("scroll",Y,{target:y,passive:!0}),S({id:k,props:e,setLine:K,scrollable:T,onRendered:j,currentName:B,setTitleRefs:V,scrollIntoView:U}),()=>(0,i.bF)("div",{ref:h,class:fe([e.type])},[e.showHeader?e.sticky?(0,i.bF)(ce,{container:h.value,offsetTop:P.value,onScroll:N},{default:()=>[H()]}):H():null,(0,i.bF)(me,{ref:w,count:x.length,inited:R.inited,animated:e.animated,duration:e.duration,swipeable:e.swipeable,lazyRender:e.lazyRender,currentIndex:R.currentIndex,onChange:W},{default:()=>{var e;return[null==(e=l.default)?void 0:e.call(l)]}})])}});const ke=Symbol();var ye=l(3408);const[Ce,Ve]=(0,s.YX)("tab"),xe=(0,i.pM)({name:Ce,props:{id:String,dot:Boolean,type:String,color:String,title:String,badge:u.VQ,shrink:Boolean,isActive:Boolean,disabled:Boolean,controls:String,scrollable:Boolean,activeColor:String,inactiveColor:String,showZeroBadge:u.Rd},setup(e,{slots:t}){const l=(0,i.EW)((()=>{const t={},{type:l,color:o,disabled:n,isActive:a,activeColor:i,inactiveColor:r}=e,s="card"===l;o&&s&&(t.borderColor=o,n||(a?t.backgroundColor=o:t.color=o));const u=a?i:r;return u&&(t.color=u),t})),o=()=>{const l=(0,i.bF)("span",{class:Ve("text",{ellipsis:!e.scrollable})},[t.title?t.title():e.title]);return e.dot||(0,c.C8)(e.badge)&&""!==e.badge?(0,i.bF)(ye.Ex,{dot:e.dot,content:e.badge,showZero:e.showZeroBadge},{default:()=>[l]}):l};return()=>(0,i.bF)("div",{id:e.id,role:"tab",class:[Ve([e.type,{grow:e.scrollable&&!e.shrink,shrink:e.shrink,active:e.isActive,disabled:e.disabled}])],style:l.value,tabindex:e.disabled?void 0:e.isActive?0:-1,"aria-selected":e.isActive,"aria-disabled":e.disabled||void 0,"aria-controls":e.controls},[o()])}});var Fe=l(1477);const[Se,Re]=(0,s.YX)("tab"),Te=(0,c.X$)({},le.aI,{dot:Boolean,name:u.VQ,badge:u.VQ,title:String,disabled:Boolean,titleClass:u.E9,titleStyle:[String,Object],showZeroBadge:u.Rd});var _e=(0,i.pM)({name:Se,props:Te,setup(e,{slots:t}){const l=(0,te.B)(),o=(0,r.KR)(!1),n=(0,i.nI)(),{parent:a,index:s}=(0,m.cJ)(ge);if(!a)return void 0;const u=()=>{var t;return null!=(t=e.name)?t:s.value},d=()=>{o.value=!0,a.props.lazyRender&&(0,i.dY)((()=>{a.onRendered(u(),e.title)}))},v=(0,i.EW)((()=>{const e=u()===a.currentName.value;return e&&!o.value&&d(),e})),p=(0,r.KR)(""),h=(0,r.KR)("");(0,i.nT)((()=>{const{titleClass:t,titleStyle:l}=e;p.value=t?(0,J.C4)(t):"",h.value=l&&"string"!==typeof l?(0,J.tl)((0,J.Tr)(l)):l}));const b=o=>(0,i.bF)(xe,(0,i.v6)({key:l,id:`${a.id}-${s.value}`,ref:a.setTitleRefs(s.value),style:h.value,class:p.value,isActive:v.value,controls:l,scrollable:a.scrollable.value,activeColor:a.props.titleActiveColor,inactiveColor:a.props.titleInactiveColor,onClick:e=>o(n.proxy,s.value,e)},(0,c.Up)(a.props,["type","color","shrink"]),(0,c.Up)(e,["dot","badge","title","disabled","showZeroBadge"])),{title:t.title}),g=(0,r.KR)(!v.value);return(0,i.wB)(v,(e=>{e?g.value=!1:(0,m.r7)((()=>{g.value=!0}))})),(0,i.wB)((()=>e.title),(()=>{a.setLine(),a.scrollIntoView()})),(0,i.Gt)(ke,v),(0,f.c)({id:l,renderTitle:b}),()=>{var e;const n=`${a.id}-${s.value}`,{animated:r,swipeable:u,scrollspy:c,lazyRender:d}=a.props;if(!t.default&&!r)return;const p=c||v.value;if(r||u)return(0,i.bF)(Fe.O,{id:l,role:"tabpanel",class:Re("panel-wrapper",{inactive:g.value}),tabindex:v.value?0:-1,"aria-hidden":!v.value,"aria-labelledby":n},{default:()=>{var e;return[(0,i.bF)("div",{class:Re("panel")},[null==(e=t.default)?void 0:e.call(t)])]}});const m=o.value||c||!d,h=m?null==(e=t.default)?void 0:e.call(t):null;return(0,i.bo)((0,i.bF)("div",{id:l,role:"tabpanel",class:Re("panel"),tabindex:p?0:-1,"aria-labelledby":n},[h]),[[q.aG,p]])}}});const Ie=(0,a.G)(_e);const Be=(0,a.G)(we);const[Pe,Ee]=(0,s.YX)("picker-group"),Ue=Symbol(Pe),Ke=(0,c.X$)({tabs:(0,u.zj)(),activeTab:(0,u.TU)(0),nextStepText:String,showToolbar:u.Rd},H);(0,i.pM)({name:Pe,props:Ke,emits:["confirm","cancel","update:activeTab"],setup(e,{emit:t,slots:l}){const o=G((()=>e.activeTab),(e=>t("update:activeTab",e))),{children:n,linkChildren:a}=(0,m.Py)(Ue);a();const r=()=>+o.value{r()?o.value=+o.value+1:t("confirm",n.map((e=>e.confirm())))},u=()=>t("cancel");return()=>{var t,n;let a=null==(n=null==(t=l.default)?void 0:t.call(l))?void 0:n.filter((e=>e.type!==i.Mw)).map((e=>e.type===i.FK?e.children:e));a&&(a=(0,c.Ct)(a));const d=r()?e.nextStepText:e.confirmButtonText;return(0,i.bF)("div",{class:Ee()},[e.showToolbar?(0,i.bF)(j,{title:e.title,cancelButtonText:e.cancelButtonText,confirmButtonText:d,onConfirm:s,onCancel:u},(0,c.Up)(l,A)):null,(0,i.bF)(Be,{active:o.value,"onUpdate:active":e=>o.value=e,class:Ee("tabs"),shrink:!0,animated:!0,lazyRender:!1},{default:()=>[e.tabs.map(((e,t)=>(0,i.bF)(Ie,{title:e,titleClass:Ee("tab-title")},{default:()=>[null==a?void 0:a[t]]})))]})])}}});const Oe=(0,c.X$)({loading:Boolean,readonly:Boolean,allowHtml:Boolean,optionHeight:(0,u.TU)(44),showToolbar:u.Rd,swipeDuration:(0,u.TU)(1e3),visibleOptionNum:(0,u.TU)(6)},H),We=(0,c.X$)({},Oe,{columns:(0,u.zj)(),modelValue:(0,u.zj)(),toolbarPosition:(0,u.Ts)("top"),columnsFieldNames:Object});var $e=(0,i.pM)({name:S,props:We,emits:["confirm","cancel","change","scrollInto","clickOption","update:modelValue"],setup(e,{emit:t,slots:l}){const o=(0,r.KR)(),n=(0,r.KR)(e.modelValue.slice(0)),{parent:a}=(0,m.cJ)(Ue),{children:s,linkChildren:u}=(0,m.Py)(z);u();const p=(0,i.EW)((()=>O(e.columnsFieldNames))),h=(0,i.EW)((()=>(0,v.S7)(e.optionHeight))),b=(0,i.EW)((()=>I(e.columns,p.value))),g=(0,i.EW)((()=>{const{columns:t}=e;switch(b.value){case"multiple":return t;case"cascade":return U(t,p.value,n);default:return[t]}})),w=(0,i.EW)((()=>g.value.some((e=>e.length)))),k=(0,i.EW)((()=>g.value.map(((e,t)=>E(e,n.value[t],p.value))))),y=(0,i.EW)((()=>g.value.map(((e,t)=>e.findIndex((e=>e[p.value.value]===n.value[t])))))),C=(e,t)=>{if(n.value[e]!==t){const l=n.value.slice(0);l[e]=t,n.value=l}},V=()=>({selectedValues:n.value.slice(0),selectedOptions:k.value,selectedIndexes:y.value}),x=(e,l)=>{C(l,e),"cascade"===b.value&&n.value.forEach(((e,t)=>{const l=g.value[t];P(l,e,p.value)||C(t,l.length?l[0][p.value.value]:void 0)})),(0,i.dY)((()=>{t("change",(0,c.X$)({columnIndex:l},V()))}))},S=(e,l)=>{const o={columnIndex:l,currentOption:e};t("clickOption",(0,c.X$)(V(),o)),t("scrollInto",o)},T=()=>{s.forEach((e=>e.stopMomentum()));const e=V();return(0,i.dY)((()=>{t("confirm",e)})),e},B=()=>t("cancel",V()),K=()=>g.value.map(((o,a)=>(0,i.bF)(Y,{value:n.value[a],fields:p.value,options:o,readonly:e.readonly,allowHtml:e.allowHtml,optionHeight:h.value,swipeDuration:e.swipeDuration,visibleOptionNum:e.visibleOptionNum,onChange:e=>x(e,a),onClickOption:e=>S(e,a),onScrollInto:e=>{t("scrollInto",{currentOption:e,columnIndex:a})}},{option:l.option}))),$=e=>{if(w.value){const t={height:`${h.value}px`},l={backgroundSize:`100% ${(e-h.value)/2}px`};return[(0,i.bF)("div",{class:R("mask"),style:l},null),(0,i.bF)("div",{class:[F.xm,R("frame")],style:t},null)]}},M=()=>{const t=h.value*+e.visibleOptionNum,l={height:`${t}px`};return(0,i.bF)("div",{ref:o,class:R("columns"),style:l},[K(),$(t)])},L=()=>{if(e.showToolbar&&!a)return(0,i.bF)(j,(0,i.v6)((0,c.Up)(e,Q),{onConfirm:T,onCancel:B}),(0,c.Up)(l,A))};let N;(0,i.wB)(g,(e=>{e.forEach(((e,t)=>{e.length&&!P(e,n.value[t],p.value)&&C(t,_(e)[p.value.value])}))}),{immediate:!0}),(0,i.wB)((()=>e.modelValue),(e=>{(0,c.am)(e,n.value)||(0,c.am)(e,N)||(n.value=e.slice(0),N=e.slice(0))}),{deep:!0}),(0,i.wB)(n,(l=>{(0,c.am)(l,e.modelValue)||(N=l.slice(0),t("update:modelValue",N))}),{immediate:!0}),(0,m.ML)("touchmove",d.wo,{target:o});const X=()=>k.value;return(0,f.c)({confirm:T,getSelectedOptions:X}),()=>{var t,o;return(0,i.bF)("div",{class:R()},["top"===e.toolbarPosition?L():null,e.loading?(0,i.bF)(W.Rh,{class:R("loading")},null):null,null==(t=l["columns-top"])?void 0:t.call(l),M(),null==(o=l["columns-bottom"])?void 0:o.call(l),"bottom"===e.toolbarPosition?L():null])}}});const Me=(0,a.G)($e);l(7265),l(4259),l(1125);const[Le,Ne]=(0,s.YX)("switch"),Xe={size:u.VQ,loading:Boolean,disabled:Boolean,modelValue:u.E9,activeColor:String,inactiveColor:String,activeValue:{type:u.E9,default:!0},inactiveValue:{type:u.E9,default:!1}};var ze=(0,i.pM)({name:Le,props:Xe,emits:["change","update:modelValue"],setup(e,{emit:t,slots:l}){const o=()=>e.modelValue===e.activeValue,n=()=>{if(!e.disabled&&!e.loading){const l=o()?e.inactiveValue:e.activeValue;t("update:modelValue",l),t("change",l)}},a=()=>{if(e.loading){const t=o()?e.activeColor:e.inactiveColor;return(0,i.bF)(W.Rh,{class:Ne("loading"),color:t},null)}if(l.node)return l.node()};return(0,m.Gp)((()=>e.modelValue)),()=>{var t;const{size:r,loading:s,disabled:u,activeColor:c,inactiveColor:d}=e,p=o(),m={fontSize:(0,v._V)(r),backgroundColor:p?c:d};return(0,i.bF)("div",{role:"switch",class:Ne({on:p,loading:s,disabled:u}),style:m,tabindex:u?void 0:0,"aria-checked":p,onClick:n},[(0,i.bF)("div",{class:Ne("node")},[a()]),null==(t=l.background)?void 0:t.call(l)])}}});const Ye=(0,a.G)(ze);var De=l(7684);const[He,Ae]=(0,s.YX)("action-sheet"),Qe=(0,c.X$)({},De.C,{title:String,round:u.Rd,actions:(0,u.zj)(),closeIcon:(0,u.Ts)("cross"),closeable:u.Rd,cancelText:String,description:String,closeOnPopstate:u.Rd,closeOnClickAction:Boolean,safeAreaInsetBottom:u.Rd}),je=[...De.r,"round","closeOnPopstate","safeAreaInsetBottom"];var Ge=(0,i.pM)({name:He,props:Qe,emits:["select","cancel","update:show"],setup(e,{slots:t,emit:l}){const o=e=>l("update:show",e),n=()=>{o(!1),l("cancel")},a=()=>{if(e.title)return(0,i.bF)("div",{class:Ae("header")},[e.title,e.closeable&&(0,i.bF)(C.In,{name:e.closeIcon,class:[Ae("close"),F.Dk],onClick:n},null)])},r=()=>{if(t.cancel||e.cancelText)return[(0,i.bF)("div",{class:Ae("gap")},null),(0,i.bF)("button",{type:"button",class:Ae("cancel"),onClick:n},[t.cancel?t.cancel():e.cancelText])]},s=e=>{if(e.icon)return(0,i.bF)(C.In,{class:Ae("item-icon"),name:e.icon},null)},u=(e,l)=>e.loading?(0,i.bF)(W.Rh,{class:Ae("loading-icon")},null):t.action?t.action({action:e,index:l}):[(0,i.bF)("span",{class:Ae("name")},[e.name]),e.subname&&(0,i.bF)("div",{class:Ae("subname")},[e.subname])],d=(t,n)=>{const{color:a,loading:r,callback:c,disabled:d,className:v}=t,p=()=>{d||r||(c&&c(t),e.closeOnClickAction&&o(!1),(0,i.dY)((()=>l("select",t,n))))};return(0,i.bF)("button",{type:"button",style:{color:a},class:[Ae("item",{loading:r,disabled:d}),v],onClick:p},[s(t),u(t,n)])},v=()=>{if(e.description||t.description){const l=t.description?t.description():e.description;return(0,i.bF)("div",{class:Ae("description")},[l])}};return()=>(0,i.bF)(x.zD,(0,i.v6)({class:Ae(),position:"bottom","onUpdate:show":o},(0,c.Up)(e,je)),{default:()=>{var l;return[a(),v(),(0,i.bF)("div",{class:Ae("content")},[e.actions.map(d),null==(l=t.default)?void 0:l.call(t)]),r()]}})}});const qe=(0,a.G)(Ge);var Je=l(8139),Ze=(l(7057),l(3788));l(7540);const[et,tt]=(0,s.YX)("slider"),lt={min:(0,u.TU)(0),max:(0,u.TU)(100),step:(0,u.TU)(1),range:Boolean,reverse:Boolean,disabled:Boolean,readonly:Boolean,vertical:Boolean,barHeight:u.VQ,buttonSize:u.VQ,activeColor:String,inactiveColor:String,modelValue:{type:[Number,Array],default:0}};var ot=(0,i.pM)({name:et,props:lt,emits:["change","dragEnd","dragStart","update:modelValue"],setup(e,{emit:t,slots:l}){let o,n,a;const s=(0,r.KR)(),u=[(0,r.KR)(),(0,r.KR)()],p=(0,r.KR)(),f=(0,h.P)(),b=(0,i.EW)((()=>Number(e.max)-Number(e.min))),g=(0,i.EW)((()=>{const t=e.vertical?"width":"height";return{background:e.inactiveColor,[t]:(0,v._V)(e.barHeight)}})),w=t=>e.range&&Array.isArray(t),k=()=>{const{modelValue:t,min:l}=e;return w(t)?100*(t[1]-t[0])/b.value+"%":100*(t-Number(l))/b.value+"%"},y=()=>{const{modelValue:t,min:l}=e;return w(t)?100*(t[0]-Number(l))/b.value+"%":"0%"},C=(0,i.EW)((()=>{const t=e.vertical?"height":"width",l={[t]:k(),background:e.activeColor};p.value&&(l.transition="none");const o=()=>e.vertical?e.reverse?"bottom":"top":e.reverse?"right":"left";return l[o()]=y(),l})),V=t=>{const l=+e.min,o=+e.max,n=+e.step;t=(0,v.qE)(t,l,o);const a=Math.round((t-l)/n)*n;return(0,v.LF)(l,a)},x=()=>{const t=e.modelValue;a=w(t)?t.map(V):V(t)},F=t=>{var l,o;const n=null!=(l=t[0])?l:Number(e.min),a=null!=(o=t[1])?o:Number(e.max);return n>a?[a,n]:[n,a]},S=(l,o)=>{l=w(l)?F(l).map(V):V(l),(0,c.am)(l,e.modelValue)||t("update:modelValue",l),o&&!(0,c.am)(l,a)&&t("change",l)},R=t=>{if(t.stopPropagation(),e.disabled||e.readonly)return;x();const{min:l,reverse:o,vertical:n,modelValue:a}=e,i=(0,m.yD)(s),r=()=>n?o?i.bottom-t.clientY:t.clientY-i.top:o?i.right-t.clientX:t.clientX-i.left,u=n?i.height:i.width,c=Number(l)+r()/u*b.value;if(w(a)){const[e,t]=a,l=(e+t)/2;S(c<=l?[c,t]:[e,c],!0)}else S(c,!0)},T=t=>{e.disabled||e.readonly||(f.start(t),n=e.modelValue,x(),p.value="start")},_=l=>{if(e.disabled||e.readonly)return;"start"===p.value&&t("dragStart",l),(0,d.wo)(l,!0),f.move(l),p.value="dragging";const i=(0,m.yD)(s),r=e.vertical?f.deltaY.value:f.deltaX.value,u=e.vertical?i.height:i.width;let c=r/u*b.value;if(e.reverse&&(c=-c),w(a)){const t=e.reverse?1-o:o;n[t]=a[t]+c}else n=a+c;S(n)},I=l=>{e.disabled||e.readonly||("dragging"===p.value&&(S(n,!0),t("dragEnd",l)),p.value="")},B=t=>{if("number"===typeof t){const e=["left","right"];return tt("button-wrapper",e[t])}return tt("button-wrapper",e.reverse?"left":"right")},P=(t,a)=>{const r="dragging"===p.value;if("number"===typeof a){const e=l[0===a?"left-button":"right-button"];let i;if(r&&Array.isArray(n)&&(i=n[0]>n[1]?1^o:o),e)return e({value:t,dragging:r,dragIndex:i})}return l.button?l.button({value:t,dragging:r}):(0,i.bF)("div",{class:tt("button"),style:(0,v.vE)(e.buttonSize)},null)},E=t=>{const l="number"===typeof t?e.modelValue[t]:e.modelValue;return(0,i.bF)("div",{ref:u[null!=t?t:0],role:"slider",class:B(t),tabindex:e.disabled?void 0:0,"aria-valuemin":e.min,"aria-valuenow":l,"aria-valuemax":e.max,"aria-disabled":e.disabled||void 0,"aria-readonly":e.readonly||void 0,"aria-orientation":e.vertical?"vertical":"horizontal",onTouchstartPassive:e=>{"number"===typeof t&&(o=t),T(e)},onTouchend:I,onTouchcancel:I,onClick:d.dG},[P(l,t)])};return S(e.modelValue),(0,m.Gp)((()=>e.modelValue)),u.forEach((e=>{(0,m.ML)("touchmove",_,{target:e})})),()=>(0,i.bF)("div",{ref:s,style:g.value,class:tt({vertical:e.vertical,disabled:e.disabled}),onClick:R},[(0,i.bF)("div",{class:tt("bar"),style:C.value},[e.range?[E(0),E(1)]:E()])])}});const nt=(0,a.G)(ot);var at=l(5050),it=(l(9766),l(4758));const rt=e=>((0,i.Qi)("data-v-a06cbe3a"),e=e(),(0,i.jt)(),e),st={class:"content"},ut={class:"home"},ct=rt((()=>(0,i.Lk)("p",{class:"title"},"数显设置",-1))),dt={class:"button-container"},vt={class:"home"},pt=rt((()=>(0,i.Lk)("p",{class:"title",style:{"pointer-events":"none"}},"阈值设置",-1))),mt={class:"slider-container"},ht=rt((()=>(0,i.Lk)("p",{class:"set-title"},"触发阈值",-1))),ft={class:"input-container"},bt={class:"slider-container"},gt=rt((()=>(0,i.Lk)("p",{class:"set-title"},"超速阈值",-1))),wt={class:"input-container"},kt={class:"control"},yt=rt((()=>(0,i.Lk)("p",{class:"title-control"},"双色屏控制",-1))),Ct={class:"control"},Vt=rt((()=>(0,i.Lk)("p",{class:"title-control"},"设备地址",-1))),xt={class:"control"},Ft=rt((()=>(0,i.Lk)("p",{class:"title-control"},"事件列表",-1))),St={key:1,class:"button-container"};function Rt(e,t,l,a,r,s){const u=it.A,c=at.D0,d=nt,v=Ze.Qh,p=Je.fh,m=qe,h=Ye,f=Me,b=x.zD,g=V.$n,w=C.In,k=y,F=n.j5,S=o["default"];return(0,i.uX)(),(0,i.CE)(i.FK,null,[(0,i.bF)(u,{title:r.currentTitle},null,8,["title"]),(0,i.bF)(F,{modelValue:a.loading,"onUpdate:modelValue":t[24]||(t[24]=e=>a.loading=e),"success-text":"刷新成功",onRefresh:a.onRefresh},{default:(0,i.k6)((()=>[(0,i.Lk)("div",st,[(0,i.Lk)("div",ut,[ct,(0,i.bF)(v,{inset:""},{default:(0,i.k6)((()=>[(0,i.bF)(c,{class:"brightness",modelValue:a.number,"onUpdate:modelValue":t[0]||(t[0]=e=>a.number=e),modelModifiers:{number:!0},type:"number",label:"亮度",placeholder:"请输入0-100"},null,8,["modelValue"]),(0,i.bF)(d,{modelValue:a.number,"onUpdate:modelValue":t[1]||(t[1]=e=>a.number=e),modelModifiers:{number:!0},step:1,max:100,min:0,onChange:a.onBrightnessChange,class:"slider"},null,8,["modelValue","onChange"])])),_:1}),(0,i.bF)(p,{"is-link":"",title:"正常颜色",onClick:t[2]||(t[2]=e=>a.showNormalColor=!0)},{default:(0,i.k6)((()=>[(0,i.eW)((0,J.v_)(a.selectedNormalColor),1)])),_:1}),(0,i.bF)(m,{show:a.showNormalColor,"onUpdate:show":t[3]||(t[3]=e=>a.showNormalColor=e),actions:a.actions,onSelect:a.onSelectNormalColor},null,8,["show","actions","onSelect"]),(0,i.bF)(p,{"is-link":"",title:"超速颜色",onClick:t[4]||(t[4]=e=>a.showOverSpeedColor=!0)},{default:(0,i.k6)((()=>[(0,i.eW)((0,J.v_)(a.selectedOverSpeedColor),1)])),_:1}),(0,i.bF)(m,{show:a.showOverSpeedColor,"onUpdate:show":t[5]||(t[5]=e=>a.showOverSpeedColor=e),actions:a.actions,onSelect:a.onSelectOverSpeedColor},null,8,["show","actions","onSelect"]),(0,i.bF)(p,{title:"正常闪烁"},{default:(0,i.k6)((()=>[(0,i.bF)(h,{modelValue:a.checked,"onUpdate:modelValue":t[6]||(t[6]=e=>a.checked=e)},null,8,["modelValue"])])),_:1}),(0,i.bF)(p,{title:"超速闪烁"},{default:(0,i.k6)((()=>[(0,i.bF)(h,{modelValue:a.showOverSpeedBlink,"onUpdate:modelValue":t[7]||(t[7]=e=>a.showOverSpeedBlink=e)},null,8,["modelValue"])])),_:1}),(0,i.bF)(c,{modelValue:a.fieldValue,"onUpdate:modelValue":t[8]||(t[8]=e=>a.fieldValue=e),"is-link":"",readonly:"",label:"闪烁速度",placeholder:"请输入",onClick:t[9]||(t[9]=e=>a.showPicker=!0)},null,8,["modelValue"]),(0,i.bF)(b,{show:a.showPicker,"onUpdate:show":t[11]||(t[11]=e=>a.showPicker=e),round:"",position:"bottom"},{default:(0,i.k6)((()=>[(0,i.bF)(f,{columns:a.columns,onCancel:t[10]||(t[10]=e=>a.showPicker=!1),onConfirm:a.onConfirm},null,8,["columns","onConfirm"])])),_:1},8,["show"]),(0,i.Lk)("div",dt,[(0,i.bF)(g,{type:"primary",size:"large",onClick:a.uploadSettings},{default:(0,i.k6)((()=>[(0,i.eW)("上传")])),_:1},8,["onClick"])])]),(0,i.Lk)("div",vt,[pt,(0,i.Lk)("div",mt,[ht,(0,i.bF)(d,{modelValue:a.value,"onUpdate:modelValue":t[12]||(t[12]=e=>a.value=e),range:"",onChange:a.onChange},null,8,["modelValue","onChange"])]),(0,i.Lk)("div",ft,[(0,i.bF)(c,{modelValue:a.value[0],"onUpdate:modelValue":t[13]||(t[13]=e=>a.value[0]=e),type:"number",label:"最小值",placeholder:"最小值"},null,8,["modelValue"]),(0,i.bF)(c,{modelValue:a.value[1],"onUpdate:modelValue":t[14]||(t[14]=e=>a.value[1]=e),type:"number",label:"最大值",placeholder:"最大值"},null,8,["modelValue"])]),(0,i.Lk)("div",bt,[gt,(0,i.bF)(d,{modelValue:a.overSpeedValue,"onUpdate:modelValue":t[15]||(t[15]=e=>a.overSpeedValue=e),range:"",onChange:a.onOverSpeedChange},null,8,["modelValue","onChange"])]),(0,i.Lk)("div",wt,[(0,i.bF)(c,{modelValue:a.overSpeedValue[0],"onUpdate:modelValue":t[16]||(t[16]=e=>a.overSpeedValue[0]=e),type:"number",label:"最小值",placeholder:"最小值"},null,8,["modelValue"]),(0,i.bF)(c,{modelValue:a.overSpeedValue[1],"onUpdate:modelValue":t[17]||(t[17]=e=>a.overSpeedValue[1]=e),type:"number",label:"最大值",placeholder:"最大值"},null,8,["modelValue"])]),(0,i.Lk)("div",kt,[yt,(0,i.bF)(h,{modelValue:a.screencontrol,"onUpdate:modelValue":t[18]||(t[18]=e=>a.screencontrol=e),class:"switch-control"},null,8,["modelValue"])]),(0,i.Lk)("div",Ct,[Vt,(0,i.bF)(c,{modelValue:a.addr,"onUpdate:modelValue":t[19]||(t[19]=e=>a.addr=e),placeholder:"请输入设备地址"},null,8,["modelValue"])]),(0,i.Lk)("div",xt,[Ft,(0,i.bF)(w,{name:"plus",onClick:a.addEvent},null,8,["onClick"])]),((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(a.events,((e,l)=>((0,i.uX)(),(0,i.CE)("div",{key:l,class:"event-item"},[(0,i.bF)(k,{"right-width":65,onClose:a.onClose},{right:(0,i.k6)((()=>[(0,i.bF)(g,{square:"",type:"danger",onClick:e=>a.removeEvent(l),class:"delete-button"},{default:(0,i.k6)((()=>[(0,i.eW)("删除")])),_:2},1032,["onClick"])])),default:(0,i.k6)((()=>[(0,i.bF)(p,{"is-link":"",title:"事件类型",modelValue:e.type,"onUpdate:modelValue":t=>e.type=t,onClick:t=>e.showTypePicker=!0},{default:(0,i.k6)((()=>[(0,i.eW)((0,J.v_)(e.type),1)])),_:2},1032,["modelValue","onUpdate:modelValue","onClick"]),"其他"===e.type?((0,i.uX)(),(0,i.Wv)(c,{key:0,modelValue:e.code,"onUpdate:modelValue":t=>e.code=t,label:"事件编码",placeholder:"请输入事件编码"},null,8,["modelValue","onUpdate:modelValue"])):(0,i.Q3)("",!0),(0,i.bF)(c,{modelValue:e.source,"onUpdate:modelValue":t=>e.source=t,label:"事件来源",placeholder:"请输入事件来源"},null,8,["modelValue","onUpdate:modelValue"]),(0,i.bF)(c,{modelValue:e.priority,"onUpdate:modelValue":t=>e.priority=t,label:"优先级",placeholder:"请输入优先级"},null,8,["modelValue","onUpdate:modelValue"]),(0,i.bF)(c,{modelValue:e.showItem,"onUpdate:modelValue":t=>e.showItem=t,"is-link":"",readonly:"",label:"显示节目",placeholder:"选择显示节目",onClick:e=>a.showItemPicker=l},null,8,["modelValue","onUpdate:modelValue","onClick"]),(0,i.bF)(c,{modelValue:e.showDuration,"onUpdate:modelValue":t=>e.showDuration=t,label:"显示时长",placeholder:"请输入显示时长"},null,8,["modelValue","onUpdate:modelValue"]),(0,i.bF)(c,{modelValue:e.outputPin,"onUpdate:modelValue":t=>e.outputPin=t,"is-link":"",readonly:"",label:"输出引脚",placeholder:"请输入输出引脚",onClick:e=>a.showpinpicker=l},null,8,["modelValue","onUpdate:modelValue","onClick"]),(0,i.bF)(p,{"is-link":"",title:"输出电平",onClick:t=>e.showoutlevel=!0},{default:(0,i.k6)((()=>[(0,i.eW)((0,J.v_)(e.outlevel),1)])),_:2},1032,["onClick"]),l===a.events.length-1?((0,i.uX)(),(0,i.CE)("div",St,[(0,i.bF)(g,{round:"",type:"success",size:"large",onClick:a.uploadEventSettings},{default:(0,i.k6)((()=>[(0,i.eW)("设置")])),_:1},8,["onClick"])])):(0,i.Q3)("",!0)])),_:2},1032,["onClose"]),(0,i.bF)(m,{show:e.showoutlevel,"onUpdate:show":t=>e.showoutlevel=t,actions:a.levelactions,onSelect:t=>a.onSelectlevel(e,t)},null,8,["show","onUpdate:show","actions","onSelect"]),(0,i.bF)(m,{show:e.showTypePicker,"onUpdate:show":t=>e.showTypePicker=t,actions:a.typeaction,onSelect:t=>a.onSelecttype(e,t)},null,8,["show","onUpdate:show","actions","onSelect"]),(0,i.bF)(b,{modelValue:a.showItemPicker,"onUpdate:modelValue":t[21]||(t[21]=e=>a.showItemPicker=e),show:a.showItemPicker===l,round:"",position:"bottom"},{default:(0,i.k6)((()=>[(0,i.bF)(f,{columns:a.progremcolums,onCancel:t[20]||(t[20]=()=>a.showItemPicker=-1),onConfirm:e=>a.onConfirmShowItem(l,e)},null,8,["columns","onConfirm"])])),_:2},1032,["modelValue","show"]),(0,i.bF)(b,{modelValue:a.showpinpicker,"onUpdate:modelValue":t[23]||(t[23]=e=>a.showpinpicker=e),show:a.showpinpicker===l,round:"",position:"bottom"},{default:(0,i.k6)((()=>[(0,i.bF)(f,{columns:a.outpincolumns,onCancel:t[22]||(t[22]=()=>a.showpinpicker=-1),onConfirm:e=>a.onConfirmoutpin(l,e)},null,8,["columns","onConfirm"])])),_:2},1032,["modelValue","show"])])))),128))])])])),_:1},8,["modelValue","onRefresh"]),(0,i.bF)(S)],64)}l(8628);var Tt=l(5149),_t=l(4373),It=l(1508),Bt=(l(3081),{components:{Footer:o["default"],Header:it.A},data(){return{currentTitle:"车牌识别"}},setup(){const e=(0,r.KR)(1),t=(0,r.KR)(!1),l=(0,r.KR)(0),o=(0,r.KR)(""),n=(0,r.KR)(!1),a=(0,r.KR)(""),s=(0,r.KR)(""),u=(0,r.KR)(!1),c=(0,r.KR)(!1),d=(0,r.KR)(!1),v=(0,r.KR)(!1),p=(0,r.KR)(!1),m=(0,r.KR)(!1),h=(0,r.KR)([10,50]),f=(0,r.KR)([60,160]),b=(0,r.KR)([]),g=(0,r.KR)(!1),w=(0,r.KR)(""),k=(0,r.KR)(-1),y=(0,r.KR)(-1),C=(0,r.KR)(!1),V=[{name:"雷达触发",code:1},{name:"雷达超速",code:2},{name:"车牌触发",code:3},{name:"车牌超速",code:4},{name:"其他",code:5}],x=[{name:"0",value:0},{name:"1",value:1}];let F;F=Tt.connect("wss://broker.emqx.io:8084/mqtt");const S=e=>(0,It.P0)("当前值:"+e),R=e=>(0,It.P0)("当前超速值:"+e),T=[{name:"红",value:1},{name:"绿",value:2},{name:"黄",value:3}],_=[{text:"1",value:"1"},{text:"2",value:"2"},{text:"3",value:"3"},{text:"4",value:"4"},{text:"5",value:"5"}],I=[{text:"节目0",value:"0"},{text:"节目1",value:"1"},{text:"节目2",value:"2"},{text:"节目3",value:"3"},{text:"节目4",value:"4"},{text:"节目5",value:"5"},{text:"节目6",value:"6"},{text:"节目7",value:"7"},{text:"节目8",value:"8"},{text:"节目9",value:"9"}],B=[{text:"关闭",value:"0"},{text:"引脚1",value:"1"},{text:"引脚2",value:"2"},{text:"引脚3",value:"3"},{text:"引脚4",value:"4"},{text:"引脚5",value:"5"},{text:"引脚6",value:"6"},{text:"引脚7",value:"7"},{text:"引脚8",value:"8"}],P=()=>{"192.168.4.1"===window.location.hostname?(console.log("in local"),t.value=!0):t.value=!1},E=(e,t)=>{b.value[e].showItem=t.selectedOptions[0].value,k.value=-1},U=(e,t)=>{b.value[e].outputPin=t.selectedOptions[0].value,y.value=-1},K=e=>{u.value=!1,a.value=e.name,(0,It.P0)(e.name)},O=e=>{c.value=!1,s.value=e.name,(0,It.P0)(e.name)},W=({selectedOptions:e})=>{m.value=!1,o.value=e[0].text},$=(e,t)=>{e.type=t.name,e.code=t.code.toString(),e.showTypePicker=!1,(0,It.P0)(e.type)},M=(e,t)=>{e.outlevel=t.name,e.value=t.value.toString(),e.showoutlevel=!1,(0,It.P0)(e.outlevel)},L=()=>{n.value=!0,N()},N=()=>{F.publish("recewive/abc",JSON.stringify({JSON_id:e.value,LPR_card:{get_info:1}}))},X=()=>{F.on("connect",(()=>{console.log("Connected to MQTT broker"),F.subscribe("/mytest/abc")})),F.on("message",((e,t)=>{const l=JSON.parse(t.toString());console.log("Received message:",l),l.LPR_card&&(D(l),n.value=!1)}))},z=()=>{if(!l.value||!a.value||!s.value||!o.value)return void(0,It.P0)("请填写完整数显信息");const n={JSON_id:e.value,LPR_card:{seg_cfg:{bright:parseInt(l.value),trig_c:T.findIndex((e=>e.name===a.value))+1,over_spd_c:T.findIndex((e=>e.name===s.value))+1,bk_trig_en:d.value?1:0,bk_over_spd_en:v.value?1:0,bk_spd:parseInt(o.value)}}};console.log(JSON.stringify(n)),t.value?(console.log("axios发送"),_t.A.post("/communication",n,{headers:{"content-type":"application/json"}}).then((t=>{D(t.data),(0,It.P0)("事件设置已上传"),console.log(t.data),e.value++})).catch((t=>{console.error("Upload error:",t),(0,It.P0)("事件设置上传失败"),e.value++}))):(e.value++,console.log("mqtt发送"),F.publish("recewive/abc",JSON.stringify(n),(e=>{e?console.error("Publish error:",e):(console.log("Payload published:",n),(0,It.P0)("设置已上传"))})))},Y=()=>{for(const e of b.value)if(!e.type||!e.code||!e.source||!e.priority||!e.showItem||!e.showDuration||!e.outputPin||!e.outlevel||!w)return void(0,It.P0)("请填写完整事件信息");const l={JSON_id:e.value,LPR_card:{trig_cfg:{trig_spd_L:h.value[0],trig_spd_H:h.value[1],lmt_spd_L:f.value[0],lmt_spd_H:f.value[1],screen_ctrl_en:p.value?1:0,addr:w.value,event:b.value.map((e=>({code:parseInt(e.code),source:parseInt(e.source),priority:parseInt(e.priority),prg_num:parseInt(e.showItem),prg_time:parseInt(e.showDuration),output:parseInt(e.outputPin),level:parseInt(e.outlevel)})))},get_cfg:1,trig_cfg_ok:1},error_code:0};console.log(JSON.stringify(l)),t.value?(console.log("axios发送"),_t.A.post("/communication",l,{headers:{"content-type":"application/json"}}).then((t=>{D(t.data),(0,It.P0)("事件设置已上传"),console.log(t.data),e.value++})).catch((t=>{console.error("Upload error:",t),(0,It.P0)("事件设置上传失败"),e.value++}))):(console.log("mqtt发送"),e.value++,F.publish("/communication",JSON.stringify(l),(e=>{e?console.error("Publish error:",e):(console.log("Payload published:",l),(0,It.P0)("设置已上传"))})))},D=e=>{if(e.LPR_card){const t=e.LPR_card.seg_cfg,n=e.LPR_card.trig_cfg;l.value=t.bright,a.value=T.find((e=>e.value===t.trig_c)).name,s.value=T.find((e=>e.value===t.over_spd_c)).name,d.value=!!t.bk_trig_en,v.value=!!t.bk_over_spd_en,o.value=t.bk_spd.toString(),w.value=n.addr,h.value=[n.trig_spd_L,n.trig_spd_H],f.value=[n.lmt_spd_L,n.lmt_spd_H],p.value=!!n.screen_ctrl_en,b.value=n.event.map((e=>{let t;if(e.code>4)t="其他";else{const l=V.find((t=>t.code===e.code));t=l?l.name:"未知类型"}return{type:t,code:e.code.toString(),source:e.source.toString(),priority:e.priority.toString(),showItem:e.prg_num.toString(),showDuration:e.prg_time.toString(),outputPin:e.output.toString(),outlevel:e.level.toString()}}))}};(0,i.sV)((()=>{X(),P()})),(0,i.xo)((()=>{F&&F.end()}));const H=()=>{b.value.push({type:"",code:"",source:"",priority:"",showItem:"",showDuration:"",outputPin:"",outlevel:"",showTypePicker:!1,showoutlevel:!1})},A=e=>{b.value.splice(e,1)},Q=(e,t)=>{"right"===e&&t.close()},j=e=>{l.value=e,(0,It.P0)("亮度值:"+e)};return{number:l,fieldValue:o,loading:n,showNormalColor:u,showOverSpeedColor:c,checked:d,showOverSpeedBlink:v,showPicker:m,actions:T,columns:_,onSelectNormalColor:K,onSelectOverSpeedColor:O,onConfirm:W,onRefresh:L,selectedNormalColor:a,selectedOverSpeedColor:s,value:h,onChange:S,overSpeedValue:f,onOverSpeedChange:R,screencontrol:p,events:b,addEvent:H,removeEvent:A,uploadSettings:z,showtype:g,onSelecttype:$,typeaction:V,onClose:Q,onBrightnessChange:j,uploadEventSettings:Y,parseAndFillData:D,checkEnvironment:P,isLocal:t,jsonId:e,addr:w,onConfirmShowItem:E,showItemPicker:k,progremcolums:I,onSelectlevel:M,levelactions:x,outlevel:C,showpinpicker:y,outpincolumns:B,onConfirmoutpin:U}}}),Pt=l(1241);const Et=(0,Pt.A)(Bt,[["render",Rt],["__scopeId","data-v-a06cbe3a"]]);var Ut=Et},7057:function(e,t,l){l(6647),l(7708),l(7484),l(887)},1477:function(e,t,l){l.d(t,{O:function(){return p}});var o=l(4726),n=l(6768),a=l(144),i=l(5828),r=l(667),s=l(6591),u=l(6145);const[c,d]=(0,i.YX)("swipe-item");var v=(0,n.pM)({name:c,setup(e,{slots:t}){let l;const o=(0,a.Kh)({offset:0,inited:!1,mounted:!1}),{parent:i,index:c}=(0,s.cJ)(r.te);if(!i)return void 0;const v=(0,n.EW)((()=>{const e={},{vertical:t}=i.props;return i.size.value&&(e[t?"height":"width"]=`${i.size.value}px`),o.offset&&(e.transform=`translate${t?"Y":"X"}(${o.offset}px)`),e})),p=(0,n.EW)((()=>{const{loop:e,lazyRender:t}=i.props;if(!t||l)return!0;if(!o.mounted)return!1;const n=i.activeIndicator.value,a=i.count.value-1,r=0===n&&e?a:n-1,s=n===a&&e?0:n+1;return l=c.value===n||c.value===r||c.value===s,l})),m=e=>{o.offset=e};return(0,n.sV)((()=>{(0,n.dY)((()=>{o.mounted=!0}))})),(0,u.c)({setOffset:m}),()=>{var e;return(0,n.bF)("div",{class:d(),style:v.value},[p.value?null==(e=t.default)?void 0:e.call(t):null])}}});const p=(0,o.G)(v)},667:function(e,t,l){l.d(t,{Ay:function(){return b},te:function(){return f}});var o=l(6768),n=l(144),a=l(5828),i=l(6370),r=l(7905),s=l(240),u=l(6591),c=l(4390),d=l(6145),v=l(8957);const[p,m]=(0,a.YX)("swipe"),h={loop:i.Rd,width:i.VQ,height:i.VQ,vertical:Boolean,autoplay:(0,i.TU)(0),duration:(0,i.TU)(500),touchable:i.Rd,lazyRender:Boolean,initialSwipe:(0,i.TU)(0),indicatorColor:String,showIndicators:i.Rd,stopPropagation:i.Rd},f=Symbol(p);var b=(0,o.pM)({name:p,props:h,emits:["change","dragStart","dragEnd"],setup(e,{emit:t,slots:l}){const a=(0,n.KR)(),i=(0,n.KR)(),p=(0,n.Kh)({rect:null,width:0,height:0,offset:0,active:0,swiping:!1});let h=!1;const b=(0,c.P)(),{children:g,linkChildren:w}=(0,u.Py)(f),k=(0,o.EW)((()=>g.length)),y=(0,o.EW)((()=>p[e.vertical?"height":"width"])),C=(0,o.EW)((()=>e.vertical?b.deltaY.value:b.deltaX.value)),V=(0,o.EW)((()=>{if(p.rect){const t=e.vertical?p.rect.height:p.rect.width;return t-y.value*k.value}return 0})),x=(0,o.EW)((()=>y.value?Math.ceil(Math.abs(V.value)/y.value):k.value)),F=(0,o.EW)((()=>k.value*y.value)),S=(0,o.EW)((()=>(p.active+k.value)%k.value)),R=(0,o.EW)((()=>{const t=e.vertical?"vertical":"horizontal";return b.direction.value===t})),T=(0,o.EW)((()=>{const t={transitionDuration:`${p.swiping?0:e.duration}ms`,transform:`translate${e.vertical?"Y":"X"}(${+p.offset.toFixed(2)}px)`};if(y.value){const l=e.vertical?"height":"width",o=e.vertical?"width":"height";t[l]=`${F.value}px`,t[o]=e[o]?`${e[o]}px`:""}return t})),_=t=>{const{active:l}=p;return t?e.loop?(0,r.qE)(l+t,-1,k.value):(0,r.qE)(l+t,0,x.value):l},I=(t,l=0)=>{let o=t*y.value;e.loop||(o=Math.min(o,-V.value));let n=l-o;return e.loop||(n=(0,r.qE)(n,V.value,0)),n},B=({pace:l=0,offset:o=0,emitChange:n})=>{if(k.value<=1)return;const{active:a}=p,i=_(l),r=I(i,o);if(e.loop){if(g[0]&&r!==V.value){const e=r0;g[k.value-1].setOffset(e?-F.value:0)}}p.active=i,p.offset=r,n&&i!==a&&t("change",S.value)},P=()=>{p.swiping=!0,p.active<=-1?B({pace:k.value}):p.active>=k.value&&B({pace:-k.value})},E=()=>{P(),b.reset(),(0,u.r7)((()=>{p.swiping=!1,B({pace:-1,emitChange:!0})}))},U=()=>{P(),b.reset(),(0,u.r7)((()=>{p.swiping=!1,B({pace:1,emitChange:!0})}))};let K;const O=()=>clearTimeout(K),W=()=>{O(),+e.autoplay>0&&k.value>1&&(K=setTimeout((()=>{U(),W()}),+e.autoplay))},$=(t=+e.initialSwipe)=>{if(!a.value)return;const l=()=>{var l,o;if(!(0,s.dK)(a)){const t={width:a.value.offsetWidth,height:a.value.offsetHeight};p.rect=t,p.width=+(null!=(l=e.width)?l:t.width),p.height=+(null!=(o=e.height)?o:t.height)}k.value&&(t=Math.min(k.value-1,t),-1===t&&(t=k.value-1)),p.active=t,p.swiping=!0,p.offset=I(t),g.forEach((e=>{e.setOffset(0)})),W()};(0,s.dK)(a)?(0,o.dY)().then(l):l()},M=()=>$(p.active);let L;const N=t=>{!e.touchable||t.touches.length>1||(b.start(t),h=!1,L=Date.now(),O(),P())},X=l=>{if(e.touchable&&p.swiping&&(b.move(l),R.value)){const o=!e.loop&&(0===p.active&&C.value>0||p.active===k.value-1&&C.value<0);o||((0,s.wo)(l,e.stopPropagation),B({offset:C.value}),h||(t("dragStart",{index:S.value}),h=!0))}},z=()=>{if(!e.touchable||!p.swiping)return;const l=Date.now()-L,o=C.value/l,n=Math.abs(o)>.25||Math.abs(C.value)>y.value/2;if(n&&R.value){const t=e.vertical?b.offsetY.value:b.offsetX.value;let l=0;l=e.loop?t>0?C.value>0?-1:1:0:-Math[C.value>0?"ceil":"floor"](C.value/y.value),B({pace:l,emitChange:!0})}else C.value&&B({pace:0});h=!1,p.swiping=!1,t("dragEnd",{index:S.value}),W()},Y=(t,l={})=>{P(),b.reset(),(0,u.r7)((()=>{let o;o=e.loop&&t===k.value?0===p.active?0:t:t%k.value,l.immediate?(0,u.r7)((()=>{p.swiping=!1})):p.swiping=!1,B({pace:o-p.active,emitChange:!0})}))},D=(t,l)=>{const n=l===S.value,a=n?{backgroundColor:e.indicatorColor}:void 0;return(0,o.bF)("i",{style:a,class:m("indicator",{active:n})},null)},H=()=>l.indicator?l.indicator({active:S.value,total:k.value}):e.showIndicators&&k.value>1?(0,o.bF)("div",{class:m("indicators",{vertical:e.vertical})},[Array(k.value).fill("").map(D)]):void 0;return(0,d.c)({prev:E,next:U,state:p,resize:M,swipeTo:Y}),w({size:y,props:e,count:k,activeIndicator:S}),(0,o.wB)((()=>e.initialSwipe),(e=>$(+e))),(0,o.wB)(k,(()=>$(p.active))),(0,o.wB)((()=>e.autoplay),W),(0,o.wB)([s.Xw,s.C7,()=>e.width,()=>e.height],M),(0,o.wB)((0,u.TU)(),(e=>{"visible"===e?W():O()})),(0,o.sV)($),(0,o.n)((()=>$(p.active))),(0,v.V)((()=>$(p.active))),(0,o.Y4)(O),(0,o.xo)(O),(0,u.ML)("touchmove",X,{target:i}),()=>{var t;return(0,o.bF)("div",{ref:a,class:m()},[(0,o.bF)("div",{ref:i,style:T.value,class:m("track",{vertical:e.vertical}),onTouchstartPassive:N,onTouchend:z,onTouchcancel:z},[null==(t=l.default)?void 0:t.call(l)]),H()])}}})},9265:function(e,t,l){l.d(t,{Hp:function(){return a}});var o=l(4726),n=l(667);const a=(0,o.G)(n.Ay)}}]);