diff --git "a/vendor/hyperview/server/static/_next/static/chunks/8d5a2ef3447cb3ee.js" "b/vendor/hyperview/server/static/_next/static/chunks/8d5a2ef3447cb3ee.js" new file mode 100644--- /dev/null +++ "b/vendor/hyperview/server/static/_next/static/chunks/8d5a2ef3447cb3ee.js" @@ -0,0 +1,13 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,9556,(e,t,i)=>{(t.exports=function(e){this.top=e.top,this.left=e.left,this.width=e.width,this.spacing=e.spacing,this.targetRowHeight=e.targetRowHeight,this.targetRowHeightTolerance=e.targetRowHeightTolerance,this.minAspectRatio=this.width/e.targetRowHeight*(1-e.targetRowHeightTolerance),this.maxAspectRatio=this.width/e.targetRowHeight*(1+e.targetRowHeightTolerance),this.edgeCaseMinRowHeight=e.edgeCaseMinRowHeight,this.edgeCaseMaxRowHeight=e.edgeCaseMaxRowHeight,this.widowLayoutStyle=e.widowLayoutStyle,this.isBreakoutRow=e.isBreakoutRow,this.items=[],this.height=0}).prototype={addItem:function(e){var t,i,n=this.items.concat(e),o=this.width-(n.length-1)*this.spacing,r=n.reduce(function(e,t){return e+t.aspectRatio},0),s=o/this.targetRowHeight;return this.isBreakoutRow&&0===this.items.length&&e.aspectRatio>=1?(this.items.push(e),this.completeLayout(o/e.aspectRatio,"justify"),!0):rthis.maxAspectRatio?0===this.items.length?(this.items.push(Object.assign({},e)),this.completeLayout(o/r,"justify"),!0):(t=this.width-(this.items.length-1)*this.spacing,Math.abs(r-s)>Math.abs((i=this.items.reduce(function(e,t){return e+t.aspectRatio},0))-t/this.targetRowHeight))?(this.completeLayout(t/i,"justify"),!1):(this.items.push(Object.assign({},e)),this.completeLayout(o/r,"justify"),!0):(this.items.push(Object.assign({},e)),this.completeLayout(o/r,"justify"),!0)},isLayoutComplete:function(){return this.height>0},completeLayout:function(e,t){var i,n,o,r,s,a,l=this.left,d=this.width-(this.items.length-1)*this.spacing;(void 0===t||0>["justify","center","left"].indexOf(t))&&(t="left"),n=Math.max(this.edgeCaseMinRowHeight,Math.min(e,this.edgeCaseMaxRowHeight)),e!==n?(this.height=n,i=d/n/(d/e)):(this.height=e,i=1),this.items.forEach(function(e){e.top=this.top,e.width=e.aspectRatio*this.height*i,e.height=this.height,e.left=l,l+=e.width+this.spacing},this),"justify"===t?(l-=this.spacing+this.left,o=(l-this.width)/this.items.length,r=this.items.map(function(e,t){return Math.round((t+1)*o)}),1===this.items.length?(s=this.items[0],s.width-=Math.round(o)):this.items.forEach(function(e,t){t>0?(e.left-=r[t-1],e.width-=r[t]-r[t-1]):e.width-=r[t]})):"center"===t&&(a=(this.width-l)/2,this.items.forEach(function(e){e.left+=a+this.spacing},this))},forceComplete:function(e,t){"number"==typeof t?this.completeLayout(t,this.widowLayoutStyle):this.completeLayout(this.targetRowHeight,this.widowLayoutStyle)},getItems:function(){return this.items}}},49279,(e,t,i)=>{"use strict";var n=e.r(9556);function o(e,t){var i;return!1!==e.fullWidthBreakoutRowCadence&&(t._rows.length+1)%e.fullWidthBreakoutRowCadence==0&&(i=!0),new n({top:t._containerHeight,left:e.containerPadding.left,width:e.containerWidth-e.containerPadding.left-e.containerPadding.right,spacing:e.boxSpacing.horizontal,targetRowHeight:e.targetRowHeight,targetRowHeightTolerance:e.targetRowHeightTolerance,edgeCaseMinRowHeight:.5*e.targetRowHeight,edgeCaseMaxRowHeight:2*e.targetRowHeight,rightToLeft:!1,isBreakoutRow:i,widowLayoutStyle:e.widowLayoutStyle})}function r(e,t,i){return t._rows.push(i),t._layoutItems=t._layoutItems.concat(i.getItems()),t._containerHeight+=i.height+e.boxSpacing.vertical,i.items}t.exports=function(e,t){var i,n,s,a,l,d,h={},u={},c={},p={};return c.top=isNaN(parseFloat((h=Object.assign({containerWidth:1060,containerPadding:10,boxSpacing:10,targetRowHeight:320,targetRowHeightTolerance:.25,maxNumRows:1/0,forceAspectRatio:!1,showWidows:!0,fullWidthBreakoutRowCadence:!1,widowLayoutStyle:"left"},t=t||{})).containerPadding.top))?h.containerPadding:h.containerPadding.top,c.right=isNaN(parseFloat(h.containerPadding.right))?h.containerPadding:h.containerPadding.right,c.bottom=isNaN(parseFloat(h.containerPadding.bottom))?h.containerPadding:h.containerPadding.bottom,c.left=isNaN(parseFloat(h.containerPadding.left))?h.containerPadding:h.containerPadding.left,p.horizontal=isNaN(parseFloat(h.boxSpacing.horizontal))?h.boxSpacing:h.boxSpacing.horizontal,p.vertical=isNaN(parseFloat(h.boxSpacing.vertical))?h.boxSpacing:h.boxSpacing.vertical,h.containerPadding=c,h.boxSpacing=p,u._layoutItems=[],u._awakeItems=[],u._inViewportItems=[],u._leadingOrphans=[],u._trailingOrphans=[],u._containerHeight=h.containerPadding.top,u._rows=[],u._orphans=[],h._widowCount=0,i=h,n=e.map(function(e){return e.width&&e.height?{aspectRatio:e.width/e.height}:{aspectRatio:e}}),d=[],i.forceAspectRatio&&n.forEach(function(e){e.forcedAspectRatio=!0,e.aspectRatio=i.forceAspectRatio}),n.some(function(e,t){if(isNaN(e.aspectRatio))throw Error("Item "+t+" has an invalid aspect ratio");if(a||(a=o(i,u)),s=a.addItem(e),a.isLayoutComplete()){if(d=d.concat(r(i,u,a)),u._rows.length>=i.maxNumRows)return a=null,!0;if(a=o(i,u),!s&&(s=a.addItem(e),a.isLayoutComplete())){if(d=d.concat(r(i,u,a)),u._rows.length>=i.maxNumRows)return a=null,!0;a=o(i,u)}}}),a&&a.getItems().length&&i.showWidows&&(u._rows.length?(l=u._rows[u._rows.length-1].isBreakoutRow?u._rows[u._rows.length-1].targetRowHeight:u._rows[u._rows.length-1].height,a.forceComplete(!1,l)):a.forceComplete(!1),d=d.concat(r(i,u,a)),i._widowCount=a.getItems().length),u._containerHeight=u._containerHeight-i.boxSpacing.vertical,u._containerHeight=u._containerHeight+i.containerPadding.bottom,{containerHeight:u._containerHeight,widowCount:i._widowCount,boxes:u._layoutItems}}},50912,e=>{"use strict";let t,i,n,o,r,s,a,l,d,h,u,c,p,m,f,g,v,w,b,y;var x,_,D,C,S,E,A,k,P,z,O,R,N,I,M,j,L,T,G,V,W=e.i(48277),H=e.i(30668),F=e.i(69941),B=e.i(39057);function $(e,t,i){let n,o=i.initialDeps??[],r=!0;function s(){var s,a,l;let d,h;i.key&&(null==(s=i.debug)?void 0:s.call(i))&&(d=Date.now());let u=e();if(!(u.length!==o.length||u.some((e,t)=>o[t]!==e)))return n;if(o=u,i.key&&(null==(a=i.debug)?void 0:a.call(i))&&(h=Date.now()),n=t(...u),i.key&&(null==(l=i.debug)?void 0:l.call(i))){let e=Math.round((Date.now()-d)*100)/100,t=Math.round((Date.now()-h)*100)/100,n=t/16,o=(e,t)=>{for(e=String(e);e.length{o=e},s}function U(e,t){if(void 0!==e)return e;throw Error(`Unexpected undefined${t?`: ${t}`:""}`)}let K=e=>{let{offsetWidth:t,offsetHeight:i}=e;return{width:t,height:i}},J=e=>e,Z=e=>{let t=Math.max(e.startIndex-e.overscan,0),i=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let e=t;e<=i;e++)n.push(e);return n},X=(e,t)=>{let i=e.scrollElement;if(!i)return;let n=e.targetWindow;if(!n)return;let o=e=>{let{width:i,height:n}=e;t({width:Math.round(i),height:Math.round(n)})};if(o(K(i)),!n.ResizeObserver)return()=>{};let r=new n.ResizeObserver(t=>{let n=()=>{let e=t[0];if(null==e?void 0:e.borderBoxSize){let t=e.borderBoxSize[0];if(t)return void o({width:t.inlineSize,height:t.blockSize})}o(K(i))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(n):n()});return r.observe(i,{box:"border-box"}),()=>{r.unobserve(i)}},q={passive:!0},Y="u"{var i,n;let o,r=e.scrollElement;if(!r)return;let s=e.targetWindow;if(!s)return;let a=0,l=e.options.useScrollendEvent&&Y?()=>void 0:(i=()=>{t(a,!1)},n=e.options.isScrollingResetDelay,function(...e){s.clearTimeout(o),o=s.setTimeout(()=>i.apply(this,e),n)}),d=i=>()=>{let{horizontal:n,isRtl:o}=e.options;a=n?r.scrollLeft*(o&&-1||1):r.scrollTop,l(),t(a,i)},h=d(!0),u=d(!1);r.addEventListener("scroll",h,q);let c=e.options.useScrollendEvent&&Y;return c&&r.addEventListener("scrollend",u,q),()=>{r.removeEventListener("scroll",h),c&&r.removeEventListener("scrollend",u)}},ee=(e,t,i)=>{if(null==t?void 0:t.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[i.options.horizontal?"inlineSize":"blockSize"])}return e[i.options.horizontal?"offsetWidth":"offsetHeight"]},et=(e,{adjustments:t=0,behavior:i},n)=>{var o,r;null==(r=null==(o=n.scrollElement)?void 0:o.scrollTo)||r.call(o,{[n.options.horizontal?"left":"top"]:e+t,behavior:i})};class ei{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null,t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{this._measureElement(e.target,e)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}):null);return{disconnect:()=>{var i;null==(i=t())||i.disconnect(),e=null},observe:e=>{var i;return null==(i=t())?void 0:i.observe(e,{box:"border-box"})},unobserve:e=>{var i;return null==(i=t())?void 0:i.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,i])=>{void 0===i&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:J,rangeExtractor:Z,onChange:()=>{},measureElement:ee,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,i;null==(i=(t=this.options).onChange)||i.call(t,this,e)},this.maybeNotify=$(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;let t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let i=new Map,n=new Map;for(let o=t-1;o>=0;o--){let t=e[o];if(i.has(t.lane))continue;let r=n.get(t.lane);if(null==r||t.end>r.end?n.set(t.lane,t):t.ende.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=$(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(e,t,i,n,o,r)=>(void 0!==this.prevLanes&&this.prevLanes!==r&&(this.lanesChangedFlag=!0),this.prevLanes=r,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:i,getItemKey:n,enabled:o,lanes:r}),{key:!1}),this.getMeasurements=$(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:i,getItemKey:n,enabled:o,lanes:r},s)=>{if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),0!==this.measurementsCache.length||this.lanesSettling||(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let a=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);let l=this.measurementsCache.slice(0,a),d=Array(r).fill(void 0);for(let e=0;e1){let n=d[e=h],o=void 0!==n?l[n]:void 0;r=o?o.end+this.options.gap:t+i}else{let n=1===this.options.lanes?l[o-1]:this.getFurthestMeasurement(l,o);r=n?n.end+this.options.gap:t+i,e=n?n.lane:o%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(o,e)}let u=s.get(a),c="number"==typeof u?u:this.options.estimateSize(o),p=r+c;l[o]={index:o,start:r,size:c,end:p,key:a,lane:e},d[e]=o}return this.measurementsCache=l,l},{key:!1,debug:()=>this.options.debug}),this.calculateRange=$(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,i,n)=>this.range=e.length>0&&t>0?function({measurements:e,outerSize:t,scrollOffset:i,lanes:n}){let o=e.length-1;if(e.length<=n)return{startIndex:0,endIndex:o};let r=en(0,o,t=>e[t].start,i),s=r;if(1===n)for(;s1){let a=Array(n).fill(0);for(;se=0&&l.some(e=>e>=i);){let t=e[r];l[t.lane]=t.start,r--}r=Math.max(0,r-r%n),s=Math.min(o,s+(n-1-s%n))}return{startIndex:r,endIndex:s}}({measurements:e,outerSize:t,scrollOffset:i,lanes:n}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=$(()=>{let e=null,t=null,i=this.calculateRange();return i&&(e=i.startIndex,t=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,i,n,o)=>null===n||null===o?[]:e({startIndex:n,endIndex:o,overscan:t,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,i=e.getAttribute(t);return i?parseInt(i,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{let i=this.indexFromElement(e),n=this.measurementsCache[i];if(!n)return;let o=n.key,r=this.elementsCache.get(o);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(o,e)),e.isConnected&&this.resizeItem(i,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{let i=this.measurementsCache[e];if(!i)return;let n=t-(this.itemSizeCache.get(i.key)??i.size);0!==n&&((void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(i,n,this):i.start{e?this._measureElement(e,void 0):this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))})},this.getVirtualItems=$(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let i=[];for(let n=0,o=e.length;nthis.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(0!==t.length)return U(t[en(0,t.length-1,e=>U(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(e,t,i=0)=>{if(!this.scrollElement)return 0;let n=this.getSize(),o=this.getScrollOffset();return"auto"===t&&(t=e>=o+n?"end":"start"),"center"===t?e+=(i-n)/2:"end"===t&&(e-=n),Math.max(Math.min(this.getMaxScrollOffset(),e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));let i=this.measurementsCache[e];if(!i)return;let n=this.getSize(),o=this.getScrollOffset();if("auto"===t)if(i.end>=o+n-this.options.scrollPaddingEnd)t="end";else{if(!(i.start<=o+this.options.scrollPaddingStart))return[o,t];t="start"}if("end"===t&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let r="end"===t?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(r,t,i.size),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(e,{align:t="start",behavior:i}={})=>{"smooth"===i&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:i})},this.scrollToIndex=(e,{align:t="auto",behavior:i}={})=>{"smooth"===i&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),e=Math.max(0,Math.min(e,this.options.count-1)),this.currentScrollToIndex=e;let n=0,o=t=>{if(!this.targetWindow)return;let n=this.getOffsetForIndex(e,t);if(!n)return void console.warn("Failed to get offset for index:",e);let[o,s]=n;this._scrollToOffset(o,{adjustments:void 0,behavior:i}),this.targetWindow.requestAnimationFrame(()=>{let t=()=>{if(this.currentScrollToIndex!==e)return;let t=this.getScrollOffset(),i=this.getOffsetForIndex(e,s);i?1.01>Math.abs(i[0]-t)||r(s):console.warn("Failed to get offset for index:",e)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(t):t()})},r=t=>{this.targetWindow&&this.currentScrollToIndex===e&&(++n<10?this.targetWindow.requestAnimationFrame(()=>o(t)):console.warn(`Failed to scroll to index ${e} after 10 attempts.`))};o(t)},this.scrollBy=(e,{behavior:t}={})=>{"smooth"===t&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:t})},this.getTotalSize=()=>{var e;let t,i=this.getMeasurements();if(0===i.length)t=this.options.paddingStart;else if(1===this.options.lanes)t=(null==(e=i[i.length-1])?void 0:e.end)??0;else{let e=Array(this.options.lanes).fill(null),n=i.length-1;for(;n>=0&&e.some(e=>null===e);){let t=i[n];null===e[t.lane]&&(e[t.lane]=t.end),n--}t=Math.max(...e.filter(e=>null!==e))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:i})=>{this.options.scrollToFn(e,{behavior:i,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}}let en=(e,t,i,n)=>{for(;e<=t;){let o=(e+t)/2|0,r=i(o);if(rn))return o;t=o-1}}return e>0?e-1:0},eo="u">typeof document?H.useLayoutEffect:H.useEffect;var er=e.i(49279);let es=e=>{let t,i=new Set,n=(e,n)=>{let o="function"==typeof e?e(t):e;if(!Object.is(o,t)){let e=t;t=(null!=n?n:"object"!=typeof o||null===o)?o:Object.assign({},t,o),i.forEach(i=>i(t,e))}},o=()=>t,r={setState:n,getState:o,getInitialState:()=>s,subscribe:e=>(i.add(e),()=>i.delete(e))},s=t=e(n,o,r);return r},ea=e=>{let t=e?es(e):es,i=e=>(function(e,t=e=>e){let i=H.default.useSyncExternalStore(e.subscribe,H.default.useCallback(()=>t(e.getState()),[e,t]),H.default.useCallback(()=>t(e.getInitialState()),[e,t]));return H.default.useDebugValue(i),i})(t,e);return Object.assign(i,t),i},el=e=>e?ea(e):ea,ed="undefined",eh="#39d3cc",eu="#8b949e",ec=["auto","classic20","tab10","tab20","wong"],ep=["#e6194b","#3cb44b","#ffe119","#4363d8","#f58231","#911eb4","#46f0f0","#f032e6","#bcf60c","#fabebe","#008080","#e6beff","#9a6324","#fffac8","#800000","#aaffc3","#808000","#ffd8b1","#000075","#808080"],em=["#4e79a7","#f28e2b","#e15759","#76b7b2","#59a14f","#edc948","#b07aa1","#ff9da7","#9c755f","#bab0ab"],ef=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"],eg=["#e69f00","#56b4e9","#009e73","#f0e442","#0072b2","#d55e00","#cc79a7"];function ev(e){return e<0?0:e>1?1:e}function ew(e,t){let i=[.72,.64,.78],n=[.46,.54,.38,.62];return function(e,t,i){let n=(e%360+360)%360/360%1,o=ev(t),r=ev(i),s=r,a=r,l=r;if(o>0){let e=r<.5?r*(1+o):r+o-r*o,t=2*r-e,i=i=>{let n=i;return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?t+(e-t)*6*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t};s=i(n+1/3),a=i(n),l=i(n-1/3)}let d=e=>Math.round(255*ev(e)).toString(16).padStart(2,"0");return`#${d(s)}${d(a)}${d(l)}`}((("tab10"===t?17:"tab20"===t?43:"wong"===t?71:"classic20"===t?101:131)+137.508*e)%360,i[e%i.length],n[Math.floor(e/i.length)%n.length])}function eb(e,t){return e===ed&&t!==ed?1:t===ed&&e!==ed?-1:e.localeCompare(t)}function ey(e,t,i){let n={},o=new Set,r=0,s=0;for(let a of e){if(a===ed){n[a]=eh,o.add(eh.toLowerCase());continue}let e=r=t.length&&(s+=1),o.has(e.toLowerCase())&&(e=eu),n[a]=e,o.add(e.toLowerCase()),r+=1}return n}function ex(e){return e&&e.length>0?e:ed}function e_(e,t){let i=ex(t),n=new Set;for(let t=0;t({leftPanelOpen:!1,rightPanelOpen:!1,bottomPanelOpen:!1,setLeftPanelOpen:t=>e({leftPanelOpen:t}),setRightPanelOpen:t=>e({rightPanelOpen:t}),setBottomPanelOpen:t=>e({bottomPanelOpen:t}),datasetInfo:null,setDatasetInfo:t=>e({datasetInfo:t}),samples:[],totalSamples:0,samplesLoaded:0,setSamples:(t,i)=>e({samples:t,totalSamples:i,samplesLoaded:t.length}),appendSamples:t=>e(e=>{let i=new Set(e.samples.map(e=>e.id)),n=t.filter(e=>!i.has(e.id)),o=e.samplesLoaded+t.length;return 0===n.length?{samplesLoaded:o}:{samples:[...e.samples,...n],samplesLoaded:o}}),addSamplesIfMissing:t=>e(e=>{let i=new Set(e.samples.map(e=>e.id)),n=t.filter(e=>!i.has(e.id));return 0===n.length?e:{samples:[...e.samples,...n]}}),embeddingsByLayoutKey:{},setEmbeddingsForLayout:(t,i)=>e(e=>{let n=e.labelFilter&&"label"===e.selectionSource&&e.activeLayoutKey===t?{selectedIds:e_(i,e.labelFilter),selectionSource:"label"}:{};return{embeddingsByLayoutKey:{...e.embeddingsByLayoutKey,[t]:i},...n}}),activeLayoutKey:null,setActiveLayoutKey:t=>e(e=>{if(!t)return{activeLayoutKey:null};if(!e.labelFilter||"label"!==e.selectionSource)return{activeLayoutKey:t};let i=e.embeddingsByLayoutKey[t];return i?{activeLayoutKey:t,selectedIds:e_(i,e.labelFilter),selectionSource:"label"}:{activeLayoutKey:t,selectedIds:new Set,selectionSource:"label"}}),labelFilter:null,setLabelFilter:t=>e(e=>{let i=t?ex(t):null,n={labelFilter:i};if(i){let t=e.activeLayoutKey,o=t?e.embeddingsByLayoutKey[t]:null;n.selectedIds=o?e_(o,i):new Set,n.selectionSource="label",n.isLassoSelection=!1,n.lassoQuery=null,n.lassoSamples=[],n.lassoTotal=0,n.lassoIsLoading=!1}else"label"===e.selectionSource&&(n.selectedIds=new Set,n.selectionSource=null);return n}),selectedIds:new Set,isLassoSelection:!1,selectionSource:null,setSelectedIds:(t,i="grid")=>e({selectedIds:t,selectionSource:t.size>0?i:null,isLassoSelection:!1,lassoQuery:null,lassoSamples:[],lassoTotal:0,lassoIsLoading:!1}),toggleSelection:t=>e(e=>{let i=new Set(e.selectedIds);return i.has(t)?i.delete(t):i.add(t),{selectedIds:i,selectionSource:i.size>0?"grid":null,isLassoSelection:!1,lassoQuery:null,lassoSamples:[],lassoTotal:0,lassoIsLoading:!1}}),addToSelection:t=>e(e=>{let i=new Set(e.selectedIds);return t.forEach(e=>i.add(e)),{selectedIds:i,selectionSource:i.size>0?"grid":null,isLassoSelection:!1,lassoQuery:null,lassoSamples:[],lassoTotal:0,lassoIsLoading:!1}}),clearSelection:()=>e({selectedIds:new Set,selectionSource:null,isLassoSelection:!1,lassoQuery:null,lassoSamples:[],lassoTotal:0,lassoIsLoading:!1}),lassoQuery:null,lassoSamples:[],lassoTotal:0,lassoIsLoading:!1,beginLassoSelection:t=>e({isLassoSelection:!0,selectedIds:new Set,selectionSource:"lasso",lassoQuery:t,lassoSamples:[],lassoTotal:0,lassoIsLoading:!0}),setLassoResults:(t,i,n=!1)=>e(e=>({lassoSamples:n?[...e.lassoSamples,...t]:t,lassoTotal:i,lassoIsLoading:!1})),clearLassoSelection:()=>e({isLassoSelection:!1,selectionSource:null,lassoQuery:null,lassoSamples:[],lassoTotal:0,lassoIsLoading:!1}),hoveredId:null,setHoveredId:t=>e({hoveredId:t}),isLoading:!1,setIsLoading:t=>e({isLoading:t}),error:null,setError:t=>e({error:t})}));function eC(){for(var e,t,i=0,n="",o=arguments.length;i({nextPart:e,validators:t,classGroupId:i}),eE=[],eA=(e,t,i)=>{if(0==e.length-t)return i.classGroupId;let n=e[t],o=i.nextPart.get(n);if(o){let i=eA(e,t+1,o);if(i)return i}let r=i.validators;if(null===r)return;let s=0===t?e.join("-"):e.slice(t).join("-"),a=r.length;for(let e=0;e{let i=eS();for(let n in e)eP(e[n],i,n,t);return i},eP=(e,t,i,n)=>{let o=e.length;for(let r=0;r{"string"==typeof e?eO(e,t,i):"function"==typeof e?eR(e,t,i,n):eN(e,t,i,n)},eO=(e,t,i)=>{(""===e?t:eI(t,e)).classGroupId=i},eR=(e,t,i,n)=>{eM(e)?eP(e(n),t,i,n):(null===t.validators&&(t.validators=[]),t.validators.push({classGroupId:i,validator:e}))},eN=(e,t,i,n)=>{let o=Object.entries(e),r=o.length;for(let e=0;e{let i=e,n=t.split("-"),o=n.length;for(let e=0;e"isThemeGetter"in e&&!0===e.isThemeGetter,ej=[],eL=(e,t,i,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:i,maybePostfixModifierPosition:n,isExternal:o}),eT=/\s+/,eG=e=>{let t;if("string"==typeof e)return e;let i="";for(let n=0;n{let t=t=>t[e]||eV;return t.isThemeGetter=!0,t},eH=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,eF=/^\((?:(\w[\w-]*):)?(.+)\)$/i,eB=/^\d+\/\d+$/,e$=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,eU=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,eK=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,eJ=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,eZ=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,eX=e=>eB.test(e),eq=e=>!!e&&!Number.isNaN(Number(e)),eY=e=>!!e&&Number.isInteger(Number(e)),eQ=e=>e.endsWith("%")&&eq(e.slice(0,-1)),e0=e=>e$.test(e),e1=()=>!0,e2=e=>eU.test(e)&&!eK.test(e),e3=()=>!1,e5=e=>eJ.test(e),e4=e=>eZ.test(e),e6=e=>!e8(e)&&!to(e),e9=e=>tu(e,tf,e3),e8=e=>eH.test(e),e7=e=>tu(e,tg,e2),te=e=>tu(e,tv,eq),tt=e=>tu(e,tp,e3),ti=e=>tu(e,tm,e4),tn=e=>tu(e,tb,e5),to=e=>eF.test(e),tr=e=>tc(e,tg),ts=e=>tc(e,tw),ta=e=>tc(e,tp),tl=e=>tc(e,tf),td=e=>tc(e,tm),th=e=>tc(e,tb,!0),tu=(e,t,i)=>{let n=eH.exec(e);return!!n&&(n[1]?t(n[1]):i(n[2]))},tc=(e,t,i=!1)=>{let n=eF.exec(e);return!!n&&(n[1]?t(n[1]):i)},tp=e=>"position"===e||"percentage"===e,tm=e=>"image"===e||"url"===e,tf=e=>"length"===e||"size"===e||"bg-size"===e,tg=e=>"length"===e,tv=e=>"number"===e,tw=e=>"family-name"===e,tb=e=>"shadow"===e,ty=((e,...t)=>{let i,n,o,r,s=e=>{let t=n(e);if(t)return t;let r=((e,t)=>{let{parseClassName:i,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:r}=t,s=[],a=e.trim().split(eT),l="";for(let e=a.length-1;e>=0;e-=1){let t=a[e],{isExternal:d,modifiers:h,hasImportantModifier:u,baseClassName:c,maybePostfixModifierPosition:p}=i(t);if(d){l=t+(l.length>0?" "+l:l);continue}let m=!!p,f=n(m?c.substring(0,p):c);if(!f){if(!m||!(f=n(c))){l=t+(l.length>0?" "+l:l);continue}m=!1}let g=0===h.length?"":1===h.length?h[0]:r(h).join(":"),v=u?g+"!":g,w=v+f;if(s.indexOf(w)>-1)continue;s.push(w);let b=o(f,m);for(let e=0;e0?" "+l:l)}return l})(e,i);return o(e,r),r};return r=a=>{var l;let d;return n=(i={cache:(e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,i=Object.create(null),n=Object.create(null),o=(o,r)=>{i[o]=r,++t>e&&(t=0,n=i,i=Object.create(null))};return{get(e){let t=i[e];return void 0!==t?t:void 0!==(t=n[e])?(o(e,t),t):void 0},set(e,t){e in i?i[e]=t:o(e,t)}}})((l=t.reduce((e,t)=>t(e),e())).cacheSize),parseClassName:(e=>{let{prefix:t,experimentalParseClassName:i}=e,n=e=>{let t,i=[],n=0,o=0,r=0,s=e.length;for(let a=0;ar?t-r:void 0)};if(t){let e=t+":",i=n;n=t=>t.startsWith(e)?i(t.slice(e.length)):eL(ej,!1,t,void 0,!0)}if(i){let e=n;n=t=>i({className:t,parseClassName:e})}return n})(l),sortModifiers:(d=new Map,l.orderSensitiveModifiers.forEach((e,t)=>{d.set(e,1e6+t)}),e=>{let t=[],i=[];for(let n=0;n0&&(i.sort(),t.push(...i),i=[]),t.push(o)):i.push(o)}return i.length>0&&(i.sort(),t.push(...i)),t}),...(e=>{let t=(e=>{let{theme:t,classGroups:i}=e;return ek(i,t)})(e),{conflictingClassGroups:i,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]")){var i;let t,n,o;return -1===(i=e).slice(1,-1).indexOf(":")?void 0:(n=(t=i.slice(1,-1)).indexOf(":"),(o=t.slice(0,n))?"arbitrary.."+o:void 0)}let n=e.split("-"),o=+(""===n[0]&&n.length>1);return eA(n,o,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=n[e],o=i[e];if(t){if(o){let e=Array(o.length+t.length);for(let t=0;tr(((...e)=>{let t,i,n=0,o="";for(;n{let e=eW("color"),t=eW("font"),i=eW("text"),n=eW("font-weight"),o=eW("tracking"),r=eW("leading"),s=eW("breakpoint"),a=eW("container"),l=eW("spacing"),d=eW("radius"),h=eW("shadow"),u=eW("inset-shadow"),c=eW("text-shadow"),p=eW("drop-shadow"),m=eW("blur"),f=eW("perspective"),g=eW("aspect"),v=eW("ease"),w=eW("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],x=()=>[...y(),to,e8],_=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],C=()=>[to,e8,l],S=()=>[eX,"full","auto",...C()],E=()=>[eY,"none","subgrid",to,e8],A=()=>["auto",{span:["full",eY,to,e8]},eY,to,e8],k=()=>[eY,"auto",to,e8],P=()=>["auto","min","max","fr",to,e8],z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],O=()=>["start","end","center","stretch","center-safe","end-safe"],R=()=>["auto",...C()],N=()=>[eX,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],I=()=>[e,to,e8],M=()=>[...y(),ta,tt,{position:[to,e8]}],j=()=>["no-repeat",{repeat:["","x","y","space","round"]}],L=()=>["auto","cover","contain",tl,e9,{size:[to,e8]}],T=()=>[eQ,tr,e7],G=()=>["","none","full",d,to,e8],V=()=>["",eq,tr,e7],W=()=>["solid","dashed","dotted","double"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>[eq,eQ,ta,tt],B=()=>["","none",m,to,e8],$=()=>["none",eq,to,e8],U=()=>["none",eq,to,e8],K=()=>[eq,to,e8],J=()=>[eX,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[e0],breakpoint:[e0],color:[e1],container:[e0],"drop-shadow":[e0],ease:["in","out","in-out"],font:[e6],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[e0],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[e0],shadow:[e0],spacing:["px",eq],text:[e0],"text-shadow":[e0],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",eX,e8,to,g]}],container:["container"],columns:[{columns:[eq,e8,to,a]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:x()}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:S()}],"inset-x":[{"inset-x":S()}],"inset-y":[{"inset-y":S()}],start:[{start:S()}],end:[{end:S()}],top:[{top:S()}],right:[{right:S()}],bottom:[{bottom:S()}],left:[{left:S()}],visibility:["visible","invisible","collapse"],z:[{z:[eY,"auto",to,e8]}],basis:[{basis:[eX,"full","auto",a,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[eq,eX,"auto","initial","none",e8]}],grow:[{grow:["",eq,to,e8]}],shrink:[{shrink:["",eq,to,e8]}],order:[{order:[eY,"first","last","none",to,e8]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:A()}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:A()}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":P()}],"auto-rows":[{"auto-rows":P()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...z(),"normal"]}],"justify-items":[{"justify-items":[...O(),"normal"]}],"justify-self":[{"justify-self":["auto",...O()]}],"align-content":[{content:["normal",...z()]}],"align-items":[{items:[...O(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...O(),{baseline:["","last"]}]}],"place-content":[{"place-content":z()}],"place-items":[{"place-items":[...O(),"baseline"]}],"place-self":[{"place-self":["auto",...O()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:R()}],mx:[{mx:R()}],my:[{my:R()}],ms:[{ms:R()}],me:[{me:R()}],mt:[{mt:R()}],mr:[{mr:R()}],mb:[{mb:R()}],ml:[{ml:R()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:N()}],w:[{w:[a,"screen",...N()]}],"min-w":[{"min-w":[a,"screen","none",...N()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...N()]}],h:[{h:["screen","lh",...N()]}],"min-h":[{"min-h":["screen","lh","none",...N()]}],"max-h":[{"max-h":["screen","lh",...N()]}],"font-size":[{text:["base",i,tr,e7]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,to,te]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",eQ,e8]}],"font-family":[{font:[ts,e8,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,to,e8]}],"line-clamp":[{"line-clamp":[eq,"none",to,te]}],leading:[{leading:[r,...C()]}],"list-image":[{"list-image":["none",to,e8]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",to,e8]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:[eq,"from-font","auto",to,e7]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[eq,"auto",to,e8]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",to,e8]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",to,e8]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:j()}],"bg-size":[{bg:L()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},eY,to,e8],radial:["",to,e8],conic:[eY,to,e8]},td,ti]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:T()}],"gradient-via-pos":[{via:T()}],"gradient-to-pos":[{to:T()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"border-w":[{border:V()}],"border-w-x":[{"border-x":V()}],"border-w-y":[{"border-y":V()}],"border-w-s":[{"border-s":V()}],"border-w-e":[{"border-e":V()}],"border-w-t":[{"border-t":V()}],"border-w-r":[{"border-r":V()}],"border-w-b":[{"border-b":V()}],"border-w-l":[{"border-l":V()}],"divide-x":[{"divide-x":V()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":V()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...W(),"hidden","none"]}],"divide-style":[{divide:[...W(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...W(),"none","hidden"]}],"outline-offset":[{"outline-offset":[eq,to,e8]}],"outline-w":[{outline:["",eq,tr,e7]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",h,th,tn]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",u,th,tn]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[eq,e7]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":V()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",c,th,tn]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[eq,to,e8]}],"mix-blend":[{"mix-blend":[...H(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":H()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[eq]}],"mask-image-linear-from-pos":[{"mask-linear-from":F()}],"mask-image-linear-to-pos":[{"mask-linear-to":F()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":F()}],"mask-image-t-to-pos":[{"mask-t-to":F()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":F()}],"mask-image-r-to-pos":[{"mask-r-to":F()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":F()}],"mask-image-b-to-pos":[{"mask-b-to":F()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":F()}],"mask-image-l-to-pos":[{"mask-l-to":F()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":F()}],"mask-image-x-to-pos":[{"mask-x-to":F()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":F()}],"mask-image-y-to-pos":[{"mask-y-to":F()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[to,e8]}],"mask-image-radial-from-pos":[{"mask-radial-from":F()}],"mask-image-radial-to-pos":[{"mask-radial-to":F()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":y()}],"mask-image-conic-pos":[{"mask-conic":[eq]}],"mask-image-conic-from-pos":[{"mask-conic-from":F()}],"mask-image-conic-to-pos":[{"mask-conic-to":F()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:j()}],"mask-size":[{mask:L()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",to,e8]}],filter:[{filter:["","none",to,e8]}],blur:[{blur:B()}],brightness:[{brightness:[eq,to,e8]}],contrast:[{contrast:[eq,to,e8]}],"drop-shadow":[{"drop-shadow":["","none",p,th,tn]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",eq,to,e8]}],"hue-rotate":[{"hue-rotate":[eq,to,e8]}],invert:[{invert:["",eq,to,e8]}],saturate:[{saturate:[eq,to,e8]}],sepia:[{sepia:["",eq,to,e8]}],"backdrop-filter":[{"backdrop-filter":["","none",to,e8]}],"backdrop-blur":[{"backdrop-blur":B()}],"backdrop-brightness":[{"backdrop-brightness":[eq,to,e8]}],"backdrop-contrast":[{"backdrop-contrast":[eq,to,e8]}],"backdrop-grayscale":[{"backdrop-grayscale":["",eq,to,e8]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[eq,to,e8]}],"backdrop-invert":[{"backdrop-invert":["",eq,to,e8]}],"backdrop-opacity":[{"backdrop-opacity":[eq,to,e8]}],"backdrop-saturate":[{"backdrop-saturate":[eq,to,e8]}],"backdrop-sepia":[{"backdrop-sepia":["",eq,to,e8]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",to,e8]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[eq,"initial",to,e8]}],ease:[{ease:["linear","initial",v,to,e8]}],delay:[{delay:[eq,to,e8]}],animate:[{animate:["none",w,to,e8]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[f,to,e8]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:$()}],"rotate-x":[{"rotate-x":$()}],"rotate-y":[{"rotate-y":$()}],"rotate-z":[{"rotate-z":$()}],scale:[{scale:U()}],"scale-x":[{"scale-x":U()}],"scale-y":[{"scale-y":U()}],"scale-z":[{"scale-z":U()}],"scale-3d":["scale-3d"],skew:[{skew:K()}],"skew-x":[{"skew-x":K()}],"skew-y":[{"skew-y":K()}],transform:[{transform:[to,e8,"","none","gpu","cpu"]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:J()}],"translate-x":[{"translate-x":J()}],"translate-y":[{"translate-y":J()}],"translate-z":[{"translate-z":J()}],"translate-none":["translate-none"],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",to,e8]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",to,e8]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[eq,tr,e7,te]}],stroke:[{stroke:["none",...I()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function tx(...e){return ty(eC(e))}function t_({children:e,className:t}){return(0,W.jsx)("div",{className:tx("flex flex-col h-full bg-card overflow-hidden",t),children:e})}let tD=({className:e="w-5 h-5"})=>(0,W.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",className:e,children:[(0,W.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"1.5"}),(0,W.jsx)("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.6"}),(0,W.jsx)("circle",{cx:"12",cy:"12",r:"2",fill:"currentColor"})]}),tC=()=>(0,W.jsx)("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,W.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})});function tS(e){return e.width&&e.height&&e.height>0?e.width/e.height:1}function tE({samples:e,onLoadMore:t,hasMore:i}){let n=(0,H.useRef)(null),[o,r]=(0,H.useState)(0),{selectedIds:s,isLassoSelection:a,selectionSource:l,toggleSelection:d,addToSelection:h,setHoveredId:u,hoveredId:c,labelFilter:p}=eD();(0,H.useEffect)(()=>{let e=n.current;if(!e)return;let t=()=>{let t=e.clientWidth;t>0&&t!==o&&r(t)};t();let i=new ResizeObserver(()=>{requestAnimationFrame(t)});return i.observe(e),()=>i.disconnect()},[o]);let{boxes:m,containerHeight:f}=(0,H.useMemo)(()=>(function(e,t){if(0===e.length||t<=0)return{boxes:[],containerHeight:0};let i=e.map(tS),n=(0,er.default)(i,{containerWidth:t,containerPadding:0,boxSpacing:2,targetRowHeight:180,targetRowHeightTolerance:.25,showWidows:!0});return{boxes:n.boxes,containerHeight:n.containerHeight}})(e,o),[e,o]),g=(0,H.useMemo)(()=>(function(e){if(0===e.length)return[];let t=[],i=e[0].top,n=0,o=e[0].height;for(let r=1;r1?(t.push({startIndex:n,endIndex:r,top:i,height:o}),n=r,i=s.top,o=s.height):o=Math.max(o,s.height)}return t.push({startIndex:n,endIndex:e.length,top:i,height:o}),t})(m),[m]),v=function({useFlushSync:e=!0,...t}){let i=H.useReducer(()=>({}),{})[1],n={...t,onChange:(n,o)=>{var r;e&&o?(0,F.flushSync)(i):i(),null==(r=t.onChange)||r.call(t,n,o)}},[o]=H.useState(()=>new ei(n));return o.setOptions(n),eo(()=>o._didMount(),[]),eo(()=>o._willUpdate()),o}({observeElementRect:X,observeElementOffset:Q,scrollToFn:et,...{count:g.length,getScrollElement:()=>n.current,estimateSize:e=>g[e]?.height??180,overscan:3,getItemKey:t=>{let i=g[t];return i&&e.slice(i.startIndex,i.endIndex).map(e=>e.id).join("-")||`row-${t}`}}});(0,H.useEffect)(()=>{let e=n.current;if(!e||!t||!i)return;let o=()=>{let{scrollTop:i,scrollHeight:n,clientHeight:o}=e;n-i-o<500&&t()};return e.addEventListener("scroll",o),()=>e.removeEventListener("scroll",o)},[t,i]),(0,H.useEffect)(()=>{n.current?.scrollTo({top:0})},[p]),(0,H.useEffect)(()=>{if(!a&&"scatter"===l&&0!==s.size)try{v.scrollToIndex(0,{align:"start"})}catch{n.current?.scrollTo({top:0})}},[a,s,l,v]);let w=(0,H.useCallback)((t,i)=>{if(i.metaKey||i.ctrlKey)d(t.id);else if(i.shiftKey&&s.size>0){let i=Array.from(s),n=i[i.length-1],o=e.findIndex(e=>e.id===n),r=e.findIndex(e=>e.id===t.id);if(-1!==o&&-1!==r){let t=Math.min(o,r),i=Math.max(o,r);h(e.slice(t,i+1).map(e=>e.id))}}else{let e=new Set;e.add(t.id),eD.getState().setSelectedIds(e,"grid")}},[e,s,d,h]),b=v.getVirtualItems();return(0,W.jsx)(t_,{children:(0,W.jsx)("div",{className:"flex-1 min-h-0 overflow-hidden",children:(0,W.jsx)("div",{ref:n,className:"panel-scroll h-full min-h-0 overflow-auto",children:(0,W.jsx)("div",{style:{height:f||"100%",width:"100%",position:"relative"},children:b.map(t=>{let i=g[t.index];if(!i)return null;let n=e.slice(i.startIndex,i.endIndex),o=m.slice(i.startIndex,i.endIndex);return(0,W.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:i.height,transform:`translateY(${i.top}px)`},children:n.map((e,t)=>{let i=o[t];if(!i)return null;let n=!!a||s.has(e.id),r=c===e.id;return(0,W.jsxs)("div",{style:{position:"absolute",left:i.left,top:0,width:i.width,height:i.height},className:` + overflow-hidden cursor-pointer + transition-shadow duration-150 ease-out + ${n?"ring-2 ring-inset ring-primary":""} + ${r&&!n?"ring-2 ring-inset ring-primary/50":""} + `,onClick:t=>w(e,t),onMouseEnter:()=>u(e.id),onMouseLeave:()=>u(null),children:[e.thumbnail?(0,W.jsx)("img",{src:`data:image/jpeg;base64,${e.thumbnail}`,alt:e.filename,className:"w-full h-full object-cover",loading:"lazy"}):(0,W.jsx)("div",{className:"w-full h-full bg-muted flex items-center justify-center",children:(0,W.jsx)("span",{className:"text-muted-foreground text-xs",children:"No image"})}),e.label&&(0,W.jsx)("div",{className:"absolute bottom-0.5 left-0.5 right-0.5",children:(0,W.jsx)("span",{className:"inline-block px-1 py-0.5 text-[10px] leading-tight truncate max-w-full",style:{backgroundColor:"rgba(0,0,0,0.7)",color:"#fff"},children:e.label})}),n&&(0,W.jsx)("div",{className:"absolute top-0.5 right-0.5 w-4 h-4 rounded-full bg-primary flex items-center justify-center",children:(0,W.jsx)(tC,{})})]},e.id)})},t.key)})})})})})}let tA=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,i)=>i?i.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},tk=(...e)=>e.filter((e,t,i)=>!!e&&""!==e.trim()&&i.indexOf(e)===t).join(" ").trim();var tP={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let tz=(0,H.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:i=2,absoluteStrokeWidth:n,className:o="",children:r,iconNode:s,...a},l)=>(0,H.createElement)("svg",{ref:l,...tP,width:t,height:t,stroke:e,strokeWidth:n?24*Number(i)/Number(t):i,className:tk("lucide",o),...!r&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(a)&&{"aria-hidden":"true"},...a},[...s.map(([e,t])=>(0,H.createElement)(e,t)),...Array.isArray(r)?r:[r]])),tO=(e,t)=>{let i=(0,H.forwardRef)(({className:i,...n},o)=>(0,H.createElement)(tz,{ref:o,iconNode:t,className:tk(`lucide-${tA(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,i),...n}));return i.displayName=tA(e),i},tR=tO("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);function tN(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function tI(...e){return t=>{let i=!1,n=e.map(e=>{let n=tN(e,t);return i||"function"!=typeof n||(i=!0),n});if(i)return()=>{for(let t=0;t{let{children:i,...n}=e;if(tT(i)&&"function"==typeof tL&&(i=tL(i._payload)),H.isValidElement(i)){var o;let e,r,s=(o=i,(r=(e=Object.getOwnPropertyDescriptor(o.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?o.ref:(r=(e=Object.getOwnPropertyDescriptor(o,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?o.props.ref:o.props.ref||o.ref),a=function(e,t){let i={...t};for(let n in t){let o=e[n],r=t[n];/^on[A-Z]/.test(n)?o&&r?i[n]=(...e)=>{let t=r(...e);return o(...e),t}:o&&(i[n]=o):"style"===n?i[n]={...o,...r}:"className"===n&&(i[n]=[o,r].filter(Boolean).join(" "))}return{...e,...i}}(n,i.props);return i.type!==H.Fragment&&(a.ref=t?tI(t,s):s),H.cloneElement(i,a)}return H.Children.count(i)>1?H.Children.only(null):null})).displayName="Slot.SlotClone",t=g,(i=H.forwardRef((e,i)=>{let{children:n,...o}=e;tT(n)&&"function"==typeof tL&&(n=tL(n._payload));let r=H.Children.toArray(n),s=r.find(tW);if(s){let e=s.props.children,n=r.map(t=>t!==s?t:H.Children.count(e)>1?H.Children.only(null):H.isValidElement(e)?e.props.children:null);return(0,W.jsx)(t,{...o,ref:i,children:H.isValidElement(e)?H.cloneElement(e,void 0,n):null})}return(0,W.jsx)(t,{...o,ref:i,children:n})})).displayName="Slot.Slot",i),tV=Symbol("radix.slottable");function tW(e){return H.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===tV}let tH=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,tF=(n="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",o={variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}},e=>{var t;if((null==o?void 0:o.variants)==null)return eC(n,null==e?void 0:e.class,null==e?void 0:e.className);let{variants:i,defaultVariants:r}=o,s=Object.keys(i).map(t=>{let n=null==e?void 0:e[t],o=null==r?void 0:r[t];if(null===n)return null;let s=tH(n)||tH(o);return i[t][s]}),a=e&&Object.entries(e).reduce((e,t)=>{let[i,n]=t;return void 0===n||(e[i]=n),e},{});return eC(n,s,null==o||null==(t=o.compoundVariants)?void 0:t.reduce((e,t)=>{let{class:i,className:n,...o}=t;return Object.entries(o).every(e=>{let[t,i]=e;return Array.isArray(i)?i.includes({...r,...a}[t]):({...r,...a})[t]===i})?[...e,i,n]:e},[]),null==e?void 0:e.class,null==e?void 0:e.className)}),tB=H.forwardRef(({className:e,variant:t,size:i,asChild:n=!1,...o},r)=>(0,W.jsx)(n?tG:"button",{className:tx(tF({variant:t,size:i,className:e})),ref:r,...o}));function t$(e,t,{checkForDefaultPrevented:i=!0}={}){return function(n){if(e?.(n),!1===i||!n.defaultPrevented)return t?.(n)}}function tU(e,t=[]){let i=[],n=()=>{let t=i.map(e=>H.createContext(e));return function(i){let n=i?.[e]||t;return H.useMemo(()=>({[`__scope${e}`]:{...i,[e]:n}}),[i,n])}};return n.scopeName=e,[function(t,n){let o=H.createContext(n),r=i.length;i=[...i,n];let s=t=>{let{scope:i,children:n,...s}=t,a=i?.[e]?.[r]||o,l=H.useMemo(()=>s,Object.values(s));return(0,W.jsx)(a.Provider,{value:l,children:n})};return s.displayName=t+"Provider",[s,function(i,s){let a=s?.[e]?.[r]||o,l=H.useContext(a);if(l)return l;if(void 0!==n)return n;throw Error(`\`${i}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let i=()=>{let i=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let n=i.reduce((t,{useScope:i,scopeName:n})=>{let o=i(e)[`__scope${n}`];return{...t,...o}},{});return H.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return i.scopeName=t.scopeName,i}(n,...t)]}tB.displayName="Button","u">typeof window&&window.document&&window.document.createElement;var tK=globalThis?.document?H.useLayoutEffect:()=>{};H[" useEffectEvent ".trim().toString()],H[" useInsertionEffect ".trim().toString()];var tJ=H[" useInsertionEffect ".trim().toString()]||tK;function tZ({prop:e,defaultProp:t,onChange:i=()=>{},caller:n}){let[o,r,s]=function({defaultProp:e,onChange:t}){let[i,n]=H.useState(e),o=H.useRef(i),r=H.useRef(t);return tJ(()=>{r.current=t},[t]),H.useEffect(()=>{o.current!==i&&(r.current?.(i),o.current=i)},[i,o]),[i,n,r]}({defaultProp:t,onChange:i}),a=void 0!==e,l=a?e:o;{let t=H.useRef(void 0!==e);H.useEffect(()=>{let e=t.current;if(e!==a){let t=a?"controlled":"uncontrolled";console.warn(`${n} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=a},[a,n])}return[l,H.useCallback(t=>{if(a){let i="function"==typeof t?t(e):t;i!==e&&s.current?.(i)}else r(t)},[a,e,r,s])]}Symbol("RADIX:SYNC_STATE");var tX=Symbol("radix.slottable");function tq(e){return H.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===tX}var tY=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{var i,n;let o,r,s,a=(n=i=`Primitive.${t}`,(o=H.forwardRef((e,t)=>{let{children:i,...n}=e;if(H.isValidElement(i)){var o;let e,r,s=(o=i,(r=(e=Object.getOwnPropertyDescriptor(o.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?o.ref:(r=(e=Object.getOwnPropertyDescriptor(o,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?o.props.ref:o.props.ref||o.ref),a=function(e,t){let i={...t};for(let n in t){let o=e[n],r=t[n];/^on[A-Z]/.test(n)?o&&r?i[n]=(...e)=>{let t=r(...e);return o(...e),t}:o&&(i[n]=o):"style"===n?i[n]={...o,...r}:"className"===n&&(i[n]=[o,r].filter(Boolean).join(" "))}return{...e,...i}}(n,i.props);return i.type!==H.Fragment&&(a.ref=t?tI(t,s):s),H.cloneElement(i,a)}return H.Children.count(i)>1?H.Children.only(null):null})).displayName=`${n}.SlotClone`,r=o,(s=H.forwardRef((e,t)=>{let{children:i,...n}=e,o=H.Children.toArray(i),s=o.find(tq);if(s){let e=s.props.children,i=o.map(t=>t!==s?t:H.Children.count(e)>1?H.Children.only(null):H.isValidElement(e)?e.props.children:null);return(0,W.jsx)(r,{...n,ref:t,children:H.isValidElement(e)?H.cloneElement(e,void 0,i):null})}return(0,W.jsx)(r,{...n,ref:t,children:i})})).displayName=`${i}.Slot`,s),l=H.forwardRef((e,i)=>{let{asChild:n,...o}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,W.jsx)(n?a:t,{...o,ref:i})});return l.displayName=`Primitive.${t}`,{...e,[t]:l}},{});function tQ(e,t){e&&F.flushSync(()=>e.dispatchEvent(t))}function t0(e){var t;let i,n=(t=e,(i=H.forwardRef((e,t)=>{let{children:i,...n}=e;if(H.isValidElement(i)){var o;let e,r,s=(o=i,(r=(e=Object.getOwnPropertyDescriptor(o.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?o.ref:(r=(e=Object.getOwnPropertyDescriptor(o,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?o.props.ref:o.props.ref||o.ref),a=function(e,t){let i={...t};for(let n in t){let o=e[n],r=t[n];/^on[A-Z]/.test(n)?o&&r?i[n]=(...e)=>{let t=r(...e);return o(...e),t}:o&&(i[n]=o):"style"===n?i[n]={...o,...r}:"className"===n&&(i[n]=[o,r].filter(Boolean).join(" "))}return{...e,...i}}(n,i.props);return i.type!==H.Fragment&&(a.ref=t?tI(t,s):s),H.cloneElement(i,a)}return H.Children.count(i)>1?H.Children.only(null):null})).displayName=`${t}.SlotClone`,i),o=H.forwardRef((e,t)=>{let{children:i,...o}=e,r=H.Children.toArray(i),s=r.find(t2);if(s){let e=s.props.children,i=r.map(t=>t!==s?t:H.Children.count(e)>1?H.Children.only(null):H.isValidElement(e)?e.props.children:null);return(0,W.jsx)(n,{...o,ref:t,children:H.isValidElement(e)?H.cloneElement(e,void 0,i):null})}return(0,W.jsx)(n,{...o,ref:t,children:i})});return o.displayName=`${e}.Slot`,o}var t1=Symbol("radix.slottable");function t2(e){return H.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===t1}function t3(e){let t=e+"CollectionProvider",[i,n]=tU(t),[o,r]=i(t,{collectionRef:{current:null},itemMap:new Map}),s=e=>{let{scope:t,children:i}=e,n=H.default.useRef(null),r=H.default.useRef(new Map).current;return(0,W.jsx)(o,{scope:t,itemMap:r,collectionRef:n,children:i})};s.displayName=t;let a=e+"CollectionSlot",l=t0(a),d=H.default.forwardRef((e,t)=>{let{scope:i,children:n}=e,o=tM(t,r(a,i).collectionRef);return(0,W.jsx)(l,{ref:o,children:n})});d.displayName=a;let h=e+"CollectionItemSlot",u="data-radix-collection-item",c=t0(h),p=H.default.forwardRef((e,t)=>{let{scope:i,children:n,...o}=e,s=H.default.useRef(null),a=tM(t,s),l=r(h,i);return H.default.useEffect(()=>(l.itemMap.set(s,{ref:s,...o}),()=>void l.itemMap.delete(s))),(0,W.jsx)(c,{...{[u]:""},ref:a,children:n})});return p.displayName=h,[{Provider:s,Slot:d,ItemSlot:p},function(t){let i=r(e+"CollectionConsumer",t);return H.default.useCallback(()=>{let e=i.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${u}]`));return Array.from(i.itemMap.values()).sort((e,i)=>t.indexOf(e.ref.current)-t.indexOf(i.ref.current))},[i.collectionRef,i.itemMap])},n]}var t5=new WeakMap;function t4(e,t){var i,n;let o,r,s;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let a=(i=e,n=t,o=i.length,(s=(r=t6(n))>=0?r:o+r)<0||s>=o?-1:s);return -1===a?void 0:e[a]}function t6(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],t5.set(this,!0)}set(e,t){return t5.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,i){let n,o=this.has(t),r=this.#e.length,s=t6(e),a=s>=0?s:r+s,l=a<0||a>=r?-1:a;if(l===this.size||o&&l===this.size-1||-1===l)return this.set(t,i),this;let d=this.size+ +!o;s<0&&a++;let h=[...this.#e],u=!1;for(let e=a;e=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,t){let i=this.indexOf(e);if(-1===i)return;let n=i+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,t){let i=0;for(let n of this){if(Reflect.apply(e,t,[n,i,this]))return n;i++}}findIndex(e,t){let i=0;for(let n of this){if(Reflect.apply(e,t,[n,i,this]))return i;i++}return -1}filter(t,i){let n=[],o=0;for(let e of this)Reflect.apply(t,i,[e,o,this])&&n.push(e),o++;return new e(n)}map(t,i){let n=[],o=0;for(let e of this)n.push([e[0],Reflect.apply(t,i,[e,o,this])]),o++;return new e(n)}reduce(...e){let[t,i]=e,n=0,o=i??this.at(0);for(let i of this)o=0===n&&1===e.length?i:Reflect.apply(t,this,[o,i,n,this]),n++;return o}reduceRight(...e){let[t,i]=e,n=i??this.at(-1);for(let i=this.size-1;i>=0;i--){let o=this.at(i);n=i===this.size-1&&1===e.length?o:Reflect.apply(t,this,[n,o,i,this])}return n}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let i=this.keyAt(e),n=this.get(i);t.set(i,n)}return t}toSpliced(...t){let i=[...this.entries()];return i.splice(...t),new e(i)}slice(t,i){let n=new e,o=this.size-1;if(void 0===t)return n;t<0&&(t+=this.size),void 0!==i&&i>0&&(o=i-1);for(let e=t;e<=o;e++){let t=this.keyAt(e),i=this.get(t);n.set(t,i)}return n}every(e,t){let i=0;for(let n of this){if(!Reflect.apply(e,t,[n,i,this]))return!1;i++}return!0}some(e,t){let i=0;for(let n of this){if(Reflect.apply(e,t,[n,i,this]))return!0;i++}return!1}});var t9=H.createContext(void 0);function t8(e){let t=H.useContext(t9);return e||t||"ltr"}function t7(e){let t=H.useRef(e);return H.useEffect(()=>{t.current=e}),H.useMemo(()=>(...e)=>t.current?.(...e),[])}var ie="dismissableLayer.update",it=H.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ii=H.forwardRef((e,t)=>{let{disableOutsidePointerEvents:i=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:r,onInteractOutside:s,onDismiss:a,...l}=e,d=H.useContext(it),[h,u]=H.useState(null),c=h?.ownerDocument??globalThis?.document,[,p]=H.useState({}),m=tM(t,e=>u(e)),f=Array.from(d.layers),[g]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),v=f.indexOf(g),w=h?f.indexOf(h):-1,b=d.layersWithOutsidePointerEventsDisabled.size>0,y=w>=v,x=function(e,t=globalThis?.document){let i=t7(e),n=H.useRef(!1),o=H.useRef(()=>{});return H.useEffect(()=>{let e=e=>{if(e.target&&!n.current){let n=function(){ir("dismissableLayer.pointerDownOutside",i,r,{discrete:!0})},r={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=n,t.addEventListener("click",o.current,{once:!0})):n()}else t.removeEventListener("click",o.current);n.current=!1},r=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(r),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}},[t,i]),{onPointerDownCapture:()=>n.current=!0}}(e=>{let t=e.target,i=[...d.branches].some(e=>e.contains(t));y&&!i&&(o?.(e),s?.(e),e.defaultPrevented||a?.())},c),_=function(e,t=globalThis?.document){let i=t7(e),n=H.useRef(!1);return H.useEffect(()=>{let e=e=>{e.target&&!n.current&&ir("dismissableLayer.focusOutside",i,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,i]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}(e=>{let t=e.target;![...d.branches].some(e=>e.contains(t))&&(r?.(e),s?.(e),e.defaultPrevented||a?.())},c);return!function(e,t=globalThis?.document){let i=t7(e);H.useEffect(()=>{let e=e=>{"Escape"===e.key&&i(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[i,t])}(e=>{w===d.layers.size-1&&(n?.(e),!e.defaultPrevented&&a&&(e.preventDefault(),a()))},c),H.useEffect(()=>{if(h)return i&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(N=c.body.style.pointerEvents,c.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(h)),d.layers.add(h),io(),()=>{i&&1===d.layersWithOutsidePointerEventsDisabled.size&&(c.body.style.pointerEvents=N)}},[h,c,i,d]),H.useEffect(()=>()=>{h&&(d.layers.delete(h),d.layersWithOutsidePointerEventsDisabled.delete(h),io())},[h,d]),H.useEffect(()=>{let e=()=>p({});return document.addEventListener(ie,e),()=>document.removeEventListener(ie,e)},[]),(0,W.jsx)(tY.div,{...l,ref:m,style:{pointerEvents:b?y?"auto":"none":void 0,...e.style},onFocusCapture:t$(e.onFocusCapture,_.onFocusCapture),onBlurCapture:t$(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:t$(e.onPointerDownCapture,x.onPointerDownCapture)})});function io(){let e=new CustomEvent(ie);document.dispatchEvent(e)}function ir(e,t,i,{discrete:n}){let o=i.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:i});t&&o.addEventListener(e,t,{once:!0}),n?tQ(o,r):o.dispatchEvent(r)}ii.displayName="DismissableLayer",H.forwardRef((e,t)=>{let i=H.useContext(it),n=H.useRef(null),o=tM(t,n);return H.useEffect(()=>{let e=n.current;if(e)return i.branches.add(e),()=>{i.branches.delete(e)}},[i.branches]),(0,W.jsx)(tY.div,{...e,ref:o})}).displayName="DismissableLayerBranch";var is=0;function ia(){H.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??il()),document.body.insertAdjacentElement("beforeend",e[1]??il()),is++,()=>{1===is&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),is--}},[])}function il(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var id="focusScope.autoFocusOnMount",ih="focusScope.autoFocusOnUnmount",iu={bubbles:!1,cancelable:!0},ic=H.forwardRef((e,t)=>{let{loop:i=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:r,...s}=e,[a,l]=H.useState(null),d=t7(o),h=t7(r),u=H.useRef(null),c=tM(t,e=>l(e)),p=H.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;H.useEffect(()=>{if(n){let e=function(e){if(p.paused||!a)return;let t=e.target;a.contains(t)?u.current=t:ig(u.current,{select:!0})},t=function(e){if(p.paused||!a)return;let t=e.relatedTarget;null!==t&&(a.contains(t)||ig(u.current,{select:!0}))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let i=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&ig(a)});return a&&i.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),i.disconnect()}}},[n,a,p.paused]),H.useEffect(()=>{if(a){iv.add(p);let e=document.activeElement;if(!a.contains(e)){let t=new CustomEvent(id,iu);a.addEventListener(id,d),a.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){let i=document.activeElement;for(let n of e)if(ig(n,{select:t}),document.activeElement!==i)return}(ip(a).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&ig(a))}return()=>{a.removeEventListener(id,d),setTimeout(()=>{let t=new CustomEvent(ih,iu);a.addEventListener(ih,h),a.dispatchEvent(t),t.defaultPrevented||ig(e??document.body,{select:!0}),a.removeEventListener(ih,h),iv.remove(p)},0)}}},[a,d,h,p]);let m=H.useCallback(e=>{if(!i&&!n||p.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){var r;let t,n=e.currentTarget,[s,a]=[im(t=ip(r=n),r),im(t.reverse(),r)];s&&a?e.shiftKey||o!==a?e.shiftKey&&o===s&&(e.preventDefault(),i&&ig(a,{select:!0})):(e.preventDefault(),i&&ig(s,{select:!0})):o===n&&e.preventDefault()}},[i,n,p.paused]);return(0,W.jsx)(tY.div,{tabIndex:-1,...s,ref:c,onKeyDown:m})});function ip(e){let t=[],i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;i.nextNode();)t.push(i.currentNode);return t}function im(e,t){for(let i of e)if(!function(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(i,{upTo:t}))return i}function ig(e,{select:t=!1}={}){if(e&&e.focus){var i;let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&(i=e)instanceof HTMLInputElement&&"select"in i&&t&&e.select()}}ic.displayName="FocusScope";var iv=(v=[],{add(e){let t=v[0];e!==t&&t?.pause(),(v=iw(v,e)).unshift(e)},remove(e){v=iw(v,e),v[0]?.resume()}});function iw(e,t){let i=[...e],n=i.indexOf(t);return -1!==n&&i.splice(n,1),i}var ib=H[" useId ".trim().toString()]||(()=>void 0),iy=0;function ix(e){let[t,i]=H.useState(ib());return tK(()=>{e||i(e=>e??String(iy++))},[e]),e||(t?`radix-${t}`:"")}let i_=["top","right","bottom","left"],iD=Math.min,iC=Math.max,iS=Math.round,iE=Math.floor,iA=e=>({x:e,y:e}),ik={left:"right",right:"left",bottom:"top",top:"bottom"},iP={start:"end",end:"start"};function iz(e,t){return"function"==typeof e?e(t):e}function iO(e){return e.split("-")[0]}function iR(e){return e.split("-")[1]}function iN(e){return"x"===e?"y":"x"}function iI(e){return"y"===e?"height":"width"}let iM=new Set(["top","bottom"]);function ij(e){return iM.has(iO(e))?"y":"x"}function iL(e){return e.replace(/start|end/g,e=>iP[e])}let iT=["left","right"],iG=["right","left"],iV=["top","bottom"],iW=["bottom","top"];function iH(e){return e.replace(/left|right|bottom|top/g,e=>ik[e])}function iF(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function iB(e){let{x:t,y:i,width:n,height:o}=e;return{width:n,height:o,top:i,left:t,right:t+n,bottom:i+o,x:t,y:i}}function i$(e,t,i){let n,{reference:o,floating:r}=e,s=ij(t),a=iN(ij(t)),l=iI(a),d=iO(t),h="y"===s,u=o.x+o.width/2-r.width/2,c=o.y+o.height/2-r.height/2,p=o[l]/2-r[l]/2;switch(d){case"top":n={x:u,y:o.y-r.height};break;case"bottom":n={x:u,y:o.y+o.height};break;case"right":n={x:o.x+o.width,y:c};break;case"left":n={x:o.x-r.width,y:c};break;default:n={x:o.x,y:o.y}}switch(iR(t)){case"start":n[a]-=p*(i&&h?-1:1);break;case"end":n[a]+=p*(i&&h?-1:1)}return n}async function iU(e,t){var i;void 0===t&&(t={});let{x:n,y:o,platform:r,rects:s,elements:a,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:u="floating",altBoundary:c=!1,padding:p=0}=iz(t,e),m=iF(p),f=a[c?"floating"===u?"reference":"floating":u],g=iB(await r.getClippingRect({element:null==(i=await (null==r.isElement?void 0:r.isElement(f)))||i?f:f.contextElement||await (null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:d,rootBoundary:h,strategy:l})),v="floating"===u?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await (null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),b=await (null==r.isElement?void 0:r.isElement(w))&&await (null==r.getScale?void 0:r.getScale(w))||{x:1,y:1},y=iB(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:w,strategy:l}):v);return{top:(g.top-y.top+m.top)/b.y,bottom:(y.bottom-g.bottom+m.bottom)/b.y,left:(g.left-y.left+m.left)/b.x,right:(y.right-g.right+m.right)/b.x}}let iK=async(e,t,i)=>{let{placement:n="bottom",strategy:o="absolute",middleware:r=[],platform:s}=i,a=r.filter(Boolean),l=await (null==s.isRTL?void 0:s.isRTL(t)),d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:h,y:u}=i$(d,n,l),c=n,p={},m=0;for(let i=0;ie[t]>=0)}let iX=new Set(["left","top"]);async function iq(e,t){let{placement:i,platform:n,elements:o}=e,r=await (null==n.isRTL?void 0:n.isRTL(o.floating)),s=iO(i),a=iR(i),l="y"===ij(i),d=iX.has(s)?-1:1,h=r&&l?-1:1,u=iz(t,e),{mainAxis:c,crossAxis:p,alignmentAxis:m}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&"number"==typeof m&&(p="end"===a?-1*m:m),l?{x:p*h,y:c*d}:{x:c*d,y:p*h}}function iY(){return"u">typeof window}function iQ(e){return i2(e)?(e.nodeName||"").toLowerCase():"#document"}function i0(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function i1(e){var t;return null==(t=(i2(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function i2(e){return!!iY()&&(e instanceof Node||e instanceof i0(e).Node)}function i3(e){return!!iY()&&(e instanceof Element||e instanceof i0(e).Element)}function i5(e){return!!iY()&&(e instanceof HTMLElement||e instanceof i0(e).HTMLElement)}function i4(e){return!(!iY()||"u"{try{return e.matches(t)}catch(e){return!1}})}let nt=["transform","translate","scale","rotate","perspective"],ni=["transform","translate","scale","rotate","perspective","filter"],nn=["paint","layout","strict","content"];function no(e){let t=nr(),i=i3(e)?nl(e):e;return nt.some(e=>!!i[e]&&"none"!==i[e])||!!i.containerType&&"normal"!==i.containerType||!t&&!!i.backdropFilter&&"none"!==i.backdropFilter||!t&&!!i.filter&&"none"!==i.filter||ni.some(e=>(i.willChange||"").includes(e))||nn.some(e=>(i.contain||"").includes(e))}function nr(){return!("u"i3(e)&&"body"!==iQ(e)),o=null,r="fixed"===nl(e).position,s=r?nh(e):e;for(;i3(s)&&!na(s);){let t=nl(s),i=no(s);i||"fixed"!==t.position||(o=null),(r?!i&&!o:!i&&"static"===t.position&&!!o&&nx.has(o.position)||i9(s)&&!i&&function e(t,i){let n=nh(t);return!(n===i||!i3(n)||na(n))&&("fixed"===nl(n).position||e(n,i))}(e,s))?n=n.filter(e=>e!==s):o=t,s=nh(s)}return t.set(e,n),n}(t,this._c):[].concat(i),n],s=r[0],a=r.reduce((e,i)=>{let n=n_(t,i,o);return e.top=iC(n.top,e.top),e.right=iD(n.right,e.right),e.bottom=iD(n.bottom,e.bottom),e.left=iC(n.left,e.left),e},n_(t,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:nS,getElementRects:nE,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:i}=np(e);return{width:t,height:i}},getScale:nf,isElement:i3,isRTL:function(e){return"rtl"===nl(e).direction}};function nk(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let nP=e=>({name:"arrow",options:e,async fn(t){let{x:i,y:n,placement:o,rects:r,platform:s,elements:a,middlewareData:l}=t,{element:d,padding:h=0}=iz(e,t)||{};if(null==d)return{};let u=iF(h),c={x:i,y:n},p=iN(ij(o)),m=iI(p),f=await s.getDimensions(d),g="y"===p,v=g?"clientHeight":"clientWidth",w=r.reference[m]+r.reference[p]-c[p]-r.floating[m],b=c[p]-r.reference[p],y=await (null==s.getOffsetParent?void 0:s.getOffsetParent(d)),x=y?y[v]:0;x&&await (null==s.isElement?void 0:s.isElement(y))||(x=a.floating[v]||r.floating[m]);let _=x/2-f[m]/2-1,D=iD(u[g?"top":"left"],_),C=iD(u[g?"bottom":"right"],_),S=x-f[m]-C,E=x/2-f[m]/2+(w/2-b/2),A=iC(D,iD(E,S)),k=!l.arrow&&null!=iR(o)&&E!==A&&r.reference[m]/2-(Etypeof document?H.useLayoutEffect:function(){};function nO(e,t){let i,n,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((i=e.length)!==t.length)return!1;for(n=i;0!=n--;)if(!nO(e[n],t[n]))return!1;return!0}if((i=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(n=i;0!=n--;)if(!({}).hasOwnProperty.call(t,o[n]))return!1;for(n=i;0!=n--;){let i=o[n];if(("_owner"!==i||!e.$$typeof)&&!nO(e[i],t[i]))return!1}return!0}return e!=e&&t!=t}function nR(e){return"u"{t.current=e}),t}var nM=H.forwardRef((e,t)=>{let{children:i,width:n=10,height:o=5,...r}=e;return(0,W.jsx)(tY.svg,{...r,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?i:(0,W.jsx)("polygon",{points:"0,0 30,0 15,10"})})});nM.displayName="Arrow";var nj="Popper",[nL,nT]=tU(nj),[nG,nV]=nL(nj),nW=e=>{let{__scopePopper:t,children:i}=e,[n,o]=H.useState(null);return(0,W.jsx)(nG,{scope:t,anchor:n,onAnchorChange:o,children:i})};nW.displayName=nj;var nH="PopperAnchor",nF=H.forwardRef((e,t)=>{let{__scopePopper:i,virtualRef:n,...o}=e,r=nV(nH,i),s=H.useRef(null),a=tM(t,s),l=H.useRef(null);return H.useEffect(()=>{let e=l.current;l.current=n?.current||s.current,e!==l.current&&r.onAnchorChange(l.current)}),n?null:(0,W.jsx)(tY.div,{...o,ref:a})});nF.displayName=nH;var nB="PopperContent",[n$,nU]=nL(nB),nK=H.forwardRef((e,t)=>{var i,n,o,r,s,a,l,d,h,u,c,p,m,f,g,v,w,b,y,x,_;let{__scopePopper:D,side:C="bottom",sideOffset:S=0,align:E="center",alignOffset:A=0,arrowPadding:k=0,avoidCollisions:P=!0,collisionBoundary:z=[],collisionPadding:O=0,sticky:R="partial",hideWhenDetached:N=!1,updatePositionStrategy:I="optimized",onPlaced:M,...j}=e,L=nV(nB,D),[T,G]=H.useState(null),V=tM(t,e=>G(e)),[B,$]=H.useState(null),U=function(e){let[t,i]=H.useState(void 0);return tK(()=>{if(e){i({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let n,o;if(!Array.isArray(t)||!t.length)return;let r=t[0];if("borderBoxSize"in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;n=t.inlineSize,o=t.blockSize}else n=e.offsetWidth,o=e.offsetHeight;i({width:n,height:o})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}i(void 0)},[e]),t}(B),K=U?.width??0,J=U?.height??0,Z="number"==typeof O?O:{top:0,right:0,bottom:0,left:0,...O},X=Array.isArray(z)?z:[z],q=X.length>0,Y={padding:Z,boundary:X.filter(nq),altBoundary:q},{refs:Q,floatingStyles:ee,placement:et,isPositioned:ei,middlewareData:en}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:i="absolute",middleware:n=[],platform:o,elements:{reference:r,floating:s}={},transform:a=!0,whileElementsMounted:l,open:d}=e,[h,u]=H.useState({x:0,y:0,strategy:i,placement:t,middlewareData:{},isPositioned:!1}),[c,p]=H.useState(n);nO(c,n)||p(n);let[m,f]=H.useState(null),[g,v]=H.useState(null),w=H.useCallback(e=>{e!==_.current&&(_.current=e,f(e))},[]),b=H.useCallback(e=>{e!==D.current&&(D.current=e,v(e))},[]),y=r||m,x=s||g,_=H.useRef(null),D=H.useRef(null),C=H.useRef(h),S=null!=l,E=nI(l),A=nI(o),k=nI(d),P=H.useCallback(()=>{var e,n;let o,r,s;if(!_.current||!D.current)return;let a={placement:t,strategy:i,middleware:c};A.current&&(a.platform=A.current),(e=_.current,n=D.current,o=new Map,s={...(r={platform:nA,...a}).platform,_c:o},iK(e,n,{...r,platform:s})).then(e=>{let t={...e,isPositioned:!1!==k.current};z.current&&!nO(C.current,t)&&(C.current=t,F.flushSync(()=>{u(t)}))})},[c,t,i,A,k]);nz(()=>{!1===d&&C.current.isPositioned&&(C.current.isPositioned=!1,u(e=>({...e,isPositioned:!1})))},[d]);let z=H.useRef(!1);nz(()=>(z.current=!0,()=>{z.current=!1}),[]),nz(()=>{if(y&&(_.current=y),x&&(D.current=x),y&&x){if(E.current)return E.current(y,x,P);P()}},[y,x,P,E,S]);let O=H.useMemo(()=>({reference:_,floating:D,setReference:w,setFloating:b}),[w,b]),R=H.useMemo(()=>({reference:y,floating:x}),[y,x]),N=H.useMemo(()=>{let e={position:i,left:0,top:0};if(!R.floating)return e;let t=nN(R.floating,h.x),n=nN(R.floating,h.y);return a?{...e,transform:"translate("+t+"px, "+n+"px)",...nR(R.floating)>=1.5&&{willChange:"transform"}}:{position:i,left:t,top:n}},[i,a,R.floating,h.x,h.y]);return H.useMemo(()=>({...h,update:P,refs:O,elements:R,floatingStyles:N}),[h,P,O,R,N])}({strategy:"fixed",placement:C+("center"!==E?"-"+E:""),whileElementsMounted:(...e)=>(function(e,t,i,n){let o;void 0===n&&(n={});let{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:d=!1}=n,h=nm(e),u=r||s?[...h?nu(h):[],...nu(t)]:[];u.forEach(e=>{r&&e.addEventListener("scroll",i,{passive:!0}),s&&e.addEventListener("resize",i)});let c=h&&l?function(e,t){let i,n=null,o=i1(e);function r(){var e;clearTimeout(i),null==(e=n)||e.disconnect(),n=null}return!function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),r();let d=e.getBoundingClientRect(),{left:h,top:u,width:c,height:p}=d;if(a||t(),!c||!p)return;let m={rootMargin:-iE(u)+"px "+-iE(o.clientWidth-(h+c))+"px "+-iE(o.clientHeight-(u+p))+"px "+-iE(h)+"px",threshold:iC(0,iD(1,l))||1},f=!0;function g(t){let n=t[0].intersectionRatio;if(n!==l){if(!f)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==n||nk(d,e.getBoundingClientRect())||s(),f=!1}try{n=new IntersectionObserver(g,{...m,root:o.ownerDocument})}catch(e){n=new IntersectionObserver(g,m)}n.observe(e)}(!0),r}(h,i):null,p=-1,m=null;a&&(m=new ResizeObserver(e=>{let[n]=e;n&&n.target===h&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),i()}),h&&!d&&m.observe(h),m.observe(t));let f=d?nw(e):null;return d&&function t(){let n=nw(e);f&&!nk(f,n)&&i(),f=n,o=requestAnimationFrame(t)}(),i(),()=>{var e;u.forEach(e=>{r&&e.removeEventListener("scroll",i),s&&e.removeEventListener("resize",i)}),null==c||c(),null==(e=m)||e.disconnect(),m=null,d&&cancelAnimationFrame(o)}})(...e,{animationFrame:"always"===I}),elements:{reference:L.anchor},middleware:[{...{name:"offset",options:o=i={mainAxis:S+J,alignmentAxis:A},async fn(e){var t,i;let{x:n,y:r,placement:s,middlewareData:a}=e,l=await iq(e,o);return s===(null==(t=a.offset)?void 0:t.placement)&&null!=(i=a.arrow)&&i.alignmentOffset?{}:{x:n+l.x,y:r+l.y,data:{...l,placement:s}}}},options:[i,n]},P&&{...{name:"shift",options:h=l={mainAxis:!0,crossAxis:!1,limiter:"partial"===R?{...(void 0===(a=r)&&(a={}),{options:a,fn(e){let{x:t,y:i,placement:n,rects:o,middlewareData:r}=e,{offset:s=0,mainAxis:l=!0,crossAxis:d=!0}=iz(a,e),h={x:t,y:i},u=ij(n),c=iN(u),p=h[c],m=h[u],f=iz(s,e),g="number"==typeof f?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(l){let e="y"===c?"height":"width",t=o.reference[c]-o.floating[e]+g.mainAxis,i=o.reference[c]+o.reference[e]-g.mainAxis;pi&&(p=i)}if(d){var v,w;let e="y"===c?"width":"height",t=iX.has(iO(n)),i=o.reference[u]-o.floating[e]+(t&&(null==(v=r.offset)?void 0:v[u])||0)+(t?0:g.crossAxis),s=o.reference[u]+o.reference[e]+(t?0:(null==(w=r.offset)?void 0:w[u])||0)-(t?g.crossAxis:0);ms&&(m=s)}return{[c]:p,[u]:m}}}),options:[r,s]}:void 0,...Y},async fn(e){let{x:t,y:i,placement:n,platform:o}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:i}=e;return{x:t,y:i}}},...l}=iz(h,e),d={x:t,y:i},u=await o.detectOverflow(e,l),c=ij(iO(n)),p=iN(c),m=d[p],f=d[c];if(r){let e="y"===p?"top":"left",t="y"===p?"bottom":"right",i=m+u[e],n=m-u[t];m=iC(i,iD(m,n))}if(s){let e="y"===c?"top":"left",t="y"===c?"bottom":"right",i=f+u[e],n=f-u[t];f=iC(i,iD(f,n))}let g=a.fn({...e,[p]:m,[c]:f});return{...g,data:{x:g.x-t,y:g.y-i,enabled:{[p]:r,[c]:s}}}}},options:[l,d]},P&&{...{name:"flip",options:p=u={...Y},async fn(e){var t,i,n,o,r,s,a,l;let d,h,u,{placement:c,middlewareData:m,rects:f,initialPlacement:g,platform:v,elements:w}=e,{mainAxis:b=!0,crossAxis:y=!0,fallbackPlacements:x,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:D="none",flipAlignment:C=!0,...S}=iz(p,e);if(null!=(t=m.arrow)&&t.alignmentOffset)return{};let E=iO(c),A=ij(g),k=iO(g)===g,P=await (null==v.isRTL?void 0:v.isRTL(w.floating)),z=x||(k||!C?[iH(g)]:(d=iH(g),[iL(g),d,iL(d)])),O="none"!==D;!x&&O&&z.push(...(h=iR(g),u=function(e,t,i){switch(e){case"top":case"bottom":if(i)return t?iG:iT;return t?iT:iG;case"left":case"right":return t?iV:iW;default:return[]}}(iO(g),"start"===D,P),h&&(u=u.map(e=>e+"-"+h),C&&(u=u.concat(u.map(iL)))),u));let R=[g,...z],N=await v.detectOverflow(e,S),I=[],M=(null==(i=m.flip)?void 0:i.overflows)||[];if(b&&I.push(N[E]),y){let e,t,i,n,o=(s=c,a=f,void 0===(l=P)&&(l=!1),e=iR(s),i=iI(t=iN(ij(s))),n="x"===t?e===(l?"end":"start")?"right":"left":"start"===e?"bottom":"top",a.reference[i]>a.floating[i]&&(n=iH(n)),[n,iH(n)]);I.push(N[o[0]],N[o[1]])}if(M=[...M,{placement:c,overflows:I}],!I.every(e=>e<=0)){let e=((null==(n=m.flip)?void 0:n.index)||0)+1,t=R[e];if(t&&("alignment"!==y||A===ij(t)||M.every(e=>ij(e.placement)!==A||e.overflows[0]>0)))return{data:{index:e,overflows:M},reset:{placement:t}};let i=null==(o=M.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!i)switch(_){case"bestFit":{let e=null==(r=M.filter(e=>{if(O){let t=ij(e.placement);return t===A||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:r[0];e&&(i=e);break}case"initialPlacement":i=g}if(c!==i)return{reset:{placement:i}}}return{}}},options:[u,c]},{...{name:"size",options:g=m={...Y,apply:({elements:e,rects:t,availableWidth:i,availableHeight:n})=>{let{width:o,height:r}=t.reference,s=e.floating.style;s.setProperty("--radix-popper-available-width",`${i}px`),s.setProperty("--radix-popper-available-height",`${n}px`),s.setProperty("--radix-popper-anchor-width",`${o}px`),s.setProperty("--radix-popper-anchor-height",`${r}px`)}},async fn(e){var t,i;let n,o,{placement:r,rects:s,platform:a,elements:l}=e,{apply:d=()=>{},...h}=iz(g,e),u=await a.detectOverflow(e,h),c=iO(r),p=iR(r),m="y"===ij(r),{width:f,height:v}=s.floating;"top"===c||"bottom"===c?(n=c,o=p===(await (null==a.isRTL?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(o=c,n="end"===p?"top":"bottom");let w=v-u.top-u.bottom,b=f-u.left-u.right,y=iD(v-u[n],w),x=iD(f-u[o],b),_=!e.middlewareData.shift,D=y,C=x;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(C=b),null!=(i=e.middlewareData.shift)&&i.enabled.y&&(D=w),_&&!p){let e=iC(u.left,0),t=iC(u.right,0),i=iC(u.top,0),n=iC(u.bottom,0);m?C=f-2*(0!==e||0!==t?e+t:iC(u.left,u.right)):D=v-2*(0!==i||0!==n?i+n:iC(u.top,u.bottom))}await d({...e,availableWidth:C,availableHeight:D});let S=await a.getDimensions(l.floating);return f!==S.width||v!==S.height?{reset:{rects:!0}}:{}}},options:[m,f]},B&&{...{name:"arrow",options:b=v={element:B,padding:k},fn(e){let{element:t,padding:i}="function"==typeof b?b(e):b;return t&&({}).hasOwnProperty.call(t,"current")?null!=t.current?nP({element:t.current,padding:i}).fn(e):{}:t?nP({element:t,padding:i}).fn(e):{}}},options:[v,w]},nY({arrowWidth:K,arrowHeight:J}),N&&{...{name:"hide",options:_=y={strategy:"referenceHidden",...Y},async fn(e){let{rects:t,platform:i}=e,{strategy:n="referenceHidden",...o}=iz(_,e);switch(n){case"referenceHidden":{let n=iJ(await i.detectOverflow(e,{...o,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:n,referenceHidden:iZ(n)}}}case"escaped":{let n=iJ(await i.detectOverflow(e,{...o,altBoundary:!0}),t.floating);return{data:{escapedOffsets:n,escaped:iZ(n)}}}default:return{}}}},options:[y,x]}]}),[eo,er]=nQ(et),es=t7(M);tK(()=>{ei&&es?.()},[ei,es]);let ea=en.arrow?.x,el=en.arrow?.y,ed=en.arrow?.centerOffset!==0,[eh,eu]=H.useState();return tK(()=>{T&&eu(window.getComputedStyle(T).zIndex)},[T]),(0,W.jsx)("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:ei?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:eh,"--radix-popper-transform-origin":[en.transformOrigin?.x,en.transformOrigin?.y].join(" "),...en.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,W.jsx)(n$,{scope:D,placedSide:eo,onArrowChange:$,arrowX:ea,arrowY:el,shouldHideArrow:ed,children:(0,W.jsx)(tY.div,{"data-side":eo,"data-align":er,...j,ref:V,style:{...j.style,animation:ei?void 0:"none"}})})})});nK.displayName=nB;var nJ="PopperArrow",nZ={top:"bottom",right:"left",bottom:"top",left:"right"},nX=H.forwardRef(function(e,t){let{__scopePopper:i,...n}=e,o=nU(nJ,i),r=nZ[o.placedSide];return(0,W.jsx)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[r]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:(0,W.jsx)(nM,{...n,ref:t,style:{...n.style,display:"block"}})})});function nq(e){return null!==e}nX.displayName=nJ;var nY=e=>({name:"transformOrigin",options:e,fn(t){let{placement:i,rects:n,middlewareData:o}=t,r=o.arrow?.centerOffset!==0,s=r?0:e.arrowWidth,a=r?0:e.arrowHeight,[l,d]=nQ(i),h={start:"0%",center:"50%",end:"100%"}[d],u=(o.arrow?.x??0)+s/2,c=(o.arrow?.y??0)+a/2,p="",m="";return"bottom"===l?(p=r?h:`${u}px`,m=`${-a}px`):"top"===l?(p=r?h:`${u}px`,m=`${n.floating.height+a}px`):"right"===l?(p=`${-a}px`,m=r?h:`${c}px`):"left"===l&&(p=`${n.floating.width+a}px`,m=r?h:`${c}px`),{data:{x:p,y:m}}}});function nQ(e){let[t,i="center"]=e.split("-");return[t,i]}var n0=H.forwardRef((e,t)=>{let{container:i,...n}=e,[o,r]=H.useState(!1);tK(()=>r(!0),[]);let s=i||o&&globalThis?.document?.body;return s?F.default.createPortal((0,W.jsx)(tY.div,{...n,ref:t}),s):null});n0.displayName="Portal";var n1=e=>{var t;let i,n,{present:o,children:r}=e,s=function(e){var t,i;let[n,o]=H.useState(),r=H.useRef(null),s=H.useRef(e),a=H.useRef("none"),[l,d]=(t=e?"mounted":"unmounted",i={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},H.useReducer((e,t)=>i[e][t]??e,t));return H.useEffect(()=>{let e=n2(r.current);a.current="mounted"===l?e:"none"},[l]),tK(()=>{let t=r.current,i=s.current;if(i!==e){let n=a.current,o=n2(t);e?d("MOUNT"):"none"===o||t?.display==="none"?d("UNMOUNT"):i&&n!==o?d("ANIMATION_OUT"):d("UNMOUNT"),s.current=e}},[e,d]),tK(()=>{if(n){let e,t=n.ownerDocument.defaultView??window,i=i=>{let o=n2(r.current).includes(CSS.escape(i.animationName));if(i.target===n&&o&&(d("ANIMATION_END"),!s.current)){let i=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=i)})}},o=e=>{e.target===n&&(a.current=n2(r.current))};return n.addEventListener("animationstart",o),n.addEventListener("animationcancel",i),n.addEventListener("animationend",i),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",o),n.removeEventListener("animationcancel",i),n.removeEventListener("animationend",i)}}d("ANIMATION_END")},[n,d]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:H.useCallback(e=>{r.current=e?getComputedStyle(e):null,o(e)},[])}}(o),a="function"==typeof r?r({present:s.isPresent}):H.Children.only(r),l=tM(s.ref,(t=a,(n=(i=Object.getOwnPropertyDescriptor(t.props,"ref")?.get)&&"isReactWarning"in i&&i.isReactWarning)?t.ref:(n=(i=Object.getOwnPropertyDescriptor(t,"ref")?.get)&&"isReactWarning"in i&&i.isReactWarning)?t.props.ref:t.props.ref||t.ref));return"function"==typeof r||s.isPresent?H.cloneElement(a,{ref:l}):null};function n2(e){return e?.animationName||"none"}n1.displayName="Presence";var n3="rovingFocusGroup.onEntryFocus",n5={bubbles:!1,cancelable:!0},n4="RovingFocusGroup",[n6,n9,n8]=t3(n4),[n7,oe]=tU(n4,[n8]),[ot,oi]=n7(n4),on=H.forwardRef((e,t)=>(0,W.jsx)(n6.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,W.jsx)(n6.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,W.jsx)(oo,{...e,ref:t})})}));on.displayName=n4;var oo=H.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:i,orientation:n,loop:o=!1,dir:r,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:d,preventScrollOnEntryFocus:h=!1,...u}=e,c=H.useRef(null),p=tM(t,c),m=t8(r),[f,g]=tZ({prop:s,defaultProp:a??null,onChange:l,caller:n4}),[v,w]=H.useState(!1),b=t7(d),y=n9(i),x=H.useRef(!1),[_,D]=H.useState(0);return H.useEffect(()=>{let e=c.current;if(e)return e.addEventListener(n3,b),()=>e.removeEventListener(n3,b)},[b]),(0,W.jsx)(ot,{scope:i,orientation:n,dir:m,loop:o,currentTabStopId:f,onItemFocus:H.useCallback(e=>g(e),[g]),onItemShiftTab:H.useCallback(()=>w(!0),[]),onFocusableItemAdd:H.useCallback(()=>D(e=>e+1),[]),onFocusableItemRemove:H.useCallback(()=>D(e=>e-1),[]),children:(0,W.jsx)(tY.div,{tabIndex:v||0===_?-1:0,"data-orientation":n,...u,ref:p,style:{outline:"none",...e.style},onMouseDown:t$(e.onMouseDown,()=>{x.current=!0}),onFocus:t$(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!v){let t=new CustomEvent(n3,n5);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=y().filter(e=>e.focusable);ol([e.find(e=>e.active),e.find(e=>e.id===f),...e].filter(Boolean).map(e=>e.ref.current),h)}}x.current=!1}),onBlur:t$(e.onBlur,()=>w(!1))})})}),or="RovingFocusGroupItem",os=H.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:i,focusable:n=!0,active:o=!1,tabStopId:r,children:s,...a}=e,l=ix(),d=r||l,h=oi(or,i),u=h.currentTabStopId===d,c=n9(i),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:f}=h;return H.useEffect(()=>{if(n)return p(),()=>m()},[n,p,m]),(0,W.jsx)(n6.ItemSlot,{scope:i,id:d,focusable:n,active:o,children:(0,W.jsx)(tY.span,{tabIndex:u?0:-1,"data-orientation":h.orientation,...a,ref:t,onMouseDown:t$(e.onMouseDown,e=>{n?h.onItemFocus(d):e.preventDefault()}),onFocus:t$(e.onFocus,()=>h.onItemFocus(d)),onKeyDown:t$(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void h.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,i){var n;let o=(n=e.key,"rtl"!==i?n:"ArrowLeft"===n?"ArrowRight":"ArrowRight"===n?"ArrowLeft":n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(o))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(o)))return oa[o]}(e,h.orientation,h.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=c().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)o.reverse();else if("prev"===t||"next"===t){var i,n;"prev"===t&&o.reverse();let r=o.indexOf(e.currentTarget);o=h.loop?(i=o,n=r+1,i.map((e,t)=>i[(n+t)%i.length])):o.slice(r+1)}setTimeout(()=>ol(o))}}),children:"function"==typeof s?s({isCurrentTabStop:u,hasTabStop:null!=f}):s})})});os.displayName=or;var oa={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ol(e,t=!1){let i=document.activeElement;for(let n of e)if(n===i||(n.focus({preventScroll:t}),document.activeElement!==i))return}var od=Symbol("radix.slottable");function oh(e){return H.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===od}var ou=new WeakMap,oc=new WeakMap,op={},om=0,of=function(e){return e&&(e.host||of(e.parentNode))},og=function(e,t,i,n){var o=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var i=of(e);return i&&t.contains(i)?i:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});op[i]||(op[i]=new WeakMap);var r=op[i],s=[],a=new Set,l=new Set(o),d=function(e){!e||a.has(e)||(a.add(e),d(e.parentNode))};o.forEach(d);var h=function(e){!e||l.has(e)||Array.prototype.forEach.call(e.children,function(e){if(a.has(e))h(e);else try{var t=e.getAttribute(n),o=null!==t&&"false"!==t,l=(ou.get(e)||0)+1,d=(r.get(e)||0)+1;ou.set(e,l),r.set(e,d),s.push(e),1===l&&o&&oc.set(e,!0),1===d&&e.setAttribute(i,"true"),o||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return h(t),a.clear(),om++,function(){s.forEach(function(e){var t=ou.get(e)-1,o=r.get(e)-1;ou.set(e,t),r.set(e,o),t||(oc.has(e)||e.removeAttribute(n),oc.delete(e)),o||e.removeAttribute(i)}),--om||(ou=new WeakMap,ou=new WeakMap,oc=new WeakMap,op={})}},ov=function(e,t,i){void 0===i&&(i="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||("u"t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]]);return i}var oy=("function"==typeof SuppressedError&&SuppressedError,"right-scroll-bar-position"),ox="width-before-scroll-bar";function o_(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var oD="u">typeof window?H.useLayoutEffect:H.useEffect,oC=new WeakMap,oS=(void 0===x&&(x={}),(void 0===_&&(_=function(e){return e}),D=[],C=!1,S={read:function(){if(C)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return D.length?D[D.length-1]:null},useMedium:function(e){var t=_(e,C);return D.push(t),function(){D=D.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(C=!0;D.length;){var t=D;D=[],t.forEach(e)}D={push:function(t){return e(t)},filter:function(){return D}}},assignMedium:function(e){C=!0;var t=[];if(D.length){var i=D;D=[],i.forEach(e),t=D}var n=function(){var i=t;t=[],i.forEach(e)},o=function(){return Promise.resolve().then(n)};o(),D={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),D}}}}).options=ow({async:!0,ssr:!1},x),S),oE=function(){},oA=H.forwardRef(function(e,t){var i,n,o,r,s=H.useRef(null),a=H.useState({onScrollCapture:oE,onWheelCapture:oE,onTouchMoveCapture:oE}),l=a[0],d=a[1],h=e.forwardProps,u=e.children,c=e.className,p=e.removeScrollBar,m=e.enabled,f=e.shards,g=e.sideCar,v=e.noRelative,w=e.noIsolation,b=e.inert,y=e.allowPinchZoom,x=e.as,_=e.gapMode,D=ob(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=(i=[s,t],n=function(e){return i.forEach(function(t){return o_(t,e)})},(o=(0,H.useState)(function(){return{value:null,callback:n,facade:{get current(){return o.value},set current(value){var e=o.value;e!==value&&(o.value=value,o.callback(value,e))}}}})[0]).callback=n,r=o.facade,oD(function(){var e=oC.get(r);if(e){var t=new Set(e),n=new Set(i),o=r.current;t.forEach(function(e){n.has(e)||o_(e,null)}),n.forEach(function(e){t.has(e)||o_(e,o)})}oC.set(r,i)},[i]),r),S=ow(ow({},D),l);return H.createElement(H.Fragment,null,m&&H.createElement(g,{sideCar:oS,removeScrollBar:p,shards:f,noRelative:v,noIsolation:w,inert:b,setCallbacks:d,allowPinchZoom:!!y,lockRef:s,gapMode:_}),h?H.cloneElement(H.Children.only(u),ow(ow({},S),{ref:C})):H.createElement(void 0===x?"div":x,ow({},S,{className:c,ref:C}),u))});oA.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},oA.classNames={fullWidth:ox,zeroRight:oy};var ok=function(e){var t=e.sideCar,i=ob(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw Error("Sidecar medium not found");return H.createElement(n,ow({},i))};ok.isSideCarExport=!0;var oP=function(){var e=0,t=null;return{add:function(i){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=I||("u">typeof __webpack_nonce__?__webpack_nonce__:void 0);return t&&e.setAttribute("nonce",t),e}())){var n,o;(n=t).styleSheet?n.styleSheet.cssText=i:n.appendChild(document.createTextNode(i)),o=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(o)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},oz=function(){var e=oP();return function(t,i){H.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&i])}},oO=function(){var e=oz();return function(t){return e(t.styles,t.dynamic),null}},oR={left:0,top:0,right:0,gap:0},oN=function(e){return parseInt(e||"",10)||0},oI=function(e){var t=window.getComputedStyle(document.body),i=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[oN(i),oN(n),oN(o)]},oM=function(e){if(void 0===e&&(e="margin"),"u"