@platforma-sdk/ui-vue 1.17.3 → 1.17.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @platforma-sdk/ui-vue
2
2
 
3
+ ## 1.17.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 994ea52: fixed styles
8
+
3
9
  ## 1.17.3
4
10
 
5
11
  ### Patch Changes
package/dist/lib.js CHANGED
@@ -21982,7 +21982,7 @@ const kd = aS(), zG = ["onClick"], WG = {
21982
21982
  "close-on-outside-click": ""
21983
21983
  }, {
21984
21984
  title: Ce(() => f[3] || (f[3] = [
21985
- I("Columns")
21985
+ I("Manage Columns")
21986
21986
  ])),
21987
21987
  default: Ce(() => [
21988
21988
  (y(), S("div", {
package/dist/lib.umd.cjs CHANGED
@@ -88,4 +88,4 @@ __p += '`),Oe&&(Q+=`' +
88
88
  function print() { __p += __j.call(arguments, '') }
89
89
  `:`;
90
90
  `)+Q+`return __p
91
- }`;var De=wg(function(){return Ue(C,pe+"return "+Q).apply(n,k)});if(De.source=Q,Bd(De))throw De;return De}function KO(s){return We(s).toLowerCase()}function YO(s){return We(s).toUpperCase()}function XO(s,a,u){if(s=We(s),s&&(u||a===n))return Af(s);if(!s||!(a=Qt(a)))return s;var f=An(s),g=An(a),C=Bf(f,g),k=Pf(f,g)+1;return Lr(f,C,k).join("")}function JO(s,a,u){if(s=We(s),s&&(u||a===n))return s.slice(0,Df(s)+1);if(!s||!(a=Qt(a)))return s;var f=An(s),g=Pf(f,An(a))+1;return Lr(f,0,g).join("")}function QO(s,a,u){if(s=We(s),s&&(u||a===n))return s.replace(Bc,"");if(!s||!(a=Qt(a)))return s;var f=An(s),g=Bf(f,An(a));return Lr(f,g).join("")}function eM(s,a){var u=R,f=O;if(ot(a)){var g="separator"in a?a.separator:g;u="length"in a?Be(a.length):u,f="omission"in a?Qt(a.omission):f}s=We(s);var C=s.length;if(Mo(s)){var k=An(s);C=k.length}if(u>=C)return s;var V=u-Go(f);if(V<1)return f;var L=k?Lr(k,0,V).join(""):s.slice(0,V);if(g===n)return L+f;if(k&&(V+=L.length-V),Pd(g)){if(s.slice(V).search(g)){var K,Y=L;for(g.global||(g=qc(g.source,We(Xh.exec(g))+"g")),g.lastIndex=0;K=g.exec(Y);)var Q=K.index;L=L.slice(0,Q===n?V:Q)}}else if(s.indexOf(Qt(g),V)!=V){var oe=L.lastIndexOf(g);oe>-1&&(L=L.slice(0,oe))}return L+f}function tM(s){return s=We(s),s&&pP.test(s)?s.replace(qh,AR):s}var nM=Ho(function(s,a,u){return s+(u?" ":"")+a.toUpperCase()}),Id=bm("toUpperCase");function vg(s,a,u){return s=We(s),a=u?n:a,a===n?SR(s)?RR(s):gR(s):s.match(a)||[]}var wg=Ie(function(s,a){try{return Xt(s,n,a)}catch(u){return Bd(u)?u:new Ee(u)}}),rM=ir(function(s,a){return on(a,function(u){u=Hn(u),rr(s,u,Vd(s[u],s))}),s});function oM(s){var a=s==null?0:s.length,u=ge();return s=a?tt(s,function(f){if(typeof f[1]!="function")throw new sn(c);return[u(f[0]),f[1]]}):[],Ie(function(f){for(var g=-1;++g<a;){var C=s[g];if(Xt(C[0],this,f))return Xt(C[1],this,f)}})}function iM(s){return AD(ln(s,y))}function Fd(s){return function(){return s}}function sM(s,a){return s==null||s!==s?a:s}var aM=km(),lM=km(!0);function Zt(s){return s}function Ld(s){return em(typeof s=="function"?s:ln(s,y))}function cM(s){return nm(ln(s,y))}function dM(s,a){return rm(s,ln(a,y))}var uM=Ie(function(s,a){return function(u){return is(u,s,a)}}),pM=Ie(function(s,a){return function(u){return is(s,u,a)}});function Od(s,a,u){var f=yt(a),g=Va(a,f);u==null&&!(ot(a)&&(g.length||!f.length))&&(u=a,a=s,s=this,g=Va(a,yt(a)));var C=!(ot(u)&&"chain"in u)||!!u.chain,k=ar(s);return on(g,function(V){var L=a[V];s[V]=L,k&&(s.prototype[V]=function(){var K=this.__chain__;if(C||K){var Y=s(this.__wrapped__),Q=Y.__actions__=$t(this.__actions__);return Q.push({func:L,args:arguments,thisArg:s}),Y.__chain__=K,Y}return L.apply(s,Br([this.value()],arguments))})}),s}function hM(){return vt._===this&&(vt._=MR),this}function Md(){}function fM(s){return s=Be(s),Ie(function(a){return om(a,s)})}var mM=gd(tt),gM=gd(Sf),yM=gd($c);function bg(s){return xd(s)?zc(Hn(s)):HD(s)}function _M(s){return function(a){return s==null?n:ao(s,a)}}var CM=Em(),vM=Em(!0);function Gd(){return[]}function $d(){return!1}function wM(){return{}}function bM(){return""}function xM(){return!0}function kM(s,a){if(s=Be(s),s<1||s>ne)return[];var u=Te,f=Tt(s,Te);a=ge(a),s-=Te;for(var g=Wc(f,a);++u<s;)a(u);return g}function SM(s){return Ne(s)?tt(s,Hn):en(s)?[s]:$t(zm(We(s)))}function EM(s){var a=++LR;return We(s)+a}var TM=Ia(function(s,a){return s+a},0),NM=yd("ceil"),VM=Ia(function(s,a){return s/a},1),AM=yd("floor");function BM(s){return s&&s.length?Na(s,Zt,nd):n}function PM(s,a){return s&&s.length?Na(s,ge(a,2),nd):n}function RM(s){return Nf(s,Zt)}function DM(s,a){return Nf(s,ge(a,2))}function IM(s){return s&&s.length?Na(s,Zt,sd):n}function FM(s,a){return s&&s.length?Na(s,ge(a,2),sd):n}var LM=Ia(function(s,a){return s*a},1),OM=yd("round"),MM=Ia(function(s,a){return s-a},0);function GM(s){return s&&s.length?Zc(s,Zt):0}function $M(s,a){return s&&s.length?Zc(s,ge(a,2)):0}return _.after=cL,_.ary=Qm,_.assign=YL,_.assignIn=hg,_.assignInWith=qa,_.assignWith=XL,_.at=JL,_.before=eg,_.bind=Vd,_.bindAll=rM,_.bindKey=tg,_.castArray=wL,_.chain=Ym,_.chunk=AI,_.compact=BI,_.concat=PI,_.cond=oM,_.conforms=iM,_.constant=Fd,_.countBy=GF,_.create=QL,_.curry=ng,_.curryRight=rg,_.debounce=og,_.defaults=eO,_.defaultsDeep=tO,_.defer=dL,_.delay=uL,_.difference=RI,_.differenceBy=DI,_.differenceWith=II,_.drop=FI,_.dropRight=LI,_.dropRightWhile=OI,_.dropWhile=MI,_.fill=GI,_.filter=zF,_.flatMap=WF,_.flatMapDeep=jF,_.flatMapDepth=HF,_.flatten=jm,_.flattenDeep=$I,_.flattenDepth=zI,_.flip=pL,_.flow=aM,_.flowRight=lM,_.fromPairs=UI,_.functions=lO,_.functionsIn=cO,_.groupBy=qF,_.initial=WI,_.intersection=jI,_.intersectionBy=HI,_.intersectionWith=qI,_.invert=uO,_.invertBy=pO,_.invokeMap=YF,_.iteratee=Ld,_.keyBy=XF,_.keys=yt,_.keysIn=Ut,_.map=za,_.mapKeys=fO,_.mapValues=mO,_.matches=cM,_.matchesProperty=dM,_.memoize=Za,_.merge=gO,_.mergeWith=fg,_.method=uM,_.methodOf=pM,_.mixin=Od,_.negate=Wa,_.nthArg=fM,_.omit=yO,_.omitBy=_O,_.once=hL,_.orderBy=JF,_.over=mM,_.overArgs=fL,_.overEvery=gM,_.overSome=yM,_.partial=Ad,_.partialRight=ig,_.partition=QF,_.pick=CO,_.pickBy=mg,_.property=bg,_.propertyOf=_M,_.pull=JI,_.pullAll=qm,_.pullAllBy=QI,_.pullAllWith=eF,_.pullAt=tF,_.range=CM,_.rangeRight=vM,_.rearg=mL,_.reject=nL,_.remove=nF,_.rest=gL,_.reverse=Td,_.sampleSize=oL,_.set=wO,_.setWith=bO,_.shuffle=iL,_.slice=rF,_.sortBy=lL,_.sortedUniq=dF,_.sortedUniqBy=uF,_.split=WO,_.spread=yL,_.tail=pF,_.take=hF,_.takeRight=fF,_.takeRightWhile=mF,_.takeWhile=gF,_.tap=BF,_.throttle=_L,_.thru=$a,_.toArray=dg,_.toPairs=gg,_.toPairsIn=yg,_.toPath=SM,_.toPlainObject=pg,_.transform=xO,_.unary=CL,_.union=yF,_.unionBy=_F,_.unionWith=CF,_.uniq=vF,_.uniqBy=wF,_.uniqWith=bF,_.unset=kO,_.unzip=Nd,_.unzipWith=Km,_.update=SO,_.updateWith=EO,_.values=Yo,_.valuesIn=TO,_.without=xF,_.words=vg,_.wrap=vL,_.xor=kF,_.xorBy=SF,_.xorWith=EF,_.zip=TF,_.zipObject=NF,_.zipObjectDeep=VF,_.zipWith=AF,_.entries=gg,_.entriesIn=yg,_.extend=hg,_.extendWith=qa,Od(_,_),_.add=TM,_.attempt=wg,_.camelCase=BO,_.capitalize=_g,_.ceil=NM,_.clamp=NO,_.clone=bL,_.cloneDeep=kL,_.cloneDeepWith=SL,_.cloneWith=xL,_.conformsTo=EL,_.deburr=Cg,_.defaultTo=sM,_.divide=VM,_.endsWith=PO,_.eq=Pn,_.escape=RO,_.escapeRegExp=DO,_.every=$F,_.find=UF,_.findIndex=Zm,_.findKey=nO,_.findLast=ZF,_.findLastIndex=Wm,_.findLastKey=rO,_.floor=AM,_.forEach=Xm,_.forEachRight=Jm,_.forIn=oO,_.forInRight=iO,_.forOwn=sO,_.forOwnRight=aO,_.get=Rd,_.gt=TL,_.gte=NL,_.has=dO,_.hasIn=Dd,_.head=Hm,_.identity=Zt,_.includes=KF,_.indexOf=ZI,_.inRange=VO,_.invoke=hO,_.isArguments=uo,_.isArray=Ne,_.isArrayBuffer=VL,_.isArrayLike=zt,_.isArrayLikeObject=at,_.isBoolean=AL,_.isBuffer=Or,_.isDate=BL,_.isElement=PL,_.isEmpty=RL,_.isEqual=DL,_.isEqualWith=IL,_.isError=Bd,_.isFinite=FL,_.isFunction=ar,_.isInteger=sg,_.isLength=ja,_.isMap=ag,_.isMatch=LL,_.isMatchWith=OL,_.isNaN=ML,_.isNative=GL,_.isNil=zL,_.isNull=$L,_.isNumber=lg,_.isObject=ot,_.isObjectLike=it,_.isPlainObject=us,_.isRegExp=Pd,_.isSafeInteger=UL,_.isSet=cg,_.isString=Ha,_.isSymbol=en,_.isTypedArray=Ko,_.isUndefined=ZL,_.isWeakMap=WL,_.isWeakSet=jL,_.join=KI,_.kebabCase=IO,_.last=dn,_.lastIndexOf=YI,_.lowerCase=FO,_.lowerFirst=LO,_.lt=HL,_.lte=qL,_.max=BM,_.maxBy=PM,_.mean=RM,_.meanBy=DM,_.min=IM,_.minBy=FM,_.stubArray=Gd,_.stubFalse=$d,_.stubObject=wM,_.stubString=bM,_.stubTrue=xM,_.multiply=LM,_.nth=XI,_.noConflict=hM,_.noop=Md,_.now=Ua,_.pad=OO,_.padEnd=MO,_.padStart=GO,_.parseInt=$O,_.random=AO,_.reduce=eL,_.reduceRight=tL,_.repeat=zO,_.replace=UO,_.result=vO,_.round=OM,_.runInContext=I,_.sample=rL,_.size=sL,_.snakeCase=ZO,_.some=aL,_.sortedIndex=oF,_.sortedIndexBy=iF,_.sortedIndexOf=sF,_.sortedLastIndex=aF,_.sortedLastIndexBy=lF,_.sortedLastIndexOf=cF,_.startCase=jO,_.startsWith=HO,_.subtract=MM,_.sum=GM,_.sumBy=$M,_.template=qO,_.times=kM,_.toFinite=lr,_.toInteger=Be,_.toLength=ug,_.toLower=KO,_.toNumber=un,_.toSafeInteger=KL,_.toString=We,_.toUpper=YO,_.trim=XO,_.trimEnd=JO,_.trimStart=QO,_.truncate=eM,_.unescape=tM,_.uniqueId=EM,_.upperCase=nM,_.upperFirst=Id,_.each=Xm,_.eachRight=Jm,_.first=Hm,Od(_,function(){var s={};return Wn(_,function(a,u){He.call(_.prototype,u)||(s[u]=a)}),s}(),{chain:!1}),_.VERSION=o,on(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){_[s].placeholder=_}),on(["drop","take"],function(s,a){Le.prototype[s]=function(u){u=u===n?1:ht(Be(u),0);var f=this.__filtered__&&!a?new Le(this):this.clone();return f.__filtered__?f.__takeCount__=Tt(u,f.__takeCount__):f.__views__.push({size:Tt(u,Te),type:s+(f.__dir__<0?"Right":"")}),f},Le.prototype[s+"Right"]=function(u){return this.reverse()[s](u).reverse()}}),on(["filter","map","takeWhile"],function(s,a){var u=a+1,f=u==T||u==U;Le.prototype[s]=function(g){var C=this.clone();return C.__iteratees__.push({iteratee:ge(g,3),type:u}),C.__filtered__=C.__filtered__||f,C}}),on(["head","last"],function(s,a){var u="take"+(a?"Right":"");Le.prototype[s]=function(){return this[u](1).value()[0]}}),on(["initial","tail"],function(s,a){var u="drop"+(a?"":"Right");Le.prototype[s]=function(){return this.__filtered__?new Le(this):this[u](1)}}),Le.prototype.compact=function(){return this.filter(Zt)},Le.prototype.find=function(s){return this.filter(s).head()},Le.prototype.findLast=function(s){return this.reverse().find(s)},Le.prototype.invokeMap=Ie(function(s,a){return typeof s=="function"?new Le(this):this.map(function(u){return is(u,s,a)})}),Le.prototype.reject=function(s){return this.filter(Wa(ge(s)))},Le.prototype.slice=function(s,a){s=Be(s);var u=this;return u.__filtered__&&(s>0||a<0)?new Le(u):(s<0?u=u.takeRight(-s):s&&(u=u.drop(s)),a!==n&&(a=Be(a),u=a<0?u.dropRight(-a):u.take(a-s)),u)},Le.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Le.prototype.toArray=function(){return this.take(Te)},Wn(Le.prototype,function(s,a){var u=/^(?:filter|find|map|reject)|While$/.test(a),f=/^(?:head|last)$/.test(a),g=_[f?"take"+(a=="last"?"Right":""):a],C=f||/^find/.test(a);g&&(_.prototype[a]=function(){var k=this.__wrapped__,V=f?[1]:arguments,L=k instanceof Le,K=V[0],Y=L||Ne(k),Q=function(Fe){var Oe=g.apply(_,Br([Fe],V));return f&&oe?Oe[0]:Oe};Y&&u&&typeof K=="function"&&K.length!=1&&(L=Y=!1);var oe=this.__chain__,pe=!!this.__actions__.length,_e=C&&!oe,De=L&&!pe;if(!C&&Y){k=De?k:new Le(this);var Ce=s.apply(k,V);return Ce.__actions__.push({func:$a,args:[Q],thisArg:n}),new an(Ce,oe)}return _e&&De?s.apply(this,V):(Ce=this.thru(Q),_e?f?Ce.value()[0]:Ce.value():Ce)})}),on(["pop","push","shift","sort","splice","unshift"],function(s){var a=ha[s],u=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",f=/^(?:pop|shift)$/.test(s);_.prototype[s]=function(){var g=arguments;if(f&&!this.__chain__){var C=this.value();return a.apply(Ne(C)?C:[],g)}return this[u](function(k){return a.apply(Ne(k)?k:[],g)})}}),Wn(Le.prototype,function(s,a){var u=_[a];if(u){var f=u.name+"";He.call(Zo,f)||(Zo[f]=[]),Zo[f].push({name:a,func:u})}}),Zo[Da(n,S).name]=[{name:"wrapper",func:n}],Le.prototype.clone=tD,Le.prototype.reverse=nD,Le.prototype.value=rD,_.prototype.at=PF,_.prototype.chain=RF,_.prototype.commit=DF,_.prototype.next=IF,_.prototype.plant=LF,_.prototype.reverse=OF,_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=MF,_.prototype.first=_.prototype.head,Ji&&(_.prototype[Ji]=FF),_},$o=DR();no?((no.exports=$o)._=$o,Lc._=$o):vt._=$o}).call(Xo)}(Zs,Zs.exports);var Ye=Zs.exports;const XN={class:"grid-overlay-container"},Yp=r.defineComponent({__name:"PlAgOverlayLoading",props:{params:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",XN,[e.params.notReady?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[n[0]||(n[0]=r.createElementVNode("div",{class:"grid-icon-cat-in-bag"},null,-1)),n[1]||(n[1]=r.createElementVNode("span",{class:"text-subtitle-m"},"No datasource",-1))],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[n[2]||(n[2]=r.createElementVNode("div",{class:"mask-24 mask-loading grid-mask-loading"},null,-1)),n[3]||(n[3]=r.createElementVNode("span",{class:"text-subtitle-m"},"Loading",-1))],64))]))}}),JN={},QN={class:"grid-overlay-container"};function eV(t,e){return r.openBlock(),r.createElementBlock("div",QN,e[0]||(e[0]=[r.createElementVNode("div",{class:"grid-icon-sad-cat"},null,-1),r.createElementVNode("span",{class:"text-subtitle-m"},"Empty",-1)]))}const Xp=Ql(JN,[["render",eV]]);async function tV(t,e){throw Error("not implemented")}function nV(t){return t.axesSpec.filter(e=>{var n;return((n=e.annotations)==null?void 0:n["pl7.app/axisNature"])==="heterogeneous"})}function rV(t,e){const n=[];for(const o of e)if(t[o].type==="column"){const i=nV(t[o].spec);for(const l of i){if(l.type!=="String"){console.warn("heterogeneous axis with string type expected, got",l,"skipping");continue}const c=jr(l),d=t.findIndex(p=>Ye.isEqual(p.id,c));if(d===-1)throw console.error("axis not found",o,c,t),Error("axis not found");n.push({columnIdx:o,axisIdx:d})}}return n}const Jp=(t,e)=>(t+e).toString();function oV(t,e,n,o,i,l){if(t.length>1)throw Error("hColumns.length > 1 is not supported");const c=t[0];let d=-1,p=-1;for(let y=0;y<l.length;++y)l[y]===c.axisIdx&&(d=y),l[y]===c.columnIdx&&(p=y);const h=(()=>{const w=o[d].data.filter(v=>v!==null);return Array.from(new Set(w))})();h.sort(),p>d?(n.splice(p,1),n.splice(d,1)):(n.splice(d,1),n.splice(p,1));const m=iV(i,o,d,p,h,e.rows);for(let y=0;y<h.length;++y){const w=h[y],v=zr(w+"@"+y);n.push({colId:v,field:Jp(o.length,y),headerName:w,valueFormatter:ih})}return{rowModelType:"clientSide",columnDefs:n,rowData:m}}function iV(t,e,n,o,i,l){const c=new Map;let d=0;for(let h=0;h<l;h++){const m={};for(let z=0;z<e.length;++z){if(z===n||z===o)continue;const $=t[z].toString();m[$]=e[z].data[h]}let y;const w=zr(Object.values(m))??"";c.has(w)?y=c.get(w):(c.set(w,m),y=m,y.id=d.toString(),d++);const v=i.indexOf(e[n].data[h]);if(v===-1)throw Error("index not found");const E=Jp(e.length,v);y[E]=e[o].data[h]}return Array.from(c.values())}const Un='"##RowNumberColumnId##"',Qp=45;function eh(){return{colId:Un,headerName:"#",valueGetter:t=>t.node===null||t.node.rowIndex===null?null:t.node.rowIndex+1,headerClass:"pl-ag-header-align-center",suppressNavigable:!0,suppressMovable:!0,mainMenuItems:[],contextMenuItems:[],lockPosition:"left",pinned:"left",lockPinned:!0,width:Qp,suppressSizeToFit:!0,suppressAutoSize:!0,cellStyle:{color:"var(--txt-03)","background-color":"var(--bg-base-light)",overflow:"visible !important","text-align":"center"},sortable:!1,resizable:!1}}function sV(){const t=document.createElement("div");return t.style.visibility="hidden",t.style.position="absolute",t.style.boxSizing="border-box",t.style.padding="15.5px",t.style.border="1px solid",t.style.width="auto",document.body.appendChild(t),t}function Ws(t,e,n){const o=t.getCellValue({rowNode:t.getDisplayedRowAtIndex(t.getLastDisplayedRowIndex()),colKey:Un});if(typeof o!="number")return;const i=o.toString().length;if(!n&&e.innerHTML.length===i)return;const l="5";e.innerHTML=l.repeat(i),r.nextTick(()=>{t.applyColumnState({state:[{colId:Un,pinned:"left",width:Math.max(Qp,e.offsetWidth)}]})})}function aV(t){document.body.removeChild(t)}function th(t){const e=sV();t.addEventListener("viewportChanged",()=>{Ws(t,e)}),t.addEventListener("columnVisible",n=>{n.columns&&n.columns.some(o=>o.isVisible()&&o.getColId()===Un)&&Ws(t,e)}),t.addEventListener("columnResized",n=>{var o;n.finished&&n.source==="autosizeColumns"&&((o=n.columns)!=null&&o.some(i=>i.isVisible()&&i.getColId()===Un))&&Ws(t,e,!0)}),t.addEventListener("gridPreDestroyed",()=>{aV(e)}),Ws(t,e)}const lV={class:"pl-ag-column-header__title d-flex align-center gap-6 flex-grow-1"},nh=r.defineComponent({__name:"PlAgColumnHeader",props:{params:{}},setup(t){const e=t,n=r.computed(()=>{var m,y;const h=(y=(m=e.params.column.getUserProvidedColDef())==null?void 0:m.headerComponentParams)==null?void 0:y.type;switch(h){case void 0:case"Text":return"cell-type-txt";case"Number":return"cell-type-num";case"File":return"paper-clip";case"Date":return"calendar";case"Duration":return"time";default:throw Error(`unsupported data type: ${h} for PlAgColumnHeader component. Column ${e.params.column.getColId()}`)}}),o=r.ref(null),i=()=>o.value=e.params.column.getSort()??null;r.onMounted(()=>i());function l(){e.params.column.isSortable()&&(e.params.progressSort(),i())}const c=r.computed(()=>{const h=o.value;switch(h){case"asc":return"arrow-up";case"desc":return"arrow-down";case null:return null;default:throw Error(`unsupported sort direction: ${h}. Column ${e.params.column.getColId()}`)}}),d=r.ref();function p(){const h=d.value;h&&e.params.showColumnMenu(h)}return(h,m)=>(r.openBlock(),r.createElementBlock("div",{class:"pl-ag-column-header d-flex align-center gap-6",onClick:l},[r.createElementVNode("div",lV,[r.createVNode(r.unref(At),{name:n.value,class:"pl-ag-column-header__type-icon"},null,8,["name"]),r.createElementVNode("span",null,r.toDisplayString(h.params.displayName),1),c.value?(r.openBlock(),r.createBlock(r.unref(At),{key:0,name:c.value},null,8,["name"])):r.createCommentVNode("",!0)]),h.params.enableMenu?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"menuActivatorBtn",ref:d,class:"pl-ag-column-header__menu-icon",onClick:r.withModifiers(p,["stop"])},[r.createVNode(r.unref(At),{name:"more"})],512)):r.createCommentVNode("",!0)]))}}),cV={class:"pl-ag-grid-open-cell d-flex"},dV={class:"pl-ag-grid-open-cell__value"},rh=r.defineComponent({__name:"PlAgTextAndButtonCell",props:{params:{}},setup(t){const e=t;function n(){var o,i;if(e.params.invokeRowsOnDoubleClick){const l=e.params.api,c={rowPinned:e.params.node.rowPinned,api:l,rowIndex:e.params.node.rowIndex,context:l,type:"rowDoubleClicked",node:e.params.node,data:e.params.data,event:null};l.dispatchEvent(c)}else(i=(o=e.params).onClick)==null||i.call(o,e.params)}return(o,i)=>(r.openBlock(),r.createElementBlock("div",cV,[r.createElementVNode("div",dV,r.toDisplayString(o.params.value),1),r.createElementVNode("div",{class:"pl-ag-grid-open-cell__activator text-caps11 align-center",onClick:r.withModifiers(n,["stop"])},[r.createVNode(r.unref(At),{name:o.params.icon??"maximize"},null,8,["name"]),r.createTextVNode(" "+r.toDisplayString(o.params.btnLabel??"Open"),1)])]))}});function uV(t){return zr(t)}function oh(t){return JSON.parse(t)}const ih=t=>t?t.value===void 0?"NULL":t.value===null?"NA":t.value.toString():"ERROR";function pV(t,e,n,o){var c,d,p;const i=uV(e),l=e.type==="axis"?e.spec.type:e.spec.valueType;return{colId:i,context:e,field:t.toString(),headerName:((d=(c=e.spec.annotations)==null?void 0:c["pl7.app/label"])==null?void 0:d.trim())??"Unlabeled "+e.type+" "+t.toString(),lockPosition:e.type==="axis",hide:(n==null?void 0:n.includes(i))??((p=e.spec.annotations)==null?void 0:p["pl7.app/table/visibility"])==="optional",valueFormatter:ih,headerComponent:nh,cellRendererSelector:o?h=>{var y,w;if(e.type!=="axis")return;const m=(w=(y=h.colDef)==null?void 0:y.context)==null?void 0:w.id;if(Ye.isEqual(m,o))return{component:rh}}:void 0,cellRendererParams:o?{invokeRowsOnDoubleClick:!0}:void 0,headerComponentParams:{type:(()=>{switch(l){case"Int":case"Long":case"Float":case"Double":return"Number";case"String":case"Bytes":return"Text";default:throw Error(`unsupported data type: ${l}`)}})()},cellDataType:(()=>{switch(l){case"Int":case"Long":case"Float":case"Double":return"number";case"String":case"Bytes":return"text";default:throw Error(`unsupported data type: ${l}`)}})()}}function hV(t,e){switch(e){case"Int":return t;case"Long":return typeof t=="bigint"?Number(t):t;case"Float":return t;case"Double":return t;case"String":return t;case"Bytes":return Buffer.from(t).toString("hex");default:throw Error(`unsupported data type: ${e}`)}}function fV(t,e,n,o){const i=t.length,l=[];for(let c=0;c<e[0].data.length;++c){const d=[],p=(o++).toString();for(const m of n)d.push(e[m].data[c]);const h={key:d,id:p};for(let m=0;m<i;++m){const y=t[m].toString(),w=e[m].data[c],v=e[m].type;Ky(e[m].absent,c)?h[y]=void 0:qy(w,v)||w===null?h[y]=null:h[y]=hV(w,v)}l.push(h)}return l}const mV=t=>t.type==="column"&&t.spec.axesSpec.length===1&&t.spec.name==="pl7.app/label";async function gV(t,e,n,o,i){const l=await t.getSpec(e);let c=l.findIndex(B=>B.type==="column");c===-1&&(c=l.length);const d=[...l.keys()].filter(B=>!Ye.some(n,D=>Ye.isEqual(jr(D.axis),l[B].id)||l[B].type==="column"&&l[B].spec.name==="pl7.app/label"&&l[B].spec.axesSpec.length===1&&Ye.isEqual(jr(D.axis),jr(l[B].spec.axesSpec[0])))).sort((B,D)=>{var N,j;if(l[B].type!==l[D].type)return l[B].type==="axis"?-1:1;const H=(N=l[B].spec.annotations)==null?void 0:N["pl7.app/table/orderPriority"],A=(j=l[D].spec.annotations)==null?void 0:j["pl7.app/table/orderPriority"];return H===void 0?A===void 0?0:1:A===void 0?-1:Number(A)-Number(H)}),p=Ye.cloneDeep(d),h=rV(l,d);for(let B=d.length-1;B>=0;--B){const D=d[B];if(!mV(l[D]))continue;const H=jr(l[D].spec.axesSpec[0]),A=Ye.findIndex(d,N=>Ye.isEqual(l[N].id,H));if(A===-1&&Ye.findIndex(n,j=>Ye.isEqual(jr(j.axis),H))===-1){console.warn(`added label column, but the axis is not in the data; axisId: ${H}`);continue}d[A]=D;for(const N of h)N.axisIdx===D&&(N.axisIdx=A);d.splice(B,1),p.splice(B,1)}const m=await t.getShape(e),y=m.rows,w=[eh(),...p.map(B=>pV(B,l[B],o,i))];if(h.length>1&&console.warn("Currently, only one heterogeneous axis is supported in the table, got",h.length," transposition will not be applied."),h.length===1)return oV(h,m,w,await t.getData(e,d),p,d);const v=[...d],E=new Map;for(let B=0;B<c;++B)E.set(B,-1);for(let B=0;B<v.length;++B){const D=v[B];E.has(D)&&E.set(D,B)}for(const[B,D]of E)D===-1&&(E.set(B,v.length),v.push(B));const z=[];for(let B=0;B<c;++B){const D=E.get(B);if(D===void 0||D===-1)throw new Error("assertion exception");z.push(D)}let $;return{rowModelType:"serverSide",columnDefs:w,serverSideDatasource:{getRows:async B=>{try{if(y==0){B.success({rowData:[],rowCount:y}),B.api.setGridOption("loading",!1),B.api.showNoRowsOverlay();return}if($&&!Ye.isEqual($.request.sortModel,B.request.sortModel)){$=void 0,B.api.setGridOption("loading",!0),B.success({rowData:[],rowCount:0});return}$=B;let D=0,H=[];if(y>0&&B.request.startRow!==void 0&&B.request.endRow!==void 0&&(D=Math.min(y,B.request.endRow)-B.request.startRow,D>0)){const A=await t.getData(e,v,{offset:B.request.startRow,length:D});H=fV(p,A,z,B.request.startRow)}B.success({rowData:H,rowCount:y}),B.api.autoSizeColumns(B.api.getAllDisplayedColumns().filter(A=>A.getColId()!==Un)),B.api.setGridOption("loading",!1)}catch(D){B.api.setGridOption("loading",!0),B.fail(),console.trace(D)}}}}}const ec=Fg(),yV=["onClick"],_V={key:0,class:"pl-ag-columns__pin"},sh=r.defineComponent({__name:"PlAgGridColumnManager",props:{api:{}},setup(t){const e=t,{api:n}=r.toRefs(e),o=r.ref([]),i=r.ref(),l=r.ref(!1),c=r.ref(0);function d(h){const m=h.findIndex(y=>y.getId()===Un);if(m!==0){const[y]=h.splice(m,1);return h.splice(0,0,y)}return h}Kp(i,{handle:".handle",onChange(h){n.value.moveColumns(d(h.map(m=>o.value[m])),0)}});function p(h){n.value.setColumnsVisible([h],!h.isVisible())}return r.watch(()=>n.value,h=>{o.value=d(h.getAllGridColumns()),o.value.length>0&&h.moveColumns(o.value,0),h.addEventListener("displayedColumnsChanged",m=>{o.value=m.api.getAllGridColumns(),c.value++})},{immediate:!0}),(h,m)=>(r.openBlock(),r.createElementBlock("div",null,[(r.openBlock(),r.createBlock(r.Teleport,{to:`#${r.unref(ec)}`},[r.createVNode(r.unref(wo),{onClick:m[0]||(m[0]=r.withModifiers(y=>l.value=!l.value,["stop"]))},{append:r.withCtx(()=>[r.createVNode(r.unref(xt),{name:"columns"})]),default:r.withCtx(()=>[m[2]||(m[2]=r.createTextVNode(" Columns "))]),_:1})],8,["to"])),r.createVNode(r.unref(Rs),{modelValue:l.value,"onUpdate:modelValue":m[1]||(m[1]=y=>l.value=y),width:"368px","close-on-outside-click":""},{title:r.withCtx(()=>m[3]||(m[3]=[r.createTextVNode("Columns")])),default:r.withCtx(()=>[(r.openBlock(),r.createElementBlock("div",{ref_key:"listRef",ref:i,key:c.value,class:"pl-ag-columns"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,y=>(r.openBlock(),r.createElementBlock("div",{key:y.getId(),class:"pl-ag-columns__item"},[r.createElementVNode("div",{class:r.normalizeClass([{handle:!y.getColDef().lockPosition},"pl-ag-columns__drag"])},[r.createVNode(r.unref(At),{name:"drag-dots"})],2),r.createElementVNode("div",{class:r.normalizeClass([{visible:y.isVisible()},"pl-ag-columns__title text-s-btn"])},r.toDisplayString(y.getColDef().headerName),3),r.createElementVNode("div",{class:"pl-ag-columns__visibility",onClick:w=>p(y)},[r.createVNode(r.unref(Ct),{"close-delay":500,position:"top"},{tooltip:r.withCtx(()=>m[4]||(m[4]=[r.createTextVNode("Show/Hide")])),default:r.withCtx(()=>[r.createVNode(r.unref(xt),{name:y.isVisible()?"view-show":"view-hide"},null,8,["name"])]),_:2},1024)],8,yV),y.getColDef().lockPosition?(r.openBlock(),r.createElementBlock("div",_V,[r.createVNode(r.unref(xt),{name:"pin"})])):r.createCommentVNode("",!0)]))),128))]))]),_:1},8,["modelValue"])]))}}),CV=["id"],vV=r.defineComponent({__name:"PlAgDataTableToolsPanel",setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{id:r.unref(ec),class:"d-flex gap-6"},[r.renderSlot(e.$slots,"default")],8,CV))}}),wV={class:"ap-ag-data-table-container"},bV={key:1,class:"ap-ag-data-table-sheets"},xV=Ql(r.defineComponent({__name:"PlAgDataTable",props:r.mergeModels({settings:{},showColumnsPanel:{type:Boolean},showCellButtonForAxisId:{}},{modelValue:{default:{gridState:{}}},modelModifiers:{}}),emits:r.mergeModels(["onRowDoubleClicked","columnsChanged"],["update:modelValue"]),setup(t,{expose:e,emit:n}){x.ModuleRegistry.registerModules([hs.ClientSideRowModelModule,qd.ClipboardModule,Hd.ServerSideRowModelModule,Kd.RangeSelectionModule,ml,Lu]);const o=r.useModel(t,"modelValue"),i=t,{settings:l}=r.toRefs(i),c=n;o.value.pTableParams||(o.value.pTableParams={});function d(Z){return(Z==null?void 0:Z.sortModel.map(R=>{const{spec:O,...G}=oh(R.colId);return{column:G,ascending:R.sort==="asc",naAndAbsentAreLeastValues:!0}}))??[]}const p=r.computed({get:()=>{const Z=o.value;return{columnOrder:Z.gridState.columnOrder,sort:Z.gridState.sort,columnVisibility:Z.gridState.columnVisibility}},set:Z=>{var G;const R=((G=l.value)==null?void 0:G.sourceType)!=="ptable"||v.value.rowModelType==="clientSide"?void 0:d(Z.sort),O=o.value;o.value={...O,gridState:{...O.gridState,...Z},pTableParams:{...O.pTableParams,sorting:R}}}}),h=Z=>zr(jr(Z));function m(Z){var R,O;if(((R=l.value)==null?void 0:R.sourceType)==="ptable")return((O=l.value.sheets)==null?void 0:O.map(G=>({type:"bySingleColumnV2",column:{type:"axis",id:G.axis},predicate:{operator:"Equal",reference:Z[h(G.axis)]}})))??[]}const y=r.computed({get:()=>o.value.gridState.sheets??{},set:Z=>{const R=m(Z),O=o.value;o.value={...O,gridState:{...O.gridState,sheets:Z},pTableParams:{...O.pTableParams,filters:R}}}});r.watch(()=>l.value,(Z,R)=>{if((Z==null?void 0:Z.sourceType)!=="ptable"||!Z.sheets){y.value={};return}if(R&&R.sourceType==="ptable"&&Ye.isEqual(Z.sheets,R.sheets))return;const O=y.value,G={};for(const P of Z.sheets){const T=h(P.axis);G[T]=O[T]??P.defaultValue??P.options[0].value}y.value=G},{immediate:!0});const w=r.shallowRef(),v=r.shallowRef({animateRows:!1,suppressColumnMoveAnimation:!0,cellSelection:!0,initialState:p.value,autoSizeStrategy:{type:"fitCellContents"},onRowDoubleClicked:Z=>{Z.data&&c("onRowDoubleClicked",Z.data.key)},onSortChanged:Z=>{Z.api.refreshCells()},onFilterChanged:Z=>{Z.api.refreshCells()},defaultColDef:{suppressHeaderMenuButton:!0},maintainColumnOrder:!0,localeText:{loadingError:"..."},rowModelType:"clientSide",maxBlocksInCache:1e3,blockLoadDebounceMillis:500,serverSideSortAllLevels:!0,suppressServerSideFullWidthLoadingRow:!0,getRowId:Z=>Z.data.id,loading:!0,loadingOverlayComponentParams:{notReady:!0},loadingOverlayComponent:Yp,noRowsOverlayComponent:Xp,defaultCsvExportParams:{allColumns:!0,suppressQuotes:!0,fileName:"table.csv"}}),E=Z=>{const R=Z.api;th(R),w.value=new Proxy(R,{get(O,G,P){switch(G){case"setGridOption":return(T,M)=>{const U=v.value;U[T]=M,v.value=U,R.setGridOption(T,M)};case"updateGridOptions":return T=>{v.value={...v.value,...T},R.updateGridOptions(T)};default:return Reflect.get(O,G,P)}}})},z=Z=>({columnOrder:Z.columnOrder,sort:Z.sort,columnVisibility:Z.columnVisibility??(Z.columnOrder?{hiddenColIds:[]}:void 0)}),$=Z=>{v.value.initialState=p.value=z(Z.state),Z.api.autoSizeColumns(Z.api.getAllDisplayedColumns().filter(R=>R.getColId()!==Un))},S=()=>{v.value.initialState=p.value=z(w.value.getState()),w.value=void 0};let B=!1;const D=()=>{if(!B)return;const Z=w.value;Z!==void 0&&(Z.exportDataAsCsv(),B=!1,Z.setGridOption("cacheBlockSize",100))},H=()=>{if(!B)return;const Z=w.value;if(Z===void 0)return;const R=Z.getServerSideGroupLevelState()[0];R.cacheBlockSize===R.rowCount&&Z.refreshServerSide({route:R.route,purge:!1})};e({exportCsv:async()=>{const Z=w.value;if(Z!==void 0){if(v.value.rowModelType==="clientSide"){Z.exportDataAsCsv();return}if(v.value.rowModelType==="serverSide"){const R=Z.getServerSideGroupLevelState()[0];if(R.rowCount<=R.cacheBlockSize){Z.exportDataAsCsv();return}B||(B=!0,Z.setGridOption("cacheBlockSize",R.rowCount))}}}});const N=r.ref(0);r.watch(()=>[w.value,p.value],(Z,R)=>{if(Ye.isEqual(Z,R))return;const[O,G]=Z;if(!O)return;const P=z(O.getState());Ye.isEqual(G,P)||(v.value.initialState=G,++N.value)}),r.watch(()=>v.value,(Z,R)=>{var O,G;if(R){if(Z.rowModelType!=R.rowModelType&&++N.value,!Ye.isEqual(Z.columnDefs,R.columnDefs)&&Z.columnDefs){const P=U=>!("children"in U),M=(((O=Z.columnDefs)==null?void 0:O.filter(P))??[]).map(U=>U.colId).filter(U=>U!==void 0).filter(U=>U!==Un).map(U=>oh(U))??[];c("columnsChanged",M)}!Ye.isEqual(Z.loadingOverlayComponentParams,R.loadingOverlayComponentParams)&&Z.loading&&((G=w.value)==null||G.setGridOption("loading",!1),r.nextTick(()=>{var P;return(P=w.value)==null?void 0:P.setGridOption("loading",!0)}))}},{immediate:!0});const j=(Z,R)=>{var G;const O=y.value;if(O[Z]!==R)return O[Z]=R,y.value=O,(G=w.value)==null?void 0:G.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1}})};let J;return r.watch(()=>[w.value,l.value],async Z=>{var P,T;const[R,O]=Z;if(!R||Ye.isEqual(O,J))return;J=O;const G=O==null?void 0:O.sourceType;switch(G){case void 0:return R.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[],rowData:void 0,datasource:void 0});case"ptable":{if(!(O!=null&&O.pTable))return R.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},columnDefs:[],rowData:void 0,datasource:void 0});const M=xs().pFrameDriver,U=(T=(P=p.value)==null?void 0:P.columnVisibility)==null?void 0:T.hiddenColIds,X=await gV(M,O.pTable,O.sheets??[],U,i.showCellButtonForAxisId);return R.updateGridOptions({loading:!1,loadingOverlayComponentParams:{notReady:!1},...X})}case"xsv":{if(!(O==null?void 0:O.xsvFile))return R.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},columnDefs:[],rowData:void 0,datasource:void 0});xs().blobDriver;const U=await tV();return R.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},...U})}default:throw Error(`unsupported source type: ${G}`)}}),(Z,R)=>{var O;return r.openBlock(),r.createElementBlock("div",wV,[w.value&&Z.showColumnsPanel?(r.openBlock(),r.createBlock(r.unref(sh),{key:0,api:w.value},null,8,["api"])):r.createCommentVNode("",!0),((O=r.unref(l))==null?void 0:O.sourceType)==="ptable"&&r.unref(l).sheets&&r.unref(l).sheets.length>0?(r.openBlock(),r.createElementBlock("div",bV,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(l).sheets,(G,P)=>{var T,M;return r.openBlock(),r.createBlock(r.unref(vp),{key:P,"model-value":y.value[h(G.axis)],options:G.options,prefix:(((M=(T=G.axis.annotations)==null?void 0:T["pl7.app/label"])==null?void 0:M.trim())??`Unlabeled axis ${P}`)+":","onUpdate:modelValue":U=>j(h(G.axis),U)},null,8,["model-value","options","prefix","onUpdate:modelValue"])}),128))])):r.createCommentVNode("",!0),(r.openBlock(),r.createBlock(r.unref(Pg.AgGridVue),{key:N.value,theme:r.unref(Mu),class:"ap-ag-data-table-grid","grid-options":v.value,onGridReady:E,onStateUpdated:$,onGridPreDestroyed:S,onStoreRefreshed:D,onModelUpdated:H},null,8,["theme","grid-options"]))])}}}),[["__scopeId","data-v-6bef98d8"]]),kV={key:1,class:"alert-error"},SV={key:2},EV=r.defineComponent({__name:"ValueOrErrorsComponent",props:{valueOrError:{}},setup(t){const e=t,n=r.computed(()=>e.valueOrError&&e.valueOrError.ok?e.valueOrError.value:void 0),o=r.computed(()=>e.valueOrError&&!e.valueOrError.ok?e.valueOrError.errors:void 0),i=r.computed(()=>n.value===void 0&&o.value===void 0);return(l,c)=>(r.openBlock(),r.createElementBlock("div",null,[n.value!==void 0?r.renderSlot(l.$slots,"default",r.normalizeProps(r.mergeProps({key:0},{value:n.value}))):r.createCommentVNode("",!0),o.value?(r.openBlock(),r.createElementBlock("div",kV,r.toDisplayString(o.value),1)):r.createCommentVNode("",!0),i.value?(r.openBlock(),r.createElementBlock("div",SV,"Unresolved")):r.createCommentVNode("",!0)]))}}),TV={style:{height:"100%"}},NV=r.defineComponent({__name:"PlAgCellFile",props:{params:{}},setup(t){const e=t,n=r.computed(()=>e.params.extensions),o=r.computed(()=>e.params.value);function i(c){e.params.setValue(c)}const l=r.computed(()=>e.params.resolveProgress?e.params.resolveProgress(o.value):void 0);return(c,d)=>(r.openBlock(),r.createElementBlock("div",TV,[r.createVNode(r.unref(Zp),{"show-filename-only":"",clearable:"","cell-style":"","file-dialog-title":"Select any file",placeholder:`Choose file ${n.value?n.value[0]:""}`,extensions:n.value,"model-value":o.value,progress:l.value,"onUpdate:modelValue":i},null,8,["placeholder","extensions","model-value","progress"])]))}});var tc={exports:{}};const VV="2.0.0",ah=256,AV=Number.MAX_SAFE_INTEGER||9007199254740991,BV=16,PV=ah-6;var js={MAX_LENGTH:ah,MAX_SAFE_COMPONENT_LENGTH:BV,MAX_SAFE_BUILD_LENGTH:PV,MAX_SAFE_INTEGER:AV,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:VV,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Hs=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};(function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:i}=js,l=Hs;e=t.exports={};const c=e.re=[],d=e.safeRe=[],p=e.src=[],h=e.t={};let m=0;const y="[a-zA-Z0-9-]",w=[["\\s",1],["\\d",i],[y,o]],v=z=>{for(const[$,S]of w)z=z.split(`${$}*`).join(`${$}{0,${S}}`).split(`${$}+`).join(`${$}{1,${S}}`);return z},E=(z,$,S)=>{const B=v($),D=m++;l(z,D,$),h[z]=D,p[D]=$,c[D]=new RegExp($,S?"g":void 0),d[D]=new RegExp(B,S?"g":void 0)};E("NUMERICIDENTIFIER","0|[1-9]\\d*"),E("NUMERICIDENTIFIERLOOSE","\\d+"),E("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${y}*`),E("MAINVERSION",`(${p[h.NUMERICIDENTIFIER]})\\.(${p[h.NUMERICIDENTIFIER]})\\.(${p[h.NUMERICIDENTIFIER]})`),E("MAINVERSIONLOOSE",`(${p[h.NUMERICIDENTIFIERLOOSE]})\\.(${p[h.NUMERICIDENTIFIERLOOSE]})\\.(${p[h.NUMERICIDENTIFIERLOOSE]})`),E("PRERELEASEIDENTIFIER",`(?:${p[h.NUMERICIDENTIFIER]}|${p[h.NONNUMERICIDENTIFIER]})`),E("PRERELEASEIDENTIFIERLOOSE",`(?:${p[h.NUMERICIDENTIFIERLOOSE]}|${p[h.NONNUMERICIDENTIFIER]})`),E("PRERELEASE",`(?:-(${p[h.PRERELEASEIDENTIFIER]}(?:\\.${p[h.PRERELEASEIDENTIFIER]})*))`),E("PRERELEASELOOSE",`(?:-?(${p[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${p[h.PRERELEASEIDENTIFIERLOOSE]})*))`),E("BUILDIDENTIFIER",`${y}+`),E("BUILD",`(?:\\+(${p[h.BUILDIDENTIFIER]}(?:\\.${p[h.BUILDIDENTIFIER]})*))`),E("FULLPLAIN",`v?${p[h.MAINVERSION]}${p[h.PRERELEASE]}?${p[h.BUILD]}?`),E("FULL",`^${p[h.FULLPLAIN]}$`),E("LOOSEPLAIN",`[v=\\s]*${p[h.MAINVERSIONLOOSE]}${p[h.PRERELEASELOOSE]}?${p[h.BUILD]}?`),E("LOOSE",`^${p[h.LOOSEPLAIN]}$`),E("GTLT","((?:<|>)?=?)"),E("XRANGEIDENTIFIERLOOSE",`${p[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),E("XRANGEIDENTIFIER",`${p[h.NUMERICIDENTIFIER]}|x|X|\\*`),E("XRANGEPLAIN",`[v=\\s]*(${p[h.XRANGEIDENTIFIER]})(?:\\.(${p[h.XRANGEIDENTIFIER]})(?:\\.(${p[h.XRANGEIDENTIFIER]})(?:${p[h.PRERELEASE]})?${p[h.BUILD]}?)?)?`),E("XRANGEPLAINLOOSE",`[v=\\s]*(${p[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[h.XRANGEIDENTIFIERLOOSE]})(?:${p[h.PRERELEASELOOSE]})?${p[h.BUILD]}?)?)?`),E("XRANGE",`^${p[h.GTLT]}\\s*${p[h.XRANGEPLAIN]}$`),E("XRANGELOOSE",`^${p[h.GTLT]}\\s*${p[h.XRANGEPLAINLOOSE]}$`),E("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),E("COERCE",`${p[h.COERCEPLAIN]}(?:$|[^\\d])`),E("COERCEFULL",p[h.COERCEPLAIN]+`(?:${p[h.PRERELEASE]})?(?:${p[h.BUILD]})?(?:$|[^\\d])`),E("COERCERTL",p[h.COERCE],!0),E("COERCERTLFULL",p[h.COERCEFULL],!0),E("LONETILDE","(?:~>?)"),E("TILDETRIM",`(\\s*)${p[h.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",E("TILDE",`^${p[h.LONETILDE]}${p[h.XRANGEPLAIN]}$`),E("TILDELOOSE",`^${p[h.LONETILDE]}${p[h.XRANGEPLAINLOOSE]}$`),E("LONECARET","(?:\\^)"),E("CARETTRIM",`(\\s*)${p[h.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",E("CARET",`^${p[h.LONECARET]}${p[h.XRANGEPLAIN]}$`),E("CARETLOOSE",`^${p[h.LONECARET]}${p[h.XRANGEPLAINLOOSE]}$`),E("COMPARATORLOOSE",`^${p[h.GTLT]}\\s*(${p[h.LOOSEPLAIN]})$|^$`),E("COMPARATOR",`^${p[h.GTLT]}\\s*(${p[h.FULLPLAIN]})$|^$`),E("COMPARATORTRIM",`(\\s*)${p[h.GTLT]}\\s*(${p[h.LOOSEPLAIN]}|${p[h.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",E("HYPHENRANGE",`^\\s*(${p[h.XRANGEPLAIN]})\\s+-\\s+(${p[h.XRANGEPLAIN]})\\s*$`),E("HYPHENRANGELOOSE",`^\\s*(${p[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${p[h.XRANGEPLAINLOOSE]})\\s*$`),E("STAR","(<|>)?=?\\s*\\*"),E("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),E("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(tc,tc.exports);var Gi=tc.exports;const RV=Object.freeze({loose:!0}),DV=Object.freeze({});var nc=t=>t?typeof t!="object"?RV:t:DV;const lh=/^[0-9]+$/,ch=(t,e)=>{const n=lh.test(t),o=lh.test(e);return n&&o&&(t=+t,e=+e),t===e?0:n&&!o?-1:o&&!n?1:t<e?-1:1};var dh={compareIdentifiers:ch,rcompareIdentifiers:(t,e)=>ch(e,t)};const qs=Hs,{MAX_LENGTH:uh,MAX_SAFE_INTEGER:Ks}=js,{safeRe:ph,t:hh}=Gi,IV=nc,{compareIdentifiers:Vo}=dh;var Pt=class qn{constructor(e,n){if(n=IV(n),e instanceof qn){if(e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>uh)throw new TypeError(`version is longer than ${uh} characters`);qs("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const o=e.trim().match(n.loose?ph[hh.LOOSE]:ph[hh.FULL]);if(!o)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>Ks||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Ks||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Ks||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){const l=+i;if(l>=0&&l<Ks)return l}return i}):this.prerelease=[],this.build=o[5]?o[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(qs("SemVer.compare",this.version,this.options,e),!(e instanceof qn)){if(typeof e=="string"&&e===this.version)return 0;e=new qn(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof qn||(e=new qn(e,this.options)),Vo(this.major,e.major)||Vo(this.minor,e.minor)||Vo(this.patch,e.patch)}comparePre(e){if(e instanceof qn||(e=new qn(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let n=0;do{const o=this.prerelease[n],i=e.prerelease[n];if(qs("prerelease compare",n,o,i),o===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(o===void 0)return-1;if(o===i)continue;return Vo(o,i)}while(++n)}compareBuild(e){e instanceof qn||(e=new qn(e,this.options));let n=0;do{const o=this.build[n],i=e.build[n];if(qs("build compare",n,o,i),o===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(o===void 0)return-1;if(o===i)continue;return Vo(o,i)}while(++n)}inc(e,n,o){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,o);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,o);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,o),this.inc("pre",n,o);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,o),this.inc("pre",n,o);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const i=Number(o)?1:0;if(!n&&o===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[i];else{let l=this.prerelease.length;for(;--l>=0;)typeof this.prerelease[l]=="number"&&(this.prerelease[l]++,l=-2);if(l===-1){if(n===this.prerelease.join(".")&&o===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(n){let l=[n,i];o===!1&&(l=[n]),Vo(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=l):this.prerelease=l}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};const fh=Pt;var Ao=(t,e,n=!1)=>{if(t instanceof fh)return t;try{return new fh(t,e)}catch(o){if(!n)return null;throw o}};const FV=Ao;var LV=(t,e)=>{const n=FV(t,e);return n?n.version:null};const OV=Ao;var MV=(t,e)=>{const n=OV(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null};const mh=Pt;var GV=(t,e,n,o,i)=>{typeof n=="string"&&(i=o,o=n,n=void 0);try{return new mh(t instanceof mh?t.version:t,n).inc(e,o,i).version}catch{return null}};const gh=Ao;var $V=(t,e)=>{const n=gh(t,null,!0),o=gh(e,null,!0),i=n.compare(o);if(i===0)return null;const l=i>0,c=l?n:o,d=l?o:n,p=!!c.prerelease.length;if(!!d.prerelease.length&&!p)return!d.patch&&!d.minor?"major":c.patch?"patch":c.minor?"minor":"major";const m=p?"pre":"";return n.major!==o.major?m+"major":n.minor!==o.minor?m+"minor":n.patch!==o.patch?m+"patch":"prerelease"};const zV=Pt;var UV=(t,e)=>new zV(t,e).major;const ZV=Pt;var WV=(t,e)=>new ZV(t,e).minor;const jV=Pt;var HV=(t,e)=>new jV(t,e).patch;const qV=Ao;var KV=(t,e)=>{const n=qV(t,e);return n&&n.prerelease.length?n.prerelease:null};const yh=Pt;var _n=(t,e,n)=>new yh(t,n).compare(new yh(e,n));const YV=_n;var XV=(t,e,n)=>YV(e,t,n);const JV=_n;var QV=(t,e)=>JV(t,e,!0);const _h=Pt;var rc=(t,e,n)=>{const o=new _h(t,n),i=new _h(e,n);return o.compare(i)||o.compareBuild(i)};const eA=rc;var tA=(t,e)=>t.sort((n,o)=>eA(n,o,e));const nA=rc;var rA=(t,e)=>t.sort((n,o)=>nA(o,n,e));const oA=_n;var Ys=(t,e,n)=>oA(t,e,n)>0;const iA=_n;var oc=(t,e,n)=>iA(t,e,n)<0;const sA=_n;var Ch=(t,e,n)=>sA(t,e,n)===0;const aA=_n;var vh=(t,e,n)=>aA(t,e,n)!==0;const lA=_n;var ic=(t,e,n)=>lA(t,e,n)>=0;const cA=_n;var sc=(t,e,n)=>cA(t,e,n)<=0;const dA=Ch,uA=vh,pA=Ys,hA=ic,fA=oc,mA=sc;var wh=(t,e,n,o)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t===n;case"!==":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t!==n;case"":case"=":case"==":return dA(t,n,o);case"!=":return uA(t,n,o);case">":return pA(t,n,o);case">=":return hA(t,n,o);case"<":return fA(t,n,o);case"<=":return mA(t,n,o);default:throw new TypeError(`Invalid operator: ${e}`)}};const gA=Pt,yA=Ao,{safeRe:Xs,t:Js}=Gi;var _A=(t,e)=>{if(t instanceof gA)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let n=null;if(!e.rtl)n=t.match(e.includePrerelease?Xs[Js.COERCEFULL]:Xs[Js.COERCE]);else{const p=e.includePrerelease?Xs[Js.COERCERTLFULL]:Xs[Js.COERCERTL];let h;for(;(h=p.exec(t))&&(!n||n.index+n[0].length!==t.length);)(!n||h.index+h[0].length!==n.index+n[0].length)&&(n=h),p.lastIndex=h.index+h[1].length+h[2].length;p.lastIndex=-1}if(n===null)return null;const o=n[2],i=n[3]||"0",l=n[4]||"0",c=e.includePrerelease&&n[5]?`-${n[5]}`:"",d=e.includePrerelease&&n[6]?`+${n[6]}`:"";return yA(`${o}.${i}.${l}${c}${d}`,e)},CA=class{constructor(){this.max=1e3,this.map=new Map}get(e){const n=this.map.get(e);if(n!==void 0)return this.map.delete(e),this.map.set(e,n),n}delete(e){return this.map.delete(e)}set(e,n){if(!this.delete(e)&&n!==void 0){if(this.map.size>=this.max){const i=this.map.keys().next().value;this.delete(i)}this.map.set(e,n)}return this}},ac,bh;function Cn(){if(bh)return ac;bh=1;const t=/\s+/g;class e{constructor(M,U){if(U=i(U),M instanceof e)return M.loose===!!U.loose&&M.includePrerelease===!!U.includePrerelease?M:new e(M.raw,U);if(M instanceof l)return this.raw=M.value,this.set=[[M]],this.formatted=void 0,this;if(this.options=U,this.loose=!!U.loose,this.includePrerelease=!!U.includePrerelease,this.raw=M.trim().replace(t," "),this.set=this.raw.split("||").map(X=>this.parseRange(X.trim())).filter(X=>X.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const X=this.set[0];if(this.set=this.set.filter(ne=>!z(ne[0])),this.set.length===0)this.set=[X];else if(this.set.length>1){for(const ne of this.set)if(ne.length===1&&$(ne[0])){this.set=[ne];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let M=0;M<this.set.length;M++){M>0&&(this.formatted+="||");const U=this.set[M];for(let X=0;X<U.length;X++)X>0&&(this.formatted+=" "),this.formatted+=U[X].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(M){const X=((this.options.includePrerelease&&v)|(this.options.loose&&E))+":"+M,ne=o.get(X);if(ne)return ne;const de=this.options.loose,me=de?p[h.HYPHENRANGELOOSE]:p[h.HYPHENRANGE];M=M.replace(me,G(this.options.includePrerelease)),c("hyphen replace",M),M=M.replace(p[h.COMPARATORTRIM],m),c("comparator trim",M),M=M.replace(p[h.TILDETRIM],y),c("tilde trim",M),M=M.replace(p[h.CARETTRIM],w),c("caret trim",M);let Te=M.split(" ").map(qe=>B(qe,this.options)).join(" ").split(/\s+/).map(qe=>O(qe,this.options));de&&(Te=Te.filter(qe=>(c("loose invalid filter",qe,this.options),!!qe.match(p[h.COMPARATORLOOSE])))),c("range list",Te);const Se=new Map,je=Te.map(qe=>new l(qe,this.options));for(const qe of je){if(z(qe))return[qe];Se.set(qe.value,qe)}Se.size>1&&Se.has("")&&Se.delete("");const It=[...Se.values()];return o.set(X,It),It}intersects(M,U){if(!(M instanceof e))throw new TypeError("a Range is required");return this.set.some(X=>S(X,U)&&M.set.some(ne=>S(ne,U)&&X.every(de=>ne.every(me=>de.intersects(me,U)))))}test(M){if(!M)return!1;if(typeof M=="string")try{M=new d(M,this.options)}catch{return!1}for(let U=0;U<this.set.length;U++)if(P(this.set[U],M,this.options))return!0;return!1}}ac=e;const n=CA,o=new n,i=nc,l=Qs(),c=Hs,d=Pt,{safeRe:p,t:h,comparatorTrimReplace:m,tildeTrimReplace:y,caretTrimReplace:w}=Gi,{FLAG_INCLUDE_PRERELEASE:v,FLAG_LOOSE:E}=js,z=T=>T.value==="<0.0.0-0",$=T=>T.value==="",S=(T,M)=>{let U=!0;const X=T.slice();let ne=X.pop();for(;U&&X.length;)U=X.every(de=>ne.intersects(de,M)),ne=X.pop();return U},B=(T,M)=>(c("comp",T,M),T=N(T,M),c("caret",T),T=H(T,M),c("tildes",T),T=J(T,M),c("xrange",T),T=R(T,M),c("stars",T),T),D=T=>!T||T.toLowerCase()==="x"||T==="*",H=(T,M)=>T.trim().split(/\s+/).map(U=>A(U,M)).join(" "),A=(T,M)=>{const U=M.loose?p[h.TILDELOOSE]:p[h.TILDE];return T.replace(U,(X,ne,de,me,Te)=>{c("tilde",T,X,ne,de,me,Te);let Se;return D(ne)?Se="":D(de)?Se=`>=${ne}.0.0 <${+ne+1}.0.0-0`:D(me)?Se=`>=${ne}.${de}.0 <${ne}.${+de+1}.0-0`:Te?(c("replaceTilde pr",Te),Se=`>=${ne}.${de}.${me}-${Te} <${ne}.${+de+1}.0-0`):Se=`>=${ne}.${de}.${me} <${ne}.${+de+1}.0-0`,c("tilde return",Se),Se})},N=(T,M)=>T.trim().split(/\s+/).map(U=>j(U,M)).join(" "),j=(T,M)=>{c("caret",T,M);const U=M.loose?p[h.CARETLOOSE]:p[h.CARET],X=M.includePrerelease?"-0":"";return T.replace(U,(ne,de,me,Te,Se)=>{c("caret",T,ne,de,me,Te,Se);let je;return D(de)?je="":D(me)?je=`>=${de}.0.0${X} <${+de+1}.0.0-0`:D(Te)?de==="0"?je=`>=${de}.${me}.0${X} <${de}.${+me+1}.0-0`:je=`>=${de}.${me}.0${X} <${+de+1}.0.0-0`:Se?(c("replaceCaret pr",Se),de==="0"?me==="0"?je=`>=${de}.${me}.${Te}-${Se} <${de}.${me}.${+Te+1}-0`:je=`>=${de}.${me}.${Te}-${Se} <${de}.${+me+1}.0-0`:je=`>=${de}.${me}.${Te}-${Se} <${+de+1}.0.0-0`):(c("no pr"),de==="0"?me==="0"?je=`>=${de}.${me}.${Te}${X} <${de}.${me}.${+Te+1}-0`:je=`>=${de}.${me}.${Te}${X} <${de}.${+me+1}.0-0`:je=`>=${de}.${me}.${Te} <${+de+1}.0.0-0`),c("caret return",je),je})},J=(T,M)=>(c("replaceXRanges",T,M),T.split(/\s+/).map(U=>Z(U,M)).join(" ")),Z=(T,M)=>{T=T.trim();const U=M.loose?p[h.XRANGELOOSE]:p[h.XRANGE];return T.replace(U,(X,ne,de,me,Te,Se)=>{c("xRange",T,X,ne,de,me,Te,Se);const je=D(de),It=je||D(me),qe=It||D(Te),Zn=qe;return ne==="="&&Zn&&(ne=""),Se=M.includePrerelease?"-0":"",je?ne===">"||ne==="<"?X="<0.0.0-0":X="*":ne&&Zn?(It&&(me=0),Te=0,ne===">"?(ne=">=",It?(de=+de+1,me=0,Te=0):(me=+me+1,Te=0)):ne==="<="&&(ne="<",It?de=+de+1:me=+me+1),ne==="<"&&(Se="-0"),X=`${ne+de}.${me}.${Te}${Se}`):It?X=`>=${de}.0.0${Se} <${+de+1}.0.0-0`:qe&&(X=`>=${de}.${me}.0${Se} <${de}.${+me+1}.0-0`),c("xRange return",X),X})},R=(T,M)=>(c("replaceStars",T,M),T.trim().replace(p[h.STAR],"")),O=(T,M)=>(c("replaceGTE0",T,M),T.trim().replace(p[M.includePrerelease?h.GTE0PRE:h.GTE0],"")),G=T=>(M,U,X,ne,de,me,Te,Se,je,It,qe,Zn)=>(D(X)?U="":D(ne)?U=`>=${X}.0.0${T?"-0":""}`:D(de)?U=`>=${X}.${ne}.0${T?"-0":""}`:me?U=`>=${U}`:U=`>=${U}${T?"-0":""}`,D(je)?Se="":D(It)?Se=`<${+je+1}.0.0-0`:D(qe)?Se=`<${je}.${+It+1}.0-0`:Zn?Se=`<=${je}.${It}.${qe}-${Zn}`:T?Se=`<${je}.${It}.${+qe+1}-0`:Se=`<=${Se}`,`${U} ${Se}`.trim()),P=(T,M,U)=>{for(let X=0;X<T.length;X++)if(!T[X].test(M))return!1;if(M.prerelease.length&&!U.includePrerelease){for(let X=0;X<T.length;X++)if(c(T[X].semver),T[X].semver!==l.ANY&&T[X].semver.prerelease.length>0){const ne=T[X].semver;if(ne.major===M.major&&ne.minor===M.minor&&ne.patch===M.patch)return!0}return!1}return!0};return ac}var lc,xh;function Qs(){if(xh)return lc;xh=1;const t=Symbol("SemVer ANY");class e{static get ANY(){return t}constructor(m,y){if(y=n(y),m instanceof e){if(m.loose===!!y.loose)return m;m=m.value}m=m.trim().split(/\s+/).join(" "),c("comparator",m,y),this.options=y,this.loose=!!y.loose,this.parse(m),this.semver===t?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(m){const y=this.options.loose?o[i.COMPARATORLOOSE]:o[i.COMPARATOR],w=m.match(y);if(!w)throw new TypeError(`Invalid comparator: ${m}`);this.operator=w[1]!==void 0?w[1]:"",this.operator==="="&&(this.operator=""),w[2]?this.semver=new d(w[2],this.options.loose):this.semver=t}toString(){return this.value}test(m){if(c("Comparator.test",m,this.options.loose),this.semver===t||m===t)return!0;if(typeof m=="string")try{m=new d(m,this.options)}catch{return!1}return l(m,this.operator,this.semver,this.options)}intersects(m,y){if(!(m instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new p(m.value,y).test(this.value):m.operator===""?m.value===""?!0:new p(this.value,y).test(m.semver):(y=n(y),y.includePrerelease&&(this.value==="<0.0.0-0"||m.value==="<0.0.0-0")||!y.includePrerelease&&(this.value.startsWith("<0.0.0")||m.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&m.operator.startsWith(">")||this.operator.startsWith("<")&&m.operator.startsWith("<")||this.semver.version===m.semver.version&&this.operator.includes("=")&&m.operator.includes("=")||l(this.semver,"<",m.semver,y)&&this.operator.startsWith(">")&&m.operator.startsWith("<")||l(this.semver,">",m.semver,y)&&this.operator.startsWith("<")&&m.operator.startsWith(">")))}}lc=e;const n=nc,{safeRe:o,t:i}=Gi,l=wh,c=Hs,d=Pt,p=Cn();return lc}const vA=Cn();var ea=(t,e,n)=>{try{e=new vA(e,n)}catch{return!1}return e.test(t)};const wA=Cn();var bA=(t,e)=>new wA(t,e).set.map(n=>n.map(o=>o.value).join(" ").trim().split(" "));const xA=Pt,kA=Cn();var SA=(t,e,n)=>{let o=null,i=null,l=null;try{l=new kA(e,n)}catch{return null}return t.forEach(c=>{l.test(c)&&(!o||i.compare(c)===-1)&&(o=c,i=new xA(o,n))}),o};const EA=Pt,TA=Cn();var NA=(t,e,n)=>{let o=null,i=null,l=null;try{l=new TA(e,n)}catch{return null}return t.forEach(c=>{l.test(c)&&(!o||i.compare(c)===1)&&(o=c,i=new EA(o,n))}),o};const cc=Pt,VA=Cn(),kh=Ys;var AA=(t,e)=>{t=new VA(t,e);let n=new cc("0.0.0");if(t.test(n)||(n=new cc("0.0.0-0"),t.test(n)))return n;n=null;for(let o=0;o<t.set.length;++o){const i=t.set[o];let l=null;i.forEach(c=>{const d=new cc(c.semver.version);switch(c.operator){case">":d.prerelease.length===0?d.patch++:d.prerelease.push(0),d.raw=d.format();case"":case">=":(!l||kh(d,l))&&(l=d);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),l&&(!n||kh(n,l))&&(n=l)}return n&&t.test(n)?n:null};const BA=Cn();var PA=(t,e)=>{try{return new BA(t,e).range||"*"}catch{return null}};const RA=Pt,Sh=Qs(),{ANY:DA}=Sh,IA=Cn(),FA=ea,Eh=Ys,Th=oc,LA=sc,OA=ic;var dc=(t,e,n,o)=>{t=new RA(t,o),e=new IA(e,o);let i,l,c,d,p;switch(n){case">":i=Eh,l=LA,c=Th,d=">",p=">=";break;case"<":i=Th,l=OA,c=Eh,d="<",p="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(FA(t,e,o))return!1;for(let h=0;h<e.set.length;++h){const m=e.set[h];let y=null,w=null;if(m.forEach(v=>{v.semver===DA&&(v=new Sh(">=0.0.0")),y=y||v,w=w||v,i(v.semver,y.semver,o)?y=v:c(v.semver,w.semver,o)&&(w=v)}),y.operator===d||y.operator===p||(!w.operator||w.operator===d)&&l(t,w.semver))return!1;if(w.operator===p&&c(t,w.semver))return!1}return!0};const MA=dc;var GA=(t,e,n)=>MA(t,e,">",n);const $A=dc;var zA=(t,e,n)=>$A(t,e,"<",n);const Nh=Cn();var UA=(t,e,n)=>(t=new Nh(t,n),e=new Nh(e,n),t.intersects(e,n));const ZA=ea,WA=_n;var jA=(t,e,n)=>{const o=[];let i=null,l=null;const c=t.sort((m,y)=>WA(m,y,n));for(const m of c)ZA(m,e,n)?(l=m,i||(i=m)):(l&&o.push([i,l]),l=null,i=null);i&&o.push([i,null]);const d=[];for(const[m,y]of o)m===y?d.push(m):!y&&m===c[0]?d.push("*"):y?m===c[0]?d.push(`<=${y}`):d.push(`${m} - ${y}`):d.push(`>=${m}`);const p=d.join(" || "),h=typeof e.raw=="string"?e.raw:String(e);return p.length<h.length?p:e};const Vh=Cn(),uc=Qs(),{ANY:pc}=uc,$i=ea,hc=_n,HA=(t,e,n={})=>{if(t===e)return!0;t=new Vh(t,n),e=new Vh(e,n);let o=!1;e:for(const i of t.set){for(const l of e.set){const c=KA(i,l,n);if(o=o||c!==null,c)continue e}if(o)return!1}return!0},qA=[new uc(">=0.0.0-0")],Ah=[new uc(">=0.0.0")],KA=(t,e,n)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===pc){if(e.length===1&&e[0].semver===pc)return!0;n.includePrerelease?t=qA:t=Ah}if(e.length===1&&e[0].semver===pc){if(n.includePrerelease)return!0;e=Ah}const o=new Set;let i,l;for(const v of t)v.operator===">"||v.operator===">="?i=Bh(i,v,n):v.operator==="<"||v.operator==="<="?l=Ph(l,v,n):o.add(v.semver);if(o.size>1)return null;let c;if(i&&l){if(c=hc(i.semver,l.semver,n),c>0)return null;if(c===0&&(i.operator!==">="||l.operator!=="<="))return null}for(const v of o){if(i&&!$i(v,String(i),n)||l&&!$i(v,String(l),n))return null;for(const E of e)if(!$i(v,String(E),n))return!1;return!0}let d,p,h,m,y=l&&!n.includePrerelease&&l.semver.prerelease.length?l.semver:!1,w=i&&!n.includePrerelease&&i.semver.prerelease.length?i.semver:!1;y&&y.prerelease.length===1&&l.operator==="<"&&y.prerelease[0]===0&&(y=!1);for(const v of e){if(m=m||v.operator===">"||v.operator===">=",h=h||v.operator==="<"||v.operator==="<=",i){if(w&&v.semver.prerelease&&v.semver.prerelease.length&&v.semver.major===w.major&&v.semver.minor===w.minor&&v.semver.patch===w.patch&&(w=!1),v.operator===">"||v.operator===">="){if(d=Bh(i,v,n),d===v&&d!==i)return!1}else if(i.operator===">="&&!$i(i.semver,String(v),n))return!1}if(l){if(y&&v.semver.prerelease&&v.semver.prerelease.length&&v.semver.major===y.major&&v.semver.minor===y.minor&&v.semver.patch===y.patch&&(y=!1),v.operator==="<"||v.operator==="<="){if(p=Ph(l,v,n),p===v&&p!==l)return!1}else if(l.operator==="<="&&!$i(l.semver,String(v),n))return!1}if(!v.operator&&(l||i)&&c!==0)return!1}return!(i&&h&&!l&&c!==0||l&&m&&!i&&c!==0||w||y)},Bh=(t,e,n)=>{if(!t)return e;const o=hc(t.semver,e.semver,n);return o>0?t:o<0||e.operator===">"&&t.operator===">="?e:t},Ph=(t,e,n)=>{if(!t)return e;const o=hc(t.semver,e.semver,n);return o<0?t:o>0||e.operator==="<"&&t.operator==="<="?e:t};var YA=HA;const fc=Gi,Rh=js,XA=Pt,Dh=dh,JA=Ao,QA=LV,eB=MV,tB=GV,nB=$V,rB=UV,oB=WV,iB=HV,sB=KV,aB=_n,lB=XV,cB=QV,dB=rc,uB=tA,pB=rA,hB=Ys,fB=oc,mB=Ch,gB=vh,yB=ic,_B=sc,CB=wh,vB=_A,wB=Qs(),bB=Cn();var xB={parse:JA,valid:QA,clean:eB,inc:tB,diff:nB,major:rB,minor:oB,patch:iB,prerelease:sB,compare:aB,rcompare:lB,compareLoose:cB,compareBuild:dB,sort:uB,rsort:pB,gt:hB,lt:fB,eq:mB,neq:gB,gte:yB,lte:_B,cmp:CB,coerce:vB,Comparator:wB,Range:bB,satisfies:ea,toComparators:bA,maxSatisfying:SA,minSatisfying:NA,minVersion:AA,validRange:PA,outside:dc,gtr:GA,ltr:zA,intersects:UA,simplifyRange:jA,subset:YA,SemVer:XA,re:fc.re,src:fc.src,tokens:fc.t,SEMVER_SPEC_VERSION:Rh.SEMVER_SPEC_VERSION,RELEASE_TYPES:Rh.RELEASE_TYPES,compareIdentifiers:Dh.compareIdentifiers,rcompareIdentifiers:Dh.rcompareIdentifiers};const kB=eu(xB);function SB(t){return zr(t.id)}function EB(t){switch(t){case"isNotNA":return"Is not NA";case"isNA":return"Is NA";case"number_equals":case"string_equals":return"Equals";case"number_notEquals":case"string_notEquals":return"Not equals";case"number_greaterThan":return"Greater than";case"number_greaterThanOrEqualTo":return"Greater than or equal to";case"number_lessThan":return"Less than";case"number_lessThanOrEqualTo":return"Less than or equal to";case"number_between":return"Between";case"string_contains":return"Contains";case"string_doesNotContain":return"Does not contain";case"string_matches":return"Matches";case"string_doesNotMatch":return"Does not match";case"string_containsFuzzyMatch":return"Contains fuzzy match";default:throw Error(`unsupported filter type: ${t}`)}}const TB=["isNotNA","isNA","number_equals","number_notEquals","number_greaterThan","number_greaterThanOrEqualTo","number_lessThan","number_lessThanOrEqualTo","number_between"],NB=["isNotNA","isNA","string_equals","string_notEquals","string_contains","string_doesNotContain","string_matches","string_doesNotMatch","string_containsFuzzyMatch"];function Ih(t,e){var n,o;return((o=(n=t.spec.annotations)==null?void 0:n["pl7.app/label"])==null?void 0:o.trim())??"Unlabeled "+t.type+" "+e.toString()}function VB(t){const e=t.type;switch(e){case"isNotNA":case"isNA":return;case"number_equals":case"number_notEquals":case"number_greaterThan":case"number_greaterThanOrEqualTo":case"number_lessThan":case"number_lessThanOrEqualTo":return t.reference;case"number_between":return t.lowerBound;case"string_equals":case"string_notEquals":case"string_contains":case"string_doesNotContain":case"string_matches":case"string_doesNotMatch":case"string_containsFuzzyMatch":return t.reference;default:throw Error(`unsupported filter type: ${e}`)}}function Fh(t,e){switch(t){case"isNotNA":case"isNA":return{type:t};case"number_equals":case"number_notEquals":case"number_greaterThan":case"number_greaterThanOrEqualTo":case"number_lessThan":case"number_lessThanOrEqualTo":return{type:t,reference:typeof e=="number"?e:0};case"number_between":return{type:t,lowerBound:typeof e=="number"?e:0,includeLowerBound:!0,upperBound:100,includeUpperBound:!1};case"string_equals":case"string_notEquals":case"string_contains":case"string_doesNotContain":case"string_matches":case"string_doesNotMatch":return{type:t,reference:typeof e=="string"?e:""};case"string_containsFuzzyMatch":return{type:t,reference:typeof e=="string"?e:"",maxEdits:2,substitutionsOnly:!1,wildcard:void 0};default:throw Error(`unsupported filter type: ${t}`)}}function AB(t,e){return{columnId:t.columnId,filter:Fh(e,VB(t.filter)),disabled:t.disabled}}function mc(t,e){var c,d;const n=Number(e);if(!Number.isFinite(n))throw Error("Model value is not a number.");const o=t.type==="column"?t.spec.valueType:t.spec.type;if((o==="Int"||o==="Long")&&!Number.isInteger(n))throw Error("Model value is not an integer.");const i=(c=t.spec.annotations)==null?void 0:c["pl7.app/min"];if(i!==void 0){const p=Number(i);if(Number.isFinite(p)&&n<Number(i))throw Error("Model value is too low.")}const l=(d=t.spec.annotations)==null?void 0:d["pl7.app/max"];if(l!==void 0){const p=Number(l);if(Number.isFinite(p)&&n>Number(l))throw Error("Model value is too high.")}return n}function Lh(t,e){var o,i;const n=((o=t.spec.domain)==null?void 0:o["pl7.app/alphabet"])??((i=t.spec.annotations)==null?void 0:i["pl7.app/alphabet"]);if(n==="nucleotide"&&!/^[AaTtGgCcNn]+$/.test(e))throw Error("Model value is not a nucleotide.");if(n==="aminoacid"&&!/^[AaCcDdEeFfGgHhIiKkLlMmNnPpQqRrSsTtVvWwYyXx]+$/.test(e))throw Error("Model value is not an aminoacid.");return e}function BB(t){try{return new RegExp(t),t}catch(e){throw e instanceof SyntaxError?Error("Model value is not a regexp."):e}}function PB(t,e){var i,l;const n=((i=t.spec.domain)==null?void 0:i["pl7.app/alphabet"])??((l=t.spec.annotations)==null?void 0:l["pl7.app/alphabet"]);if(n==="nucleotide")return[{value:"N",text:"N"}];if(n==="aminoacid")return[{value:"X",text:"X"}];const o=Ye.uniq(e);return o.sort(),o.map(c=>({value:c,text:c}))}function RB(t,e){var i,l;const n=kB.gt(xs().sdkInfo.sdkVersion,"1.14.0")&&(t.type==="column"?t.spec.valueType:t.spec.type)==="String"&&(((i=t.spec.domain)==null?void 0:i["pl7.app/alphabet"])??((l=t.spec.annotations)==null?void 0:l["pl7.app/alphabet"]))!==void 0,o=e.type;switch(o){case"isNotNA":return{operator:"Not",operand:{operator:"IsNA"}};case"isNA":return{operator:"IsNA"};case"number_equals":return{operator:"Equal",reference:e.reference};case"string_equals":return{operator:n?"IEqual":"Equal",reference:e.reference};case"number_notEquals":return{operator:"Not",operand:{operator:"Equal",reference:e.reference}};case"string_notEquals":return{operator:"Not",operand:{operator:n?"IEqual":"Equal",reference:e.reference}};case"number_greaterThan":return{operator:"Greater",reference:e.reference};case"number_greaterThanOrEqualTo":return{operator:"GreaterOrEqual",reference:e.reference};case"number_lessThan":return{operator:"Less",reference:e.reference};case"number_lessThanOrEqualTo":return{operator:"LessOrEqual",reference:e.reference};case"number_between":return{operator:"And",operands:[{operator:e.includeLowerBound?"GreaterOrEqual":"Greater",reference:e.lowerBound},{operator:e.includeUpperBound?"LessOrEqual":"Less",reference:e.upperBound}]};case"string_contains":return{operator:n?"StringIContains":"StringContains",substring:e.reference};case"string_doesNotContain":return{operator:"Not",operand:{operator:n?"StringIContains":"StringContains",substring:e.reference}};case"string_matches":return{operator:"Matches",regex:e.reference};case"string_doesNotMatch":return{operator:"Not",operand:{operator:"Matches",regex:e.reference}};case"string_containsFuzzyMatch":return{operator:n?"StringIContainsFuzzy":"StringContainsFuzzy",reference:e.reference,maxEdits:e.maxEdits,substitutionsOnly:e.substitutionsOnly,wildcard:e.wildcard};default:throw Error(`unsupported filter type: ${o}`)}}const DB={class:"d-flex flex-column gap-24"},Oh=r.defineComponent({__name:"PlTableFilterEntry",props:r.mergeModels({column:{},options:{},disabled:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useModel(t,"modelValue"),n=t,{column:o,options:i}=r.toRefs(n);return(l,c)=>(r.openBlock(),r.createElementBlock("div",DB,[r.createVNode(r.unref(bo),{"model-value":e.value.filter.type,options:r.unref(i),disabled:l.disabled,label:"Predicate","onUpdate:modelValue":c[0]||(c[0]=d=>e.value=r.unref(AB)(e.value,d))},null,8,["model-value","options","disabled"]),e.value.filter.type==="number_equals"||e.value.filter.type==="number_notEquals"||e.value.filter.type==="number_lessThan"||e.value.filter.type==="number_lessThanOrEqualTo"||e.value.filter.type==="number_greaterThan"||e.value.filter.type==="number_greaterThanOrEqualTo"?(r.openBlock(),r.createBlock(r.unref(qr),{key:0,modelValue:e.value.filter.reference,"onUpdate:modelValue":c[1]||(c[1]=d=>e.value.filter.reference=d),disabled:l.disabled,parse:d=>r.unref(mc)(r.unref(o),d),label:"Reference value"},null,8,["modelValue","disabled","parse"])):r.createCommentVNode("",!0),e.value.filter.type==="number_between"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(r.unref(qr),{modelValue:e.value.filter.lowerBound,"onUpdate:modelValue":c[2]||(c[2]=d=>e.value.filter.lowerBound=d),disabled:l.disabled,parse:d=>r.unref(mc)(r.unref(o),d),label:"Lower bound"},null,8,["modelValue","disabled","parse"]),r.createVNode(r.unref(Ds),{modelValue:e.value.filter.includeLowerBound,"onUpdate:modelValue":c[3]||(c[3]=d=>e.value.filter.includeLowerBound=d),disabled:l.disabled,label:"Include lower bound"},null,8,["modelValue","disabled"]),r.createVNode(r.unref(qr),{modelValue:e.value.filter.upperBound,"onUpdate:modelValue":c[4]||(c[4]=d=>e.value.filter.upperBound=d),disabled:l.disabled,parse:d=>r.unref(mc)(r.unref(o),d),label:"Upper bound"},null,8,["modelValue","disabled","parse"]),r.createVNode(r.unref(Ds),{modelValue:e.value.filter.includeUpperBound,"onUpdate:modelValue":c[5]||(c[5]=d=>e.value.filter.includeUpperBound=d),disabled:l.disabled,label:"Include upper bound"},null,8,["modelValue","disabled"])],64)):r.createCommentVNode("",!0),e.value.filter.type==="string_equals"||e.value.filter.type==="string_notEquals"||e.value.filter.type==="string_contains"||e.value.filter.type==="string_doesNotContain"?(r.openBlock(),r.createBlock(r.unref(qr),{key:2,modelValue:e.value.filter.reference,"onUpdate:modelValue":c[6]||(c[6]=d=>e.value.filter.reference=d),disabled:l.disabled,parse:d=>r.unref(Lh)(r.unref(o),d),label:"Reference value"},null,8,["modelValue","disabled","parse"])):r.createCommentVNode("",!0),e.value.filter.type==="string_matches"||e.value.filter.type==="string_doesNotMatch"?(r.openBlock(),r.createBlock(r.unref(qr),{key:3,modelValue:e.value.filter.reference,"onUpdate:modelValue":c[7]||(c[7]=d=>e.value.filter.reference=d),disabled:l.disabled,parse:r.unref(BB),label:"Reference value"},null,8,["modelValue","disabled","parse"])):r.createCommentVNode("",!0),e.value.filter.type==="string_containsFuzzyMatch"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:4},[r.createVNode(r.unref(qr),{modelValue:e.value.filter.reference,"onUpdate:modelValue":c[8]||(c[8]=d=>e.value.filter.reference=d),disabled:l.disabled,parse:d=>r.unref(Lh)(r.unref(o),d),label:"Reference value"},null,8,["modelValue","disabled","parse"]),r.createVNode(r.unref(jp),{modelValue:e.value.filter.maxEdits,"onUpdate:modelValue":c[9]||(c[9]=d=>e.value.filter.maxEdits=d),max:5,disabled:l.disabled,breakpoints:"",label:"Maximum nuber of substitutions and indels"},null,8,["modelValue","disabled"]),r.createVNode(r.unref(Ds),{modelValue:e.value.filter.substitutionsOnly,"onUpdate:modelValue":c[10]||(c[10]=d=>e.value.filter.substitutionsOnly=d),disabled:l.disabled,label:"Substitutions only"},null,8,["modelValue","disabled"]),r.createVNode(r.unref(bo),{modelValue:e.value.filter.wildcard,"onUpdate:modelValue":c[11]||(c[11]=d=>e.value.filter.wildcard=d),disabled:l.disabled,options:r.unref(PB)(r.unref(o),e.value.filter.reference),clearable:"",label:"Wildcard symbol"},null,8,["modelValue","disabled","options"])],64)):r.createCommentVNode("",!0)]))}}),IB={class:"d-flex flex-column gap-24"},FB={key:0,class:"text-subtitle-m",style:{color:"var(--txt-mask)"}},LB=r.defineComponent({__name:"PlTableAddFilter",props:r.mergeModels({columnsById:{},columnOptions:{},filterOptions:{},makeFilter:{type:Function}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:r.mergeModels(["addFilter"],["update:modelValue"]),setup(t,{emit:e}){const n=r.useModel(t,"modelValue"),o=t,{columnsById:i,columnOptions:l,filterOptions:c}=r.toRefs(o),d=e,p=r.ref(),h=r.ref();r.watch(()=>p.value,w=>{w?h.value=o.makeFilter(w):h.value=void 0});const m=()=>{p.value=void 0,n.value=!1},y=()=>{h.value&&(d("addFilter",h.value),m())};return(w,v)=>(r.openBlock(),r.createBlock(r.unref(Rs),{modelValue:n.value,"onUpdate:modelValue":v[2]||(v[2]=E=>n.value=E),"close-on-outside-click":!1},{title:r.withCtx(()=>v[3]||(v[3]=[r.createTextVNode("Add Filter")])),actions:r.withCtx(()=>[r.createVNode(r.unref(Vs),{disabled:!h.value,onClick:y},{default:r.withCtx(()=>v[4]||(v[4]=[r.createTextVNode("Add Filter")])),_:1},8,["disabled"]),r.createVNode(r.unref(wo),{"justify-center":!1,onClick:m},{default:r.withCtx(()=>v[5]||(v[5]=[r.createTextVNode("Cancel")])),_:1})]),default:r.withCtx(()=>[r.createElementVNode("div",IB,[r.createVNode(r.unref(bo),{modelValue:p.value,"onUpdate:modelValue":v[0]||(v[0]=E=>p.value=E),options:r.unref(l),label:"Column",placeholder:"Choose..."},null,8,["modelValue","options"]),h.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",FB,"Choose a column to view and adjust its options")),h.value?(r.openBlock(),r.createBlock(Oh,{key:1,modelValue:h.value,"onUpdate:modelValue":v[1]||(v[1]=E=>h.value=E),column:r.unref(i)[h.value.columnId],options:r.unref(c)[h.value.columnId]},null,8,["modelValue","column","options"])):r.createCommentVNode("",!0)])]),_:1},8,["modelValue"]))}}),OB=["onClick"],MB={class:"pl-filter-manager__expand-icon"},GB={class:"pl-filter-manager__title flex-grow-1 text-s-btn"},$B={class:"pl-filter-manager__actions d-flex gap-12"},zB=["onClick"],UB=["onClick"],ZB={class:"pl-filter-manager__content d-flex gap-24 p-24 flex-column"},WB={class:"d-flex justify-center"},jB=["onClick"],HB={class:"pl-filter-manager__add-btn-icon"},qB={key:0},KB=r.defineComponent({__name:"PlTableFilters",props:r.mergeModels({columns:{},restrictions:{},defaults:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useModel(t,"modelValue"),n=t,{columns:o,restrictions:i,defaults:l}=r.toRefs(n),c=r.computed(()=>{const R=o.value.filter(G=>{const P=G.type;switch(P){case"axis":return G.spec.type!=="Bytes";case"column":return G.spec.valueType!=="Bytes";default:throw Error(`unsupported data type: ${P}`)}}),O={};for(const G of R)O[SB(G)]=G;return O}),d=r.computed(()=>{const R=i.value??[],O={};for(const[G,P]of Object.entries(c.value)){const T=Ye.find(R,M=>Ye.isEqual(M.column.id,P.id));T&&(O[G]=T.allowedFilterTypes)}return O}),p=r.computed(()=>{const R=l.value??[],O={};for(const[G,P]of Object.entries(c.value)){const T=Ye.find(R,M=>Ye.isEqual(M.column.id,P.id));T&&(O[G]={columnId:G,filter:T.default,disabled:!1})}return O});(()=>{const R=e.value.state;typeof R=="object"&&!Array.isArray(R)&&(e.value.state=Object.entries(R).map(([O,G])=>({columnId:O,filter:G,disabled:!1})))})();const h=R=>R??Object.values(p.value),m=r.reactive({state:h(e.value.state)});r.watch(()=>e.value,R=>{Ye.isEqual(m.state,R.state)||(m.state=h(R.state))}),r.watch(()=>m,R=>{Ye.isEqual(R.state,e.value.state)||(e.value={state:Ye.cloneDeep(R.state),filters:R.state.filter(O=>!O.disabled).map(O=>{const G=c.value[O.columnId],{spec:P,...T}=G;return{type:"bySingleColumnV2",column:T,predicate:RB(G,O.filter)}})})},{immediate:!0,deep:!0}),r.watch(()=>c.value,R=>{Object.keys(R).length===0&&m.state!==void 0||(m.state=m.state.filter(O=>!!R[O.columnId]))},{immediate:!0});const y=r.computed(()=>Object.keys(c).length>0&&m.state.length>0),w=r.computed(()=>{const R=d.value,O={};for(const[G,P]of Object.entries(c.value)){let M=(P.type==="column"?P.spec.valueType:P.spec.type)==="String"?NB:TB;const U=R[G];U&&(M=M.filter(X=>U.includes(X))),O[G]=M.map(X=>({value:X,text:EB(X)}))}return O}),v=r.computed(()=>Ye.some(Object.values(w.value),R=>R.length>0)),E=r.computed(()=>Object.entries(Object.entries(c.value)).filter(([R,[O,G]])=>w.value[O].length>0).filter(([R,[O,G]])=>!m.state.some(P=>P.columnId===O)).map(([R,[O,G]])=>({label:Ih(G,R),value:O}))),z=R=>p.value[R]??{columnId:R,filter:Fh(w.value[R][0].value),disabled:!1},$=R=>{m.state[R]=z(m.state[R].columnId)},S=R=>m.state.splice(R,1),B=r.ref(!1),D=r.ref(!1),H=r.ref(!1);r.onMounted(()=>{H.value=!0});const A=r.reactive({}),N=R=>{A[R]?delete A[R]:A[R]=!0},j=r.ref(!1),J=r.ref();let Z;return r.onMounted(()=>{Z=new ResizeObserver(()=>{var O;const R=(O=J.value)==null?void 0:O.parentElement;R&&(j.value=R.scrollHeight>R.clientHeight||R.scrollWidth>R.clientWidth)}),J.value&&J.value.parentElement&&Z.observe(J.value.parentElement)}),r.watch(J,(R,O)=>{O!=null&&O.parentElement&&Z.unobserve(O.parentElement),R!=null&&R.parentElement&&Z.observe(R.parentElement)}),r.onBeforeUnmount(()=>{Z!==void 0&&Z.disconnect()}),(R,O)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[H.value?(r.openBlock(),r.createBlock(r.Teleport,{key:0,to:`#${r.unref(ec)}`},[r.createVNode(r.unref(wo),{onClick:O[0]||(O[0]=r.withModifiers(G=>B.value=!0,["stop"]))},{append:r.withCtx(()=>[r.createVNode(r.unref(Bs),{name:y.value?"filter-on":"filter"},null,8,["name"])]),default:r.withCtx(()=>[O[5]||(O[5]=r.createTextVNode(" Filters "))]),_:1})],8,["to"])):r.createCommentVNode("",!0),r.createVNode(r.unref(Rs),{modelValue:B.value,"onUpdate:modelValue":O[2]||(O[2]=G=>B.value=G),"close-on-outside-click":!1},{title:r.withCtx(()=>O[6]||(O[6]=[r.createTextVNode("Manage Filters")])),default:r.withCtx(()=>[r.createElementVNode("div",{ref_key:"filterManager",ref:J,class:"pl-filter-manager d-flex flex-column gap-6"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.state,(G,P)=>(r.openBlock(),r.createElementBlock("div",{key:G.columnId,class:r.normalizeClass([{open:A[G.columnId],disabled:G.disabled},"pl-filter-manager__filter"])},[r.createElementVNode("div",{class:"pl-filter-manager__header d-flex align-center gap-8",onClick:T=>N(G.columnId)},[r.createElementVNode("div",MB,[r.createVNode(r.unref(At),{name:"chevron-right"})]),r.createElementVNode("div",GB,r.toDisplayString(r.unref(Ih)(c.value[G.columnId],P)),1),r.createElementVNode("div",$B,[r.createElementVNode("div",{class:"pl-filter-manager__toggle",onClick:r.withModifiers(T=>G.disabled=!G.disabled,["stop"])},[r.createVNode(r.unref(xt),{name:G.disabled?"view-hide":"view-show"},null,8,["name"])],8,zB),r.createElementVNode("div",{class:"pl-filter-manager__delete",onClick:r.withModifiers(T=>S(P),["stop"])},[r.createVNode(r.unref(xt),{name:"close"})],8,UB)])],8,OB),r.createElementVNode("div",ZB,[r.createVNode(Oh,{modelValue:m.state[P],"onUpdate:modelValue":T=>m.state[P]=T,disabled:G.disabled,column:c.value[G.columnId],options:w.value[G.columnId]},null,8,["modelValue","onUpdate:modelValue","disabled","column","options"]),r.createElementVNode("div",WB,[r.createElementVNode("div",{class:r.normalizeClass([{disabled:G.disabled},"pl-filter-manager__revert-btn text-s-btn d-flex align-center gap-8"]),onClick:T=>$(P)},[O[7]||(O[7]=r.createTextVNode(" Revert Settings to Default ")),r.createVNode(r.unref(xt),{name:"reverse"})],10,jB)])])],2))),128)),r.createElementVNode("div",{class:r.normalizeClass([{"pt-24":j.value},"pl-filter-manager__add-action-wrapper"])},[E.value.length>0?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pl-filter-manager__add-btn",onClick:O[1]||(O[1]=G=>D.value=!0)},[r.createElementVNode("div",HB,[r.createVNode(r.unref(At),{name:"add"})]),O[8]||(O[8]=r.createElementVNode("div",{class:"pl-filter-manager__add-btn-title text-s-btn"},"Add Filter",-1))])):r.createCommentVNode("",!0)],2),v.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",qB,"No filters applicable"))],512)]),_:1},8,["modelValue"]),r.createVNode(LB,{modelValue:D.value,"onUpdate:modelValue":O[3]||(O[3]=G=>D.value=G),"columns-by-id":c.value,"column-options":E.value,"filter-options":w.value,"make-filter":z,onAddFilter:O[4]||(O[4]=G=>m.state.push(G))},null,8,["modelValue","columns-by-id","column-options","filter-options"])],64))}}),ta=new Map;function YB(t,e){const n=r.getCurrentScope()??r.effectScope(),o=n.run(()=>(r.onScopeDispose(()=>{ta.delete(t)}),r.reactive(e())));return o[Symbol.dispose]=()=>{n.stop()},o}function XB(t){const e=Symbol();return()=>(ta.has(e)||ta.set(e,YB(e,t)),ta.get(e))}function JB(t){return r.computed(()=>{try{return nu(t())}catch(e){return{errors:[String(e)],value:void 0}}})}function QB(t,e,n){const o=r.ref(0),i=r.reactive({loading:r.computed(()=>o.value>0),loadingRef:o,value:void 0,error:void 0}),l=Og(e);return r.watch(t,async c=>{i.error=void 0,o.value++,l(c).then(d=>{d.ok&&(i.value=d.value)}).catch(d=>{i.value=void 0,i.error=d}).finally(()=>{o.value--})},Object.assign({immediate:!0,deep:!0},n??{})),i}const Bo=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Mh=new Set,gc=typeof process=="object"&&process?process:{},Gh=(t,e,n,o)=>{typeof gc.emitWarning=="function"?gc.emitWarning(t,e,n,o):console.error(`[${n}] ${e}: ${t}`)};let na=globalThis.AbortController,$h=globalThis.AbortSignal;if(typeof na>"u"){$h=class{constructor(){Ze(this,"onabort");Ze(this,"_onabort",[]);Ze(this,"reason");Ze(this,"aborted",!1)}addEventListener(o,i){this._onabort.push(i)}},na=class{constructor(){Ze(this,"signal",new $h);e()}abort(o){var i,l;if(!this.signal.aborted){this.signal.reason=o,this.signal.aborted=!0;for(const c of this.signal._onabort)c(o);(l=(i=this.signal).onabort)==null||l.call(i,o)}}};let t=((Uh=gc.env)==null?void 0:Uh.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{t&&(t=!1,Gh("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}const eP=t=>!Mh.has(t),Nr=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),zh=t=>Nr(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?ra:null:null;class ra extends Array{constructor(e){super(e),this.fill(0)}}const Jr=class Jr{constructor(e,n){Ze(this,"heap");Ze(this,"length");if(!b(Jr,Po))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new n(e),this.length=0}static create(e){const n=zh(e);if(!n)return[];ye(Jr,Po,!0);const o=new Jr(e,n);return ye(Jr,Po,!1),o}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};Po=new WeakMap,ze(Jr,Po,!1);let yc=Jr;const vc=class vc{constructor(e){ze(this,re);ze(this,vn);ze(this,Ht);ze(this,wn);ze(this,bn);ze(this,Ro);ze(this,Do);Ze(this,"ttl");Ze(this,"ttlResolution");Ze(this,"ttlAutopurge");Ze(this,"updateAgeOnGet");Ze(this,"updateAgeOnHas");Ze(this,"allowStale");Ze(this,"noDisposeOnSet");Ze(this,"noUpdateTTL");Ze(this,"maxEntrySize");Ze(this,"sizeCalculation");Ze(this,"noDeleteOnFetchRejection");Ze(this,"noDeleteOnStaleGet");Ze(this,"allowStaleOnFetchAbort");Ze(this,"allowStaleOnFetchRejection");Ze(this,"ignoreFetchAbort");ze(this,ut);ze(this,xn);ze(this,dt);ze(this,Je);ze(this,ke);ze(this,Rt);ze(this,qt);ze(this,Et);ze(this,mt);ze(this,kn);ze(this,gt);ze(this,Sn);ze(this,En);ze(this,Kt);ze(this,Tn);ze(this,Vr);ze(this,Dt);ze(this,Qr,()=>{});ze(this,Qn,()=>{});ze(this,zi,()=>{});ze(this,Yt,()=>!1);ze(this,eo,e=>{});ze(this,Io,(e,n,o)=>{});ze(this,Ui,(e,n,o,i)=>{if(o||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});Ze(this,Zh,"LRUCache");const{max:n=0,ttl:o,ttlResolution:i=1,ttlAutopurge:l,updateAgeOnGet:c,updateAgeOnHas:d,allowStale:p,dispose:h,disposeAfter:m,noDisposeOnSet:y,noUpdateTTL:w,maxSize:v=0,maxEntrySize:E=0,sizeCalculation:z,fetchMethod:$,memoMethod:S,noDeleteOnFetchRejection:B,noDeleteOnStaleGet:D,allowStaleOnFetchRejection:H,allowStaleOnFetchAbort:A,ignoreFetchAbort:N}=e;if(n!==0&&!Nr(n))throw new TypeError("max option must be a nonnegative integer");const j=n?zh(n):Array;if(!j)throw new Error("invalid max value: "+n);if(ye(this,vn,n),ye(this,Ht,v),this.maxEntrySize=E||b(this,Ht),this.sizeCalculation=z,this.sizeCalculation){if(!b(this,Ht)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(S!==void 0&&typeof S!="function")throw new TypeError("memoMethod must be a function if defined");if(ye(this,Do,S),$!==void 0&&typeof $!="function")throw new TypeError("fetchMethod must be a function if specified");if(ye(this,Ro,$),ye(this,Vr,!!$),ye(this,dt,new Map),ye(this,Je,new Array(n).fill(void 0)),ye(this,ke,new Array(n).fill(void 0)),ye(this,Rt,new j(n)),ye(this,qt,new j(n)),ye(this,Et,0),ye(this,mt,0),ye(this,kn,yc.create(n)),ye(this,ut,0),ye(this,xn,0),typeof h=="function"&&ye(this,wn,h),typeof m=="function"?(ye(this,bn,m),ye(this,gt,[])):(ye(this,bn,void 0),ye(this,gt,void 0)),ye(this,Tn,!!b(this,wn)),ye(this,Dt,!!b(this,bn)),this.noDisposeOnSet=!!y,this.noUpdateTTL=!!w,this.noDeleteOnFetchRejection=!!B,this.allowStaleOnFetchRejection=!!H,this.allowStaleOnFetchAbort=!!A,this.ignoreFetchAbort=!!N,this.maxEntrySize!==0){if(b(this,Ht)!==0&&!Nr(b(this,Ht)))throw new TypeError("maxSize must be a positive integer if specified");if(!Nr(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");ue(this,re,Eg).call(this)}if(this.allowStale=!!p,this.noDeleteOnStaleGet=!!D,this.updateAgeOnGet=!!c,this.updateAgeOnHas=!!d,this.ttlResolution=Nr(i)||i===0?i:1,this.ttlAutopurge=!!l,this.ttl=o||0,this.ttl){if(!Nr(this.ttl))throw new TypeError("ttl must be a positive integer if specified");ue(this,re,Ud).call(this)}if(b(this,vn)===0&&this.ttl===0&&b(this,Ht)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!b(this,vn)&&!b(this,Ht)){const J="LRU_CACHE_UNBOUNDED";eP(J)&&(Mh.add(J),Gh("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",J,vc))}}static unsafeExposeInternals(e){return{starts:b(e,En),ttls:b(e,Kt),sizes:b(e,Sn),keyMap:b(e,dt),keyList:b(e,Je),valList:b(e,ke),next:b(e,Rt),prev:b(e,qt),get head(){return b(e,Et)},get tail(){return b(e,mt)},free:b(e,kn),isBackgroundFetch:n=>{var o;return ue(o=e,re,et).call(o,n)},backgroundFetch:(n,o,i,l)=>{var c;return ue(c=e,re,Xa).call(c,n,o,i,l)},moveToTail:n=>{var o;return ue(o=e,re,ps).call(o,n)},indexes:n=>{var o;return ue(o=e,re,Mr).call(o,n)},rindexes:n=>{var o;return ue(o=e,re,Gr).call(o,n)},isStale:n=>{var o;return b(o=e,Yt).call(o,n)}}}get max(){return b(this,vn)}get maxSize(){return b(this,Ht)}get calculatedSize(){return b(this,xn)}get size(){return b(this,ut)}get fetchMethod(){return b(this,Ro)}get memoMethod(){return b(this,Do)}get dispose(){return b(this,wn)}get disposeAfter(){return b(this,bn)}getRemainingTTL(e){return b(this,dt).has(e)?1/0:0}*entries(){for(const e of ue(this,re,Mr).call(this))b(this,ke)[e]!==void 0&&b(this,Je)[e]!==void 0&&!ue(this,re,et).call(this,b(this,ke)[e])&&(yield[b(this,Je)[e],b(this,ke)[e]])}*rentries(){for(const e of ue(this,re,Gr).call(this))b(this,ke)[e]!==void 0&&b(this,Je)[e]!==void 0&&!ue(this,re,et).call(this,b(this,ke)[e])&&(yield[b(this,Je)[e],b(this,ke)[e]])}*keys(){for(const e of ue(this,re,Mr).call(this)){const n=b(this,Je)[e];n!==void 0&&!ue(this,re,et).call(this,b(this,ke)[e])&&(yield n)}}*rkeys(){for(const e of ue(this,re,Gr).call(this)){const n=b(this,Je)[e];n!==void 0&&!ue(this,re,et).call(this,b(this,ke)[e])&&(yield n)}}*values(){for(const e of ue(this,re,Mr).call(this))b(this,ke)[e]!==void 0&&!ue(this,re,et).call(this,b(this,ke)[e])&&(yield b(this,ke)[e])}*rvalues(){for(const e of ue(this,re,Gr).call(this))b(this,ke)[e]!==void 0&&!ue(this,re,et).call(this,b(this,ke)[e])&&(yield b(this,ke)[e])}[(Wh=Symbol.iterator,Zh=Symbol.toStringTag,Wh)](){return this.entries()}find(e,n={}){for(const o of ue(this,re,Mr).call(this)){const i=b(this,ke)[o],l=ue(this,re,et).call(this,i)?i.__staleWhileFetching:i;if(l!==void 0&&e(l,b(this,Je)[o],this))return this.get(b(this,Je)[o],n)}}forEach(e,n=this){for(const o of ue(this,re,Mr).call(this)){const i=b(this,ke)[o],l=ue(this,re,et).call(this,i)?i.__staleWhileFetching:i;l!==void 0&&e.call(n,l,b(this,Je)[o],this)}}rforEach(e,n=this){for(const o of ue(this,re,Gr).call(this)){const i=b(this,ke)[o],l=ue(this,re,et).call(this,i)?i.__staleWhileFetching:i;l!==void 0&&e.call(n,l,b(this,Je)[o],this)}}purgeStale(){let e=!1;for(const n of ue(this,re,Gr).call(this,{allowStale:!0}))b(this,Yt).call(this,n)&&(ue(this,re,$r).call(this,b(this,Je)[n],"expire"),e=!0);return e}info(e){const n=b(this,dt).get(e);if(n===void 0)return;const o=b(this,ke)[n],i=ue(this,re,et).call(this,o)?o.__staleWhileFetching:o;if(i===void 0)return;const l={value:i};if(b(this,Kt)&&b(this,En)){const c=b(this,Kt)[n],d=b(this,En)[n];if(c&&d){const p=c-(Bo.now()-d);l.ttl=p,l.start=Date.now()}}return b(this,Sn)&&(l.size=b(this,Sn)[n]),l}dump(){const e=[];for(const n of ue(this,re,Mr).call(this,{allowStale:!0})){const o=b(this,Je)[n],i=b(this,ke)[n],l=ue(this,re,et).call(this,i)?i.__staleWhileFetching:i;if(l===void 0||o===void 0)continue;const c={value:l};if(b(this,Kt)&&b(this,En)){c.ttl=b(this,Kt)[n];const d=Bo.now()-b(this,En)[n];c.start=Math.floor(Date.now()-d)}b(this,Sn)&&(c.size=b(this,Sn)[n]),e.unshift([o,c])}return e}load(e){this.clear();for(const[n,o]of e){if(o.start){const i=Date.now()-o.start;o.start=Bo.now()-i}this.set(n,o.value,o)}}set(e,n,o={}){var w,v,E,z,$;if(n===void 0)return this.delete(e),this;const{ttl:i=this.ttl,start:l,noDisposeOnSet:c=this.noDisposeOnSet,sizeCalculation:d=this.sizeCalculation,status:p}=o;let{noUpdateTTL:h=this.noUpdateTTL}=o;const m=b(this,Ui).call(this,e,n,o.size||0,d);if(this.maxEntrySize&&m>this.maxEntrySize)return p&&(p.set="miss",p.maxEntrySizeExceeded=!0),ue(this,re,$r).call(this,e,"set"),this;let y=b(this,ut)===0?void 0:b(this,dt).get(e);if(y===void 0)y=b(this,ut)===0?b(this,mt):b(this,kn).length!==0?b(this,kn).pop():b(this,ut)===b(this,vn)?ue(this,re,Ya).call(this,!1):b(this,ut),b(this,Je)[y]=e,b(this,ke)[y]=n,b(this,dt).set(e,y),b(this,Rt)[b(this,mt)]=y,b(this,qt)[y]=b(this,mt),ye(this,mt,y),Ka(this,ut)._++,b(this,Io).call(this,y,m,p),p&&(p.set="add"),h=!1;else{ue(this,re,ps).call(this,y);const S=b(this,ke)[y];if(n!==S){if(b(this,Vr)&&ue(this,re,et).call(this,S)){S.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:B}=S;B!==void 0&&!c&&(b(this,Tn)&&((w=b(this,wn))==null||w.call(this,B,e,"set")),b(this,Dt)&&((v=b(this,gt))==null||v.push([B,e,"set"])))}else c||(b(this,Tn)&&((E=b(this,wn))==null||E.call(this,S,e,"set")),b(this,Dt)&&((z=b(this,gt))==null||z.push([S,e,"set"])));if(b(this,eo).call(this,y),b(this,Io).call(this,y,m,p),b(this,ke)[y]=n,p){p.set="replace";const B=S&&ue(this,re,et).call(this,S)?S.__staleWhileFetching:S;B!==void 0&&(p.oldValue=B)}}else p&&(p.set="update")}if(i!==0&&!b(this,Kt)&&ue(this,re,Ud).call(this),b(this,Kt)&&(h||b(this,zi).call(this,y,i,l),p&&b(this,Qn).call(this,p,y)),!c&&b(this,Dt)&&b(this,gt)){const S=b(this,gt);let B;for(;B=S==null?void 0:S.shift();)($=b(this,bn))==null||$.call(this,...B)}return this}pop(){var e;try{for(;b(this,ut);){const n=b(this,ke)[b(this,Et)];if(ue(this,re,Ya).call(this,!0),ue(this,re,et).call(this,n)){if(n.__staleWhileFetching)return n.__staleWhileFetching}else if(n!==void 0)return n}}finally{if(b(this,Dt)&&b(this,gt)){const n=b(this,gt);let o;for(;o=n==null?void 0:n.shift();)(e=b(this,bn))==null||e.call(this,...o)}}}has(e,n={}){const{updateAgeOnHas:o=this.updateAgeOnHas,status:i}=n,l=b(this,dt).get(e);if(l!==void 0){const c=b(this,ke)[l];if(ue(this,re,et).call(this,c)&&c.__staleWhileFetching===void 0)return!1;if(b(this,Yt).call(this,l))i&&(i.has="stale",b(this,Qn).call(this,i,l));else return o&&b(this,Qr).call(this,l),i&&(i.has="hit",b(this,Qn).call(this,i,l)),!0}else i&&(i.has="miss");return!1}peek(e,n={}){const{allowStale:o=this.allowStale}=n,i=b(this,dt).get(e);if(i===void 0||!o&&b(this,Yt).call(this,i))return;const l=b(this,ke)[i];return ue(this,re,et).call(this,l)?l.__staleWhileFetching:l}async fetch(e,n={}){const{allowStale:o=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,ttl:c=this.ttl,noDisposeOnSet:d=this.noDisposeOnSet,size:p=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:m=this.noUpdateTTL,noDeleteOnFetchRejection:y=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:w=this.allowStaleOnFetchRejection,ignoreFetchAbort:v=this.ignoreFetchAbort,allowStaleOnFetchAbort:E=this.allowStaleOnFetchAbort,context:z,forceRefresh:$=!1,status:S,signal:B}=n;if(!b(this,Vr))return S&&(S.fetch="get"),this.get(e,{allowStale:o,updateAgeOnGet:i,noDeleteOnStaleGet:l,status:S});const D={allowStale:o,updateAgeOnGet:i,noDeleteOnStaleGet:l,ttl:c,noDisposeOnSet:d,size:p,sizeCalculation:h,noUpdateTTL:m,noDeleteOnFetchRejection:y,allowStaleOnFetchRejection:w,allowStaleOnFetchAbort:E,ignoreFetchAbort:v,status:S,signal:B};let H=b(this,dt).get(e);if(H===void 0){S&&(S.fetch="miss");const A=ue(this,re,Xa).call(this,e,H,D,z);return A.__returned=A}else{const A=b(this,ke)[H];if(ue(this,re,et).call(this,A)){const R=o&&A.__staleWhileFetching!==void 0;return S&&(S.fetch="inflight",R&&(S.returnedStale=!0)),R?A.__staleWhileFetching:A.__returned=A}const N=b(this,Yt).call(this,H);if(!$&&!N)return S&&(S.fetch="hit"),ue(this,re,ps).call(this,H),i&&b(this,Qr).call(this,H),S&&b(this,Qn).call(this,S,H),A;const j=ue(this,re,Xa).call(this,e,H,D,z),Z=j.__staleWhileFetching!==void 0&&o;return S&&(S.fetch=N?"stale":"refresh",Z&&N&&(S.returnedStale=!0)),Z?j.__staleWhileFetching:j.__returned=j}}async forceFetch(e,n={}){const o=await this.fetch(e,n);if(o===void 0)throw new Error("fetch() returned undefined");return o}memo(e,n={}){const o=b(this,Do);if(!o)throw new Error("no memoMethod provided to constructor");const{context:i,forceRefresh:l,...c}=n,d=this.get(e,c);if(!l&&d!==void 0)return d;const p=o(e,d,{options:c,context:i});return this.set(e,p,c),p}get(e,n={}){const{allowStale:o=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,status:c}=n,d=b(this,dt).get(e);if(d!==void 0){const p=b(this,ke)[d],h=ue(this,re,et).call(this,p);return c&&b(this,Qn).call(this,c,d),b(this,Yt).call(this,d)?(c&&(c.get="stale"),h?(c&&o&&p.__staleWhileFetching!==void 0&&(c.returnedStale=!0),o?p.__staleWhileFetching:void 0):(l||ue(this,re,$r).call(this,e,"expire"),c&&o&&(c.returnedStale=!0),o?p:void 0)):(c&&(c.get="hit"),h?p.__staleWhileFetching:(ue(this,re,ps).call(this,d),i&&b(this,Qr).call(this,d),p))}else c&&(c.get="miss")}delete(e){return ue(this,re,$r).call(this,e,"delete")}clear(){return ue(this,re,jd).call(this,"delete")}};vn=new WeakMap,Ht=new WeakMap,wn=new WeakMap,bn=new WeakMap,Ro=new WeakMap,Do=new WeakMap,ut=new WeakMap,xn=new WeakMap,dt=new WeakMap,Je=new WeakMap,ke=new WeakMap,Rt=new WeakMap,qt=new WeakMap,Et=new WeakMap,mt=new WeakMap,kn=new WeakMap,gt=new WeakMap,Sn=new WeakMap,En=new WeakMap,Kt=new WeakMap,Tn=new WeakMap,Vr=new WeakMap,Dt=new WeakMap,re=new WeakSet,Ud=function(){const e=new ra(b(this,vn)),n=new ra(b(this,vn));ye(this,Kt,e),ye(this,En,n),ye(this,zi,(l,c,d=Bo.now())=>{if(n[l]=c!==0?d:0,e[l]=c,c!==0&&this.ttlAutopurge){const p=setTimeout(()=>{b(this,Yt).call(this,l)&&ue(this,re,$r).call(this,b(this,Je)[l],"expire")},c+1);p.unref&&p.unref()}}),ye(this,Qr,l=>{n[l]=e[l]!==0?Bo.now():0}),ye(this,Qn,(l,c)=>{if(e[c]){const d=e[c],p=n[c];if(!d||!p)return;l.ttl=d,l.start=p,l.now=o||i();const h=l.now-p;l.remainingTTL=d-h}});let o=0;const i=()=>{const l=Bo.now();if(this.ttlResolution>0){o=l;const c=setTimeout(()=>o=0,this.ttlResolution);c.unref&&c.unref()}return l};this.getRemainingTTL=l=>{const c=b(this,dt).get(l);if(c===void 0)return 0;const d=e[c],p=n[c];if(!d||!p)return 1/0;const h=(o||i())-p;return d-h},ye(this,Yt,l=>{const c=n[l],d=e[l];return!!d&&!!c&&(o||i())-c>d})},Qr=new WeakMap,Qn=new WeakMap,zi=new WeakMap,Yt=new WeakMap,Eg=function(){const e=new ra(b(this,vn));ye(this,xn,0),ye(this,Sn,e),ye(this,eo,n=>{ye(this,xn,b(this,xn)-e[n]),e[n]=0}),ye(this,Ui,(n,o,i,l)=>{if(ue(this,re,et).call(this,o))return 0;if(!Nr(i))if(l){if(typeof l!="function")throw new TypeError("sizeCalculation must be a function");if(i=l(o,n),!Nr(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i}),ye(this,Io,(n,o,i)=>{if(e[n]=o,b(this,Ht)){const l=b(this,Ht)-e[n];for(;b(this,xn)>l;)ue(this,re,Ya).call(this,!0)}ye(this,xn,b(this,xn)+e[n]),i&&(i.entrySize=o,i.totalCalculatedSize=b(this,xn))})},eo=new WeakMap,Io=new WeakMap,Ui=new WeakMap,Mr=function*({allowStale:e=this.allowStale}={}){if(b(this,ut))for(let n=b(this,mt);!(!ue(this,re,Zd).call(this,n)||((e||!b(this,Yt).call(this,n))&&(yield n),n===b(this,Et)));)n=b(this,qt)[n]},Gr=function*({allowStale:e=this.allowStale}={}){if(b(this,ut))for(let n=b(this,Et);!(!ue(this,re,Zd).call(this,n)||((e||!b(this,Yt).call(this,n))&&(yield n),n===b(this,mt)));)n=b(this,Rt)[n]},Zd=function(e){return e!==void 0&&b(this,dt).get(b(this,Je)[e])===e},Ya=function(e){var l,c;const n=b(this,Et),o=b(this,Je)[n],i=b(this,ke)[n];return b(this,Vr)&&ue(this,re,et).call(this,i)?i.__abortController.abort(new Error("evicted")):(b(this,Tn)||b(this,Dt))&&(b(this,Tn)&&((l=b(this,wn))==null||l.call(this,i,o,"evict")),b(this,Dt)&&((c=b(this,gt))==null||c.push([i,o,"evict"]))),b(this,eo).call(this,n),e&&(b(this,Je)[n]=void 0,b(this,ke)[n]=void 0,b(this,kn).push(n)),b(this,ut)===1?(ye(this,Et,ye(this,mt,0)),b(this,kn).length=0):ye(this,Et,b(this,Rt)[n]),b(this,dt).delete(o),Ka(this,ut)._--,n},Xa=function(e,n,o,i){const l=n===void 0?void 0:b(this,ke)[n];if(ue(this,re,et).call(this,l))return l;const c=new na,{signal:d}=o;d==null||d.addEventListener("abort",()=>c.abort(d.reason),{signal:c.signal});const p={signal:c.signal,options:o,context:i},h=(z,$=!1)=>{const{aborted:S}=c.signal,B=o.ignoreFetchAbort&&z!==void 0;if(o.status&&(S&&!$?(o.status.fetchAborted=!0,o.status.fetchError=c.signal.reason,B&&(o.status.fetchAbortIgnored=!0)):o.status.fetchResolved=!0),S&&!B&&!$)return y(c.signal.reason);const D=v;return b(this,ke)[n]===v&&(z===void 0?D.__staleWhileFetching?b(this,ke)[n]=D.__staleWhileFetching:ue(this,re,$r).call(this,e,"fetch"):(o.status&&(o.status.fetchUpdated=!0),this.set(e,z,p.options))),z},m=z=>(o.status&&(o.status.fetchRejected=!0,o.status.fetchError=z),y(z)),y=z=>{const{aborted:$}=c.signal,S=$&&o.allowStaleOnFetchAbort,B=S||o.allowStaleOnFetchRejection,D=B||o.noDeleteOnFetchRejection,H=v;if(b(this,ke)[n]===v&&(!D||H.__staleWhileFetching===void 0?ue(this,re,$r).call(this,e,"fetch"):S||(b(this,ke)[n]=H.__staleWhileFetching)),B)return o.status&&H.__staleWhileFetching!==void 0&&(o.status.returnedStale=!0),H.__staleWhileFetching;if(H.__returned===H)throw z},w=(z,$)=>{var B;const S=(B=b(this,Ro))==null?void 0:B.call(this,e,l,p);S&&S instanceof Promise&&S.then(D=>z(D===void 0?void 0:D),$),c.signal.addEventListener("abort",()=>{(!o.ignoreFetchAbort||o.allowStaleOnFetchAbort)&&(z(void 0),o.allowStaleOnFetchAbort&&(z=D=>h(D,!0)))})};o.status&&(o.status.fetchDispatched=!0);const v=new Promise(w).then(h,m),E=Object.assign(v,{__abortController:c,__staleWhileFetching:l,__returned:void 0});return n===void 0?(this.set(e,E,{...p.options,status:void 0}),n=b(this,dt).get(e)):b(this,ke)[n]=E,E},et=function(e){if(!b(this,Vr))return!1;const n=e;return!!n&&n instanceof Promise&&n.hasOwnProperty("__staleWhileFetching")&&n.__abortController instanceof na},Wd=function(e,n){b(this,qt)[n]=e,b(this,Rt)[e]=n},ps=function(e){e!==b(this,mt)&&(e===b(this,Et)?ye(this,Et,b(this,Rt)[e]):ue(this,re,Wd).call(this,b(this,qt)[e],b(this,Rt)[e]),ue(this,re,Wd).call(this,b(this,mt),e),ye(this,mt,e))},$r=function(e,n){var i,l,c,d;let o=!1;if(b(this,ut)!==0){const p=b(this,dt).get(e);if(p!==void 0)if(o=!0,b(this,ut)===1)ue(this,re,jd).call(this,n);else{b(this,eo).call(this,p);const h=b(this,ke)[p];if(ue(this,re,et).call(this,h)?h.__abortController.abort(new Error("deleted")):(b(this,Tn)||b(this,Dt))&&(b(this,Tn)&&((i=b(this,wn))==null||i.call(this,h,e,n)),b(this,Dt)&&((l=b(this,gt))==null||l.push([h,e,n]))),b(this,dt).delete(e),b(this,Je)[p]=void 0,b(this,ke)[p]=void 0,p===b(this,mt))ye(this,mt,b(this,qt)[p]);else if(p===b(this,Et))ye(this,Et,b(this,Rt)[p]);else{const m=b(this,qt)[p];b(this,Rt)[m]=b(this,Rt)[p];const y=b(this,Rt)[p];b(this,qt)[y]=b(this,qt)[p]}Ka(this,ut)._--,b(this,kn).push(p)}}if(b(this,Dt)&&((c=b(this,gt))!=null&&c.length)){const p=b(this,gt);let h;for(;h=p==null?void 0:p.shift();)(d=b(this,bn))==null||d.call(this,...h)}return o},jd=function(e){var n,o,i;for(const l of ue(this,re,Gr).call(this,{allowStale:!0})){const c=b(this,ke)[l];if(ue(this,re,et).call(this,c))c.__abortController.abort(new Error("deleted"));else{const d=b(this,Je)[l];b(this,Tn)&&((n=b(this,wn))==null||n.call(this,c,d,e)),b(this,Dt)&&((o=b(this,gt))==null||o.push([c,d,e]))}}if(b(this,dt).clear(),b(this,ke).fill(void 0),b(this,Je).fill(void 0),b(this,Kt)&&b(this,En)&&(b(this,Kt).fill(0),b(this,En).fill(0)),b(this,Sn)&&b(this,Sn).fill(0),ye(this,Et,0),ye(this,mt,0),b(this,kn).length=0,ye(this,xn,0),ye(this,ut,0),b(this,Dt)&&b(this,gt)){const l=b(this,gt);let c;for(;c=l==null?void 0:l.shift();)(i=b(this,bn))==null||i.call(this,...c)}};let _c=vc;const tP={cacheSize:15e6};class nP{constructor(e){Ze(this,"_str");Ze(this,"_rawJson");Ze(this,"_zodSchema");Ze(this,"_validatedJson");this.bytes=e}get str(){return this._str===void 0&&(this._str=new TextDecoder().decode(this.bytes)),this._str}get rawJson(){return this._rawJson===void 0&&(this._rawJson=JSON.parse(this.str)),this._rawJson}validatedJson(e){return this._zodSchema!==e&&(this._validatedJson=e.parse(this.rawJson),this._zodSchema=e),this._validatedJson}}const to=class to{constructor(e){Ze(this,"fileDataCache");Ze(this,"fileDataRefs",new Map);const n={...tP,...e??{}};this.fileDataCache=new _c({maxSize:n.cacheSize,fetchMethod:async o=>new nP(await xs().blobDriver.getContent(o)),sizeCalculation:o=>o.bytes.length,dispose:(o,i)=>{this.fileDataRefs.delete(i)}})}getDataRef(e){const n=this.fileDataRefs.get(e);if(n!==void 0)return n;const o=r.shallowRef();return this.fileDataRefs.set(e,o),(async()=>{try{const i=await this.fileDataCache.fetch(e);o.value=i}catch(i){console.error(i)}})(),o}getContentBytes(e){if(e===void 0)return;const n=this.getDataRef(e);return r.computed(()=>{var o;return(o=n.value)==null?void 0:o.bytes})}getContentString(e){if(e===void 0)return;const n=this.getDataRef(e);return r.computed(()=>{var o;return(o=n==null?void 0:n.value)==null?void 0:o.str})}getContentJson(e,n){if(e===void 0)return;const o=this.getDataRef(e);return r.computed(()=>{var i,l;return n===void 0?(i=o==null?void 0:o.value)==null?void 0:i.rawJson:(l=o==null?void 0:o.value)==null?void 0:l.validatedJson(n)})}static getContentBytes(e){return to.globalInstance.getContentBytes(e)}static getContentString(e){return to.globalInstance.getContentString(e)}static getContentJson(e,n){return to.globalInstance.getContentJson(e,n)}};Ze(to,"globalInstance",new to);let Cc=to;F.AgGridTheme=Mu,F.BlockLayout=YN,F.ContextProvider=IE,F.DataTable=m0,F.DemoData=IN,F.DropdownListItem=vo,F.DropdownOverlay=zl,F.LongText=Gl,F.MultiError=fs,F.PlAccordion=Rk,F.PlAccordionSection=zk,F.PlAgCellFile=NV,F.PlAgColumnHeader=nh,F.PlAgDataTable=xV,F.PlAgDataTableRowNumberColId=Un,F.PlAgDataTableToolsPanel=vV,F.PlAgGridColumnManager=sh,F.PlAgOverlayLoading=Yp,F.PlAgOverlayNoRows=Xp,F.PlAgTextAndButtonCell=rh,F.PlAlert=j0,F.PlBlockPage=P0,F.PlBtnAccent=dw,F.PlBtnDanger=pw,F.PlBtnGhost=wo,F.PlBtnGroup=dp,F.PlBtnLink=gw,F.PlBtnPrimary=Vs,F.PlBtnSecondary=Dl,F.PlBtnSplit=iw,F.PlCheckbox=Ux,F.PlCheckboxGroup=Hx,F.PlChip=Ul,F.PlCloseModalBtn=wp,F.PlContainer=D0,F.PlDialogModal=Wl,F.PlDropdown=bo,F.PlDropdownLegacy=fx,F.PlDropdownLine=vp,F.PlDropdownMulti=$x,F.PlDropdownRef=Ub,F.PlEditableTitle=Gw,F.PlFileDialog=Np,F.PlFileInput=Zp,F.PlGrid=G0,F.PlIcon16=Hr,F.PlIcon24=Bs,F.PlLogView=xp,F.PlMaskIcon16=At,F.PlMaskIcon24=xt,F.PlNotificationAlert=Wp,F.PlNumberField=Ex,F.PlProgressBar=Cx,F.PlRow=F0,F.PlSearchField=gp,F.PlSectionSeparator=kp,F.PlSlideModal=Rs,F.PlSpacer=lp,F.PlTableFilters=KB,F.PlTabs=Tk,F.PlTextArea=Tb,F.PlTextField=qr,F.PlToggleSwitch=Ds,F.PlTooltip=Ct,F.ReactiveFileContent=Cc,F.Scrollable=k1,F.Slider=jp,F.SliderRange=v1,F.SliderRangeTriple=l1,F.ThemeSwitcher=S0,F.UnresolvedError=Qa,F.ValueOrErrorsComponent=EV,F.activateAgGrid=Ou,F.animate=np,F.animateInfinite=v0,F.autoSizeRowNumberColumn=th,F.call=Xu,F.computedResult=JB,F.createModel=il,F.debounce=rp,F.defineApp=ZC,F.defineStore=XB,F.delay=Ju,F.detectOutside=Nb,F.ensureError=nl,F.eventListener=$l,F.formatZodError=ol,F.getElementScrollPosition=Cp,F.identity=tl,F.isDefined=zg,F.isElementVisible=_p,F.isJsonEqual=el,F.isZodError=rl,F.listToOptions=w0,F.makeEaseInOut=C0,F.makeEaseOut=tp,F.makeRowNumberColDef=eh,F.maskIcons16=RN,F.maskIcons24=DN,F.normalizeListOptions=Cr,F.notEmpty=Vl,F.randomInt=ep,F.randomString=_0,F.requestTick=Al,F.scrollIntoView=Ps,F.showContextMenu=El,F.throttle=op,F.timeout=Qu,F.unwrapOptionalResult=$g,F.unwrapValueOrErrors=tu,F.useClickOutside=As,F.useDraggable=XE,F.useEventListener=st,F.useFormState=KE,F.useHover=Ku,F.useInterval=qE,F.useLabelNotch=Xn,F.useLocalStorage=ip,F.useMouse=qu,F.useMouseCapture=_r,F.usePosition=vi,F.useQuery=YE,F.useResizeObserver=Hp,F.useScroll=jE,F.useSdkPlugin=wl,F.useSortable=Kp,F.useTheme=ap,F.useWatchFetch=QB,F.wrapOptionalResult=nu,F.wrapValueOrErrors=Gg,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})});
91
+ }`;var De=wg(function(){return Ue(C,pe+"return "+Q).apply(n,k)});if(De.source=Q,Bd(De))throw De;return De}function KO(s){return We(s).toLowerCase()}function YO(s){return We(s).toUpperCase()}function XO(s,a,u){if(s=We(s),s&&(u||a===n))return Af(s);if(!s||!(a=Qt(a)))return s;var f=An(s),g=An(a),C=Bf(f,g),k=Pf(f,g)+1;return Lr(f,C,k).join("")}function JO(s,a,u){if(s=We(s),s&&(u||a===n))return s.slice(0,Df(s)+1);if(!s||!(a=Qt(a)))return s;var f=An(s),g=Pf(f,An(a))+1;return Lr(f,0,g).join("")}function QO(s,a,u){if(s=We(s),s&&(u||a===n))return s.replace(Bc,"");if(!s||!(a=Qt(a)))return s;var f=An(s),g=Bf(f,An(a));return Lr(f,g).join("")}function eM(s,a){var u=R,f=O;if(ot(a)){var g="separator"in a?a.separator:g;u="length"in a?Be(a.length):u,f="omission"in a?Qt(a.omission):f}s=We(s);var C=s.length;if(Mo(s)){var k=An(s);C=k.length}if(u>=C)return s;var V=u-Go(f);if(V<1)return f;var L=k?Lr(k,0,V).join(""):s.slice(0,V);if(g===n)return L+f;if(k&&(V+=L.length-V),Pd(g)){if(s.slice(V).search(g)){var K,Y=L;for(g.global||(g=qc(g.source,We(Xh.exec(g))+"g")),g.lastIndex=0;K=g.exec(Y);)var Q=K.index;L=L.slice(0,Q===n?V:Q)}}else if(s.indexOf(Qt(g),V)!=V){var oe=L.lastIndexOf(g);oe>-1&&(L=L.slice(0,oe))}return L+f}function tM(s){return s=We(s),s&&pP.test(s)?s.replace(qh,AR):s}var nM=Ho(function(s,a,u){return s+(u?" ":"")+a.toUpperCase()}),Id=bm("toUpperCase");function vg(s,a,u){return s=We(s),a=u?n:a,a===n?SR(s)?RR(s):gR(s):s.match(a)||[]}var wg=Ie(function(s,a){try{return Xt(s,n,a)}catch(u){return Bd(u)?u:new Ee(u)}}),rM=ir(function(s,a){return on(a,function(u){u=Hn(u),rr(s,u,Vd(s[u],s))}),s});function oM(s){var a=s==null?0:s.length,u=ge();return s=a?tt(s,function(f){if(typeof f[1]!="function")throw new sn(c);return[u(f[0]),f[1]]}):[],Ie(function(f){for(var g=-1;++g<a;){var C=s[g];if(Xt(C[0],this,f))return Xt(C[1],this,f)}})}function iM(s){return AD(ln(s,y))}function Fd(s){return function(){return s}}function sM(s,a){return s==null||s!==s?a:s}var aM=km(),lM=km(!0);function Zt(s){return s}function Ld(s){return em(typeof s=="function"?s:ln(s,y))}function cM(s){return nm(ln(s,y))}function dM(s,a){return rm(s,ln(a,y))}var uM=Ie(function(s,a){return function(u){return is(u,s,a)}}),pM=Ie(function(s,a){return function(u){return is(s,u,a)}});function Od(s,a,u){var f=yt(a),g=Va(a,f);u==null&&!(ot(a)&&(g.length||!f.length))&&(u=a,a=s,s=this,g=Va(a,yt(a)));var C=!(ot(u)&&"chain"in u)||!!u.chain,k=ar(s);return on(g,function(V){var L=a[V];s[V]=L,k&&(s.prototype[V]=function(){var K=this.__chain__;if(C||K){var Y=s(this.__wrapped__),Q=Y.__actions__=$t(this.__actions__);return Q.push({func:L,args:arguments,thisArg:s}),Y.__chain__=K,Y}return L.apply(s,Br([this.value()],arguments))})}),s}function hM(){return vt._===this&&(vt._=MR),this}function Md(){}function fM(s){return s=Be(s),Ie(function(a){return om(a,s)})}var mM=gd(tt),gM=gd(Sf),yM=gd($c);function bg(s){return xd(s)?zc(Hn(s)):HD(s)}function _M(s){return function(a){return s==null?n:ao(s,a)}}var CM=Em(),vM=Em(!0);function Gd(){return[]}function $d(){return!1}function wM(){return{}}function bM(){return""}function xM(){return!0}function kM(s,a){if(s=Be(s),s<1||s>ne)return[];var u=Te,f=Tt(s,Te);a=ge(a),s-=Te;for(var g=Wc(f,a);++u<s;)a(u);return g}function SM(s){return Ne(s)?tt(s,Hn):en(s)?[s]:$t(zm(We(s)))}function EM(s){var a=++LR;return We(s)+a}var TM=Ia(function(s,a){return s+a},0),NM=yd("ceil"),VM=Ia(function(s,a){return s/a},1),AM=yd("floor");function BM(s){return s&&s.length?Na(s,Zt,nd):n}function PM(s,a){return s&&s.length?Na(s,ge(a,2),nd):n}function RM(s){return Nf(s,Zt)}function DM(s,a){return Nf(s,ge(a,2))}function IM(s){return s&&s.length?Na(s,Zt,sd):n}function FM(s,a){return s&&s.length?Na(s,ge(a,2),sd):n}var LM=Ia(function(s,a){return s*a},1),OM=yd("round"),MM=Ia(function(s,a){return s-a},0);function GM(s){return s&&s.length?Zc(s,Zt):0}function $M(s,a){return s&&s.length?Zc(s,ge(a,2)):0}return _.after=cL,_.ary=Qm,_.assign=YL,_.assignIn=hg,_.assignInWith=qa,_.assignWith=XL,_.at=JL,_.before=eg,_.bind=Vd,_.bindAll=rM,_.bindKey=tg,_.castArray=wL,_.chain=Ym,_.chunk=AI,_.compact=BI,_.concat=PI,_.cond=oM,_.conforms=iM,_.constant=Fd,_.countBy=GF,_.create=QL,_.curry=ng,_.curryRight=rg,_.debounce=og,_.defaults=eO,_.defaultsDeep=tO,_.defer=dL,_.delay=uL,_.difference=RI,_.differenceBy=DI,_.differenceWith=II,_.drop=FI,_.dropRight=LI,_.dropRightWhile=OI,_.dropWhile=MI,_.fill=GI,_.filter=zF,_.flatMap=WF,_.flatMapDeep=jF,_.flatMapDepth=HF,_.flatten=jm,_.flattenDeep=$I,_.flattenDepth=zI,_.flip=pL,_.flow=aM,_.flowRight=lM,_.fromPairs=UI,_.functions=lO,_.functionsIn=cO,_.groupBy=qF,_.initial=WI,_.intersection=jI,_.intersectionBy=HI,_.intersectionWith=qI,_.invert=uO,_.invertBy=pO,_.invokeMap=YF,_.iteratee=Ld,_.keyBy=XF,_.keys=yt,_.keysIn=Ut,_.map=za,_.mapKeys=fO,_.mapValues=mO,_.matches=cM,_.matchesProperty=dM,_.memoize=Za,_.merge=gO,_.mergeWith=fg,_.method=uM,_.methodOf=pM,_.mixin=Od,_.negate=Wa,_.nthArg=fM,_.omit=yO,_.omitBy=_O,_.once=hL,_.orderBy=JF,_.over=mM,_.overArgs=fL,_.overEvery=gM,_.overSome=yM,_.partial=Ad,_.partialRight=ig,_.partition=QF,_.pick=CO,_.pickBy=mg,_.property=bg,_.propertyOf=_M,_.pull=JI,_.pullAll=qm,_.pullAllBy=QI,_.pullAllWith=eF,_.pullAt=tF,_.range=CM,_.rangeRight=vM,_.rearg=mL,_.reject=nL,_.remove=nF,_.rest=gL,_.reverse=Td,_.sampleSize=oL,_.set=wO,_.setWith=bO,_.shuffle=iL,_.slice=rF,_.sortBy=lL,_.sortedUniq=dF,_.sortedUniqBy=uF,_.split=WO,_.spread=yL,_.tail=pF,_.take=hF,_.takeRight=fF,_.takeRightWhile=mF,_.takeWhile=gF,_.tap=BF,_.throttle=_L,_.thru=$a,_.toArray=dg,_.toPairs=gg,_.toPairsIn=yg,_.toPath=SM,_.toPlainObject=pg,_.transform=xO,_.unary=CL,_.union=yF,_.unionBy=_F,_.unionWith=CF,_.uniq=vF,_.uniqBy=wF,_.uniqWith=bF,_.unset=kO,_.unzip=Nd,_.unzipWith=Km,_.update=SO,_.updateWith=EO,_.values=Yo,_.valuesIn=TO,_.without=xF,_.words=vg,_.wrap=vL,_.xor=kF,_.xorBy=SF,_.xorWith=EF,_.zip=TF,_.zipObject=NF,_.zipObjectDeep=VF,_.zipWith=AF,_.entries=gg,_.entriesIn=yg,_.extend=hg,_.extendWith=qa,Od(_,_),_.add=TM,_.attempt=wg,_.camelCase=BO,_.capitalize=_g,_.ceil=NM,_.clamp=NO,_.clone=bL,_.cloneDeep=kL,_.cloneDeepWith=SL,_.cloneWith=xL,_.conformsTo=EL,_.deburr=Cg,_.defaultTo=sM,_.divide=VM,_.endsWith=PO,_.eq=Pn,_.escape=RO,_.escapeRegExp=DO,_.every=$F,_.find=UF,_.findIndex=Zm,_.findKey=nO,_.findLast=ZF,_.findLastIndex=Wm,_.findLastKey=rO,_.floor=AM,_.forEach=Xm,_.forEachRight=Jm,_.forIn=oO,_.forInRight=iO,_.forOwn=sO,_.forOwnRight=aO,_.get=Rd,_.gt=TL,_.gte=NL,_.has=dO,_.hasIn=Dd,_.head=Hm,_.identity=Zt,_.includes=KF,_.indexOf=ZI,_.inRange=VO,_.invoke=hO,_.isArguments=uo,_.isArray=Ne,_.isArrayBuffer=VL,_.isArrayLike=zt,_.isArrayLikeObject=at,_.isBoolean=AL,_.isBuffer=Or,_.isDate=BL,_.isElement=PL,_.isEmpty=RL,_.isEqual=DL,_.isEqualWith=IL,_.isError=Bd,_.isFinite=FL,_.isFunction=ar,_.isInteger=sg,_.isLength=ja,_.isMap=ag,_.isMatch=LL,_.isMatchWith=OL,_.isNaN=ML,_.isNative=GL,_.isNil=zL,_.isNull=$L,_.isNumber=lg,_.isObject=ot,_.isObjectLike=it,_.isPlainObject=us,_.isRegExp=Pd,_.isSafeInteger=UL,_.isSet=cg,_.isString=Ha,_.isSymbol=en,_.isTypedArray=Ko,_.isUndefined=ZL,_.isWeakMap=WL,_.isWeakSet=jL,_.join=KI,_.kebabCase=IO,_.last=dn,_.lastIndexOf=YI,_.lowerCase=FO,_.lowerFirst=LO,_.lt=HL,_.lte=qL,_.max=BM,_.maxBy=PM,_.mean=RM,_.meanBy=DM,_.min=IM,_.minBy=FM,_.stubArray=Gd,_.stubFalse=$d,_.stubObject=wM,_.stubString=bM,_.stubTrue=xM,_.multiply=LM,_.nth=XI,_.noConflict=hM,_.noop=Md,_.now=Ua,_.pad=OO,_.padEnd=MO,_.padStart=GO,_.parseInt=$O,_.random=AO,_.reduce=eL,_.reduceRight=tL,_.repeat=zO,_.replace=UO,_.result=vO,_.round=OM,_.runInContext=I,_.sample=rL,_.size=sL,_.snakeCase=ZO,_.some=aL,_.sortedIndex=oF,_.sortedIndexBy=iF,_.sortedIndexOf=sF,_.sortedLastIndex=aF,_.sortedLastIndexBy=lF,_.sortedLastIndexOf=cF,_.startCase=jO,_.startsWith=HO,_.subtract=MM,_.sum=GM,_.sumBy=$M,_.template=qO,_.times=kM,_.toFinite=lr,_.toInteger=Be,_.toLength=ug,_.toLower=KO,_.toNumber=un,_.toSafeInteger=KL,_.toString=We,_.toUpper=YO,_.trim=XO,_.trimEnd=JO,_.trimStart=QO,_.truncate=eM,_.unescape=tM,_.uniqueId=EM,_.upperCase=nM,_.upperFirst=Id,_.each=Xm,_.eachRight=Jm,_.first=Hm,Od(_,function(){var s={};return Wn(_,function(a,u){He.call(_.prototype,u)||(s[u]=a)}),s}(),{chain:!1}),_.VERSION=o,on(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){_[s].placeholder=_}),on(["drop","take"],function(s,a){Le.prototype[s]=function(u){u=u===n?1:ht(Be(u),0);var f=this.__filtered__&&!a?new Le(this):this.clone();return f.__filtered__?f.__takeCount__=Tt(u,f.__takeCount__):f.__views__.push({size:Tt(u,Te),type:s+(f.__dir__<0?"Right":"")}),f},Le.prototype[s+"Right"]=function(u){return this.reverse()[s](u).reverse()}}),on(["filter","map","takeWhile"],function(s,a){var u=a+1,f=u==T||u==U;Le.prototype[s]=function(g){var C=this.clone();return C.__iteratees__.push({iteratee:ge(g,3),type:u}),C.__filtered__=C.__filtered__||f,C}}),on(["head","last"],function(s,a){var u="take"+(a?"Right":"");Le.prototype[s]=function(){return this[u](1).value()[0]}}),on(["initial","tail"],function(s,a){var u="drop"+(a?"":"Right");Le.prototype[s]=function(){return this.__filtered__?new Le(this):this[u](1)}}),Le.prototype.compact=function(){return this.filter(Zt)},Le.prototype.find=function(s){return this.filter(s).head()},Le.prototype.findLast=function(s){return this.reverse().find(s)},Le.prototype.invokeMap=Ie(function(s,a){return typeof s=="function"?new Le(this):this.map(function(u){return is(u,s,a)})}),Le.prototype.reject=function(s){return this.filter(Wa(ge(s)))},Le.prototype.slice=function(s,a){s=Be(s);var u=this;return u.__filtered__&&(s>0||a<0)?new Le(u):(s<0?u=u.takeRight(-s):s&&(u=u.drop(s)),a!==n&&(a=Be(a),u=a<0?u.dropRight(-a):u.take(a-s)),u)},Le.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Le.prototype.toArray=function(){return this.take(Te)},Wn(Le.prototype,function(s,a){var u=/^(?:filter|find|map|reject)|While$/.test(a),f=/^(?:head|last)$/.test(a),g=_[f?"take"+(a=="last"?"Right":""):a],C=f||/^find/.test(a);g&&(_.prototype[a]=function(){var k=this.__wrapped__,V=f?[1]:arguments,L=k instanceof Le,K=V[0],Y=L||Ne(k),Q=function(Fe){var Oe=g.apply(_,Br([Fe],V));return f&&oe?Oe[0]:Oe};Y&&u&&typeof K=="function"&&K.length!=1&&(L=Y=!1);var oe=this.__chain__,pe=!!this.__actions__.length,_e=C&&!oe,De=L&&!pe;if(!C&&Y){k=De?k:new Le(this);var Ce=s.apply(k,V);return Ce.__actions__.push({func:$a,args:[Q],thisArg:n}),new an(Ce,oe)}return _e&&De?s.apply(this,V):(Ce=this.thru(Q),_e?f?Ce.value()[0]:Ce.value():Ce)})}),on(["pop","push","shift","sort","splice","unshift"],function(s){var a=ha[s],u=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",f=/^(?:pop|shift)$/.test(s);_.prototype[s]=function(){var g=arguments;if(f&&!this.__chain__){var C=this.value();return a.apply(Ne(C)?C:[],g)}return this[u](function(k){return a.apply(Ne(k)?k:[],g)})}}),Wn(Le.prototype,function(s,a){var u=_[a];if(u){var f=u.name+"";He.call(Zo,f)||(Zo[f]=[]),Zo[f].push({name:a,func:u})}}),Zo[Da(n,S).name]=[{name:"wrapper",func:n}],Le.prototype.clone=tD,Le.prototype.reverse=nD,Le.prototype.value=rD,_.prototype.at=PF,_.prototype.chain=RF,_.prototype.commit=DF,_.prototype.next=IF,_.prototype.plant=LF,_.prototype.reverse=OF,_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=MF,_.prototype.first=_.prototype.head,Ji&&(_.prototype[Ji]=FF),_},$o=DR();no?((no.exports=$o)._=$o,Lc._=$o):vt._=$o}).call(Xo)}(Zs,Zs.exports);var Ye=Zs.exports;const XN={class:"grid-overlay-container"},Yp=r.defineComponent({__name:"PlAgOverlayLoading",props:{params:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",XN,[e.params.notReady?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[n[0]||(n[0]=r.createElementVNode("div",{class:"grid-icon-cat-in-bag"},null,-1)),n[1]||(n[1]=r.createElementVNode("span",{class:"text-subtitle-m"},"No datasource",-1))],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[n[2]||(n[2]=r.createElementVNode("div",{class:"mask-24 mask-loading grid-mask-loading"},null,-1)),n[3]||(n[3]=r.createElementVNode("span",{class:"text-subtitle-m"},"Loading",-1))],64))]))}}),JN={},QN={class:"grid-overlay-container"};function eV(t,e){return r.openBlock(),r.createElementBlock("div",QN,e[0]||(e[0]=[r.createElementVNode("div",{class:"grid-icon-sad-cat"},null,-1),r.createElementVNode("span",{class:"text-subtitle-m"},"Empty",-1)]))}const Xp=Ql(JN,[["render",eV]]);async function tV(t,e){throw Error("not implemented")}function nV(t){return t.axesSpec.filter(e=>{var n;return((n=e.annotations)==null?void 0:n["pl7.app/axisNature"])==="heterogeneous"})}function rV(t,e){const n=[];for(const o of e)if(t[o].type==="column"){const i=nV(t[o].spec);for(const l of i){if(l.type!=="String"){console.warn("heterogeneous axis with string type expected, got",l,"skipping");continue}const c=jr(l),d=t.findIndex(p=>Ye.isEqual(p.id,c));if(d===-1)throw console.error("axis not found",o,c,t),Error("axis not found");n.push({columnIdx:o,axisIdx:d})}}return n}const Jp=(t,e)=>(t+e).toString();function oV(t,e,n,o,i,l){if(t.length>1)throw Error("hColumns.length > 1 is not supported");const c=t[0];let d=-1,p=-1;for(let y=0;y<l.length;++y)l[y]===c.axisIdx&&(d=y),l[y]===c.columnIdx&&(p=y);const h=(()=>{const w=o[d].data.filter(v=>v!==null);return Array.from(new Set(w))})();h.sort(),p>d?(n.splice(p,1),n.splice(d,1)):(n.splice(d,1),n.splice(p,1));const m=iV(i,o,d,p,h,e.rows);for(let y=0;y<h.length;++y){const w=h[y],v=zr(w+"@"+y);n.push({colId:v,field:Jp(o.length,y),headerName:w,valueFormatter:ih})}return{rowModelType:"clientSide",columnDefs:n,rowData:m}}function iV(t,e,n,o,i,l){const c=new Map;let d=0;for(let h=0;h<l;h++){const m={};for(let z=0;z<e.length;++z){if(z===n||z===o)continue;const $=t[z].toString();m[$]=e[z].data[h]}let y;const w=zr(Object.values(m))??"";c.has(w)?y=c.get(w):(c.set(w,m),y=m,y.id=d.toString(),d++);const v=i.indexOf(e[n].data[h]);if(v===-1)throw Error("index not found");const E=Jp(e.length,v);y[E]=e[o].data[h]}return Array.from(c.values())}const Un='"##RowNumberColumnId##"',Qp=45;function eh(){return{colId:Un,headerName:"#",valueGetter:t=>t.node===null||t.node.rowIndex===null?null:t.node.rowIndex+1,headerClass:"pl-ag-header-align-center",suppressNavigable:!0,suppressMovable:!0,mainMenuItems:[],contextMenuItems:[],lockPosition:"left",pinned:"left",lockPinned:!0,width:Qp,suppressSizeToFit:!0,suppressAutoSize:!0,cellStyle:{color:"var(--txt-03)","background-color":"var(--bg-base-light)",overflow:"visible !important","text-align":"center"},sortable:!1,resizable:!1}}function sV(){const t=document.createElement("div");return t.style.visibility="hidden",t.style.position="absolute",t.style.boxSizing="border-box",t.style.padding="15.5px",t.style.border="1px solid",t.style.width="auto",document.body.appendChild(t),t}function Ws(t,e,n){const o=t.getCellValue({rowNode:t.getDisplayedRowAtIndex(t.getLastDisplayedRowIndex()),colKey:Un});if(typeof o!="number")return;const i=o.toString().length;if(!n&&e.innerHTML.length===i)return;const l="5";e.innerHTML=l.repeat(i),r.nextTick(()=>{t.applyColumnState({state:[{colId:Un,pinned:"left",width:Math.max(Qp,e.offsetWidth)}]})})}function aV(t){document.body.removeChild(t)}function th(t){const e=sV();t.addEventListener("viewportChanged",()=>{Ws(t,e)}),t.addEventListener("columnVisible",n=>{n.columns&&n.columns.some(o=>o.isVisible()&&o.getColId()===Un)&&Ws(t,e)}),t.addEventListener("columnResized",n=>{var o;n.finished&&n.source==="autosizeColumns"&&((o=n.columns)!=null&&o.some(i=>i.isVisible()&&i.getColId()===Un))&&Ws(t,e,!0)}),t.addEventListener("gridPreDestroyed",()=>{aV(e)}),Ws(t,e)}const lV={class:"pl-ag-column-header__title d-flex align-center gap-6 flex-grow-1"},nh=r.defineComponent({__name:"PlAgColumnHeader",props:{params:{}},setup(t){const e=t,n=r.computed(()=>{var m,y;const h=(y=(m=e.params.column.getUserProvidedColDef())==null?void 0:m.headerComponentParams)==null?void 0:y.type;switch(h){case void 0:case"Text":return"cell-type-txt";case"Number":return"cell-type-num";case"File":return"paper-clip";case"Date":return"calendar";case"Duration":return"time";default:throw Error(`unsupported data type: ${h} for PlAgColumnHeader component. Column ${e.params.column.getColId()}`)}}),o=r.ref(null),i=()=>o.value=e.params.column.getSort()??null;r.onMounted(()=>i());function l(){e.params.column.isSortable()&&(e.params.progressSort(),i())}const c=r.computed(()=>{const h=o.value;switch(h){case"asc":return"arrow-up";case"desc":return"arrow-down";case null:return null;default:throw Error(`unsupported sort direction: ${h}. Column ${e.params.column.getColId()}`)}}),d=r.ref();function p(){const h=d.value;h&&e.params.showColumnMenu(h)}return(h,m)=>(r.openBlock(),r.createElementBlock("div",{class:"pl-ag-column-header d-flex align-center gap-6",onClick:l},[r.createElementVNode("div",lV,[r.createVNode(r.unref(At),{name:n.value,class:"pl-ag-column-header__type-icon"},null,8,["name"]),r.createElementVNode("span",null,r.toDisplayString(h.params.displayName),1),c.value?(r.openBlock(),r.createBlock(r.unref(At),{key:0,name:c.value},null,8,["name"])):r.createCommentVNode("",!0)]),h.params.enableMenu?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"menuActivatorBtn",ref:d,class:"pl-ag-column-header__menu-icon",onClick:r.withModifiers(p,["stop"])},[r.createVNode(r.unref(At),{name:"more"})],512)):r.createCommentVNode("",!0)]))}}),cV={class:"pl-ag-grid-open-cell d-flex"},dV={class:"pl-ag-grid-open-cell__value"},rh=r.defineComponent({__name:"PlAgTextAndButtonCell",props:{params:{}},setup(t){const e=t;function n(){var o,i;if(e.params.invokeRowsOnDoubleClick){const l=e.params.api,c={rowPinned:e.params.node.rowPinned,api:l,rowIndex:e.params.node.rowIndex,context:l,type:"rowDoubleClicked",node:e.params.node,data:e.params.data,event:null};l.dispatchEvent(c)}else(i=(o=e.params).onClick)==null||i.call(o,e.params)}return(o,i)=>(r.openBlock(),r.createElementBlock("div",cV,[r.createElementVNode("div",dV,r.toDisplayString(o.params.value),1),r.createElementVNode("div",{class:"pl-ag-grid-open-cell__activator text-caps11 align-center",onClick:r.withModifiers(n,["stop"])},[r.createVNode(r.unref(At),{name:o.params.icon??"maximize"},null,8,["name"]),r.createTextVNode(" "+r.toDisplayString(o.params.btnLabel??"Open"),1)])]))}});function uV(t){return zr(t)}function oh(t){return JSON.parse(t)}const ih=t=>t?t.value===void 0?"NULL":t.value===null?"NA":t.value.toString():"ERROR";function pV(t,e,n,o){var c,d,p;const i=uV(e),l=e.type==="axis"?e.spec.type:e.spec.valueType;return{colId:i,context:e,field:t.toString(),headerName:((d=(c=e.spec.annotations)==null?void 0:c["pl7.app/label"])==null?void 0:d.trim())??"Unlabeled "+e.type+" "+t.toString(),lockPosition:e.type==="axis",hide:(n==null?void 0:n.includes(i))??((p=e.spec.annotations)==null?void 0:p["pl7.app/table/visibility"])==="optional",valueFormatter:ih,headerComponent:nh,cellRendererSelector:o?h=>{var y,w;if(e.type!=="axis")return;const m=(w=(y=h.colDef)==null?void 0:y.context)==null?void 0:w.id;if(Ye.isEqual(m,o))return{component:rh}}:void 0,cellRendererParams:o?{invokeRowsOnDoubleClick:!0}:void 0,headerComponentParams:{type:(()=>{switch(l){case"Int":case"Long":case"Float":case"Double":return"Number";case"String":case"Bytes":return"Text";default:throw Error(`unsupported data type: ${l}`)}})()},cellDataType:(()=>{switch(l){case"Int":case"Long":case"Float":case"Double":return"number";case"String":case"Bytes":return"text";default:throw Error(`unsupported data type: ${l}`)}})()}}function hV(t,e){switch(e){case"Int":return t;case"Long":return typeof t=="bigint"?Number(t):t;case"Float":return t;case"Double":return t;case"String":return t;case"Bytes":return Buffer.from(t).toString("hex");default:throw Error(`unsupported data type: ${e}`)}}function fV(t,e,n,o){const i=t.length,l=[];for(let c=0;c<e[0].data.length;++c){const d=[],p=(o++).toString();for(const m of n)d.push(e[m].data[c]);const h={key:d,id:p};for(let m=0;m<i;++m){const y=t[m].toString(),w=e[m].data[c],v=e[m].type;Ky(e[m].absent,c)?h[y]=void 0:qy(w,v)||w===null?h[y]=null:h[y]=hV(w,v)}l.push(h)}return l}const mV=t=>t.type==="column"&&t.spec.axesSpec.length===1&&t.spec.name==="pl7.app/label";async function gV(t,e,n,o,i){const l=await t.getSpec(e);let c=l.findIndex(B=>B.type==="column");c===-1&&(c=l.length);const d=[...l.keys()].filter(B=>!Ye.some(n,D=>Ye.isEqual(jr(D.axis),l[B].id)||l[B].type==="column"&&l[B].spec.name==="pl7.app/label"&&l[B].spec.axesSpec.length===1&&Ye.isEqual(jr(D.axis),jr(l[B].spec.axesSpec[0])))).sort((B,D)=>{var N,j;if(l[B].type!==l[D].type)return l[B].type==="axis"?-1:1;const H=(N=l[B].spec.annotations)==null?void 0:N["pl7.app/table/orderPriority"],A=(j=l[D].spec.annotations)==null?void 0:j["pl7.app/table/orderPriority"];return H===void 0?A===void 0?0:1:A===void 0?-1:Number(A)-Number(H)}),p=Ye.cloneDeep(d),h=rV(l,d);for(let B=d.length-1;B>=0;--B){const D=d[B];if(!mV(l[D]))continue;const H=jr(l[D].spec.axesSpec[0]),A=Ye.findIndex(d,N=>Ye.isEqual(l[N].id,H));if(A===-1&&Ye.findIndex(n,j=>Ye.isEqual(jr(j.axis),H))===-1){console.warn(`added label column, but the axis is not in the data; axisId: ${H}`);continue}d[A]=D;for(const N of h)N.axisIdx===D&&(N.axisIdx=A);d.splice(B,1),p.splice(B,1)}const m=await t.getShape(e),y=m.rows,w=[eh(),...p.map(B=>pV(B,l[B],o,i))];if(h.length>1&&console.warn("Currently, only one heterogeneous axis is supported in the table, got",h.length," transposition will not be applied."),h.length===1)return oV(h,m,w,await t.getData(e,d),p,d);const v=[...d],E=new Map;for(let B=0;B<c;++B)E.set(B,-1);for(let B=0;B<v.length;++B){const D=v[B];E.has(D)&&E.set(D,B)}for(const[B,D]of E)D===-1&&(E.set(B,v.length),v.push(B));const z=[];for(let B=0;B<c;++B){const D=E.get(B);if(D===void 0||D===-1)throw new Error("assertion exception");z.push(D)}let $;return{rowModelType:"serverSide",columnDefs:w,serverSideDatasource:{getRows:async B=>{try{if(y==0){B.success({rowData:[],rowCount:y}),B.api.setGridOption("loading",!1),B.api.showNoRowsOverlay();return}if($&&!Ye.isEqual($.request.sortModel,B.request.sortModel)){$=void 0,B.api.setGridOption("loading",!0),B.success({rowData:[],rowCount:0});return}$=B;let D=0,H=[];if(y>0&&B.request.startRow!==void 0&&B.request.endRow!==void 0&&(D=Math.min(y,B.request.endRow)-B.request.startRow,D>0)){const A=await t.getData(e,v,{offset:B.request.startRow,length:D});H=fV(p,A,z,B.request.startRow)}B.success({rowData:H,rowCount:y}),B.api.autoSizeColumns(B.api.getAllDisplayedColumns().filter(A=>A.getColId()!==Un)),B.api.setGridOption("loading",!1)}catch(D){B.api.setGridOption("loading",!0),B.fail(),console.trace(D)}}}}}const ec=Fg(),yV=["onClick"],_V={key:0,class:"pl-ag-columns__pin"},sh=r.defineComponent({__name:"PlAgGridColumnManager",props:{api:{}},setup(t){const e=t,{api:n}=r.toRefs(e),o=r.ref([]),i=r.ref(),l=r.ref(!1),c=r.ref(0);function d(h){const m=h.findIndex(y=>y.getId()===Un);if(m!==0){const[y]=h.splice(m,1);return h.splice(0,0,y)}return h}Kp(i,{handle:".handle",onChange(h){n.value.moveColumns(d(h.map(m=>o.value[m])),0)}});function p(h){n.value.setColumnsVisible([h],!h.isVisible())}return r.watch(()=>n.value,h=>{o.value=d(h.getAllGridColumns()),o.value.length>0&&h.moveColumns(o.value,0),h.addEventListener("displayedColumnsChanged",m=>{o.value=m.api.getAllGridColumns(),c.value++})},{immediate:!0}),(h,m)=>(r.openBlock(),r.createElementBlock("div",null,[(r.openBlock(),r.createBlock(r.Teleport,{to:`#${r.unref(ec)}`},[r.createVNode(r.unref(wo),{onClick:m[0]||(m[0]=r.withModifiers(y=>l.value=!l.value,["stop"]))},{append:r.withCtx(()=>[r.createVNode(r.unref(xt),{name:"columns"})]),default:r.withCtx(()=>[m[2]||(m[2]=r.createTextVNode(" Columns "))]),_:1})],8,["to"])),r.createVNode(r.unref(Rs),{modelValue:l.value,"onUpdate:modelValue":m[1]||(m[1]=y=>l.value=y),width:"368px","close-on-outside-click":""},{title:r.withCtx(()=>m[3]||(m[3]=[r.createTextVNode("Manage Columns")])),default:r.withCtx(()=>[(r.openBlock(),r.createElementBlock("div",{ref_key:"listRef",ref:i,key:c.value,class:"pl-ag-columns"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,y=>(r.openBlock(),r.createElementBlock("div",{key:y.getId(),class:"pl-ag-columns__item"},[r.createElementVNode("div",{class:r.normalizeClass([{handle:!y.getColDef().lockPosition},"pl-ag-columns__drag"])},[r.createVNode(r.unref(At),{name:"drag-dots"})],2),r.createElementVNode("div",{class:r.normalizeClass([{visible:y.isVisible()},"pl-ag-columns__title text-s-btn"])},r.toDisplayString(y.getColDef().headerName),3),r.createElementVNode("div",{class:"pl-ag-columns__visibility",onClick:w=>p(y)},[r.createVNode(r.unref(Ct),{"close-delay":500,position:"top"},{tooltip:r.withCtx(()=>m[4]||(m[4]=[r.createTextVNode("Show/Hide")])),default:r.withCtx(()=>[r.createVNode(r.unref(xt),{name:y.isVisible()?"view-show":"view-hide"},null,8,["name"])]),_:2},1024)],8,yV),y.getColDef().lockPosition?(r.openBlock(),r.createElementBlock("div",_V,[r.createVNode(r.unref(xt),{name:"pin"})])):r.createCommentVNode("",!0)]))),128))]))]),_:1},8,["modelValue"])]))}}),CV=["id"],vV=r.defineComponent({__name:"PlAgDataTableToolsPanel",setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{id:r.unref(ec),class:"d-flex gap-6"},[r.renderSlot(e.$slots,"default")],8,CV))}}),wV={class:"ap-ag-data-table-container"},bV={key:1,class:"ap-ag-data-table-sheets"},xV=Ql(r.defineComponent({__name:"PlAgDataTable",props:r.mergeModels({settings:{},showColumnsPanel:{type:Boolean},showCellButtonForAxisId:{}},{modelValue:{default:{gridState:{}}},modelModifiers:{}}),emits:r.mergeModels(["onRowDoubleClicked","columnsChanged"],["update:modelValue"]),setup(t,{expose:e,emit:n}){x.ModuleRegistry.registerModules([hs.ClientSideRowModelModule,qd.ClipboardModule,Hd.ServerSideRowModelModule,Kd.RangeSelectionModule,ml,Lu]);const o=r.useModel(t,"modelValue"),i=t,{settings:l}=r.toRefs(i),c=n;o.value.pTableParams||(o.value.pTableParams={});function d(Z){return(Z==null?void 0:Z.sortModel.map(R=>{const{spec:O,...G}=oh(R.colId);return{column:G,ascending:R.sort==="asc",naAndAbsentAreLeastValues:!0}}))??[]}const p=r.computed({get:()=>{const Z=o.value;return{columnOrder:Z.gridState.columnOrder,sort:Z.gridState.sort,columnVisibility:Z.gridState.columnVisibility}},set:Z=>{var G;const R=((G=l.value)==null?void 0:G.sourceType)!=="ptable"||v.value.rowModelType==="clientSide"?void 0:d(Z.sort),O=o.value;o.value={...O,gridState:{...O.gridState,...Z},pTableParams:{...O.pTableParams,sorting:R}}}}),h=Z=>zr(jr(Z));function m(Z){var R,O;if(((R=l.value)==null?void 0:R.sourceType)==="ptable")return((O=l.value.sheets)==null?void 0:O.map(G=>({type:"bySingleColumnV2",column:{type:"axis",id:G.axis},predicate:{operator:"Equal",reference:Z[h(G.axis)]}})))??[]}const y=r.computed({get:()=>o.value.gridState.sheets??{},set:Z=>{const R=m(Z),O=o.value;o.value={...O,gridState:{...O.gridState,sheets:Z},pTableParams:{...O.pTableParams,filters:R}}}});r.watch(()=>l.value,(Z,R)=>{if((Z==null?void 0:Z.sourceType)!=="ptable"||!Z.sheets){y.value={};return}if(R&&R.sourceType==="ptable"&&Ye.isEqual(Z.sheets,R.sheets))return;const O=y.value,G={};for(const P of Z.sheets){const T=h(P.axis);G[T]=O[T]??P.defaultValue??P.options[0].value}y.value=G},{immediate:!0});const w=r.shallowRef(),v=r.shallowRef({animateRows:!1,suppressColumnMoveAnimation:!0,cellSelection:!0,initialState:p.value,autoSizeStrategy:{type:"fitCellContents"},onRowDoubleClicked:Z=>{Z.data&&c("onRowDoubleClicked",Z.data.key)},onSortChanged:Z=>{Z.api.refreshCells()},onFilterChanged:Z=>{Z.api.refreshCells()},defaultColDef:{suppressHeaderMenuButton:!0},maintainColumnOrder:!0,localeText:{loadingError:"..."},rowModelType:"clientSide",maxBlocksInCache:1e3,blockLoadDebounceMillis:500,serverSideSortAllLevels:!0,suppressServerSideFullWidthLoadingRow:!0,getRowId:Z=>Z.data.id,loading:!0,loadingOverlayComponentParams:{notReady:!0},loadingOverlayComponent:Yp,noRowsOverlayComponent:Xp,defaultCsvExportParams:{allColumns:!0,suppressQuotes:!0,fileName:"table.csv"}}),E=Z=>{const R=Z.api;th(R),w.value=new Proxy(R,{get(O,G,P){switch(G){case"setGridOption":return(T,M)=>{const U=v.value;U[T]=M,v.value=U,R.setGridOption(T,M)};case"updateGridOptions":return T=>{v.value={...v.value,...T},R.updateGridOptions(T)};default:return Reflect.get(O,G,P)}}})},z=Z=>({columnOrder:Z.columnOrder,sort:Z.sort,columnVisibility:Z.columnVisibility??(Z.columnOrder?{hiddenColIds:[]}:void 0)}),$=Z=>{v.value.initialState=p.value=z(Z.state),Z.api.autoSizeColumns(Z.api.getAllDisplayedColumns().filter(R=>R.getColId()!==Un))},S=()=>{v.value.initialState=p.value=z(w.value.getState()),w.value=void 0};let B=!1;const D=()=>{if(!B)return;const Z=w.value;Z!==void 0&&(Z.exportDataAsCsv(),B=!1,Z.setGridOption("cacheBlockSize",100))},H=()=>{if(!B)return;const Z=w.value;if(Z===void 0)return;const R=Z.getServerSideGroupLevelState()[0];R.cacheBlockSize===R.rowCount&&Z.refreshServerSide({route:R.route,purge:!1})};e({exportCsv:async()=>{const Z=w.value;if(Z!==void 0){if(v.value.rowModelType==="clientSide"){Z.exportDataAsCsv();return}if(v.value.rowModelType==="serverSide"){const R=Z.getServerSideGroupLevelState()[0];if(R.rowCount<=R.cacheBlockSize){Z.exportDataAsCsv();return}B||(B=!0,Z.setGridOption("cacheBlockSize",R.rowCount))}}}});const N=r.ref(0);r.watch(()=>[w.value,p.value],(Z,R)=>{if(Ye.isEqual(Z,R))return;const[O,G]=Z;if(!O)return;const P=z(O.getState());Ye.isEqual(G,P)||(v.value.initialState=G,++N.value)}),r.watch(()=>v.value,(Z,R)=>{var O,G;if(R){if(Z.rowModelType!=R.rowModelType&&++N.value,!Ye.isEqual(Z.columnDefs,R.columnDefs)&&Z.columnDefs){const P=U=>!("children"in U),M=(((O=Z.columnDefs)==null?void 0:O.filter(P))??[]).map(U=>U.colId).filter(U=>U!==void 0).filter(U=>U!==Un).map(U=>oh(U))??[];c("columnsChanged",M)}!Ye.isEqual(Z.loadingOverlayComponentParams,R.loadingOverlayComponentParams)&&Z.loading&&((G=w.value)==null||G.setGridOption("loading",!1),r.nextTick(()=>{var P;return(P=w.value)==null?void 0:P.setGridOption("loading",!0)}))}},{immediate:!0});const j=(Z,R)=>{var G;const O=y.value;if(O[Z]!==R)return O[Z]=R,y.value=O,(G=w.value)==null?void 0:G.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1}})};let J;return r.watch(()=>[w.value,l.value],async Z=>{var P,T;const[R,O]=Z;if(!R||Ye.isEqual(O,J))return;J=O;const G=O==null?void 0:O.sourceType;switch(G){case void 0:return R.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[],rowData:void 0,datasource:void 0});case"ptable":{if(!(O!=null&&O.pTable))return R.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},columnDefs:[],rowData:void 0,datasource:void 0});const M=xs().pFrameDriver,U=(T=(P=p.value)==null?void 0:P.columnVisibility)==null?void 0:T.hiddenColIds,X=await gV(M,O.pTable,O.sheets??[],U,i.showCellButtonForAxisId);return R.updateGridOptions({loading:!1,loadingOverlayComponentParams:{notReady:!1},...X})}case"xsv":{if(!(O==null?void 0:O.xsvFile))return R.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},columnDefs:[],rowData:void 0,datasource:void 0});xs().blobDriver;const U=await tV();return R.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},...U})}default:throw Error(`unsupported source type: ${G}`)}}),(Z,R)=>{var O;return r.openBlock(),r.createElementBlock("div",wV,[w.value&&Z.showColumnsPanel?(r.openBlock(),r.createBlock(r.unref(sh),{key:0,api:w.value},null,8,["api"])):r.createCommentVNode("",!0),((O=r.unref(l))==null?void 0:O.sourceType)==="ptable"&&r.unref(l).sheets&&r.unref(l).sheets.length>0?(r.openBlock(),r.createElementBlock("div",bV,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(l).sheets,(G,P)=>{var T,M;return r.openBlock(),r.createBlock(r.unref(vp),{key:P,"model-value":y.value[h(G.axis)],options:G.options,prefix:(((M=(T=G.axis.annotations)==null?void 0:T["pl7.app/label"])==null?void 0:M.trim())??`Unlabeled axis ${P}`)+":","onUpdate:modelValue":U=>j(h(G.axis),U)},null,8,["model-value","options","prefix","onUpdate:modelValue"])}),128))])):r.createCommentVNode("",!0),(r.openBlock(),r.createBlock(r.unref(Pg.AgGridVue),{key:N.value,theme:r.unref(Mu),class:"ap-ag-data-table-grid","grid-options":v.value,onGridReady:E,onStateUpdated:$,onGridPreDestroyed:S,onStoreRefreshed:D,onModelUpdated:H},null,8,["theme","grid-options"]))])}}}),[["__scopeId","data-v-6bef98d8"]]),kV={key:1,class:"alert-error"},SV={key:2},EV=r.defineComponent({__name:"ValueOrErrorsComponent",props:{valueOrError:{}},setup(t){const e=t,n=r.computed(()=>e.valueOrError&&e.valueOrError.ok?e.valueOrError.value:void 0),o=r.computed(()=>e.valueOrError&&!e.valueOrError.ok?e.valueOrError.errors:void 0),i=r.computed(()=>n.value===void 0&&o.value===void 0);return(l,c)=>(r.openBlock(),r.createElementBlock("div",null,[n.value!==void 0?r.renderSlot(l.$slots,"default",r.normalizeProps(r.mergeProps({key:0},{value:n.value}))):r.createCommentVNode("",!0),o.value?(r.openBlock(),r.createElementBlock("div",kV,r.toDisplayString(o.value),1)):r.createCommentVNode("",!0),i.value?(r.openBlock(),r.createElementBlock("div",SV,"Unresolved")):r.createCommentVNode("",!0)]))}}),TV={style:{height:"100%"}},NV=r.defineComponent({__name:"PlAgCellFile",props:{params:{}},setup(t){const e=t,n=r.computed(()=>e.params.extensions),o=r.computed(()=>e.params.value);function i(c){e.params.setValue(c)}const l=r.computed(()=>e.params.resolveProgress?e.params.resolveProgress(o.value):void 0);return(c,d)=>(r.openBlock(),r.createElementBlock("div",TV,[r.createVNode(r.unref(Zp),{"show-filename-only":"",clearable:"","cell-style":"","file-dialog-title":"Select any file",placeholder:`Choose file ${n.value?n.value[0]:""}`,extensions:n.value,"model-value":o.value,progress:l.value,"onUpdate:modelValue":i},null,8,["placeholder","extensions","model-value","progress"])]))}});var tc={exports:{}};const VV="2.0.0",ah=256,AV=Number.MAX_SAFE_INTEGER||9007199254740991,BV=16,PV=ah-6;var js={MAX_LENGTH:ah,MAX_SAFE_COMPONENT_LENGTH:BV,MAX_SAFE_BUILD_LENGTH:PV,MAX_SAFE_INTEGER:AV,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:VV,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Hs=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};(function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:i}=js,l=Hs;e=t.exports={};const c=e.re=[],d=e.safeRe=[],p=e.src=[],h=e.t={};let m=0;const y="[a-zA-Z0-9-]",w=[["\\s",1],["\\d",i],[y,o]],v=z=>{for(const[$,S]of w)z=z.split(`${$}*`).join(`${$}{0,${S}}`).split(`${$}+`).join(`${$}{1,${S}}`);return z},E=(z,$,S)=>{const B=v($),D=m++;l(z,D,$),h[z]=D,p[D]=$,c[D]=new RegExp($,S?"g":void 0),d[D]=new RegExp(B,S?"g":void 0)};E("NUMERICIDENTIFIER","0|[1-9]\\d*"),E("NUMERICIDENTIFIERLOOSE","\\d+"),E("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${y}*`),E("MAINVERSION",`(${p[h.NUMERICIDENTIFIER]})\\.(${p[h.NUMERICIDENTIFIER]})\\.(${p[h.NUMERICIDENTIFIER]})`),E("MAINVERSIONLOOSE",`(${p[h.NUMERICIDENTIFIERLOOSE]})\\.(${p[h.NUMERICIDENTIFIERLOOSE]})\\.(${p[h.NUMERICIDENTIFIERLOOSE]})`),E("PRERELEASEIDENTIFIER",`(?:${p[h.NUMERICIDENTIFIER]}|${p[h.NONNUMERICIDENTIFIER]})`),E("PRERELEASEIDENTIFIERLOOSE",`(?:${p[h.NUMERICIDENTIFIERLOOSE]}|${p[h.NONNUMERICIDENTIFIER]})`),E("PRERELEASE",`(?:-(${p[h.PRERELEASEIDENTIFIER]}(?:\\.${p[h.PRERELEASEIDENTIFIER]})*))`),E("PRERELEASELOOSE",`(?:-?(${p[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${p[h.PRERELEASEIDENTIFIERLOOSE]})*))`),E("BUILDIDENTIFIER",`${y}+`),E("BUILD",`(?:\\+(${p[h.BUILDIDENTIFIER]}(?:\\.${p[h.BUILDIDENTIFIER]})*))`),E("FULLPLAIN",`v?${p[h.MAINVERSION]}${p[h.PRERELEASE]}?${p[h.BUILD]}?`),E("FULL",`^${p[h.FULLPLAIN]}$`),E("LOOSEPLAIN",`[v=\\s]*${p[h.MAINVERSIONLOOSE]}${p[h.PRERELEASELOOSE]}?${p[h.BUILD]}?`),E("LOOSE",`^${p[h.LOOSEPLAIN]}$`),E("GTLT","((?:<|>)?=?)"),E("XRANGEIDENTIFIERLOOSE",`${p[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),E("XRANGEIDENTIFIER",`${p[h.NUMERICIDENTIFIER]}|x|X|\\*`),E("XRANGEPLAIN",`[v=\\s]*(${p[h.XRANGEIDENTIFIER]})(?:\\.(${p[h.XRANGEIDENTIFIER]})(?:\\.(${p[h.XRANGEIDENTIFIER]})(?:${p[h.PRERELEASE]})?${p[h.BUILD]}?)?)?`),E("XRANGEPLAINLOOSE",`[v=\\s]*(${p[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[h.XRANGEIDENTIFIERLOOSE]})(?:${p[h.PRERELEASELOOSE]})?${p[h.BUILD]}?)?)?`),E("XRANGE",`^${p[h.GTLT]}\\s*${p[h.XRANGEPLAIN]}$`),E("XRANGELOOSE",`^${p[h.GTLT]}\\s*${p[h.XRANGEPLAINLOOSE]}$`),E("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),E("COERCE",`${p[h.COERCEPLAIN]}(?:$|[^\\d])`),E("COERCEFULL",p[h.COERCEPLAIN]+`(?:${p[h.PRERELEASE]})?(?:${p[h.BUILD]})?(?:$|[^\\d])`),E("COERCERTL",p[h.COERCE],!0),E("COERCERTLFULL",p[h.COERCEFULL],!0),E("LONETILDE","(?:~>?)"),E("TILDETRIM",`(\\s*)${p[h.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",E("TILDE",`^${p[h.LONETILDE]}${p[h.XRANGEPLAIN]}$`),E("TILDELOOSE",`^${p[h.LONETILDE]}${p[h.XRANGEPLAINLOOSE]}$`),E("LONECARET","(?:\\^)"),E("CARETTRIM",`(\\s*)${p[h.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",E("CARET",`^${p[h.LONECARET]}${p[h.XRANGEPLAIN]}$`),E("CARETLOOSE",`^${p[h.LONECARET]}${p[h.XRANGEPLAINLOOSE]}$`),E("COMPARATORLOOSE",`^${p[h.GTLT]}\\s*(${p[h.LOOSEPLAIN]})$|^$`),E("COMPARATOR",`^${p[h.GTLT]}\\s*(${p[h.FULLPLAIN]})$|^$`),E("COMPARATORTRIM",`(\\s*)${p[h.GTLT]}\\s*(${p[h.LOOSEPLAIN]}|${p[h.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",E("HYPHENRANGE",`^\\s*(${p[h.XRANGEPLAIN]})\\s+-\\s+(${p[h.XRANGEPLAIN]})\\s*$`),E("HYPHENRANGELOOSE",`^\\s*(${p[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${p[h.XRANGEPLAINLOOSE]})\\s*$`),E("STAR","(<|>)?=?\\s*\\*"),E("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),E("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(tc,tc.exports);var Gi=tc.exports;const RV=Object.freeze({loose:!0}),DV=Object.freeze({});var nc=t=>t?typeof t!="object"?RV:t:DV;const lh=/^[0-9]+$/,ch=(t,e)=>{const n=lh.test(t),o=lh.test(e);return n&&o&&(t=+t,e=+e),t===e?0:n&&!o?-1:o&&!n?1:t<e?-1:1};var dh={compareIdentifiers:ch,rcompareIdentifiers:(t,e)=>ch(e,t)};const qs=Hs,{MAX_LENGTH:uh,MAX_SAFE_INTEGER:Ks}=js,{safeRe:ph,t:hh}=Gi,IV=nc,{compareIdentifiers:Vo}=dh;var Pt=class qn{constructor(e,n){if(n=IV(n),e instanceof qn){if(e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>uh)throw new TypeError(`version is longer than ${uh} characters`);qs("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const o=e.trim().match(n.loose?ph[hh.LOOSE]:ph[hh.FULL]);if(!o)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>Ks||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Ks||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Ks||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){const l=+i;if(l>=0&&l<Ks)return l}return i}):this.prerelease=[],this.build=o[5]?o[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(qs("SemVer.compare",this.version,this.options,e),!(e instanceof qn)){if(typeof e=="string"&&e===this.version)return 0;e=new qn(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof qn||(e=new qn(e,this.options)),Vo(this.major,e.major)||Vo(this.minor,e.minor)||Vo(this.patch,e.patch)}comparePre(e){if(e instanceof qn||(e=new qn(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let n=0;do{const o=this.prerelease[n],i=e.prerelease[n];if(qs("prerelease compare",n,o,i),o===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(o===void 0)return-1;if(o===i)continue;return Vo(o,i)}while(++n)}compareBuild(e){e instanceof qn||(e=new qn(e,this.options));let n=0;do{const o=this.build[n],i=e.build[n];if(qs("build compare",n,o,i),o===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(o===void 0)return-1;if(o===i)continue;return Vo(o,i)}while(++n)}inc(e,n,o){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,o);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,o);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,o),this.inc("pre",n,o);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,o),this.inc("pre",n,o);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const i=Number(o)?1:0;if(!n&&o===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[i];else{let l=this.prerelease.length;for(;--l>=0;)typeof this.prerelease[l]=="number"&&(this.prerelease[l]++,l=-2);if(l===-1){if(n===this.prerelease.join(".")&&o===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(n){let l=[n,i];o===!1&&(l=[n]),Vo(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=l):this.prerelease=l}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};const fh=Pt;var Ao=(t,e,n=!1)=>{if(t instanceof fh)return t;try{return new fh(t,e)}catch(o){if(!n)return null;throw o}};const FV=Ao;var LV=(t,e)=>{const n=FV(t,e);return n?n.version:null};const OV=Ao;var MV=(t,e)=>{const n=OV(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null};const mh=Pt;var GV=(t,e,n,o,i)=>{typeof n=="string"&&(i=o,o=n,n=void 0);try{return new mh(t instanceof mh?t.version:t,n).inc(e,o,i).version}catch{return null}};const gh=Ao;var $V=(t,e)=>{const n=gh(t,null,!0),o=gh(e,null,!0),i=n.compare(o);if(i===0)return null;const l=i>0,c=l?n:o,d=l?o:n,p=!!c.prerelease.length;if(!!d.prerelease.length&&!p)return!d.patch&&!d.minor?"major":c.patch?"patch":c.minor?"minor":"major";const m=p?"pre":"";return n.major!==o.major?m+"major":n.minor!==o.minor?m+"minor":n.patch!==o.patch?m+"patch":"prerelease"};const zV=Pt;var UV=(t,e)=>new zV(t,e).major;const ZV=Pt;var WV=(t,e)=>new ZV(t,e).minor;const jV=Pt;var HV=(t,e)=>new jV(t,e).patch;const qV=Ao;var KV=(t,e)=>{const n=qV(t,e);return n&&n.prerelease.length?n.prerelease:null};const yh=Pt;var _n=(t,e,n)=>new yh(t,n).compare(new yh(e,n));const YV=_n;var XV=(t,e,n)=>YV(e,t,n);const JV=_n;var QV=(t,e)=>JV(t,e,!0);const _h=Pt;var rc=(t,e,n)=>{const o=new _h(t,n),i=new _h(e,n);return o.compare(i)||o.compareBuild(i)};const eA=rc;var tA=(t,e)=>t.sort((n,o)=>eA(n,o,e));const nA=rc;var rA=(t,e)=>t.sort((n,o)=>nA(o,n,e));const oA=_n;var Ys=(t,e,n)=>oA(t,e,n)>0;const iA=_n;var oc=(t,e,n)=>iA(t,e,n)<0;const sA=_n;var Ch=(t,e,n)=>sA(t,e,n)===0;const aA=_n;var vh=(t,e,n)=>aA(t,e,n)!==0;const lA=_n;var ic=(t,e,n)=>lA(t,e,n)>=0;const cA=_n;var sc=(t,e,n)=>cA(t,e,n)<=0;const dA=Ch,uA=vh,pA=Ys,hA=ic,fA=oc,mA=sc;var wh=(t,e,n,o)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t===n;case"!==":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t!==n;case"":case"=":case"==":return dA(t,n,o);case"!=":return uA(t,n,o);case">":return pA(t,n,o);case">=":return hA(t,n,o);case"<":return fA(t,n,o);case"<=":return mA(t,n,o);default:throw new TypeError(`Invalid operator: ${e}`)}};const gA=Pt,yA=Ao,{safeRe:Xs,t:Js}=Gi;var _A=(t,e)=>{if(t instanceof gA)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let n=null;if(!e.rtl)n=t.match(e.includePrerelease?Xs[Js.COERCEFULL]:Xs[Js.COERCE]);else{const p=e.includePrerelease?Xs[Js.COERCERTLFULL]:Xs[Js.COERCERTL];let h;for(;(h=p.exec(t))&&(!n||n.index+n[0].length!==t.length);)(!n||h.index+h[0].length!==n.index+n[0].length)&&(n=h),p.lastIndex=h.index+h[1].length+h[2].length;p.lastIndex=-1}if(n===null)return null;const o=n[2],i=n[3]||"0",l=n[4]||"0",c=e.includePrerelease&&n[5]?`-${n[5]}`:"",d=e.includePrerelease&&n[6]?`+${n[6]}`:"";return yA(`${o}.${i}.${l}${c}${d}`,e)},CA=class{constructor(){this.max=1e3,this.map=new Map}get(e){const n=this.map.get(e);if(n!==void 0)return this.map.delete(e),this.map.set(e,n),n}delete(e){return this.map.delete(e)}set(e,n){if(!this.delete(e)&&n!==void 0){if(this.map.size>=this.max){const i=this.map.keys().next().value;this.delete(i)}this.map.set(e,n)}return this}},ac,bh;function Cn(){if(bh)return ac;bh=1;const t=/\s+/g;class e{constructor(M,U){if(U=i(U),M instanceof e)return M.loose===!!U.loose&&M.includePrerelease===!!U.includePrerelease?M:new e(M.raw,U);if(M instanceof l)return this.raw=M.value,this.set=[[M]],this.formatted=void 0,this;if(this.options=U,this.loose=!!U.loose,this.includePrerelease=!!U.includePrerelease,this.raw=M.trim().replace(t," "),this.set=this.raw.split("||").map(X=>this.parseRange(X.trim())).filter(X=>X.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const X=this.set[0];if(this.set=this.set.filter(ne=>!z(ne[0])),this.set.length===0)this.set=[X];else if(this.set.length>1){for(const ne of this.set)if(ne.length===1&&$(ne[0])){this.set=[ne];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let M=0;M<this.set.length;M++){M>0&&(this.formatted+="||");const U=this.set[M];for(let X=0;X<U.length;X++)X>0&&(this.formatted+=" "),this.formatted+=U[X].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(M){const X=((this.options.includePrerelease&&v)|(this.options.loose&&E))+":"+M,ne=o.get(X);if(ne)return ne;const de=this.options.loose,me=de?p[h.HYPHENRANGELOOSE]:p[h.HYPHENRANGE];M=M.replace(me,G(this.options.includePrerelease)),c("hyphen replace",M),M=M.replace(p[h.COMPARATORTRIM],m),c("comparator trim",M),M=M.replace(p[h.TILDETRIM],y),c("tilde trim",M),M=M.replace(p[h.CARETTRIM],w),c("caret trim",M);let Te=M.split(" ").map(qe=>B(qe,this.options)).join(" ").split(/\s+/).map(qe=>O(qe,this.options));de&&(Te=Te.filter(qe=>(c("loose invalid filter",qe,this.options),!!qe.match(p[h.COMPARATORLOOSE])))),c("range list",Te);const Se=new Map,je=Te.map(qe=>new l(qe,this.options));for(const qe of je){if(z(qe))return[qe];Se.set(qe.value,qe)}Se.size>1&&Se.has("")&&Se.delete("");const It=[...Se.values()];return o.set(X,It),It}intersects(M,U){if(!(M instanceof e))throw new TypeError("a Range is required");return this.set.some(X=>S(X,U)&&M.set.some(ne=>S(ne,U)&&X.every(de=>ne.every(me=>de.intersects(me,U)))))}test(M){if(!M)return!1;if(typeof M=="string")try{M=new d(M,this.options)}catch{return!1}for(let U=0;U<this.set.length;U++)if(P(this.set[U],M,this.options))return!0;return!1}}ac=e;const n=CA,o=new n,i=nc,l=Qs(),c=Hs,d=Pt,{safeRe:p,t:h,comparatorTrimReplace:m,tildeTrimReplace:y,caretTrimReplace:w}=Gi,{FLAG_INCLUDE_PRERELEASE:v,FLAG_LOOSE:E}=js,z=T=>T.value==="<0.0.0-0",$=T=>T.value==="",S=(T,M)=>{let U=!0;const X=T.slice();let ne=X.pop();for(;U&&X.length;)U=X.every(de=>ne.intersects(de,M)),ne=X.pop();return U},B=(T,M)=>(c("comp",T,M),T=N(T,M),c("caret",T),T=H(T,M),c("tildes",T),T=J(T,M),c("xrange",T),T=R(T,M),c("stars",T),T),D=T=>!T||T.toLowerCase()==="x"||T==="*",H=(T,M)=>T.trim().split(/\s+/).map(U=>A(U,M)).join(" "),A=(T,M)=>{const U=M.loose?p[h.TILDELOOSE]:p[h.TILDE];return T.replace(U,(X,ne,de,me,Te)=>{c("tilde",T,X,ne,de,me,Te);let Se;return D(ne)?Se="":D(de)?Se=`>=${ne}.0.0 <${+ne+1}.0.0-0`:D(me)?Se=`>=${ne}.${de}.0 <${ne}.${+de+1}.0-0`:Te?(c("replaceTilde pr",Te),Se=`>=${ne}.${de}.${me}-${Te} <${ne}.${+de+1}.0-0`):Se=`>=${ne}.${de}.${me} <${ne}.${+de+1}.0-0`,c("tilde return",Se),Se})},N=(T,M)=>T.trim().split(/\s+/).map(U=>j(U,M)).join(" "),j=(T,M)=>{c("caret",T,M);const U=M.loose?p[h.CARETLOOSE]:p[h.CARET],X=M.includePrerelease?"-0":"";return T.replace(U,(ne,de,me,Te,Se)=>{c("caret",T,ne,de,me,Te,Se);let je;return D(de)?je="":D(me)?je=`>=${de}.0.0${X} <${+de+1}.0.0-0`:D(Te)?de==="0"?je=`>=${de}.${me}.0${X} <${de}.${+me+1}.0-0`:je=`>=${de}.${me}.0${X} <${+de+1}.0.0-0`:Se?(c("replaceCaret pr",Se),de==="0"?me==="0"?je=`>=${de}.${me}.${Te}-${Se} <${de}.${me}.${+Te+1}-0`:je=`>=${de}.${me}.${Te}-${Se} <${de}.${+me+1}.0-0`:je=`>=${de}.${me}.${Te}-${Se} <${+de+1}.0.0-0`):(c("no pr"),de==="0"?me==="0"?je=`>=${de}.${me}.${Te}${X} <${de}.${me}.${+Te+1}-0`:je=`>=${de}.${me}.${Te}${X} <${de}.${+me+1}.0-0`:je=`>=${de}.${me}.${Te} <${+de+1}.0.0-0`),c("caret return",je),je})},J=(T,M)=>(c("replaceXRanges",T,M),T.split(/\s+/).map(U=>Z(U,M)).join(" ")),Z=(T,M)=>{T=T.trim();const U=M.loose?p[h.XRANGELOOSE]:p[h.XRANGE];return T.replace(U,(X,ne,de,me,Te,Se)=>{c("xRange",T,X,ne,de,me,Te,Se);const je=D(de),It=je||D(me),qe=It||D(Te),Zn=qe;return ne==="="&&Zn&&(ne=""),Se=M.includePrerelease?"-0":"",je?ne===">"||ne==="<"?X="<0.0.0-0":X="*":ne&&Zn?(It&&(me=0),Te=0,ne===">"?(ne=">=",It?(de=+de+1,me=0,Te=0):(me=+me+1,Te=0)):ne==="<="&&(ne="<",It?de=+de+1:me=+me+1),ne==="<"&&(Se="-0"),X=`${ne+de}.${me}.${Te}${Se}`):It?X=`>=${de}.0.0${Se} <${+de+1}.0.0-0`:qe&&(X=`>=${de}.${me}.0${Se} <${de}.${+me+1}.0-0`),c("xRange return",X),X})},R=(T,M)=>(c("replaceStars",T,M),T.trim().replace(p[h.STAR],"")),O=(T,M)=>(c("replaceGTE0",T,M),T.trim().replace(p[M.includePrerelease?h.GTE0PRE:h.GTE0],"")),G=T=>(M,U,X,ne,de,me,Te,Se,je,It,qe,Zn)=>(D(X)?U="":D(ne)?U=`>=${X}.0.0${T?"-0":""}`:D(de)?U=`>=${X}.${ne}.0${T?"-0":""}`:me?U=`>=${U}`:U=`>=${U}${T?"-0":""}`,D(je)?Se="":D(It)?Se=`<${+je+1}.0.0-0`:D(qe)?Se=`<${je}.${+It+1}.0-0`:Zn?Se=`<=${je}.${It}.${qe}-${Zn}`:T?Se=`<${je}.${It}.${+qe+1}-0`:Se=`<=${Se}`,`${U} ${Se}`.trim()),P=(T,M,U)=>{for(let X=0;X<T.length;X++)if(!T[X].test(M))return!1;if(M.prerelease.length&&!U.includePrerelease){for(let X=0;X<T.length;X++)if(c(T[X].semver),T[X].semver!==l.ANY&&T[X].semver.prerelease.length>0){const ne=T[X].semver;if(ne.major===M.major&&ne.minor===M.minor&&ne.patch===M.patch)return!0}return!1}return!0};return ac}var lc,xh;function Qs(){if(xh)return lc;xh=1;const t=Symbol("SemVer ANY");class e{static get ANY(){return t}constructor(m,y){if(y=n(y),m instanceof e){if(m.loose===!!y.loose)return m;m=m.value}m=m.trim().split(/\s+/).join(" "),c("comparator",m,y),this.options=y,this.loose=!!y.loose,this.parse(m),this.semver===t?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(m){const y=this.options.loose?o[i.COMPARATORLOOSE]:o[i.COMPARATOR],w=m.match(y);if(!w)throw new TypeError(`Invalid comparator: ${m}`);this.operator=w[1]!==void 0?w[1]:"",this.operator==="="&&(this.operator=""),w[2]?this.semver=new d(w[2],this.options.loose):this.semver=t}toString(){return this.value}test(m){if(c("Comparator.test",m,this.options.loose),this.semver===t||m===t)return!0;if(typeof m=="string")try{m=new d(m,this.options)}catch{return!1}return l(m,this.operator,this.semver,this.options)}intersects(m,y){if(!(m instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new p(m.value,y).test(this.value):m.operator===""?m.value===""?!0:new p(this.value,y).test(m.semver):(y=n(y),y.includePrerelease&&(this.value==="<0.0.0-0"||m.value==="<0.0.0-0")||!y.includePrerelease&&(this.value.startsWith("<0.0.0")||m.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&m.operator.startsWith(">")||this.operator.startsWith("<")&&m.operator.startsWith("<")||this.semver.version===m.semver.version&&this.operator.includes("=")&&m.operator.includes("=")||l(this.semver,"<",m.semver,y)&&this.operator.startsWith(">")&&m.operator.startsWith("<")||l(this.semver,">",m.semver,y)&&this.operator.startsWith("<")&&m.operator.startsWith(">")))}}lc=e;const n=nc,{safeRe:o,t:i}=Gi,l=wh,c=Hs,d=Pt,p=Cn();return lc}const vA=Cn();var ea=(t,e,n)=>{try{e=new vA(e,n)}catch{return!1}return e.test(t)};const wA=Cn();var bA=(t,e)=>new wA(t,e).set.map(n=>n.map(o=>o.value).join(" ").trim().split(" "));const xA=Pt,kA=Cn();var SA=(t,e,n)=>{let o=null,i=null,l=null;try{l=new kA(e,n)}catch{return null}return t.forEach(c=>{l.test(c)&&(!o||i.compare(c)===-1)&&(o=c,i=new xA(o,n))}),o};const EA=Pt,TA=Cn();var NA=(t,e,n)=>{let o=null,i=null,l=null;try{l=new TA(e,n)}catch{return null}return t.forEach(c=>{l.test(c)&&(!o||i.compare(c)===1)&&(o=c,i=new EA(o,n))}),o};const cc=Pt,VA=Cn(),kh=Ys;var AA=(t,e)=>{t=new VA(t,e);let n=new cc("0.0.0");if(t.test(n)||(n=new cc("0.0.0-0"),t.test(n)))return n;n=null;for(let o=0;o<t.set.length;++o){const i=t.set[o];let l=null;i.forEach(c=>{const d=new cc(c.semver.version);switch(c.operator){case">":d.prerelease.length===0?d.patch++:d.prerelease.push(0),d.raw=d.format();case"":case">=":(!l||kh(d,l))&&(l=d);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),l&&(!n||kh(n,l))&&(n=l)}return n&&t.test(n)?n:null};const BA=Cn();var PA=(t,e)=>{try{return new BA(t,e).range||"*"}catch{return null}};const RA=Pt,Sh=Qs(),{ANY:DA}=Sh,IA=Cn(),FA=ea,Eh=Ys,Th=oc,LA=sc,OA=ic;var dc=(t,e,n,o)=>{t=new RA(t,o),e=new IA(e,o);let i,l,c,d,p;switch(n){case">":i=Eh,l=LA,c=Th,d=">",p=">=";break;case"<":i=Th,l=OA,c=Eh,d="<",p="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(FA(t,e,o))return!1;for(let h=0;h<e.set.length;++h){const m=e.set[h];let y=null,w=null;if(m.forEach(v=>{v.semver===DA&&(v=new Sh(">=0.0.0")),y=y||v,w=w||v,i(v.semver,y.semver,o)?y=v:c(v.semver,w.semver,o)&&(w=v)}),y.operator===d||y.operator===p||(!w.operator||w.operator===d)&&l(t,w.semver))return!1;if(w.operator===p&&c(t,w.semver))return!1}return!0};const MA=dc;var GA=(t,e,n)=>MA(t,e,">",n);const $A=dc;var zA=(t,e,n)=>$A(t,e,"<",n);const Nh=Cn();var UA=(t,e,n)=>(t=new Nh(t,n),e=new Nh(e,n),t.intersects(e,n));const ZA=ea,WA=_n;var jA=(t,e,n)=>{const o=[];let i=null,l=null;const c=t.sort((m,y)=>WA(m,y,n));for(const m of c)ZA(m,e,n)?(l=m,i||(i=m)):(l&&o.push([i,l]),l=null,i=null);i&&o.push([i,null]);const d=[];for(const[m,y]of o)m===y?d.push(m):!y&&m===c[0]?d.push("*"):y?m===c[0]?d.push(`<=${y}`):d.push(`${m} - ${y}`):d.push(`>=${m}`);const p=d.join(" || "),h=typeof e.raw=="string"?e.raw:String(e);return p.length<h.length?p:e};const Vh=Cn(),uc=Qs(),{ANY:pc}=uc,$i=ea,hc=_n,HA=(t,e,n={})=>{if(t===e)return!0;t=new Vh(t,n),e=new Vh(e,n);let o=!1;e:for(const i of t.set){for(const l of e.set){const c=KA(i,l,n);if(o=o||c!==null,c)continue e}if(o)return!1}return!0},qA=[new uc(">=0.0.0-0")],Ah=[new uc(">=0.0.0")],KA=(t,e,n)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===pc){if(e.length===1&&e[0].semver===pc)return!0;n.includePrerelease?t=qA:t=Ah}if(e.length===1&&e[0].semver===pc){if(n.includePrerelease)return!0;e=Ah}const o=new Set;let i,l;for(const v of t)v.operator===">"||v.operator===">="?i=Bh(i,v,n):v.operator==="<"||v.operator==="<="?l=Ph(l,v,n):o.add(v.semver);if(o.size>1)return null;let c;if(i&&l){if(c=hc(i.semver,l.semver,n),c>0)return null;if(c===0&&(i.operator!==">="||l.operator!=="<="))return null}for(const v of o){if(i&&!$i(v,String(i),n)||l&&!$i(v,String(l),n))return null;for(const E of e)if(!$i(v,String(E),n))return!1;return!0}let d,p,h,m,y=l&&!n.includePrerelease&&l.semver.prerelease.length?l.semver:!1,w=i&&!n.includePrerelease&&i.semver.prerelease.length?i.semver:!1;y&&y.prerelease.length===1&&l.operator==="<"&&y.prerelease[0]===0&&(y=!1);for(const v of e){if(m=m||v.operator===">"||v.operator===">=",h=h||v.operator==="<"||v.operator==="<=",i){if(w&&v.semver.prerelease&&v.semver.prerelease.length&&v.semver.major===w.major&&v.semver.minor===w.minor&&v.semver.patch===w.patch&&(w=!1),v.operator===">"||v.operator===">="){if(d=Bh(i,v,n),d===v&&d!==i)return!1}else if(i.operator===">="&&!$i(i.semver,String(v),n))return!1}if(l){if(y&&v.semver.prerelease&&v.semver.prerelease.length&&v.semver.major===y.major&&v.semver.minor===y.minor&&v.semver.patch===y.patch&&(y=!1),v.operator==="<"||v.operator==="<="){if(p=Ph(l,v,n),p===v&&p!==l)return!1}else if(l.operator==="<="&&!$i(l.semver,String(v),n))return!1}if(!v.operator&&(l||i)&&c!==0)return!1}return!(i&&h&&!l&&c!==0||l&&m&&!i&&c!==0||w||y)},Bh=(t,e,n)=>{if(!t)return e;const o=hc(t.semver,e.semver,n);return o>0?t:o<0||e.operator===">"&&t.operator===">="?e:t},Ph=(t,e,n)=>{if(!t)return e;const o=hc(t.semver,e.semver,n);return o<0?t:o>0||e.operator==="<"&&t.operator==="<="?e:t};var YA=HA;const fc=Gi,Rh=js,XA=Pt,Dh=dh,JA=Ao,QA=LV,eB=MV,tB=GV,nB=$V,rB=UV,oB=WV,iB=HV,sB=KV,aB=_n,lB=XV,cB=QV,dB=rc,uB=tA,pB=rA,hB=Ys,fB=oc,mB=Ch,gB=vh,yB=ic,_B=sc,CB=wh,vB=_A,wB=Qs(),bB=Cn();var xB={parse:JA,valid:QA,clean:eB,inc:tB,diff:nB,major:rB,minor:oB,patch:iB,prerelease:sB,compare:aB,rcompare:lB,compareLoose:cB,compareBuild:dB,sort:uB,rsort:pB,gt:hB,lt:fB,eq:mB,neq:gB,gte:yB,lte:_B,cmp:CB,coerce:vB,Comparator:wB,Range:bB,satisfies:ea,toComparators:bA,maxSatisfying:SA,minSatisfying:NA,minVersion:AA,validRange:PA,outside:dc,gtr:GA,ltr:zA,intersects:UA,simplifyRange:jA,subset:YA,SemVer:XA,re:fc.re,src:fc.src,tokens:fc.t,SEMVER_SPEC_VERSION:Rh.SEMVER_SPEC_VERSION,RELEASE_TYPES:Rh.RELEASE_TYPES,compareIdentifiers:Dh.compareIdentifiers,rcompareIdentifiers:Dh.rcompareIdentifiers};const kB=eu(xB);function SB(t){return zr(t.id)}function EB(t){switch(t){case"isNotNA":return"Is not NA";case"isNA":return"Is NA";case"number_equals":case"string_equals":return"Equals";case"number_notEquals":case"string_notEquals":return"Not equals";case"number_greaterThan":return"Greater than";case"number_greaterThanOrEqualTo":return"Greater than or equal to";case"number_lessThan":return"Less than";case"number_lessThanOrEqualTo":return"Less than or equal to";case"number_between":return"Between";case"string_contains":return"Contains";case"string_doesNotContain":return"Does not contain";case"string_matches":return"Matches";case"string_doesNotMatch":return"Does not match";case"string_containsFuzzyMatch":return"Contains fuzzy match";default:throw Error(`unsupported filter type: ${t}`)}}const TB=["isNotNA","isNA","number_equals","number_notEquals","number_greaterThan","number_greaterThanOrEqualTo","number_lessThan","number_lessThanOrEqualTo","number_between"],NB=["isNotNA","isNA","string_equals","string_notEquals","string_contains","string_doesNotContain","string_matches","string_doesNotMatch","string_containsFuzzyMatch"];function Ih(t,e){var n,o;return((o=(n=t.spec.annotations)==null?void 0:n["pl7.app/label"])==null?void 0:o.trim())??"Unlabeled "+t.type+" "+e.toString()}function VB(t){const e=t.type;switch(e){case"isNotNA":case"isNA":return;case"number_equals":case"number_notEquals":case"number_greaterThan":case"number_greaterThanOrEqualTo":case"number_lessThan":case"number_lessThanOrEqualTo":return t.reference;case"number_between":return t.lowerBound;case"string_equals":case"string_notEquals":case"string_contains":case"string_doesNotContain":case"string_matches":case"string_doesNotMatch":case"string_containsFuzzyMatch":return t.reference;default:throw Error(`unsupported filter type: ${e}`)}}function Fh(t,e){switch(t){case"isNotNA":case"isNA":return{type:t};case"number_equals":case"number_notEquals":case"number_greaterThan":case"number_greaterThanOrEqualTo":case"number_lessThan":case"number_lessThanOrEqualTo":return{type:t,reference:typeof e=="number"?e:0};case"number_between":return{type:t,lowerBound:typeof e=="number"?e:0,includeLowerBound:!0,upperBound:100,includeUpperBound:!1};case"string_equals":case"string_notEquals":case"string_contains":case"string_doesNotContain":case"string_matches":case"string_doesNotMatch":return{type:t,reference:typeof e=="string"?e:""};case"string_containsFuzzyMatch":return{type:t,reference:typeof e=="string"?e:"",maxEdits:2,substitutionsOnly:!1,wildcard:void 0};default:throw Error(`unsupported filter type: ${t}`)}}function AB(t,e){return{columnId:t.columnId,filter:Fh(e,VB(t.filter)),disabled:t.disabled}}function mc(t,e){var c,d;const n=Number(e);if(!Number.isFinite(n))throw Error("Model value is not a number.");const o=t.type==="column"?t.spec.valueType:t.spec.type;if((o==="Int"||o==="Long")&&!Number.isInteger(n))throw Error("Model value is not an integer.");const i=(c=t.spec.annotations)==null?void 0:c["pl7.app/min"];if(i!==void 0){const p=Number(i);if(Number.isFinite(p)&&n<Number(i))throw Error("Model value is too low.")}const l=(d=t.spec.annotations)==null?void 0:d["pl7.app/max"];if(l!==void 0){const p=Number(l);if(Number.isFinite(p)&&n>Number(l))throw Error("Model value is too high.")}return n}function Lh(t,e){var o,i;const n=((o=t.spec.domain)==null?void 0:o["pl7.app/alphabet"])??((i=t.spec.annotations)==null?void 0:i["pl7.app/alphabet"]);if(n==="nucleotide"&&!/^[AaTtGgCcNn]+$/.test(e))throw Error("Model value is not a nucleotide.");if(n==="aminoacid"&&!/^[AaCcDdEeFfGgHhIiKkLlMmNnPpQqRrSsTtVvWwYyXx]+$/.test(e))throw Error("Model value is not an aminoacid.");return e}function BB(t){try{return new RegExp(t),t}catch(e){throw e instanceof SyntaxError?Error("Model value is not a regexp."):e}}function PB(t,e){var i,l;const n=((i=t.spec.domain)==null?void 0:i["pl7.app/alphabet"])??((l=t.spec.annotations)==null?void 0:l["pl7.app/alphabet"]);if(n==="nucleotide")return[{value:"N",text:"N"}];if(n==="aminoacid")return[{value:"X",text:"X"}];const o=Ye.uniq(e);return o.sort(),o.map(c=>({value:c,text:c}))}function RB(t,e){var i,l;const n=kB.gt(xs().sdkInfo.sdkVersion,"1.14.0")&&(t.type==="column"?t.spec.valueType:t.spec.type)==="String"&&(((i=t.spec.domain)==null?void 0:i["pl7.app/alphabet"])??((l=t.spec.annotations)==null?void 0:l["pl7.app/alphabet"]))!==void 0,o=e.type;switch(o){case"isNotNA":return{operator:"Not",operand:{operator:"IsNA"}};case"isNA":return{operator:"IsNA"};case"number_equals":return{operator:"Equal",reference:e.reference};case"string_equals":return{operator:n?"IEqual":"Equal",reference:e.reference};case"number_notEquals":return{operator:"Not",operand:{operator:"Equal",reference:e.reference}};case"string_notEquals":return{operator:"Not",operand:{operator:n?"IEqual":"Equal",reference:e.reference}};case"number_greaterThan":return{operator:"Greater",reference:e.reference};case"number_greaterThanOrEqualTo":return{operator:"GreaterOrEqual",reference:e.reference};case"number_lessThan":return{operator:"Less",reference:e.reference};case"number_lessThanOrEqualTo":return{operator:"LessOrEqual",reference:e.reference};case"number_between":return{operator:"And",operands:[{operator:e.includeLowerBound?"GreaterOrEqual":"Greater",reference:e.lowerBound},{operator:e.includeUpperBound?"LessOrEqual":"Less",reference:e.upperBound}]};case"string_contains":return{operator:n?"StringIContains":"StringContains",substring:e.reference};case"string_doesNotContain":return{operator:"Not",operand:{operator:n?"StringIContains":"StringContains",substring:e.reference}};case"string_matches":return{operator:"Matches",regex:e.reference};case"string_doesNotMatch":return{operator:"Not",operand:{operator:"Matches",regex:e.reference}};case"string_containsFuzzyMatch":return{operator:n?"StringIContainsFuzzy":"StringContainsFuzzy",reference:e.reference,maxEdits:e.maxEdits,substitutionsOnly:e.substitutionsOnly,wildcard:e.wildcard};default:throw Error(`unsupported filter type: ${o}`)}}const DB={class:"d-flex flex-column gap-24"},Oh=r.defineComponent({__name:"PlTableFilterEntry",props:r.mergeModels({column:{},options:{},disabled:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useModel(t,"modelValue"),n=t,{column:o,options:i}=r.toRefs(n);return(l,c)=>(r.openBlock(),r.createElementBlock("div",DB,[r.createVNode(r.unref(bo),{"model-value":e.value.filter.type,options:r.unref(i),disabled:l.disabled,label:"Predicate","onUpdate:modelValue":c[0]||(c[0]=d=>e.value=r.unref(AB)(e.value,d))},null,8,["model-value","options","disabled"]),e.value.filter.type==="number_equals"||e.value.filter.type==="number_notEquals"||e.value.filter.type==="number_lessThan"||e.value.filter.type==="number_lessThanOrEqualTo"||e.value.filter.type==="number_greaterThan"||e.value.filter.type==="number_greaterThanOrEqualTo"?(r.openBlock(),r.createBlock(r.unref(qr),{key:0,modelValue:e.value.filter.reference,"onUpdate:modelValue":c[1]||(c[1]=d=>e.value.filter.reference=d),disabled:l.disabled,parse:d=>r.unref(mc)(r.unref(o),d),label:"Reference value"},null,8,["modelValue","disabled","parse"])):r.createCommentVNode("",!0),e.value.filter.type==="number_between"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(r.unref(qr),{modelValue:e.value.filter.lowerBound,"onUpdate:modelValue":c[2]||(c[2]=d=>e.value.filter.lowerBound=d),disabled:l.disabled,parse:d=>r.unref(mc)(r.unref(o),d),label:"Lower bound"},null,8,["modelValue","disabled","parse"]),r.createVNode(r.unref(Ds),{modelValue:e.value.filter.includeLowerBound,"onUpdate:modelValue":c[3]||(c[3]=d=>e.value.filter.includeLowerBound=d),disabled:l.disabled,label:"Include lower bound"},null,8,["modelValue","disabled"]),r.createVNode(r.unref(qr),{modelValue:e.value.filter.upperBound,"onUpdate:modelValue":c[4]||(c[4]=d=>e.value.filter.upperBound=d),disabled:l.disabled,parse:d=>r.unref(mc)(r.unref(o),d),label:"Upper bound"},null,8,["modelValue","disabled","parse"]),r.createVNode(r.unref(Ds),{modelValue:e.value.filter.includeUpperBound,"onUpdate:modelValue":c[5]||(c[5]=d=>e.value.filter.includeUpperBound=d),disabled:l.disabled,label:"Include upper bound"},null,8,["modelValue","disabled"])],64)):r.createCommentVNode("",!0),e.value.filter.type==="string_equals"||e.value.filter.type==="string_notEquals"||e.value.filter.type==="string_contains"||e.value.filter.type==="string_doesNotContain"?(r.openBlock(),r.createBlock(r.unref(qr),{key:2,modelValue:e.value.filter.reference,"onUpdate:modelValue":c[6]||(c[6]=d=>e.value.filter.reference=d),disabled:l.disabled,parse:d=>r.unref(Lh)(r.unref(o),d),label:"Reference value"},null,8,["modelValue","disabled","parse"])):r.createCommentVNode("",!0),e.value.filter.type==="string_matches"||e.value.filter.type==="string_doesNotMatch"?(r.openBlock(),r.createBlock(r.unref(qr),{key:3,modelValue:e.value.filter.reference,"onUpdate:modelValue":c[7]||(c[7]=d=>e.value.filter.reference=d),disabled:l.disabled,parse:r.unref(BB),label:"Reference value"},null,8,["modelValue","disabled","parse"])):r.createCommentVNode("",!0),e.value.filter.type==="string_containsFuzzyMatch"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:4},[r.createVNode(r.unref(qr),{modelValue:e.value.filter.reference,"onUpdate:modelValue":c[8]||(c[8]=d=>e.value.filter.reference=d),disabled:l.disabled,parse:d=>r.unref(Lh)(r.unref(o),d),label:"Reference value"},null,8,["modelValue","disabled","parse"]),r.createVNode(r.unref(jp),{modelValue:e.value.filter.maxEdits,"onUpdate:modelValue":c[9]||(c[9]=d=>e.value.filter.maxEdits=d),max:5,disabled:l.disabled,breakpoints:"",label:"Maximum nuber of substitutions and indels"},null,8,["modelValue","disabled"]),r.createVNode(r.unref(Ds),{modelValue:e.value.filter.substitutionsOnly,"onUpdate:modelValue":c[10]||(c[10]=d=>e.value.filter.substitutionsOnly=d),disabled:l.disabled,label:"Substitutions only"},null,8,["modelValue","disabled"]),r.createVNode(r.unref(bo),{modelValue:e.value.filter.wildcard,"onUpdate:modelValue":c[11]||(c[11]=d=>e.value.filter.wildcard=d),disabled:l.disabled,options:r.unref(PB)(r.unref(o),e.value.filter.reference),clearable:"",label:"Wildcard symbol"},null,8,["modelValue","disabled","options"])],64)):r.createCommentVNode("",!0)]))}}),IB={class:"d-flex flex-column gap-24"},FB={key:0,class:"text-subtitle-m",style:{color:"var(--txt-mask)"}},LB=r.defineComponent({__name:"PlTableAddFilter",props:r.mergeModels({columnsById:{},columnOptions:{},filterOptions:{},makeFilter:{type:Function}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:r.mergeModels(["addFilter"],["update:modelValue"]),setup(t,{emit:e}){const n=r.useModel(t,"modelValue"),o=t,{columnsById:i,columnOptions:l,filterOptions:c}=r.toRefs(o),d=e,p=r.ref(),h=r.ref();r.watch(()=>p.value,w=>{w?h.value=o.makeFilter(w):h.value=void 0});const m=()=>{p.value=void 0,n.value=!1},y=()=>{h.value&&(d("addFilter",h.value),m())};return(w,v)=>(r.openBlock(),r.createBlock(r.unref(Rs),{modelValue:n.value,"onUpdate:modelValue":v[2]||(v[2]=E=>n.value=E),"close-on-outside-click":!1},{title:r.withCtx(()=>v[3]||(v[3]=[r.createTextVNode("Add Filter")])),actions:r.withCtx(()=>[r.createVNode(r.unref(Vs),{disabled:!h.value,onClick:y},{default:r.withCtx(()=>v[4]||(v[4]=[r.createTextVNode("Add Filter")])),_:1},8,["disabled"]),r.createVNode(r.unref(wo),{"justify-center":!1,onClick:m},{default:r.withCtx(()=>v[5]||(v[5]=[r.createTextVNode("Cancel")])),_:1})]),default:r.withCtx(()=>[r.createElementVNode("div",IB,[r.createVNode(r.unref(bo),{modelValue:p.value,"onUpdate:modelValue":v[0]||(v[0]=E=>p.value=E),options:r.unref(l),label:"Column",placeholder:"Choose..."},null,8,["modelValue","options"]),h.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",FB,"Choose a column to view and adjust its options")),h.value?(r.openBlock(),r.createBlock(Oh,{key:1,modelValue:h.value,"onUpdate:modelValue":v[1]||(v[1]=E=>h.value=E),column:r.unref(i)[h.value.columnId],options:r.unref(c)[h.value.columnId]},null,8,["modelValue","column","options"])):r.createCommentVNode("",!0)])]),_:1},8,["modelValue"]))}}),OB=["onClick"],MB={class:"pl-filter-manager__expand-icon"},GB={class:"pl-filter-manager__title flex-grow-1 text-s-btn"},$B={class:"pl-filter-manager__actions d-flex gap-12"},zB=["onClick"],UB=["onClick"],ZB={class:"pl-filter-manager__content d-flex gap-24 p-24 flex-column"},WB={class:"d-flex justify-center"},jB=["onClick"],HB={class:"pl-filter-manager__add-btn-icon"},qB={key:0},KB=r.defineComponent({__name:"PlTableFilters",props:r.mergeModels({columns:{},restrictions:{},defaults:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useModel(t,"modelValue"),n=t,{columns:o,restrictions:i,defaults:l}=r.toRefs(n),c=r.computed(()=>{const R=o.value.filter(G=>{const P=G.type;switch(P){case"axis":return G.spec.type!=="Bytes";case"column":return G.spec.valueType!=="Bytes";default:throw Error(`unsupported data type: ${P}`)}}),O={};for(const G of R)O[SB(G)]=G;return O}),d=r.computed(()=>{const R=i.value??[],O={};for(const[G,P]of Object.entries(c.value)){const T=Ye.find(R,M=>Ye.isEqual(M.column.id,P.id));T&&(O[G]=T.allowedFilterTypes)}return O}),p=r.computed(()=>{const R=l.value??[],O={};for(const[G,P]of Object.entries(c.value)){const T=Ye.find(R,M=>Ye.isEqual(M.column.id,P.id));T&&(O[G]={columnId:G,filter:T.default,disabled:!1})}return O});(()=>{const R=e.value.state;typeof R=="object"&&!Array.isArray(R)&&(e.value.state=Object.entries(R).map(([O,G])=>({columnId:O,filter:G,disabled:!1})))})();const h=R=>R??Object.values(p.value),m=r.reactive({state:h(e.value.state)});r.watch(()=>e.value,R=>{Ye.isEqual(m.state,R.state)||(m.state=h(R.state))}),r.watch(()=>m,R=>{Ye.isEqual(R.state,e.value.state)||(e.value={state:Ye.cloneDeep(R.state),filters:R.state.filter(O=>!O.disabled).map(O=>{const G=c.value[O.columnId],{spec:P,...T}=G;return{type:"bySingleColumnV2",column:T,predicate:RB(G,O.filter)}})})},{immediate:!0,deep:!0}),r.watch(()=>c.value,R=>{Object.keys(R).length===0&&m.state!==void 0||(m.state=m.state.filter(O=>!!R[O.columnId]))},{immediate:!0});const y=r.computed(()=>Object.keys(c).length>0&&m.state.length>0),w=r.computed(()=>{const R=d.value,O={};for(const[G,P]of Object.entries(c.value)){let M=(P.type==="column"?P.spec.valueType:P.spec.type)==="String"?NB:TB;const U=R[G];U&&(M=M.filter(X=>U.includes(X))),O[G]=M.map(X=>({value:X,text:EB(X)}))}return O}),v=r.computed(()=>Ye.some(Object.values(w.value),R=>R.length>0)),E=r.computed(()=>Object.entries(Object.entries(c.value)).filter(([R,[O,G]])=>w.value[O].length>0).filter(([R,[O,G]])=>!m.state.some(P=>P.columnId===O)).map(([R,[O,G]])=>({label:Ih(G,R),value:O}))),z=R=>p.value[R]??{columnId:R,filter:Fh(w.value[R][0].value),disabled:!1},$=R=>{m.state[R]=z(m.state[R].columnId)},S=R=>m.state.splice(R,1),B=r.ref(!1),D=r.ref(!1),H=r.ref(!1);r.onMounted(()=>{H.value=!0});const A=r.reactive({}),N=R=>{A[R]?delete A[R]:A[R]=!0},j=r.ref(!1),J=r.ref();let Z;return r.onMounted(()=>{Z=new ResizeObserver(()=>{var O;const R=(O=J.value)==null?void 0:O.parentElement;R&&(j.value=R.scrollHeight>R.clientHeight||R.scrollWidth>R.clientWidth)}),J.value&&J.value.parentElement&&Z.observe(J.value.parentElement)}),r.watch(J,(R,O)=>{O!=null&&O.parentElement&&Z.unobserve(O.parentElement),R!=null&&R.parentElement&&Z.observe(R.parentElement)}),r.onBeforeUnmount(()=>{Z!==void 0&&Z.disconnect()}),(R,O)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[H.value?(r.openBlock(),r.createBlock(r.Teleport,{key:0,to:`#${r.unref(ec)}`},[r.createVNode(r.unref(wo),{onClick:O[0]||(O[0]=r.withModifiers(G=>B.value=!0,["stop"]))},{append:r.withCtx(()=>[r.createVNode(r.unref(Bs),{name:y.value?"filter-on":"filter"},null,8,["name"])]),default:r.withCtx(()=>[O[5]||(O[5]=r.createTextVNode(" Filters "))]),_:1})],8,["to"])):r.createCommentVNode("",!0),r.createVNode(r.unref(Rs),{modelValue:B.value,"onUpdate:modelValue":O[2]||(O[2]=G=>B.value=G),"close-on-outside-click":!1},{title:r.withCtx(()=>O[6]||(O[6]=[r.createTextVNode("Manage Filters")])),default:r.withCtx(()=>[r.createElementVNode("div",{ref_key:"filterManager",ref:J,class:"pl-filter-manager d-flex flex-column gap-6"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.state,(G,P)=>(r.openBlock(),r.createElementBlock("div",{key:G.columnId,class:r.normalizeClass([{open:A[G.columnId],disabled:G.disabled},"pl-filter-manager__filter"])},[r.createElementVNode("div",{class:"pl-filter-manager__header d-flex align-center gap-8",onClick:T=>N(G.columnId)},[r.createElementVNode("div",MB,[r.createVNode(r.unref(At),{name:"chevron-right"})]),r.createElementVNode("div",GB,r.toDisplayString(r.unref(Ih)(c.value[G.columnId],P)),1),r.createElementVNode("div",$B,[r.createElementVNode("div",{class:"pl-filter-manager__toggle",onClick:r.withModifiers(T=>G.disabled=!G.disabled,["stop"])},[r.createVNode(r.unref(xt),{name:G.disabled?"view-hide":"view-show"},null,8,["name"])],8,zB),r.createElementVNode("div",{class:"pl-filter-manager__delete",onClick:r.withModifiers(T=>S(P),["stop"])},[r.createVNode(r.unref(xt),{name:"close"})],8,UB)])],8,OB),r.createElementVNode("div",ZB,[r.createVNode(Oh,{modelValue:m.state[P],"onUpdate:modelValue":T=>m.state[P]=T,disabled:G.disabled,column:c.value[G.columnId],options:w.value[G.columnId]},null,8,["modelValue","onUpdate:modelValue","disabled","column","options"]),r.createElementVNode("div",WB,[r.createElementVNode("div",{class:r.normalizeClass([{disabled:G.disabled},"pl-filter-manager__revert-btn text-s-btn d-flex align-center gap-8"]),onClick:T=>$(P)},[O[7]||(O[7]=r.createTextVNode(" Revert Settings to Default ")),r.createVNode(r.unref(xt),{name:"reverse"})],10,jB)])])],2))),128)),r.createElementVNode("div",{class:r.normalizeClass([{"pt-24":j.value},"pl-filter-manager__add-action-wrapper"])},[E.value.length>0?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pl-filter-manager__add-btn",onClick:O[1]||(O[1]=G=>D.value=!0)},[r.createElementVNode("div",HB,[r.createVNode(r.unref(At),{name:"add"})]),O[8]||(O[8]=r.createElementVNode("div",{class:"pl-filter-manager__add-btn-title text-s-btn"},"Add Filter",-1))])):r.createCommentVNode("",!0)],2),v.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",qB,"No filters applicable"))],512)]),_:1},8,["modelValue"]),r.createVNode(LB,{modelValue:D.value,"onUpdate:modelValue":O[3]||(O[3]=G=>D.value=G),"columns-by-id":c.value,"column-options":E.value,"filter-options":w.value,"make-filter":z,onAddFilter:O[4]||(O[4]=G=>m.state.push(G))},null,8,["modelValue","columns-by-id","column-options","filter-options"])],64))}}),ta=new Map;function YB(t,e){const n=r.getCurrentScope()??r.effectScope(),o=n.run(()=>(r.onScopeDispose(()=>{ta.delete(t)}),r.reactive(e())));return o[Symbol.dispose]=()=>{n.stop()},o}function XB(t){const e=Symbol();return()=>(ta.has(e)||ta.set(e,YB(e,t)),ta.get(e))}function JB(t){return r.computed(()=>{try{return nu(t())}catch(e){return{errors:[String(e)],value:void 0}}})}function QB(t,e,n){const o=r.ref(0),i=r.reactive({loading:r.computed(()=>o.value>0),loadingRef:o,value:void 0,error:void 0}),l=Og(e);return r.watch(t,async c=>{i.error=void 0,o.value++,l(c).then(d=>{d.ok&&(i.value=d.value)}).catch(d=>{i.value=void 0,i.error=d}).finally(()=>{o.value--})},Object.assign({immediate:!0,deep:!0},n??{})),i}const Bo=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Mh=new Set,gc=typeof process=="object"&&process?process:{},Gh=(t,e,n,o)=>{typeof gc.emitWarning=="function"?gc.emitWarning(t,e,n,o):console.error(`[${n}] ${e}: ${t}`)};let na=globalThis.AbortController,$h=globalThis.AbortSignal;if(typeof na>"u"){$h=class{constructor(){Ze(this,"onabort");Ze(this,"_onabort",[]);Ze(this,"reason");Ze(this,"aborted",!1)}addEventListener(o,i){this._onabort.push(i)}},na=class{constructor(){Ze(this,"signal",new $h);e()}abort(o){var i,l;if(!this.signal.aborted){this.signal.reason=o,this.signal.aborted=!0;for(const c of this.signal._onabort)c(o);(l=(i=this.signal).onabort)==null||l.call(i,o)}}};let t=((Uh=gc.env)==null?void 0:Uh.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{t&&(t=!1,Gh("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}const eP=t=>!Mh.has(t),Nr=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),zh=t=>Nr(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?ra:null:null;class ra extends Array{constructor(e){super(e),this.fill(0)}}const Jr=class Jr{constructor(e,n){Ze(this,"heap");Ze(this,"length");if(!b(Jr,Po))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new n(e),this.length=0}static create(e){const n=zh(e);if(!n)return[];ye(Jr,Po,!0);const o=new Jr(e,n);return ye(Jr,Po,!1),o}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};Po=new WeakMap,ze(Jr,Po,!1);let yc=Jr;const vc=class vc{constructor(e){ze(this,re);ze(this,vn);ze(this,Ht);ze(this,wn);ze(this,bn);ze(this,Ro);ze(this,Do);Ze(this,"ttl");Ze(this,"ttlResolution");Ze(this,"ttlAutopurge");Ze(this,"updateAgeOnGet");Ze(this,"updateAgeOnHas");Ze(this,"allowStale");Ze(this,"noDisposeOnSet");Ze(this,"noUpdateTTL");Ze(this,"maxEntrySize");Ze(this,"sizeCalculation");Ze(this,"noDeleteOnFetchRejection");Ze(this,"noDeleteOnStaleGet");Ze(this,"allowStaleOnFetchAbort");Ze(this,"allowStaleOnFetchRejection");Ze(this,"ignoreFetchAbort");ze(this,ut);ze(this,xn);ze(this,dt);ze(this,Je);ze(this,ke);ze(this,Rt);ze(this,qt);ze(this,Et);ze(this,mt);ze(this,kn);ze(this,gt);ze(this,Sn);ze(this,En);ze(this,Kt);ze(this,Tn);ze(this,Vr);ze(this,Dt);ze(this,Qr,()=>{});ze(this,Qn,()=>{});ze(this,zi,()=>{});ze(this,Yt,()=>!1);ze(this,eo,e=>{});ze(this,Io,(e,n,o)=>{});ze(this,Ui,(e,n,o,i)=>{if(o||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});Ze(this,Zh,"LRUCache");const{max:n=0,ttl:o,ttlResolution:i=1,ttlAutopurge:l,updateAgeOnGet:c,updateAgeOnHas:d,allowStale:p,dispose:h,disposeAfter:m,noDisposeOnSet:y,noUpdateTTL:w,maxSize:v=0,maxEntrySize:E=0,sizeCalculation:z,fetchMethod:$,memoMethod:S,noDeleteOnFetchRejection:B,noDeleteOnStaleGet:D,allowStaleOnFetchRejection:H,allowStaleOnFetchAbort:A,ignoreFetchAbort:N}=e;if(n!==0&&!Nr(n))throw new TypeError("max option must be a nonnegative integer");const j=n?zh(n):Array;if(!j)throw new Error("invalid max value: "+n);if(ye(this,vn,n),ye(this,Ht,v),this.maxEntrySize=E||b(this,Ht),this.sizeCalculation=z,this.sizeCalculation){if(!b(this,Ht)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(S!==void 0&&typeof S!="function")throw new TypeError("memoMethod must be a function if defined");if(ye(this,Do,S),$!==void 0&&typeof $!="function")throw new TypeError("fetchMethod must be a function if specified");if(ye(this,Ro,$),ye(this,Vr,!!$),ye(this,dt,new Map),ye(this,Je,new Array(n).fill(void 0)),ye(this,ke,new Array(n).fill(void 0)),ye(this,Rt,new j(n)),ye(this,qt,new j(n)),ye(this,Et,0),ye(this,mt,0),ye(this,kn,yc.create(n)),ye(this,ut,0),ye(this,xn,0),typeof h=="function"&&ye(this,wn,h),typeof m=="function"?(ye(this,bn,m),ye(this,gt,[])):(ye(this,bn,void 0),ye(this,gt,void 0)),ye(this,Tn,!!b(this,wn)),ye(this,Dt,!!b(this,bn)),this.noDisposeOnSet=!!y,this.noUpdateTTL=!!w,this.noDeleteOnFetchRejection=!!B,this.allowStaleOnFetchRejection=!!H,this.allowStaleOnFetchAbort=!!A,this.ignoreFetchAbort=!!N,this.maxEntrySize!==0){if(b(this,Ht)!==0&&!Nr(b(this,Ht)))throw new TypeError("maxSize must be a positive integer if specified");if(!Nr(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");ue(this,re,Eg).call(this)}if(this.allowStale=!!p,this.noDeleteOnStaleGet=!!D,this.updateAgeOnGet=!!c,this.updateAgeOnHas=!!d,this.ttlResolution=Nr(i)||i===0?i:1,this.ttlAutopurge=!!l,this.ttl=o||0,this.ttl){if(!Nr(this.ttl))throw new TypeError("ttl must be a positive integer if specified");ue(this,re,Ud).call(this)}if(b(this,vn)===0&&this.ttl===0&&b(this,Ht)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!b(this,vn)&&!b(this,Ht)){const J="LRU_CACHE_UNBOUNDED";eP(J)&&(Mh.add(J),Gh("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",J,vc))}}static unsafeExposeInternals(e){return{starts:b(e,En),ttls:b(e,Kt),sizes:b(e,Sn),keyMap:b(e,dt),keyList:b(e,Je),valList:b(e,ke),next:b(e,Rt),prev:b(e,qt),get head(){return b(e,Et)},get tail(){return b(e,mt)},free:b(e,kn),isBackgroundFetch:n=>{var o;return ue(o=e,re,et).call(o,n)},backgroundFetch:(n,o,i,l)=>{var c;return ue(c=e,re,Xa).call(c,n,o,i,l)},moveToTail:n=>{var o;return ue(o=e,re,ps).call(o,n)},indexes:n=>{var o;return ue(o=e,re,Mr).call(o,n)},rindexes:n=>{var o;return ue(o=e,re,Gr).call(o,n)},isStale:n=>{var o;return b(o=e,Yt).call(o,n)}}}get max(){return b(this,vn)}get maxSize(){return b(this,Ht)}get calculatedSize(){return b(this,xn)}get size(){return b(this,ut)}get fetchMethod(){return b(this,Ro)}get memoMethod(){return b(this,Do)}get dispose(){return b(this,wn)}get disposeAfter(){return b(this,bn)}getRemainingTTL(e){return b(this,dt).has(e)?1/0:0}*entries(){for(const e of ue(this,re,Mr).call(this))b(this,ke)[e]!==void 0&&b(this,Je)[e]!==void 0&&!ue(this,re,et).call(this,b(this,ke)[e])&&(yield[b(this,Je)[e],b(this,ke)[e]])}*rentries(){for(const e of ue(this,re,Gr).call(this))b(this,ke)[e]!==void 0&&b(this,Je)[e]!==void 0&&!ue(this,re,et).call(this,b(this,ke)[e])&&(yield[b(this,Je)[e],b(this,ke)[e]])}*keys(){for(const e of ue(this,re,Mr).call(this)){const n=b(this,Je)[e];n!==void 0&&!ue(this,re,et).call(this,b(this,ke)[e])&&(yield n)}}*rkeys(){for(const e of ue(this,re,Gr).call(this)){const n=b(this,Je)[e];n!==void 0&&!ue(this,re,et).call(this,b(this,ke)[e])&&(yield n)}}*values(){for(const e of ue(this,re,Mr).call(this))b(this,ke)[e]!==void 0&&!ue(this,re,et).call(this,b(this,ke)[e])&&(yield b(this,ke)[e])}*rvalues(){for(const e of ue(this,re,Gr).call(this))b(this,ke)[e]!==void 0&&!ue(this,re,et).call(this,b(this,ke)[e])&&(yield b(this,ke)[e])}[(Wh=Symbol.iterator,Zh=Symbol.toStringTag,Wh)](){return this.entries()}find(e,n={}){for(const o of ue(this,re,Mr).call(this)){const i=b(this,ke)[o],l=ue(this,re,et).call(this,i)?i.__staleWhileFetching:i;if(l!==void 0&&e(l,b(this,Je)[o],this))return this.get(b(this,Je)[o],n)}}forEach(e,n=this){for(const o of ue(this,re,Mr).call(this)){const i=b(this,ke)[o],l=ue(this,re,et).call(this,i)?i.__staleWhileFetching:i;l!==void 0&&e.call(n,l,b(this,Je)[o],this)}}rforEach(e,n=this){for(const o of ue(this,re,Gr).call(this)){const i=b(this,ke)[o],l=ue(this,re,et).call(this,i)?i.__staleWhileFetching:i;l!==void 0&&e.call(n,l,b(this,Je)[o],this)}}purgeStale(){let e=!1;for(const n of ue(this,re,Gr).call(this,{allowStale:!0}))b(this,Yt).call(this,n)&&(ue(this,re,$r).call(this,b(this,Je)[n],"expire"),e=!0);return e}info(e){const n=b(this,dt).get(e);if(n===void 0)return;const o=b(this,ke)[n],i=ue(this,re,et).call(this,o)?o.__staleWhileFetching:o;if(i===void 0)return;const l={value:i};if(b(this,Kt)&&b(this,En)){const c=b(this,Kt)[n],d=b(this,En)[n];if(c&&d){const p=c-(Bo.now()-d);l.ttl=p,l.start=Date.now()}}return b(this,Sn)&&(l.size=b(this,Sn)[n]),l}dump(){const e=[];for(const n of ue(this,re,Mr).call(this,{allowStale:!0})){const o=b(this,Je)[n],i=b(this,ke)[n],l=ue(this,re,et).call(this,i)?i.__staleWhileFetching:i;if(l===void 0||o===void 0)continue;const c={value:l};if(b(this,Kt)&&b(this,En)){c.ttl=b(this,Kt)[n];const d=Bo.now()-b(this,En)[n];c.start=Math.floor(Date.now()-d)}b(this,Sn)&&(c.size=b(this,Sn)[n]),e.unshift([o,c])}return e}load(e){this.clear();for(const[n,o]of e){if(o.start){const i=Date.now()-o.start;o.start=Bo.now()-i}this.set(n,o.value,o)}}set(e,n,o={}){var w,v,E,z,$;if(n===void 0)return this.delete(e),this;const{ttl:i=this.ttl,start:l,noDisposeOnSet:c=this.noDisposeOnSet,sizeCalculation:d=this.sizeCalculation,status:p}=o;let{noUpdateTTL:h=this.noUpdateTTL}=o;const m=b(this,Ui).call(this,e,n,o.size||0,d);if(this.maxEntrySize&&m>this.maxEntrySize)return p&&(p.set="miss",p.maxEntrySizeExceeded=!0),ue(this,re,$r).call(this,e,"set"),this;let y=b(this,ut)===0?void 0:b(this,dt).get(e);if(y===void 0)y=b(this,ut)===0?b(this,mt):b(this,kn).length!==0?b(this,kn).pop():b(this,ut)===b(this,vn)?ue(this,re,Ya).call(this,!1):b(this,ut),b(this,Je)[y]=e,b(this,ke)[y]=n,b(this,dt).set(e,y),b(this,Rt)[b(this,mt)]=y,b(this,qt)[y]=b(this,mt),ye(this,mt,y),Ka(this,ut)._++,b(this,Io).call(this,y,m,p),p&&(p.set="add"),h=!1;else{ue(this,re,ps).call(this,y);const S=b(this,ke)[y];if(n!==S){if(b(this,Vr)&&ue(this,re,et).call(this,S)){S.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:B}=S;B!==void 0&&!c&&(b(this,Tn)&&((w=b(this,wn))==null||w.call(this,B,e,"set")),b(this,Dt)&&((v=b(this,gt))==null||v.push([B,e,"set"])))}else c||(b(this,Tn)&&((E=b(this,wn))==null||E.call(this,S,e,"set")),b(this,Dt)&&((z=b(this,gt))==null||z.push([S,e,"set"])));if(b(this,eo).call(this,y),b(this,Io).call(this,y,m,p),b(this,ke)[y]=n,p){p.set="replace";const B=S&&ue(this,re,et).call(this,S)?S.__staleWhileFetching:S;B!==void 0&&(p.oldValue=B)}}else p&&(p.set="update")}if(i!==0&&!b(this,Kt)&&ue(this,re,Ud).call(this),b(this,Kt)&&(h||b(this,zi).call(this,y,i,l),p&&b(this,Qn).call(this,p,y)),!c&&b(this,Dt)&&b(this,gt)){const S=b(this,gt);let B;for(;B=S==null?void 0:S.shift();)($=b(this,bn))==null||$.call(this,...B)}return this}pop(){var e;try{for(;b(this,ut);){const n=b(this,ke)[b(this,Et)];if(ue(this,re,Ya).call(this,!0),ue(this,re,et).call(this,n)){if(n.__staleWhileFetching)return n.__staleWhileFetching}else if(n!==void 0)return n}}finally{if(b(this,Dt)&&b(this,gt)){const n=b(this,gt);let o;for(;o=n==null?void 0:n.shift();)(e=b(this,bn))==null||e.call(this,...o)}}}has(e,n={}){const{updateAgeOnHas:o=this.updateAgeOnHas,status:i}=n,l=b(this,dt).get(e);if(l!==void 0){const c=b(this,ke)[l];if(ue(this,re,et).call(this,c)&&c.__staleWhileFetching===void 0)return!1;if(b(this,Yt).call(this,l))i&&(i.has="stale",b(this,Qn).call(this,i,l));else return o&&b(this,Qr).call(this,l),i&&(i.has="hit",b(this,Qn).call(this,i,l)),!0}else i&&(i.has="miss");return!1}peek(e,n={}){const{allowStale:o=this.allowStale}=n,i=b(this,dt).get(e);if(i===void 0||!o&&b(this,Yt).call(this,i))return;const l=b(this,ke)[i];return ue(this,re,et).call(this,l)?l.__staleWhileFetching:l}async fetch(e,n={}){const{allowStale:o=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,ttl:c=this.ttl,noDisposeOnSet:d=this.noDisposeOnSet,size:p=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:m=this.noUpdateTTL,noDeleteOnFetchRejection:y=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:w=this.allowStaleOnFetchRejection,ignoreFetchAbort:v=this.ignoreFetchAbort,allowStaleOnFetchAbort:E=this.allowStaleOnFetchAbort,context:z,forceRefresh:$=!1,status:S,signal:B}=n;if(!b(this,Vr))return S&&(S.fetch="get"),this.get(e,{allowStale:o,updateAgeOnGet:i,noDeleteOnStaleGet:l,status:S});const D={allowStale:o,updateAgeOnGet:i,noDeleteOnStaleGet:l,ttl:c,noDisposeOnSet:d,size:p,sizeCalculation:h,noUpdateTTL:m,noDeleteOnFetchRejection:y,allowStaleOnFetchRejection:w,allowStaleOnFetchAbort:E,ignoreFetchAbort:v,status:S,signal:B};let H=b(this,dt).get(e);if(H===void 0){S&&(S.fetch="miss");const A=ue(this,re,Xa).call(this,e,H,D,z);return A.__returned=A}else{const A=b(this,ke)[H];if(ue(this,re,et).call(this,A)){const R=o&&A.__staleWhileFetching!==void 0;return S&&(S.fetch="inflight",R&&(S.returnedStale=!0)),R?A.__staleWhileFetching:A.__returned=A}const N=b(this,Yt).call(this,H);if(!$&&!N)return S&&(S.fetch="hit"),ue(this,re,ps).call(this,H),i&&b(this,Qr).call(this,H),S&&b(this,Qn).call(this,S,H),A;const j=ue(this,re,Xa).call(this,e,H,D,z),Z=j.__staleWhileFetching!==void 0&&o;return S&&(S.fetch=N?"stale":"refresh",Z&&N&&(S.returnedStale=!0)),Z?j.__staleWhileFetching:j.__returned=j}}async forceFetch(e,n={}){const o=await this.fetch(e,n);if(o===void 0)throw new Error("fetch() returned undefined");return o}memo(e,n={}){const o=b(this,Do);if(!o)throw new Error("no memoMethod provided to constructor");const{context:i,forceRefresh:l,...c}=n,d=this.get(e,c);if(!l&&d!==void 0)return d;const p=o(e,d,{options:c,context:i});return this.set(e,p,c),p}get(e,n={}){const{allowStale:o=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,status:c}=n,d=b(this,dt).get(e);if(d!==void 0){const p=b(this,ke)[d],h=ue(this,re,et).call(this,p);return c&&b(this,Qn).call(this,c,d),b(this,Yt).call(this,d)?(c&&(c.get="stale"),h?(c&&o&&p.__staleWhileFetching!==void 0&&(c.returnedStale=!0),o?p.__staleWhileFetching:void 0):(l||ue(this,re,$r).call(this,e,"expire"),c&&o&&(c.returnedStale=!0),o?p:void 0)):(c&&(c.get="hit"),h?p.__staleWhileFetching:(ue(this,re,ps).call(this,d),i&&b(this,Qr).call(this,d),p))}else c&&(c.get="miss")}delete(e){return ue(this,re,$r).call(this,e,"delete")}clear(){return ue(this,re,jd).call(this,"delete")}};vn=new WeakMap,Ht=new WeakMap,wn=new WeakMap,bn=new WeakMap,Ro=new WeakMap,Do=new WeakMap,ut=new WeakMap,xn=new WeakMap,dt=new WeakMap,Je=new WeakMap,ke=new WeakMap,Rt=new WeakMap,qt=new WeakMap,Et=new WeakMap,mt=new WeakMap,kn=new WeakMap,gt=new WeakMap,Sn=new WeakMap,En=new WeakMap,Kt=new WeakMap,Tn=new WeakMap,Vr=new WeakMap,Dt=new WeakMap,re=new WeakSet,Ud=function(){const e=new ra(b(this,vn)),n=new ra(b(this,vn));ye(this,Kt,e),ye(this,En,n),ye(this,zi,(l,c,d=Bo.now())=>{if(n[l]=c!==0?d:0,e[l]=c,c!==0&&this.ttlAutopurge){const p=setTimeout(()=>{b(this,Yt).call(this,l)&&ue(this,re,$r).call(this,b(this,Je)[l],"expire")},c+1);p.unref&&p.unref()}}),ye(this,Qr,l=>{n[l]=e[l]!==0?Bo.now():0}),ye(this,Qn,(l,c)=>{if(e[c]){const d=e[c],p=n[c];if(!d||!p)return;l.ttl=d,l.start=p,l.now=o||i();const h=l.now-p;l.remainingTTL=d-h}});let o=0;const i=()=>{const l=Bo.now();if(this.ttlResolution>0){o=l;const c=setTimeout(()=>o=0,this.ttlResolution);c.unref&&c.unref()}return l};this.getRemainingTTL=l=>{const c=b(this,dt).get(l);if(c===void 0)return 0;const d=e[c],p=n[c];if(!d||!p)return 1/0;const h=(o||i())-p;return d-h},ye(this,Yt,l=>{const c=n[l],d=e[l];return!!d&&!!c&&(o||i())-c>d})},Qr=new WeakMap,Qn=new WeakMap,zi=new WeakMap,Yt=new WeakMap,Eg=function(){const e=new ra(b(this,vn));ye(this,xn,0),ye(this,Sn,e),ye(this,eo,n=>{ye(this,xn,b(this,xn)-e[n]),e[n]=0}),ye(this,Ui,(n,o,i,l)=>{if(ue(this,re,et).call(this,o))return 0;if(!Nr(i))if(l){if(typeof l!="function")throw new TypeError("sizeCalculation must be a function");if(i=l(o,n),!Nr(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i}),ye(this,Io,(n,o,i)=>{if(e[n]=o,b(this,Ht)){const l=b(this,Ht)-e[n];for(;b(this,xn)>l;)ue(this,re,Ya).call(this,!0)}ye(this,xn,b(this,xn)+e[n]),i&&(i.entrySize=o,i.totalCalculatedSize=b(this,xn))})},eo=new WeakMap,Io=new WeakMap,Ui=new WeakMap,Mr=function*({allowStale:e=this.allowStale}={}){if(b(this,ut))for(let n=b(this,mt);!(!ue(this,re,Zd).call(this,n)||((e||!b(this,Yt).call(this,n))&&(yield n),n===b(this,Et)));)n=b(this,qt)[n]},Gr=function*({allowStale:e=this.allowStale}={}){if(b(this,ut))for(let n=b(this,Et);!(!ue(this,re,Zd).call(this,n)||((e||!b(this,Yt).call(this,n))&&(yield n),n===b(this,mt)));)n=b(this,Rt)[n]},Zd=function(e){return e!==void 0&&b(this,dt).get(b(this,Je)[e])===e},Ya=function(e){var l,c;const n=b(this,Et),o=b(this,Je)[n],i=b(this,ke)[n];return b(this,Vr)&&ue(this,re,et).call(this,i)?i.__abortController.abort(new Error("evicted")):(b(this,Tn)||b(this,Dt))&&(b(this,Tn)&&((l=b(this,wn))==null||l.call(this,i,o,"evict")),b(this,Dt)&&((c=b(this,gt))==null||c.push([i,o,"evict"]))),b(this,eo).call(this,n),e&&(b(this,Je)[n]=void 0,b(this,ke)[n]=void 0,b(this,kn).push(n)),b(this,ut)===1?(ye(this,Et,ye(this,mt,0)),b(this,kn).length=0):ye(this,Et,b(this,Rt)[n]),b(this,dt).delete(o),Ka(this,ut)._--,n},Xa=function(e,n,o,i){const l=n===void 0?void 0:b(this,ke)[n];if(ue(this,re,et).call(this,l))return l;const c=new na,{signal:d}=o;d==null||d.addEventListener("abort",()=>c.abort(d.reason),{signal:c.signal});const p={signal:c.signal,options:o,context:i},h=(z,$=!1)=>{const{aborted:S}=c.signal,B=o.ignoreFetchAbort&&z!==void 0;if(o.status&&(S&&!$?(o.status.fetchAborted=!0,o.status.fetchError=c.signal.reason,B&&(o.status.fetchAbortIgnored=!0)):o.status.fetchResolved=!0),S&&!B&&!$)return y(c.signal.reason);const D=v;return b(this,ke)[n]===v&&(z===void 0?D.__staleWhileFetching?b(this,ke)[n]=D.__staleWhileFetching:ue(this,re,$r).call(this,e,"fetch"):(o.status&&(o.status.fetchUpdated=!0),this.set(e,z,p.options))),z},m=z=>(o.status&&(o.status.fetchRejected=!0,o.status.fetchError=z),y(z)),y=z=>{const{aborted:$}=c.signal,S=$&&o.allowStaleOnFetchAbort,B=S||o.allowStaleOnFetchRejection,D=B||o.noDeleteOnFetchRejection,H=v;if(b(this,ke)[n]===v&&(!D||H.__staleWhileFetching===void 0?ue(this,re,$r).call(this,e,"fetch"):S||(b(this,ke)[n]=H.__staleWhileFetching)),B)return o.status&&H.__staleWhileFetching!==void 0&&(o.status.returnedStale=!0),H.__staleWhileFetching;if(H.__returned===H)throw z},w=(z,$)=>{var B;const S=(B=b(this,Ro))==null?void 0:B.call(this,e,l,p);S&&S instanceof Promise&&S.then(D=>z(D===void 0?void 0:D),$),c.signal.addEventListener("abort",()=>{(!o.ignoreFetchAbort||o.allowStaleOnFetchAbort)&&(z(void 0),o.allowStaleOnFetchAbort&&(z=D=>h(D,!0)))})};o.status&&(o.status.fetchDispatched=!0);const v=new Promise(w).then(h,m),E=Object.assign(v,{__abortController:c,__staleWhileFetching:l,__returned:void 0});return n===void 0?(this.set(e,E,{...p.options,status:void 0}),n=b(this,dt).get(e)):b(this,ke)[n]=E,E},et=function(e){if(!b(this,Vr))return!1;const n=e;return!!n&&n instanceof Promise&&n.hasOwnProperty("__staleWhileFetching")&&n.__abortController instanceof na},Wd=function(e,n){b(this,qt)[n]=e,b(this,Rt)[e]=n},ps=function(e){e!==b(this,mt)&&(e===b(this,Et)?ye(this,Et,b(this,Rt)[e]):ue(this,re,Wd).call(this,b(this,qt)[e],b(this,Rt)[e]),ue(this,re,Wd).call(this,b(this,mt),e),ye(this,mt,e))},$r=function(e,n){var i,l,c,d;let o=!1;if(b(this,ut)!==0){const p=b(this,dt).get(e);if(p!==void 0)if(o=!0,b(this,ut)===1)ue(this,re,jd).call(this,n);else{b(this,eo).call(this,p);const h=b(this,ke)[p];if(ue(this,re,et).call(this,h)?h.__abortController.abort(new Error("deleted")):(b(this,Tn)||b(this,Dt))&&(b(this,Tn)&&((i=b(this,wn))==null||i.call(this,h,e,n)),b(this,Dt)&&((l=b(this,gt))==null||l.push([h,e,n]))),b(this,dt).delete(e),b(this,Je)[p]=void 0,b(this,ke)[p]=void 0,p===b(this,mt))ye(this,mt,b(this,qt)[p]);else if(p===b(this,Et))ye(this,Et,b(this,Rt)[p]);else{const m=b(this,qt)[p];b(this,Rt)[m]=b(this,Rt)[p];const y=b(this,Rt)[p];b(this,qt)[y]=b(this,qt)[p]}Ka(this,ut)._--,b(this,kn).push(p)}}if(b(this,Dt)&&((c=b(this,gt))!=null&&c.length)){const p=b(this,gt);let h;for(;h=p==null?void 0:p.shift();)(d=b(this,bn))==null||d.call(this,...h)}return o},jd=function(e){var n,o,i;for(const l of ue(this,re,Gr).call(this,{allowStale:!0})){const c=b(this,ke)[l];if(ue(this,re,et).call(this,c))c.__abortController.abort(new Error("deleted"));else{const d=b(this,Je)[l];b(this,Tn)&&((n=b(this,wn))==null||n.call(this,c,d,e)),b(this,Dt)&&((o=b(this,gt))==null||o.push([c,d,e]))}}if(b(this,dt).clear(),b(this,ke).fill(void 0),b(this,Je).fill(void 0),b(this,Kt)&&b(this,En)&&(b(this,Kt).fill(0),b(this,En).fill(0)),b(this,Sn)&&b(this,Sn).fill(0),ye(this,Et,0),ye(this,mt,0),b(this,kn).length=0,ye(this,xn,0),ye(this,ut,0),b(this,Dt)&&b(this,gt)){const l=b(this,gt);let c;for(;c=l==null?void 0:l.shift();)(i=b(this,bn))==null||i.call(this,...c)}};let _c=vc;const tP={cacheSize:15e6};class nP{constructor(e){Ze(this,"_str");Ze(this,"_rawJson");Ze(this,"_zodSchema");Ze(this,"_validatedJson");this.bytes=e}get str(){return this._str===void 0&&(this._str=new TextDecoder().decode(this.bytes)),this._str}get rawJson(){return this._rawJson===void 0&&(this._rawJson=JSON.parse(this.str)),this._rawJson}validatedJson(e){return this._zodSchema!==e&&(this._validatedJson=e.parse(this.rawJson),this._zodSchema=e),this._validatedJson}}const to=class to{constructor(e){Ze(this,"fileDataCache");Ze(this,"fileDataRefs",new Map);const n={...tP,...e??{}};this.fileDataCache=new _c({maxSize:n.cacheSize,fetchMethod:async o=>new nP(await xs().blobDriver.getContent(o)),sizeCalculation:o=>o.bytes.length,dispose:(o,i)=>{this.fileDataRefs.delete(i)}})}getDataRef(e){const n=this.fileDataRefs.get(e);if(n!==void 0)return n;const o=r.shallowRef();return this.fileDataRefs.set(e,o),(async()=>{try{const i=await this.fileDataCache.fetch(e);o.value=i}catch(i){console.error(i)}})(),o}getContentBytes(e){if(e===void 0)return;const n=this.getDataRef(e);return r.computed(()=>{var o;return(o=n.value)==null?void 0:o.bytes})}getContentString(e){if(e===void 0)return;const n=this.getDataRef(e);return r.computed(()=>{var o;return(o=n==null?void 0:n.value)==null?void 0:o.str})}getContentJson(e,n){if(e===void 0)return;const o=this.getDataRef(e);return r.computed(()=>{var i,l;return n===void 0?(i=o==null?void 0:o.value)==null?void 0:i.rawJson:(l=o==null?void 0:o.value)==null?void 0:l.validatedJson(n)})}static getContentBytes(e){return to.globalInstance.getContentBytes(e)}static getContentString(e){return to.globalInstance.getContentString(e)}static getContentJson(e,n){return to.globalInstance.getContentJson(e,n)}};Ze(to,"globalInstance",new to);let Cc=to;F.AgGridTheme=Mu,F.BlockLayout=YN,F.ContextProvider=IE,F.DataTable=m0,F.DemoData=IN,F.DropdownListItem=vo,F.DropdownOverlay=zl,F.LongText=Gl,F.MultiError=fs,F.PlAccordion=Rk,F.PlAccordionSection=zk,F.PlAgCellFile=NV,F.PlAgColumnHeader=nh,F.PlAgDataTable=xV,F.PlAgDataTableRowNumberColId=Un,F.PlAgDataTableToolsPanel=vV,F.PlAgGridColumnManager=sh,F.PlAgOverlayLoading=Yp,F.PlAgOverlayNoRows=Xp,F.PlAgTextAndButtonCell=rh,F.PlAlert=j0,F.PlBlockPage=P0,F.PlBtnAccent=dw,F.PlBtnDanger=pw,F.PlBtnGhost=wo,F.PlBtnGroup=dp,F.PlBtnLink=gw,F.PlBtnPrimary=Vs,F.PlBtnSecondary=Dl,F.PlBtnSplit=iw,F.PlCheckbox=Ux,F.PlCheckboxGroup=Hx,F.PlChip=Ul,F.PlCloseModalBtn=wp,F.PlContainer=D0,F.PlDialogModal=Wl,F.PlDropdown=bo,F.PlDropdownLegacy=fx,F.PlDropdownLine=vp,F.PlDropdownMulti=$x,F.PlDropdownRef=Ub,F.PlEditableTitle=Gw,F.PlFileDialog=Np,F.PlFileInput=Zp,F.PlGrid=G0,F.PlIcon16=Hr,F.PlIcon24=Bs,F.PlLogView=xp,F.PlMaskIcon16=At,F.PlMaskIcon24=xt,F.PlNotificationAlert=Wp,F.PlNumberField=Ex,F.PlProgressBar=Cx,F.PlRow=F0,F.PlSearchField=gp,F.PlSectionSeparator=kp,F.PlSlideModal=Rs,F.PlSpacer=lp,F.PlTableFilters=KB,F.PlTabs=Tk,F.PlTextArea=Tb,F.PlTextField=qr,F.PlToggleSwitch=Ds,F.PlTooltip=Ct,F.ReactiveFileContent=Cc,F.Scrollable=k1,F.Slider=jp,F.SliderRange=v1,F.SliderRangeTriple=l1,F.ThemeSwitcher=S0,F.UnresolvedError=Qa,F.ValueOrErrorsComponent=EV,F.activateAgGrid=Ou,F.animate=np,F.animateInfinite=v0,F.autoSizeRowNumberColumn=th,F.call=Xu,F.computedResult=JB,F.createModel=il,F.debounce=rp,F.defineApp=ZC,F.defineStore=XB,F.delay=Ju,F.detectOutside=Nb,F.ensureError=nl,F.eventListener=$l,F.formatZodError=ol,F.getElementScrollPosition=Cp,F.identity=tl,F.isDefined=zg,F.isElementVisible=_p,F.isJsonEqual=el,F.isZodError=rl,F.listToOptions=w0,F.makeEaseInOut=C0,F.makeEaseOut=tp,F.makeRowNumberColDef=eh,F.maskIcons16=RN,F.maskIcons24=DN,F.normalizeListOptions=Cr,F.notEmpty=Vl,F.randomInt=ep,F.randomString=_0,F.requestTick=Al,F.scrollIntoView=Ps,F.showContextMenu=El,F.throttle=op,F.timeout=Qu,F.unwrapOptionalResult=$g,F.unwrapValueOrErrors=tu,F.useClickOutside=As,F.useDraggable=XE,F.useEventListener=st,F.useFormState=KE,F.useHover=Ku,F.useInterval=qE,F.useLabelNotch=Xn,F.useLocalStorage=ip,F.useMouse=qu,F.useMouseCapture=_r,F.usePosition=vi,F.useQuery=YE,F.useResizeObserver=Hp,F.useScroll=jE,F.useSdkPlugin=wl,F.useSortable=Kp,F.useTheme=ap,F.useWatchFetch=QB,F.wrapOptionalResult=nu,F.wrapValueOrErrors=Gg,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})});