2 lines
56 KiB
JavaScript
2 lines
56 KiB
JavaScript
var Er=Object.defineProperty;var Ln=e=>{throw TypeError(e)};var Dr=(e,t,n)=>t in e?Er(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var $=(e,t,n)=>Dr(e,typeof t!="symbol"?t+"":t,n),Wn=(e,t,n)=>t.has(e)||Ln("Cannot "+n);var O=(e,t,n)=>(Wn(e,t,"read from private field"),n?n.call(e):t.get(e)),k=(e,t,n)=>t.has(e)?Ln("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Vt=(e,t,n,r)=>(Wn(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);import"./Bzak7iHL.js";import{k as C,g as c,A as tt,aN as He,a as Pt,y as D,p as ot,h as z,i as I,ar as wt,j as S,m as it,s as X,l as et,br as pn,o as j,v as H,n as Rr,$ as Br,q as ht,t as gt,w as bt}from"./BH97ETpZ.js";import{c as kr,s as Ot}from"./Qgf5A_kA.js";import{i as lt}from"./UvStrNyM.js";import{e as Mr}from"./BR6tTwie.js";import{c as G}from"./Cf_fsnlT.js";import{h as Ir}from"./CgtTdn_a.js";import{s as Bt,b as Tr,c as dn,d as Lr,f as Wr,g as R,m as Kt,h as yn,I as Nr,a as zr,e as Vr}from"./CCY2d7sc.js";import{b as rt,a as Yt,c as or,r as Hr,s as ze,e as Kr}from"./Dw-PWoyz.js";import{p as x,c as dt,r as ct}from"./Bysmuwvg.js";import{B as Nn}from"./CTXwJjmZ.js";import{B as zn}from"./BkOB8zes.js";import{C as Vn,a as Hn}from"./BzfwckE1.js";import{e as Ur,C as xn,u as ir,i as jr,w as Kn,g as Xr,F as Yr,S as Un,E as qr,f as Zr,T as Qr,n as qt,M as Jr,h as Gr,j as $r,k as to,l as eo,P as no,D as ro,a as oo,b as io,c as so,I as ao,d as lo}from"./Cr7vHN1I.js";import{o as co}from"./CeetFYTo.js";import{g as un}from"./mylYChEY.js";import{B as uo}from"./DfWA6mBJ.js";function fo(e){return typeof e=="function"}function jn(e){return fo(e)?e():e}var Dt,Qt,Jt,Gt,Rt,qe,Ze,$t;class ho{constructor(t,n={box:"border-box"}){k(this,Dt,{width:0,height:0});k(this,Qt,!1);k(this,Jt);k(this,Gt);k(this,Rt);k(this,qe,C(()=>{var t;return(t=c(O(this,$t)))==null||t(),this.getSize().width}));k(this,Ze,C(()=>{var t;return(t=c(O(this,$t)))==null||t(),this.getSize().height}));k(this,$t,C(()=>{const t=jn(O(this,Gt));if(t)return kr(n=>{if(!O(this,Rt))return;const r=new(O(this,Rt)).ResizeObserver(o=>{Vt(this,Qt,!0);for(const i of o){const s=O(this,Jt).box==="content-box"?i.contentBoxSize:i.borderBoxSize,a=Array.isArray(s)?s:[s];O(this,Dt).width=a.reduce((l,d)=>Math.max(l,d.inlineSize),0),O(this,Dt).height=a.reduce((l,d)=>Math.max(l,d.blockSize),0)}n()});return r.observe(t),()=>{Vt(this,Qt,!1),r.disconnect()}})}));Vt(this,Rt,n.window??Ur),Vt(this,Jt,n),Vt(this,Gt,t),Vt(this,Dt,{width:0,height:0})}calculateSize(){const t=jn(O(this,Gt));if(!t||!O(this,Rt))return;const n=t.offsetWidth,r=t.offsetHeight;if(O(this,Jt).box==="border-box")return{width:n,height:r};const o=O(this,Rt).getComputedStyle(t),i=parseFloat(o.paddingLeft)+parseFloat(o.paddingRight),s=parseFloat(o.paddingTop)+parseFloat(o.paddingBottom),a=parseFloat(o.borderLeftWidth)+parseFloat(o.borderRightWidth),l=parseFloat(o.borderTopWidth)+parseFloat(o.borderBottomWidth),d=n-i-a,f=r-s-l;return{width:d,height:f}}getSize(){return O(this,Qt)?O(this,Dt):this.calculateSize()??O(this,Dt)}get current(){var t;return(t=c(O(this,$t)))==null||t(),this.getSize()}get width(){return c(O(this,qe))}get height(){return c(O(this,Ze))}}Dt=new WeakMap,Qt=new WeakMap,Jt=new WeakMap,Gt=new WeakMap,Rt=new WeakMap,qe=new WeakMap,Ze=new WeakMap,$t=new WeakMap;const go=["top","right","bottom","left"],kt=Math.min,st=Math.max,Ke=Math.round,Ve=Math.floor,vt=e=>({x:e,y:e}),mo={left:"right",right:"left",bottom:"top",top:"bottom"},vo={start:"end",end:"start"};function gn(e,t,n){return st(e,kt(t,n))}function St(e,t){return typeof e=="function"?e(t):e}function At(e){return e.split("-")[0]}function ee(e){return e.split("-")[1]}function bn(e){return e==="x"?"y":"x"}function On(e){return e==="y"?"height":"width"}const wo=new Set(["top","bottom"]);function mt(e){return wo.has(At(e))?"y":"x"}function Pn(e){return bn(mt(e))}function po(e,t,n){n===void 0&&(n=!1);const r=ee(e),o=Pn(e),i=On(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Ue(s)),[s,Ue(s)]}function yo(e){const t=Ue(e);return[mn(e),t,mn(t)]}function mn(e){return e.replace(/start|end/g,t=>vo[t])}const Xn=["left","right"],Yn=["right","left"],xo=["top","bottom"],bo=["bottom","top"];function Oo(e,t,n){switch(e){case"top":case"bottom":return n?t?Yn:Xn:t?Xn:Yn;case"left":case"right":return t?xo:bo;default:return[]}}function Po(e,t,n,r){const o=ee(e);let i=Oo(At(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(mn)))),i}function Ue(e){return e.replace(/left|right|bottom|top/g,t=>mo[t])}function So(e){return{top:0,right:0,bottom:0,left:0,...e}}function sr(e){return typeof e!="number"?So(e):{top:e,right:e,bottom:e,left:e}}function je(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function qn(e,t,n){let{reference:r,floating:o}=e;const i=mt(t),s=Pn(t),a=On(s),l=At(t),d=i==="y",f=r.x+r.width/2-o.width/2,h=r.y+r.height/2-o.height/2,u=r[a]/2-o[a]/2;let g;switch(l){case"top":g={x:f,y:r.y-o.height};break;case"bottom":g={x:f,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:h};break;case"left":g={x:r.x-o.width,y:h};break;default:g={x:r.x,y:r.y}}switch(ee(t)){case"start":g[s]-=u*(n&&d?-1:1);break;case"end":g[s]+=u*(n&&d?-1:1);break}return g}async function Ao(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:u=!1,padding:g=0}=St(t,e),m=sr(g),w=a[u?h==="floating"?"reference":"floating":h],b=je(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(w)))==null||n?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:d,rootBoundary:f,strategy:l})),P=h==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,A=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),p=await(i.isElement==null?void 0:i.isElement(A))?await(i.getScale==null?void 0:i.getScale(A))||{x:1,y:1}:{x:1,y:1},B=je(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:P,offsetParent:A,strategy:l}):P);return{top:(b.top-B.top+m.top)/p.y,bottom:(B.bottom-b.bottom+m.bottom)/p.y,left:(b.left-B.left+m.left)/p.x,right:(B.right-b.right+m.right)/p.x}}const _o=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:h}=qn(d,r,l),u=r,g={},m=0;for(let w=0;w<a.length;w++){var v;const{name:b,fn:P}=a[w],{x:A,y:p,data:B,reset:F}=await P({x:f,y:h,initialPlacement:r,placement:u,strategy:o,middlewareData:g,rects:d,platform:{...s,detectOverflow:(v=s.detectOverflow)!=null?v:Ao},elements:{reference:e,floating:t}});f=A??f,h=p??h,g={...g,[b]:{...g[b],...B}},F&&m<=50&&(m++,typeof F=="object"&&(F.placement&&(u=F.placement),F.rects&&(d=F.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):F.rects),{x:f,y:h}=qn(d,u,l)),w=-1)}return{x:f,y:h,placement:u,strategy:o,middlewareData:g}},Co=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:d,padding:f=0}=St(e,t)||{};if(d==null)return{};const h=sr(f),u={x:n,y:r},g=Pn(o),m=On(g),v=await s.getDimensions(d),w=g==="y",b=w?"top":"left",P=w?"bottom":"right",A=w?"clientHeight":"clientWidth",p=i.reference[m]+i.reference[g]-u[g]-i.floating[m],B=u[g]-i.reference[g],F=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let _=F?F[A]:0;(!_||!await(s.isElement==null?void 0:s.isElement(F)))&&(_=a.floating[A]||i.floating[m]);const L=p/2-B/2,Z=_/2-v[m]/2-1,K=kt(h[b],Z),Q=kt(h[P],Z),Y=K,J=_-v[m]-Q,V=_/2-v[m]/2+L,W=gn(Y,V,J),M=!l.arrow&&ee(o)!=null&&V!==W&&i.reference[m]/2-(V<Y?K:Q)-v[m]/2<0,T=M?V<Y?V-Y:V-J:0;return{[g]:u[g]+T,data:{[g]:W,centerOffset:V-W-T,...M&&{alignmentOffset:T}},reset:M}}}),Fo=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:d}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:u,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:v=!0,...w}=St(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const b=At(o),P=mt(a),A=At(a)===a,p=await(l.isRTL==null?void 0:l.isRTL(d.floating)),B=u||(A||!v?[Ue(a)]:yo(a)),F=m!=="none";!u&&F&&B.push(...Po(a,v,m,p));const _=[a,...B],L=await l.detectOverflow(t,w),Z=[];let K=((r=i.flip)==null?void 0:r.overflows)||[];if(f&&Z.push(L[b]),h){const V=po(o,s,p);Z.push(L[V[0]],L[V[1]])}if(K=[...K,{placement:o,overflows:Z}],!Z.every(V=>V<=0)){var Q,Y;const V=(((Q=i.flip)==null?void 0:Q.index)||0)+1,W=_[V];if(W&&(!(h==="alignment"?P!==mt(W):!1)||K.every(y=>mt(y.placement)===P?y.overflows[0]>0:!0)))return{data:{index:V,overflows:K},reset:{placement:W}};let M=(Y=K.filter(T=>T.overflows[0]<=0).sort((T,y)=>T.overflows[1]-y.overflows[1])[0])==null?void 0:Y.placement;if(!M)switch(g){case"bestFit":{var J;const T=(J=K.filter(y=>{if(F){const E=mt(y.placement);return E===P||E==="y"}return!0}).map(y=>[y.placement,y.overflows.filter(E=>E>0).reduce((E,U)=>E+U,0)]).sort((y,E)=>y[1]-E[1])[0])==null?void 0:J[0];T&&(M=T);break}case"initialPlacement":M=a;break}if(o!==M)return{reset:{placement:M}}}return{}}}};function Zn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Qn(e){return go.some(t=>e[t]>=0)}const Eo=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=St(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),a=Zn(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Qn(a)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),a=Zn(s,n.floating);return{data:{escapedOffsets:a,escaped:Qn(a)}}}default:return{}}}}},ar=new Set(["left","top"]);async function Do(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=At(n),a=ee(n),l=mt(n)==="y",d=ar.has(s)?-1:1,f=i&&l?-1:1,h=St(t,e);let{mainAxis:u,crossAxis:g,alignmentAxis:m}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof m=="number"&&(g=a==="end"?m*-1:m),l?{x:g*f,y:u*d}:{x:u*d,y:g*f}}const Ro=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await Do(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},Bo=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:b=>{let{x:P,y:A}=b;return{x:P,y:A}}},...d}=St(e,t),f={x:n,y:r},h=await i.detectOverflow(t,d),u=mt(At(o)),g=bn(u);let m=f[g],v=f[u];if(s){const b=g==="y"?"top":"left",P=g==="y"?"bottom":"right",A=m+h[b],p=m-h[P];m=gn(A,m,p)}if(a){const b=u==="y"?"top":"left",P=u==="y"?"bottom":"right",A=v+h[b],p=v-h[P];v=gn(A,v,p)}const w=l.fn({...t,[g]:m,[u]:v});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[g]:s,[u]:a}}}}}},ko=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:d=!0}=St(e,t),f={x:n,y:r},h=mt(o),u=bn(h);let g=f[u],m=f[h];const v=St(a,t),w=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const A=u==="y"?"height":"width",p=i.reference[u]-i.floating[A]+w.mainAxis,B=i.reference[u]+i.reference[A]-w.mainAxis;g<p?g=p:g>B&&(g=B)}if(d){var b,P;const A=u==="y"?"width":"height",p=ar.has(At(o)),B=i.reference[h]-i.floating[A]+(p&&((b=s.offset)==null?void 0:b[h])||0)+(p?0:w.crossAxis),F=i.reference[h]+i.reference[A]+(p?0:((P=s.offset)==null?void 0:P[h])||0)-(p?w.crossAxis:0);m<B?m=B:m>F&&(m=F)}return{[u]:g,[h]:m}}}},Mo=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...d}=St(e,t),f=await s.detectOverflow(t,d),h=At(o),u=ee(o),g=mt(o)==="y",{width:m,height:v}=i.floating;let w,b;h==="top"||h==="bottom"?(w=h,b=u===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(b=h,w=u==="end"?"top":"bottom");const P=v-f.top-f.bottom,A=m-f.left-f.right,p=kt(v-f[w],P),B=kt(m-f[b],A),F=!t.middlewareData.shift;let _=p,L=B;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(L=A),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(_=P),F&&!u){const K=st(f.left,0),Q=st(f.right,0),Y=st(f.top,0),J=st(f.bottom,0);g?L=m-2*(K!==0||Q!==0?K+Q:st(f.left,f.right)):_=v-2*(Y!==0||J!==0?Y+J:st(f.top,f.bottom))}await l({...t,availableWidth:L,availableHeight:_});const Z=await s.getDimensions(a.floating);return m!==Z.width||v!==Z.height?{reset:{rects:!0}}:{}}}};function tn(){return typeof window<"u"}function ne(e){return lr(e)?(e.nodeName||"").toLowerCase():"#document"}function at(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function yt(e){var t;return(t=(lr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function lr(e){return tn()?e instanceof Node||e instanceof at(e).Node:!1}function ut(e){return tn()?e instanceof Element||e instanceof at(e).Element:!1}function pt(e){return tn()?e instanceof HTMLElement||e instanceof at(e).HTMLElement:!1}function Jn(e){return!tn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof at(e).ShadowRoot}const Io=new Set(["inline","contents"]);function De(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ft(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Io.has(o)}const To=new Set(["table","td","th"]);function Lo(e){return To.has(ne(e))}const Wo=[":popover-open",":modal"];function en(e){return Wo.some(t=>{try{return e.matches(t)}catch{return!1}})}const No=["transform","translate","scale","rotate","perspective"],zo=["transform","translate","scale","rotate","perspective","filter"],Vo=["paint","layout","strict","content"];function Sn(e){const t=An(),n=ut(e)?ft(e):e;return No.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||zo.some(r=>(n.willChange||"").includes(r))||Vo.some(r=>(n.contain||"").includes(r))}function Ho(e){let t=Mt(e);for(;pt(t)&&!te(t);){if(Sn(t))return t;if(en(t))return null;t=Mt(t)}return null}function An(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ko=new Set(["html","body","#document"]);function te(e){return Ko.has(ne(e))}function ft(e){return at(e).getComputedStyle(e)}function nn(e){return ut(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Mt(e){if(ne(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Jn(e)&&e.host||yt(e);return Jn(t)?t.host:t}function cr(e){const t=Mt(e);return te(t)?e.ownerDocument?e.ownerDocument.body:e.body:pt(t)&&De(t)?t:cr(t)}function le(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=cr(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=at(o);if(i){const a=vn(s);return t.concat(s,s.visualViewport||[],De(o)?o:[],a&&n?le(a):[])}return t.concat(o,le(o,[],n))}function vn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function dr(e){const t=ft(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=pt(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Ke(n)!==i||Ke(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function _n(e){return ut(e)?e:e.contextElement}function Zt(e){const t=_n(e);if(!pt(t))return vt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=dr(t);let s=(i?Ke(n.width):n.width)/r,a=(i?Ke(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Uo=vt(0);function ur(e){const t=at(e);return!An()||!t.visualViewport?Uo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function jo(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==at(e)?!1:t}function Ut(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=_n(e);let s=vt(1);t&&(r?ut(r)&&(s=Zt(r)):s=Zt(e));const a=jo(i,n,r)?ur(i):vt(0);let l=(o.left+a.x)/s.x,d=(o.top+a.y)/s.y,f=o.width/s.x,h=o.height/s.y;if(i){const u=at(i),g=r&&ut(r)?at(r):r;let m=u,v=vn(m);for(;v&&r&&g!==m;){const w=Zt(v),b=v.getBoundingClientRect(),P=ft(v),A=b.left+(v.clientLeft+parseFloat(P.paddingLeft))*w.x,p=b.top+(v.clientTop+parseFloat(P.paddingTop))*w.y;l*=w.x,d*=w.y,f*=w.x,h*=w.y,l+=A,d+=p,m=at(v),v=vn(m)}}return je({width:f,height:h,x:l,y:d})}function rn(e,t){const n=nn(e).scrollLeft;return t?t.left+n:Ut(yt(e)).left+n}function fr(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-rn(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Xo(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=yt(r),a=t?en(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},d=vt(1);const f=vt(0),h=pt(r);if((h||!h&&!i)&&((ne(r)!=="body"||De(s))&&(l=nn(r)),pt(r))){const g=Ut(r);d=Zt(r),f.x=g.x+r.clientLeft,f.y=g.y+r.clientTop}const u=s&&!h&&!i?fr(s,l):vt(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-l.scrollLeft*d.x+f.x+u.x,y:n.y*d.y-l.scrollTop*d.y+f.y+u.y}}function Yo(e){return Array.from(e.getClientRects())}function qo(e){const t=yt(e),n=nn(e),r=e.ownerDocument.body,o=st(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=st(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+rn(e);const a=-n.scrollTop;return ft(r).direction==="rtl"&&(s+=st(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const Gn=25;function Zo(e,t){const n=at(e),r=yt(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const f=An();(!f||f&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const d=rn(r);if(d<=0){const f=r.ownerDocument,h=f.body,u=getComputedStyle(h),g=f.compatMode==="CSS1Compat"&&parseFloat(u.marginLeft)+parseFloat(u.marginRight)||0,m=Math.abs(r.clientWidth-h.clientWidth-g);m<=Gn&&(i-=m)}else d<=Gn&&(i+=d);return{width:i,height:s,x:a,y:l}}const Qo=new Set(["absolute","fixed"]);function Jo(e,t){const n=Ut(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=pt(e)?Zt(e):vt(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,d=r*i.y;return{width:s,height:a,x:l,y:d}}function $n(e,t,n){let r;if(t==="viewport")r=Zo(e,n);else if(t==="document")r=qo(yt(e));else if(ut(t))r=Jo(t,n);else{const o=ur(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return je(r)}function hr(e,t){const n=Mt(e);return n===t||!ut(n)||te(n)?!1:ft(n).position==="fixed"||hr(n,t)}function Go(e,t){const n=t.get(e);if(n)return n;let r=le(e,[],!1).filter(a=>ut(a)&&ne(a)!=="body"),o=null;const i=ft(e).position==="fixed";let s=i?Mt(e):e;for(;ut(s)&&!te(s);){const a=ft(s),l=Sn(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&Qo.has(o.position)||De(s)&&!l&&hr(e,s))?r=r.filter(f=>f!==s):o=a,s=Mt(s)}return t.set(e,r),r}function $o(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?en(t)?[]:Go(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((d,f)=>{const h=$n(t,f,o);return d.top=st(h.top,d.top),d.right=kt(h.right,d.right),d.bottom=kt(h.bottom,d.bottom),d.left=st(h.left,d.left),d},$n(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function ti(e){const{width:t,height:n}=dr(e);return{width:t,height:n}}function ei(e,t,n){const r=pt(t),o=yt(t),i=n==="fixed",s=Ut(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=vt(0);function d(){l.x=rn(o)}if(r||!r&&!i)if((ne(t)!=="body"||De(o))&&(a=nn(t)),r){const g=Ut(t,!0,i,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}else o&&d();i&&!r&&o&&d();const f=o&&!r&&!i?fr(o,a):vt(0),h=s.left+a.scrollLeft-l.x-f.x,u=s.top+a.scrollTop-l.y-f.y;return{x:h,y:u,width:s.width,height:s.height}}function fn(e){return ft(e).position==="static"}function tr(e,t){if(!pt(e)||ft(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return yt(e)===n&&(n=n.ownerDocument.body),n}function gr(e,t){const n=at(e);if(en(e))return n;if(!pt(e)){let o=Mt(e);for(;o&&!te(o);){if(ut(o)&&!fn(o))return o;o=Mt(o)}return n}let r=tr(e,t);for(;r&&Lo(r)&&fn(r);)r=tr(r,t);return r&&te(r)&&fn(r)&&!Sn(r)?n:r||Ho(e)||n}const ni=async function(e){const t=this.getOffsetParent||gr,n=this.getDimensions,r=await n(e.floating);return{reference:ei(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ri(e){return ft(e).direction==="rtl"}const oi={convertOffsetParentRelativeRectToViewportRelativeRect:Xo,getDocumentElement:yt,getClippingRect:$o,getOffsetParent:gr,getElementRects:ni,getClientRects:Yo,getDimensions:ti,getScale:Zt,isElement:ut,isRTL:ri};function mr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ii(e,t){let n=null,r;const o=yt(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const d=e.getBoundingClientRect(),{left:f,top:h,width:u,height:g}=d;if(a||t(),!u||!g)return;const m=Ve(h),v=Ve(o.clientWidth-(f+u)),w=Ve(o.clientHeight-(h+g)),b=Ve(f),A={rootMargin:-m+"px "+-v+"px "+-w+"px "+-b+"px",threshold:st(0,kt(1,l))||1};let p=!0;function B(F){const _=F[0].intersectionRatio;if(_!==l){if(!p)return s();_?s(!1,_):r=setTimeout(()=>{s(!1,1e-7)},1e3)}_===1&&!mr(d,e.getBoundingClientRect())&&s(),p=!1}try{n=new IntersectionObserver(B,{...A,root:o.ownerDocument})}catch{n=new IntersectionObserver(B,A)}n.observe(e)}return s(!0),i}function si(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,d=_n(e),f=o||i?[...d?le(d):[],...le(t)]:[];f.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),i&&b.addEventListener("resize",n)});const h=d&&a?ii(d,n):null;let u=-1,g=null;s&&(g=new ResizeObserver(b=>{let[P]=b;P&&P.target===d&&g&&(g.unobserve(t),cancelAnimationFrame(u),u=requestAnimationFrame(()=>{var A;(A=g)==null||A.observe(t)})),n()}),d&&!l&&g.observe(d),g.observe(t));let m,v=l?Ut(e):null;l&&w();function w(){const b=Ut(e);v&&!mr(v,b)&&n(),v=b,m=requestAnimationFrame(w)}return n(),()=>{var b;f.forEach(P=>{o&&P.removeEventListener("scroll",n),i&&P.removeEventListener("resize",n)}),h==null||h(),(b=g)==null||b.disconnect(),g=null,l&&cancelAnimationFrame(m)}}const ai=Ro,li=Bo,ci=Fo,di=Mo,ui=Eo,fi=Co,hi=ko,gi=(e,t,n)=>{const r=new Map,o={platform:oi,...n},i={...o.platform,_c:r};return _o(e,t,{...o,platform:i})};function Ht(e){return typeof e=="function"?e():e}function vr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function er(e,t){const n=vr(e);return Math.round(t*n)/n}function nr(e){return{[`--bits-${e}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`--bits-${e}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${e}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${e}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${e}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function mi(e){const t=e.whileElementsMounted,n=C(()=>Ht(e.open)??!0),r=C(()=>Ht(e.middleware)),o=C(()=>Ht(e.transform)??!0),i=C(()=>Ht(e.placement)??"bottom"),s=C(()=>Ht(e.strategy)??"absolute"),a=C(()=>Ht(e.sideOffset)??0),l=C(()=>Ht(e.alignOffset)??0),d=e.reference;let f=tt(0),h=tt(0);const u=Bt(null);let g=tt(He(c(s))),m=tt(He(c(i))),v=tt(He({})),w=tt(!1);const b=C(()=>{const _=u.current?er(u.current,c(f)):c(f),L=u.current?er(u.current,c(h)):c(h);return c(o)?{position:c(g),left:"0",top:"0",transform:`translate(${_}px, ${L}px)`,...u.current&&vr(u.current)>=1.5&&{willChange:"transform"}}:{position:c(g),left:`${_}px`,top:`${L}px`}});let P;function A(){d.current===null||u.current===null||gi(d.current,u.current,{middleware:c(r),placement:c(i),strategy:c(s)}).then(_=>{if(!c(n)&&c(f)!==0&&c(h)!==0){const L=Math.max(Math.abs(c(a)),Math.abs(c(l)),15);if(_.x<=L&&_.y<=L)return}D(f,_.x,!0),D(h,_.y,!0),D(g,_.strategy,!0),D(m,_.placement,!0),D(v,_.middlewareData,!0),D(w,!0)})}function p(){typeof P=="function"&&(P(),P=void 0)}function B(){if(p(),t===void 0){A();return}d.current===null||u.current===null||(P=t(d.current,u.current,A))}function F(){c(n)||D(w,!1)}return Pt(A),Pt(B),Pt(F),Pt(()=>p),{floating:u,reference:d,get strategy(){return c(g)},get placement(){return c(m)},get middlewareData(){return c(v)},get isPositioned(){return c(w)},get floatingStyles(){return c(b)},get update(){return A}}}const vi={top:"bottom",right:"left",bottom:"top",left:"right"},Cn=new xn("Floating.Root"),rr=new xn("Floating.Content"),Fn=new xn("Floating.Root");class Xe{constructor(){$(this,"anchorNode",Bt(null));$(this,"customAnchorNode",Bt(null));$(this,"triggerNode",Bt(null));Pt(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}static create(t=!1){return t?Fn.set(new Xe):Cn.set(new Xe)}}var ce,Qe,de,Je,ue,Ge,fe,he,ge,me,ve,we,pe,ye,xe,be,Oe,Pe,Se,Ae,_e,Ce,Fe,Ee;const $e=class $e{constructor(t,n){$(this,"opts");$(this,"root");$(this,"contentRef",Bt(null));$(this,"wrapperRef",Bt(null));$(this,"arrowRef",Bt(null));$(this,"contentAttachment",dn(this.contentRef));$(this,"wrapperAttachment",dn(this.wrapperRef));$(this,"arrowAttachment",dn(this.arrowRef));$(this,"arrowId",Bt(ir()));k(this,ce,C(()=>{if(typeof this.opts.style=="string")return Lr(this.opts.style);if(!this.opts.style)return{}}));k(this,Qe);k(this,de,new ho(()=>this.arrowRef.current??void 0));k(this,Je,C(()=>{var t;return((t=O(this,de))==null?void 0:t.width)??0}));k(this,ue,C(()=>{var t;return((t=O(this,de))==null?void 0:t.height)??0}));k(this,Ge,C(()=>{var t;return((t=this.opts.side)==null?void 0:t.current)+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:"")}));k(this,fe,C(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]));k(this,he,C(()=>c(O(this,fe)).length>0));k(this,ge,C(()=>({padding:this.opts.collisionPadding.current,boundary:c(O(this,fe)).filter(jr),altBoundary:this.hasExplicitBoundaries})));k(this,me,tt(void 0));k(this,ve,tt(void 0));k(this,we,tt(void 0));k(this,pe,tt(void 0));k(this,ye,C(()=>[ai({mainAxis:this.opts.sideOffset.current+c(O(this,ue)),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&li({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?hi():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&ci({...this.detectOverflowOptions}),di({...this.detectOverflowOptions,apply:({rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference;D(O(this,me),n,!0),D(O(this,ve),r,!0),D(O(this,we),o,!0),D(O(this,pe),i,!0)}}),this.arrowRef.current&&fi({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),wi({arrowWidth:c(O(this,Je)),arrowHeight:c(O(this,ue))}),this.opts.hideWhenDetached.current&&ui({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean)));$(this,"floating");k(this,xe,C(()=>pi(this.floating.placement)));k(this,be,C(()=>yi(this.floating.placement)));k(this,Oe,C(()=>{var t;return((t=this.floating.middlewareData.arrow)==null?void 0:t.x)??0}));k(this,Pe,C(()=>{var t;return((t=this.floating.middlewareData.arrow)==null?void 0:t.y)??0}));k(this,Se,C(()=>{var t;return((t=this.floating.middlewareData.arrow)==null?void 0:t.centerOffset)!==0}));k(this,Ae,tt());k(this,_e,C(()=>vi[this.placedSide]));k(this,Ce,C(()=>{var t,n,r;return{id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${(t=this.floating.middlewareData.transformOrigin)==null?void 0:t.x} ${(n=this.floating.middlewareData.transformOrigin)==null?void 0:n.y}`,"--bits-floating-available-width":`${c(O(this,me))}px`,"--bits-floating-available-height":`${c(O(this,ve))}px`,"--bits-floating-anchor-width":`${c(O(this,we))}px`,"--bits-floating-anchor-height":`${c(O(this,pe))}px`,...((r=this.floating.middlewareData.hide)==null?void 0:r.referenceHidden)&&{visibility:"hidden","pointer-events":"none"},...c(O(this,ce))},dir:this.opts.dir.current,...this.wrapperAttachment}}));k(this,Fe,C(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:Wr({...c(O(this,ce))}),...this.contentAttachment})));k(this,Ee,C(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0})));this.opts=t,this.root=n,t.customAnchor&&(this.root.customAnchorNode.current=t.customAnchor.current),Kn(()=>t.customAnchor.current,r=>{this.root.customAnchorNode.current=r}),this.floating=mi({strategy:()=>this.opts.strategy.current,placement:()=>c(O(this,Ge)),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...r)=>{var i;return si(...r,{animationFrame:((i=O(this,Qe))==null?void 0:i.current)==="always"})},open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),Pt(()=>{var r;this.floating.isPositioned&&((r=this.opts.onPlaced)==null||r.current())}),Kn(()=>this.contentRef.current,r=>{if(!r)return;const o=Xr(r);this.contentZIndex=o.getComputedStyle(r).zIndex}),Pt(()=>{this.floating.floating.current=this.wrapperRef.current})}static create(t,n=!1){return n?rr.set(new $e(t,Fn.get())):rr.set(new $e(t,Cn.get()))}get hasExplicitBoundaries(){return c(O(this,he))}set hasExplicitBoundaries(t){D(O(this,he),t)}get detectOverflowOptions(){return c(O(this,ge))}set detectOverflowOptions(t){D(O(this,ge),t)}get middleware(){return c(O(this,ye))}set middleware(t){D(O(this,ye),t)}get placedSide(){return c(O(this,xe))}set placedSide(t){D(O(this,xe),t)}get placedAlign(){return c(O(this,be))}set placedAlign(t){D(O(this,be),t)}get arrowX(){return c(O(this,Oe))}set arrowX(t){D(O(this,Oe),t)}get arrowY(){return c(O(this,Pe))}set arrowY(t){D(O(this,Pe),t)}get cannotCenterArrow(){return c(O(this,Se))}set cannotCenterArrow(t){D(O(this,Se),t)}get contentZIndex(){return c(O(this,Ae))}set contentZIndex(t){D(O(this,Ae),t,!0)}get arrowBaseSide(){return c(O(this,_e))}set arrowBaseSide(t){D(O(this,_e),t)}get wrapperProps(){return c(O(this,Ce))}set wrapperProps(t){D(O(this,Ce),t)}get props(){return c(O(this,Fe))}set props(t){D(O(this,Fe),t)}get arrowStyle(){return c(O(this,Ee))}set arrowStyle(t){D(O(this,Ee),t)}};ce=new WeakMap,Qe=new WeakMap,de=new WeakMap,Je=new WeakMap,ue=new WeakMap,Ge=new WeakMap,fe=new WeakMap,he=new WeakMap,ge=new WeakMap,me=new WeakMap,ve=new WeakMap,we=new WeakMap,pe=new WeakMap,ye=new WeakMap,xe=new WeakMap,be=new WeakMap,Oe=new WeakMap,Pe=new WeakMap,Se=new WeakMap,Ae=new WeakMap,_e=new WeakMap,Ce=new WeakMap,Fe=new WeakMap,Ee=new WeakMap;let wn=$e;class Ye{constructor(t,n){$(this,"opts");$(this,"root");this.opts=t,this.root=n,t.virtualEl&&t.virtualEl.current?n.triggerNode=Tr(t.virtualEl.current):n.triggerNode=t.ref}static create(t,n=!1){return n?new Ye(t,Fn.get()):new Ye(t,Cn.get())}}function wi(e){return{name:"transformOrigin",options:e,fn(t){var w,b,P;const{placement:n,rects:r,middlewareData:o}=t,s=((w=o.arrow)==null?void 0:w.centerOffset)!==0,a=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[d,f]=En(n),h={start:"0%",center:"50%",end:"100%"}[f],u=(((b=o.arrow)==null?void 0:b.x)??0)+a/2,g=(((P=o.arrow)==null?void 0:P.y)??0)+l/2;let m="",v="";return d==="bottom"?(m=s?h:`${u}px`,v=`${-l}px`):d==="top"?(m=s?h:`${u}px`,v=`${r.floating.height+l}px`):d==="right"?(m=`${-l}px`,v=s?h:`${g}px`):d==="left"&&(m=`${r.floating.width+l}px`,v=s?h:`${g}px`),{data:{x:m,y:v}}}}}function En(e){const[t,n="center"]=e.split("-");return[t,n]}function pi(e){return En(e)[0]}function yi(e){return En(e)[1]}function xi(e,t){ot(t,!0);let n=x(t,"tooltip",3,!1);Xe.create(n());var r=z(),o=I(r);rt(o,()=>t.children??wt),S(e,r),it()}function bi(e,t){ot(t,!0);let n=x(t,"tooltip",3,!1);Ye.create({id:R(()=>t.id),virtualEl:R(()=>t.virtualEl),ref:t.ref},n());var r=z(),o=I(r);rt(o,()=>t.children??wt),S(e,r),it()}function Oi(e,t){ot(t,!0);let n=x(t,"side",3,"bottom"),r=x(t,"sideOffset",3,0),o=x(t,"align",3,"center"),i=x(t,"alignOffset",3,0),s=x(t,"arrowPadding",3,0),a=x(t,"avoidCollisions",3,!0),l=x(t,"collisionBoundary",19,()=>[]),d=x(t,"collisionPadding",3,0),f=x(t,"hideWhenDetached",3,!1),h=x(t,"onPlaced",3,()=>{}),u=x(t,"sticky",3,"partial"),g=x(t,"updatePositionStrategy",3,"optimized"),m=x(t,"strategy",3,"fixed"),v=x(t,"dir",3,"ltr"),w=x(t,"style",19,()=>({})),b=x(t,"wrapperId",19,ir),P=x(t,"customAnchor",3,null),A=x(t,"tooltip",3,!1);const p=wn.create({side:R(()=>n()),sideOffset:R(()=>r()),align:R(()=>o()),alignOffset:R(()=>i()),id:R(()=>t.id),arrowPadding:R(()=>s()),avoidCollisions:R(()=>a()),collisionBoundary:R(()=>l()),collisionPadding:R(()=>d()),hideWhenDetached:R(()=>f()),onPlaced:R(()=>h()),sticky:R(()=>u()),updatePositionStrategy:R(()=>g()),strategy:R(()=>m()),dir:R(()=>v()),style:R(()=>w()),enabled:R(()=>t.enabled),wrapperId:R(()=>b()),customAnchor:R(()=>P())},A()),B=C(()=>Kt(p.wrapperProps,{style:{pointerEvents:"auto"}}));var F=z(),_=I(F);rt(_,()=>t.content??wt,()=>({props:p.props,wrapperProps:c(B)})),S(e,F),it()}function Pi(e,t){ot(t,!0),co(()=>{var o;(o=t.onPlaced)==null||o.call(t)});var n=z(),r=I(n);rt(r,()=>t.content??wt,()=>({props:{},wrapperProps:{}})),S(e,n),it()}function Si(e,t){let n=x(t,"isStatic",3,!1),r=ct(t,["$$slots","$$events","$$legacy","content","isStatic","onPlaced"]);var o=z(),i=I(o);{var s=l=>{Pi(l,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},a=l=>{Oi(l,dt({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>r))};lt(i,l=>{n()?l(s):l(a,!1)})}S(e,o)}var Ai=et("<!> <!>",1);function wr(e,t){ot(t,!0);let n=x(t,"interactOutsideBehavior",3,"close"),r=x(t,"trapFocus",3,!0),o=x(t,"isValidEvent",3,()=>!1),i=x(t,"customAnchor",3,null),s=x(t,"isStatic",3,!1),a=x(t,"tooltip",3,!1),l=x(t,"contentPointerEvents",3,"auto"),d=ct(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled","ref","tooltip","contentPointerEvents"]);Si(e,{get isStatic(){return s()},get id(){return t.id},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return i()},get enabled(){return t.enabled},get tooltip(){return a()},content:(h,u)=>{let g=()=>u==null?void 0:u().props,m=()=>u==null?void 0:u().wrapperProps;var v=Ai(),w=I(v);{var b=p=>{Un(p,{get preventScroll(){return t.preventScroll}})},P=p=>{Un(p,{get preventScroll(){return t.preventScroll}})};lt(w,p=>{t.forceMount&&t.enabled?p(b):t.forceMount||p(P,1)})}var A=X(w,2);Yr(A,{get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get enabled(){return t.enabled},get trapFocus(){return r()},get forceMount(){return t.forceMount},get ref(){return t.ref},focusScope:(B,F)=>{let _=()=>F==null?void 0:F().props;qr(B,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(L,Z)=>{Zr(L,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return n()},get isValidEvent(){return o()},get enabled(){return t.enabled},get ref(){return t.ref},children:(Q,Y)=>{let J=()=>Y==null?void 0:Y().props;Qr(Q,{get id(){return t.id},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get enabled(){return t.enabled},get ref(){return t.ref},children:(V,W)=>{var M=z(),T=I(M);{let y=C(()=>({props:Kt(d,g(),J(),_(),{style:{pointerEvents:l()}}),wrapperProps:m()}));rt(T,()=>t.popper??wt,()=>c(y))}S(V,M)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),S(h,v)},$$slots:{content:!0}}),it()}function _i(e,t){let n=x(t,"interactOutsideBehavior",3,"close"),r=x(t,"trapFocus",3,!0),o=x(t,"isValidEvent",3,()=>!1),i=x(t,"customAnchor",3,null),s=x(t,"isStatic",3,!1),a=ct(t,["$$slots","$$events","$$legacy","popper","open","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","ref","shouldRender"]);var l=z(),d=I(l);{var f=h=>{wr(h,dt({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return i()},get isStatic(){return s()},get enabled(){return t.open},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return o()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1,get ref(){return t.ref}},()=>a))};lt(d,h=>{t.shouldRender&&h(f)})}S(e,l)}function Ci(e,t){let n=x(t,"interactOutsideBehavior",3,"close"),r=x(t,"trapFocus",3,!0),o=x(t,"isValidEvent",3,()=>!1),i=x(t,"customAnchor",3,null),s=x(t,"isStatic",3,!1),a=ct(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);wr(e,dt({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return i()},get isStatic(){return s()},get enabled(){return t.enabled},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return o()},get onFocusOutside(){return t.onFocusOutside}},()=>a,{forceMount:!0}))}var Fi=et("<div><!></div>");function Ei(e,t){const n=pn();ot(t,!0);let r=x(t,"ref",15,null),o=x(t,"id",19,()=>yn(n)),i=x(t,"disabled",3,!1),s=x(t,"onSelect",3,qt),a=x(t,"closeOnSelect",3,!0),l=ct(t,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","onSelect","closeOnSelect"]);const d=Jr.create({id:R(()=>o()),disabled:R(()=>i()),onSelect:R(()=>s()),ref:R(()=>r(),v=>r(v)),closeOnSelect:R(()=>a())}),f=C(()=>Kt(l,d.props));var h=z(),u=I(h);{var g=v=>{var w=z(),b=I(w);rt(b,()=>t.child,()=>({props:c(f)})),S(v,w)},m=v=>{var w=Fi();Yt(w,()=>({...c(f)}));var b=j(w);rt(b,()=>t.children??wt),H(w),S(v,w)};lt(u,v=>{t.child?v(g):v(m,!1)})}S(e,h),it()}function Di(e,t){ot(t,!0);let n=x(t,"open",15,!1),r=x(t,"dir",3,"ltr"),o=x(t,"onOpenChange",3,qt),i=x(t,"onOpenChangeComplete",3,qt),s=x(t,"_internal_variant",3,"dropdown-menu");const a=Gr.create({variant:R(()=>s()),dir:R(()=>r()),onClose:()=>{n(!1),o()(!1)}});$r.create({open:R(()=>n(),l=>{n(l),o()(l)}),onOpenChangeComplete:R(()=>i())},a),xi(e,{children:(l,d)=>{var f=z(),h=I(f);rt(h,()=>t.children??wt),S(l,f)},$$slots:{default:!0}}),it()}var Ri=et("<div><div><!></div></div>"),Bi=et("<div><div><!></div></div>");function ki(e,t){const n=pn();ot(t,!0);let r=x(t,"id",19,()=>yn(n)),o=x(t,"ref",15,null),i=x(t,"loop",3,!0),s=x(t,"onInteractOutside",3,qt),a=x(t,"onEscapeKeydown",3,qt),l=x(t,"onCloseAutoFocus",3,qt),d=x(t,"forceMount",3,!1),f=x(t,"trapFocus",3,!1),h=ct(t,["$$slots","$$events","$$legacy","id","child","children","ref","loop","onInteractOutside","onEscapeKeydown","onCloseAutoFocus","forceMount","trapFocus","style"]);const u=to.create({id:R(()=>r()),loop:R(()=>i()),ref:R(()=>o(),p=>o(p)),onCloseAutoFocus:R(()=>l())}),g=C(()=>Kt(h,u.props));function m(p){if(u.handleInteractOutside(p),!p.defaultPrevented&&(s()(p),!p.defaultPrevented)){if(p.target&&p.target instanceof Element){const B=`[${u.parentMenu.root.getBitsAttr("sub-content")}]`;if(p.target.closest(B))return}u.parentMenu.onClose()}}function v(p){a()(p),!p.defaultPrevented&&u.parentMenu.onClose()}var w=z(),b=I(w);{var P=p=>{Ci(p,dt(()=>c(g),()=>u.popperProps,{get ref(){return u.opts.ref},get enabled(){return u.parentMenu.opts.open.current},onInteractOutside:m,onEscapeKeydown:v,get trapFocus(){return f()},get loop(){return i()},forceMount:!0,get id(){return r()},get shouldRender(){return u.shouldRender},popper:(F,_)=>{let L=()=>_==null?void 0:_().props,Z=()=>_==null?void 0:_().wrapperProps;const K=C(()=>Kt(L(),{style:nr("dropdown-menu")},{style:t.style}));var Q=z(),Y=I(Q);{var J=W=>{var M=z(),T=I(M);{let y=C(()=>({props:c(K),wrapperProps:Z(),...u.snippetProps}));rt(T,()=>t.child,()=>c(y))}S(W,M)},V=W=>{var M=Ri();Yt(M,()=>({...Z()}));var T=j(M);Yt(T,()=>({...c(K)}));var y=j(T);rt(y,()=>t.children??wt),H(T),H(M),S(W,M)};lt(Y,W=>{t.child?W(J):W(V,!1)})}S(F,Q)},$$slots:{popper:!0}}))},A=p=>{_i(p,dt(()=>c(g),()=>u.popperProps,{get ref(){return u.opts.ref},get open(){return u.parentMenu.opts.open.current},onInteractOutside:m,onEscapeKeydown:v,get trapFocus(){return f()},get loop(){return i()},forceMount:!1,get id(){return r()},get shouldRender(){return u.shouldRender},popper:(F,_)=>{let L=()=>_==null?void 0:_().props,Z=()=>_==null?void 0:_().wrapperProps;const K=C(()=>Kt(L(),{style:nr("dropdown-menu")},{style:t.style}));var Q=z(),Y=I(Q);{var J=W=>{var M=z(),T=I(M);{let y=C(()=>({props:c(K),wrapperProps:Z(),...u.snippetProps}));rt(T,()=>t.child,()=>c(y))}S(W,M)},V=W=>{var M=Bi();Yt(M,()=>({...Z()}));var T=j(M);Yt(T,()=>({...c(K)}));var y=j(T);rt(y,()=>t.children??wt),H(T),H(M),S(W,M)};lt(Y,W=>{t.child?W(J):W(V,!1)})}S(F,Q)},$$slots:{popper:!0}}))};lt(b,p=>{d()?p(P):d()||p(A,1)})}S(e,w),it()}var Mi=et("<button><!></button>");function Ii(e,t){const n=pn();ot(t,!0);let r=x(t,"id",19,()=>yn(n)),o=x(t,"ref",15,null),i=x(t,"disabled",3,!1),s=x(t,"type",3,"button"),a=ct(t,["$$slots","$$events","$$legacy","id","ref","child","children","disabled","type"]);const l=eo.create({id:R(()=>r()),disabled:R(()=>i()??!1),ref:R(()=>o(),f=>o(f))}),d=C(()=>Kt(a,l.props,{type:s()}));bi(e,{get id(){return r()},get ref(){return l.opts.ref},children:(f,h)=>{var u=z(),g=I(u);{var m=w=>{var b=z(),P=I(b);rt(P,()=>t.child,()=>({props:c(d)})),S(w,b)},v=w=>{var b=Mi();Yt(b,()=>({...c(d)}));var P=j(b);rt(P,()=>t.children??wt),H(b),S(w,b)};lt(g,w=>{t.child?w(m):w(v,!1)})}S(f,u)},$$slots:{default:!0}}),it()}function Ti(e,t){ot(t,!0);let n=x(t,"open",15,!1),r=ct(t,["$$slots","$$events","$$legacy","open"]);var o=z(),i=I(o);G(i,()=>Di,(s,a)=>{a(s,dt(()=>r,{get open(){return n()},set open(l){n(l)}}))}),S(e,o),it()}function pr(e,t){let n=ct(t,["$$slots","$$events","$$legacy"]);var r=z(),o=I(r);G(o,()=>no,(i,s)=>{s(i,dt(()=>n))}),S(e,r)}function Li(e,t){ot(t,!0);let n=x(t,"ref",15,null),r=x(t,"sideOffset",3,4),o=ct(t,["$$slots","$$events","$$legacy","ref","sideOffset","portalProps","class"]);pr(e,dt(()=>t.portalProps,{children:(i,s)=>{var a=z(),l=I(a);{let d=C(()=>or("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-end-2 data-[side=right]:slide-in-from-start-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--bits-dropdown-menu-content-available-height) min-w-[8rem] origin-(--bits-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md outline-none",t.class));G(l,()=>ki,(f,h)=>{h(f,dt({"data-slot":"dropdown-menu-content",get sideOffset(){return r()},get class(){return c(d)}},()=>o,{get ref(){return n()},set ref(u){n(u)}}))})}S(i,a)},$$slots:{default:!0}})),it()}function hn(e,t){ot(t,!0);let n=x(t,"ref",15,null),r=x(t,"variant",3,"default"),o=ct(t,["$$slots","$$events","$$legacy","ref","class","inset","variant"]);var i=z(),s=I(i);{let a=C(()=>or("data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:data-highlighted:bg-destructive/10 dark:data-[variant=destructive]:data-highlighted:bg-destructive/20 data-[variant=destructive]:data-highlighted:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:ps-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t.class));G(s,()=>Ei,(l,d)=>{d(l,dt({"data-slot":"dropdown-menu-item",get"data-inset"(){return t.inset},get"data-variant"(){return r()},get class(){return c(a)}},()=>o,{get ref(){return n()},set ref(f){n(f)}}))})}S(e,i),it()}function Wi(e,t){ot(t,!0);let n=x(t,"ref",15,null),r=ct(t,["$$slots","$$events","$$legacy","ref"]);var o=z(),i=I(o);G(i,()=>Ii,(s,a)=>{a(s,dt({"data-slot":"dropdown-menu-trigger"},()=>r,{get ref(){return n()},set ref(l){n(l)}}))}),S(e,o),it()}var Ni=et('<p class="text-muted-foreground text-center text-sm"> </p>'),zi=et('<a target="_blank" rel="noopener noreferrer" class="block size-full"><img alt="" class="size-full object-cover" loading="lazy"/></a>'),Vi=et('<span class="text-muted-foreground flex size-full items-center justify-center text-xs">—</span>'),Hi=et('<span class="text-muted-foreground ml-1 truncate text-xs"> </span>'),Ki=et('<!> <!> <form method="POST" action="?/delete" class="hidden"><input type="hidden" name="id"/></form> <!>',1),Ui=et("<!> <!>",1),ji=et('<div class="size-12 shrink-0 overflow-hidden rounded border"><!></div> <div class="min-w-0 flex-1"><a class="font-medium hover:underline"> </a> <span class="text-muted-foreground font-mono text-xs"> </span> <!></div> <div class="flex shrink-0 items-center gap-2 text-xs"><!> <span class="tabular-nums"> </span> <!></div> <!>',1),Xi=et('<div class="flex flex-col gap-2"></div>'),Yi=et("<!> <!>",1),qi=et("<!> <!>",1),Zi=et('<main class="container mx-auto flex flex-col gap-4 px-4 py-6 sm:gap-6 sm:px-6 sm:py-8"><div class="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between"><div class="flex items-center gap-2 min-w-0"><a href="/" class="text-muted-foreground hover:text-foreground shrink-0 text-sm" title="Back to main">Back</a> <h1 class="text-xl font-semibold truncate sm:text-2xl">Stackq Items</h1></div> <div class="flex flex-col gap-3 sm:flex-row sm:flex-wrap sm:items-center sm:gap-2"><div class="w-full sm:w-64 sm:min-w-0"><!></div> <span class="text-muted-foreground text-sm shrink-0"> </span> <div class="flex gap-2"><!> <!></div></div></div> <!> <!> <!></main>');function ms(e,t){ot(t,!0);let n=x(t,"searchFromUrl",3,""),r=tt(!1),o=tt(!1),i=tt(null),s=tt("create"),a=tt(He(n()));const l=C(()=>{var y;return((y=t.data)==null?void 0:y.items)??[]}),d=C(()=>{var y;return((y=t.data)==null?void 0:y.itemsForParent)??[]}),f=C(()=>(()=>{const y=c(a).trim().toLowerCase();return y?c(l).filter(E=>{const U=(E.Item??"").toLowerCase(),N=(E.SKU??"").toLowerCase(),It=(E.Description??"").toLowerCase(),_t=(E.Vendor??"").toLowerCase(),Tt=Array.isArray(E.Catagory)?E.Catagory.join(" ").toLowerCase():(E.Catagory??"").toLowerCase(),Re=Array.isArray(E.Sub_Catagory)?E.Sub_Catagory.join(" ").toLowerCase():(E.Sub_Catagory??"").toLowerCase();return U.includes(y)||N.includes(y)||It.includes(y)||_t.includes(y)||Tt.includes(y)||Re.includes(y)}):c(l)})()),h="https://pocketbase.ccllc.pro",u="Stackq_Items";function g(y){return y.Image?`${h}/api/files/${u}/${y.id}/${y.Image}`:null}function m(){D(i,null),D(s,"create"),D(r,!0)}function v(y){D(i,y,!0),D(s,"update"),D(r,!0)}function w(){D(r,!1),D(i,null)}function b(y){const E=y.trim(),U=c(l).find(N=>(N.SKU??"").trim()===E);U?un("/items/"+U.id):un("/items?q="+encodeURIComponent(E))}const P=C(()=>{var y,E,U;return((y=t.data)==null?void 0:y.form)==="create"||((E=t.data)==null?void 0:E.form)==="update"?((U=t.data)==null?void 0:U.error)??null:null});Pt(()=>{var y,E;c(P)&&(((y=t.data)==null?void 0:y.form)==="create"||((E=t.data)==null?void 0:E.form)==="update")&&D(r,!0)}),Pt(()=>{n()&&D(a,n())});var A=Zi();Ir("1kn3tit",y=>{Rr(()=>{Br.title="Items – Stackq"})});var p=j(A),B=X(j(p),2),F=j(B),_=j(F);Nr(_,{type:"search",placeholder:"Search items, SKU…",class:"h-11 w-full sm:h-9",get value(){return c(a)},set value(y){D(a,y,!0)}}),H(F);var L=X(F,2),Z=j(L);H(L);var K=X(L,2),Q=j(K);zn(Q,{variant:"outline",onclick:()=>D(o,!0),title:"Scan barcode to look up item",class:"min-h-11 flex-1 sm:flex-none",children:(y,E)=>{ht();var U=gt("Scan");S(y,U)},$$slots:{default:!0}});var Y=X(Q,2);zn(Y,{onclick:m,class:"min-h-11 flex-1 sm:flex-none",children:(y,E)=>{ht();var U=gt("New item");S(y,U)},$$slots:{default:!0}}),H(K),H(B),H(p);var J=X(p,2);{var V=y=>{Vn(y,{children:(E,U)=>{Hn(E,{class:"flex h-32 items-center justify-center",children:(N,It)=>{var _t=Ni(),Tt=j(_t,!0);H(_t),bt(()=>Ot(Tt,c(l).length===0?"No items. Create one or check PocketBase collection name and auth.":"No items match your search.")),S(N,_t)},$$slots:{default:!0}})},$$slots:{default:!0}})},W=y=>{var E=Xi();Mr(E,21,()=>c(f),U=>U.id,(U,N)=>{Vn(U,{class:"overflow-hidden",children:(It,_t)=>{Hn(It,{class:"flex flex-row items-center gap-3 p-3",children:(Tt,Re)=>{var Be=ji(),ke=I(Be),Me=j(ke);{var Ie=q=>{var nt=zi(),xt=j(nt);H(nt),bt((Le,We)=>{ze(nt,"href",Le),ze(xt,"src",We)},[()=>g(c(N)),()=>g(c(N))]),S(q,nt)},on=C(()=>g(c(N))),re=q=>{var nt=Vi();S(q,nt)};lt(Me,q=>{c(on)?q(Ie):q(re,!1)})}H(ke);var Lt=X(ke,2),Ct=j(Lt),Dn=j(Ct,!0);H(Ct);var jt=X(Ct,2),Te=j(jt);H(jt);var sn=X(jt,2);{var oe=q=>{var nt=Hi(),xt=j(nt);H(nt),bt(()=>Ot(xt,`· ${c(N).Description??""}`)),S(q,nt)};lt(sn,q=>{c(N).Description&&q(oe)})}H(Lt);var Wt=X(Lt,2),Xt=j(Wt);Nn(Xt,{variant:"outline",children:(q,nt)=>{ht();var xt=gt();bt(()=>Ot(xt,c(N).UOM??"—")),S(q,xt)},$$slots:{default:!0}});var ie=X(Xt,2),Nt=j(ie,!0);H(ie);var yr=X(ie,2);{var xr=q=>{Nn(q,{variant:"default",class:"text-xs",children:(nt,xt)=>{ht();var Le=gt("Stock");S(nt,Le)},$$slots:{default:!0}})};lt(yr,q=>{c(N).Stock&&q(xr)})}H(Wt);var br=X(Wt,2);G(br,()=>Ti,(q,nt)=>{nt(q,{children:(xt,Le)=>{var We=Ui(),Rn=I(We);G(Rn,()=>Wi,(an,ln)=>{ln(an,{class:"border-0 bg-transparent hover:bg-muted inline-flex min-h-9 min-w-9 shrink-0 items-center justify-center rounded-md text-sm",children:(cn,Pr)=>{ht();var Ne=gt("Actions");S(cn,Ne)},$$slots:{default:!0}})});var Or=X(Rn,2);G(Or,()=>pr,(an,ln)=>{ln(an,{children:(cn,Pr)=>{var Ne=z(),Sr=I(Ne);G(Sr,()=>Li,(Ar,_r)=>{_r(Ar,{align:"end",children:(Cr,Qi)=>{var Bn=Ki(),kn=I(Bn);G(kn,()=>hn,(zt,Ft)=>{Ft(zt,{onclick:()=>un("/items/"+c(N).id),children:(Et,Tn)=>{ht();var ae=gt("View");S(Et,ae)},$$slots:{default:!0}})});var Mn=X(kn,2);G(Mn,()=>hn,(zt,Ft)=>{Ft(zt,{onclick:()=>v(c(N)),children:(Et,Tn)=>{ht();var ae=gt("Edit");S(Et,ae)},$$slots:{default:!0}})});var se=X(Mn,2),In=j(se);Hr(In),H(se),zr(se,zt=>{var Ft;return(Ft=Vr)==null?void 0:Ft(zt)});var Fr=X(se,2);G(Fr,()=>hn,(zt,Ft)=>{Ft(zt,{class:"text-destructive focus:text-destructive cursor-pointer",onclick:()=>{var Et;confirm("Delete this item? This cannot be undone.")&&((Et=document.getElementById("delete-form-"+c(N).id))==null||Et.requestSubmit())},children:(Et,Tn)=>{ht();var ae=gt("Delete");S(Et,ae)},$$slots:{default:!0}})}),bt(()=>{ze(se,"id",`delete-form-${c(N).id??""}`),Kr(In,c(N).id)}),S(Cr,Bn)},$$slots:{default:!0}})}),S(cn,Ne)},$$slots:{default:!0}})}),S(xt,We)},$$slots:{default:!0}})}),bt(q=>{ze(Ct,"href",`/items/${c(N).id??""}`),Ot(Dn,c(N).Item??"—"),Ot(Te,`· ${c(N).SKU??"—"??""}`),Ot(Nt,q)},[()=>c(N).Cost!=null?Number(c(N).Cost).toLocaleString():"—"]),S(Tt,Be)},$$slots:{default:!0}})},$$slots:{default:!0}})}),H(E),S(y,E)};lt(J,y=>{c(f).length===0?y(V):y(W,!1)})}var M=X(J,2);G(M,()=>lo,(y,E)=>{E(y,{get open(){return c(r)},set open(U){D(r,U,!0)},children:(U,N)=>{var It=z(),_t=I(It);G(_t,()=>ro,(Tt,Re)=>{Re(Tt,{class:"max-h-[90dvh] w-[calc(100vw-2rem)] max-w-[500px] overflow-y-auto rounded-lg sm:w-full",children:(Be,ke)=>{var Me=qi(),Ie=I(Me);G(Ie,()=>oo,(re,Lt)=>{Lt(re,{children:(Ct,Dn)=>{var jt=Yi(),Te=I(jt);G(Te,()=>io,(oe,Wt)=>{Wt(oe,{children:(Xt,ie)=>{ht();var Nt=gt();bt(()=>Ot(Nt,c(i)?"Edit item":"New item")),S(Xt,Nt)},$$slots:{default:!0}})});var sn=X(Te,2);G(sn,()=>so,(oe,Wt)=>{Wt(oe,{children:(Xt,ie)=>{ht();var Nt=gt();bt(()=>Ot(Nt,c(i)?"Update the item below.":"Add a new Stackq item.")),S(Xt,Nt)},$$slots:{default:!0}})}),S(Ct,jt)},$$slots:{default:!0}})});var on=X(Ie,2);{let re=C(()=>c(i)?"?/update":"?/create"),Lt=C(()=>c(i)?"Update":"Create"),Ct=C(()=>c(P)??null);ao(on,{get item(){return c(i)},get itemsForParent(){return c(d)},get action(){return c(re)},get submitLabel(){return c(Lt)},get error(){return c(Ct)},onSuccess:w})}S(Be,Me)},$$slots:{default:!0}})}),S(U,It)},$$slots:{default:!0}})});var T=X(M,2);uo(T,{onResult:b,title:"Scan to look up item",get open(){return c(o)},set open(y){D(o,y,!0)}}),H(A),bt(()=>Ot(Z,`${c(f).length??""}${c(f).length!==c(l).length?` of ${c(l).length}`:""} items`)),S(e,A),it()}export{ms as default};
|