import{k as U,m as ae,ar as Ce,a4 as Q,a6 as Te,as as Ae,aw as Me,ax as $e,A as ce,i as p,c as $,b as k,g as ze,t as ee,F as _e,av as de,S as Y,N as te,D as ne,d as V,e as ke}from"./vendor-5507c805.js";import{a8 as we,a9 as Re,aa as fe,u as Pe,ab as Ne,B as ve}from"./index-bd53d7c8.js";import{f as Ue}from"./global-9f47a568.js";const Ve=()=>{const[i,r]=U([]),[e,t]=U([]),n=async()=>{const[{rules:s},{providers:l}]=await Promise.all([we(),Re()]);r(Object.values(s)),t(Object.values(l))};return{rules:i,ruleProviders:e,updateRules:n,updateAllRuleProvider:async()=>{await Promise.all(e().map(s=>fe(s.name))),await n()},updateRuleProviderByName:async s=>{await fe(s),await n()}}};/**
 * virtual-core
 *
 * Copyright (c) TanStack
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function X(){return X=Object.assign?Object.assign.bind():function(i){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t])}return i},X.apply(this,arguments)}/**
 * virtual-core
 *
 * Copyright (c) TanStack
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function N(i,r,e){var t,n=(t=e.initialDeps)!=null?t:[],a;return function(){var o;e.key&&e.debug!=null&&e.debug()&&(o=Date.now());var s=i(),l=s.length!==n.length||s.some(function(m,c){return n[c]!==m});if(!l)return a;n=s;var u;if(e.key&&e.debug!=null&&e.debug()&&(u=Date.now()),a=r.apply(void 0,s),e.key&&e.debug!=null&&e.debug()){var f=Math.round((Date.now()-o)*100)/100,d=Math.round((Date.now()-u)*100)/100,h=d/16,v=function(c,x){for(c=String(c);c.length<x;)c=" "+c;return c};console.info("%c⏱ "+v(d,5)+" /"+v(f,5)+" ms",`
            font-size: .6rem;
            font-weight: bold;
            color: hsl(`+Math.max(0,Math.min(120-120*h,120))+"deg 100% 31%);",e==null?void 0:e.key)}return e==null||e.onChange==null||e.onChange(a),a}}function re(i,r){if(i===void 0)throw new Error("Unexpected undefined"+(r?": "+r:""));return i}var De=function(r,e){return Math.abs(r-e)<1};/**
 * virtual-core
 *
 * Copyright (c) TanStack
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */var Fe=function(r){return r},je=function(r){for(var e=Math.max(r.startIndex-r.overscan,0),t=Math.min(r.endIndex+r.overscan,r.count-1),n=[],a=e;a<=t;a++)n.push(a);return n},Be=function(r,e){var t=r.scrollElement;if(t){var n=function(s){var l=s.width,u=s.height;e({width:Math.round(l),height:Math.round(u)})};n(t.getBoundingClientRect());var a=new ResizeObserver(function(o){var s=o[0];if(s!=null&&s.borderBoxSize){var l=s.borderBoxSize[0];if(l){n({width:l.inlineSize,height:l.blockSize});return}}n(t.getBoundingClientRect())});return a.observe(t,{box:"border-box"}),function(){a.unobserve(t)}}},He=function(r,e){var t=r.scrollElement;if(t){var n=function(){e(t[r.options.horizontal?"scrollLeft":"scrollTop"])};return n(),t.addEventListener("scroll",n,{passive:!0}),function(){t.removeEventListener("scroll",n)}}},Ke=function(r,e,t){if(e!=null&&e.borderBoxSize){var n=e.borderBoxSize[0];if(n){var a=Math.round(n[t.options.horizontal?"inlineSize":"blockSize"]);return a}}return Math.round(r.getBoundingClientRect()[t.options.horizontal?"width":"height"])},We=function(r,e,t){var n,a,o=e.adjustments,s=o===void 0?0:o,l=e.behavior,u=r+s;(n=t.scrollElement)==null||n.scrollTo==null||n.scrollTo((a={},a[t.options.horizontal?"left":"top"]=u,a.behavior=l,a))},Le=function(r){var e=this;this.unsubs=[],this.scrollElement=null,this.isScrolling=!1,this.isScrollingTimeoutId=null,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollDirection=null,this.scrollAdjustments=0,this.measureElementCache=new Map,this.observer=function(){var t=null,n=function(){return t||(typeof ResizeObserver<"u"?t=new ResizeObserver(function(o){o.forEach(function(s){e._measureElement(s.target,s)})}):null)};return{disconnect:function(){var o;return(o=n())==null?void 0:o.disconnect()},observe:function(o){var s;return(s=n())==null?void 0:s.observe(o,{box:"border-box"})},unobserve:function(o){var s;return(s=n())==null?void 0:s.unobserve(o)}}}(),this.range=null,this.setOptions=function(t){Object.entries(t).forEach(function(n){var a=n[0],o=n[1];typeof o>"u"&&delete t[a]}),e.options=X({debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Fe,rangeExtractor:je,onChange:function(){},measureElement:Ke,initialRect:{width:0,height:0},scrollMargin:0,scrollingDelay:150,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1},t)},this.notify=function(t){e.options.onChange==null||e.options.onChange(e,t)},this.maybeNotify=N(function(){return e.calculateRange(),[e.isScrolling,e.range?e.range.startIndex:null,e.range?e.range.endIndex:null]},function(t){e.notify(t)},{key:!1,debug:function(){return e.options.debug},initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=function(){e.unsubs.filter(Boolean).forEach(function(t){return t()}),e.unsubs=[],e.scrollElement=null},this._didMount=function(){return e.measureElementCache.forEach(e.observer.observe),function(){e.observer.disconnect(),e.cleanup()}},this._willUpdate=function(){var t=e.options.getScrollElement();e.scrollElement!==t&&(e.cleanup(),e.scrollElement=t,e._scrollToOffset(e.scrollOffset,{adjustments:void 0,behavior:void 0}),e.unsubs.push(e.options.observeElementRect(e,function(n){e.scrollRect=n,e.maybeNotify()})),e.unsubs.push(e.options.observeElementOffset(e,function(n){e.scrollAdjustments=0,e.scrollOffset!==n&&(e.isScrollingTimeoutId!==null&&(clearTimeout(e.isScrollingTimeoutId),e.isScrollingTimeoutId=null),e.isScrolling=!0,e.scrollDirection=e.scrollOffset<n?"forward":"backward",e.scrollOffset=n,e.maybeNotify(),e.isScrollingTimeoutId=setTimeout(function(){e.isScrollingTimeoutId=null,e.isScrolling=!1,e.scrollDirection=null,e.maybeNotify()},e.options.scrollingDelay))})))},this.getSize=function(){return e.scrollRect[e.options.horizontal?"width":"height"]},this.memoOptions=N(function(){return[e.options.count,e.options.paddingStart,e.options.scrollMargin,e.options.getItemKey]},function(t,n,a,o){return e.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:n,scrollMargin:a,getItemKey:o}},{key:!1}),this.getFurthestMeasurement=function(t,n){for(var a=new Map,o=new Map,s=n-1;s>=0;s--){var l=t[s];if(!a.has(l.lane)){var u=o.get(l.lane);if(u==null||l.end>u.end?o.set(l.lane,l):l.end<u.end&&a.set(l.lane,!0),a.size===e.options.lanes)break}}return o.size===e.options.lanes?Array.from(o.values()).sort(function(f,d){return f.end-d.end})[0]:void 0},this.getMeasurements=N(function(){return[e.memoOptions(),e.itemSizeCache]},function(t,n){var a=t.count,o=t.paddingStart,s=t.scrollMargin,l=t.getItemKey,u=e.pendingMeasuredCacheIndexes.length>0?Math.min.apply(Math,e.pendingMeasuredCacheIndexes):0;e.pendingMeasuredCacheIndexes=[];for(var f=e.measurementsCache.slice(0,u),d=u;d<a;d++){var h=l(d),v=e.options.lanes===1?f[d-1]:e.getFurthestMeasurement(f,d),m=v?v.end:o+s,c=n.get(h),x=typeof c=="number"?c:e.options.estimateSize(d),O=m+x,T=v?v.lane:d%e.options.lanes;f[d]={index:d,start:m,size:x,end:O,key:h,lane:T}}return e.measurementsCache=f,f},{key:!1,debug:function(){return e.options.debug}}),this.calculateRange=N(function(){return[e.getMeasurements(),e.getSize(),e.scrollOffset]},function(t,n,a){return e.range=t.length>0&&n>0?Ye({measurements:t,outerSize:n,scrollOffset:a}):null},{key:!1,debug:function(){return e.options.debug}}),this.getIndexes=N(function(){return[e.options.rangeExtractor,e.calculateRange(),e.options.overscan,e.options.count]},function(t,n,a,o){return n===null?[]:t(X({},n,{overscan:a,count:o}))},{key:!1,debug:function(){return e.options.debug}}),this.indexFromElement=function(t){var n=e.options.indexAttribute,a=t.getAttribute(n);return a?parseInt(a,10):(console.warn("Missing attribute name '"+n+"={index}' on measured element."),-1)},this._measureElement=function(t,n){var a=e.measurementsCache[e.indexFromElement(t)];if(!a||!t.isConnected){e.measureElementCache.forEach(function(l,u){l===t&&(e.observer.unobserve(t),e.measureElementCache.delete(u))});return}var o=e.measureElementCache.get(a.key);o!==t&&(o&&e.observer.unobserve(o),e.observer.observe(t),e.measureElementCache.set(a.key,t));var s=e.options.measureElement(t,n,e);e.resizeItem(a,s)},this.resizeItem=function(t,n){var a,o=(a=e.itemSizeCache.get(t.key))!=null?a:t.size,s=n-o;s!==0&&(t.start<e.scrollOffset&&e._scrollToOffset(e.scrollOffset,{adjustments:e.scrollAdjustments+=s,behavior:void 0}),e.pendingMeasuredCacheIndexes.push(t.index),e.itemSizeCache=new Map(e.itemSizeCache.set(t.key,n)),e.notify(!1))},this.measureElement=function(t){t&&e._measureElement(t,void 0)},this.getVirtualItems=N(function(){return[e.getIndexes(),e.getMeasurements()]},function(t,n){for(var a=[],o=0,s=t.length;o<s;o++){var l=t[o],u=n[l];a.push(u)}return a},{key:!1,debug:function(){return e.options.debug}}),this.getVirtualItemForOffset=function(t){var n=e.getMeasurements();return re(n[ye(0,n.length-1,function(a){return re(n[a]).start},t)])},this.getOffsetForAlignment=function(t,n){var a=e.getSize();n==="auto"&&(t<=e.scrollOffset?n="start":t>=e.scrollOffset+a?n="end":n="start"),n==="start"?t=t:n==="end"?t=t-a:n==="center"&&(t=t-a/2);var o=e.options.horizontal?"scrollWidth":"scrollHeight",s=e.scrollElement?"document"in e.scrollElement?e.scrollElement.document.documentElement[o]:e.scrollElement[o]:0,l=s-e.getSize();return Math.max(Math.min(l,t),0)},this.getOffsetForIndex=function(t,n){n===void 0&&(n="auto"),t=Math.max(0,Math.min(t,e.options.count-1));var a=re(e.getMeasurements()[t]);if(n==="auto")if(a.end>=e.scrollOffset+e.getSize()-e.options.scrollPaddingEnd)n="end";else if(a.start<=e.scrollOffset+e.options.scrollPaddingStart)n="start";else return[e.scrollOffset,n];var o=n==="end"?a.end+e.options.scrollPaddingEnd:a.start-e.options.scrollPaddingStart;return[e.getOffsetForAlignment(o,n),n]},this.isDynamicMode=function(){return e.measureElementCache.size>0},this.cancelScrollToIndex=function(){e.scrollToIndexTimeoutId!==null&&(clearTimeout(e.scrollToIndexTimeoutId),e.scrollToIndexTimeoutId=null)},this.scrollToOffset=function(t,n){var a=n===void 0?{}:n,o=a.align,s=o===void 0?"start":o,l=a.behavior;e.cancelScrollToIndex(),l==="smooth"&&e.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),e._scrollToOffset(e.getOffsetForAlignment(t,s),{adjustments:void 0,behavior:l})},this.scrollToIndex=function(t,n){var a=n===void 0?{}:n,o=a.align,s=o===void 0?"auto":o,l=a.behavior;t=Math.max(0,Math.min(t,e.options.count-1)),e.cancelScrollToIndex(),l==="smooth"&&e.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");var u=e.getOffsetForIndex(t,s),f=u[0],d=u[1];e._scrollToOffset(f,{adjustments:void 0,behavior:l}),l!=="smooth"&&e.isDynamicMode()&&(e.scrollToIndexTimeoutId=setTimeout(function(){e.scrollToIndexTimeoutId=null;var h=e.measureElementCache.has(e.options.getItemKey(t));if(h){var v=e.getOffsetForIndex(t,d),m=v[0];De(m,e.scrollOffset)||e.scrollToIndex(t,{align:d,behavior:l})}else e.scrollToIndex(t,{align:d,behavior:l})}))},this.scrollBy=function(t,n){var a=n===void 0?{}:n,o=a.behavior;e.cancelScrollToIndex(),o==="smooth"&&e.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),e._scrollToOffset(e.scrollOffset+t,{adjustments:void 0,behavior:o})},this.getTotalSize=function(){var t;return(((t=e.getMeasurements()[e.options.count-1])==null?void 0:t.end)||e.options.paddingStart)-e.options.scrollMargin+e.options.paddingEnd},this._scrollToOffset=function(t,n){var a=n.adjustments,o=n.behavior;e.options.scrollToFn(t,{behavior:o,adjustments:a},e)},this.measure=function(){e.itemSizeCache=new Map,e.notify(!1)},this.setOptions(r),this.scrollRect=this.options.initialRect,this.scrollOffset=this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(function(t){e.itemSizeCache.set(t.key,t.size)}),this.maybeNotify()},ye=function(r,e,t,n){for(;r<=e;){var a=(r+e)/2|0,o=t(a);if(o<n)r=a+1;else if(o>n)e=a-1;else return a}return r>0?r-1:0};function Ye(i){for(var r=i.measurements,e=i.outerSize,t=i.scrollOffset,n=r.length-1,a=function(u){return r[u].start},o=ye(0,n,a,t),s=o;s<n&&r[s].end<t+e;)s++;return{startIndex:o,endIndex:s}}/**
 * solid-virtual
 *
 * Copyright (c) TanStack
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function Qe(i){var r=ae(i),e=new Le(r),t=Ce(e.getVirtualItems()),n=t[0],a=t[1],o=U(e.getTotalSize()),s=o[0],l=o[1],u={get:function(h,v){switch(v){case"getVirtualItems":return function(){return n};case"getTotalSize":return function(){return s()};default:return Reflect.get(h,v)}}},f=new Proxy(e,u);return f.setOptions(r),Q(function(){var d=f._didMount();f._willUpdate(),Te(d)}),Ae(function(){f.setOptions(ae(r,i,{onChange:function(h,v){h._willUpdate(),a(Me(h.getVirtualItems(),{key:"index"})),l(h.getTotalSize()),i.onChange==null||i.onChange(h,v)}})),f.measure()}),f}function he(i){return Qe(ae({observeElementRect:Be,observeElementOffset:He,scrollToFn:We},i))}function G(){return G=Object.assign?Object.assign.bind():function(i){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t])}return i},G.apply(this,arguments)}var q={exports:{}},xe={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ: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:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z"},Ie=Object.keys(xe).join("|"),Xe=new RegExp(Ie,"g"),Ge=new RegExp(Ie,""),Ee=function(i){return i.replace(Xe,function(r){return xe[r]})},qe=function(i){return!!i.match(Ge)};q.exports=Ee;q.exports.has=qe;q.exports.remove=Ee;var Ze=q.exports;const Je=$e(Ze);var I={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};ie.rankings=I;var et=function(r,e){return String(r.rankedValue).localeCompare(String(e.rankedValue))};function ie(i,r,e){e===void 0&&(e={});var t=e,n=t.keys,a=t.threshold,o=a===void 0?I.MATCHES:a,s=t.baseSort,l=s===void 0?et:s,u=t.sorter,f=u===void 0?function(v){return v.sort(function(m,c){return at(m,c,l)})}:u,d=i.reduce(h,[]);return f(d).map(function(v){var m=v.item;return m});function h(v,m,c){var x=tt(m,n,r,e),O=x.rank,T=x.keyThreshold,z=T===void 0?o:T;return O>=z&&v.push(G({},x,{item:m,index:c})),v}}function tt(i,r,e,t){if(!r){var n=i;return{rankedValue:n,rank:me(n,e,t),keyIndex:-1,keyThreshold:t.threshold}}var a=st(i,r);return a.reduce(function(o,s,l){var u=o.rank,f=o.rankedValue,d=o.keyIndex,h=o.keyThreshold,v=s.itemValue,m=s.attributes,c=me(v,e,t),x=f,O=m.minRanking,T=m.maxRanking,z=m.threshold;return c<O&&c>=I.MATCHES?c=O:c>T&&(c=T),c>u&&(u=c,d=l,h=z,x=v),{rankedValue:x,rank:u,keyIndex:d,keyThreshold:h}},{rankedValue:i,rank:I.NO_MATCH,keyIndex:-1,keyThreshold:t.threshold})}function me(i,r,e){return i=ge(i,e),r=ge(r,e),r.length>i.length?I.NO_MATCH:i===r?I.CASE_SENSITIVE_EQUAL:(i=i.toLowerCase(),r=r.toLowerCase(),i===r?I.EQUAL:i.startsWith(r)?I.STARTS_WITH:i.includes(" "+r)?I.WORD_STARTS_WITH:i.includes(r)?I.CONTAINS:r.length===1?I.NO_MATCH:nt(i).includes(r)?I.ACRONYM:rt(i,r))}function nt(i){var r="",e=i.split(" ");return e.forEach(function(t){var n=t.split("-");n.forEach(function(a){r+=a.substr(0,1)})}),r}function rt(i,r){var e=0,t=0;function n(h,v,m){for(var c=m,x=v.length;c<x;c++){var O=v[c];if(O===h)return e+=1,c+1}return-1}function a(h){var v=1/h,m=e/r.length,c=I.MATCHES+m*v;return c}var o=n(r[0],i,0);if(o<0)return I.NO_MATCH;t=o;for(var s=1,l=r.length;s<l;s++){var u=r[s];t=n(u,i,t);var f=t>-1;if(!f)return I.NO_MATCH}var d=t-o;return a(d)}function at(i,r,e){var t=-1,n=1,a=i.rank,o=i.keyIndex,s=r.rank,l=r.keyIndex,u=a===s;return u?o===l?e(i,r):o<l?t:n:a>s?t:n}function ge(i,r){var e=r.keepDiacritics;return i=""+i,e||(i=Je(i)),i}function it(i,r){typeof r=="object"&&(r=r.key);var e;if(typeof r=="function")e=r(i);else if(i==null)e=null;else if(Object.hasOwnProperty.call(i,r))e=i[r];else{if(r.includes("."))return ot(r,i);e=null}return e==null?[]:Array.isArray(e)?e:[String(e)]}function ot(i,r){for(var e=i.split("."),t=[r],n=0,a=e.length;n<a;n++){for(var o=e[n],s=[],l=0,u=t.length;l<u;l++){var f=t[l];if(f!=null)if(Object.hasOwnProperty.call(f,o)){var d=f[o];d!=null&&s.push(d)}else o==="*"&&(s=s.concat(f))}t=s}if(Array.isArray(t[0])){var h=[];return h.concat.apply(h,t)}return t}function st(i,r){for(var e=[],t=0,n=r.length;t<n;t++)for(var a=r[t],o=lt(a),s=it(i,a),l=0,u=s.length;l<u;l++)e.push({itemValue:s[l],attributes:o});return e}var pe={maxRanking:1/0,minRanking:-1/0};function lt(i){return typeof i=="string"?pe:G({},pe,i)}const be=V("<div class=relative>"),ut=V('<div class="flex h-full flex-col gap-2"><div class="flex items-center gap-2"><div class="tabs-boxed tabs gap-2"></div></div><input class="input input-bordered input-primary"><div class="flex-1 overflow-y-auto">'),ct=V('<button><span></span><div class="badge badge-sm">'),dt=V('<div class="badge badge-sm">'),ft=V('<div class="absolute inset-x-0 top-0 pb-2 last:pb-0"><div class="card card-bordered card-compact bg-base-200 p-4"><div class="flex items-center gap-2"><span class=break-all></span></div><div class="text-xs text-slate-500"> :: '),vt=V('<div class="absolute inset-x-0 top-0 pb-2 last:pb-0"><div class="card card-bordered card-compact bg-base-200 p-4"><div class="flex items-center gap-2 pr-8"><span class=break-all></span><div class="badge badge-sm"></div></div><div class="text-xs text-slate-500"> / <!> /<!> ');var w=function(i){return i.ruleProviders="ruleProviders",i.rules="rules",i}(w||{});const pt=()=>{const[i]=Pe(),{rules:r,ruleProviders:e,updateRules:t,updateAllRuleProvider:n,updateRuleProviderByName:a}=Ve();Q(t);const{map:o,setWithCallback:s}=Ne(),[l,u]=U(!1),f=(E,A)=>{E.stopPropagation(),s(A,()=>a(A))},d=async E=>{E.stopPropagation(),u(!0);try{await n()}catch{}u(!1)},[h,v]=U(w.rules),m=()=>[{type:w.rules,name:i("rules"),count:r().length},{type:w.ruleProviders,name:i("ruleProviders"),count:e().length}],[c,x]=U(""),O=ce(()=>c()?ie(r(),c(),{keys:["type","payload","type"]}):r()),T=ce(()=>c()?ie(e(),c(),{keys:["name","vehicleType","behavior"]}):e());let z;const oe=({type:E,payload:A,proxy:D})=>`${E}-${A}-${D}`,H=he({get count(){return O().length},getItemKey:E=>oe(O()[E]),getScrollElement:()=>z,estimateSize:()=>82,overscan:5}),Se=H.getVirtualItems(),se=({type:E,name:A,vehicleType:D,behavior:R})=>`${E}-${A}-${D}-${R}`,K=he({get count(){return T().length},getItemKey:E=>se(T()[E]),getScrollElement:()=>z,estimateSize:()=>82,overscan:5}),Oe=K.getVirtualItems();return(()=>{const E=ut(),A=E.firstChild,D=A.firstChild,R=A.nextSibling,Z=R.nextSibling;return p(D,$(_e,{get each(){return m()},children:g=>(()=>{const C=ct(),y=C.firstChild,b=y.nextSibling;return C.$$click=()=>v(g.type),p(y,()=>g.name),p(b,()=>g.count),k(()=>ze(C,ee(h()===g.type&&"tab-active","tab tab-sm gap-2 px-2 md:tab-md"))),C})()})),p(A,$(Y,{get when(){return h()===w.ruleProviders},get children(){return $(ve,{class:"btn btn-circle btn-sm",get disabled(){return l()},onClick:g=>d(g),get icon(){return $(de,{get class(){return ee(l()&&"animate-spin text-success")}})}})}}),null),R.$$input=g=>x(g.currentTarget.value),te(g=>z=g,Z),p(Z,$(Y,{get when(){return h()===w.rules},get children(){const g=be();return p(g,()=>Se.map(C=>{const y=O().find(b=>oe(b)===C.key);return(()=>{const b=ft(),W=b.firstChild,P=W.firstChild,L=P.firstChild,F=P.nextSibling,_=F.firstChild;return te(S=>Q(()=>H.measureElement(S)),b),p(L,()=>y.payload),p(P,$(Y,{get when(){return y.size!==-1},get children(){const S=dt();return p(S,()=>y.size),S}}),null),p(F,()=>y.type,_),p(F,()=>y.proxy,null),k(S=>{const j=C.index,B=`translateY(${C.start}px)`;return j!==S._v$&&ne(b,"data-index",S._v$=j),B!==S._v$2&&((S._v$2=B)!=null?b.style.setProperty("transform",B):b.style.removeProperty("transform")),S},{_v$:void 0,_v$2:void 0}),b})()})),k(()=>`${H.getTotalSize()}px`!=null?g.style.setProperty("height",`${H.getTotalSize()}px`):g.style.removeProperty("height")),g}}),null),p(Z,$(Y,{get when(){return h()===w.ruleProviders},get children(){const g=be();return p(g,()=>Oe.map(C=>{const y=e().find(b=>se(b)===C.key);return(()=>{const b=vt(),W=b.firstChild,P=W.firstChild,L=P.firstChild,F=L.nextSibling,_=P.nextSibling,S=_.firstChild,j=S.nextSibling,B=j.nextSibling,le=B.nextSibling;return le.nextSibling,te(M=>Q(()=>K.measureElement(M)),b),p(L,()=>y.name),p(F,()=>y.ruleCount),p(_,()=>y.vehicleType,S),p(_,()=>y.behavior,j),p(_,()=>i("updated"),le),p(_,()=>Ue(y.updatedAt),null),p(W,$(ve,{class:"btn-circle btn-sm absolute right-2 top-2 mr-2 h-4",get disabled(){return o()[y.name]},onClick:M=>f(M,y.name),get icon(){return $(de,{get class(){return ee(o()[y.name]&&"animate-spin text-success")}})}}),null),k(M=>{const ue=C.index,J=`translateY(${C.start}px)`;return ue!==M._v$3&&ne(b,"data-index",M._v$3=ue),J!==M._v$4&&((M._v$4=J)!=null?b.style.setProperty("transform",J):b.style.removeProperty("transform")),M},{_v$3:void 0,_v$4:void 0}),b})()})),k(()=>`${K.getTotalSize()}px`!=null?g.style.setProperty("height",`${K.getTotalSize()}px`):g.style.removeProperty("height")),g}}),null),k(()=>ne(R,"placeholder",i("search"))),k(()=>R.value=c()),E})()};ke(["input","click"]);export{pt as default};
