@bscjc/webui 1.5.0 → 1.6.0
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.
- package/README.md +12 -11
- package/dist/components/JcInputTag/index.d.ts +214 -0
- package/dist/components/JcInputTag/index.vue.d.ts +126 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/es/index.mjs +1686 -1438
- package/dist/index.css +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/lib/index.cjs +9 -8
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/types/components/JcInputTag/index.d.ts +710 -0
- package/dist/types/components/JcInputTag/index.vue.d.ts +1124 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +2 -2
package/dist/lib/index.cjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),W=require("lodash-es"),Ct=require("@vueuse/shared"),
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $t(n){var t;return typeof n=="function"?t={callback:n}:t=n,t}function Tt(n,t){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,i,o,a=function(c){for(var d=arguments.length,f=new Array(d>1?d-1:0),g=1;g<d;g++)f[g-1]=arguments[g];if(o=f,!(s&&c===i)){var v=l.leading;typeof v=="function"&&(v=v(c,i)),(!s||c!==i)&&v&&n.apply(void 0,[c].concat(Le(o))),i=c,clearTimeout(s),s=setTimeout(function(){n.apply(void 0,[c].concat(Le(o))),s=0},t)}};return a._clear=function(){clearTimeout(s),s=null},a}function Qe(n,t){if(n===t)return!0;if(pe(n)==="object"){for(var l in n)if(!Qe(n[l],t[l]))return!1;return!0}return!1}var Mt=function(){function n(t,l,s){Vt(this,n),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(l,s)}return At(n,[{key:"createObserver",value:function(l,s){var i=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=$t(l),this.callback=function(r,c){i.options.callback(r,c),r&&i.options.once&&(i.frozen=!0,i.destroyObserver())},this.callback&&this.options.throttle){var o=this.options.throttleOptions||{},a=o.leading;this.callback=Tt(this.callback,this.options.throttle,{leading:function(c){return a==="both"||a==="visible"&&c||a==="hidden"&&!c}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(r){var c=r[0];if(r.length>1){var d=r.find(function(g){return g.isIntersecting});d&&(c=d)}if(i.callback){var f=c.isIntersecting&&c.intersectionRatio>=i.threshold;if(f===i.oldResult)return;i.oldResult=f,i.callback(f,c)}},this.options.intersection),e.nextTick(function(){i.observer&&i.observer.observe(i.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),n}();function Je(n,t,l){var s=t.value;if(s)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var i=new Mt(n,s,l);n._vue_visibilityState=i}}function Dt(n,t,l){var s=t.value,i=t.oldValue;if(!Qe(s,i)){var o=n._vue_visibilityState;if(!s){He(n);return}o?o.createObserver(s,l):Je(n,{value:s},l)}}function He(n){var t=n._vue_visibilityState;t&&(t.destroyObserver(),delete n._vue_visibilityState)}var Lt={beforeMount:Je,updated:Dt,unmounted:He},Ot={itemsLimit:1e3},Rt=/(auto|scroll)/;function We(n,t){return n.parentNode===null?t:We(n.parentNode,t.concat([n]))}var be=function(t,l){return getComputedStyle(t,null).getPropertyValue(l)},jt=function(t){return be(t,"overflow")+be(t,"overflow-y")+be(t,"overflow-x")},Pt=function(t){return Rt.test(jt(t))};function Oe(n){if(n instanceof HTMLElement||n instanceof SVGElement){for(var t=We(n.parentNode,[]),l=0;l<t.length;l+=1)if(Pt(t[l]))return t[l];return document.scrollingElement||document.documentElement}}function Ee(n){"@babel/helpers - typeof";return Ee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ee(n)}var qt={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(t){return["vertical","horizontal"].includes(t)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function Ut(){return this.items.length&&Ee(this.items[0])!=="object"}var xe=!1;if(typeof window<"u"){xe=!1;try{var Kt=Object.defineProperty({},"passive",{get:function(){xe=!0}});window.addEventListener("test",null,Kt)}catch{}}let Qt=0;var $e={name:"RecycleScroller",components:{ResizeObserver:ye},directives:{ObserveVisibility:Lt},props:{...qt,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const n={"-1":{accumulator:0}},t=this.items,l=this.sizeField,s=this.minItemSize;let i=1e4,o=0,a;for(let r=0,c=t.length;r<c;r++)a=t[r][l]||s,a<i&&(i=a),o+=a,n[r]={accumulator:o,size:a};return this.$_computedMinItemSize=i,n}return[]},simpleArray:Ut,itemIndexByKey(){const{keyField:n,items:t}=this,l={};for(let s=0,i=t.length;s<i;s++)l[t[s][n]]=s;return l}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const n=this.$_lastUpdateScrollPosition;typeof n=="number"&&this.$nextTick(()=>{this.scrollToPosition(n)})},beforeUnmount(){this.removeListeners()},methods:{addView(n,t,l,s,i){const o=e.markRaw({id:Qt++,index:t,used:!0,key:s,type:i}),a=e.shallowReactive({item:l,position:0,nr:o});return n.push(a),a},unuseView(n,t=!1){const l=this.$_unusedViews,s=n.nr.type;let i=l.get(s);i||(i=[],l.set(s,i)),i.push(n),t||(n.nr.used=!1,n.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(n){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const t=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:l}=this.updateVisibleItems(!1,!0);l||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});t(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&t()},this.updateInterval))}},handleVisibilityChange(n,t){this.ready&&(n||t.boundingClientRect.width!==0||t.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(n,t=!1){const l=this.itemSize,s=this.gridItems||1,i=this.itemSecondarySize||l,o=this.$_computedMinItemSize,a=this.typeField,r=this.simpleArray?null:this.keyField,c=this.items,d=c.length,f=this.sizes,g=this.$_views,v=this.$_unusedViews,b=this.pool,V=this.itemIndexByKey;let _,h,y,p,A;if(!d)_=h=p=A=y=0;else if(this.$_prerender)_=p=0,h=A=Math.min(this.prerender,c.length),y=null;else{const I=this.getScroll();if(t){let q=I.start-this.$_lastUpdateScrollPosition;if(q<0&&(q=-q),l===null&&q<o||q<l)return{continuous:!0}}this.$_lastUpdateScrollPosition=I.start;const O=this.buffer;I.start-=O,I.end+=O;let D=0;if(this.$refs.before&&(D=this.$refs.before.scrollHeight,I.start-=D),this.$refs.after){const q=this.$refs.after.scrollHeight;I.end+=q}if(l===null){let q,N=0,T=d-1,u=~~(d/2),k;do k=u,q=f[u].accumulator,q<I.start?N=u:u<d-1&&f[u+1].accumulator>I.start&&(T=u),u=~~((N+T)/2);while(u!==k);for(u<0&&(u=0),_=u,y=f[d-1].accumulator,h=u;h<d&&f[h].accumulator<I.end;h++);for(h===-1?h=c.length-1:(h++,h>d&&(h=d)),p=_;p<d&&D+f[p].accumulator<I.start;p++);for(A=p;A<d&&D+f[A].accumulator<I.end;A++);}else{_=~~(I.start/l*s);const q=_%s;_-=q,h=Math.ceil(I.end/l*s),p=Math.max(0,Math.floor((I.start-D)/l*s)),A=Math.floor((I.end-D)/l*s),_<0&&(_=0),h>d&&(h=d),p<0&&(p=0),A>d&&(A=d),y=Math.ceil(d/s)*l}}h-_>Ot.itemsLimit&&this.itemsLimitError(),this.totalSize=y;let m;const F=_<=this.$_endIndex&&h>=this.$_startIndex;if(F)for(let I=0,O=b.length;I<O;I++)m=b[I],m.nr.used&&(n&&(m.nr.index=V[m.item[r]]),(m.nr.index==null||m.nr.index<_||m.nr.index>=h)&&this.unuseView(m));const E=F?null:new Map;let w,$,M;for(let I=_;I<h;I++){w=c[I];const O=r?w[r]:w;if(O==null)throw new Error(`Key is ${O} on item (keyField is '${r}')`);if(m=g.get(O),!l&&!f[I].size){m&&this.unuseView(m);continue}$=w[a];let D=v.get($),q=!1;if(!m)F?D&&D.length?m=D.pop():m=this.addView(b,I,w,O,$):(M=E.get($)||0,(!D||M>=D.length)&&(m=this.addView(b,I,w,O,$),this.unuseView(m,!0),D=v.get($)),m=D[M],E.set($,M+1)),g.delete(m.nr.key),m.nr.used=!0,m.nr.index=I,m.nr.key=O,m.nr.type=$,g.set(O,m),q=!0;else if(!m.nr.used&&(m.nr.used=!0,q=!0,D)){const N=D.indexOf(m);N!==-1&&D.splice(N,1)}m.item=w,q&&(I===c.length-1&&this.$emit("scroll-end"),I===0&&this.$emit("scroll-start")),l===null?(m.position=f[I-1].accumulator,m.offset=0):(m.position=Math.floor(I/s)*l,m.offset=I%s*i)}return this.$_startIndex=_,this.$_endIndex=h,this.emitUpdate&&this.$emit("update",_,h,p,A),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:F}},getListenerTarget(){let n=Oe(this.$el);return window.document&&(n===window.document.documentElement||n===window.document.body)&&(n=window),n},getScroll(){const{$el:n,direction:t}=this,l=t==="vertical";let s;if(this.pageMode){const i=n.getBoundingClientRect(),o=l?i.height:i.width;let a=-(l?i.top:i.left),r=l?window.innerHeight:window.innerWidth;a<0&&(r+=a,a=0),a+r>o&&(r=o-a),s={start:a,end:a+r}}else l?s={start:n.scrollTop,end:n.scrollTop+n.clientHeight}:s={start:n.scrollLeft,end:n.scrollLeft+n.clientWidth};return s},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,xe?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(n){let t;const l=this.gridItems||1;this.itemSize===null?t=n>0?this.sizes[n-1].accumulator:0:t=Math.floor(n/l)*this.itemSize,this.scrollToPosition(t)},scrollToPosition(n){const t=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let l,s,i;if(this.pageMode){const o=Oe(this.$el),a=o.tagName==="HTML"?0:o[t.scroll],r=o.getBoundingClientRect(),d=this.$el.getBoundingClientRect()[t.start]-r[t.start];l=o,s=t.scroll,i=n+a+d}else l=this.$el,s=t.scroll,i=n;l[s]=i},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((n,t)=>n.nr.index-t.nr.index)}}};const Jt={key:0,ref:"before",class:"vue-recycle-scroller__slot"},Ht={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function Wt(n,t,l,s,i,o){const a=e.resolveComponent("ResizeObserver"),r=e.resolveDirective("observe-visibility");return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["vue-recycle-scroller",{ready:i.ready,"page-mode":l.pageMode,[`direction-${n.direction}`]:!0}]),onScrollPassive:t[0]||(t[0]=(...c)=>o.handleScroll&&o.handleScroll(...c))},[n.$slots.before?(e.openBlock(),e.createElementBlock("div",Jt,[e.renderSlot(n.$slots,"before")],512)):e.createCommentVNode("v-if",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.listTag),{ref:"wrapper",style:e.normalizeStyle({[n.direction==="vertical"?"minHeight":"minWidth"]:i.totalSize+"px"}),class:e.normalizeClass(["vue-recycle-scroller__item-wrapper",l.listClass])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.pool,c=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.itemTag),e.mergeProps({key:c.nr.id,style:i.ready?{transform:`translate${n.direction==="vertical"?"Y":"X"}(${c.position}px) translate${n.direction==="vertical"?"X":"Y"}(${c.offset}px)`,width:l.gridItems?`${n.direction==="vertical"&&l.itemSecondarySize||l.itemSize}px`:void 0,height:l.gridItems?`${n.direction==="horizontal"&&l.itemSecondarySize||l.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[l.itemClass,{hover:!l.skipHover&&i.hoverKey===c.nr.key}]]},e.toHandlers(l.skipHover?{}:{mouseenter:()=>{i.hoverKey=c.nr.key},mouseleave:()=>{i.hoverKey=null}})),{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default",{item:c.item,index:c.nr.index,active:c.nr.used})]),_:2},1040,["style","class"]))),128)),e.renderSlot(n.$slots,"empty")]),_:3},8,["style","class"])),n.$slots.after?(e.openBlock(),e.createElementBlock("div",Ht,[e.renderSlot(n.$slots,"after")],512)):e.createCommentVNode("v-if",!0),e.createVNode(a,{onNotify:o.handleResize},null,8,["onNotify"])],34)),[[r,o.handleVisibilityChange]])}$e.render=Wt;$e.__file="src/components/RecycleScroller.vue";function le(n){return Array.isArray?Array.isArray(n):Xe(n)==="[object Array]"}function Gt(n){if(typeof n=="string")return n;let t=n+"";return t=="0"&&1/n==-1/0?"-0":t}function Yt(n){return n==null?"":Gt(n)}function te(n){return typeof n=="string"}function Ge(n){return typeof n=="number"}function Xt(n){return n===!0||n===!1||Zt(n)&&Xe(n)=="[object Boolean]"}function Ye(n){return typeof n=="object"}function Zt(n){return Ye(n)&&n!==null}function G(n){return n!=null}function we(n){return!n.trim().length}function Xe(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}const en="Incorrect 'index' type",tn=n=>`Invalid value for key ${n}`,nn=n=>`Pattern length exceeds max of ${n}.`,ln=n=>`Missing ${n} property in key`,sn=n=>`Property 'weight' in key '${n}' must be a positive integer`,Re=Object.prototype.hasOwnProperty;class on{constructor(t){this._keys=[],this._keyMap={};let l=0;t.forEach(s=>{let i=Ze(s);this._keys.push(i),this._keyMap[i.id]=i,l+=i.weight}),this._keys.forEach(s=>{s.weight/=l})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Ze(n){let t=null,l=null,s=null,i=1,o=null;if(te(n)||le(n))s=n,t=je(n),l=Se(n);else{if(!Re.call(n,"name"))throw new Error(ln("name"));const a=n.name;if(s=a,Re.call(n,"weight")&&(i=n.weight,i<=0))throw new Error(sn(a));t=je(a),l=Se(a),o=n.getFn}return{path:t,id:l,weight:i,src:s,getFn:o}}function je(n){return le(n)?n:n.split(".")}function Se(n){return le(n)?n.join("."):n}function rn(n,t){let l=[],s=!1;const i=(o,a,r)=>{if(G(o))if(!a[r])l.push(o);else{let c=a[r];const d=o[c];if(!G(d))return;if(r===a.length-1&&(te(d)||Ge(d)||Xt(d)))l.push(Yt(d));else if(le(d)){s=!0;for(let f=0,g=d.length;f<g;f+=1)i(d[f],a,r+1)}else a.length&&i(d,a,r+1)}};return i(n,te(t)?t.split("."):t,0),s?l:l[0]}const an={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},un={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(n,t)=>n.score===t.score?n.idx<t.idx?-1:1:n.score<t.score?-1:1},cn={location:0,threshold:.6,distance:100},dn={useExtendedSearch:!1,getFn:rn,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var B={...un,...an,...cn,...dn};const fn=/[^ ]+/g;function hn(n=1,t=3){const l=new Map,s=Math.pow(10,t);return{get(i){const o=i.match(fn).length;if(l.has(o))return l.get(o);const a=1/Math.pow(o,.5*n),r=parseFloat(Math.round(a*s)/s);return l.set(o,r),r},clear(){l.clear()}}}class Te{constructor({getFn:t=B.getFn,fieldNormWeight:l=B.fieldNormWeight}={}){this.norm=hn(l,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((l,s)=>{this._keysMap[l.id]=s})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,te(this.docs[0])?this.docs.forEach((t,l)=>{this._addString(t,l)}):this.docs.forEach((t,l)=>{this._addObject(t,l)}),this.norm.clear())}add(t){const l=this.size();te(t)?this._addString(t,l):this._addObject(t,l)}removeAt(t){this.records.splice(t,1);for(let l=t,s=this.size();l<s;l+=1)this.records[l].i-=1}getValueForItemAtKeyId(t,l){return t[this._keysMap[l]]}size(){return this.records.length}_addString(t,l){if(!G(t)||we(t))return;let s={v:t,i:l,n:this.norm.get(t)};this.records.push(s)}_addObject(t,l){let s={i:l,$:{}};this.keys.forEach((i,o)=>{let a=i.getFn?i.getFn(t):this.getFn(t,i.path);if(G(a)){if(le(a)){let r=[];const c=[{nestedArrIndex:-1,value:a}];for(;c.length;){const{nestedArrIndex:d,value:f}=c.pop();if(G(f))if(te(f)&&!we(f)){let g={v:f,i:d,n:this.norm.get(f)};r.push(g)}else le(f)&&f.forEach((g,v)=>{c.push({nestedArrIndex:v,value:g})})}s.$[o]=r}else if(te(a)&&!we(a)){let r={v:a,n:this.norm.get(a)};s.$[o]=r}}}),this.records.push(s)}toJSON(){return{keys:this.keys,records:this.records}}}function et(n,t,{getFn:l=B.getFn,fieldNormWeight:s=B.fieldNormWeight}={}){const i=new Te({getFn:l,fieldNormWeight:s});return i.setKeys(n.map(Ze)),i.setSources(t),i.create(),i}function pn(n,{getFn:t=B.getFn,fieldNormWeight:l=B.fieldNormWeight}={}){const{keys:s,records:i}=n,o=new Te({getFn:t,fieldNormWeight:l});return o.setKeys(s),o.setIndexRecords(i),o}function fe(n,{errors:t=0,currentLocation:l=0,expectedLocation:s=0,distance:i=B.distance,ignoreLocation:o=B.ignoreLocation}={}){const a=t/n.length;if(o)return a;const r=Math.abs(s-l);return i?a+r/i:r?1:a}function mn(n=[],t=B.minMatchCharLength){let l=[],s=-1,i=-1,o=0;for(let a=n.length;o<a;o+=1){let r=n[o];r&&s===-1?s=o:!r&&s!==-1&&(i=o-1,i-s+1>=t&&l.push([s,i]),s=-1)}return n[o-1]&&o-s>=t&&l.push([s,o-1]),l}const ce=32;function vn(n,t,l,{location:s=B.location,distance:i=B.distance,threshold:o=B.threshold,findAllMatches:a=B.findAllMatches,minMatchCharLength:r=B.minMatchCharLength,includeMatches:c=B.includeMatches,ignoreLocation:d=B.ignoreLocation}={}){if(t.length>ce)throw new Error(nn(ce));const f=t.length,g=n.length,v=Math.max(0,Math.min(s,g));let b=o,V=v;const _=r>1||c,h=_?Array(g):[];let y;for(;(y=n.indexOf(t,V))>-1;){let w=fe(t,{currentLocation:y,expectedLocation:v,distance:i,ignoreLocation:d});if(b=Math.min(w,b),V=y+f,_){let $=0;for(;$<f;)h[y+$]=1,$+=1}}V=-1;let p=[],A=1,m=f+g;const F=1<<f-1;for(let w=0;w<f;w+=1){let $=0,M=m;for(;$<M;)fe(t,{errors:w,currentLocation:v+M,expectedLocation:v,distance:i,ignoreLocation:d})<=b?$=M:m=M,M=Math.floor((m-$)/2+$);m=M;let I=Math.max(1,v-M+1),O=a?g:Math.min(v+M,g)+f,D=Array(O+2);D[O+1]=(1<<w)-1;for(let N=O;N>=I;N-=1){let T=N-1,u=l[n.charAt(T)];if(_&&(h[T]=+!!u),D[N]=(D[N+1]<<1|1)&u,w&&(D[N]|=(p[N+1]|p[N])<<1|1|p[N+1]),D[N]&F&&(A=fe(t,{errors:w,currentLocation:T,expectedLocation:v,distance:i,ignoreLocation:d}),A<=b)){if(b=A,V=T,V<=v)break;I=Math.max(1,2*v-V)}}if(fe(t,{errors:w+1,currentLocation:v,expectedLocation:v,distance:i,ignoreLocation:d})>b)break;p=D}const E={isMatch:V>=0,score:Math.max(.001,A)};if(_){const w=mn(h,r);w.length?c&&(E.indices=w):E.isMatch=!1}return E}function gn(n){let t={};for(let l=0,s=n.length;l<s;l+=1){const i=n.charAt(l);t[i]=(t[i]||0)|1<<s-l-1}return t}const me=String.prototype.normalize?n=>n.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,""):n=>n;class tt{constructor(t,{location:l=B.location,threshold:s=B.threshold,distance:i=B.distance,includeMatches:o=B.includeMatches,findAllMatches:a=B.findAllMatches,minMatchCharLength:r=B.minMatchCharLength,isCaseSensitive:c=B.isCaseSensitive,ignoreDiacritics:d=B.ignoreDiacritics,ignoreLocation:f=B.ignoreLocation}={}){if(this.options={location:l,threshold:s,distance:i,includeMatches:o,findAllMatches:a,minMatchCharLength:r,isCaseSensitive:c,ignoreDiacritics:d,ignoreLocation:f},t=c?t:t.toLowerCase(),t=d?me(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const g=(b,V)=>{this.chunks.push({pattern:b,alphabet:gn(b),startIndex:V})},v=this.pattern.length;if(v>ce){let b=0;const V=v%ce,_=v-V;for(;b<_;)g(this.pattern.substr(b,ce),b),b+=ce;if(V){const h=v-ce;g(this.pattern.substr(h),h)}}else g(this.pattern,0)}searchIn(t){const{isCaseSensitive:l,ignoreDiacritics:s,includeMatches:i}=this.options;if(t=l?t:t.toLowerCase(),t=s?me(t):t,this.pattern===t){let _={isMatch:!0,score:0};return i&&(_.indices=[[0,t.length-1]]),_}const{location:o,distance:a,threshold:r,findAllMatches:c,minMatchCharLength:d,ignoreLocation:f}=this.options;let g=[],v=0,b=!1;this.chunks.forEach(({pattern:_,alphabet:h,startIndex:y})=>{const{isMatch:p,score:A,indices:m}=vn(t,_,h,{location:o+y,distance:a,threshold:r,findAllMatches:c,minMatchCharLength:d,includeMatches:i,ignoreLocation:f});p&&(b=!0),v+=A,p&&m&&(g=[...g,...m])});let V={isMatch:b,score:b?v/this.chunks.length:1};return b&&i&&(V.indices=g),V}}class oe{constructor(t){this.pattern=t}static isMultiMatch(t){return Pe(t,this.multiRegex)}static isSingleMatch(t){return Pe(t,this.singleRegex)}search(){}}function Pe(n,t){const l=n.match(t);return l?l[1]:null}class yn extends oe{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const l=t===this.pattern;return{isMatch:l,score:l?0:1,indices:[0,this.pattern.length-1]}}}class Cn extends oe{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const s=t.indexOf(this.pattern)===-1;return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}}class bn extends oe{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const l=t.startsWith(this.pattern);return{isMatch:l,score:l?0:1,indices:[0,this.pattern.length-1]}}}class wn extends oe{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const l=!t.startsWith(this.pattern);return{isMatch:l,score:l?0:1,indices:[0,t.length-1]}}}class _n extends oe{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const l=t.endsWith(this.pattern);return{isMatch:l,score:l?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class kn extends oe{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const l=!t.endsWith(this.pattern);return{isMatch:l,score:l?0:1,indices:[0,t.length-1]}}}class nt extends oe{constructor(t,{location:l=B.location,threshold:s=B.threshold,distance:i=B.distance,includeMatches:o=B.includeMatches,findAllMatches:a=B.findAllMatches,minMatchCharLength:r=B.minMatchCharLength,isCaseSensitive:c=B.isCaseSensitive,ignoreDiacritics:d=B.ignoreDiacritics,ignoreLocation:f=B.ignoreLocation}={}){super(t),this._bitapSearch=new tt(t,{location:l,threshold:s,distance:i,includeMatches:o,findAllMatches:a,minMatchCharLength:r,isCaseSensitive:c,ignoreDiacritics:d,ignoreLocation:f})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class lt extends oe{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let l=0,s;const i=[],o=this.pattern.length;for(;(s=t.indexOf(this.pattern,l))>-1;)l=s+o,i.push([s,l-1]);const a=!!i.length;return{isMatch:a,score:a?0:1,indices:i}}}const Ve=[yn,lt,bn,wn,kn,_n,Cn,nt],qe=Ve.length,En=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,xn="|";function Sn(n,t={}){return n.split(xn).map(l=>{let s=l.trim().split(En).filter(o=>o&&!!o.trim()),i=[];for(let o=0,a=s.length;o<a;o+=1){const r=s[o];let c=!1,d=-1;for(;!c&&++d<qe;){const f=Ve[d];let g=f.isMultiMatch(r);g&&(i.push(new f(g,t)),c=!0)}if(!c)for(d=-1;++d<qe;){const f=Ve[d];let g=f.isSingleMatch(r);if(g){i.push(new f(g,t));break}}}return i})}const Vn=new Set([nt.type,lt.type]);class Nn{constructor(t,{isCaseSensitive:l=B.isCaseSensitive,ignoreDiacritics:s=B.ignoreDiacritics,includeMatches:i=B.includeMatches,minMatchCharLength:o=B.minMatchCharLength,ignoreLocation:a=B.ignoreLocation,findAllMatches:r=B.findAllMatches,location:c=B.location,threshold:d=B.threshold,distance:f=B.distance}={}){this.query=null,this.options={isCaseSensitive:l,ignoreDiacritics:s,includeMatches:i,minMatchCharLength:o,findAllMatches:r,ignoreLocation:a,location:c,threshold:d,distance:f},t=l?t:t.toLowerCase(),t=s?me(t):t,this.pattern=t,this.query=Sn(this.pattern,this.options)}static condition(t,l){return l.useExtendedSearch}searchIn(t){const l=this.query;if(!l)return{isMatch:!1,score:1};const{includeMatches:s,isCaseSensitive:i,ignoreDiacritics:o}=this.options;t=i?t:t.toLowerCase(),t=o?me(t):t;let a=0,r=[],c=0;for(let d=0,f=l.length;d<f;d+=1){const g=l[d];r.length=0,a=0;for(let v=0,b=g.length;v<b;v+=1){const V=g[v],{isMatch:_,indices:h,score:y}=V.search(t);if(_){if(a+=1,c+=y,s){const p=V.constructor.type;Vn.has(p)?r=[...r,...h]:r.push(h)}}else{c=0,a=0,r.length=0;break}}if(a){let v={isMatch:!0,score:c/a};return s&&(v.indices=r),v}}return{isMatch:!1,score:1}}}const Ne=[];function An(...n){Ne.push(...n)}function Ae(n,t){for(let l=0,s=Ne.length;l<s;l+=1){let i=Ne[l];if(i.condition(n,t))return new i(n,t)}return new tt(n,t)}const ve={AND:"$and",OR:"$or"},Fe={PATH:"$path",PATTERN:"$val"},Be=n=>!!(n[ve.AND]||n[ve.OR]),Fn=n=>!!n[Fe.PATH],Bn=n=>!le(n)&&Ye(n)&&!Be(n),Ue=n=>({[ve.AND]:Object.keys(n).map(t=>({[t]:n[t]}))});function st(n,t,{auto:l=!0}={}){const s=i=>{let o=Object.keys(i);const a=Fn(i);if(!a&&o.length>1&&!Be(i))return s(Ue(i));if(Bn(i)){const c=a?i[Fe.PATH]:o[0],d=a?i[Fe.PATTERN]:i[c];if(!te(d))throw new Error(tn(c));const f={keyId:Se(c),pattern:d};return l&&(f.searcher=Ae(d,t)),f}let r={children:[],operator:o[0]};return o.forEach(c=>{const d=i[c];le(d)&&d.forEach(f=>{r.children.push(s(f))})}),r};return Be(n)||(n=Ue(n)),s(n)}function In(n,{ignoreFieldNorm:t=B.ignoreFieldNorm}){n.forEach(l=>{let s=1;l.matches.forEach(({key:i,norm:o,score:a})=>{const r=i?i.weight:null;s*=Math.pow(a===0&&r?Number.EPSILON:a,(r||1)*(t?1:o))}),l.score=s})}function zn(n,t){const l=n.matches;t.matches=[],G(l)&&l.forEach(s=>{if(!G(s.indices)||!s.indices.length)return;const{indices:i,value:o}=s;let a={indices:i,value:o};s.key&&(a.key=s.key.src),s.idx>-1&&(a.refIndex=s.idx),t.matches.push(a)})}function $n(n,t){t.score=n.score}function Tn(n,t,{includeMatches:l=B.includeMatches,includeScore:s=B.includeScore}={}){const i=[];return l&&i.push(zn),s&&i.push($n),n.map(o=>{const{idx:a}=o,r={item:t[a],refIndex:a};return i.length&&i.forEach(c=>{c(o,r)}),r})}class ie{constructor(t,l={},s){this.options={...B,...l},this.options.useExtendedSearch,this._keyStore=new on(this.options.keys),this.setCollection(t,s)}setCollection(t,l){if(this._docs=t,l&&!(l instanceof Te))throw new Error(en);this._myIndex=l||et(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){G(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const l=[];for(let s=0,i=this._docs.length;s<i;s+=1){const o=this._docs[s];t(o,s)&&(this.removeAt(s),s-=1,i-=1,l.push(o))}return l}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:l=-1}={}){const{includeMatches:s,includeScore:i,shouldSort:o,sortFn:a,ignoreFieldNorm:r}=this.options;let c=te(t)?te(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return In(c,{ignoreFieldNorm:r}),o&&c.sort(a),Ge(l)&&l>-1&&(c=c.slice(0,l)),Tn(c,this._docs,{includeMatches:s,includeScore:i})}_searchStringList(t){const l=Ae(t,this.options),{records:s}=this._myIndex,i=[];return s.forEach(({v:o,i:a,n:r})=>{if(!G(o))return;const{isMatch:c,score:d,indices:f}=l.searchIn(o);c&&i.push({item:o,idx:a,matches:[{score:d,value:o,norm:r,indices:f}]})}),i}_searchLogical(t){const l=st(t,this.options),s=(r,c,d)=>{if(!r.children){const{keyId:g,searcher:v}=r,b=this._findMatches({key:this._keyStore.get(g),value:this._myIndex.getValueForItemAtKeyId(c,g),searcher:v});return b&&b.length?[{idx:d,item:c,matches:b}]:[]}const f=[];for(let g=0,v=r.children.length;g<v;g+=1){const b=r.children[g],V=s(b,c,d);if(V.length)f.push(...V);else if(r.operator===ve.AND)return[]}return f},i=this._myIndex.records,o={},a=[];return i.forEach(({$:r,i:c})=>{if(G(r)){let d=s(l,r,c);d.length&&(o[c]||(o[c]={idx:c,item:r,matches:[]},a.push(o[c])),d.forEach(({matches:f})=>{o[c].matches.push(...f)}))}}),a}_searchObjectList(t){const l=Ae(t,this.options),{keys:s,records:i}=this._myIndex,o=[];return i.forEach(({$:a,i:r})=>{if(!G(a))return;let c=[];s.forEach((d,f)=>{c.push(...this._findMatches({key:d,value:a[f],searcher:l}))}),c.length&&o.push({idx:r,item:a,matches:c})}),o}_findMatches({key:t,value:l,searcher:s}){if(!G(l))return[];let i=[];if(le(l))l.forEach(({v:o,i:a,n:r})=>{if(!G(o))return;const{isMatch:c,score:d,indices:f}=s.searchIn(o);c&&i.push({score:d,key:t,value:o,idx:a,norm:r,indices:f})});else{const{v:o,n:a}=l,{isMatch:r,score:c,indices:d}=s.searchIn(o);r&&i.push({score:c,key:t,value:o,norm:a,indices:d})}return i}}ie.version="7.1.0";ie.createIndex=et;ie.parseIndex=pn;ie.config=B;ie.parseQuery=st;An(Nn);const re=n=>{const[t,l]=Ct.createInjectionState(s=>{const i=e.reactive(s);function o(f,g){U(g)&&W.isObject(g)?i.queryForm[f]=void 0:i.queryForm[f]=g}function a(f){let{key:g,label:v,value:b}=f;if(U(b)&&!W.isObject(b))return;let V="",_=b==null?void 0:b.toString();if(typeof b=="number"||typeof b=="boolean"||typeof b=="string")V=`${v}:${_}`,_.length>50&&(V=`${v}:${_.slice(0,50)}...`);else if(W.isArray(b)&&(V=`${v}:${_}`,_.length>50)){let p=0,A=0;for(let F=0;F<b.length;F++)if(A+=b[F].length+1,A>50){p=F+1;break}let m=b.slice(0,p);V=`${v}:${m.join(",").slice(0,50)}...`,b.length>p&&(V+=`等其余${b.length-p}项`)}const h={key:g,label:v,showStr:V,value:_},y=i.tags.findIndex(p=>p.key===g);y===-1?i.tags.push(h):i.tags.splice(y,1,h)}function r(f,g){f.key&&i.tags.findIndex(v=>v.key===f.key)!==-1&&(i.queryForm[f.key]=void 0,g?i.tags.splice(g,1):i.tags=i.tags.filter(v=>v.key!==f.key))}function c(){i.tags.forEach(f=>{i.queryForm[f.key]=void 0}),i.tags=[]}function d(f={}){Object.keys(i.queryForm).forEach(g=>{g!=="resetCount"&&(i.queryForm[g]=f[g]??void 0)}),i.tags=[]}return{state:i,setQuery:o,addTag:a,reduceTag:r,reduceAllTag:c,clearQuery:d}},{injectionKey:n});return{useProvideQueryStore:t,useQueryStore:l}},Mn={class:"el-select-pop-search-container"},Dn={class:"el-select-dropdown__wrap virtual-scroll-wrap"},Ln={class:"check-all ak-relative el-select-dropdown__item"},On=["title"],Rn=["onClick"],jn={class:"el-select-dropdown__empty"},Pn={class:"custom-multi-footer"},qn={class:"counts"},Un=e.defineComponent({name:"JcSelectQuery",__name:"index",props:{field:{},options:{default:()=>[]},allowCreate:{type:Boolean,default:!1},keyField:{default:()=>["label","value"]},width:{default:"160px"},size:{default:"default"},footerBtnName:{default:"搜索"},maxScrollHeight:{default:"240px"},isNeedFooter:{type:Boolean,default:!0},isNeedOnlySelect:{type:Boolean,default:!0},injectionKey:{default:"jc-query-injection-key"}},setup(n,{expose:t}){const l=n,s=e.ref(),i=e.ref([]),o=e.ref(""),a=e.ref(),r=e.ref([]),c=e.ref([]),d=e.ref([]),f=e.ref(!1),g=e.ref(!1),v=e.ref(!1),{useQueryStore:b}=re(l.injectionKey),{state:V,setQuery:_}=b();let h=-1,y=!1;const p=e.ref(),A=u=>{u.shiftKey&&(y=!0)},m=()=>{y=!1},F=u=>{u&&(d.value=i.value,o.value="",c.value=r.value,O(d.value),e.nextTick(()=>{var k;(k=a.value)==null||k.focus()}))},E=u=>{d.value=d.value.filter(k=>k.value!==u.value)},w=u=>{v.value=!0,_(l.field,u),e.nextTick(()=>{v.value=!1})},$=()=>{const u=o.value.trim();u!==""&&p.value?c.value=p.value.search(u).map(k=>k.item):c.value=r.value},M=()=>{U(o.value)||c.value.map(u=>u.value).includes(o.value)||(r.value.unshift({label:o.value,value:o.value}),d.value.push({label:o.value,value:o.value}),i.value=d.value,_(l.field,i.value),e.nextTick(()=>{p.value=new ie(r.value,{keys:l.keyField}),$()}))},I=u=>{d.value=u?c.value:[],g.value=!1,l.isNeedFooter||(i.value=d.value,_(l.field,i.value))},O=u=>{if(u.length===0){f.value=!1,g.value=!1;return}const k=u.length;f.value=k===c.value.length,g.value=k>0&&k<c.value.length;const{options:z}=l;let Q=0;if(u.length>0){const J=u[u.length-1];Q=z.findIndex(X=>X.value===J.value)}if(y){const J=Math.abs(h-Q)+1,X=Math.min(h,Q);let se=0;for(;se<J;){const Ce=X+se;W.findIndex(u,z[Ce])===-1&&d.value.push(z[Ce]),se++}}l.isNeedFooter||(i.value=d.value,_(l.field,i.value))},D=u=>{!y&&!d.value.includes(u)&&(h=r.value.findIndex(k=>k.value===u.value))},q=u=>{d.value=[u],T()},N=()=>{var u;(u=s.value)==null||u.blur()},T=()=>{v.value=!0,i.value=d.value,_(l.field,i.value),N(),e.nextTick(()=>{v.value=!1})};return e.watch(()=>l.options,()=>{var u;!W.isArray(l.options)||((u=l.options)==null?void 0:u.length)===0||(c.value=l.options,r.value=W.cloneDeep(l.options),p.value=new ie(r.value,{keys:l.keyField,threshold:.1}))},{immediate:!0,deep:!0}),e.watch(()=>V.queryForm[l.field],u=>{v.value||(U(u)?(i.value=[],d.value=[]):i.value=W.isArray(u)?u:[])},{deep:!0}),e.onMounted(()=>{window.addEventListener("keydown",A),window.addEventListener("keyup",m),e.nextTick(()=>{p.value=new ie(r.value,{keys:l.keyField})})}),e.onUnmounted(()=>{window.removeEventListener("keydown",A),window.removeEventListener("keyup",m)}),t({focus:()=>{var u;return(u=s.value)==null?void 0:u.focus()},blur:()=>{var u;return(u=s.value)==null?void 0:u.blur()},get selectedLabel(){var u;return(u=s.value)==null?void 0:u.selectedLabel}}),(u,k)=>(e.openBlock(),e.createBlock(e.unref(x.ElSelect),e.mergeProps({ref_key:"selectRef",ref:s,modelValue:i.value,"onUpdate:modelValue":k[4]||(k[4]=z=>i.value=z)},u.$attrs,{multiple:"",clearable:"","show-arrow":!1,"collapse-tags":!0,"collapse-tags-tooltip":!0,"max-collapse-tags":1,size:u.size,style:{width:u.width},class:"jc-select","popper-class":"jc-select-popper",placeholder:"请选择",onVisibleChange:F,onRemoveTag:E,onChange:w}),e.createSlots({default:e.withCtx(()=>[e.createVNode(e.unref(x.ElOption),{value:"1",hidden:""}),e.createElementVNode("div",Mn,[e.createVNode(e.unref(Y.Search),{class:"selcet-icon search-icon"}),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInputRef",ref:a,"onUpdate:modelValue":k[0]||(k[0]=z=>o.value=z),class:"el-select-pop__input",onInput:$},null,544),[[e.vModelText,o.value]]),u.allowCreate?(e.openBlock(),e.createBlock(e.unref(Y.CirclePlus),{key:0,class:"selcet-icon circle-icon",onClick:M})):e.createCommentVNode("",!0)]),e.withDirectives(e.createElementVNode("div",Dn,[e.createElementVNode("li",Ln,[e.createVNode(e.unref(x.ElCheckbox),{modelValue:f.value,"onUpdate:modelValue":k[1]||(k[1]=z=>f.value=z),indeterminate:g.value,size:u.size,onChange:I},{default:e.withCtx(()=>k[5]||(k[5]=[e.createTextVNode("全选")])),_:1,__:[5]},8,["modelValue","indeterminate","size"])]),e.createVNode(e.unref(x.ElCheckboxGroup),{modelValue:d.value,"onUpdate:modelValue":k[2]||(k[2]=z=>d.value=z),onChange:k[3]||(k[3]=z=>O(z)),size:u.size},{default:e.withCtx(()=>[e.createVNode(e.unref($e),{class:"recycle-scroller",items:c.value,"item-size":30,"key-field":"value",style:e.normalizeStyle({maxHeight:u.maxScrollHeight})},{default:e.withCtx(({item:z})=>[e.createElementVNode("li",{class:"el-select-dropdown__item",title:z.label},[e.createVNode(e.unref(x.ElCheckbox),{size:u.size,value:z,label:z,disabled:z.disabled,onClick:Q=>D(z)},{default:e.withCtx(()=>[e.renderSlot(u.$slots,"default",{scope:z},()=>[e.createElementVNode("span",null,e.toDisplayString(z.label),1)])]),_:2},1032,["size","value","label","disabled","onClick"]),u.isNeedOnlySelect?(e.openBlock(),e.createElementBlock("div",{key:0,class:"select-tag",onClick:e.withModifiers(Q=>q(z),["stop"])},k[6]||(k[6]=[e.createElementVNode("span",null,"仅筛选此项",-1)]),8,Rn)):e.createCommentVNode("",!0)],8,On)]),_:3},8,["items","style"])]),_:3},8,["modelValue","size"])],512),[[e.vShow,c.value.length>0]]),e.withDirectives(e.createElementVNode("p",jn,"无数据",512),[[e.vShow,c.value.length===0]])]),_:2},[u.isNeedFooter?{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",Pn,[e.createElementVNode("span",null,[e.createElementVNode("span",qn,"已选 "+e.toDisplayString(d.value.length)+" 项",1),k[7]||(k[7]=e.createElementVNode("span",{class:"shift-tips"},"(按住Shift可以快速多选)",-1))]),e.createElementVNode("span",null,[e.createVNode(e.unref(x.ElButton),{size:u.size,onClick:N,plain:""},{default:e.withCtx(()=>k[8]||(k[8]=[e.createTextVNode("关闭")])),_:1,__:[8]},8,["size"]),e.createVNode(e.unref(x.ElButton),{type:"primary",size:u.size,onClick:T,plain:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.footerBtnName),1)]),_:1},8,["size"])])])]),key:"0"}:void 0]),1040,["modelValue","size","style"]))}}),ee=n=>(n.install=t=>{const l=n.name;t.component(l,n)},n),it=ee(Un),Kn={class:"jc-cascader-item"},Qn={title:"{{ data.label }}"},Jn=["onClick"],Hn={class:"custom-multi-footer"},Wn=e.defineComponent({name:"JcCascader",__name:"index",props:{field:{},options:{default:()=>[]},keyField:{default:()=>["label","value"]},width:{default:"200px"},size:{default:"default"},footerBtnName:{default:"搜索"},isNeedFooter:{type:Boolean,default:!0},isNeedHeader:{type:Boolean,default:!0},isNeedOnlySelect:{type:Boolean,default:!0},injectionKey:{default:"jc-query-injection-key"}},setup(n,{expose:t}){const l=n,s=e.ref(),i=e.ref([]),o=(m,F)=>{const E=String(m.label).trim().toLowerCase(),w=F.trim().toLowerCase();return E.indexOf(w)!==-1},a={multiple:!0,expandTrigger:"hover"},r=e.ref(!1),{useQueryStore:c}=re(l.injectionKey),{state:d,setQuery:f}=c(),g=e.ref(!1),v=e.ref(!1),b=e.computed(()=>{var E;const m=[],F=l.options.map(w=>({node:w,path:[w.value]}));for(;F.length>0;){const{node:w,path:$}=F.shift();(E=w.children)!=null&&E.length?w.children.forEach(M=>{F.push({node:M,path:[...$,M.value]})}):m.push($)}return m});e.watch(i,m=>{m.length===0?(g.value=!1,v.value=!1):m.length===b.value.length?(g.value=!0,v.value=!1):v.value=!0});const V=m=>{v.value=!1,i.value=m?b.value:[]},_=()=>{var m;i.value=[],g.value=!1,v.value=!1,(m=s.value)==null||m.togglePopperVisible(!1)},h=()=>{var m;r.value=!0,f(l.field,i.value),(m=s.value)==null||m.togglePopperVisible(!1),e.nextTick(()=>{r.value=!1})},y=()=>{e.nextTick(()=>{h()})},p=()=>{i.value=[],h()},A=m=>{const F=b.value.filter(E=>E.includes(m.value));i.value=F,h()};return e.watch(()=>d.queryForm[l.field],m=>{r.value||(U(m)?i.value=[]:i.value=W.isArray(m)?m:[])},{deep:!0}),e.onMounted(()=>{}),e.onUnmounted(()=>{}),t({getCheckedNodes:(m=!1)=>{var F;return(F=s.value)==null?void 0:F.getCheckedNodes(m)},togglePopperVisible:m=>{var F;return(F=s.value)==null?void 0:F.togglePopperVisible(m)},get cascaderPanelRef(){var m;return(m=s.value)==null?void 0:m.cascaderPanelRef},get contentRef(){var m;return(m=s.value)==null?void 0:m.contentRef},get presentText(){var m;return(m=s.value)==null?void 0:m.presentText}}),(m,F)=>{const E=e.resolveComponent("el-checkbox"),w=e.resolveComponent("el-button"),$=e.resolveComponent("el-cascader");return e.openBlock(),e.createBlock($,e.mergeProps({ref_key:"cascaderRef",ref:s,class:"jc-cascader","popper-class":"jc-cascader-popper",modelValue:i.value,"onUpdate:modelValue":F[1]||(F[1]=M=>i.value=M)},m.$attrs,{props:a,options:m.options,filterable:"",clearable:!0,"filter-method":o,"show-arrow":!1,"collapse-tags":!0,"collapse-tags-tooltip":!0,size:m.size,style:{width:m.width},placeholder:"请选择",onRemoveTag:y,onClear:p}),e.createSlots({default:e.withCtx(({data:M})=>[e.createElementVNode("div",Kn,[e.createElementVNode("span",Qn,e.toDisplayString(M.label),1),m.isNeedOnlySelect?(e.openBlock(),e.createElementBlock("span",{key:0,class:"select-tag",onClick:e.withModifiers(I=>A(M),["stop"])},F[3]||(F[3]=[e.createElementVNode("span",null,"仅筛选此项",-1)]),8,Jn)):e.createCommentVNode("",!0)])]),footer:e.withCtx(()=>[e.createElementVNode("div",Hn,[e.createElementVNode("span",null,[e.createVNode(w,{size:m.size,onClick:_,plain:""},{default:e.withCtx(()=>F[4]||(F[4]=[e.createTextVNode("关闭")])),_:1,__:[4]},8,["size"]),e.createVNode(w,{type:"primary",size:m.size,onClick:h,plain:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.footerBtnName),1)]),_:1},8,["size"])])])]),_:2},[m.isNeedHeader?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(E,{style:{"margin-left":"10px"},size:m.size,modelValue:g.value,"onUpdate:modelValue":F[0]||(F[0]=M=>g.value=M),indeterminate:v.value,onChange:V},{default:e.withCtx(()=>F[2]||(F[2]=[e.createTextVNode(" 全部 ")])),_:1,__:[2]},8,["size","modelValue","indeterminate"])])]),key:"0"}:void 0]),1040,["modelValue","options","size","style"])}}}),ot=ee(Wn),Gn={style:{"max-width":"100px"}},Yn=e.defineComponent({name:"JcDatePicker",__name:"index",props:{fieldList:{default:()=>[]},type:{default:"daterange"},size:{default:"default"},width:{default:"320px"},injectionKey:{default:"jc-query-injection-key"}},emits:["fieldChange"],setup(n,{expose:t,emit:l}){const s=n,i=l,o=e.ref([]),a=e.ref([]),r=e.ref(""),c=e.ref(""),d=e.ref(!1),{useQueryStore:f}=re(s.injectionKey),{state:g,setQuery:v}=f(),b=()=>{s.fieldList.forEach(y=>{v(y.value,void 0)})},V=y=>{U(o.value)||(d.value=!0,b(),v(y,o.value),e.nextTick(()=>{d.value=!1})),i("fieldChange",y)},_=()=>{d.value=!0,c.value=r.value,a.value=o.value,v(r.value,o.value),e.nextTick(()=>{d.value=!1})};e.watch(()=>s.fieldList,y=>{(!U(y)&&U(r.value)||r.value&&!s.fieldList.map(p=>p.value).includes(r.value))&&(r.value=y[0].value,o.value=[])},{immediate:!0,deep:!0}),e.watch(s.fieldList.map(y=>()=>g.queryForm[y.value]),y=>{if(!d.value){const p=y.findIndex(A=>!U(A));p===-1?(r.value=s.fieldList[0].value,o.value=[]):(r.value=s.fieldList[p].value,o.value=y[p]||[])}},{deep:!0});const h=e.ref();return t({focus:()=>{var y;return(y=h.value)==null?void 0:y.focus()},blur:()=>{var y;return(y=h.value)==null?void 0:y.blur()},handleOpen:()=>{var y;return(y=h.value)==null?void 0:y.handleOpen()},handleClose:()=>{var y;return(y=h.value)==null?void 0:y.handleClose()}}),(y,p)=>{const A=e.resolveComponent("el-option"),m=e.resolveComponent("el-select"),F=e.resolveComponent("el-date-picker");return e.openBlock(),e.createElementBlock("div",{class:"jc-date-picker",style:e.normalizeStyle({width:y.width})},[e.createElementVNode("div",Gn,[e.createVNode(m,{modelValue:r.value,"onUpdate:modelValue":p[0]||(p[0]=E=>r.value=E),size:y.size,class:"select-field",onChange:V},{prefix:e.withCtx(()=>[e.createTextVNode(e.toDisplayString((y.fieldList.find(E=>E.value===r.value)||{}).label),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.fieldList,E=>(e.openBlock(),e.createBlock(A,{key:E.value,label:E.label,value:E.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","size"])]),e.createVNode(F,e.mergeProps({ref_key:"datePickerRef",ref:h,modelValue:o.value,"onUpdate:modelValue":p[1]||(p[1]=E=>o.value=E),type:y.type},y.$attrs,{"range-separator":"至","start-placeholder":"开始时间","end-placeholder":"结束时间",size:y.size,"value-format":y.type==="daterange"?"YYYY-MM-DD":"YYYY-MM",onChange:_}),null,16,["modelValue","type","size","value-format"])],4)}}}),rt=ee(Yn),Xn={class:"suffixContent"},Zn=e.defineComponent({name:"JcInputSwitch",__name:"index",props:{fieldList:{default:()=>[]},size:{default:"default"},width:{default:"320px"},injectionKey:{default:"jc-query-injection-key"}},emits:["fieldChange"],setup(n,{expose:t,emit:l}){const s=n,i=l,o=e.ref(""),a=e.ref(""),r=e.ref(""),c=e.ref(""),{useQueryStore:d}=re(s.injectionKey),{state:f,setQuery:g}=d(),v=e.ref(!1),b=()=>{s.fieldList.forEach(p=>{g(p.value,void 0)})},V=()=>{v.value=!0,o.value="",b(),e.nextTick(()=>{v.value=!1})},_=p=>{o.value&&(v.value=!0,b(),g(p,o.value),e.nextTick(()=>{v.value=!1})),i("fieldChange",p)},h=()=>{v.value=!0,a.value=o.value,c.value=r.value,g(r.value,o.value.trim()),e.nextTick(()=>{v.value=!1})};e.watch(()=>s.fieldList,p=>{(!U(p)&&U(r.value)||r.value&&!s.fieldList.map(A=>A.value).includes(r.value))&&(r.value=p[0].value,o.value="")},{immediate:!0,deep:!0}),e.watch(()=>f.queryForm.resetCount,()=>{V()}),e.watch(s.fieldList.map(p=>()=>f.queryForm[p.value]),p=>{if(!v.value){const A=p.findIndex(m=>!U(m));A===-1?(r.value=s.fieldList[0].value,o.value=""):(r.value=s.fieldList[A].value,o.value=p[A]||"")}},{deep:!0});const y=e.ref();return t({blur:()=>{var p;return(p=y.value)==null?void 0:p.blur()},clear:()=>{var p;return(p=y.value)==null?void 0:p.clear()},focus:()=>{var p;return(p=y.value)==null?void 0:p.focus()},select:()=>{var p;return(p=y.value)==null?void 0:p.select()},resizeTextarea:()=>{var p;return(p=y.value)==null?void 0:p.resizeTextarea()},get input(){var p;return(p=y.value)==null?void 0:p.input},get ref(){var p;return(p=y.value)==null?void 0:p.ref},get textarea(){var p;return(p=y.value)==null?void 0:p.textarea},get textareaStyle(){var p;return(p=y.value)==null?void 0:p.textareaStyle},get isComposing(){var p;return(p=y.value)==null?void 0:p.isComposing}}),(p,A)=>(e.openBlock(),e.createBlock(e.unref(x.ElInput),e.mergeProps({ref_key:"inputRef",ref:y,modelValue:o.value,"onUpdate:modelValue":A[1]||(A[1]=m=>o.value=m),modelModifiers:{trim:!0}},p.$attrs,{placeholder:"请输入内容",style:{width:p.width},size:p.size,class:"jc-input jc-input-switch"}),{prepend:e.withCtx(()=>[e.createVNode(e.unref(x.ElSelect),{modelValue:r.value,"onUpdate:modelValue":A[0]||(A[0]=m=>r.value=m),size:p.size,class:"select-field",onChange:_},{prefix:e.withCtx(()=>[e.createTextVNode(e.toDisplayString((p.fieldList.find(m=>m.value===r.value)||{}).label),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.fieldList,m=>(e.openBlock(),e.createBlock(e.unref(x.ElOption),{key:m.value,label:m.label,value:m.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","size"])]),suffix:e.withCtx(()=>[e.createElementVNode("div",Xn,[e.withDirectives(e.createVNode(e.unref(x.ElIcon),{class:"el-input__icon",onClick:V},{default:e.withCtx(()=>[e.createVNode(e.unref(Y.Close))]),_:1},512),[[e.vShow,o.value]]),e.createVNode(e.unref(x.ElIcon),{class:"el-input__icon",onClick:h},{default:e.withCtx(()=>[e.createVNode(e.unref(Y.Search))]),_:1})])]),_:1},16,["modelValue","style","size"]))}}),at=ee(Zn),el={class:"suffixContent"},tl={class:"popover-body"},nl={class:"popover-btn"},ll={class:"popover-btn-right"},sl=e.defineComponent({name:"JcInputComplex",__name:"index",props:{fieldList:{default:()=>[]},size:{default:"default"},width:{default:"320px"},injectionKey:{default:"jc-query-injection-key"}},emits:["fieldChange"],setup(n,{expose:t,emit:l}){const s=n,i=l,o=e.ref(""),a=e.ref(""),r=e.ref(""),c=e.ref(""),d=e.ref(!1),f=e.computed(()=>r.value+"List"),g=e.computed(()=>{var u;return((u=s.fieldList.find(k=>k.value===r.value))==null?void 0:u.label)||""}),v=e.ref(""),b=e.ref(!1),{useQueryStore:V}=re(s.injectionKey),{state:_,setQuery:h,addTag:y,reduceTag:p}=V(),A={},m={};s.fieldList.forEach(u=>{A[u.value]=void 0,m[u.value+"List"]=[]});const F=u=>{d.value=!1,E(),i("fieldChange",u)},E=()=>{_.queryForm[f.value]?v.value=_.queryForm[f.value].join(`
|
|
3
|
-
`):v.value=""},
|
|
4
|
-
`).filter(
|
|
5
|
-
`)}`;
|
|
6
|
-
`)
|
|
7
|
-
`),I()})},N=()=>{!
|
|
8
|
-
`))||"",W.isArray(_.queryForm[J])&&!U(_.queryForm[J])){y({key:J,label:Q.label,value:_.queryForm[J]});return}else p({key:J});_.queryForm[Q.value]?(z=!0,r.value=Q.value,o.value=_.queryForm[Q.value]||""):z||(o.value="")})}},{deep:!0});const T=e.ref();return t({blur:()=>{var u;return(u=T.value)==null?void 0:u.blur()},clear:()=>{var u;return(u=T.value)==null?void 0:u.clear()},focus:()=>{var u;return(u=T.value)==null?void 0:u.focus()},select:()=>{var u;return(u=T.value)==null?void 0:u.select()},resizeTextarea:()=>{var u;return(u=T.value)==null?void 0:u.resizeTextarea()},setInputValueMult:q,setInputByOutside:N,get input(){var u;return(u=T.value)==null?void 0:u.input},get ref(){var u;return(u=T.value)==null?void 0:u.ref},get textarea(){var u;return(u=T.value)==null?void 0:u.textarea},get textareaStyle(){var u;return(u=T.value)==null?void 0:u.textareaStyle},get isComposing(){var u;return(u=T.value)==null?void 0:u.isComposing}}),(u,k)=>(e.openBlock(),e.createBlock(e.unref(x.ElInput),e.mergeProps({ref_key:"inputRef",ref:T,modelValue:o.value,"onUpdate:modelValue":k[5]||(k[5]=z=>o.value=z),modelModifiers:{trim:!0}},u.$attrs,{placeholder:"请输入内容",style:{width:u.width},class:"jc-input jc-input-complex search-input",size:u.size}),{prepend:e.withCtx(()=>[e.createVNode(e.unref(x.ElSelect),{ref:"selectRef",modelValue:r.value,"onUpdate:modelValue":k[0]||(k[0]=z=>r.value=z),size:u.size,class:"select-field",onChange:F},{prefix:e.withCtx(()=>[e.createTextVNode(e.toDisplayString((u.fieldList.find(z=>z.value===r.value)||{}).label),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.fieldList,z=>(e.openBlock(),e.createBlock(e.unref(x.ElOption),{key:z.value,label:z.label,value:z.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","size"])]),suffix:e.withCtx(()=>[e.createElementVNode("div",el,[e.withDirectives(e.createVNode(e.unref(x.ElIcon),{class:"el-input__icon",onClick:w},{default:e.withCtx(()=>[e.createVNode(e.unref(Y.Close))]),_:1},512),[[e.vShow,o.value]]),e.createVNode(e.unref(x.ElIcon),{class:"el-input__icon",onClick:M},{default:e.withCtx(()=>[e.createVNode(e.unref(Y.Search))]),_:1}),e.createVNode(e.unref(x.ElPopover),{visible:d.value,"onUpdate:visible":k[4]||(k[4]=z=>d.value=z),placement:"bottom-end",width:"240","show-arrow":!1,"popper-class":"jc-input-pop",trigger:"click"},{reference:e.withCtx(()=>[e.createVNode(e.unref(x.ElIcon),{class:"el-input__icon mult-trigger-icon",title:"多项搜索",onClick:E},{default:e.withCtx(()=>[e.createVNode(e.unref(Y.Grid))]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",tl,[e.createVNode(e.unref(x.ElInput),e.mergeProps({modelValue:v.value,"onUpdate:modelValue":k[1]||(k[1]=z=>v.value=z),type:"textarea"},u.$attrs,{size:u.size,placeholder:"一行一项",class:"popover-textarea",wrap:"off"}),null,16,["modelValue","size"]),e.createElementVNode("div",nl,[e.createVNode(e.unref(x.ElButton),{size:u.size,onClick:k[2]||(k[2]=z=>v.value=""),plain:""},{default:e.withCtx(()=>k[6]||(k[6]=[e.createTextVNode("清空")])),_:1,__:[6]},8,["size"]),e.createElementVNode("div",ll,[e.createVNode(e.unref(x.ElButton),{size:u.size,plain:"",onClick:O},{default:e.withCtx(()=>k[7]||(k[7]=[e.createTextVNode("关闭")])),_:1,__:[7]},8,["size"]),e.createVNode(e.unref(x.ElButton),{type:"primary",plain:"",size:u.size,onClick:k[3]||(k[3]=z=>I())},{default:e.withCtx(()=>k[8]||(k[8]=[e.createTextVNode("搜索")])),_:1,__:[8]},8,["size"])])])])]),_:1},8,["visible"])])]),_:1},16,["modelValue","style","size"]))}}),ut=ee(sl),il={style:{display:"flex","flex-wrap":"wrap",flex:"1","flex-basis":"calc(100% - 50px)","font-size":"12px","margin-top":"4px"}},ol=e.defineComponent({name:"JcTagQuery",__name:"index",props:{injectionKey:{default:"jc-query-injection-key"}},setup(n){const t=n,{useQueryStore:l}=re(t.injectionKey),{state:s,reduceTag:i,reduceAllTag:o}=l();return(a,r)=>(e.openBlock(),e.createElementBlock("div",il,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s).tags,(c,d)=>(e.openBlock(),e.createBlock(e.unref(x.ElTag),e.mergeProps({ref_for:!0},a.$attrs,{key:c.label,closable:"",style:[{height:"auto","max-height":"28px","white-space":"normal","text-align":"left","max-width":"1800px",overflow:"hidden","word-break":"break-word","text-overflow":"ellipsis"},{marginLeft:d>0?"4px":"0px"}],onClose:f=>e.unref(i)(c,d)}),{default:e.withCtx(()=>[e.createVNode(e.unref(x.ElTooltip),{content:c.value,placement:"bottom",effect:"light"},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(c.showStr),1)]),_:2},1032,["content"])]),_:2},1040,["style","onClose"]))),128)),e.unref(s).tags.length>1?(e.openBlock(),e.createElementBlock("span",{key:0,style:{"margin-left":"10px","margin-top":"2px",display:"block"},onClick:r[0]||(r[0]=(...c)=>e.unref(o)&&e.unref(o)(...c))},[e.createVNode(e.unref(x.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Y.Delete))]),_:1})])):e.createCommentVNode("",!0)]))}}),Me=(n,t)=>{const l=n.__vccOpts||n;for(const[s,i]of t)l[s]=i;return l},rl=Me(ol,[["__scopeId","data-v-48ad67de"]]),ct=ee(rl),al={class:"popover-btn"},ul={class:"popover-btn-right"},cl=e.defineComponent({name:"JcMoreQueryContain",__name:"index",props:{fieldList:{default:()=>[]},customTagObj:{default:()=>({})},width:{default:400},size:{default:"default"},injectionKey:{default:"jc-query-injection-key"}},setup(n,{expose:t}){const l=e.ref(!1),s=e.ref({}),i=n,{useQueryStore:o}=re(i.injectionKey),{state:a,setQuery:r,addTag:c,reduceTag:d}=o(),f=e.ref(!1),g=()=>{l.value=!l.value,l.value&&i.fieldList.forEach(h=>{s.value[h.value]=a.queryForm[h.value]||void 0})},v=()=>{f.value=!0,s.value={},i.fieldList.forEach(h=>{r(h.value,void 0),d({key:h.value})}),l.value=!1,e.nextTick(()=>{f.value=!1})},b=(h,y)=>{var p;typeof s.value[h]>"u"||(typeof s.value[h]=="string"||typeof s.value[h]=="number"?c({key:h,label:y,value:U(i.customTagObj[h])?s.value[h]:i.customTagObj[h]}):c({key:h,label:y,value:U(i.customTagObj[h])?(p=s.value[h])==null?void 0:p.join(","):i.customTagObj[h]}))},V=()=>{f.value=!0;for(const h in s.value){r(h,U(s.value[h])?void 0:s.value[h]);const y=i.fieldList.find(p=>p.value===h);y===void 0&&x.ElMessage.warning("传入的fieldList和表单绑定的字段不匹配"),b(h,y.label)}l.value=!1,e.nextTick(()=>{f.value=!1})};e.watch(()=>a.queryForm.resetCount,()=>{v()}),e.watch(i.fieldList.map(h=>()=>a.queryForm[h.value]),()=>{f.value||i.fieldList.forEach(h=>{s.value[h.value]=a.queryForm[h.value],U(a.queryForm[h.value])?d({key:h.value}):b(h.value,h.label)})},{deep:!0});const _=e.ref();return t({hide:()=>{var h;return(h=_.value)==null?void 0:h.hide()}}),(h,y)=>(e.openBlock(),e.createBlock(e.unref(x.ElPopover),e.mergeProps({ref_key:"popoverRef",ref:_},h.$attrs,{visible:l.value,placement:"bottom",width:h.width,"show-arrow":!1,"popper-class":"moreQuery-pop",trigger:"click"}),{reference:e.withCtx(()=>[e.createVNode(e.unref(x.ElButton),{size:h.size,icon:e.unref(Y.Operation),onClick:g},null,8,["size","icon"])]),default:e.withCtx(()=>[e.renderSlot(h.$slots,"default",{scopeForm:s.value}),e.createElementVNode("div",al,[e.createVNode(e.unref(x.ElButton),{size:h.size,onClick:v,plain:""},{default:e.withCtx(()=>y[1]||(y[1]=[e.createTextVNode("清空")])),_:1,__:[1]},8,["size"]),e.createElementVNode("div",ul,[e.createVNode(e.unref(x.ElButton),{size:h.size,onClick:y[0]||(y[0]=p=>l.value=!1),plain:""},{default:e.withCtx(()=>y[2]||(y[2]=[e.createTextVNode("关闭")])),_:1,__:[2]},8,["size"]),e.createVNode(e.unref(x.ElButton),{type:"primary",plain:"",size:h.size,onClick:V},{default:e.withCtx(()=>y[3]||(y[3]=[e.createTextVNode("搜索")])),_:1,__:[3]},8,["size"])])])]),_:3},16,["visible","width"]))}}),dt=ee(cl),dl={class:"jc-list-layout"},fl={key:1,class:"bottom-header"},hl=e.defineComponent({name:"JcListLayout",__name:"index",setup(n){return(t,l)=>(e.openBlock(),e.createElementBlock("div",dl,[t.$slots["top-body"]?(e.openBlock(),e.createBlock(e.unref(x.ElCard),{key:0,class:"top-card",shadow:"never"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"top-body")]),_:3})):e.createCommentVNode("",!0),t.$slots["bottom-header"]?(e.openBlock(),e.createElementBlock("div",fl,[e.renderSlot(t.$slots,"bottom-header")])):e.createCommentVNode("",!0),t.$slots["bottom-body"]?(e.openBlock(),e.createBlock(e.unref(x.ElCard),{key:2,class:"bottom-card",shadow:"never"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"bottom-body")]),_:3})):e.createCommentVNode("",!0)]))}}),ft=ee(hl),pl={class:"jc-import-dialog"},ml={id:"import-wrapper"},vl={class:"basic-btn"},gl={class:"import-info"},yl=e.defineComponent({name:"JcImportDialog",__name:"index",props:{btnName:{default:"导入"},title:{default:"导入"},importInfoArr:{default:()=>["表头字段不可重复","表格中存在多条相同记录时,以第一条为准","导入格式为xlsx(手动修改文件后缀无效),行数不超过5000条,文件大小不超过5M"]},uploadFileFn:{},downloadFileFn:{}},emits:["onSuccess","onError"],setup(n,{emit:t}){const l=n,s=t,i=e.ref(!1),o=e.ref(),a=e.ref(!1),r=()=>{i.value=!0,e.nextTick(()=>{o.value.clearFiles()})},c=f=>{if(!l.uploadFileFn){x.ElMessage.warning("导入函数未定义");return}const g=x.ElLoading.service({lock:!0,text:"导入中,请耐心等待ing.....",spinner:"el-icon-loading",background:"var(--el-mask-color, rgba(0, 0, 0, 0.7))"});o.value.clearFiles();const v=new FormData;v.append("file",f.file),l.uploadFileFn(v).then(b=>{g.close(),b.code===200?(x.ElMessage.success("导入成功"),i.value=!1,s("onSuccess")):(x.ElMessage.warning(b.message||"导入失败"),s("onError"))})},d=()=>{if(!l.downloadFileFn){x.ElMessage.warning("下载函数未定义");return}a.value=!0,l.downloadFileFn().then(f=>{a.value=!1,f.code===200?x.ElMessage.success("下载导入模版成功"):x.ElMessage.warning(f.message||"下载导入模版失败")})};return(f,g)=>{const v=e.resolveComponent("el-button"),b=e.resolveComponent("el-upload"),V=e.resolveComponent("el-icon"),_=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",pl,[e.createVNode(v,e.mergeProps(f.$attrs,{onClick:r}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.btnName),1)]),_:1},16),e.createVNode(_,e.mergeProps({modelValue:i.value,"onUpdate:modelValue":g[0]||(g[0]=h=>i.value=h),title:f.title,class:"is-no-footer",width:"800px"},f.$attrs,{top:"10vh",style:{height:"calc(100vh - 200px)"}}),{default:e.withCtx(()=>[e.createElementVNode("div",ml,[e.createElementVNode("div",vl,[e.createElementVNode("div",null,[e.createVNode(b,{ref_key:"importUploadRef",ref:o,"http-request":c,action:"#","show-file-list":!1,accept:".xlsx,.xls,.txt",limit:1,style:{margin:"0 10px 0px 0px"}},{default:e.withCtx(()=>[e.createVNode(v,{type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.title),1)]),_:1})]),_:1},512)]),e.createVNode(v,{type:"primary",text:"",loading:a.value,onClick:d},{default:e.withCtx(()=>g[1]||(g[1]=[e.createTextVNode("下载导入模板")])),_:1,__:[1]},8,["loading"])]),e.createElementVNode("div",gl,[e.createElementVNode("div",null,[e.createVNode(V,{color:"var(--el-color-primary)",size:18,class:"icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Y.InfoFilled))]),_:1})]),e.createElementVNode("ol",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.importInfoArr,(h,y)=>(e.openBlock(),e.createElementBlock("li",{key:y},[e.createElementVNode("span",null,e.toDisplayString(h),1)]))),128))])])])]),_:1},16,["modelValue","title"])])}}}),Cl=Me(yl,[["__scopeId","data-v-176c145c"]]),ht=ee(Cl),bl={class:"jc-import-button"},wl=e.defineComponent({name:"JcImportButton",__name:"index",props:{btnName:{default:"导入"},uploadFileFn:{}},emits:["onSuccess","onError"],setup(n,{emit:t}){const l=n,s=t,i=e.ref(),o=a=>{if(!l.uploadFileFn){x.ElMessage.warning("导入函数未定义");return}const r=x.ElLoading.service({lock:!0,text:"导入中,请耐心等待ing.....",spinner:"el-icon-loading",background:"var(--el-mask-color, rgba(0, 0, 0, 0.7))"});i.value.clearFiles();const c=new FormData;c.append("file",a.file),l.uploadFileFn(c).then(d=>{r.close(),d.code===200?(x.ElMessage.success("导入成功"),s("onSuccess")):(x.ElMessage.warning(d.message||"导入失败"),s("onError"))})};return(a,r)=>{const c=e.resolveComponent("el-button"),d=e.resolveComponent("el-upload");return e.openBlock(),e.createElementBlock("div",bl,[e.createVNode(d,e.mergeProps({ref_key:"importUploadRef",ref:i,"http-request":o,action:"#","show-file-list":!1,accept:".xlsx,.xls,.txt",limit:1},a.$attrs),{default:e.withCtx(()=>[e.createVNode(c,e.normalizeProps(e.guardReactiveProps(a.$attrs)),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.btnName),1)]),_:1},16)]),_:1},16)])}}}),pt=ee(wl),_l="VXE_TABLE_CUSTOM_COLUMN_",Ie=1,kl=["checkbox","seq","radio","expand"],De=(n,t)=>`${t}${n}`,ge=(n,t)=>{try{const l=De(n,t),s=localStorage.getItem(l);if(!s)return null;const i=JSON.parse(s);return i.version!==Ie?(console.warn(`[ToolbarColumnConfigV2] 存储版本不匹配 (当前: ${i.version}, 期望: ${Ie}),将使用默认配置`),null):i}catch(l){return console.error("[ToolbarColumnConfigV2] 读取列配置存储失败:",l),null}},ze=(n,t,l)=>{try{const s=De(n,t),i={version:Ie,timestamp:Date.now(),columns:l};localStorage.setItem(s,JSON.stringify(i))}catch(s){console.error("[ToolbarColumnConfigV2] 保存列配置存储失败:",s)}},El=(n,t)=>{try{const l=De(n,t);localStorage.removeItem(l)}catch(l){console.error("[ToolbarColumnConfigV2] 删除列配置存储失败:",l)}},xl=(n,t,l,s,i)=>{const o=ge(n,t);if(o){const a=o.columns.find(r=>r.field===l);a?a.width=s:o.columns.push({field:l,visible:!0,width:s,sortNumber:o.columns.length}),ze(n,t,o.columns)}else if(i){const a=i.map(r=>r.field===l?{...r,width:s}:r);ze(n,t,a)}},Sl=(n,t)=>{const l=ge(n,t);return l!==null&&l.columns.length>0};function Vl(n){const{table:t,lockFieldList:l,maxFixedCount:s,storagePrefix:i,columnGroupsConfig:o,defaultVisibleFields:a}=n,r=e.ref([]),c=e.ref([]),d=e.ref([]),f=e.ref([]),g=e.computed(()=>d.value.map(C=>r.value.find(S=>S.field===C)).filter(C=>C!==void 0)),v=e.computed(()=>r.value.filter(C=>C.visible).sort((C,S)=>C.sortNumber-S.sortNumber)),b=e.computed(()=>v.value.length),V=e.computed(()=>v.value.filter(C=>C.fixed==="left").length),_=e.computed(()=>v.value.filter(C=>C.fixed==="right").length),h=e.computed(()=>V.value+_.value),y=e.computed(()=>r.value.length>0&&r.value.every(C=>C.visible)),p=e.computed(()=>{const C=r.value.filter(S=>S.visible).length;return C>0&&C<r.value.length}),A=C=>C.fixed==="left"?!0:h.value<s.value,m=C=>C.fixed==="right"?!0:h.value<s.value,F=C=>!!(C.type&&kl.includes(C.type)),E=()=>{const C=o.value||[],S=r.value.map(K=>K.field),L=new Set,j=C.map((K,ne)=>{const de=K.fields.filter(ae=>S.includes(ae));return de.forEach(ae=>L.add(ae)),{id:`group_${ne}`,title:K.title,fields:de}}).filter(K=>K.fields.length>0),R=S.filter(K=>!L.has(K));if(R.length>0||j.length===0){const K={id:"__default__",title:"基础信息",fields:R.length>0?R:S,isDefault:!0};j.unshift(K)}c.value=j},w=()=>{const C=t.value;if(!C||f.value.length>0)return;const S=C.getTableColumn(),L=S.fullColumn||S.tableColumn||C.getColumns();f.value=W.cloneDeep(L);const j=L.filter(R=>!F(R)&&R.field);d.value=j.map(R=>R.field)},$=()=>{const C=t.value;if(!C||!C.id)return;const S=C.id,L=C.getTableColumn(),j=L.fullColumn||L.tableColumn||C.getColumns(),R=ge(S,i.value),K=new Map((R==null?void 0:R.columns.map(P=>[P.field,P]))||[]),ne=j.filter(P=>!F(P)&&P.field),de=a.value.length>0,ae=ne.map((P,H)=>{const ue=P.field,Z=K.get(ue),gt=l.value.includes(ue),yt=Z?Z.visible:de?a.value.includes(ue):P.visible!==!1;return{field:ue,title:P.title||ue||"未命名",visible:yt,fixed:(Z==null?void 0:Z.fixed)||P.fixed||void 0,width:(Z==null?void 0:Z.width)||P.renderWidth||void 0,sortNumber:(Z==null?void 0:Z.sortNumber)??H,visibleLocked:gt,originalIndex:H}});r.value=ae,E(),r.value.forEach(P=>{const H=c.value.find(ue=>ue.fields.includes(P.field));P.groupId=H==null?void 0:H.id})},M=()=>r.value.map(C=>({field:C.field,visible:C.visible,fixed:C.fixed,width:C.width,sortNumber:C.sortNumber})),I=()=>{const C=f.value;return C.length?C.filter(L=>!F(L)&&L.field).map((L,j)=>{const R=L.field;return{field:R,visible:a.value.includes(R),fixed:L.fixed||void 0,width:L.width||void 0,sortNumber:j}}):[]},O=async C=>{const S=t.value;if(!S)return;const L=S.getTableColumn(),j=L.fullColumn||L.tableColumn||S.getColumns(),R=j.filter(P=>F(P)),K=j.filter(P=>!F(P)),ne=new Map(C.map(P=>[P.field,P])),de=K.map(P=>{const H=ne.get(P.field);return H&&(P.visible=H.visible,P.fixed=H.fixed||"",H.width&&(P.width=H.width)),{column:P,sortNumber:(H==null?void 0:H.sortNumber)??9999}}).sort((P,H)=>P.sortNumber-H.sortNumber).map(P=>P.column),ae=[...R,...de];await S.loadColumn(ae)};return{allColumns:r,columnGroups:c,originalOrder:d,filteredColumns:g,selectedColumns:v,selectedCount:b,leftFixedCount:V,rightFixedCount:_,totalFixedCount:h,selectAll:y,isIndeterminate:p,canFixLeft:A,canFixRight:m,initColumns:$,buildCurrentConfig:M,applyConfigToTable:O,loadStoredConfig:async()=>{const C=t.value;if(!C||!C.id)return;w();const S=ge(C.id,i.value);if(S&&S.columns.length)await O(S.columns);else if(a.value.length>0){const L=I();await O(L)}},saveAndApply:async()=>{const C=t.value;if(!C||!C.id)throw new Error("表格实例不存在或未设置 ID");const S=M();await O(S),ze(C.id,i.value,S)},resetToDefault:async()=>{const C=t.value;if(!(!C||!C.id)){if(El(C.id,i.value),f.value.length?await C.reloadColumn(W.cloneDeep(f.value)):await C.refreshColumn(),a.value.length>0){const S=I();await O(S)}$()}},onResizableChange:C=>{const S=t.value;if(!S||!S.id)return;const{column:L}=C,j=L.field,R=L.renderWidth;if(!j||!R)return;const K=r.value.find(ne=>ne.field===j);K&&(K.width=R),xl(S.id,i.value,j,R,M())},checkHasStoredConfig:()=>{const C=t.value;return!C||!C.id?!1:Sl(C.id,i.value)},updateSelectedOrder:C=>{C.forEach((S,L)=>{const j=r.value.find(R=>R.field===S.field);j&&(j.sortNumber=L)})},onSelectAllChange:C=>{r.value.forEach(S=>{S.visibleLocked||(S.visible=C)})},onColumnVisibleChange:C=>{!C.visible&&C.fixed&&(C.fixed=void 0)},onDragEnd:()=>{v.value.forEach((C,S)=>{C.sortNumber=S})},moveToTop:(C,S)=>{var R;if(S===0)return;const j=((R=r.value.filter(K=>K.visible).sort((K,ne)=>K.sortNumber-ne.sortNumber)[0])==null?void 0:R.sortNumber)??0;C.sortNumber=j-1},removeFromSelected:C=>C.visibleLocked?!1:(C.visible=!1,C.fixed&&(C.fixed=void 0),!0),toggleFixed:(C,S)=>C.fixed===S?(C.fixed=void 0,!0):S==="left"&&!A(C)||S==="right"&&!m(C)?!1:(C.fixed=S,!0),onGroupSelectChange:(C,S)=>{const L=c.value.find(j=>j.id===C);L&&r.value.forEach(j=>{L.fields.includes(j.field)&&!j.visibleLocked&&(j.visible=S)})},getGroupCheckState:C=>{const S=c.value.find(R=>R.id===C);if(!S)return{checked:!1,indeterminate:!1};const L=r.value.filter(R=>S.fields.includes(R.field)&&!R.visibleLocked);if(L.length===0)return{checked:!0,indeterminate:!1};const j=L.filter(R=>R.visible).length;return{checked:j===L.length,indeterminate:j>0&&j<L.length}}}}const Nl={class:"toolbar-column-config"},Al={class:"column-config-body"},Fl={class:"column-list-left"},Bl={class:"left-header"},Il={class:"column-grid-wrapper"},zl={class:"group-header"},$l={class:"group-title"},Tl={class:"group-count"},Ml={class:"column-grid"},Dl=["title"],Ll={key:0,class:"vxe-icon-lock lock-icon"},Ol={class:"column-list-right"},Rl={class:"right-header"},jl={class:"selected-list-wrapper"},Pl={class:"selected-item"},ql={class:"index"},Ul=["title"],Kl={class:"item-actions"},Ql=["onClick"],Jl=["onClick"],Hl=["onClick"],Wl=["onClick"],Gl={class:"drawer-footer"},Yl={class:"footer-right"},Xl=e.defineComponent({name:"JcColumnConfig",__name:"index",props:{table:{default:null},itemWidth:{default:110},drawerWidth:{default:"720px"},maxFixedCount:{default:4},lockFieldList:{default:()=>[]},storagePrefix:{default:_l},columnGroups:{default:()=>[]},defaultVisibleFields:{default:()=>[]}},emits:["change","saved","reset","width-change"],setup(n,{expose:t,emit:l}){const s=n,i=l,o=Vl({table:e.toRef(s,"table"),lockFieldList:e.toRef(s,"lockFieldList"),maxFixedCount:e.toRef(s,"maxFixedCount"),storagePrefix:e.toRef(s,"storagePrefix"),columnGroupsConfig:e.toRef(s,"columnGroups"),defaultVisibleFields:e.toRef(s,"defaultVisibleFields")}),a=e.ref(!1),r=e.ref(""),c=e.computed(()=>{const E=o.filteredColumns.value;if(!r.value)return E;const w=r.value.toLowerCase();return E.filter($=>($.title||$.field||"").toLowerCase().includes(w))}),d=e.computed(()=>o.columnGroups.value.map(E=>({...E,columns:c.value.filter(w=>w.groupId===E.id),checkState:o.getGroupCheckState(E.id)})).filter(E=>E.columns.length>0)),f=(E,w)=>{o.onGroupSelectChange(E,w)};e.watch(()=>s.table,async E=>{E&&E.id&&(await e.nextTick(),await A())},{immediate:!0});const g=()=>{if(!s.table){x.ElMessage.warning("表格实例未就绪");return}o.initColumns(),a.value=!0},v=()=>{a.value=!1},b=()=>{a.value=!1},V=E=>{o.onSelectAllChange(E)},_=(E,w)=>{o.toggleFixed(E,w)||x.ElMessage.warning(`最多只能固定 ${s.maxFixedCount} 列`)},h=E=>{o.removeFromSelected(E)||x.ElMessage.warning("该列不能取消选中")},y=async()=>{try{await o.saveAndApply(),i("saved",o.allColumns.value),x.ElMessage.success("列配置已保存并应用"),a.value=!1}catch(E){console.error("保存列配置失败:",E),x.ElMessage.error("保存列配置失败")}},p=async()=>{try{await x.ElMessageBox.confirm("确定要恢复默认配置吗?(包括可见、固定、排序、列宽)。","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}),await o.resetToDefault(),i("reset"),x.ElMessage.success("已恢复默认配置")}catch{}},A=async()=>{await o.loadStoredConfig()};return t({openDrawer:g,closeDrawer:v,loadStoredConfig:A,resetToDefault:p,saveAndApply:y,onResizableChange:E=>{o.onResizableChange(E);const w=E.column.field,$=E.column.renderWidth;w&&$&&i("width-change",{field:w,width:$})},hasStoredConfig:()=>o.checkHasStoredConfig()}),(E,w)=>{const $=e.resolveComponent("el-icon"),M=e.resolveComponent("el-button"),I=e.resolveComponent("el-input"),O=e.resolveComponent("el-checkbox"),D=e.resolveComponent("el-tooltip"),q=e.resolveComponent("el-drawer");return e.openBlock(),e.createElementBlock("div",Nl,[e.createVNode(M,{link:"",class:"config-trigger-btn",onClick:g},{default:e.withCtx(()=>[e.createVNode($,{size:16},{default:e.withCtx(()=>[e.createVNode(e.unref(Y.Setting))]),_:1})]),_:1}),e.createVNode(q,{modelValue:a.value,"onUpdate:modelValue":w[1]||(w[1]=N=>a.value=N),title:"列配置",direction:"rtl",size:E.drawerWidth,"close-on-click-modal":!1,class:"column-config-drawer"},{header:e.withCtx(()=>w[2]||(w[2]=[e.createElementVNode("div",{class:"drawer-header"},[e.createElementVNode("span",{class:"drawer-title"},"列配置")],-1)])),footer:e.withCtx(()=>[e.createElementVNode("div",Gl,[e.createVNode(M,{onClick:p},{default:e.withCtx(()=>w[9]||(w[9]=[e.createTextVNode("恢复默认")])),_:1,__:[9]}),e.createElementVNode("div",Yl,[e.createVNode(M,{onClick:b},{default:e.withCtx(()=>w[10]||(w[10]=[e.createTextVNode("取消")])),_:1,__:[10]}),e.createVNode(M,{type:"primary",onClick:y},{default:e.withCtx(()=>w[11]||(w[11]=[e.createTextVNode("保存并应用")])),_:1,__:[11]})])])]),default:e.withCtx(()=>[e.createElementVNode("div",Al,[e.createElementVNode("div",Fl,[e.createElementVNode("div",Bl,[e.createVNode(I,{modelValue:r.value,"onUpdate:modelValue":w[0]||(w[0]=N=>r.value=N),placeholder:"搜索",clearable:"","prefix-icon":e.unref(Y.Search),size:"small"},null,8,["modelValue","prefix-icon"]),e.createVNode(O,{"model-value":e.unref(o).selectAll.value,indeterminate:e.unref(o).isIndeterminate.value,class:"select-all-checkbox",onChange:V},{default:e.withCtx(()=>w[3]||(w[3]=[e.createTextVNode(" 全选 ")])),_:1,__:[3]},8,["model-value","indeterminate"])]),e.createElementVNode("div",Il,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,N=>(e.openBlock(),e.createElementBlock("div",{key:N.id,class:"column-group"},[e.createElementVNode("div",zl,[e.createVNode(O,{"model-value":N.checkState.checked,indeterminate:N.checkState.indeterminate,onChange:T=>f(N.id,T),size:"small"},{default:e.withCtx(()=>[e.createElementVNode("span",$l,e.toDisplayString(N.title),1),e.createElementVNode("span",Tl,"("+e.toDisplayString(N.columns.length)+")",1)]),_:2},1032,["model-value","indeterminate","onChange"])]),e.createElementVNode("div",Ml,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.columns,T=>(e.openBlock(),e.createElementBlock("div",{key:T.field,class:"column-checkbox-item",style:e.normalizeStyle({width:E.itemWidth+"px"})},[e.createVNode(O,{modelValue:T.visible,"onUpdate:modelValue":u=>T.visible=u,disabled:T.visibleLocked,onChange:u=>e.unref(o).onColumnVisibleChange(T),size:"small"},{default:e.withCtx(()=>[e.createElementVNode("span",{class:"column-title",title:T.title},[e.createTextVNode(e.toDisplayString(T.title||T.field)+" ",1),T.visibleLocked?(e.openBlock(),e.createElementBlock("i",Ll)):e.createCommentVNode("",!0)],8,Dl)]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onChange"])],4))),128))])]))),128))])]),e.createElementVNode("div",Ol,[e.createElementVNode("div",Rl,[e.createElementVNode("span",null,"已选("+e.toDisplayString(e.unref(o).selectedCount.value)+")",1),w[4]||(w[4]=e.createElementVNode("span",{class:"drag-hint"},"编号可拖拽排序",-1))]),e.createElementVNode("div",jl,[e.createVNode(e.unref(bt),{"item-key":"field",animation:200,"ghost-class":"ghost-item","model-value":e.unref(o).selectedColumns.value,"onUpdate:modelValue":e.unref(o).updateSelectedOrder,onEnd:e.unref(o).onDragEnd},{item:e.withCtx(({element:N,index:T})=>[e.createElementVNode("div",Pl,[e.createElementVNode("span",ql,e.toDisplayString(T+1),1),e.createElementVNode("span",{class:"title",title:N.title},e.toDisplayString(N.title||N.field),9,Ul),e.createElementVNode("div",Kl,[e.createVNode(D,{content:"取消选中",placement:"top","show-after":500,disabled:N.visibleLocked},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(["action-btn remove-btn",{"is-hidden":N.visibleLocked}]),onClick:u=>!N.visibleLocked&&h(N)},w[5]||(w[5]=[e.createElementVNode("i",{class:"vxe-icon-close"},null,-1)]),10,Ql)]),_:2},1032,["disabled"]),e.createVNode(D,{content:"置顶",placement:"top","show-after":500,disabled:T===0},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(["action-btn",{"is-hidden":T===0}]),onClick:u=>T!==0&&e.unref(o).moveToTop(N,T)},w[6]||(w[6]=[e.createElementVNode("i",{class:"vxe-icon-caret-up"},null,-1)]),10,Jl)]),_:2},1032,["disabled"]),e.createVNode(D,{content:"固定到左侧",placement:"top","show-after":500},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(["fixed-btn",{"is-active":N.fixed==="left","is-disabled":!e.unref(o).canFixLeft(N)}]),onClick:u=>_(N,"left")},w[7]||(w[7]=[e.createElementVNode("i",{class:"vxe-icon-fixed-left"},null,-1)]),10,Hl)]),_:2},1024),e.createVNode(D,{content:"固定到右侧",placement:"top","show-after":500},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(["fixed-btn",{"is-active":N.fixed==="right","is-disabled":!e.unref(o).canFixRight(N)}]),onClick:u=>_(N,"right")},w[8]||(w[8]=[e.createElementVNode("i",{class:"vxe-icon-fixed-right"},null,-1)]),10,Wl)]),_:2},1024)])])]),_:1},8,["model-value","onUpdate:modelValue","onEnd"])])])])]),_:1},8,["modelValue","size"])])}}}),Zl=Me(Xl,[["__scopeId","data-v-1fadcb1f"]]),mt=ee(Zl),es=Object.freeze(Object.defineProperty({__proto__:null,JcCascader:ot,JcColumnConfig:mt,JcDatePicker:rt,JcImportButton:pt,JcImportDialog:ht,JcInputComplex:ut,JcInputSwitch:at,JcListLayout:ft,JcMoreQueryContain:dt,JcSelectQuery:it,JcTagQuery:ct},Symbol.toStringTag,{value:"Module"})),ts=(n={},t="jc-query-injection-key")=>{n.resetCount=0;const l=W.cloneDeep(n),s=e.reactive({queryForm:l,tags:[]}),{useProvideQueryStore:i}=re(t),{state:o,setQuery:a,addTag:r,reduceTag:c,reduceAllTag:d,clearQuery:f}=i(s),g=()=>{o.queryForm.resetCount++,f(n)};return{queryForm:o.queryForm,setQuery:a,addTag:r,reduceTag:c,reduceAllTag:d,clearQuery:g}},ns={install:n=>{for(const t of Object.values(es))n.use(t)}};exports.JcCascader=ot;exports.JcColumnConfig=mt;exports.JcDatePicker=rt;exports.JcImportButton=pt;exports.JcImportDialog=ht;exports.JcInputComplex=ut;exports.JcInputSwitch=at;exports.JcListLayout=ft;exports.JcMoreQueryContain=dt;exports.JcSelectQuery=it;exports.JcTagQuery=ct;exports.default=ns;exports.reactiveQuery=ts;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),W=require("lodash-es"),Ct=require("@vueuse/shared"),Z=require("@element-plus/icons-vue"),A=require("element-plus");require("element-plus/es/components/select/style/index"),require("element-plus/es/components/option/style/index"),require("element-plus/es/components/checkbox-group/style/index"),require("element-plus/es/components/checkbox/style/index"),require("element-plus/es/components/button/style/index"),require("element-plus/es/components/input/style/index"),require("element-plus/es/components/icon/style/index"),require("element-plus/es/components/popover/style/index"),require("element-plus/es/components/message/style/index"),require("element-plus/es/components/tag/style/index"),require("element-plus/es/components/tooltip/style/index"),require("element-plus/es/components/card/style/index"),require("element-plus/es/components/loading/style/index"),require("element-plus/es/components/message-box/style/index");const kt=require("vuedraggable");function wt(n){const t=Object.create(null);return function(s){return t[s]||(t[s]=n(s))}}const Ue=wt(function(n){return n===null?"":n.replace(/(\s*)/g,"")});function _t(n){const t=Object.prototype.toString.call(n);return Ue(t).replace(/(\[|object|\])/g,"")}function K(n){const t=_t(n);let l;switch(t){case"String":l=!Ue(n);break;case"Number":l=W.isNil(n);break;case"Boolean":l=W.isNil(n);break;case"Array":case"Object":case"Map":case"Set":l=W.isEmpty(n);break;default:l=!0;break}return l}function Et(){var n=window.navigator.userAgent,t=n.indexOf("MSIE ");if(t>0)return parseInt(n.substring(t+5,n.indexOf(".",t)),10);var l=n.indexOf("Trident/");if(l>0){var s=n.indexOf("rv:");return parseInt(n.substring(s+3,n.indexOf(".",s)),10)}var o=n.indexOf("Edge/");return o>0?parseInt(n.substring(o+5,n.indexOf(".",o)),10):-1}let he;function _e(){_e.init||(_e.init=!0,he=Et()!==-1)}var ye={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){_e(),e.nextTick(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const n=document.createElement("object");this._resizeObject=n,n.setAttribute("aria-hidden","true"),n.setAttribute("tabindex",-1),n.onload=this.addResizeHandlers,n.type="text/html",he&&this.$el.appendChild(n),n.data="about:blank",he||this.$el.appendChild(n)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!he&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const xt=e.withScopeId("data-v-b329ee4c");e.pushScopeId("data-v-b329ee4c");const Vt={class:"resize-observer",tabindex:"-1"};e.popScopeId();const St=xt((n,t,l,s,o,i)=>(e.openBlock(),e.createBlock("div",Vt)));ye.render=St;ye.__scopeId="data-v-b329ee4c";ye.__file="src/components/ResizeObserver.vue";function pe(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?pe=function(t){return typeof t}:pe=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pe(n)}function Nt(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function At(n,t){for(var l=0;l<t.length;l++){var s=t[l];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(n,s.key,s)}}function Bt(n,t,l){return t&&At(n.prototype,t),n}function Le(n){return Ft(n)||$t(n)||zt(n)||It()}function Ft(n){if(Array.isArray(n))return Ee(n)}function $t(n){if(typeof Symbol<"u"&&Symbol.iterator in Object(n))return Array.from(n)}function zt(n,t){if(n){if(typeof n=="string")return Ee(n,t);var l=Object.prototype.toString.call(n).slice(8,-1);if(l==="Object"&&n.constructor&&(l=n.constructor.name),l==="Map"||l==="Set")return Array.from(n);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return Ee(n,t)}}function Ee(n,t){(t==null||t>n.length)&&(t=n.length);for(var l=0,s=new Array(t);l<t;l++)s[l]=n[l];return s}function It(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tt(n){var t;return typeof n=="function"?t={callback:n}:t=n,t}function Mt(n,t){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,o,i,a=function(c){for(var d=arguments.length,f=new Array(d>1?d-1:0),g=1;g<d;g++)f[g-1]=arguments[g];if(i=f,!(s&&c===o)){var v=l.leading;typeof v=="function"&&(v=v(c,o)),(!s||c!==o)&&v&&n.apply(void 0,[c].concat(Le(i))),o=c,clearTimeout(s),s=setTimeout(function(){n.apply(void 0,[c].concat(Le(i))),s=0},t)}};return a._clear=function(){clearTimeout(s),s=null},a}function Qe(n,t){if(n===t)return!0;if(pe(n)==="object"){for(var l in n)if(!Qe(n[l],t[l]))return!1;return!0}return!1}var Dt=function(){function n(t,l,s){Nt(this,n),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(l,s)}return Bt(n,[{key:"createObserver",value:function(l,s){var o=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=Tt(l),this.callback=function(r,c){o.options.callback(r,c),r&&o.options.once&&(o.frozen=!0,o.destroyObserver())},this.callback&&this.options.throttle){var i=this.options.throttleOptions||{},a=i.leading;this.callback=Mt(this.callback,this.options.throttle,{leading:function(c){return a==="both"||a==="visible"&&c||a==="hidden"&&!c}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(r){var c=r[0];if(r.length>1){var d=r.find(function(g){return g.isIntersecting});d&&(c=d)}if(o.callback){var f=c.isIntersecting&&c.intersectionRatio>=o.threshold;if(f===o.oldResult)return;o.oldResult=f,o.callback(f,c)}},this.options.intersection),e.nextTick(function(){o.observer&&o.observer.observe(o.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),n}();function Je(n,t,l){var s=t.value;if(s)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var o=new Dt(n,s,l);n._vue_visibilityState=o}}function Lt(n,t,l){var s=t.value,o=t.oldValue;if(!Qe(s,o)){var i=n._vue_visibilityState;if(!s){He(n);return}i?i.createObserver(s,l):Je(n,{value:s},l)}}function He(n){var t=n._vue_visibilityState;t&&(t.destroyObserver(),delete n._vue_visibilityState)}var Ot={beforeMount:Je,updated:Lt,unmounted:He},jt={itemsLimit:1e3},Rt=/(auto|scroll)/;function We(n,t){return n.parentNode===null?t:We(n.parentNode,t.concat([n]))}var ke=function(t,l){return getComputedStyle(t,null).getPropertyValue(l)},Pt=function(t){return ke(t,"overflow")+ke(t,"overflow-y")+ke(t,"overflow-x")},qt=function(t){return Rt.test(Pt(t))};function Oe(n){if(n instanceof HTMLElement||n instanceof SVGElement){for(var t=We(n.parentNode,[]),l=0;l<t.length;l+=1)if(qt(t[l]))return t[l];return document.scrollingElement||document.documentElement}}function xe(n){"@babel/helpers - typeof";return xe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xe(n)}var Kt={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(t){return["vertical","horizontal"].includes(t)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function Ut(){return this.items.length&&xe(this.items[0])!=="object"}var Ve=!1;if(typeof window<"u"){Ve=!1;try{var Qt=Object.defineProperty({},"passive",{get:function(){Ve=!0}});window.addEventListener("test",null,Qt)}catch{}}let Jt=0;var Te={name:"RecycleScroller",components:{ResizeObserver:ye},directives:{ObserveVisibility:Ot},props:{...Kt,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const n={"-1":{accumulator:0}},t=this.items,l=this.sizeField,s=this.minItemSize;let o=1e4,i=0,a;for(let r=0,c=t.length;r<c;r++)a=t[r][l]||s,a<o&&(o=a),i+=a,n[r]={accumulator:i,size:a};return this.$_computedMinItemSize=o,n}return[]},simpleArray:Ut,itemIndexByKey(){const{keyField:n,items:t}=this,l={};for(let s=0,o=t.length;s<o;s++)l[t[s][n]]=s;return l}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const n=this.$_lastUpdateScrollPosition;typeof n=="number"&&this.$nextTick(()=>{this.scrollToPosition(n)})},beforeUnmount(){this.removeListeners()},methods:{addView(n,t,l,s,o){const i=e.markRaw({id:Jt++,index:t,used:!0,key:s,type:o}),a=e.shallowReactive({item:l,position:0,nr:i});return n.push(a),a},unuseView(n,t=!1){const l=this.$_unusedViews,s=n.nr.type;let o=l.get(s);o||(o=[],l.set(s,o)),o.push(n),t||(n.nr.used=!1,n.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(n){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const t=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:l}=this.updateVisibleItems(!1,!0);l||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});t(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&t()},this.updateInterval))}},handleVisibilityChange(n,t){this.ready&&(n||t.boundingClientRect.width!==0||t.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(n,t=!1){const l=this.itemSize,s=this.gridItems||1,o=this.itemSecondarySize||l,i=this.$_computedMinItemSize,a=this.typeField,r=this.simpleArray?null:this.keyField,c=this.items,d=c.length,f=this.sizes,g=this.$_views,v=this.$_unusedViews,w=this.pool,B=this.itemIndexByKey;let E,h,b,p,F;if(!d)E=h=p=F=b=0;else if(this.$_prerender)E=p=0,h=F=Math.min(this.prerender,c.length),b=null;else{const I=this.getScroll();if(t){let V=I.start-this.$_lastUpdateScrollPosition;if(V<0&&(V=-V),l===null&&V<i||V<l)return{continuous:!0}}this.$_lastUpdateScrollPosition=I.start;const y=this.buffer;I.start-=y,I.end+=y;let k=0;if(this.$refs.before&&(k=this.$refs.before.scrollHeight,I.start-=k),this.$refs.after){const V=this.$refs.after.scrollHeight;I.end+=V}if(l===null){let V,N=0,D=d-1,u=~~(d/2),x;do x=u,V=f[u].accumulator,V<I.start?N=u:u<d-1&&f[u+1].accumulator>I.start&&(D=u),u=~~((N+D)/2);while(u!==x);for(u<0&&(u=0),E=u,b=f[d-1].accumulator,h=u;h<d&&f[h].accumulator<I.end;h++);for(h===-1?h=c.length-1:(h++,h>d&&(h=d)),p=E;p<d&&k+f[p].accumulator<I.start;p++);for(F=p;F<d&&k+f[F].accumulator<I.end;F++);}else{E=~~(I.start/l*s);const V=E%s;E-=V,h=Math.ceil(I.end/l*s),p=Math.max(0,Math.floor((I.start-k)/l*s)),F=Math.floor((I.end-k)/l*s),E<0&&(E=0),h>d&&(h=d),p<0&&(p=0),F>d&&(F=d),b=Math.ceil(d/s)*l}}h-E>jt.itemsLimit&&this.itemsLimitError(),this.totalSize=b;let m;const $=E<=this.$_endIndex&&h>=this.$_startIndex;if($)for(let I=0,y=w.length;I<y;I++)m=w[I],m.nr.used&&(n&&(m.nr.index=B[m.item[r]]),(m.nr.index==null||m.nr.index<E||m.nr.index>=h)&&this.unuseView(m));const S=$?null:new Map;let _,L,O;for(let I=E;I<h;I++){_=c[I];const y=r?_[r]:_;if(y==null)throw new Error(`Key is ${y} on item (keyField is '${r}')`);if(m=g.get(y),!l&&!f[I].size){m&&this.unuseView(m);continue}L=_[a];let k=v.get(L),V=!1;if(!m)$?k&&k.length?m=k.pop():m=this.addView(w,I,_,y,L):(O=S.get(L)||0,(!k||O>=k.length)&&(m=this.addView(w,I,_,y,L),this.unuseView(m,!0),k=v.get(L)),m=k[O],S.set(L,O+1)),g.delete(m.nr.key),m.nr.used=!0,m.nr.index=I,m.nr.key=y,m.nr.type=L,g.set(y,m),V=!0;else if(!m.nr.used&&(m.nr.used=!0,V=!0,k)){const N=k.indexOf(m);N!==-1&&k.splice(N,1)}m.item=_,V&&(I===c.length-1&&this.$emit("scroll-end"),I===0&&this.$emit("scroll-start")),l===null?(m.position=f[I-1].accumulator,m.offset=0):(m.position=Math.floor(I/s)*l,m.offset=I%s*o)}return this.$_startIndex=E,this.$_endIndex=h,this.emitUpdate&&this.$emit("update",E,h,p,F),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:$}},getListenerTarget(){let n=Oe(this.$el);return window.document&&(n===window.document.documentElement||n===window.document.body)&&(n=window),n},getScroll(){const{$el:n,direction:t}=this,l=t==="vertical";let s;if(this.pageMode){const o=n.getBoundingClientRect(),i=l?o.height:o.width;let a=-(l?o.top:o.left),r=l?window.innerHeight:window.innerWidth;a<0&&(r+=a,a=0),a+r>i&&(r=i-a),s={start:a,end:a+r}}else l?s={start:n.scrollTop,end:n.scrollTop+n.clientHeight}:s={start:n.scrollLeft,end:n.scrollLeft+n.clientWidth};return s},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,Ve?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(n){let t;const l=this.gridItems||1;this.itemSize===null?t=n>0?this.sizes[n-1].accumulator:0:t=Math.floor(n/l)*this.itemSize,this.scrollToPosition(t)},scrollToPosition(n){const t=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let l,s,o;if(this.pageMode){const i=Oe(this.$el),a=i.tagName==="HTML"?0:i[t.scroll],r=i.getBoundingClientRect(),d=this.$el.getBoundingClientRect()[t.start]-r[t.start];l=i,s=t.scroll,o=n+a+d}else l=this.$el,s=t.scroll,o=n;l[s]=o},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((n,t)=>n.nr.index-t.nr.index)}}};const Ht={key:0,ref:"before",class:"vue-recycle-scroller__slot"},Wt={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function Gt(n,t,l,s,o,i){const a=e.resolveComponent("ResizeObserver"),r=e.resolveDirective("observe-visibility");return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["vue-recycle-scroller",{ready:o.ready,"page-mode":l.pageMode,[`direction-${n.direction}`]:!0}]),onScrollPassive:t[0]||(t[0]=(...c)=>i.handleScroll&&i.handleScroll(...c))},[n.$slots.before?(e.openBlock(),e.createElementBlock("div",Ht,[e.renderSlot(n.$slots,"before")],512)):e.createCommentVNode("v-if",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.listTag),{ref:"wrapper",style:e.normalizeStyle({[n.direction==="vertical"?"minHeight":"minWidth"]:o.totalSize+"px"}),class:e.normalizeClass(["vue-recycle-scroller__item-wrapper",l.listClass])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.pool,c=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.itemTag),e.mergeProps({key:c.nr.id,style:o.ready?{transform:`translate${n.direction==="vertical"?"Y":"X"}(${c.position}px) translate${n.direction==="vertical"?"X":"Y"}(${c.offset}px)`,width:l.gridItems?`${n.direction==="vertical"&&l.itemSecondarySize||l.itemSize}px`:void 0,height:l.gridItems?`${n.direction==="horizontal"&&l.itemSecondarySize||l.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[l.itemClass,{hover:!l.skipHover&&o.hoverKey===c.nr.key}]]},e.toHandlers(l.skipHover?{}:{mouseenter:()=>{o.hoverKey=c.nr.key},mouseleave:()=>{o.hoverKey=null}})),{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default",{item:c.item,index:c.nr.index,active:c.nr.used})]),_:2},1040,["style","class"]))),128)),e.renderSlot(n.$slots,"empty")]),_:3},8,["style","class"])),n.$slots.after?(e.openBlock(),e.createElementBlock("div",Wt,[e.renderSlot(n.$slots,"after")],512)):e.createCommentVNode("v-if",!0),e.createVNode(a,{onNotify:i.handleResize},null,8,["onNotify"])],34)),[[r,i.handleVisibilityChange]])}Te.render=Gt;Te.__file="src/components/RecycleScroller.vue";function se(n){return Array.isArray?Array.isArray(n):Xe(n)==="[object Array]"}function Yt(n){if(typeof n=="string")return n;let t=n+"";return t=="0"&&1/n==-1/0?"-0":t}function Xt(n){return n==null?"":Yt(n)}function ne(n){return typeof n=="string"}function Ge(n){return typeof n=="number"}function Zt(n){return n===!0||n===!1||en(n)&&Xe(n)=="[object Boolean]"}function Ye(n){return typeof n=="object"}function en(n){return Ye(n)&&n!==null}function X(n){return n!=null}function we(n){return!n.trim().length}function Xe(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}const tn="Incorrect 'index' type",nn=n=>`Invalid value for key ${n}`,ln=n=>`Pattern length exceeds max of ${n}.`,sn=n=>`Missing ${n} property in key`,on=n=>`Property 'weight' in key '${n}' must be a positive integer`,je=Object.prototype.hasOwnProperty;class rn{constructor(t){this._keys=[],this._keyMap={};let l=0;t.forEach(s=>{let o=Ze(s);this._keys.push(o),this._keyMap[o.id]=o,l+=o.weight}),this._keys.forEach(s=>{s.weight/=l})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Ze(n){let t=null,l=null,s=null,o=1,i=null;if(ne(n)||se(n))s=n,t=Re(n),l=Se(n);else{if(!je.call(n,"name"))throw new Error(sn("name"));const a=n.name;if(s=a,je.call(n,"weight")&&(o=n.weight,o<=0))throw new Error(on(a));t=Re(a),l=Se(a),i=n.getFn}return{path:t,id:l,weight:o,src:s,getFn:i}}function Re(n){return se(n)?n:n.split(".")}function Se(n){return se(n)?n.join("."):n}function an(n,t){let l=[],s=!1;const o=(i,a,r)=>{if(X(i))if(!a[r])l.push(i);else{let c=a[r];const d=i[c];if(!X(d))return;if(r===a.length-1&&(ne(d)||Ge(d)||Zt(d)))l.push(Xt(d));else if(se(d)){s=!0;for(let f=0,g=d.length;f<g;f+=1)o(d[f],a,r+1)}else a.length&&o(d,a,r+1)}};return o(n,ne(t)?t.split("."):t,0),s?l:l[0]}const un={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},cn={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(n,t)=>n.score===t.score?n.idx<t.idx?-1:1:n.score<t.score?-1:1},dn={location:0,threshold:.6,distance:100},fn={useExtendedSearch:!1,getFn:an,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var M={...cn,...un,...dn,...fn};const hn=/[^ ]+/g;function pn(n=1,t=3){const l=new Map,s=Math.pow(10,t);return{get(o){const i=o.match(hn).length;if(l.has(i))return l.get(i);const a=1/Math.pow(i,.5*n),r=parseFloat(Math.round(a*s)/s);return l.set(i,r),r},clear(){l.clear()}}}class Me{constructor({getFn:t=M.getFn,fieldNormWeight:l=M.fieldNormWeight}={}){this.norm=pn(l,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((l,s)=>{this._keysMap[l.id]=s})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,ne(this.docs[0])?this.docs.forEach((t,l)=>{this._addString(t,l)}):this.docs.forEach((t,l)=>{this._addObject(t,l)}),this.norm.clear())}add(t){const l=this.size();ne(t)?this._addString(t,l):this._addObject(t,l)}removeAt(t){this.records.splice(t,1);for(let l=t,s=this.size();l<s;l+=1)this.records[l].i-=1}getValueForItemAtKeyId(t,l){return t[this._keysMap[l]]}size(){return this.records.length}_addString(t,l){if(!X(t)||we(t))return;let s={v:t,i:l,n:this.norm.get(t)};this.records.push(s)}_addObject(t,l){let s={i:l,$:{}};this.keys.forEach((o,i)=>{let a=o.getFn?o.getFn(t):this.getFn(t,o.path);if(X(a)){if(se(a)){let r=[];const c=[{nestedArrIndex:-1,value:a}];for(;c.length;){const{nestedArrIndex:d,value:f}=c.pop();if(X(f))if(ne(f)&&!we(f)){let g={v:f,i:d,n:this.norm.get(f)};r.push(g)}else se(f)&&f.forEach((g,v)=>{c.push({nestedArrIndex:v,value:g})})}s.$[i]=r}else if(ne(a)&&!we(a)){let r={v:a,n:this.norm.get(a)};s.$[i]=r}}}),this.records.push(s)}toJSON(){return{keys:this.keys,records:this.records}}}function et(n,t,{getFn:l=M.getFn,fieldNormWeight:s=M.fieldNormWeight}={}){const o=new Me({getFn:l,fieldNormWeight:s});return o.setKeys(n.map(Ze)),o.setSources(t),o.create(),o}function mn(n,{getFn:t=M.getFn,fieldNormWeight:l=M.fieldNormWeight}={}){const{keys:s,records:o}=n,i=new Me({getFn:t,fieldNormWeight:l});return i.setKeys(s),i.setIndexRecords(o),i}function fe(n,{errors:t=0,currentLocation:l=0,expectedLocation:s=0,distance:o=M.distance,ignoreLocation:i=M.ignoreLocation}={}){const a=t/n.length;if(i)return a;const r=Math.abs(s-l);return o?a+r/o:r?1:a}function vn(n=[],t=M.minMatchCharLength){let l=[],s=-1,o=-1,i=0;for(let a=n.length;i<a;i+=1){let r=n[i];r&&s===-1?s=i:!r&&s!==-1&&(o=i-1,o-s+1>=t&&l.push([s,o]),s=-1)}return n[i-1]&&i-s>=t&&l.push([s,i-1]),l}const ce=32;function gn(n,t,l,{location:s=M.location,distance:o=M.distance,threshold:i=M.threshold,findAllMatches:a=M.findAllMatches,minMatchCharLength:r=M.minMatchCharLength,includeMatches:c=M.includeMatches,ignoreLocation:d=M.ignoreLocation}={}){if(t.length>ce)throw new Error(ln(ce));const f=t.length,g=n.length,v=Math.max(0,Math.min(s,g));let w=i,B=v;const E=r>1||c,h=E?Array(g):[];let b;for(;(b=n.indexOf(t,B))>-1;){let _=fe(t,{currentLocation:b,expectedLocation:v,distance:o,ignoreLocation:d});if(w=Math.min(_,w),B=b+f,E){let L=0;for(;L<f;)h[b+L]=1,L+=1}}B=-1;let p=[],F=1,m=f+g;const $=1<<f-1;for(let _=0;_<f;_+=1){let L=0,O=m;for(;L<O;)fe(t,{errors:_,currentLocation:v+O,expectedLocation:v,distance:o,ignoreLocation:d})<=w?L=O:m=O,O=Math.floor((m-L)/2+L);m=O;let I=Math.max(1,v-O+1),y=a?g:Math.min(v+O,g)+f,k=Array(y+2);k[y+1]=(1<<_)-1;for(let N=y;N>=I;N-=1){let D=N-1,u=l[n.charAt(D)];if(E&&(h[D]=+!!u),k[N]=(k[N+1]<<1|1)&u,_&&(k[N]|=(p[N+1]|p[N])<<1|1|p[N+1]),k[N]&$&&(F=fe(t,{errors:_,currentLocation:D,expectedLocation:v,distance:o,ignoreLocation:d}),F<=w)){if(w=F,B=D,B<=v)break;I=Math.max(1,2*v-B)}}if(fe(t,{errors:_+1,currentLocation:v,expectedLocation:v,distance:o,ignoreLocation:d})>w)break;p=k}const S={isMatch:B>=0,score:Math.max(.001,F)};if(E){const _=vn(h,r);_.length?c&&(S.indices=_):S.isMatch=!1}return S}function yn(n){let t={};for(let l=0,s=n.length;l<s;l+=1){const o=n.charAt(l);t[o]=(t[o]||0)|1<<s-l-1}return t}const me=String.prototype.normalize?n=>n.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,""):n=>n;class tt{constructor(t,{location:l=M.location,threshold:s=M.threshold,distance:o=M.distance,includeMatches:i=M.includeMatches,findAllMatches:a=M.findAllMatches,minMatchCharLength:r=M.minMatchCharLength,isCaseSensitive:c=M.isCaseSensitive,ignoreDiacritics:d=M.ignoreDiacritics,ignoreLocation:f=M.ignoreLocation}={}){if(this.options={location:l,threshold:s,distance:o,includeMatches:i,findAllMatches:a,minMatchCharLength:r,isCaseSensitive:c,ignoreDiacritics:d,ignoreLocation:f},t=c?t:t.toLowerCase(),t=d?me(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const g=(w,B)=>{this.chunks.push({pattern:w,alphabet:yn(w),startIndex:B})},v=this.pattern.length;if(v>ce){let w=0;const B=v%ce,E=v-B;for(;w<E;)g(this.pattern.substr(w,ce),w),w+=ce;if(B){const h=v-ce;g(this.pattern.substr(h),h)}}else g(this.pattern,0)}searchIn(t){const{isCaseSensitive:l,ignoreDiacritics:s,includeMatches:o}=this.options;if(t=l?t:t.toLowerCase(),t=s?me(t):t,this.pattern===t){let E={isMatch:!0,score:0};return o&&(E.indices=[[0,t.length-1]]),E}const{location:i,distance:a,threshold:r,findAllMatches:c,minMatchCharLength:d,ignoreLocation:f}=this.options;let g=[],v=0,w=!1;this.chunks.forEach(({pattern:E,alphabet:h,startIndex:b})=>{const{isMatch:p,score:F,indices:m}=gn(t,E,h,{location:i+b,distance:a,threshold:r,findAllMatches:c,minMatchCharLength:d,includeMatches:o,ignoreLocation:f});p&&(w=!0),v+=F,p&&m&&(g=[...g,...m])});let B={isMatch:w,score:w?v/this.chunks.length:1};return w&&o&&(B.indices=g),B}}class ie{constructor(t){this.pattern=t}static isMultiMatch(t){return Pe(t,this.multiRegex)}static isSingleMatch(t){return Pe(t,this.singleRegex)}search(){}}function Pe(n,t){const l=n.match(t);return l?l[1]:null}class bn extends ie{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const l=t===this.pattern;return{isMatch:l,score:l?0:1,indices:[0,this.pattern.length-1]}}}class Cn extends ie{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const s=t.indexOf(this.pattern)===-1;return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}}class kn extends ie{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const l=t.startsWith(this.pattern);return{isMatch:l,score:l?0:1,indices:[0,this.pattern.length-1]}}}class wn extends ie{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const l=!t.startsWith(this.pattern);return{isMatch:l,score:l?0:1,indices:[0,t.length-1]}}}class _n extends ie{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const l=t.endsWith(this.pattern);return{isMatch:l,score:l?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class En extends ie{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const l=!t.endsWith(this.pattern);return{isMatch:l,score:l?0:1,indices:[0,t.length-1]}}}class nt extends ie{constructor(t,{location:l=M.location,threshold:s=M.threshold,distance:o=M.distance,includeMatches:i=M.includeMatches,findAllMatches:a=M.findAllMatches,minMatchCharLength:r=M.minMatchCharLength,isCaseSensitive:c=M.isCaseSensitive,ignoreDiacritics:d=M.ignoreDiacritics,ignoreLocation:f=M.ignoreLocation}={}){super(t),this._bitapSearch=new tt(t,{location:l,threshold:s,distance:o,includeMatches:i,findAllMatches:a,minMatchCharLength:r,isCaseSensitive:c,ignoreDiacritics:d,ignoreLocation:f})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class lt extends ie{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let l=0,s;const o=[],i=this.pattern.length;for(;(s=t.indexOf(this.pattern,l))>-1;)l=s+i,o.push([s,l-1]);const a=!!o.length;return{isMatch:a,score:a?0:1,indices:o}}}const Ne=[bn,lt,kn,wn,En,_n,Cn,nt],qe=Ne.length,xn=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Vn="|";function Sn(n,t={}){return n.split(Vn).map(l=>{let s=l.trim().split(xn).filter(i=>i&&!!i.trim()),o=[];for(let i=0,a=s.length;i<a;i+=1){const r=s[i];let c=!1,d=-1;for(;!c&&++d<qe;){const f=Ne[d];let g=f.isMultiMatch(r);g&&(o.push(new f(g,t)),c=!0)}if(!c)for(d=-1;++d<qe;){const f=Ne[d];let g=f.isSingleMatch(r);if(g){o.push(new f(g,t));break}}}return o})}const Nn=new Set([nt.type,lt.type]);class An{constructor(t,{isCaseSensitive:l=M.isCaseSensitive,ignoreDiacritics:s=M.ignoreDiacritics,includeMatches:o=M.includeMatches,minMatchCharLength:i=M.minMatchCharLength,ignoreLocation:a=M.ignoreLocation,findAllMatches:r=M.findAllMatches,location:c=M.location,threshold:d=M.threshold,distance:f=M.distance}={}){this.query=null,this.options={isCaseSensitive:l,ignoreDiacritics:s,includeMatches:o,minMatchCharLength:i,findAllMatches:r,ignoreLocation:a,location:c,threshold:d,distance:f},t=l?t:t.toLowerCase(),t=s?me(t):t,this.pattern=t,this.query=Sn(this.pattern,this.options)}static condition(t,l){return l.useExtendedSearch}searchIn(t){const l=this.query;if(!l)return{isMatch:!1,score:1};const{includeMatches:s,isCaseSensitive:o,ignoreDiacritics:i}=this.options;t=o?t:t.toLowerCase(),t=i?me(t):t;let a=0,r=[],c=0;for(let d=0,f=l.length;d<f;d+=1){const g=l[d];r.length=0,a=0;for(let v=0,w=g.length;v<w;v+=1){const B=g[v],{isMatch:E,indices:h,score:b}=B.search(t);if(E){if(a+=1,c+=b,s){const p=B.constructor.type;Nn.has(p)?r=[...r,...h]:r.push(h)}}else{c=0,a=0,r.length=0;break}}if(a){let v={isMatch:!0,score:c/a};return s&&(v.indices=r),v}}return{isMatch:!1,score:1}}}const Ae=[];function Bn(...n){Ae.push(...n)}function Be(n,t){for(let l=0,s=Ae.length;l<s;l+=1){let o=Ae[l];if(o.condition(n,t))return new o(n,t)}return new tt(n,t)}const ve={AND:"$and",OR:"$or"},Fe={PATH:"$path",PATTERN:"$val"},$e=n=>!!(n[ve.AND]||n[ve.OR]),Fn=n=>!!n[Fe.PATH],$n=n=>!se(n)&&Ye(n)&&!$e(n),Ke=n=>({[ve.AND]:Object.keys(n).map(t=>({[t]:n[t]}))});function st(n,t,{auto:l=!0}={}){const s=o=>{let i=Object.keys(o);const a=Fn(o);if(!a&&i.length>1&&!$e(o))return s(Ke(o));if($n(o)){const c=a?o[Fe.PATH]:i[0],d=a?o[Fe.PATTERN]:o[c];if(!ne(d))throw new Error(nn(c));const f={keyId:Se(c),pattern:d};return l&&(f.searcher=Be(d,t)),f}let r={children:[],operator:i[0]};return i.forEach(c=>{const d=o[c];se(d)&&d.forEach(f=>{r.children.push(s(f))})}),r};return $e(n)||(n=Ke(n)),s(n)}function zn(n,{ignoreFieldNorm:t=M.ignoreFieldNorm}){n.forEach(l=>{let s=1;l.matches.forEach(({key:o,norm:i,score:a})=>{const r=o?o.weight:null;s*=Math.pow(a===0&&r?Number.EPSILON:a,(r||1)*(t?1:i))}),l.score=s})}function In(n,t){const l=n.matches;t.matches=[],X(l)&&l.forEach(s=>{if(!X(s.indices)||!s.indices.length)return;const{indices:o,value:i}=s;let a={indices:o,value:i};s.key&&(a.key=s.key.src),s.idx>-1&&(a.refIndex=s.idx),t.matches.push(a)})}function Tn(n,t){t.score=n.score}function Mn(n,t,{includeMatches:l=M.includeMatches,includeScore:s=M.includeScore}={}){const o=[];return l&&o.push(In),s&&o.push(Tn),n.map(i=>{const{idx:a}=i,r={item:t[a],refIndex:a};return o.length&&o.forEach(c=>{c(i,r)}),r})}class oe{constructor(t,l={},s){this.options={...M,...l},this.options.useExtendedSearch,this._keyStore=new rn(this.options.keys),this.setCollection(t,s)}setCollection(t,l){if(this._docs=t,l&&!(l instanceof Me))throw new Error(tn);this._myIndex=l||et(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){X(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const l=[];for(let s=0,o=this._docs.length;s<o;s+=1){const i=this._docs[s];t(i,s)&&(this.removeAt(s),s-=1,o-=1,l.push(i))}return l}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:l=-1}={}){const{includeMatches:s,includeScore:o,shouldSort:i,sortFn:a,ignoreFieldNorm:r}=this.options;let c=ne(t)?ne(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return zn(c,{ignoreFieldNorm:r}),i&&c.sort(a),Ge(l)&&l>-1&&(c=c.slice(0,l)),Mn(c,this._docs,{includeMatches:s,includeScore:o})}_searchStringList(t){const l=Be(t,this.options),{records:s}=this._myIndex,o=[];return s.forEach(({v:i,i:a,n:r})=>{if(!X(i))return;const{isMatch:c,score:d,indices:f}=l.searchIn(i);c&&o.push({item:i,idx:a,matches:[{score:d,value:i,norm:r,indices:f}]})}),o}_searchLogical(t){const l=st(t,this.options),s=(r,c,d)=>{if(!r.children){const{keyId:g,searcher:v}=r,w=this._findMatches({key:this._keyStore.get(g),value:this._myIndex.getValueForItemAtKeyId(c,g),searcher:v});return w&&w.length?[{idx:d,item:c,matches:w}]:[]}const f=[];for(let g=0,v=r.children.length;g<v;g+=1){const w=r.children[g],B=s(w,c,d);if(B.length)f.push(...B);else if(r.operator===ve.AND)return[]}return f},o=this._myIndex.records,i={},a=[];return o.forEach(({$:r,i:c})=>{if(X(r)){let d=s(l,r,c);d.length&&(i[c]||(i[c]={idx:c,item:r,matches:[]},a.push(i[c])),d.forEach(({matches:f})=>{i[c].matches.push(...f)}))}}),a}_searchObjectList(t){const l=Be(t,this.options),{keys:s,records:o}=this._myIndex,i=[];return o.forEach(({$:a,i:r})=>{if(!X(a))return;let c=[];s.forEach((d,f)=>{c.push(...this._findMatches({key:d,value:a[f],searcher:l}))}),c.length&&i.push({idx:r,item:a,matches:c})}),i}_findMatches({key:t,value:l,searcher:s}){if(!X(l))return[];let o=[];if(se(l))l.forEach(({v:i,i:a,n:r})=>{if(!X(i))return;const{isMatch:c,score:d,indices:f}=s.searchIn(i);c&&o.push({score:d,key:t,value:i,idx:a,norm:r,indices:f})});else{const{v:i,n:a}=l,{isMatch:r,score:c,indices:d}=s.searchIn(i);r&&o.push({score:c,key:t,value:i,norm:a,indices:d})}return o}}oe.version="7.1.0";oe.createIndex=et;oe.parseIndex=mn;oe.config=M;oe.parseQuery=st;Bn(An);const re=n=>{const[t,l]=Ct.createInjectionState(s=>{const o=e.reactive(s);function i(f,g){K(g)&&W.isObject(g)?o.queryForm[f]=void 0:o.queryForm[f]=g}function a(f){let{key:g,label:v,value:w}=f;if(K(w)&&!W.isObject(w))return;let B="",E=w==null?void 0:w.toString();if(typeof w=="number"||typeof w=="boolean"||typeof w=="string")B=`${v}:${E}`,E.length>50&&(B=`${v}:${E.slice(0,50)}...`);else if(W.isArray(w)&&(B=`${v}:${E}`,E.length>50)){let p=0,F=0;for(let $=0;$<w.length;$++)if(F+=w[$].length+1,F>50){p=$+1;break}let m=w.slice(0,p);B=`${v}:${m.join(",").slice(0,50)}...`,w.length>p&&(B+=`等其余${w.length-p}项`)}const h={key:g,label:v,showStr:B,value:E},b=o.tags.findIndex(p=>p.key===g);b===-1?o.tags.push(h):o.tags.splice(b,1,h)}function r(f,g){f.key&&o.tags.findIndex(v=>v.key===f.key)!==-1&&(o.queryForm[f.key]=void 0,g?o.tags.splice(g,1):o.tags=o.tags.filter(v=>v.key!==f.key))}function c(){o.tags.forEach(f=>{o.queryForm[f.key]=void 0}),o.tags=[]}function d(f={}){Object.keys(o.queryForm).forEach(g=>{g!=="resetCount"&&(o.queryForm[g]=f[g]??void 0)}),o.tags=[]}return{state:o,setQuery:i,addTag:a,reduceTag:r,reduceAllTag:c,clearQuery:d}},{injectionKey:n});return{useProvideQueryStore:t,useQueryStore:l}},Dn={class:"el-select-pop-search-container"},Ln={class:"el-select-dropdown__wrap virtual-scroll-wrap"},On={class:"check-all ak-relative el-select-dropdown__item"},jn=["title"],Rn=["onClick"],Pn={class:"el-select-dropdown__empty"},qn={class:"custom-multi-footer"},Kn={class:"counts"},Un=e.defineComponent({name:"JcSelectQuery",__name:"index",props:{field:{},options:{default:()=>[]},allowCreate:{type:Boolean,default:!1},keyField:{default:()=>["label","value"]},width:{default:"160px"},size:{default:"default"},footerBtnName:{default:"搜索"},maxScrollHeight:{default:"240px"},isNeedFooter:{type:Boolean,default:!0},isNeedOnlySelect:{type:Boolean,default:!0},injectionKey:{default:"jc-query-injection-key"}},setup(n,{expose:t}){const l=n,s=e.ref(),o=e.ref([]),i=e.ref(""),a=e.ref(),r=e.ref([]),c=e.ref([]),d=e.ref([]),f=e.ref(!1),g=e.ref(!1),v=e.ref(!1),{useQueryStore:w}=re(l.injectionKey),{state:B,setQuery:E}=w();let h=-1,b=!1;const p=e.ref(),F=u=>{u.shiftKey&&(b=!0)},m=()=>{b=!1},$=u=>{u&&(d.value=o.value,i.value="",c.value=r.value,y(d.value),e.nextTick(()=>{var x;(x=a.value)==null||x.focus()}))},S=u=>{d.value=d.value.filter(x=>x.value!==u.value)},_=u=>{v.value=!0,E(l.field,u),e.nextTick(()=>{v.value=!1})},L=()=>{const u=i.value.trim();u!==""&&p.value?c.value=p.value.search(u).map(x=>x.item):c.value=r.value},O=()=>{K(i.value)||c.value.map(u=>u.value).includes(i.value)||(r.value.unshift({label:i.value,value:i.value}),d.value.push({label:i.value,value:i.value}),o.value=d.value,E(l.field,o.value),e.nextTick(()=>{p.value=new oe(r.value,{keys:l.keyField}),L()}))},I=u=>{d.value=u?c.value:[],g.value=!1,l.isNeedFooter||(o.value=d.value,E(l.field,o.value))},y=u=>{if(u.length===0){f.value=!1,g.value=!1;return}const x=u.length;f.value=x===c.value.length,g.value=x>0&&x<c.value.length;const{options:T}=l;let U=0;if(u.length>0){const Q=u[u.length-1];U=T.findIndex(G=>G.value===Q.value)}if(b){const Q=Math.abs(h-U)+1,G=Math.min(h,U);let Y=0;for(;Y<Q;){const Ce=G+Y;W.findIndex(u,T[Ce])===-1&&d.value.push(T[Ce]),Y++}}l.isNeedFooter||(o.value=d.value,E(l.field,o.value))},k=u=>{!b&&!d.value.includes(u)&&(h=r.value.findIndex(x=>x.value===u.value))},V=u=>{d.value=[u],D()},N=()=>{var u;(u=s.value)==null||u.blur()},D=()=>{v.value=!0,o.value=d.value,E(l.field,o.value),N(),e.nextTick(()=>{v.value=!1})};return e.watch(()=>l.options,()=>{var u;!W.isArray(l.options)||((u=l.options)==null?void 0:u.length)===0||(c.value=l.options,r.value=W.cloneDeep(l.options),p.value=new oe(r.value,{keys:l.keyField,threshold:.1}))},{immediate:!0,deep:!0}),e.watch(()=>B.queryForm[l.field],u=>{v.value||(K(u)?(o.value=[],d.value=[]):o.value=W.isArray(u)?u:[])},{deep:!0}),e.onMounted(()=>{window.addEventListener("keydown",F),window.addEventListener("keyup",m),e.nextTick(()=>{p.value=new oe(r.value,{keys:l.keyField})})}),e.onUnmounted(()=>{window.removeEventListener("keydown",F),window.removeEventListener("keyup",m)}),t({focus:()=>{var u;return(u=s.value)==null?void 0:u.focus()},blur:()=>{var u;return(u=s.value)==null?void 0:u.blur()},get selectedLabel(){var u;return(u=s.value)==null?void 0:u.selectedLabel}}),(u,x)=>(e.openBlock(),e.createBlock(e.unref(A.ElSelect),e.mergeProps({ref_key:"selectRef",ref:s,modelValue:o.value,"onUpdate:modelValue":x[4]||(x[4]=T=>o.value=T)},u.$attrs,{multiple:"",clearable:"","show-arrow":!1,"collapse-tags":!0,"collapse-tags-tooltip":!0,"max-collapse-tags":1,size:u.size,style:{width:u.width},class:"jc-select","popper-class":"jc-select-popper",placeholder:"请选择",onVisibleChange:$,onRemoveTag:S,onChange:_}),e.createSlots({default:e.withCtx(()=>[e.createVNode(e.unref(A.ElOption),{value:"1",hidden:""}),e.createElementVNode("div",Dn,[e.createVNode(e.unref(Z.Search),{class:"selcet-icon search-icon"}),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInputRef",ref:a,"onUpdate:modelValue":x[0]||(x[0]=T=>i.value=T),class:"el-select-pop__input",onInput:L},null,544),[[e.vModelText,i.value]]),u.allowCreate?(e.openBlock(),e.createBlock(e.unref(Z.CirclePlus),{key:0,class:"selcet-icon circle-icon",onClick:O})):e.createCommentVNode("",!0)]),e.withDirectives(e.createElementVNode("div",Ln,[e.createElementVNode("li",On,[e.createVNode(e.unref(A.ElCheckbox),{modelValue:f.value,"onUpdate:modelValue":x[1]||(x[1]=T=>f.value=T),indeterminate:g.value,size:u.size,onChange:I},{default:e.withCtx(()=>x[5]||(x[5]=[e.createTextVNode("全选")])),_:1,__:[5]},8,["modelValue","indeterminate","size"])]),e.createVNode(e.unref(A.ElCheckboxGroup),{modelValue:d.value,"onUpdate:modelValue":x[2]||(x[2]=T=>d.value=T),onChange:x[3]||(x[3]=T=>y(T)),size:u.size},{default:e.withCtx(()=>[e.createVNode(e.unref(Te),{class:"recycle-scroller",items:c.value,"item-size":30,"key-field":"value",style:e.normalizeStyle({maxHeight:u.maxScrollHeight})},{default:e.withCtx(({item:T})=>[e.createElementVNode("li",{class:"el-select-dropdown__item",title:T.label},[e.createVNode(e.unref(A.ElCheckbox),{size:u.size,value:T,label:T,disabled:T.disabled,onClick:U=>k(T)},{default:e.withCtx(()=>[e.renderSlot(u.$slots,"default",{scope:T},()=>[e.createElementVNode("span",null,e.toDisplayString(T.label),1)])]),_:2},1032,["size","value","label","disabled","onClick"]),u.isNeedOnlySelect?(e.openBlock(),e.createElementBlock("div",{key:0,class:"select-tag",onClick:e.withModifiers(U=>V(T),["stop"])},x[6]||(x[6]=[e.createElementVNode("span",null,"仅筛选此项",-1)]),8,Rn)):e.createCommentVNode("",!0)],8,jn)]),_:3},8,["items","style"])]),_:3},8,["modelValue","size"])],512),[[e.vShow,c.value.length>0]]),e.withDirectives(e.createElementVNode("p",Pn,"无数据",512),[[e.vShow,c.value.length===0]])]),_:2},[u.isNeedFooter?{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",qn,[e.createElementVNode("span",null,[e.createElementVNode("span",Kn,"已选 "+e.toDisplayString(d.value.length)+" 项",1),x[7]||(x[7]=e.createElementVNode("span",{class:"shift-tips"},"(按住Shift可以快速多选)",-1))]),e.createElementVNode("span",null,[e.createVNode(e.unref(A.ElButton),{size:u.size,onClick:N,plain:""},{default:e.withCtx(()=>x[8]||(x[8]=[e.createTextVNode("关闭")])),_:1,__:[8]},8,["size"]),e.createVNode(e.unref(A.ElButton),{type:"primary",size:u.size,onClick:D,plain:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.footerBtnName),1)]),_:1},8,["size"])])])]),key:"0"}:void 0]),1040,["modelValue","size","style"]))}}),ee=n=>(n.install=t=>{const l=n.name;t.component(l,n)},n),ot=ee(Un),Qn={class:"jc-cascader-item"},Jn={title:"{{ data.label }}"},Hn=["onClick"],Wn={class:"custom-multi-footer"},Gn=e.defineComponent({name:"JcCascader",__name:"index",props:{field:{},options:{default:()=>[]},keyField:{default:()=>["label","value"]},width:{default:"200px"},size:{default:"default"},footerBtnName:{default:"搜索"},isNeedFooter:{type:Boolean,default:!0},isNeedHeader:{type:Boolean,default:!0},isNeedOnlySelect:{type:Boolean,default:!0},injectionKey:{default:"jc-query-injection-key"}},setup(n,{expose:t}){const l=n,s=e.ref(),o=e.ref([]),i=(m,$)=>{const S=String(m.label).trim().toLowerCase(),_=$.trim().toLowerCase();return S.indexOf(_)!==-1},a={multiple:!0,expandTrigger:"hover"},r=e.ref(!1),{useQueryStore:c}=re(l.injectionKey),{state:d,setQuery:f}=c(),g=e.ref(!1),v=e.ref(!1),w=e.computed(()=>{var S;const m=[],$=l.options.map(_=>({node:_,path:[_.value]}));for(;$.length>0;){const{node:_,path:L}=$.shift();(S=_.children)!=null&&S.length?_.children.forEach(O=>{$.push({node:O,path:[...L,O.value]})}):m.push(L)}return m});e.watch(o,m=>{m.length===0?(g.value=!1,v.value=!1):m.length===w.value.length?(g.value=!0,v.value=!1):v.value=!0});const B=m=>{v.value=!1,o.value=m?w.value:[]},E=()=>{var m;o.value=[],g.value=!1,v.value=!1,(m=s.value)==null||m.togglePopperVisible(!1)},h=()=>{var m;r.value=!0,f(l.field,o.value),(m=s.value)==null||m.togglePopperVisible(!1),e.nextTick(()=>{r.value=!1})},b=()=>{e.nextTick(()=>{h()})},p=()=>{o.value=[],h()},F=m=>{const $=w.value.filter(S=>S.includes(m.value));o.value=$,h()};return e.watch(()=>d.queryForm[l.field],m=>{r.value||(K(m)?o.value=[]:o.value=W.isArray(m)?m:[])},{deep:!0}),e.onMounted(()=>{}),e.onUnmounted(()=>{}),t({getCheckedNodes:(m=!1)=>{var $;return($=s.value)==null?void 0:$.getCheckedNodes(m)},togglePopperVisible:m=>{var $;return($=s.value)==null?void 0:$.togglePopperVisible(m)},get cascaderPanelRef(){var m;return(m=s.value)==null?void 0:m.cascaderPanelRef},get contentRef(){var m;return(m=s.value)==null?void 0:m.contentRef},get presentText(){var m;return(m=s.value)==null?void 0:m.presentText}}),(m,$)=>{const S=e.resolveComponent("el-checkbox"),_=e.resolveComponent("el-button"),L=e.resolveComponent("el-cascader");return e.openBlock(),e.createBlock(L,e.mergeProps({ref_key:"cascaderRef",ref:s,class:"jc-cascader","popper-class":"jc-cascader-popper",modelValue:o.value,"onUpdate:modelValue":$[1]||($[1]=O=>o.value=O)},m.$attrs,{props:a,options:m.options,filterable:"",clearable:!0,"filter-method":i,"show-arrow":!1,"collapse-tags":!0,"collapse-tags-tooltip":!0,size:m.size,style:{width:m.width},placeholder:"请选择",onRemoveTag:b,onClear:p}),e.createSlots({default:e.withCtx(({data:O})=>[e.createElementVNode("div",Qn,[e.createElementVNode("span",Jn,e.toDisplayString(O.label),1),m.isNeedOnlySelect?(e.openBlock(),e.createElementBlock("span",{key:0,class:"select-tag",onClick:e.withModifiers(I=>F(O),["stop"])},$[3]||($[3]=[e.createElementVNode("span",null,"仅筛选此项",-1)]),8,Hn)):e.createCommentVNode("",!0)])]),footer:e.withCtx(()=>[e.createElementVNode("div",Wn,[e.createElementVNode("span",null,[e.createVNode(_,{size:m.size,onClick:E,plain:""},{default:e.withCtx(()=>$[4]||($[4]=[e.createTextVNode("关闭")])),_:1,__:[4]},8,["size"]),e.createVNode(_,{type:"primary",size:m.size,onClick:h,plain:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.footerBtnName),1)]),_:1},8,["size"])])])]),_:2},[m.isNeedHeader?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(S,{style:{"margin-left":"10px"},size:m.size,modelValue:g.value,"onUpdate:modelValue":$[0]||($[0]=O=>g.value=O),indeterminate:v.value,onChange:B},{default:e.withCtx(()=>$[2]||($[2]=[e.createTextVNode(" 全部 ")])),_:1,__:[2]},8,["size","modelValue","indeterminate"])])]),key:"0"}:void 0]),1040,["modelValue","options","size","style"])}}}),it=ee(Gn),Yn={style:{"max-width":"100px"}},Xn=e.defineComponent({name:"JcDatePicker",__name:"index",props:{fieldList:{default:()=>[]},type:{default:"daterange"},size:{default:"default"},width:{default:"320px"},injectionKey:{default:"jc-query-injection-key"}},emits:["fieldChange"],setup(n,{expose:t,emit:l}){const s=n,o=l,i=e.ref([]),a=e.ref([]),r=e.ref(""),c=e.ref(""),d=e.ref(!1),{useQueryStore:f}=re(s.injectionKey),{state:g,setQuery:v}=f(),w=()=>{s.fieldList.forEach(b=>{v(b.value,void 0)})},B=b=>{K(i.value)||(d.value=!0,w(),v(b,i.value),e.nextTick(()=>{d.value=!1})),o("fieldChange",b)},E=()=>{d.value=!0,c.value=r.value,a.value=i.value,v(r.value,i.value),e.nextTick(()=>{d.value=!1})};e.watch(()=>s.fieldList,b=>{(!K(b)&&K(r.value)||r.value&&!s.fieldList.map(p=>p.value).includes(r.value))&&(r.value=b[0].value,i.value=[])},{immediate:!0,deep:!0}),e.watch(s.fieldList.map(b=>()=>g.queryForm[b.value]),b=>{if(!d.value){const p=b.findIndex(F=>!K(F));p===-1?(r.value=s.fieldList[0].value,i.value=[]):(r.value=s.fieldList[p].value,i.value=b[p]||[])}},{deep:!0});const h=e.ref();return t({focus:()=>{var b;return(b=h.value)==null?void 0:b.focus()},blur:()=>{var b;return(b=h.value)==null?void 0:b.blur()},handleOpen:()=>{var b;return(b=h.value)==null?void 0:b.handleOpen()},handleClose:()=>{var b;return(b=h.value)==null?void 0:b.handleClose()}}),(b,p)=>{const F=e.resolveComponent("el-option"),m=e.resolveComponent("el-select"),$=e.resolveComponent("el-date-picker");return e.openBlock(),e.createElementBlock("div",{class:"jc-date-picker",style:e.normalizeStyle({width:b.width})},[e.createElementVNode("div",Yn,[e.createVNode(m,{modelValue:r.value,"onUpdate:modelValue":p[0]||(p[0]=S=>r.value=S),size:b.size,class:"select-field",onChange:B},{prefix:e.withCtx(()=>[e.createTextVNode(e.toDisplayString((b.fieldList.find(S=>S.value===r.value)||{}).label),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.fieldList,S=>(e.openBlock(),e.createBlock(F,{key:S.value,label:S.label,value:S.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","size"])]),e.createVNode($,e.mergeProps({ref_key:"datePickerRef",ref:h,modelValue:i.value,"onUpdate:modelValue":p[1]||(p[1]=S=>i.value=S),type:b.type},b.$attrs,{"range-separator":"至","start-placeholder":"开始时间","end-placeholder":"结束时间",size:b.size,"value-format":b.type==="daterange"?"YYYY-MM-DD":"YYYY-MM",onChange:E}),null,16,["modelValue","type","size","value-format"])],4)}}}),rt=ee(Xn),Zn={class:"suffixContent"},el=e.defineComponent({name:"JcInputSwitch",__name:"index",props:{fieldList:{default:()=>[]},size:{default:"default"},width:{default:"320px"},injectionKey:{default:"jc-query-injection-key"}},emits:["fieldChange"],setup(n,{expose:t,emit:l}){const s=n,o=l,i=e.ref(""),a=e.ref(""),r=e.ref(""),c=e.ref(""),{useQueryStore:d}=re(s.injectionKey),{state:f,setQuery:g}=d(),v=e.ref(!1),w=()=>{s.fieldList.forEach(p=>{g(p.value,void 0)})},B=()=>{v.value=!0,i.value="",w(),e.nextTick(()=>{v.value=!1})},E=p=>{i.value&&(v.value=!0,w(),g(p,i.value),e.nextTick(()=>{v.value=!1})),o("fieldChange",p)},h=()=>{v.value=!0,a.value=i.value,c.value=r.value,g(r.value,i.value.trim()),e.nextTick(()=>{v.value=!1})};e.watch(()=>s.fieldList,p=>{(!K(p)&&K(r.value)||r.value&&!s.fieldList.map(F=>F.value).includes(r.value))&&(r.value=p[0].value,i.value="")},{immediate:!0,deep:!0}),e.watch(()=>f.queryForm.resetCount,()=>{B()}),e.watch(s.fieldList.map(p=>()=>f.queryForm[p.value]),p=>{if(!v.value){const F=p.findIndex(m=>!K(m));F===-1?(r.value=s.fieldList[0].value,i.value=""):(r.value=s.fieldList[F].value,i.value=p[F]||"")}},{deep:!0});const b=e.ref();return t({blur:()=>{var p;return(p=b.value)==null?void 0:p.blur()},clear:()=>{var p;return(p=b.value)==null?void 0:p.clear()},focus:()=>{var p;return(p=b.value)==null?void 0:p.focus()},select:()=>{var p;return(p=b.value)==null?void 0:p.select()},resizeTextarea:()=>{var p;return(p=b.value)==null?void 0:p.resizeTextarea()},get input(){var p;return(p=b.value)==null?void 0:p.input},get ref(){var p;return(p=b.value)==null?void 0:p.ref},get textarea(){var p;return(p=b.value)==null?void 0:p.textarea},get textareaStyle(){var p;return(p=b.value)==null?void 0:p.textareaStyle},get isComposing(){var p;return(p=b.value)==null?void 0:p.isComposing}}),(p,F)=>(e.openBlock(),e.createBlock(e.unref(A.ElInput),e.mergeProps({ref_key:"inputRef",ref:b,modelValue:i.value,"onUpdate:modelValue":F[1]||(F[1]=m=>i.value=m),modelModifiers:{trim:!0}},p.$attrs,{placeholder:"请输入内容",style:{width:p.width},size:p.size,class:"jc-input jc-input-switch"}),{prepend:e.withCtx(()=>[e.createVNode(e.unref(A.ElSelect),{modelValue:r.value,"onUpdate:modelValue":F[0]||(F[0]=m=>r.value=m),size:p.size,class:"select-field",onChange:E},{prefix:e.withCtx(()=>[e.createTextVNode(e.toDisplayString((p.fieldList.find(m=>m.value===r.value)||{}).label),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.fieldList,m=>(e.openBlock(),e.createBlock(e.unref(A.ElOption),{key:m.value,label:m.label,value:m.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","size"])]),suffix:e.withCtx(()=>[e.createElementVNode("div",Zn,[e.withDirectives(e.createVNode(e.unref(A.ElIcon),{class:"el-input__icon",onClick:B},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.Close))]),_:1},512),[[e.vShow,i.value]]),e.createVNode(e.unref(A.ElIcon),{class:"el-input__icon",onClick:h},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.Search))]),_:1})])]),_:1},16,["modelValue","style","size"]))}}),at=ee(el),tl={class:"suffixContent"},nl={class:"popover-body"},ll={class:"popover-btn"},sl={class:"popover-btn-right"},ol=e.defineComponent({name:"JcInputComplex",__name:"index",props:{fieldList:{default:()=>[]},size:{default:"default"},width:{default:"320px"},injectionKey:{default:"jc-query-injection-key"}},emits:["fieldChange"],setup(n,{expose:t,emit:l}){const s=n,o=l,i=e.ref(""),a=e.ref(""),r=e.ref(""),c=e.ref(""),d=e.ref(!1),f=e.computed(()=>r.value+"List"),g=e.computed(()=>{var u;return((u=s.fieldList.find(x=>x.value===r.value))==null?void 0:u.label)||""}),v=e.ref(""),w=e.ref(!1),{useQueryStore:B}=re(s.injectionKey),{state:E,setQuery:h,addTag:b,reduceTag:p}=B(),F={},m={};s.fieldList.forEach(u=>{F[u.value]=void 0,m[u.value+"List"]=[]});const $=u=>{d.value=!1,S(),o("fieldChange",u)},S=()=>{E.queryForm[f.value]?v.value=E.queryForm[f.value].join(`
|
|
3
|
+
`):v.value=""},_=()=>{w.value=!0,i.value="",h(r.value,void 0),I(),e.nextTick(()=>{w.value=!1})},L=()=>{for(const u in F)h(u,void 0)},O=()=>{w.value=!0,v.value="",a.value=i.value,c.value=r.value,L(),h(f.value,void 0),p({key:f.value}),h(r.value,i.value.trim()),e.nextTick(()=>{w.value=!1})},I=()=>{w.value=!0;const u=v.value.split(`
|
|
4
|
+
`).filter(x=>!K(x));if(u.length>0){const x=[...new Set(u)],T=W.filter(u,(Q,G,Y)=>W.includes(Y,Q,G+1)),U=[...new Set(T)];if(U.length>0){const Q=s.fieldList.find(Y=>Y.value===r.value),G=`搜索条件中包含重复的内容:${Q==null?void 0:Q.label}:${U.join(`
|
|
5
|
+
`)}`;A.ElMessage.warning(G)}v.value=x.join(`
|
|
6
|
+
`),L(),h(f.value,x),b({key:f.value,label:g.value,value:x})}else h(f.value,void 0),p({key:f.value});y(),e.nextTick(()=>{w.value=!1})},y=()=>{d.value=!1},k=()=>{i.value="",v.value="",a.value="",y()},V=u=>{Object.keys(u).forEach(x=>{r.value=x.replace("List",""),v.value=u[x].join(`
|
|
7
|
+
`),I()})},N=()=>{!K(i.value)&&(i.value!==a.value||r.value!==c.value)?(a.value=i.value,c.value=r.value,L(),h(f.value,void 0),p({key:f.value}),h(r.value,i.value.trim())):K(i.value)&&(a.value=i.value,h(r.value,void 0))};e.watch(()=>s.fieldList,u=>{(!K(u)&&K(r.value)||r.value&&!s.fieldList.map(x=>x.value).includes(r.value))&&(r.value=u[0].value,i.value="",v.value="")},{immediate:!0,deep:!0}),e.watch(()=>E.queryForm.resetCount,()=>{k()}),e.watch(s.fieldList.flatMap(u=>[()=>E.queryForm[u.value],()=>E.queryForm[u.value+"List"]]),u=>{if(!w.value){if(u.findIndex(U=>!K(U))===-1){k();return}let T=!1;s.fieldList.forEach(U=>{var G;const Q=U.value+"List";if(v.value=((G=E.queryForm[Q])==null?void 0:G.join(`
|
|
8
|
+
`))||"",W.isArray(E.queryForm[Q])&&!K(E.queryForm[Q])){b({key:Q,label:U.label,value:E.queryForm[Q]});return}else p({key:Q});E.queryForm[U.value]?(T=!0,r.value=U.value,i.value=E.queryForm[U.value]||""):T||(i.value="")})}},{deep:!0});const D=e.ref();return t({blur:()=>{var u;return(u=D.value)==null?void 0:u.blur()},clear:()=>{var u;return(u=D.value)==null?void 0:u.clear()},focus:()=>{var u;return(u=D.value)==null?void 0:u.focus()},select:()=>{var u;return(u=D.value)==null?void 0:u.select()},resizeTextarea:()=>{var u;return(u=D.value)==null?void 0:u.resizeTextarea()},setInputValueMult:V,setInputByOutside:N,get input(){var u;return(u=D.value)==null?void 0:u.input},get ref(){var u;return(u=D.value)==null?void 0:u.ref},get textarea(){var u;return(u=D.value)==null?void 0:u.textarea},get textareaStyle(){var u;return(u=D.value)==null?void 0:u.textareaStyle},get isComposing(){var u;return(u=D.value)==null?void 0:u.isComposing}}),(u,x)=>(e.openBlock(),e.createBlock(e.unref(A.ElInput),e.mergeProps({ref_key:"inputRef",ref:D,modelValue:i.value,"onUpdate:modelValue":x[5]||(x[5]=T=>i.value=T),modelModifiers:{trim:!0}},u.$attrs,{placeholder:"请输入内容",style:{width:u.width},class:"jc-input jc-input-complex search-input",size:u.size}),{prepend:e.withCtx(()=>[e.createVNode(e.unref(A.ElSelect),{ref:"selectRef",modelValue:r.value,"onUpdate:modelValue":x[0]||(x[0]=T=>r.value=T),size:u.size,class:"select-field",onChange:$},{prefix:e.withCtx(()=>[e.createTextVNode(e.toDisplayString((u.fieldList.find(T=>T.value===r.value)||{}).label),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.fieldList,T=>(e.openBlock(),e.createBlock(e.unref(A.ElOption),{key:T.value,label:T.label,value:T.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","size"])]),suffix:e.withCtx(()=>[e.createElementVNode("div",tl,[e.withDirectives(e.createVNode(e.unref(A.ElIcon),{class:"el-input__icon",onClick:_},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.Close))]),_:1},512),[[e.vShow,i.value]]),e.createVNode(e.unref(A.ElIcon),{class:"el-input__icon",onClick:O},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.Search))]),_:1}),e.createVNode(e.unref(A.ElPopover),{visible:d.value,"onUpdate:visible":x[4]||(x[4]=T=>d.value=T),placement:"bottom-end",width:"240","show-arrow":!1,"popper-class":"jc-input-pop",trigger:"click"},{reference:e.withCtx(()=>[e.createVNode(e.unref(A.ElIcon),{class:"el-input__icon mult-trigger-icon",title:"多项搜索",onClick:S},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.Grid))]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",nl,[e.createVNode(e.unref(A.ElInput),e.mergeProps({modelValue:v.value,"onUpdate:modelValue":x[1]||(x[1]=T=>v.value=T),type:"textarea"},u.$attrs,{size:u.size,placeholder:"一行一项",class:"popover-textarea",wrap:"off"}),null,16,["modelValue","size"]),e.createElementVNode("div",ll,[e.createVNode(e.unref(A.ElButton),{size:u.size,onClick:x[2]||(x[2]=T=>v.value=""),plain:""},{default:e.withCtx(()=>x[6]||(x[6]=[e.createTextVNode("清空")])),_:1,__:[6]},8,["size"]),e.createElementVNode("div",sl,[e.createVNode(e.unref(A.ElButton),{size:u.size,plain:"",onClick:y},{default:e.withCtx(()=>x[7]||(x[7]=[e.createTextVNode("关闭")])),_:1,__:[7]},8,["size"]),e.createVNode(e.unref(A.ElButton),{type:"primary",plain:"",size:u.size,onClick:x[3]||(x[3]=T=>I())},{default:e.withCtx(()=>x[8]||(x[8]=[e.createTextVNode("搜索")])),_:1,__:[8]},8,["size"])])])])]),_:1},8,["visible"])])]),_:1},16,["modelValue","style","size"]))}}),ut=ee(ol),il={style:{display:"flex","flex-wrap":"wrap",flex:"1","flex-basis":"calc(100% - 50px)","font-size":"12px","margin-top":"4px"}},rl=e.defineComponent({name:"JcTagQuery",__name:"index",props:{injectionKey:{default:"jc-query-injection-key"}},setup(n){const t=n,{useQueryStore:l}=re(t.injectionKey),{state:s,reduceTag:o,reduceAllTag:i}=l();return(a,r)=>(e.openBlock(),e.createElementBlock("div",il,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s).tags,(c,d)=>(e.openBlock(),e.createBlock(e.unref(A.ElTag),e.mergeProps({ref_for:!0},a.$attrs,{key:c.label,closable:"",style:[{height:"auto","max-height":"28px","white-space":"normal","text-align":"left","max-width":"1800px",overflow:"hidden","word-break":"break-word","text-overflow":"ellipsis"},{marginLeft:d>0?"4px":"0px"}],onClose:f=>e.unref(o)(c,d)}),{default:e.withCtx(()=>[e.createVNode(e.unref(A.ElTooltip),{content:c.value,placement:"bottom",effect:"light"},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(c.showStr),1)]),_:2},1032,["content"])]),_:2},1040,["style","onClose"]))),128)),e.unref(s).tags.length>1?(e.openBlock(),e.createElementBlock("span",{key:0,style:{"margin-left":"10px","margin-top":"2px",display:"block"},onClick:r[0]||(r[0]=(...c)=>e.unref(i)&&e.unref(i)(...c))},[e.createVNode(e.unref(A.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Z.Delete))]),_:1})])):e.createCommentVNode("",!0)]))}}),be=(n,t)=>{const l=n.__vccOpts||n;for(const[s,o]of t)l[s]=o;return l},al=be(rl,[["__scopeId","data-v-48ad67de"]]),ct=ee(al),ul={class:"popover-btn"},cl={class:"popover-btn-right"},dl=e.defineComponent({name:"JcMoreQueryContain",__name:"index",props:{fieldList:{default:()=>[]},customTagObj:{default:()=>({})},width:{default:400},size:{default:"default"},injectionKey:{default:"jc-query-injection-key"}},setup(n,{expose:t}){const l=e.ref(!1),s=e.ref({}),o=n,{useQueryStore:i}=re(o.injectionKey),{state:a,setQuery:r,addTag:c,reduceTag:d}=i(),f=e.ref(!1),g=()=>{l.value=!l.value,l.value&&o.fieldList.forEach(h=>{s.value[h.value]=a.queryForm[h.value]||void 0})},v=()=>{f.value=!0,s.value={},o.fieldList.forEach(h=>{r(h.value,void 0),d({key:h.value})}),l.value=!1,e.nextTick(()=>{f.value=!1})},w=(h,b)=>{var p;typeof s.value[h]>"u"||(typeof s.value[h]=="string"||typeof s.value[h]=="number"?c({key:h,label:b,value:K(o.customTagObj[h])?s.value[h]:o.customTagObj[h]}):c({key:h,label:b,value:K(o.customTagObj[h])?(p=s.value[h])==null?void 0:p.join(","):o.customTagObj[h]}))},B=()=>{f.value=!0;for(const h in s.value){r(h,K(s.value[h])?void 0:s.value[h]);const b=o.fieldList.find(p=>p.value===h);b===void 0&&A.ElMessage.warning("传入的fieldList和表单绑定的字段不匹配"),w(h,b.label)}l.value=!1,e.nextTick(()=>{f.value=!1})};e.watch(()=>a.queryForm.resetCount,()=>{v()}),e.watch(o.fieldList.map(h=>()=>a.queryForm[h.value]),()=>{f.value||o.fieldList.forEach(h=>{s.value[h.value]=a.queryForm[h.value],K(a.queryForm[h.value])?d({key:h.value}):w(h.value,h.label)})},{deep:!0});const E=e.ref();return t({hide:()=>{var h;return(h=E.value)==null?void 0:h.hide()}}),(h,b)=>(e.openBlock(),e.createBlock(e.unref(A.ElPopover),e.mergeProps({ref_key:"popoverRef",ref:E},h.$attrs,{visible:l.value,placement:"bottom",width:h.width,"show-arrow":!1,"popper-class":"moreQuery-pop",trigger:"click"}),{reference:e.withCtx(()=>[e.createVNode(e.unref(A.ElButton),{size:h.size,icon:e.unref(Z.Operation),onClick:g},null,8,["size","icon"])]),default:e.withCtx(()=>[e.renderSlot(h.$slots,"default",{scopeForm:s.value}),e.createElementVNode("div",ul,[e.createVNode(e.unref(A.ElButton),{size:h.size,onClick:v,plain:""},{default:e.withCtx(()=>b[1]||(b[1]=[e.createTextVNode("清空")])),_:1,__:[1]},8,["size"]),e.createElementVNode("div",cl,[e.createVNode(e.unref(A.ElButton),{size:h.size,onClick:b[0]||(b[0]=p=>l.value=!1),plain:""},{default:e.withCtx(()=>b[2]||(b[2]=[e.createTextVNode("关闭")])),_:1,__:[2]},8,["size"]),e.createVNode(e.unref(A.ElButton),{type:"primary",plain:"",size:h.size,onClick:B},{default:e.withCtx(()=>b[3]||(b[3]=[e.createTextVNode("搜索")])),_:1,__:[3]},8,["size"])])])]),_:3},16,["visible","width"]))}}),dt=ee(dl),fl={class:"jc-list-layout"},hl={key:1,class:"bottom-header"},pl=e.defineComponent({name:"JcListLayout",__name:"index",setup(n){return(t,l)=>(e.openBlock(),e.createElementBlock("div",fl,[t.$slots["top-body"]?(e.openBlock(),e.createBlock(e.unref(A.ElCard),{key:0,class:"top-card",shadow:"never"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"top-body")]),_:3})):e.createCommentVNode("",!0),t.$slots["bottom-header"]?(e.openBlock(),e.createElementBlock("div",hl,[e.renderSlot(t.$slots,"bottom-header")])):e.createCommentVNode("",!0),t.$slots["bottom-body"]?(e.openBlock(),e.createBlock(e.unref(A.ElCard),{key:2,class:"bottom-card",shadow:"never"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"bottom-body")]),_:3})):e.createCommentVNode("",!0)]))}}),ft=ee(pl),ml={class:"jc-import-dialog"},vl={id:"import-wrapper"},gl={class:"basic-btn"},yl={class:"import-info"},bl=e.defineComponent({name:"JcImportDialog",__name:"index",props:{btnName:{default:"导入"},title:{default:"导入"},importInfoArr:{default:()=>["表头字段不可重复","表格中存在多条相同记录时,以第一条为准","导入格式为xlsx(手动修改文件后缀无效),行数不超过5000条,文件大小不超过5M"]},uploadFileFn:{},downloadFileFn:{}},emits:["onSuccess","onError"],setup(n,{emit:t}){const l=n,s=t,o=e.ref(!1),i=e.ref(),a=e.ref(!1),r=()=>{o.value=!0,e.nextTick(()=>{i.value.clearFiles()})},c=f=>{if(!l.uploadFileFn){A.ElMessage.warning("导入函数未定义");return}const g=A.ElLoading.service({lock:!0,text:"导入中,请耐心等待ing.....",spinner:"el-icon-loading",background:"var(--el-mask-color, rgba(0, 0, 0, 0.7))"});i.value.clearFiles();const v=new FormData;v.append("file",f.file),l.uploadFileFn(v).then(w=>{g.close(),w.code===200?(A.ElMessage.success("导入成功"),o.value=!1,s("onSuccess")):(A.ElMessage.warning(w.message||"导入失败"),s("onError"))})},d=()=>{if(!l.downloadFileFn){A.ElMessage.warning("下载函数未定义");return}a.value=!0,l.downloadFileFn().then(f=>{a.value=!1,f.code===200?A.ElMessage.success("下载导入模版成功"):A.ElMessage.warning(f.message||"下载导入模版失败")})};return(f,g)=>{const v=e.resolveComponent("el-button"),w=e.resolveComponent("el-upload"),B=e.resolveComponent("el-icon"),E=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",ml,[e.createVNode(v,e.mergeProps(f.$attrs,{onClick:r}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.btnName),1)]),_:1},16),e.createVNode(E,e.mergeProps({modelValue:o.value,"onUpdate:modelValue":g[0]||(g[0]=h=>o.value=h),title:f.title,class:"is-no-footer",width:"800px"},f.$attrs,{top:"10vh",style:{height:"calc(100vh - 200px)"}}),{default:e.withCtx(()=>[e.createElementVNode("div",vl,[e.createElementVNode("div",gl,[e.createElementVNode("div",null,[e.createVNode(w,{ref_key:"importUploadRef",ref:i,"http-request":c,action:"#","show-file-list":!1,accept:".xlsx,.xls,.txt",limit:1,style:{margin:"0 10px 0px 0px"}},{default:e.withCtx(()=>[e.createVNode(v,{type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.title),1)]),_:1})]),_:1},512)]),e.createVNode(v,{type:"primary",text:"",loading:a.value,onClick:d},{default:e.withCtx(()=>g[1]||(g[1]=[e.createTextVNode("下载导入模板")])),_:1,__:[1]},8,["loading"])]),e.createElementVNode("div",yl,[e.createElementVNode("div",null,[e.createVNode(B,{color:"var(--el-color-primary)",size:18,class:"icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.InfoFilled))]),_:1})]),e.createElementVNode("ol",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.importInfoArr,(h,b)=>(e.openBlock(),e.createElementBlock("li",{key:b},[e.createElementVNode("span",null,e.toDisplayString(h),1)]))),128))])])])]),_:1},16,["modelValue","title"])])}}}),Cl=be(bl,[["__scopeId","data-v-176c145c"]]),ht=ee(Cl),kl={class:"jc-import-button"},wl=e.defineComponent({name:"JcImportButton",__name:"index",props:{btnName:{default:"导入"},uploadFileFn:{}},emits:["onSuccess","onError"],setup(n,{emit:t}){const l=n,s=t,o=e.ref(),i=a=>{if(!l.uploadFileFn){A.ElMessage.warning("导入函数未定义");return}const r=A.ElLoading.service({lock:!0,text:"导入中,请耐心等待ing.....",spinner:"el-icon-loading",background:"var(--el-mask-color, rgba(0, 0, 0, 0.7))"});o.value.clearFiles();const c=new FormData;c.append("file",a.file),l.uploadFileFn(c).then(d=>{r.close(),d.code===200?(A.ElMessage.success("导入成功"),s("onSuccess")):(A.ElMessage.warning(d.message||"导入失败"),s("onError"))})};return(a,r)=>{const c=e.resolveComponent("el-button"),d=e.resolveComponent("el-upload");return e.openBlock(),e.createElementBlock("div",kl,[e.createVNode(d,e.mergeProps({ref_key:"importUploadRef",ref:o,"http-request":i,action:"#","show-file-list":!1,accept:".xlsx,.xls,.txt",limit:1},a.$attrs),{default:e.withCtx(()=>[e.createVNode(c,e.normalizeProps(e.guardReactiveProps(a.$attrs)),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.btnName),1)]),_:1},16)]),_:1},16)])}}}),pt=ee(wl),_l="VXE_TABLE_CUSTOM_COLUMN_",ze=1,El=["checkbox","seq","radio","expand"],De=(n,t)=>`${t}${n}`,ge=(n,t)=>{try{const l=De(n,t),s=localStorage.getItem(l);if(!s)return null;const o=JSON.parse(s);return o.version!==ze?(console.warn(`[ToolbarColumnConfigV2] 存储版本不匹配 (当前: ${o.version}, 期望: ${ze}),将使用默认配置`),null):o}catch(l){return console.error("[ToolbarColumnConfigV2] 读取列配置存储失败:",l),null}},Ie=(n,t,l)=>{try{const s=De(n,t),o={version:ze,timestamp:Date.now(),columns:l};localStorage.setItem(s,JSON.stringify(o))}catch(s){console.error("[ToolbarColumnConfigV2] 保存列配置存储失败:",s)}},xl=(n,t)=>{try{const l=De(n,t);localStorage.removeItem(l)}catch(l){console.error("[ToolbarColumnConfigV2] 删除列配置存储失败:",l)}},Vl=(n,t,l,s,o)=>{const i=ge(n,t);if(i){const a=i.columns.find(r=>r.field===l);a?a.width=s:i.columns.push({field:l,visible:!0,width:s,sortNumber:i.columns.length}),Ie(n,t,i.columns)}else if(o){const a=o.map(r=>r.field===l?{...r,width:s}:r);Ie(n,t,a)}},Sl=(n,t)=>{const l=ge(n,t);return l!==null&&l.columns.length>0};function Nl(n){const{table:t,lockFieldList:l,maxFixedCount:s,storagePrefix:o,columnGroupsConfig:i,defaultVisibleFields:a}=n,r=e.ref([]),c=e.ref([]),d=e.ref([]),f=e.ref([]),g=e.computed(()=>d.value.map(C=>r.value.find(z=>z.field===C)).filter(C=>C!==void 0)),v=e.computed(()=>r.value.filter(C=>C.visible).sort((C,z)=>C.sortNumber-z.sortNumber)),w=e.computed(()=>v.value.length),B=e.computed(()=>v.value.filter(C=>C.fixed==="left").length),E=e.computed(()=>v.value.filter(C=>C.fixed==="right").length),h=e.computed(()=>B.value+E.value),b=e.computed(()=>r.value.length>0&&r.value.every(C=>C.visible)),p=e.computed(()=>{const C=r.value.filter(z=>z.visible).length;return C>0&&C<r.value.length}),F=C=>C.fixed==="left"?!0:h.value<s.value,m=C=>C.fixed==="right"?!0:h.value<s.value,$=C=>!!(C.type&&El.includes(C.type)),S=()=>{const C=i.value||[],z=r.value.map(J=>J.field),j=new Set,P=C.map((J,le)=>{const de=J.fields.filter(ae=>z.includes(ae));return de.forEach(ae=>j.add(ae)),{id:`group_${le}`,title:J.title,fields:de}}).filter(J=>J.fields.length>0),R=z.filter(J=>!j.has(J));if(R.length>0||P.length===0){const J={id:"__default__",title:"基础信息",fields:R.length>0?R:z,isDefault:!0};P.unshift(J)}c.value=P},_=()=>{const C=t.value;if(!C||f.value.length>0)return;const z=C.getTableColumn(),j=z.fullColumn||z.tableColumn||C.getColumns();f.value=W.cloneDeep(j);const P=j.filter(R=>!$(R)&&R.field);d.value=P.map(R=>R.field)},L=()=>{const C=t.value;if(!C||!C.id)return;const z=C.id,j=C.getTableColumn(),P=j.fullColumn||j.tableColumn||C.getColumns(),R=ge(z,o.value),J=new Map((R==null?void 0:R.columns.map(q=>[q.field,q]))||[]),le=P.filter(q=>!$(q)&&q.field),de=a.value.length>0,ae=le.map((q,H)=>{const ue=q.field,te=J.get(ue),yt=l.value.includes(ue),bt=te?te.visible:de?a.value.includes(ue):q.visible!==!1;return{field:ue,title:q.title||ue||"未命名",visible:bt,fixed:(te==null?void 0:te.fixed)||q.fixed||void 0,width:(te==null?void 0:te.width)||q.renderWidth||void 0,sortNumber:(te==null?void 0:te.sortNumber)??H,visibleLocked:yt,originalIndex:H}});r.value=ae,S(),r.value.forEach(q=>{const H=c.value.find(ue=>ue.fields.includes(q.field));q.groupId=H==null?void 0:H.id})},O=()=>r.value.map(C=>({field:C.field,visible:C.visible,fixed:C.fixed,width:C.width,sortNumber:C.sortNumber})),I=()=>{const C=f.value;return C.length?C.filter(j=>!$(j)&&j.field).map((j,P)=>{const R=j.field;return{field:R,visible:a.value.includes(R),fixed:j.fixed||void 0,width:j.width||void 0,sortNumber:P}}):[]},y=async C=>{const z=t.value;if(!z)return;const j=z.getTableColumn(),P=j.fullColumn||j.tableColumn||z.getColumns(),R=P.filter(q=>$(q)),J=P.filter(q=>!$(q)),le=new Map(C.map(q=>[q.field,q])),de=J.map(q=>{const H=le.get(q.field);return H&&(q.visible=H.visible,q.fixed=H.fixed||"",H.width&&(q.width=H.width)),{column:q,sortNumber:(H==null?void 0:H.sortNumber)??9999}}).sort((q,H)=>q.sortNumber-H.sortNumber).map(q=>q.column),ae=[...R,...de];await z.loadColumn(ae)};return{allColumns:r,columnGroups:c,originalOrder:d,filteredColumns:g,selectedColumns:v,selectedCount:w,leftFixedCount:B,rightFixedCount:E,totalFixedCount:h,selectAll:b,isIndeterminate:p,canFixLeft:F,canFixRight:m,initColumns:L,buildCurrentConfig:O,applyConfigToTable:y,loadStoredConfig:async()=>{const C=t.value;if(!C||!C.id)return;_();const z=ge(C.id,o.value);if(z&&z.columns.length)await y(z.columns);else if(a.value.length>0){const j=I();await y(j)}},saveAndApply:async()=>{const C=t.value;if(!C||!C.id)throw new Error("表格实例不存在或未设置 ID");const z=O();await y(z),Ie(C.id,o.value,z)},resetToDefault:async()=>{const C=t.value;if(!(!C||!C.id)){if(xl(C.id,o.value),f.value.length?await C.reloadColumn(W.cloneDeep(f.value)):await C.refreshColumn(),a.value.length>0){const z=I();await y(z)}L()}},onResizableChange:C=>{const z=t.value;if(!z||!z.id)return;const{column:j}=C,P=j.field,R=j.renderWidth;if(!P||!R)return;const J=r.value.find(le=>le.field===P);J&&(J.width=R),Vl(z.id,o.value,P,R,O())},checkHasStoredConfig:()=>{const C=t.value;return!C||!C.id?!1:Sl(C.id,o.value)},updateSelectedOrder:C=>{C.forEach((z,j)=>{const P=r.value.find(R=>R.field===z.field);P&&(P.sortNumber=j)})},onSelectAllChange:C=>{r.value.forEach(z=>{z.visibleLocked||(z.visible=C)})},onColumnVisibleChange:C=>{!C.visible&&C.fixed&&(C.fixed=void 0)},onDragEnd:()=>{v.value.forEach((C,z)=>{C.sortNumber=z})},moveToTop:(C,z)=>{var R;if(z===0)return;const P=((R=r.value.filter(J=>J.visible).sort((J,le)=>J.sortNumber-le.sortNumber)[0])==null?void 0:R.sortNumber)??0;C.sortNumber=P-1},removeFromSelected:C=>C.visibleLocked?!1:(C.visible=!1,C.fixed&&(C.fixed=void 0),!0),toggleFixed:(C,z)=>C.fixed===z?(C.fixed=void 0,!0):z==="left"&&!F(C)||z==="right"&&!m(C)?!1:(C.fixed=z,!0),onGroupSelectChange:(C,z)=>{const j=c.value.find(P=>P.id===C);j&&r.value.forEach(P=>{j.fields.includes(P.field)&&!P.visibleLocked&&(P.visible=z)})},getGroupCheckState:C=>{const z=c.value.find(R=>R.id===C);if(!z)return{checked:!1,indeterminate:!1};const j=r.value.filter(R=>z.fields.includes(R.field)&&!R.visibleLocked);if(j.length===0)return{checked:!0,indeterminate:!1};const P=j.filter(R=>R.visible).length;return{checked:P===j.length,indeterminate:P>0&&P<j.length}}}}const Al={class:"toolbar-column-config"},Bl={class:"column-config-body"},Fl={class:"column-list-left"},$l={class:"left-header"},zl={class:"column-grid-wrapper"},Il={class:"group-header"},Tl={class:"group-title"},Ml={class:"group-count"},Dl={class:"column-grid"},Ll=["title"],Ol={key:0,class:"vxe-icon-lock lock-icon"},jl={class:"column-list-right"},Rl={class:"right-header"},Pl={class:"selected-list-wrapper"},ql={class:"selected-item"},Kl={class:"index"},Ul=["title"],Ql={class:"item-actions"},Jl=["onClick"],Hl=["onClick"],Wl=["onClick"],Gl=["onClick"],Yl={class:"drawer-footer"},Xl={class:"footer-right"},Zl=e.defineComponent({name:"JcColumnConfig",__name:"index",props:{table:{default:null},itemWidth:{default:110},drawerWidth:{default:"720px"},maxFixedCount:{default:4},lockFieldList:{default:()=>[]},storagePrefix:{default:_l},columnGroups:{default:()=>[]},defaultVisibleFields:{default:()=>[]}},emits:["change","saved","reset","width-change"],setup(n,{expose:t,emit:l}){const s=n,o=l,i=Nl({table:e.toRef(s,"table"),lockFieldList:e.toRef(s,"lockFieldList"),maxFixedCount:e.toRef(s,"maxFixedCount"),storagePrefix:e.toRef(s,"storagePrefix"),columnGroupsConfig:e.toRef(s,"columnGroups"),defaultVisibleFields:e.toRef(s,"defaultVisibleFields")}),a=e.ref(!1),r=e.ref(""),c=e.computed(()=>{const S=i.filteredColumns.value;if(!r.value)return S;const _=r.value.toLowerCase();return S.filter(L=>(L.title||L.field||"").toLowerCase().includes(_))}),d=e.computed(()=>i.columnGroups.value.map(S=>({...S,columns:c.value.filter(_=>_.groupId===S.id),checkState:i.getGroupCheckState(S.id)})).filter(S=>S.columns.length>0)),f=(S,_)=>{i.onGroupSelectChange(S,_)};e.watch(()=>s.table,async S=>{S&&S.id&&(await e.nextTick(),await F())},{immediate:!0});const g=()=>{if(!s.table){A.ElMessage.warning("表格实例未就绪");return}i.initColumns(),a.value=!0},v=()=>{a.value=!1},w=()=>{a.value=!1},B=S=>{i.onSelectAllChange(S)},E=(S,_)=>{i.toggleFixed(S,_)||A.ElMessage.warning(`最多只能固定 ${s.maxFixedCount} 列`)},h=S=>{i.removeFromSelected(S)||A.ElMessage.warning("该列不能取消选中")},b=async()=>{try{await i.saveAndApply(),o("saved",i.allColumns.value),A.ElMessage.success("列配置已保存并应用"),a.value=!1}catch(S){console.error("保存列配置失败:",S),A.ElMessage.error("保存列配置失败")}},p=async()=>{try{await A.ElMessageBox.confirm("确定要恢复默认配置吗?(包括可见、固定、排序、列宽)。","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}),await i.resetToDefault(),o("reset"),A.ElMessage.success("已恢复默认配置")}catch{}},F=async()=>{await i.loadStoredConfig()};return t({openDrawer:g,closeDrawer:v,loadStoredConfig:F,resetToDefault:p,saveAndApply:b,onResizableChange:S=>{i.onResizableChange(S);const _=S.column.field,L=S.column.renderWidth;_&&L&&o("width-change",{field:_,width:L})},hasStoredConfig:()=>i.checkHasStoredConfig()}),(S,_)=>{const L=e.resolveComponent("el-icon"),O=e.resolveComponent("el-button"),I=e.resolveComponent("el-input"),y=e.resolveComponent("el-checkbox"),k=e.resolveComponent("el-tooltip"),V=e.resolveComponent("el-drawer");return e.openBlock(),e.createElementBlock("div",Al,[e.createVNode(O,{link:"",class:"config-trigger-btn",onClick:g},{default:e.withCtx(()=>[e.createVNode(L,{size:16},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.Setting))]),_:1})]),_:1}),e.createVNode(V,{modelValue:a.value,"onUpdate:modelValue":_[1]||(_[1]=N=>a.value=N),title:"列配置",direction:"rtl",size:S.drawerWidth,"close-on-click-modal":!1,class:"column-config-drawer"},{header:e.withCtx(()=>_[2]||(_[2]=[e.createElementVNode("div",{class:"drawer-header"},[e.createElementVNode("span",{class:"drawer-title"},"列配置")],-1)])),footer:e.withCtx(()=>[e.createElementVNode("div",Yl,[e.createVNode(O,{onClick:p},{default:e.withCtx(()=>_[9]||(_[9]=[e.createTextVNode("恢复默认")])),_:1,__:[9]}),e.createElementVNode("div",Xl,[e.createVNode(O,{onClick:w},{default:e.withCtx(()=>_[10]||(_[10]=[e.createTextVNode("取消")])),_:1,__:[10]}),e.createVNode(O,{type:"primary",onClick:b},{default:e.withCtx(()=>_[11]||(_[11]=[e.createTextVNode("保存并应用")])),_:1,__:[11]})])])]),default:e.withCtx(()=>[e.createElementVNode("div",Bl,[e.createElementVNode("div",Fl,[e.createElementVNode("div",$l,[e.createVNode(I,{modelValue:r.value,"onUpdate:modelValue":_[0]||(_[0]=N=>r.value=N),placeholder:"搜索",clearable:"","prefix-icon":e.unref(Z.Search),size:"small"},null,8,["modelValue","prefix-icon"]),e.createVNode(y,{"model-value":e.unref(i).selectAll.value,indeterminate:e.unref(i).isIndeterminate.value,class:"select-all-checkbox",onChange:B},{default:e.withCtx(()=>_[3]||(_[3]=[e.createTextVNode(" 全选 ")])),_:1,__:[3]},8,["model-value","indeterminate"])]),e.createElementVNode("div",zl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,N=>(e.openBlock(),e.createElementBlock("div",{key:N.id,class:"column-group"},[e.createElementVNode("div",Il,[e.createVNode(y,{"model-value":N.checkState.checked,indeterminate:N.checkState.indeterminate,onChange:D=>f(N.id,D),size:"small"},{default:e.withCtx(()=>[e.createElementVNode("span",Tl,e.toDisplayString(N.title),1),e.createElementVNode("span",Ml,"("+e.toDisplayString(N.columns.length)+")",1)]),_:2},1032,["model-value","indeterminate","onChange"])]),e.createElementVNode("div",Dl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.columns,D=>(e.openBlock(),e.createElementBlock("div",{key:D.field,class:"column-checkbox-item",style:e.normalizeStyle({width:S.itemWidth+"px"})},[e.createVNode(y,{modelValue:D.visible,"onUpdate:modelValue":u=>D.visible=u,disabled:D.visibleLocked,onChange:u=>e.unref(i).onColumnVisibleChange(D),size:"small"},{default:e.withCtx(()=>[e.createElementVNode("span",{class:"column-title",title:D.title},[e.createTextVNode(e.toDisplayString(D.title||D.field)+" ",1),D.visibleLocked?(e.openBlock(),e.createElementBlock("i",Ol)):e.createCommentVNode("",!0)],8,Ll)]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onChange"])],4))),128))])]))),128))])]),e.createElementVNode("div",jl,[e.createElementVNode("div",Rl,[e.createElementVNode("span",null,"已选("+e.toDisplayString(e.unref(i).selectedCount.value)+")",1),_[4]||(_[4]=e.createElementVNode("span",{class:"drag-hint"},"编号可拖拽排序",-1))]),e.createElementVNode("div",Pl,[e.createVNode(e.unref(kt),{"item-key":"field",animation:200,"ghost-class":"ghost-item","model-value":e.unref(i).selectedColumns.value,"onUpdate:modelValue":e.unref(i).updateSelectedOrder,onEnd:e.unref(i).onDragEnd},{item:e.withCtx(({element:N,index:D})=>[e.createElementVNode("div",ql,[e.createElementVNode("span",Kl,e.toDisplayString(D+1),1),e.createElementVNode("span",{class:"title",title:N.title},e.toDisplayString(N.title||N.field),9,Ul),e.createElementVNode("div",Ql,[e.createVNode(k,{content:"取消选中",placement:"top","show-after":500,disabled:N.visibleLocked},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(["action-btn remove-btn",{"is-hidden":N.visibleLocked}]),onClick:u=>!N.visibleLocked&&h(N)},_[5]||(_[5]=[e.createElementVNode("i",{class:"vxe-icon-close"},null,-1)]),10,Jl)]),_:2},1032,["disabled"]),e.createVNode(k,{content:"置顶",placement:"top","show-after":500,disabled:D===0},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(["action-btn",{"is-hidden":D===0}]),onClick:u=>D!==0&&e.unref(i).moveToTop(N,D)},_[6]||(_[6]=[e.createElementVNode("i",{class:"vxe-icon-caret-up"},null,-1)]),10,Hl)]),_:2},1032,["disabled"]),e.createVNode(k,{content:"固定到左侧",placement:"top","show-after":500},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(["fixed-btn",{"is-active":N.fixed==="left","is-disabled":!e.unref(i).canFixLeft(N)}]),onClick:u=>E(N,"left")},_[7]||(_[7]=[e.createElementVNode("i",{class:"vxe-icon-fixed-left"},null,-1)]),10,Wl)]),_:2},1024),e.createVNode(k,{content:"固定到右侧",placement:"top","show-after":500},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(["fixed-btn",{"is-active":N.fixed==="right","is-disabled":!e.unref(i).canFixRight(N)}]),onClick:u=>E(N,"right")},_[8]||(_[8]=[e.createElementVNode("i",{class:"vxe-icon-fixed-right"},null,-1)]),10,Gl)]),_:2},1024)])])]),_:1},8,["model-value","onUpdate:modelValue","onEnd"])])])])]),_:1},8,["modelValue","size"])])}}}),es=be(Zl,[["__scopeId","data-v-1fadcb1f"]]),mt=ee(es),ts={key:0,class:"jc-input-tag__tabs"},ns=["onClick"],ls={class:"jc-input-tag__tab-label"},ss={class:"jc-input-tag__tab-count"},os={class:"jc-input-tag__header"},is={class:"jc-input-tag__count"},rs={class:"jc-input-tag__tags"},as={class:"jc-input-tag__input"},us={class:"jc-input-tag__bulk-content"},cs={class:"jc-input-tag__bulk-footer"},ds=e.defineComponent({name:"JcInputTag",__name:"index",props:{modelValue:{default:()=>({})},fields:{default:()=>[]},maxTags:{default:100},placeholder:{default:"请输入内容,回车添加"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},bulkAdd:{type:Boolean,default:!0},size:{default:"small"}},emits:["update:modelValue","change","add","remove","exceed","clear","tab-change"],setup(n,{expose:t,emit:l}){var I;const s=n,o=l,i=e.ref(((I=s.fields[0])==null?void 0:I.key)||""),a=e.ref({}),r=e.ref(!1),c=e.ref(""),d=e.ref(!1),f=e.ref(),g=e.computed(()=>s.modelValue[i.value]||[]),v=e.computed(()=>Object.fromEntries(s.fields.map(y=>[y.key,(s.modelValue[y.key]||[]).length]))),w=e.computed(()=>s.fields.length<=1),B=e.computed(()=>{const y=s.fields.find(k=>k.key===i.value);return(y==null?void 0:y.maxTags)??s.maxTags}),E=e.computed(()=>g.value.length>=B.value),h=e.ref("");e.watch(i,y=>{h.value=a.value[y]||""}),e.watch(h,y=>{i.value&&(a.value[i.value]=y)});const b=e.computed(()=>{if(E.value)return`已达上限 ${B.value} 个`;const y=s.fields.find(k=>k.key===i.value);return(y==null?void 0:y.placeholder)??s.placeholder});e.watch(()=>s.fields,y=>{y.length>0&&!y.some(k=>k.key===i.value)&&(i.value=y[0].key)},{immediate:!0});function p(y){const k=s.fields.find(V=>V.key===y);return(k==null?void 0:k.maxTags)??s.maxTags}function F(y,k){const V=i.value;if(!V)return;const N=[...s.modelValue[V]||[]],D=p(V),u=D-N.length,x=new Set(N),T=[];for(const G of y){const Y=G.trim();Y&&!x.has(Y)&&(x.add(Y),T.push(Y))}const U=T.slice(0,u),Q=T.slice(u);if(U.length>0){const G={...s.modelValue,[V]:[...N,...U]};o("update:modelValue",G),U.forEach(Y=>o("add",{key:V,tag:Y,source:k})),o("change",{key:V,tags:G[V]})}Q.length>0&&(o("exceed",{key:V,max:D,attempted:Q}),A.ElMessage.warning(`已达上限,${Q.length} 个标签未添加`))}function m(y){const k=i.value,V=s.modelValue[k]||[],N={...s.modelValue,[k]:V.filter(D=>D!==y)};o("update:modelValue",N),o("remove",{key:k,tag:y}),o("change",{key:k,tags:N[k]})}function $(){const y=i.value,k={...s.modelValue,[y]:[]};o("update:modelValue",k),o("clear",{key:y}),o("change",{key:y,tags:[]})}function S(y){const k=y;if(k.isComposing)return;k.preventDefault();const V=h.value.trim();V&&(F([V],"enter"),h.value="")}function _(y){var V;const k=((V=y.clipboardData)==null?void 0:V.getData("text"))||"";if(k.includes(`
|
|
9
|
+
`)){y.preventDefault();const N=k.split(/\r?\n/);F(N,"paste")}}function L(){const y=c.value.split(/\r?\n/);F(y,"bulk"),c.value="",r.value=!1}function O(y){if(y!==i.value){const k=i.value;i.value=y,o("tab-change",{from:k,to:y})}}return t({focus:()=>{var y;return(y=f.value)==null?void 0:y.focus()},blur:()=>{var y;return(y=f.value)==null?void 0:y.blur()},clear:$,addTags:F,removeTag:m,get activeKey(){return i.value},setActiveKey:y=>{s.fields.some(k=>k.key===y)&&(i.value=y)}}),(y,k)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["jc-input-tag",{"is-disabled":y.disabled,"is-focused":d.value}])},[w.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ts,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.fields,V=>(e.openBlock(),e.createElementBlock("div",{key:V.key,class:e.normalizeClass(["jc-input-tag__tab",{"is-active":i.value===V.key}]),onClick:N=>O(V.key)},[e.createElementVNode("span",ls,e.toDisplayString(V.label),1),e.createElementVNode("span",ss,e.toDisplayString(v.value[V.key]),1)],10,ns))),128))])),e.createElementVNode("div",os,[e.createElementVNode("span",is," 已填 "+e.toDisplayString(g.value.length)+"/"+e.toDisplayString(B.value)+" 个 ",1),y.clearable&&g.value.length>0&&!y.disabled?(e.openBlock(),e.createBlock(e.unref(A.ElButton),{key:0,type:"primary",link:"",size:y.size,onClick:$},{default:e.withCtx(()=>k[6]||(k[6]=[e.createTextVNode(" 清空 ")])),_:1,__:[6]},8,["size"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",rs,[g.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(g.value,(V,N)=>e.renderSlot(y.$slots,"tag",{key:`${V}-${N}`,tag:V,index:N,fieldKey:i.value,remove:()=>m(V)},()=>[e.createVNode(e.unref(A.ElTag),{closable:!y.disabled,size:y.size,onClose:D=>m(V)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V),1)]),_:2},1032,["closable","size","onClose"])],!0)),128)):e.renderSlot(y.$slots,"empty",{key:1,fieldKey:i.value},()=>[k[7]||(k[7]=e.createElementVNode("span",{class:"jc-input-tag__empty"},"暂无标签",-1))],!0)]),e.createElementVNode("div",as,[e.createVNode(e.unref(A.ElInput),{ref_key:"inputRef",ref:f,modelValue:h.value,"onUpdate:modelValue":k[0]||(k[0]=V=>h.value=V),placeholder:b.value,disabled:y.disabled||E.value,size:y.size,onKeydown:e.withKeys(S,["enter"]),onPaste:_,onFocus:k[1]||(k[1]=V=>d.value=!0),onBlur:k[2]||(k[2]=V=>d.value=!1)},null,8,["modelValue","placeholder","disabled","size"]),y.bulkAdd?(e.openBlock(),e.createBlock(e.unref(A.ElPopover),{key:0,visible:r.value,"onUpdate:visible":k[5]||(k[5]=V=>r.value=V),placement:"bottom-end",width:300,trigger:"click",disabled:y.disabled},{reference:e.withCtx(()=>[e.createVNode(e.unref(A.ElButton),{icon:e.unref(Z.Grid),size:y.size,disabled:y.disabled||E.value,class:"jc-input-tag__bulk-btn"},null,8,["icon","size","disabled"])]),default:e.withCtx(()=>[e.createElementVNode("div",us,[k[10]||(k[10]=e.createElementVNode("div",{class:"jc-input-tag__bulk-title"},"批量添加(一行一个)",-1)),e.createVNode(e.unref(A.ElInput),{modelValue:c.value,"onUpdate:modelValue":k[3]||(k[3]=V=>c.value=V),type:"textarea",rows:6,placeholder:"请输入内容,每行一个"},null,8,["modelValue"]),e.createElementVNode("div",cs,[e.createVNode(e.unref(A.ElButton),{size:"small",onClick:k[4]||(k[4]=V=>r.value=!1)},{default:e.withCtx(()=>k[8]||(k[8]=[e.createTextVNode("取消")])),_:1,__:[8]}),e.createVNode(e.unref(A.ElButton),{type:"primary",size:"small",onClick:L},{default:e.withCtx(()=>k[9]||(k[9]=[e.createTextVNode(" 确定 ")])),_:1,__:[9]})])])]),_:1},8,["visible","disabled"])):e.createCommentVNode("",!0)])],2))}}),fs=be(ds,[["__scopeId","data-v-06d85556"]]),vt=ee(fs),hs=Object.freeze(Object.defineProperty({__proto__:null,JcCascader:it,JcColumnConfig:mt,JcDatePicker:rt,JcImportButton:pt,JcImportDialog:ht,JcInputComplex:ut,JcInputSwitch:at,JcInputTag:vt,JcListLayout:ft,JcMoreQueryContain:dt,JcSelectQuery:ot,JcTagQuery:ct},Symbol.toStringTag,{value:"Module"})),ps=(n={},t="jc-query-injection-key")=>{n.resetCount=0;const l=W.cloneDeep(n),s=e.reactive({queryForm:l,tags:[]}),{useProvideQueryStore:o}=re(t),{state:i,setQuery:a,addTag:r,reduceTag:c,reduceAllTag:d,clearQuery:f}=o(s),g=()=>{i.queryForm.resetCount++,f(n)};return{queryForm:i.queryForm,setQuery:a,addTag:r,reduceTag:c,reduceAllTag:d,clearQuery:g}},ms={install:n=>{for(const t of Object.values(hs))n.use(t)}};exports.JcCascader=it;exports.JcColumnConfig=mt;exports.JcDatePicker=rt;exports.JcImportButton=pt;exports.JcImportDialog=ht;exports.JcInputComplex=ut;exports.JcInputSwitch=at;exports.JcInputTag=vt;exports.JcListLayout=ft;exports.JcMoreQueryContain=dt;exports.JcSelectQuery=ot;exports.JcTagQuery=ct;exports.default=ms;exports.reactiveQuery=ps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/components.d.ts","../src/index.ts","../src/shims-vue.d.ts","../src/vite-env.d.ts","../src/components/index.ts","../src/components/jccascader/index.ts","../src/components/jccolumnconfig/constants.ts","../src/components/jccolumnconfig/index.ts","../src/components/jccolumnconfig/storage.ts","../src/components/jccolumnconfig/types.ts","../src/components/jccolumnconfig/usecolumnconfig.ts","../src/components/jcdatepicker/index.ts","../src/components/jcimportbutton/index.ts","../src/components/jcimportdialog/index.ts","../src/components/jcinputcomplex/index.ts","../src/components/jcinputswitch/index.ts","../src/components/jclistlayout/index.ts","../src/components/jcmorequerycontain/index.ts","../src/components/jcselectquery/index.ts","../src/components/jctagquery/index.ts","../src/hooks/usequery.ts","../src/hooks/usequerystore.ts","../src/types/scss.d.ts","../src/utils/index.ts","../src/utils/install.ts","../src/components/jccascader/index.vue","../src/components/jccolumnconfig/index.vue","../src/components/jcdatepicker/index.vue","../src/components/jcimportbutton/index.vue","../src/components/jcimportdialog/index.vue","../src/components/jcinputcomplex/index.vue","../src/components/jcinputswitch/index.vue","../src/components/jclistlayout/index.vue","../src/components/jcmorequerycontain/index.vue","../src/components/jcselectquery/index.vue","../src/components/jctagquery/index.vue"],"version":"5.8.3"}
|
|
1
|
+
{"root":["../src/components.d.ts","../src/index.ts","../src/shims-vue.d.ts","../src/vite-env.d.ts","../src/components/index.ts","../src/components/jccascader/index.ts","../src/components/jccolumnconfig/constants.ts","../src/components/jccolumnconfig/index.ts","../src/components/jccolumnconfig/storage.ts","../src/components/jccolumnconfig/types.ts","../src/components/jccolumnconfig/usecolumnconfig.ts","../src/components/jcdatepicker/index.ts","../src/components/jcimportbutton/index.ts","../src/components/jcimportdialog/index.ts","../src/components/jcinputcomplex/index.ts","../src/components/jcinputswitch/index.ts","../src/components/jcinputtag/index.ts","../src/components/jclistlayout/index.ts","../src/components/jcmorequerycontain/index.ts","../src/components/jcselectquery/index.ts","../src/components/jctagquery/index.ts","../src/hooks/usequery.ts","../src/hooks/usequerystore.ts","../src/types/scss.d.ts","../src/utils/index.ts","../src/utils/install.ts","../src/components/jccascader/index.vue","../src/components/jccolumnconfig/index.vue","../src/components/jcdatepicker/index.vue","../src/components/jcimportbutton/index.vue","../src/components/jcimportdialog/index.vue","../src/components/jcinputcomplex/index.vue","../src/components/jcinputswitch/index.vue","../src/components/jcinputtag/index.vue","../src/components/jclistlayout/index.vue","../src/components/jcmorequerycontain/index.vue","../src/components/jcselectquery/index.vue","../src/components/jctagquery/index.vue"],"version":"5.8.3"}
|