@yoopta/themes-shadcn 6.0.0-beta.1 → 6.0.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion/elements/accordion-item-heading.d.ts.map +1 -1
- package/dist/accordion.js +1 -0
- package/dist/{withShadcnUI.d.ts → applyTheme.d.ts} +3 -3
- package/dist/applyTheme.d.ts.map +1 -0
- package/dist/blockquote.js +1 -0
- package/dist/callout/elements/callout.d.ts.map +1 -1
- package/dist/callout.js +13 -0
- package/dist/carousel.js +1 -0
- package/dist/chunks/Combination-ee85502b.js +1 -0
- package/dist/chunks/_tslib-35bb891d.js +1 -0
- package/dist/chunks/arrow-right-07affdbc.js +13 -0
- package/dist/chunks/button-ecb0aed1.js +1 -0
- package/dist/chunks/card-94325fef.js +1 -0
- package/dist/chunks/check-9adcfdfa.js +7 -0
- package/dist/chunks/chevron-down-abe5f871.js +7 -0
- package/dist/chunks/chevron-up-5b4801a9.js +7 -0
- package/dist/chunks/code-734dab76.js +7 -0
- package/dist/chunks/createLucideIcon-70ab5429.js +26 -0
- package/dist/chunks/dropdown-menu-b5845753.js +13 -0
- package/dist/chunks/external-link-956d49c0.js +7 -0
- package/dist/chunks/file-text-f268c203.js +7 -0
- package/dist/chunks/hover-card-4448c400.js +1 -0
- package/dist/chunks/index-056e5c06.js +1 -0
- package/dist/chunks/index-13505606.js +1 -0
- package/dist/chunks/index-325e2e09.js +1 -0
- package/dist/chunks/index-3b428d14.js +13 -0
- package/dist/chunks/index-70f4e709.js +1 -0
- package/dist/chunks/index-7725d7e0.js +1 -0
- package/dist/chunks/index-842a4484.js +1 -0
- package/dist/chunks/index-8dc6d938.js +1 -0
- package/dist/chunks/index-91a5b8d5.js +1 -0
- package/dist/chunks/index-aaeb33b0.js +1 -0
- package/dist/chunks/index-b273f426.js +1 -0
- package/dist/chunks/index-e9d6a4a8.js +7 -0
- package/dist/chunks/input-2708c7f4.js +1 -0
- package/dist/chunks/label-a0e6fde2.js +1 -0
- package/dist/chunks/language-select-d2235078.js +7 -0
- package/dist/chunks/play-ae8c52d2.js +7 -0
- package/dist/chunks/plus-0381140e.js +7 -0
- package/dist/chunks/popover-53c769ba.js +1 -0
- package/dist/chunks/scroll-area-f7cd99a3.js +1 -0
- package/dist/chunks/select-c547d76b.js +7 -0
- package/dist/chunks/separator-7be92037.js +1 -0
- package/dist/chunks/sparkles-c8608d1b.js +7 -0
- package/dist/chunks/style-inject.es-e87a8d02.js +1 -0
- package/dist/chunks/tabs-eeea28d9.js +1 -0
- package/dist/chunks/tooltip-bc45d963.js +7 -0
- package/dist/chunks/trash-2-8f855002.js +7 -0
- package/dist/chunks/upload-3b3687f2.js +13 -0
- package/dist/chunks/utils-de9c4c2b.js +1 -0
- package/dist/chunks/x-ec326bc0.js +7 -0
- package/dist/code/elements/code.d.ts.map +1 -1
- package/dist/code/elements/language-select.d.ts.map +1 -1
- package/dist/code-group/elements/code-group-content.d.ts.map +1 -1
- package/dist/code-group/elements/code-group-item-heading.d.ts.map +1 -1
- package/dist/code-group/elements/code-group-list.d.ts.map +1 -1
- package/dist/code-group.js +1 -0
- package/dist/code.js +1 -0
- package/dist/divider/elements/divider.d.ts.map +1 -1
- package/dist/divider.js +1 -0
- package/dist/embed/elements/embed/embed-element.d.ts +3 -0
- package/dist/embed/elements/embed/embed-element.d.ts.map +1 -0
- package/dist/embed/elements/embed/embed-inline-toolbar.d.ts +13 -0
- package/dist/embed/elements/embed/embed-inline-toolbar.d.ts.map +1 -0
- package/dist/embed/elements/embed/embed-placeholder.d.ts +11 -0
- package/dist/embed/elements/embed/embed-placeholder.d.ts.map +1 -0
- package/dist/embed/elements/embed/embed-render.d.ts +18 -0
- package/dist/embed/elements/embed/embed-render.d.ts.map +1 -0
- package/dist/embed/index.d.ts +6 -0
- package/dist/embed/index.d.ts.map +1 -0
- package/dist/embed/types.d.ts +3 -0
- package/dist/embed/types.d.ts.map +1 -0
- package/dist/embed.js +13 -0
- package/dist/file/elements/file/file-element.d.ts +3 -0
- package/dist/file/elements/file/file-element.d.ts.map +1 -0
- package/dist/file/elements/file/file-icons.d.ts +14 -0
- package/dist/file/elements/file/file-icons.d.ts.map +1 -0
- package/dist/file/elements/file/file-inline-toolbar.d.ts +12 -0
- package/dist/file/elements/file/file-inline-toolbar.d.ts.map +1 -0
- package/dist/file/elements/file/file-placeholder.d.ts +15 -0
- package/dist/file/elements/file/file-placeholder.d.ts.map +1 -0
- package/dist/file/elements/file/file-render.d.ts +14 -0
- package/dist/file/elements/file/file-render.d.ts.map +1 -0
- package/dist/file/index.d.ts +6 -0
- package/dist/file/index.d.ts.map +1 -0
- package/dist/file/types.d.ts +3 -0
- package/dist/file/types.d.ts.map +1 -0
- package/dist/file.js +13 -0
- package/dist/headings.js +1 -0
- package/dist/image/elements/image/image-placeholder.d.ts.map +1 -1
- package/dist/image/elements/image/image-render.d.ts +1 -1
- package/dist/image/elements/image/image-render.d.ts.map +1 -1
- package/dist/image.js +7 -0
- package/dist/index.d.ts +8 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -14
- package/dist/link/elements/link/link-element.d.ts.map +1 -1
- package/dist/link/elements/link/link-preview.d.ts.map +1 -1
- package/dist/link.js +7 -0
- package/dist/lists.js +1 -0
- package/dist/mention/elements/mention/mention-avatar.d.ts +10 -0
- package/dist/mention/elements/mention/mention-avatar.d.ts.map +1 -0
- package/dist/mention/elements/mention/mention-dropdown.d.ts +8 -0
- package/dist/mention/elements/mention/mention-dropdown.d.ts.map +1 -0
- package/dist/mention/elements/mention/mention-element.d.ts +3 -0
- package/dist/mention/elements/mention/mention-element.d.ts.map +1 -0
- package/dist/mention/elements/mention/mention-item.d.ts +11 -0
- package/dist/mention/elements/mention/mention-item.d.ts.map +1 -0
- package/dist/mention/index.d.ts +11 -0
- package/dist/mention/index.d.ts.map +1 -0
- package/dist/mention/types.d.ts +17 -0
- package/dist/mention/types.d.ts.map +1 -0
- package/dist/mention.js +13 -0
- package/dist/paragraph.js +1 -0
- package/dist/steps/elements/steps-container.d.ts.map +1 -1
- package/dist/steps/elements/steps-list-item.d.ts.map +1 -1
- package/dist/steps.js +1 -0
- package/dist/table/components/add-column-button.d.ts +1 -3
- package/dist/table/components/add-column-button.d.ts.map +1 -1
- package/dist/table/components/add-row-button.d.ts +1 -3
- package/dist/table/components/add-row-button.d.ts.map +1 -1
- package/dist/table/components/column-controls.d.ts +1 -5
- package/dist/table/components/column-controls.d.ts.map +1 -1
- package/dist/table/components/column-resize-handles.d.ts +6 -0
- package/dist/table/components/column-resize-handles.d.ts.map +1 -0
- package/dist/table/components/row-controls.d.ts +1 -5
- package/dist/table/components/row-controls.d.ts.map +1 -1
- package/dist/table/components/table-controls.d.ts.map +1 -1
- package/dist/table/elements/table-data-cell.d.ts.map +1 -1
- package/dist/table/elements/table.d.ts.map +1 -1
- package/dist/table-of-contents/elements/table-of-contents.d.ts +3 -0
- package/dist/table-of-contents/elements/table-of-contents.d.ts.map +1 -0
- package/dist/table-of-contents/index.d.ts +6 -0
- package/dist/table-of-contents/index.d.ts.map +1 -0
- package/dist/table-of-contents.js +1 -0
- package/dist/table.js +13 -0
- package/dist/tabs/elements/tabs-item-heading.d.ts.map +1 -1
- package/dist/tabs/elements/tabs-list.d.ts.map +1 -1
- package/dist/tabs.js +1 -0
- package/dist/ui/switch.d.ts +5 -0
- package/dist/ui/switch.d.ts.map +1 -0
- package/dist/video/elements/video/video-element.d.ts +3 -0
- package/dist/video/elements/video/video-element.d.ts.map +1 -0
- package/dist/video/elements/video/video-inline-toolbar-settings.d.ts +14 -0
- package/dist/video/elements/video/video-inline-toolbar-settings.d.ts.map +1 -0
- package/dist/video/elements/video/video-inline-toolbar.d.ts +14 -0
- package/dist/video/elements/video/video-inline-toolbar.d.ts.map +1 -0
- package/dist/video/elements/video/video-placeholder.d.ts +16 -0
- package/dist/video/elements/video/video-placeholder.d.ts.map +1 -0
- package/dist/video/elements/video/video-render.d.ts +18 -0
- package/dist/video/elements/video/video-render.d.ts.map +1 -0
- package/dist/video/index.d.ts +6 -0
- package/dist/video/index.d.ts.map +1 -0
- package/dist/video/types.d.ts +4 -0
- package/dist/video/types.d.ts.map +1 -0
- package/dist/video.js +7 -0
- package/package.json +172 -12
- package/dist/withShadcnUI.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as t from"react";import{useLayoutEffect as e}from"react";import{P as n,a as r,d as o,u as i,c as s}from"./index-8dc6d938.js";import{u as a}from"./index-91a5b8d5.js";import{u as l}from"./index-70f4e709.js";import{jsx as c}from"react/jsx-runtime";import*as f from"react-dom";import u from"react-dom";var d,p="dismissableLayer.update",h="dismissableLayer.pointerDownOutside",m="dismissableLayer.focusOutside",g=t.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),y=t.forwardRef((e,o)=>{const{disableOutsidePointerEvents:i=!1,onEscapeKeyDown:s,onPointerDownOutside:f,onFocusOutside:u,onInteractOutside:y,onDismiss:x,...b}=e,E=t.useContext(g),[R,P]=t.useState(null),A=R?.ownerDocument??globalThis?.document,[,S]=t.useState({}),C=a(o,t=>P(t)),L=Array.from(E.layers),[D]=[...E.layersWithOutsidePointerEventsDisabled].slice(-1),O=L.indexOf(D),T=R?L.indexOf(R):-1,k=E.layersWithOutsidePointerEventsDisabled.size>0,W=T>=O,F=function(e,n=globalThis?.document){const r=l(e),o=t.useRef(!1),i=t.useRef(()=>{});return t.useEffect(()=>{const t=t=>{if(t.target&&!o.current){let e=function(){v(h,r,o,{discrete:!0})};const o={originalEvent:t};"touch"===t.pointerType?(n.removeEventListener("click",i.current),i.current=e,n.addEventListener("click",i.current,{once:!0})):e()}else n.removeEventListener("click",i.current);o.current=!1},e=window.setTimeout(()=>{n.addEventListener("pointerdown",t)},0);return()=>{window.clearTimeout(e),n.removeEventListener("pointerdown",t),n.removeEventListener("click",i.current)}},[n,r]),{onPointerDownCapture:()=>o.current=!0}}(t=>{const e=t.target,n=[...E.branches].some(t=>t.contains(e));W&&!n&&(f?.(t),y?.(t),t.defaultPrevented||x?.())},A),H=function(e,n=globalThis?.document){const r=l(e),o=t.useRef(!1);return t.useEffect(()=>{const t=t=>{if(t.target&&!o.current){v(m,r,{originalEvent:t},{discrete:!1})}};return n.addEventListener("focusin",t),()=>n.removeEventListener("focusin",t)},[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(t=>{const e=t.target;[...E.branches].some(t=>t.contains(e))||(u?.(t),y?.(t),t.defaultPrevented||x?.())},A);return function(e,n=globalThis?.document){const r=l(e);t.useEffect(()=>{const t=t=>{"Escape"===t.key&&r(t)};return n.addEventListener("keydown",t,{capture:!0}),()=>n.removeEventListener("keydown",t,{capture:!0})},[r,n])}(t=>{T===E.layers.size-1&&(s?.(t),!t.defaultPrevented&&x&&(t.preventDefault(),x()))},A),t.useEffect(()=>{if(R)return i&&(0===E.layersWithOutsidePointerEventsDisabled.size&&(d=A.body.style.pointerEvents,A.body.style.pointerEvents="none"),E.layersWithOutsidePointerEventsDisabled.add(R)),E.layers.add(R),w(),()=>{i&&1===E.layersWithOutsidePointerEventsDisabled.size&&(A.body.style.pointerEvents=d)}},[R,A,i,E]),t.useEffect(()=>()=>{R&&(E.layers.delete(R),E.layersWithOutsidePointerEventsDisabled.delete(R),w())},[R,E]),t.useEffect(()=>{const t=()=>S({});return document.addEventListener(p,t),()=>document.removeEventListener(p,t)},[]),c(n.div,{...b,ref:C,style:{pointerEvents:k?W?"auto":"none":void 0,...e.style},onFocusCapture:r(e.onFocusCapture,H.onFocusCapture),onBlurCapture:r(e.onBlurCapture,H.onBlurCapture),onPointerDownCapture:r(e.onPointerDownCapture,F.onPointerDownCapture)})});y.displayName="DismissableLayer";function w(){const t=new CustomEvent(p);document.dispatchEvent(t)}function v(t,e,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?o(i,s):i.dispatchEvent(s)}t.forwardRef((e,r)=>{const o=t.useContext(g),i=t.useRef(null),s=a(r,i);return t.useEffect(()=>{const t=i.current;if(t)return o.branches.add(t),()=>{o.branches.delete(t)}},[o.branches]),c(n.div,{...e,ref:s})}).displayName="DismissableLayerBranch";const x=["top","right","bottom","left"],b=Math.min,E=Math.max,R=Math.round,P=Math.floor,A=t=>({x:t,y:t}),S={left:"right",right:"left",bottom:"top",top:"bottom"},C={start:"end",end:"start"};function L(t,e,n){return E(t,b(e,n))}function D(t,e){return"function"==typeof t?t(e):t}function O(t){return t.split("-")[0]}function T(t){return t.split("-")[1]}function k(t){return"x"===t?"y":"x"}function W(t){return"y"===t?"height":"width"}const F=new Set(["top","bottom"]);function H(t){return F.has(O(t))?"y":"x"}function B(t){return k(H(t))}function z(t){return t.replace(/start|end/g,t=>C[t])}const M=["left","right"],N=["right","left"],$=["top","bottom"],_=["bottom","top"];function j(t,e,n,r){const o=T(t);let i=function(t,e,n){switch(t){case"top":case"bottom":return n?e?N:M:e?M:N;case"left":case"right":return e?$:_;default:return[]}}(O(t),"start"===n,r);return o&&(i=i.map(t=>t+"-"+o),e&&(i=i.concat(i.map(z)))),i}function V(t){return t.replace(/left|right|bottom|top/g,t=>S[t])}function Y(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function I(t){const{x:e,y:n,width:r,height:o}=t;return{width:r,height:o,top:n,left:e,right:e+r,bottom:n+o,x:e,y:n}}function X(t,e,n){let{reference:r,floating:o}=t;const i=H(e),s=B(e),a=W(s),l=O(e),c="y"===i,f=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:f,y:r.y-o.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:u};break;case"left":p={x:r.x-o.width,y:u};break;default:p={x:r.x,y:r.y}}switch(T(e)){case"start":p[s]-=d*(n&&c?-1:1);break;case"end":p[s]+=d*(n&&c?-1:1)}return p}async function q(t,e){var n;void 0===e&&(e={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:d=!1,padding:p=0}=D(e,t),h=Y(p),m=a[d?"floating"===u?"reference":"floating":u],g=I(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:f,strategy:l})),y="floating"===u?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),v=await(null==i.isElement?void 0:i.isElement(w))&&await(null==i.getScale?void 0:i.getScale(w))||{x:1,y:1},x=I(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:w,strategy:l}):y);return{top:(g.top-x.top+h.top)/v.y,bottom:(x.bottom-g.bottom+h.bottom)/v.y,left:(g.left-x.left+h.left)/v.x,right:(x.right-g.right+h.right)/v.x}}function K(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function G(t){return x.some(e=>t[e]>=0)}function J(t){const e=b(...t.map(t=>t.left)),n=b(...t.map(t=>t.top));return{x:e,y:n,width:E(...t.map(t=>t.right))-e,height:E(...t.map(t=>t.bottom))-n}}const Q=new Set(["left","top"]);function U(){return"undefined"!=typeof window}function Z(t){return nt(t)?(t.nodeName||"").toLowerCase():"#document"}function tt(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function et(t){var e;return null==(e=(nt(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function nt(t){return!!U()&&(t instanceof Node||t instanceof tt(t).Node)}function rt(t){return!!U()&&(t instanceof Element||t instanceof tt(t).Element)}function ot(t){return!!U()&&(t instanceof HTMLElement||t instanceof tt(t).HTMLElement)}function it(t){return!(!U()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof tt(t).ShadowRoot)}const st=new Set(["inline","contents"]);function at(t){const{overflow:e,overflowX:n,overflowY:r,display:o}=vt(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!st.has(o)}const lt=new Set(["table","td","th"]);function ct(t){return lt.has(Z(t))}const ft=[":popover-open",":modal"];function ut(t){return ft.some(e=>{try{return t.matches(e)}catch(t){return!1}})}const dt=["transform","translate","scale","rotate","perspective"],pt=["transform","translate","scale","rotate","perspective","filter"],ht=["paint","layout","strict","content"];function mt(t){const e=gt(),n=rt(t)?vt(t):t;return dt.some(t=>!!n[t]&&"none"!==n[t])||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||pt.some(t=>(n.willChange||"").includes(t))||ht.some(t=>(n.contain||"").includes(t))}function gt(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const yt=new Set(["html","body","#document"]);function wt(t){return yt.has(Z(t))}function vt(t){return tt(t).getComputedStyle(t)}function xt(t){return rt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function bt(t){if("html"===Z(t))return t;const e=t.assignedSlot||t.parentNode||it(t)&&t.host||et(t);return it(e)?e.host:e}function Et(t){const e=bt(t);return wt(e)?t.ownerDocument?t.ownerDocument.body:t.body:ot(e)&&at(e)?e:Et(e)}function Rt(t,e,n){var r;void 0===e&&(e=[]),void 0===n&&(n=!0);const o=Et(t),i=o===(null==(r=t.ownerDocument)?void 0:r.body),s=tt(o);if(i){const t=Pt(s);return e.concat(s,s.visualViewport||[],at(o)?o:[],t&&n?Rt(t):[])}return e.concat(o,Rt(o,[],n))}function Pt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function At(t){const e=vt(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const o=ot(t),i=o?t.offsetWidth:n,s=o?t.offsetHeight:r,a=R(n)!==i||R(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function St(t){return rt(t)?t:t.contextElement}function Ct(t){const e=St(t);if(!ot(e))return A(1);const n=e.getBoundingClientRect(),{width:r,height:o,$:i}=At(e);let s=(i?R(n.width):n.width)/r,a=(i?R(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Lt=A(0);function Dt(t){const e=tt(t);return gt()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Lt}function Ot(t,e,n,r){void 0===e&&(e=!1),void 0===n&&(n=!1);const o=t.getBoundingClientRect(),i=St(t);let s=A(1);e&&(r?rt(r)&&(s=Ct(r)):s=Ct(t));const a=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==tt(t))&&e}(i,n,r)?Dt(i):A(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,f=o.width/s.x,u=o.height/s.y;if(i){const t=tt(i),e=r&&rt(r)?tt(r):r;let n=t,o=Pt(n);for(;o&&r&&e!==n;){const t=Ct(o),e=o.getBoundingClientRect(),r=vt(o),i=e.left+(o.clientLeft+parseFloat(r.paddingLeft))*t.x,s=e.top+(o.clientTop+parseFloat(r.paddingTop))*t.y;l*=t.x,c*=t.y,f*=t.x,u*=t.y,l+=i,c+=s,n=tt(o),o=Pt(n)}}return I({width:f,height:u,x:l,y:c})}function Tt(t,e){const n=xt(t).scrollLeft;return e?e.left+n:Ot(et(t)).left+n}function kt(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-Tt(t,n),y:n.top+e.scrollTop}}const Wt=new Set(["absolute","fixed"]);function Ft(t,e,n){let r;if("viewport"===e)r=function(t,e){const n=tt(t),r=et(t),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const t=gt();(!t||t&&"fixed"===e)&&(a=o.offsetLeft,l=o.offsetTop)}const c=Tt(r);if(c<=0){const t=r.ownerDocument,e=t.body,n=getComputedStyle(e),o="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,s=Math.abs(r.clientWidth-e.clientWidth-o);s<=25&&(i-=s)}else c<=25&&(i+=c);return{width:i,height:s,x:a,y:l}}(t,n);else if("document"===e)r=function(t){const e=et(t),n=xt(t),r=t.ownerDocument.body,o=E(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=E(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Tt(t);const a=-n.scrollTop;return"rtl"===vt(r).direction&&(s+=E(e.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}(et(t));else if(rt(e))r=function(t,e){const n=Ot(t,!0,"fixed"===e),r=n.top+t.clientTop,o=n.left+t.clientLeft,i=ot(t)?Ct(t):A(1);return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:o*i.x,y:r*i.y}}(e,n);else{const n=Dt(t);r={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return I(r)}function Ht(t,e){const n=bt(t);return!(n===e||!rt(n)||wt(n))&&("fixed"===vt(n).position||Ht(n,e))}function Bt(t,e,n){const r=ot(e),o=et(e),i="fixed"===n,s=Ot(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=A(0);function c(){l.x=Tt(o)}if(r||!r&&!i)if(("body"!==Z(e)||at(o))&&(a=xt(e)),r){const t=Ot(e,!0,i,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else o&&c();i&&!r&&o&&c();const f=!o||r||i?A(0):kt(o,a);return{x:s.left+a.scrollLeft-l.x-f.x,y:s.top+a.scrollTop-l.y-f.y,width:s.width,height:s.height}}function zt(t){return"static"===vt(t).position}function Mt(t,e){if(!ot(t)||"fixed"===vt(t).position)return null;if(e)return e(t);let n=t.offsetParent;return et(t)===n&&(n=n.ownerDocument.body),n}function Nt(t,e){const n=tt(t);if(ut(t))return n;if(!ot(t)){let e=bt(t);for(;e&&!wt(e);){if(rt(e)&&!zt(e))return e;e=bt(e)}return n}let r=Mt(t,e);for(;r&&ct(r)&&zt(r);)r=Mt(r,e);return r&&wt(r)&&zt(r)&&!mt(r)?n:r||function(t){let e=bt(t);for(;ot(e)&&!wt(e);){if(mt(e))return e;if(ut(e))return null;e=bt(e)}return null}(t)||n}const $t={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:r,strategy:o}=t;const i="fixed"===o,s=et(r),a=!!e&&ut(e.floating);if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=A(1);const f=A(0),u=ot(r);if((u||!u&&!i)&&(("body"!==Z(r)||at(s))&&(l=xt(r)),ot(r))){const t=Ot(r);c=Ct(r),f.x=t.x+r.clientLeft,f.y=t.y+r.clientTop}const d=!s||u||i?A(0):kt(s,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+f.x+d.x,y:n.y*c.y-l.scrollTop*c.y+f.y+d.y}},getDocumentElement:et,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:o}=t;const i=[..."clippingAncestors"===n?ut(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let r=Rt(t,[],!1).filter(t=>rt(t)&&"body"!==Z(t)),o=null;const i="fixed"===vt(t).position;let s=i?bt(t):t;for(;rt(s)&&!wt(s);){const e=vt(s),n=mt(s);n||"fixed"!==e.position||(o=null),(i?!n&&!o:!n&&"static"===e.position&&o&&Wt.has(o.position)||at(s)&&!n&&Ht(t,s))?r=r.filter(t=>t!==s):o=e,s=bt(s)}return e.set(t,r),r}(e,this._c):[].concat(n),r],s=i[0],a=i.reduce((t,n)=>{const r=Ft(e,n,o);return t.top=E(r.top,t.top),t.right=b(r.right,t.right),t.bottom=b(r.bottom,t.bottom),t.left=E(r.left,t.left),t},Ft(e,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Nt,getElementRects:async function(t){const e=this.getOffsetParent||Nt,n=this.getDimensions,r=await n(t.floating);return{reference:Bt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=At(t);return{width:e,height:n}},getScale:Ct,isElement:rt,isRTL:function(t){return"rtl"===vt(t).direction}};function _t(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function jt(t,e,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=St(t),f=o||i?[...c?Rt(c):[],...Rt(e)]:[];f.forEach(t=>{o&&t.addEventListener("scroll",n,{passive:!0}),i&&t.addEventListener("resize",n)});const u=c&&a?function(t,e){let n,r=null;const o=et(t);function i(){var t;clearTimeout(n),null==(t=r)||t.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const c=t.getBoundingClientRect(),{left:f,top:u,width:d,height:p}=c;if(a||e(),!d||!p)return;const h={rootMargin:-P(u)+"px "+-P(o.clientWidth-(f+d))+"px "+-P(o.clientHeight-(u+p))+"px "+-P(f)+"px",threshold:E(0,b(1,l))||1};let m=!0;function g(e){const r=e[0].intersectionRatio;if(r!==l){if(!m)return s();r?s(!1,r):n=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==r||_t(c,t.getBoundingClientRect())||s(),m=!1}try{r=new IntersectionObserver(g,{...h,root:o.ownerDocument})}catch(t){r=new IntersectionObserver(g,h)}r.observe(t)}(!0),i}(c,n):null;let d,p=-1,h=null;s&&(h=new ResizeObserver(t=>{let[r]=t;r&&r.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var t;null==(t=h)||t.observe(e)})),n()}),c&&!l&&h.observe(c),h.observe(e));let m=l?Ot(t):null;return l&&function e(){const r=Ot(t);m&&!_t(m,r)&&n();m=r,d=requestAnimationFrame(e)}(),n(),()=>{var t;f.forEach(t=>{o&&t.removeEventListener("scroll",n),i&&t.removeEventListener("resize",n)}),null==u||u(),null==(t=h)||t.disconnect(),h=null,l&&cancelAnimationFrame(d)}}const Vt=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=e,l=await async function(t,e){const{placement:n,platform:r,elements:o}=t,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=O(n),a=T(n),l="y"===H(n),c=Q.has(s)?-1:1,f=i&&l?-1:1,u=D(e,t);let{mainAxis:d,crossAxis:p,alignmentAxis:h}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&"number"==typeof h&&(p="end"===a?-1*h:h),l?{x:p*f,y:d*c}:{x:d*c,y:p*f}}(e,t);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},Yt=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:o}=e,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...l}=D(t,e),c={x:n,y:r},f=await q(e,l),u=H(O(o)),d=k(u);let p=c[d],h=c[u];if(i){const t="y"===d?"bottom":"right";p=L(p+f["y"===d?"top":"left"],p,p-f[t])}if(s){const t="y"===u?"bottom":"right";h=L(h+f["y"===u?"top":"left"],h,h-f[t])}const m=a.fn({...e,[d]:p,[u]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[d]:i,[u]:s}}}}}},It=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=D(t,e);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=O(o),w=H(a),v=O(a)===a,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),b=d||(v||!m?[V(a)]:function(t){const e=V(t);return[z(t),e,z(e)]}(a)),E="none"!==h;!d&&E&&b.push(...j(a,m,h,x));const R=[a,...b],P=await q(e,g),A=[];let S=(null==(r=i.flip)?void 0:r.overflows)||[];if(f&&A.push(P[y]),u){const t=function(t,e,n){void 0===n&&(n=!1);const r=T(t),o=B(t),i=W(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=V(s)),[s,V(s)]}(o,s,x);A.push(P[t[0]],P[t[1]])}if(S=[...S,{placement:o,overflows:A}],!A.every(t=>t<=0)){var C,L;const t=((null==(C=i.flip)?void 0:C.index)||0)+1,e=R[t];if(e){if(!("alignment"===u&&w!==H(e))||S.every(t=>H(t.placement)!==w||t.overflows[0]>0))return{data:{index:t,overflows:S},reset:{placement:e}}}let n=null==(L=S.filter(t=>t.overflows[0]<=0).sort((t,e)=>t.overflows[1]-e.overflows[1])[0])?void 0:L.placement;if(!n)switch(p){case"bestFit":{var k;const t=null==(k=S.filter(t=>{if(E){const e=H(t.placement);return e===w||"y"===e}return!0}).map(t=>[t.placement,t.overflows.filter(t=>t>0).reduce((t,e)=>t+e,0)]).sort((t,e)=>t[1]-e[1])[0])?void 0:k[0];t&&(n=t);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},Xt=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:o,rects:i,platform:s,elements:a}=e,{apply:l=()=>{},...c}=D(t,e),f=await q(e,c),u=O(o),d=T(o),p="y"===H(o),{width:h,height:m}=i.floating;let g,y;"top"===u||"bottom"===u?(g=u,y=d===(await(null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=u,g="end"===d?"top":"bottom");const w=m-f.top-f.bottom,v=h-f.left-f.right,x=b(m-f[g],w),R=b(h-f[y],v),P=!e.middlewareData.shift;let A=x,S=R;if(null!=(n=e.middlewareData.shift)&&n.enabled.x&&(S=v),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(A=w),P&&!d){const t=E(f.left,0),e=E(f.right,0),n=E(f.top,0),r=E(f.bottom,0);p?S=h-2*(0!==t||0!==e?t+e:E(f.left,f.right)):A=m-2*(0!==n||0!==r?n+r:E(f.top,f.bottom))}await l({...e,availableWidth:S,availableHeight:A});const C=await s.getDimensions(a.floating);return h!==C.width||m!==C.height?{reset:{rects:!0}}:{}}}},qt=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...o}=D(t,e);switch(r){case"referenceHidden":{const t=K(await q(e,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:G(t)}}}case"escaped":{const t=K(await q(e,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:t,escaped:G(t)}}}default:return{}}}}},Kt=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=e,{element:c,padding:f=0}=D(t,e)||{};if(null==c)return{};const u=Y(f),d={x:n,y:r},p=B(o),h=W(p),m=await s.getDimensions(c),g="y"===p,y=g?"top":"left",w=g?"bottom":"right",v=g?"clientHeight":"clientWidth",x=i.reference[h]+i.reference[p]-d[p]-i.floating[h],E=d[p]-i.reference[p],R=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let P=R?R[v]:0;P&&await(null==s.isElement?void 0:s.isElement(R))||(P=a.floating[v]||i.floating[h]);const A=x/2-E/2,S=P/2-m[h]/2-1,C=b(u[y],S),O=b(u[w],S),k=C,F=P-m[h]-O,H=P/2-m[h]/2+A,z=L(k,H,F),M=!l.arrow&&null!=T(o)&&H!==z&&i.reference[h]/2-(H<k?C:O)-m[h]/2<0,N=M?H<k?H-k:H-F:0;return{[p]:d[p]+N,data:{[p]:z,centerOffset:H-z-N,...M&&{alignmentOffset:N}},reset:M}}}),Gt=function(t){return void 0===t&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:r,rects:o,platform:i,strategy:s}=e,{padding:a=2,x:l,y:c}=D(t,e),f=Array.from(await(null==i.getClientRects?void 0:i.getClientRects(r.reference))||[]),u=function(t){const e=t.slice().sort((t,e)=>t.y-e.y),n=[];let r=null;for(let t=0;t<e.length;t++){const o=e[t];!r||o.y-r.y>r.height/2?n.push([o]):n[n.length-1].push(o),r=o}return n.map(t=>I(J(t)))}(f),d=I(J(f)),p=Y(a);const h=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===u.length&&u[0].left>u[1].right&&null!=l&&null!=c)return u.find(t=>l>t.left-p.left&&l<t.right+p.right&&c>t.top-p.top&&c<t.bottom+p.bottom)||d;if(u.length>=2){if("y"===H(n)){const t=u[0],e=u[u.length-1],r="top"===O(n),o=t.top,i=e.bottom,s=r?t.left:e.left,a=r?t.right:e.right;return{top:o,bottom:i,left:s,right:a,width:a-s,height:i-o,x:s,y:o}}const t="left"===O(n),e=E(...u.map(t=>t.right)),r=b(...u.map(t=>t.left)),o=u.filter(n=>t?n.left===r:n.right===e),i=o[0].top,s=o[o.length-1].bottom;return{top:i,bottom:s,left:r,right:e,width:e-r,height:s-i,x:r,y:i}}return d}},floating:r.floating,strategy:s});return o.reference.x!==h.reference.x||o.reference.y!==h.reference.y||o.reference.width!==h.reference.width||o.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},Jt=function(t){return void 0===t&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=D(t,e),f={x:n,y:r},u=H(o),d=k(u);let p=f[d],h=f[u];const m=D(a,e),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const t="y"===d?"height":"width",e=i.reference[d]-i.floating[t]+g.mainAxis,n=i.reference[d]+i.reference[t]-g.mainAxis;p<e?p=e:p>n&&(p=n)}if(c){var y,w;const t="y"===d?"width":"height",e=Q.has(O(o)),n=i.reference[u]-i.floating[t]+(e&&(null==(y=s.offset)?void 0:y[u])||0)+(e?0:g.crossAxis),r=i.reference[u]+i.reference[t]+(e?0:(null==(w=s.offset)?void 0:w[u])||0)-(e?g.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[d]:p,[u]:h}}}},Qt=(t,e,n)=>{const r=new Map,o={platform:$t,...n},i={...o.platform,_c:r};return(async(t,e,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:f,y:u}=X(c,r,l),d=r,p={},h=0;for(let n=0;n<a.length;n++){const{name:i,fn:m}=a[n],{x:g,y:y,data:w,reset:v}=await m({x:f,y:u,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:t,floating:e}});f=null!=g?g:f,u=null!=y?y:u,p={...p,[i]:{...p[i],...w}},v&&h<=50&&(h++,"object"==typeof v&&(v.placement&&(d=v.placement),v.rects&&(c=!0===v.rects?await s.getElementRects({reference:t,floating:e,strategy:o}):v.rects),({x:f,y:u}=X(c,d,l))),n=-1)}return{x:f,y:u,placement:d,strategy:o,middlewareData:p}})(t,e,{...o,platform:i})};var Ut="undefined"!=typeof document?e:function(){};function Zt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if("function"==typeof t&&t.toString()===e.toString())return!0;let n,r,o;if(t&&e&&"object"==typeof t){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;0!==r--;)if(!Zt(t[r],e[r]))return!1;return!0}if(o=Object.keys(t),n=o.length,n!==Object.keys(e).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(e,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(("_owner"!==n||!t.$$typeof)&&!Zt(t[n],e[n]))return!1}return!0}return t!=t&&e!=e}function te(t){if("undefined"==typeof window)return 1;return(t.ownerDocument.defaultView||window).devicePixelRatio||1}function ee(t,e){const n=te(t);return Math.round(e*n)/n}function ne(e){const n=t.useRef(e);return Ut(()=>{n.current=e}),n}function re(e){void 0===e&&(e={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:s,floating:a}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,p]=t.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[h,m]=t.useState(o);Zt(h,o)||m(o);const[g,y]=t.useState(null),[w,v]=t.useState(null),x=t.useCallback(t=>{t!==P.current&&(P.current=t,y(t))},[]),b=t.useCallback(t=>{t!==A.current&&(A.current=t,v(t))},[]),E=s||g,R=a||w,P=t.useRef(null),A=t.useRef(null),S=t.useRef(d),C=null!=c,L=ne(c),D=ne(i),O=ne(u),T=t.useCallback(()=>{if(!P.current||!A.current)return;const t={placement:n,strategy:r,middleware:h};D.current&&(t.platform=D.current),Qt(P.current,A.current,t).then(t=>{const e={...t,isPositioned:!1!==O.current};k.current&&!Zt(S.current,e)&&(S.current=e,f.flushSync(()=>{p(e)}))})},[h,n,r,D,O]);Ut(()=>{!1===u&&S.current.isPositioned&&(S.current.isPositioned=!1,p(t=>({...t,isPositioned:!1})))},[u]);const k=t.useRef(!1);Ut(()=>(k.current=!0,()=>{k.current=!1}),[]),Ut(()=>{if(E&&(P.current=E),R&&(A.current=R),E&&R){if(L.current)return L.current(E,R,T);T()}},[E,R,T,L,C]);const W=t.useMemo(()=>({reference:P,floating:A,setReference:x,setFloating:b}),[x,b]),F=t.useMemo(()=>({reference:E,floating:R}),[E,R]),H=t.useMemo(()=>{const t={position:r,left:0,top:0};if(!F.floating)return t;const e=ee(F.floating,d.x),n=ee(F.floating,d.y);return l?{...t,transform:"translate("+e+"px, "+n+"px)",...te(F.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:e,top:n}},[r,l,F.floating,d.x,d.y]);return t.useMemo(()=>({...d,update:T,refs:W,elements:F,floatingStyles:H}),[d,T,W,F,H])}const oe=t=>({name:"arrow",options:t,fn(e){const{element:n,padding:r}="function"==typeof t?t(e):t;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?Kt({element:n.current,padding:r}).fn(e):{}:n?Kt({element:n,padding:r}).fn(e):{};var o}}),ie=(t,e)=>({...Vt(t),options:[t,e]}),se=(t,e)=>({...Yt(t),options:[t,e]}),ae=(t,e)=>({...It(t),options:[t,e]}),le=(t,e)=>({...Xt(t),options:[t,e]}),ce=(t,e)=>({...qt(t),options:[t,e]}),fe=(t,e)=>({...Gt(t),options:[t,e]}),ue=(t,e)=>({...oe(t),options:[t,e]});var de=t.forwardRef((t,e)=>{const{children:r,width:o=10,height:i=5,...s}=t;return c(n.svg,{...s,ref:e,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:c("polygon",{points:"0,0 30,0 15,10"})})});de.displayName="Arrow";var pe=de;function he(e){const[n,r]=t.useState(void 0);return i(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const n=t[0];let o,i;if("borderBoxSize"in n){const t=n.borderBoxSize,e=Array.isArray(t)?t[0]:t;o=e.inlineSize,i=e.blockSize}else o=e.offsetWidth,i=e.offsetHeight;r({width:o,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),n}var me="Popper",[ge,ye]=s(me),[we,ve]=ge(me),xe=e=>{const{__scopePopper:n,children:r}=e,[o,i]=t.useState(null);return c(we,{scope:n,anchor:o,onAnchorChange:i,children:r})};xe.displayName=me;var be="PopperAnchor",Ee=t.forwardRef((e,r)=>{const{__scopePopper:o,virtualRef:i,...s}=e,l=ve(be,o),f=t.useRef(null),u=a(r,f),d=t.useRef(null);return t.useEffect(()=>{const t=d.current;d.current=i?.current||f.current,t!==d.current&&l.onAnchorChange(d.current)}),i?null:c(n.div,{...s,ref:u})});Ee.displayName=be;var Re="PopperContent",[Pe,Ae]=ge(Re),Se=t.forwardRef((e,r)=>{const{__scopePopper:o,side:s="bottom",sideOffset:f=0,align:u="center",alignOffset:d=0,arrowPadding:p=0,avoidCollisions:h=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:w=!1,updatePositionStrategy:v="optimized",onPlaced:x,...b}=e,E=ve(Re,o),[R,P]=t.useState(null),A=a(r,t=>P(t)),[S,C]=t.useState(null),L=he(S),D=L?.width??0,O=L?.height??0,T=s+("center"!==u?"-"+u:""),k="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},W=Array.isArray(m)?m:[m],F=W.length>0,H={padding:k,boundary:W.filter(Oe),altBoundary:F},{refs:B,floatingStyles:z,placement:M,isPositioned:N,middlewareData:$}=re({strategy:"fixed",placement:T,whileElementsMounted:(...t)=>jt(...t,{animationFrame:"always"===v}),elements:{reference:E.anchor},middleware:[ie({mainAxis:f+O,alignmentAxis:d}),h&&se({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?{...Jt(_),options:[_,j]}:void 0,...H}),h&&ae({...H}),le({...H,apply:({elements:t,rects:e,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=e.reference,s=t.floating.style;s.setProperty("--radix-popper-available-width",`${n}px`),s.setProperty("--radix-popper-available-height",`${r}px`),s.setProperty("--radix-popper-anchor-width",`${o}px`),s.setProperty("--radix-popper-anchor-height",`${i}px`)}}),S&&ue({element:S,padding:p}),Te({arrowWidth:D,arrowHeight:O}),w&&ce({strategy:"referenceHidden",...H})]});var _,j;const[V,Y]=ke(M),I=l(x);i(()=>{N&&I?.()},[N,I]);const X=$.arrow?.x,q=$.arrow?.y,K=0!==$.arrow?.centerOffset,[G,J]=t.useState();return i(()=>{R&&J(window.getComputedStyle(R).zIndex)},[R]),c("div",{ref:B.setFloating,"data-radix-popper-content-wrapper":"",style:{...z,transform:N?z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:G,"--radix-popper-transform-origin":[$.transformOrigin?.x,$.transformOrigin?.y].join(" "),...$.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c(Pe,{scope:o,placedSide:V,onArrowChange:C,arrowX:X,arrowY:q,shouldHideArrow:K,children:c(n.div,{"data-side":V,"data-align":Y,...b,ref:A,style:{...b.style,animation:N?void 0:"none"}})})})});Se.displayName=Re;var Ce="PopperArrow",Le={top:"bottom",right:"left",bottom:"top",left:"right"},De=t.forwardRef(function(t,e){const{__scopePopper:n,...r}=t,o=Ae(Ce,n),i=Le[o.placedSide];return c("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]: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:c(pe,{...r,ref:e,style:{...r.style,display:"block"}})})});function Oe(t){return null!==t}De.displayName=Ce;var Te=t=>({name:"transformOrigin",options:t,fn(e){const{placement:n,rects:r,middlewareData:o}=e,i=0!==o.arrow?.centerOffset,s=i?0:t.arrowWidth,a=i?0:t.arrowHeight,[l,c]=ke(n),f={start:"0%",center:"50%",end:"100%"}[c],u=(o.arrow?.x??0)+s/2,d=(o.arrow?.y??0)+a/2;let p="",h="";return"bottom"===l?(p=i?f:`${u}px`,h=-a+"px"):"top"===l?(p=i?f:`${u}px`,h=`${r.floating.height+a}px`):"right"===l?(p=-a+"px",h=i?f:`${d}px`):"left"===l&&(p=`${r.floating.width+a}px`,h=i?f:`${d}px`),{data:{x:p,y:h}}}});function ke(t){const[e,n="center"]=t.split("-");return[e,n]}var We=xe,Fe=Ee,He=Se,Be=De,ze=t.forwardRef((e,r)=>{const{container:o,...s}=e,[a,l]=t.useState(!1);i(()=>l(!0),[]);const f=o||a&&globalThis?.document?.body;return f?u.createPortal(c(n.div,{...s,ref:r}),f):null});ze.displayName="Portal";export{Fe as A,He as C,y as D,ze as P,We as R,jt as a,Be as b,ye as c,re as d,rt as e,ae as f,fe as i,ie as o,se as s,he as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"react";import{jsx as n,Fragment as t}from"react/jsx-runtime";import*as r from"react-dom";import{c as o,u as i}from"./index-91a5b8d5.js";function s(t,r=[]){let o=[];const i=()=>{const n=o.map(n=>e.createContext(n));return function(r){const o=r?.[t]||n;return e.useMemo(()=>({[`__scope${t}`]:{...r,[t]:o}}),[r,o])}};return i.scopeName=t,[function(r,i){const s=e.createContext(i),u=o.length;o=[...o,i];const c=r=>{const{scope:o,children:i,...c}=r,a=o?.[t]?.[u]||s,l=e.useMemo(()=>c,Object.values(c));return n(a.Provider,{value:l,children:i})};return c.displayName=r+"Provider",[c,function(n,o){const c=o?.[t]?.[u]||s,a=e.useContext(c);if(a)return a;if(void 0!==i)return i;throw new Error(`\`${n}\` must be used within \`${r}\``)}]},u(i,...r)]}function u(...n){const t=n[0];if(1===n.length)return t;const r=()=>{const r=n.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(n){const o=r.reduce((e,{useScope:t,scopeName:r})=>({...e,...t(n)[`__scope${r}`]}),{});return e.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function c(t){const r=a(t),o=e.forwardRef((t,o)=>{const{children:i,...s}=t,u=e.Children.toArray(i),c=u.find(f);if(c){const t=c.props.children,i=u.map(n=>n===c?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n);return n(r,{...s,ref:o,children:e.isValidElement(t)?e.cloneElement(t,void 0,i):null})}return n(r,{...s,ref:o,children:i})});return o.displayName=`${t}.Slot`,o}function a(n){const t=e.forwardRef((n,t)=>{const{children:r,...i}=n;if(e.isValidElement(r)){const n=function(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,t=n&&"isReactWarning"in n&&n.isReactWarning;if(t)return e.ref;if(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t)return e.props.ref;return e.props.ref||e.ref}(r),s=function(e,n){const t={...n};for(const r in n){const o=e[r],i=n[r];/^on[A-Z]/.test(r)?o&&i?t[r]=(...e)=>{const n=i(...e);return o(...e),n}:o&&(t[r]=o):"style"===r?t[r]={...o,...i}:"className"===r&&(t[r]=[o,i].filter(Boolean).join(" "))}return{...e,...t}}(i,r.props);return r.type!==e.Fragment&&(s.ref=t?o(t,n):n),e.cloneElement(r,s)}return e.Children.count(r)>1?e.Children.only(null):null});return t.displayName=`${n}.SlotClone`,t}var l=Symbol("radix.slottable");function d(e){const r=({children:e})=>n(t,{children:e});return r.displayName=`${e}.Slottable`,r.__radixId=l,r}function f(n){return e.isValidElement(n)&&"function"==typeof n.type&&"__radixId"in n.type&&n.type.__radixId===l}function m(e,n,{checkForDefaultPrevented:t=!0}={}){return function(r){if(e?.(r),!1===t||!r.defaultPrevented)return n?.(r)}}var p=globalThis?.document?e.useLayoutEffect:()=>{},N=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,r)=>{const o=c(`Primitive.${r}`),i=e.forwardRef((e,t)=>{const{asChild:i,...s}=e,u=i?o:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),n(u,{...s,ref:t})});return i.displayName=`Primitive.${r}`,{...t,[r]:i}},{});function y(e,n){e&&r.flushSync(()=>e.dispatchEvent(n))}var h=n=>{const{present:t,children:r}=n,o=function(n){const[t,r]=e.useState(),o=e.useRef(null),i=e.useRef(n),s=e.useRef("none"),u=n?"mounted":"unmounted",[c,a]=function(n,t){return e.useReducer((e,n)=>t[e][n]??e,n)}(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect(()=>{const e=v(o.current);s.current="mounted"===c?e:"none"},[c]),p(()=>{const e=o.current,t=i.current;if(t!==n){const r=s.current,o=v(e);if(n)a("MOUNT");else if("none"===o||"none"===e?.display)a("UNMOUNT");else{a(t&&r!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=n}},[n,a]),p(()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,r=r=>{const s=v(o.current).includes(CSS.escape(r.animationName));if(r.target===t&&s&&(a("ANIMATION_END"),!i.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)})}},u=e=>{e.target===t&&(s.current=v(o.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",r),t.addEventListener("animationend",r),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",r),t.removeEventListener("animationend",r)}}a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:e.useCallback(e=>{o.current=e?getComputedStyle(e):null,r(e)},[])}}(t),s="function"==typeof r?r({present:o.isPresent}):e.Children.only(r),u=i(o.ref,function(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,t=n&&"isReactWarning"in n&&n.isReactWarning;if(t)return e.ref;if(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t)return e.props.ref;return e.props.ref||e.ref}(s));return"function"==typeof r||o.isPresent?e.cloneElement(s,{ref:u}):null};function v(e){return e?.animationName||"none"}h.displayName="Presence";export{N as P,m as a,h as b,s as c,y as d,c as e,d as f,p as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as n from"react";function t(n,t){if("function"==typeof n)return n(t);null!=n&&(n.current=t)}function r(...n){return r=>{let o=!1;const u=n.map(n=>{const u=t(n,r);return o||"function"!=typeof u||(o=!0),u});if(o)return()=>{for(let r=0;r<u.length;r++){const o=u[r];"function"==typeof o?o():t(n[r],null)}}}}function o(...t){return n.useCallback(r(...t),t)}export{r as c,o as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"react";import{c as r,e as t}from"./index-8dc6d938.js";import{u as o}from"./index-91a5b8d5.js";import{jsx as n}from"react/jsx-runtime";function c(c){const l=c+"CollectionProvider",[i,s]=r(l),[a,f]=i(l,{collectionRef:{current:null},itemMap:new Map}),u=r=>{const{scope:t,children:o}=r,c=e.useRef(null),l=e.useRef(new Map).current;return n(a,{scope:t,itemMap:l,collectionRef:c,children:o})};u.displayName=l;const m=c+"CollectionSlot",d=t(m),p=e.forwardRef((e,r)=>{const{scope:t,children:c}=e,l=f(m,t),i=o(r,l.collectionRef);return n(d,{ref:i,children:c})});p.displayName=m;const R=c+"CollectionItemSlot",M="data-radix-collection-item",x=t(R),h=e.forwardRef((r,t)=>{const{scope:c,children:l,...i}=r,s=e.useRef(null),a=o(t,s),u=f(R,c);return e.useEffect(()=>(u.itemMap.set(s,{ref:s,...i}),()=>{u.itemMap.delete(s)})),n(x,{[M]:"",ref:a,children:l})});return h.displayName=R,[{Provider:u,Slot:p,ItemSlot:h},function(r){const t=f(c+"CollectionConsumer",r);return e.useCallback(()=>{const e=t.collectionRef.current;if(!e)return[];const r=Array.from(e.querySelectorAll(`[${M}]`));return Array.from(t.itemMap.values()).sort((e,t)=>r.indexOf(e.ref.current)-r.indexOf(t.ref.current))},[t.collectionRef,t.itemMap])},s]}export{c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"react";import{c as o,P as r,a as t}from"./index-8dc6d938.js";import{c as n}from"./index-aaeb33b0.js";import{u as a}from"./index-91a5b8d5.js";import{u as s}from"./index-325e2e09.js";import{u}from"./index-70f4e709.js";import{u as i}from"./index-7725d7e0.js";import{u as c}from"./index-13505606.js";import{jsx as l}from"react/jsx-runtime";var f="rovingFocusGroup.onEntryFocus",p={bubbles:!1,cancelable:!0},d="RovingFocusGroup",[m,v,b]=n(d),[w,g]=o(d,[b]),[F,I]=w(d),h=e.forwardRef((e,o)=>l(m.Provider,{scope:e.__scopeRovingFocusGroup,children:l(m.Slot,{scope:e.__scopeRovingFocusGroup,children:l(R,{...e,ref:o})})}));h.displayName=d;var R=e.forwardRef((o,n)=>{const{__scopeRovingFocusGroup:s,orientation:m,loop:b=!1,dir:w,currentTabStopId:g,defaultCurrentTabStopId:I,onCurrentTabStopIdChange:h,onEntryFocus:R,preventScrollOnEntryFocus:y=!1,...S}=o,T=e.useRef(null),A=a(n,T),E=c(w),[D,C]=i({prop:g,defaultProp:I??null,onChange:h,caller:d}),[j,_]=e.useState(!1),G=u(R),K=v(s),k=e.useRef(!1),[L,P]=e.useState(0);return e.useEffect(()=>{const e=T.current;if(e)return e.addEventListener(f,G),()=>e.removeEventListener(f,G)},[G]),l(F,{scope:s,orientation:m,dir:E,loop:b,currentTabStopId:D,onItemFocus:e.useCallback(e=>C(e),[C]),onItemShiftTab:e.useCallback(()=>_(!0),[]),onFocusableItemAdd:e.useCallback(()=>P(e=>e+1),[]),onFocusableItemRemove:e.useCallback(()=>P(e=>e-1),[]),children:l(r.div,{tabIndex:j||0===L?-1:0,"data-orientation":m,...S,ref:A,style:{outline:"none",...o.style},onMouseDown:t(o.onMouseDown,()=>{k.current=!0}),onFocus:t(o.onFocus,e=>{const o=!k.current;if(e.target===e.currentTarget&&o&&!j){const o=new CustomEvent(f,p);if(e.currentTarget.dispatchEvent(o),!o.defaultPrevented){const e=K().filter(e=>e.focusable);x([e.find(e=>e.active),e.find(e=>e.id===D),...e].filter(Boolean).map(e=>e.ref.current),y)}}k.current=!1}),onBlur:t(o.onBlur,()=>_(!1))})})}),y="RovingFocusGroupItem",S=e.forwardRef((o,n)=>{const{__scopeRovingFocusGroup:a,focusable:u=!0,active:i=!1,tabStopId:c,children:f,...p}=o,d=s(),b=c||d,w=I(y,a),g=w.currentTabStopId===b,F=v(a),{onFocusableItemAdd:h,onFocusableItemRemove:R,currentTabStopId:S}=w;return e.useEffect(()=>{if(u)return h(),()=>R()},[u,h,R]),l(m.ItemSlot,{scope:a,id:b,focusable:u,active:i,children:l(r.span,{tabIndex:g?0:-1,"data-orientation":w.orientation,...p,ref:n,onMouseDown:t(o.onMouseDown,e=>{u?w.onItemFocus(b):e.preventDefault()}),onFocus:t(o.onFocus,()=>w.onItemFocus(b)),onKeyDown:t(o.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void w.onItemShiftTab();if(e.target!==e.currentTarget)return;const o=function(e,o,r){const t=function(e,o){return"rtl"!==o?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,r);return"vertical"===o&&["ArrowLeft","ArrowRight"].includes(t)||"horizontal"===o&&["ArrowUp","ArrowDown"].includes(t)?void 0:T[t]}(e,w.orientation,w.dir);if(void 0!==o){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=F().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===o)n.reverse();else if("prev"===o||"next"===o){"prev"===o&&n.reverse();const a=n.indexOf(e.currentTarget);n=w.loop?(t=a+1,(r=n).map((e,o)=>r[(t+o)%r.length])):n.slice(a+1)}setTimeout(()=>x(n))}var r,t}),children:"function"==typeof f?f({isCurrentTabStop:g,hasTabStop:null!=S}):f})})});S.displayName=y;var T={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function x(e,o=!1){const r=document.activeElement;for(const t of e){if(t===r)return;if(t.focus({preventScroll:o}),document.activeElement!==r)return}}var A=h,E=S;export{E as I,A as R,g as c};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{c as e}from"./createLucideIcon-70ab5429.js";function t(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(a){if("default"!==a&&!(a in e)){var o=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:function(){return t[a]}})}})}),Object.freeze(e)}
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.378.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/const a=e("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);var o=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,a=[],o=0;o<e.rangeCount;o++)a.push(e.getRangeAt(o));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||a.forEach(function(t){e.addRange(t)}),t&&t.focus()}},n={"text/plain":"Text","text/html":"Url",default:"Text"};var r=function(e,t){var a,r,c,i,l,s,u=!1;t||(t={}),a=t.debug||!1;try{if(c=o(),i=document.createRange(),l=document.getSelection(),(s=document.createElement("span")).textContent=e,s.ariaHidden="true",s.style.all="unset",s.style.position="fixed",s.style.top=0,s.style.clip="rect(0, 0, 0, 0)",s.style.whiteSpace="pre",s.style.webkitUserSelect="text",s.style.MozUserSelect="text",s.style.msUserSelect="text",s.style.userSelect="text",s.addEventListener("copy",function(o){if(o.stopPropagation(),t.format)if(o.preventDefault(),void 0===o.clipboardData){a&&console.warn("unable to use e.clipboardData"),a&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var r=n[t.format]||n.default;window.clipboardData.setData(r,e)}else o.clipboardData.clearData(),o.clipboardData.setData(t.format,e);t.onCopy&&(o.preventDefault(),t.onCopy(o.clipboardData))}),document.body.appendChild(s),i.selectNodeContents(s),l.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(o){a&&console.error("unable to copy using execCommand: ",o),a&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(o){a&&console.error("unable to copy using clipboardData: ",o),a&&console.error("falling back to prompt"),r=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(r,e)}}finally{l&&("function"==typeof l.removeRange?l.removeRange(i):l.removeAllRanges()),s&&document.body.removeChild(s),c()}return u},c=t({__proto__:null,default:r},[r]);export{a as C,r as c,c as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e}from"./_tslib-35bb891d.js";import{jsx as r}from"react/jsx-runtime";import*as t from"react";import{c as s}from"./utils-de9c4c2b.js";const o=t.forwardRef((t,o)=>{var{className:i,type:a}=t,l=e(t,["className","type"]);return r("input",Object.assign({type:a,className:s("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",i),ref:o},l))});o.displayName="Input";export{o as I};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e}from"./_tslib-35bb891d.js";import{jsx as r}from"react/jsx-runtime";import*as t from"react";import"react-dom";import{c as n}from"./index-91a5b8d5.js";import{c as o}from"./button-ecb0aed1.js";import{c as i}from"./utils-de9c4c2b.js";var a=Symbol.for("react.lazy"),l=t[" use ".trim().toString()];function s(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===a&&"_payload"in e&&("object"==typeof(r=e._payload)&&null!==r&&"then"in r);var r}function c(e){const r=t.forwardRef((e,r)=>{let{children:o,...i}=e;if(s(o)&&"function"==typeof l&&(o=l(o._payload)),t.isValidElement(o)){const e=function(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,t=r&&"isReactWarning"in r&&r.isReactWarning;if(t)return e.ref;if(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,t=r&&"isReactWarning"in r&&r.isReactWarning,t)return e.props.ref;return e.props.ref||e.ref}(o),a=function(e,r){const t={...r};for(const n in r){const o=e[n],i=r[n];/^on[A-Z]/.test(n)?o&&i?t[n]=(...e)=>{const r=i(...e);return o(...e),r}:o&&(t[n]=o):"style"===n?t[n]={...o,...i}:"className"===n&&(t[n]=[o,i].filter(Boolean).join(" "))}return{...e,...t}}(i,o.props);return o.type!==t.Fragment&&(a.ref=r?n(r,e):e),t.cloneElement(o,a)}return t.Children.count(o)>1?t.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var f=Symbol("radix.slottable");function d(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===f}var p=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,n)=>{const o=function(e){const n=c(e),o=t.forwardRef((e,o)=>{let{children:i,...a}=e;s(i)&&"function"==typeof l&&(i=l(i._payload));const c=t.Children.toArray(i),f=c.find(d);if(f){const e=f.props.children,i=c.map(r=>r===f?t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null:r);return r(n,{...a,ref:o,children:t.isValidElement(e)?t.cloneElement(e,void 0,i):null})}return r(n,{...a,ref:o,children:i})});return o.displayName=`${e}.Slot`,o}(`Primitive.${n}`),i=t.forwardRef((e,t)=>{const{asChild:i,...a}=e,l=i?o:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),r(l,{...a,ref:t})});return i.displayName=`Primitive.${n}`,{...e,[n]:i}},{}),u=t.forwardRef((e,t)=>r(p.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));u.displayName="Label";var m=u;const y=o("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),b=t.forwardRef((t,n)=>{var{className:o}=t,a=e(t,["className"]);return r(m,Object.assign({ref:n,className:i(y(),o)},a))});b.displayName=m.displayName;export{b as L};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as a,useMemo as o}from"react";import{useYooptaReadOnly as s}from"@yoopta/editor";import{B as n}from"./button-ecb0aed1.js";import{I as r}from"./input-2708c7f4.js";import{P as c,a as i,b as l}from"./popover-53c769ba.js";import{c as m}from"./utils-de9c4c2b.js";import{C as u}from"./chevron-down-abe5f871.js";import{c as d}from"./createLucideIcon-70ab5429.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.378.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/const p=d("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),g=({value:d,options:g,onValueChange:h,currentLabel:b})=>{const[f,v]=a(!1),[x,j]=a(""),N=s(),y=o(()=>{if(!x)return g;const e=x.toLowerCase();return g.filter(t=>t.label.toLowerCase().includes(e)||t.value.toLowerCase().includes(e))},[x,g]);return e(c,Object.assign({open:f,onOpenChange:v},{children:[t(i,Object.assign({asChild:!0},{children:e(n,Object.assign({variant:"outline",size:"sm",className:"h-7 gap-1.5 text-xs font-mono",disabled:N,contentEditable:!1},{children:[b,t(u,{className:"h-3 w-3 opacity-50"})]}))})),t(l,Object.assign({className:"w-64 p-0",align:"start",contentEditable:!1,onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()},{children:e("div",Object.assign({className:"p-2"},{children:[e("div",Object.assign({className:"relative mb-2"},{children:[t(p,{className:"absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),t(r,{placeholder:"Search language...",value:x,onChange:e=>j(e.target.value),className:"h-8 pl-7 text-xs",autoFocus:!0})]})),t("div",Object.assign({className:"max-h-[200px] overflow-y-auto"},{children:0===y.length?t("div",Object.assign({className:"px-2 py-4 text-center text-sm text-muted-foreground"},{children:"No languages found"})):t("div",Object.assign({className:"space-y-0.5"},{children:y.map(e=>t("button",Object.assign({type:"button",onClick:()=>{return t=e.value,h(t),v(!1),void j("");var t},className:m("w-full rounded-sm px-2 py-1.5 text-left text-xs font-mono transition-colors","hover:bg-accent hover:text-accent-foreground",d===e.value&&"bg-accent text-accent-foreground")},{children:e.label}),e.value))}))}))]}))}))]}))};export{g as L,p as S};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{c as o}from"./createLucideIcon-70ab5429.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.378.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/const a=o("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);export{a as P};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{c as a}from"./createLucideIcon-70ab5429.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.378.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/const e=a("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);export{e as P};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e}from"./_tslib-35bb891d.js";import{jsx as o}from"react/jsx-runtime";import*as r from"react";import{c as t,P as n,a,b as s,e as i}from"./index-8dc6d938.js";import{u as d}from"./index-91a5b8d5.js";import{c,A as p,D as u,C as l,b as f,P as m,R as v}from"./index-842a4484.js";import{h,R as g,u as P,F as C}from"./Combination-ee85502b.js";import{u as O}from"./index-325e2e09.js";import{u as b}from"./index-7725d7e0.js";import{c as w}from"./utils-de9c4c2b.js";var R="Popover",[_,x]=t(R,[c]),A=c(),[y,F]=_(R),D=e=>{const{__scopePopover:t,children:n,open:a,defaultOpen:s,onOpenChange:i,modal:d=!1}=e,c=A(t),p=r.useRef(null),[u,l]=r.useState(!1),[f,m]=b({prop:a,defaultProp:s??!1,onChange:i,caller:R});return o(v,{...c,children:o(y,{scope:t,contentId:O(),triggerRef:p,open:f,onOpenChange:m,onOpenToggle:r.useCallback(()=>m(e=>!e),[m]),hasCustomAnchor:u,onCustomAnchorAdd:r.useCallback(()=>l(!0),[]),onCustomAnchorRemove:r.useCallback(()=>l(!1),[]),modal:d,children:n})})};D.displayName=R;var N="PopoverAnchor";r.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,s=F(N,n),i=A(n),{onCustomAnchorAdd:d,onCustomAnchorRemove:c}=s;return r.useEffect(()=>(d(),()=>c()),[d,c]),o(p,{...i,...a,ref:t})}).displayName=N;var E="PopoverTrigger",j=r.forwardRef((e,r)=>{const{__scopePopover:t,...s}=e,i=F(E,t),c=A(t),u=d(r,i.triggerRef),l=o(n.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":G(i.open),...s,ref:u,onClick:a(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:o(p,{asChild:!0,...c,children:l})});j.displayName=E;var k="PopoverPortal",[I,M]=_(k,{forceMount:void 0}),z=e=>{const{__scopePopover:r,forceMount:t,children:n,container:a}=e,i=F(k,r);return o(I,{scope:r,forceMount:t,children:o(s,{present:t||i.open,children:o(m,{asChild:!0,container:a,children:n})})})};z.displayName=k;var K="PopoverContent",T=r.forwardRef((e,r)=>{const t=M(K,e.__scopePopover),{forceMount:n=t.forceMount,...a}=e,i=F(K,e.__scopePopover);return o(s,{present:n||i.open,children:i.modal?o(U,{...a,ref:r}):o(Z,{...a,ref:r})})});T.displayName=K;var S=i("PopoverContent.RemoveScroll"),U=r.forwardRef((e,t)=>{const n=F(K,e.__scopePopover),s=r.useRef(null),i=d(t,s),c=r.useRef(!1);return r.useEffect(()=>{const e=s.current;if(e)return h(e)},[]),o(g,{as:S,allowPinchZoom:!0,children:o(q,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:a(e.onCloseAutoFocus,e=>{e.preventDefault(),c.current||n.triggerRef.current?.focus()}),onPointerDownOutside:a(e.onPointerDownOutside,e=>{const o=e.detail.originalEvent,r=0===o.button&&!0===o.ctrlKey,t=2===o.button||r;c.current=t},{checkForDefaultPrevented:!1}),onFocusOutside:a(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),Z=r.forwardRef((e,t)=>{const n=F(K,e.__scopePopover),a=r.useRef(!1),s=r.useRef(!1);return o(q,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(a.current||n.triggerRef.current?.focus(),o.preventDefault()),a.current=!1,s.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(a.current=!0,"pointerdown"===o.detail.originalEvent.type&&(s.current=!0));const r=o.target,t=n.triggerRef.current?.contains(r);t&&o.preventDefault(),"focusin"===o.detail.originalEvent.type&&s.current&&o.preventDefault()}})}),q=r.forwardRef((e,r)=>{const{__scopePopover:t,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:d,onPointerDownOutside:c,onFocusOutside:p,onInteractOutside:f,...m}=e,v=F(K,t),h=A(t);return P(),o(C,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:s,children:o(u,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:d,onPointerDownOutside:c,onFocusOutside:p,onDismiss:()=>v.onOpenChange(!1),children:o(l,{"data-state":G(v.open),role:"dialog",id:v.contentId,...h,...m,ref:r,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),B="PopoverClose";r.forwardRef((e,r)=>{const{__scopePopover:t,...s}=e,i=F(B,t);return o(n.button,{type:"button",...s,ref:r,onClick:a(e.onClick,()=>i.onOpenChange(!1))})}).displayName=B;function G(e){return e?"open":"closed"}r.forwardRef((e,r)=>{const{__scopePopover:t,...n}=e,a=A(t);return o(f,{...a,...n,ref:r})}).displayName="PopoverArrow";var H=z,J=T;const L=D,Q=j,V=r.forwardRef((r,t)=>{var{className:n,align:a="center",sideOffset:s=4}=r,i=e(r,["className","align","sideOffset"]);return o(H,{children:o(J,Object.assign({ref:t,align:a,sideOffset:s,className:w("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n)},i))})});V.displayName=J.displayName;export{L as P,Q as a,V as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e}from"./_tslib-35bb891d.js";import{jsx as r,jsxs as t,Fragment as o}from"react/jsx-runtime";import*as n from"react";import{c as l,P as i,b as a,a as s,u as c}from"./index-8dc6d938.js";import{u as d}from"./index-91a5b8d5.js";import{u}from"./index-70f4e709.js";import{u as p}from"./index-13505606.js";import{c as f}from"./index-056e5c06.js";import{c as h}from"./utils-de9c4c2b.js";var v="ScrollArea",[w,b]=l(v),[m,g]=w(v),S=n.forwardRef((e,t)=>{const{__scopeScrollArea:o,type:l="hover",dir:a,scrollHideDelay:s=600,...c}=e,[u,f]=n.useState(null),[h,v]=n.useState(null),[w,b]=n.useState(null),[g,S]=n.useState(null),[y,E]=n.useState(null),[T,C]=n.useState(0),[R,P]=n.useState(0),[_,x]=n.useState(!1),[L,D]=n.useState(!1),A=d(t,e=>f(e)),z=p(a);return r(m,{scope:o,type:l,dir:z,scrollHideDelay:s,scrollArea:u,viewport:h,onViewportChange:v,content:w,onContentChange:b,scrollbarX:g,onScrollbarXChange:S,scrollbarXEnabled:_,onScrollbarXEnabledChange:x,scrollbarY:y,onScrollbarYChange:E,scrollbarYEnabled:L,onScrollbarYEnabledChange:D,onCornerWidthChange:C,onCornerHeightChange:P,children:r(i.div,{dir:z,...c,ref:A,style:{position:"relative","--radix-scroll-area-corner-width":T+"px","--radix-scroll-area-corner-height":R+"px",...e.style}})})});S.displayName=v;var y="ScrollAreaViewport",E=n.forwardRef((e,l)=>{const{__scopeScrollArea:a,children:s,nonce:c,...u}=e,p=g(y,a),f=n.useRef(null),h=d(l,f,p.onViewportChange);return t(o,{children:[r("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:c}),r(i.div,{"data-radix-scroll-area-viewport":"",...u,ref:h,style:{overflowX:p.scrollbarXEnabled?"scroll":"hidden",overflowY:p.scrollbarYEnabled?"scroll":"hidden",...e.style},children:r("div",{ref:p.onContentChange,style:{minWidth:"100%",display:"table"},children:s})})]})});E.displayName=y;var T="ScrollAreaScrollbar",C=n.forwardRef((e,t)=>{const{forceMount:o,...l}=e,i=g(T,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=i,c="horizontal"===e.orientation;return n.useEffect(()=>(c?a(!0):s(!0),()=>{c?a(!1):s(!1)}),[c,a,s]),"hover"===i.type?r(R,{...l,ref:t,forceMount:o}):"scroll"===i.type?r(P,{...l,ref:t,forceMount:o}):"auto"===i.type?r(_,{...l,ref:t,forceMount:o}):"always"===i.type?r(x,{...l,ref:t}):null});C.displayName=T;var R=n.forwardRef((e,t)=>{const{forceMount:o,...l}=e,i=g(T,e.__scopeScrollArea),[s,c]=n.useState(!1);return n.useEffect(()=>{const e=i.scrollArea;let r=0;if(e){const t=()=>{window.clearTimeout(r),c(!0)},o=()=>{r=window.setTimeout(()=>c(!1),i.scrollHideDelay)};return e.addEventListener("pointerenter",t),e.addEventListener("pointerleave",o),()=>{window.clearTimeout(r),e.removeEventListener("pointerenter",t),e.removeEventListener("pointerleave",o)}}},[i.scrollArea,i.scrollHideDelay]),r(a,{present:o||s,children:r(_,{"data-state":s?"visible":"hidden",...l,ref:t})})}),P=n.forwardRef((e,t)=>{const{forceMount:o,...l}=e,i=g(T,e.__scopeScrollArea),c="horizontal"===e.orientation,d=q(()=>p("SCROLL_END"),100),[u,p]=(f="hidden",h={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},n.useReducer((e,r)=>h[e][r]??e,f));var f,h;return n.useEffect(()=>{if("idle"===u){const e=window.setTimeout(()=>p("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(e)}},[u,i.scrollHideDelay,p]),n.useEffect(()=>{const e=i.viewport,r=c?"scrollLeft":"scrollTop";if(e){let t=e[r];const o=()=>{const o=e[r];t!==o&&(p("SCROLL"),d()),t=o};return e.addEventListener("scroll",o),()=>e.removeEventListener("scroll",o)}},[i.viewport,c,p,d]),r(a,{present:o||"hidden"!==u,children:r(x,{"data-state":"hidden"===u?"hidden":"visible",...l,ref:t,onPointerEnter:s(e.onPointerEnter,()=>p("POINTER_ENTER")),onPointerLeave:s(e.onPointerLeave,()=>p("POINTER_LEAVE"))})})}),_=n.forwardRef((e,t)=>{const o=g(T,e.__scopeScrollArea),{forceMount:l,...i}=e,[s,c]=n.useState(!1),d="horizontal"===e.orientation,u=q(()=>{if(o.viewport){const e=o.viewport.offsetWidth<o.viewport.scrollWidth,r=o.viewport.offsetHeight<o.viewport.scrollHeight;c(d?e:r)}},10);return $(o.viewport,u),$(o.content,u),r(a,{present:l||s,children:r(x,{"data-state":s?"visible":"hidden",...i,ref:t})})}),x=n.forwardRef((e,t)=>{const{orientation:o="vertical",...l}=e,i=g(T,e.__scopeScrollArea),a=n.useRef(null),s=n.useRef(0),[c,d]=n.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=j(c.viewport,c.content),p={...l,sizes:c,onSizesChange:d,hasThumb:Boolean(u>0&&u<1),onThumbChange:e=>a.current=e,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:e=>s.current=e};function f(e,r){return function(e,r,t,o="ltr"){const n=U(t),l=n/2,i=r||l,a=n-i,s=t.scrollbar.paddingStart+i,c=t.scrollbar.size-t.scrollbar.paddingEnd-a,d=t.content-t.viewport,u="ltr"===o?[0,d]:[-1*d,0];return k([s,c],u)(e)}(e,s.current,c,r)}return"horizontal"===o?r(L,{...p,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){const e=B(i.viewport.scrollLeft,c,i.dir);a.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=f(e,i.dir))}}):"vertical"===o?r(D,{...p,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){const e=B(i.viewport.scrollTop,c);a.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=f(e))}}):null}),L=n.forwardRef((e,t)=>{const{sizes:o,onSizesChange:l,...i}=e,a=g(T,e.__scopeScrollArea),[s,c]=n.useState(),u=n.useRef(null),p=d(t,u,a.onScrollbarXChange);return n.useEffect(()=>{u.current&&c(getComputedStyle(u.current))},[u]),r(N,{"data-orientation":"horizontal",...i,ref:p,sizes:o,style:{bottom:0,left:"rtl"===a.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===a.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":U(o)+"px",...e.style},onThumbPointerDown:r=>e.onThumbPointerDown(r.x),onDragScroll:r=>e.onDragScroll(r.x),onWheelScroll:(r,t)=>{if(a.viewport){const o=a.viewport.scrollLeft+r.deltaX;e.onWheelScroll(o),F(o,t)&&r.preventDefault()}},onResize:()=>{u.current&&a.viewport&&s&&l({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:M(s.paddingLeft),paddingEnd:M(s.paddingRight)}})}})}),D=n.forwardRef((e,t)=>{const{sizes:o,onSizesChange:l,...i}=e,a=g(T,e.__scopeScrollArea),[s,c]=n.useState(),u=n.useRef(null),p=d(t,u,a.onScrollbarYChange);return n.useEffect(()=>{u.current&&c(getComputedStyle(u.current))},[u]),r(N,{"data-orientation":"vertical",...i,ref:p,sizes:o,style:{top:0,right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":U(o)+"px",...e.style},onThumbPointerDown:r=>e.onThumbPointerDown(r.y),onDragScroll:r=>e.onDragScroll(r.y),onWheelScroll:(r,t)=>{if(a.viewport){const o=a.viewport.scrollTop+r.deltaY;e.onWheelScroll(o),F(o,t)&&r.preventDefault()}},onResize:()=>{u.current&&a.viewport&&s&&l({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:M(s.paddingTop),paddingEnd:M(s.paddingBottom)}})}})}),[A,z]=w(T),N=n.forwardRef((e,t)=>{const{__scopeScrollArea:o,sizes:l,hasThumb:a,onThumbChange:c,onThumbPointerUp:p,onThumbPointerDown:f,onThumbPositionChange:h,onDragScroll:v,onWheelScroll:w,onResize:b,...m}=e,S=g(T,o),[y,E]=n.useState(null),C=d(t,e=>E(e)),R=n.useRef(null),P=n.useRef(""),_=S.viewport,x=l.content-l.viewport,L=u(w),D=u(h),z=q(b,10);function N(e){if(R.current){const r=e.clientX-R.current.left,t=e.clientY-R.current.top;v({x:r,y:t})}}return n.useEffect(()=>{const e=e=>{const r=e.target,t=y?.contains(r);t&&L(e,x)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[_,y,x,L]),n.useEffect(D,[l,D]),$(y,z),$(S.content,z),r(A,{scope:o,scrollbar:y,hasThumb:a,onThumbChange:u(c),onThumbPointerUp:u(p),onThumbPositionChange:D,onThumbPointerDown:u(f),children:r(i.div,{...m,ref:C,style:{position:"absolute",...m.style},onPointerDown:s(e.onPointerDown,e=>{if(0===e.button){e.target.setPointerCapture(e.pointerId),R.current=y.getBoundingClientRect(),P.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),N(e)}}),onPointerMove:s(e.onPointerMove,N),onPointerUp:s(e.onPointerUp,e=>{const r=e.target;r.hasPointerCapture(e.pointerId)&&r.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=P.current,S.viewport&&(S.viewport.style.scrollBehavior=""),R.current=null})})})}),H="ScrollAreaThumb",W=n.forwardRef((e,t)=>{const{forceMount:o,...n}=e,l=z(H,e.__scopeScrollArea);return r(a,{present:o||l.hasThumb,children:r(O,{ref:t,...n})})}),O=n.forwardRef((e,t)=>{const{__scopeScrollArea:o,style:l,...a}=e,c=g(H,o),u=z(H,o),{onThumbPositionChange:p}=u,f=d(t,e=>u.onThumbChange(e)),h=n.useRef(void 0),v=q(()=>{h.current&&(h.current(),h.current=void 0)},100);return n.useEffect(()=>{const e=c.viewport;if(e){const r=()=>{if(v(),!h.current){const r=V(e,p);h.current=r,p()}};return p(),e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}},[c.viewport,v,p]),r(i.div,{"data-state":u.hasThumb?"visible":"hidden",...a,ref:f,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...l},onPointerDownCapture:s(e.onPointerDownCapture,e=>{const r=e.target.getBoundingClientRect(),t=e.clientX-r.left,o=e.clientY-r.top;u.onThumbPointerDown({x:t,y:o})}),onPointerUp:s(e.onPointerUp,u.onThumbPointerUp)})});W.displayName=H;var X="ScrollAreaCorner",Y=n.forwardRef((e,t)=>{const o=g(X,e.__scopeScrollArea),n=Boolean(o.scrollbarX&&o.scrollbarY);return"scroll"!==o.type&&n?r(I,{...e,ref:t}):null});Y.displayName=X;var I=n.forwardRef((e,t)=>{const{__scopeScrollArea:o,...l}=e,a=g(X,o),[s,c]=n.useState(0),[d,u]=n.useState(0),p=Boolean(s&&d);return $(a.scrollbarX,()=>{const e=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(e),u(e)}),$(a.scrollbarY,()=>{const e=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(e),c(e)}),p?r(i.div,{...l,ref:t,style:{width:s,height:d,position:"absolute",right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:0,...e.style}}):null});function M(e){return e?parseInt(e,10):0}function j(e,r){const t=e/r;return isNaN(t)?0:t}function U(e){const r=j(e.viewport,e.content),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=(e.scrollbar.size-t)*r;return Math.max(o,18)}function B(e,r,t="ltr"){const o=U(r),n=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,l=r.scrollbar.size-n,i=r.content-r.viewport,a=l-o,s=f(e,"ltr"===t?[0,i]:[-1*i,0]);return k([0,i],[0,a])(s)}function k(e,r){return t=>{if(e[0]===e[1]||r[0]===r[1])return r[0];const o=(r[1]-r[0])/(e[1]-e[0]);return r[0]+o*(t-e[0])}}function F(e,r){return e>0&&e<r}var V=(e,r=()=>{})=>{let t={left:e.scrollLeft,top:e.scrollTop},o=0;return function n(){const l={left:e.scrollLeft,top:e.scrollTop},i=t.left!==l.left,a=t.top!==l.top;(i||a)&&r(),t=l,o=window.requestAnimationFrame(n)}(),()=>window.cancelAnimationFrame(o)};function q(e,r){const t=u(e),o=n.useRef(0);return n.useEffect(()=>()=>window.clearTimeout(o.current),[]),n.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(t,r)},[t,r])}function $(e,r){const t=u(r);c(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(t)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,t])}var G=S,J=E,K=Y;const Q=t=>{var{className:o,orientation:n="vertical"}=t,l=e(t,["className","orientation"]);return r(C,Object.assign({"data-slot":"scroll-area-scrollbar",orientation:n,className:h("flex touch-none p-px transition-colors select-none","vertical"===n&&"h-full w-2.5 border-l border-l-transparent","horizontal"===n&&"h-2.5 flex-col border-t border-t-transparent",o)},l,{children:r(W,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})}))},Z=o=>{var{className:n,children:l}=o,i=e(o,["className","children"]);return t(G,Object.assign({"data-slot":"scroll-area",className:h("relative",n)},i,{children:[r(J,Object.assign({"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"},{children:l})),r(Q,{}),r(K,{})]}))};export{Z as S,Q as a};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{c as e}from"./createLucideIcon-70ab5429.js";import{_ as t}from"./_tslib-35bb891d.js";import{jsx as n,Fragment as r,jsxs as o}from"react/jsx-runtime";import*as a from"react";import*as l from"react-dom";import{c as s}from"./index-056e5c06.js";import{c as i,P as c,a as d,u,e as p}from"./index-8dc6d938.js";import{c as f}from"./index-aaeb33b0.js";import{u as m}from"./index-91a5b8d5.js";import{u as h}from"./index-13505606.js";import{c as v,A as g,D as w,C as y,b,R as x,P as S}from"./index-842a4484.js";import{h as C,u as _,R as N,F as k}from"./Combination-ee85502b.js";import{u as P}from"./index-325e2e09.js";import{u as R}from"./index-70f4e709.js";import{u as I}from"./index-7725d7e0.js";import{V as T}from"./tooltip-bc45d963.js";import{c as D}from"./utils-de9c4c2b.js";import{C as E}from"./chevron-down-abe5f871.js";import{C as j}from"./check-9adcfdfa.js";import{C as O}from"./chevron-up-5b4801a9.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.378.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/const M=e("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);function L(e){const t=a.useRef({value:e,previous:e});return a.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var z=[" ","Enter","ArrowUp","ArrowDown"],H=[" ","Enter"],A="Select",[V,B,K]=f(A),[W,F]=i(A,[K,v]),U=v(),[q,X]=W(A),[Y,G]=W(A),Z=e=>{const{__scopeSelect:t,children:r,open:l,defaultOpen:s,onOpenChange:i,value:c,defaultValue:d,onValueChange:u,dir:p,name:f,autoComplete:m,disabled:v,required:g,form:w}=e,y=U(t),[b,S]=a.useState(null),[C,_]=a.useState(null),[N,k]=a.useState(!1),R=h(p),[T,D]=I({prop:l,defaultProp:s??!1,onChange:i,caller:A}),[E,j]=I({prop:c,defaultProp:d,onChange:u,caller:A}),O=a.useRef(null),M=!b||(w||!!b.closest("form")),[L,z]=a.useState(new Set),H=Array.from(L).map(e=>e.props.value).join(";");return n(x,{...y,children:o(q,{required:g,scope:t,trigger:b,onTriggerChange:S,valueNode:C,onValueNodeChange:_,valueNodeHasChildren:N,onValueNodeHasChildrenChange:k,contentId:P(),value:E,onValueChange:j,open:T,onOpenChange:D,dir:R,triggerPointerDownPosRef:O,disabled:v,children:[n(V.Provider,{scope:t,children:n(Y,{scope:e.__scopeSelect,onNativeOptionAdd:a.useCallback(e=>{z(t=>new Set(t).add(e))},[]),onNativeOptionRemove:a.useCallback(e=>{z(t=>{const n=new Set(t);return n.delete(e),n})},[]),children:r})}),M?o(Me,{"aria-hidden":!0,required:g,tabIndex:-1,name:f,autoComplete:m,value:E,onChange:e=>j(e.target.value),disabled:v,form:w,children:[void 0===E?n("option",{value:""}):null,Array.from(L)]},H):null]})})};Z.displayName=A;var $="SelectTrigger",J=a.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:o=!1,...l}=e,s=U(r),i=X($,r),u=i.disabled||o,p=m(t,i.onTriggerChange),f=B(r),h=a.useRef("touch"),[v,w,y]=ze(e=>{const t=f().filter(e=>!e.disabled),n=t.find(e=>e.value===i.value),r=He(t,e,n);void 0!==r&&i.onValueChange(r.value)}),b=e=>{u||(i.onOpenChange(!0),y()),e&&(i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return n(g,{asChild:!0,...s,children:n(c.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":Le(i.value)?"":void 0,...l,ref:p,onClick:d(l.onClick,e=>{e.currentTarget.focus(),"mouse"!==h.current&&b(e)}),onPointerDown:d(l.onPointerDown,e=>{h.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(b(e),e.preventDefault())}),onKeyDown:d(l.onKeyDown,e=>{const t=""!==v.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||w(e.key),t&&" "===e.key||z.includes(e.key)&&(b(),e.preventDefault())})})})});J.displayName=$;var Q="SelectValue",ee=a.forwardRef((e,t)=>{const{__scopeSelect:o,className:a,style:l,children:s,placeholder:i="",...d}=e,p=X(Q,o),{onValueNodeHasChildrenChange:f}=p,h=void 0!==s,v=m(t,p.onValueNodeChange);return u(()=>{f(h)},[f,h]),n(c.span,{...d,ref:v,style:{pointerEvents:"none"},children:Le(p.value)?n(r,{children:i}):s})});ee.displayName=Q;var te=a.forwardRef((e,t)=>{const{__scopeSelect:r,children:o,...a}=e;return n(c.span,{"aria-hidden":!0,...a,ref:t,children:o||"▼"})});te.displayName="SelectIcon";var ne=e=>n(S,{asChild:!0,...e});ne.displayName="SelectPortal";var re="SelectContent",oe=a.forwardRef((e,t)=>{const r=X(re,e.__scopeSelect),[o,s]=a.useState();if(u(()=>{s(new DocumentFragment)},[]),!r.open){const t=o;return t?l.createPortal(n(le,{scope:e.__scopeSelect,children:n(V.Slot,{scope:e.__scopeSelect,children:n("div",{children:e.children})})}),t):null}return n(ce,{...e,ref:t})});oe.displayName=re;var ae=10,[le,se]=W(re),ie=p("SelectContent.RemoveScroll"),ce=a.forwardRef((e,t)=>{const{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:s,onPointerDownOutside:i,side:c,sideOffset:u,align:p,alignOffset:f,arrowPadding:h,collisionBoundary:v,collisionPadding:g,sticky:y,hideWhenDetached:b,avoidCollisions:x,...S}=e,P=X(re,r),[R,I]=a.useState(null),[T,D]=a.useState(null),E=m(t,e=>I(e)),[j,O]=a.useState(null),[M,L]=a.useState(null),z=B(r),[H,A]=a.useState(!1),V=a.useRef(!1);a.useEffect(()=>{if(R)return C(R)},[R]),_();const K=a.useCallback(e=>{const[t,...n]=z().map(e=>e.ref.current),[r]=n.slice(-1),o=document.activeElement;for(const n of e){if(n===o)return;if(n?.scrollIntoView({block:"nearest"}),n===t&&T&&(T.scrollTop=0),n===r&&T&&(T.scrollTop=T.scrollHeight),n?.focus(),document.activeElement!==o)return}},[z,T]),W=a.useCallback(()=>K([j,R]),[K,j,R]);a.useEffect(()=>{H&&W()},[H,W]);const{onOpenChange:F,triggerPointerDownPosRef:U}=P;a.useEffect(()=>{if(R){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(U.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(U.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():R.contains(n.target)||F(!1),document.removeEventListener("pointermove",t),U.current=null};return null!==U.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[R,F,U]),a.useEffect(()=>{const e=()=>F(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[F]);const[q,Y]=ze(e=>{const t=z().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=He(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),G=a.useCallback((e,t,n)=>{const r=!V.current&&!n;(void 0!==P.value&&P.value===t||r)&&(O(e),r&&(V.current=!0))},[P.value]),Z=a.useCallback(()=>R?.focus(),[R]),$=a.useCallback((e,t,n)=>{const r=!V.current&&!n;(void 0!==P.value&&P.value===t||r)&&L(e)},[P.value]),J="popper"===o?ue:de,Q=J===ue?{side:c,sideOffset:u,align:p,alignOffset:f,arrowPadding:h,collisionBoundary:v,collisionPadding:g,sticky:y,hideWhenDetached:b,avoidCollisions:x}:{};return n(le,{scope:r,content:R,viewport:T,onViewportChange:D,itemRefCallback:G,selectedItem:j,onItemLeave:Z,itemTextRefCallback:$,focusSelectedItem:W,selectedItemText:M,position:o,isPositioned:H,searchRef:q,children:n(N,{as:ie,allowPinchZoom:!0,children:n(k,{asChild:!0,trapped:P.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:d(l,e=>{P.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:n(w,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>P.onOpenChange(!1),children:n(J,{role:"listbox",id:P.contentId,"data-state":P.open?"open":"closed",dir:P.dir,onContextMenu:e=>e.preventDefault(),...S,...Q,onPlaced:()=>A(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:d(S.onKeyDown,e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||Y(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=z().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>K(t)),e.preventDefault()}})})})})})})});ce.displayName="SelectContentImpl";var de=a.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:o,...l}=e,i=X(re,r),d=se(re,r),[p,f]=a.useState(null),[h,v]=a.useState(null),g=m(t,e=>v(e)),w=B(r),y=a.useRef(!1),b=a.useRef(!0),{viewport:x,selectedItem:S,selectedItemText:C,focusSelectedItem:_}=d,N=a.useCallback(()=>{if(i.trigger&&i.valueNode&&p&&h&&x&&S&&C){const e=i.trigger.getBoundingClientRect(),t=h.getBoundingClientRect(),n=i.valueNode.getBoundingClientRect(),r=C.getBoundingClientRect();if("rtl"!==i.dir){const o=r.left-t.left,a=n.left-o,l=e.left-a,i=e.width+l,c=Math.max(i,t.width),d=window.innerWidth-ae,u=s(a,[ae,Math.max(ae,d-c)]);p.style.minWidth=i+"px",p.style.left=u+"px"}else{const o=t.right-r.right,a=window.innerWidth-n.right-o,l=window.innerWidth-e.right-a,i=e.width+l,c=Math.max(i,t.width),d=window.innerWidth-ae,u=s(a,[ae,Math.max(ae,d-c)]);p.style.minWidth=i+"px",p.style.right=u+"px"}const a=w(),l=window.innerHeight-2*ae,c=x.scrollHeight,d=window.getComputedStyle(h),u=parseInt(d.borderTopWidth,10),f=parseInt(d.paddingTop,10),m=parseInt(d.borderBottomWidth,10),v=u+f+c+parseInt(d.paddingBottom,10)+m,g=Math.min(5*S.offsetHeight,v),b=window.getComputedStyle(x),_=parseInt(b.paddingTop,10),N=parseInt(b.paddingBottom,10),k=e.top+e.height/2-ae,P=l-k,R=S.offsetHeight/2,I=u+f+(S.offsetTop+R),T=v-I;if(I<=k){const e=a.length>0&&S===a[a.length-1].ref.current;p.style.bottom="0px";const t=h.clientHeight-x.offsetTop-x.offsetHeight,n=I+Math.max(P,R+(e?N:0)+t+m);p.style.height=n+"px"}else{const e=a.length>0&&S===a[0].ref.current;p.style.top="0px";const t=Math.max(k,u+x.offsetTop+(e?_:0)+R)+T;p.style.height=t+"px",x.scrollTop=I-k+x.offsetTop}p.style.margin=`${ae}px 0`,p.style.minHeight=g+"px",p.style.maxHeight=l+"px",o?.(),requestAnimationFrame(()=>y.current=!0)}},[w,i.trigger,i.valueNode,p,h,x,S,C,i.dir,o]);u(()=>N(),[N]);const[k,P]=a.useState();u(()=>{h&&P(window.getComputedStyle(h).zIndex)},[h]);const R=a.useCallback(e=>{e&&!0===b.current&&(N(),_?.(),b.current=!1)},[N,_]);return n(pe,{scope:r,contentWrapper:p,shouldExpandOnScrollRef:y,onScrollButtonChange:R,children:n("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:n(c.div,{...l,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})});de.displayName="SelectItemAlignedPosition";var ue=a.forwardRef((e,t)=>{const{__scopeSelect:r,align:o="start",collisionPadding:a=ae,...l}=e,s=U(r);return n(y,{...s,...l,ref:t,align:o,collisionPadding:a,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});ue.displayName="SelectPopperPosition";var[pe,fe]=W(re,{}),me="SelectViewport",he=a.forwardRef((e,t)=>{const{__scopeSelect:l,nonce:s,...i}=e,u=se(me,l),p=fe(me,l),f=m(t,u.onViewportChange),h=a.useRef(0);return o(r,{children:[n("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),n(V.Slot,{scope:l,children:n(c.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:f,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:d(i.onScroll,e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=p;if(r?.current&&n){const e=Math.abs(h.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*ae,o=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),l=Math.max(o,a);if(l<r){const o=l+e,a=Math.min(r,o),s=o-a;n.style.height=a+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}h.current=t.scrollTop})})})]})});he.displayName=me;var ve="SelectGroup",[ge,we]=W(ve),ye=a.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,a=P();return n(ge,{scope:r,id:a,children:n(c.div,{role:"group","aria-labelledby":a,...o,ref:t})})});ye.displayName=ve;var be="SelectLabel";a.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,a=we(be,r);return n(c.div,{id:a.id,...o,ref:t})}).displayName=be;var xe="SelectItem",[Se,Ce]=W(xe),_e=a.forwardRef((e,t)=>{const{__scopeSelect:r,value:o,disabled:l=!1,textValue:s,...i}=e,u=X(xe,r),p=se(xe,r),f=u.value===o,[h,v]=a.useState(s??""),[g,w]=a.useState(!1),y=m(t,e=>p.itemRefCallback?.(e,o,l)),b=P(),x=a.useRef("touch"),S=()=>{l||(u.onValueChange(o),u.onOpenChange(!1))};if(""===o)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return n(Se,{scope:r,value:o,disabled:l,textId:b,isSelected:f,onItemTextChange:a.useCallback(e=>{v(t=>t||(e?.textContent??"").trim())},[]),children:n(V.ItemSlot,{scope:r,value:o,disabled:l,textValue:h,children:n(c.div,{role:"option","aria-labelledby":b,"data-highlighted":g?"":void 0,"aria-selected":f&&g,"data-state":f?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1,...i,ref:y,onFocus:d(i.onFocus,()=>w(!0)),onBlur:d(i.onBlur,()=>w(!1)),onClick:d(i.onClick,()=>{"mouse"!==x.current&&S()}),onPointerUp:d(i.onPointerUp,()=>{"mouse"===x.current&&S()}),onPointerDown:d(i.onPointerDown,e=>{x.current=e.pointerType}),onPointerMove:d(i.onPointerMove,e=>{x.current=e.pointerType,l?p.onItemLeave?.():"mouse"===x.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:d(i.onPointerLeave,e=>{e.currentTarget===document.activeElement&&p.onItemLeave?.()}),onKeyDown:d(i.onKeyDown,e=>{""!==p.searchRef?.current&&" "===e.key||(H.includes(e.key)&&S()," "===e.key&&e.preventDefault())})})})})});_e.displayName=xe;var Ne="SelectItemText",ke=a.forwardRef((e,t)=>{const{__scopeSelect:s,className:i,style:d,...p}=e,f=X(Ne,s),h=se(Ne,s),v=Ce(Ne,s),g=G(Ne,s),[w,y]=a.useState(null),b=m(t,e=>y(e),v.onItemTextChange,e=>h.itemTextRefCallback?.(e,v.value,v.disabled)),x=w?.textContent,S=a.useMemo(()=>n("option",{value:v.value,disabled:v.disabled,children:x},v.value),[v.disabled,v.value,x]),{onNativeOptionAdd:C,onNativeOptionRemove:_}=g;return u(()=>(C(S),()=>_(S)),[C,_,S]),o(r,{children:[n(c.span,{id:v.textId,...p,ref:b}),v.isSelected&&f.valueNode&&!f.valueNodeHasChildren?l.createPortal(p.children,f.valueNode):null]})});ke.displayName=Ne;var Pe="SelectItemIndicator",Re=a.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e;return Ce(Pe,r).isSelected?n(c.span,{"aria-hidden":!0,...o,ref:t}):null});Re.displayName=Pe;var Ie="SelectScrollUpButton",Te=a.forwardRef((e,t)=>{const r=se(Ie,e.__scopeSelect),o=fe(Ie,e.__scopeSelect),[l,s]=a.useState(!1),i=m(t,o.onScrollButtonChange);return u(()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollTop>0;s(e)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),l?n(je,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});Te.displayName=Ie;var De="SelectScrollDownButton",Ee=a.forwardRef((e,t)=>{const r=se(De,e.__scopeSelect),o=fe(De,e.__scopeSelect),[l,s]=a.useState(!1),i=m(t,o.onScrollButtonChange);return u(()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;s(n)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),l?n(je,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});Ee.displayName=De;var je=a.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:o,...l}=e,s=se("SelectScrollButton",r),i=a.useRef(null),p=B(r),f=a.useCallback(()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)},[]);return a.useEffect(()=>()=>f(),[f]),u(()=>{const e=p().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[p]),n(c.div,{"aria-hidden":!0,...l,ref:t,style:{flexShrink:0,...l.style},onPointerDown:d(l.onPointerDown,()=>{null===i.current&&(i.current=window.setInterval(o,50))}),onPointerMove:d(l.onPointerMove,()=>{s.onItemLeave?.(),null===i.current&&(i.current=window.setInterval(o,50))}),onPointerLeave:d(l.onPointerLeave,()=>{f()})})});a.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e;return n(c.div,{"aria-hidden":!0,...o,ref:t})}).displayName="SelectSeparator";var Oe="SelectArrow";a.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,a=U(r),l=X(Oe,r),s=se(Oe,r);return l.open&&"popper"===s.position?n(b,{...a,...o,ref:t}):null}).displayName=Oe;var Me=a.forwardRef(({__scopeSelect:e,value:t,...r},o)=>{const l=a.useRef(null),s=m(o,l),i=L(t);return a.useEffect(()=>{const e=l.current;if(!e)return;const n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,"value").set;if(i!==t&&r){const n=new Event("change",{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[i,t]),n(c.select,{...r,style:{...T,...r.style},ref:s,defaultValue:t})});function Le(e){return""===e||void 0===e}function ze(e){const t=R(e),n=a.useRef(""),r=a.useRef(0),o=a.useCallback(e=>{const o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout(()=>e(""),1e3))}(o)},[t]),l=a.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return a.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,l]}function He(e,t,n){const r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=(l=e,s=Math.max(o,0),l.map((e,t)=>l[(s+t)%l.length]));var l,s;1===r.length&&(a=a.filter(e=>e!==n));const i=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return i!==n?i:void 0}Me.displayName="SelectBubbleInput";var Ae=Z,Ve=J,Be=ee,Ke=te,We=ne,Fe=oe,Ue=he,qe=ye,Xe=_e,Ye=ke,Ge=Re,Ze=Te,$e=Ee;const Je=e=>{var r=t(e,[]);return n(Ae,Object.assign({"data-slot":"select"},r))},Qe=e=>{var r=t(e,[]);return n(qe,Object.assign({"data-slot":"select-group"},r))},et=e=>{var r=t(e,[]);return n(Be,Object.assign({"data-slot":"select-value"},r))},tt=e=>{var{className:r,size:a="default",children:l}=e,s=t(e,["className","size","children"]);return o(Ve,Object.assign({"data-slot":"select-trigger","data-size":a,className:D("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",r)},s,{children:[l,n(Ke,Object.assign({asChild:!0},{children:n(E,{className:"size-4 opacity-50"})}))]}))},nt=e=>{var{className:r}=e,o=t(e,["className"]);return n(Ze,Object.assign({"data-slot":"select-scroll-up-button",className:D("flex cursor-default items-center justify-center py-1",r)},o,{children:n(O,{className:"size-4"})}))},rt=e=>{var{className:r}=e,o=t(e,["className"]);return n($e,Object.assign({"data-slot":"select-scroll-down-button",className:D("flex cursor-default items-center justify-center py-1",r)},o,{children:n(E,{className:"size-4"})}))},ot=e=>{var{className:r,children:a,position:l="item-aligned",align:s="center"}=e,i=t(e,["className","children","position","align"]);return n(We,{children:o(Fe,Object.assign({"data-slot":"select-content",className:D("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md","popper"===l&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",r),position:l,align:s},i,{children:[n(nt,{}),n(Ue,Object.assign({className:D("p-1","popper"===l&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1")},{children:a})),n(rt,{})]}))})},at=e=>{var{className:r,children:a}=e,l=t(e,["className","children"]);return o(Xe,Object.assign({"data-slot":"select-item",className:D("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",r)},l,{children:[n("span",Object.assign({"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center"},{children:n(Ge,{children:n(j,{className:"size-4"})})})),n(Ye,{children:a})]}))};export{M as S,Je as a,tt as b,et as c,ot as d,Qe as e,at as f,L as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as r}from"./_tslib-35bb891d.js";import{jsx as e}from"react/jsx-runtime";import*as t from"react";import"react-dom";import{c as n}from"./index-91a5b8d5.js";import{c as o}from"./utils-de9c4c2b.js";var i=Symbol.for("react.lazy"),a=t[" use ".trim().toString()];function l(r){return null!=r&&"object"==typeof r&&"$$typeof"in r&&r.$$typeof===i&&"_payload"in r&&("object"==typeof(e=r._payload)&&null!==e&&"then"in e);var e}function s(r){const e=t.forwardRef((r,e)=>{let{children:o,...i}=r;if(l(o)&&"function"==typeof a&&(o=a(o._payload)),t.isValidElement(o)){const r=function(r){let e=Object.getOwnPropertyDescriptor(r.props,"ref")?.get,t=e&&"isReactWarning"in e&&e.isReactWarning;if(t)return r.ref;if(e=Object.getOwnPropertyDescriptor(r,"ref")?.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t)return r.props.ref;return r.props.ref||r.ref}(o),a=function(r,e){const t={...e};for(const n in e){const o=r[n],i=e[n];/^on[A-Z]/.test(n)?o&&i?t[n]=(...r)=>{const e=i(...r);return o(...r),e}:o&&(t[n]=o):"style"===n?t[n]={...o,...i}:"className"===n&&(t[n]=[o,i].filter(Boolean).join(" "))}return{...r,...t}}(i,o.props);return o.type!==t.Fragment&&(a.ref=e?n(e,r):r),t.cloneElement(o,a)}return t.Children.count(o)>1?t.Children.only(null):null});return e.displayName=`${r}.SlotClone`,e}var c=Symbol("radix.slottable");function f(r){return t.isValidElement(r)&&"function"==typeof r.type&&"__radixId"in r.type&&r.type.__radixId===c}var d=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((r,n)=>{const o=function(r){const n=s(r),o=t.forwardRef((r,o)=>{let{children:i,...s}=r;l(i)&&"function"==typeof a&&(i=a(i._payload));const c=t.Children.toArray(i),d=c.find(f);if(d){const r=d.props.children,i=c.map(e=>e===d?t.Children.count(r)>1?t.Children.only(null):t.isValidElement(r)?r.props.children:null:e);return e(n,{...s,ref:o,children:t.isValidElement(r)?t.cloneElement(r,void 0,i):null})}return e(n,{...s,ref:o,children:i})});return o.displayName=`${r}.Slot`,o}(`Primitive.${n}`),i=t.forwardRef((r,t)=>{const{asChild:i,...a}=r,l=i?o:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e(l,{...a,ref:t})});return i.displayName=`Primitive.${n}`,{...r,[n]:i}},{}),p="horizontal",u=["horizontal","vertical"],m=t.forwardRef((r,t)=>{const{decorative:n,orientation:o=p,...i}=r,a=function(r){return u.includes(r)}(o)?o:p,l=n?{role:"none"}:{"aria-orientation":"vertical"===a?a:void 0,role:"separator"};return e(d.div,{"data-orientation":a,...l,...i,ref:t})});m.displayName="Separator";var y=m;const h=t.forwardRef((t,n)=>{var{className:i,orientation:a="horizontal",decorative:l=!0}=t,s=r(t,["className","orientation","decorative"]);return e(y,Object.assign({ref:n,decorative:l,orientation:a,className:o("shrink-0 bg-border","horizontal"===a?"h-[1px] w-full":"h-full w-[1px]",i)},s))});h.displayName=y.displayName;export{h as S};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{c as a}from"./createLucideIcon-70ab5429.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.378.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/const e=a("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);export{e as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,t){void 0===t&&(t={});var d=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===d&&n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}export{e as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e}from"./_tslib-35bb891d.js";import{jsx as a}from"react/jsx-runtime";import*as t from"react";import{c as i,P as n,a as r,b as s}from"./index-8dc6d938.js";import{c as o,R as d,I as l}from"./index-b273f426.js";import{u as c}from"./index-13505606.js";import{u}from"./index-7725d7e0.js";import{u as f}from"./index-325e2e09.js";import{c as m}from"./utils-de9c4c2b.js";var b="Tabs",[p,v]=i(b,[o]),g=o(),[y,N]=p(b),h=t.forwardRef((e,t)=>{const{__scopeTabs:i,value:r,onValueChange:s,defaultValue:o,orientation:d="horizontal",dir:l,activationMode:m="automatic",...p}=e,v=c(l),[g,N]=u({prop:r,onChange:s,defaultProp:o??"",caller:b});return a(y,{scope:i,baseId:f(),value:g,onValueChange:N,orientation:d,dir:v,activationMode:m,children:a(n.div,{dir:v,"data-orientation":d,...p,ref:t})})});h.displayName=b;var x="TabsList",j=t.forwardRef((e,t)=>{const{__scopeTabs:i,loop:r=!0,...s}=e,o=N(x,i),l=g(i);return a(d,{asChild:!0,...l,orientation:o.orientation,dir:o.dir,loop:r,children:a(n.div,{role:"tablist","aria-orientation":o.orientation,...s,ref:t})})});j.displayName=x;var w="TabsTrigger",T=t.forwardRef((e,t)=>{const{__scopeTabs:i,value:s,disabled:o=!1,...d}=e,c=N(w,i),u=g(i),f=R(c.baseId,s),m=I(c.baseId,s),b=s===c.value;return a(l,{asChild:!0,...u,focusable:!o,active:b,children:a(n.button,{type:"button",role:"tab","aria-selected":b,"aria-controls":m,"data-state":b?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:f,...d,ref:t,onMouseDown:r(e.onMouseDown,e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():c.onValueChange(s)}),onKeyDown:r(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&c.onValueChange(s)}),onFocus:r(e.onFocus,()=>{const e="manual"!==c.activationMode;b||o||!e||c.onValueChange(s)})})})});T.displayName=w;var _="TabsContent",C=t.forwardRef((e,i)=>{const{__scopeTabs:r,value:o,forceMount:d,children:l,...c}=e,u=N(_,r),f=R(u.baseId,o),m=I(u.baseId,o),b=o===u.value,p=t.useRef(b);return t.useEffect(()=>{const e=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(e)},[]),a(s,{present:d||b,children:({present:t})=>a(n.div,{"data-state":b?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":f,hidden:!t,id:m,tabIndex:0,...c,ref:i,style:{...e.style,animationDuration:p.current?"0s":void 0},children:t&&l})})});function R(e,a){return`${e}-trigger-${a}`}function I(e,a){return`${e}-content-${a}`}C.displayName=_;var D=j,M=T,V=C;const k=h,F=t.forwardRef((t,i)=>{var{className:n}=t,r=e(t,["className"]);return a(D,Object.assign({ref:i,className:m("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",n)},r))});F.displayName=D.displayName;const $=t.forwardRef((t,i)=>{var{className:n}=t,r=e(t,["className"]);return a(M,Object.assign({ref:i,className:m("inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",n)},r))});$.displayName=M.displayName;const K=t.forwardRef((t,i)=>{var{className:n}=t,r=e(t,["className"]);return a(V,Object.assign({ref:i,className:m("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",n)},r))});K.displayName=V.displayName;export{k as T,K as a,$ as b,F as c};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{c as e}from"./createLucideIcon-70ab5429.js";import*as t from"react";import{useLayoutEffect as n,useEffect as o}from"react";import{d as r,e as i,c as a,A as s,D as l,C as c,b as u,R as d,P as f}from"./index-842a4484.js";import"react-dom";import{_ as p}from"./_tslib-35bb891d.js";import{jsx as m,jsxs as g}from"react/jsx-runtime";import{P as h,c as v,a as x,b as y,f as b}from"./index-8dc6d938.js";import{u as C}from"./index-91a5b8d5.js";import{u as w}from"./index-325e2e09.js";import{u as T}from"./index-7725d7e0.js";import{c as R}from"./utils-de9c4c2b.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.378.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/const E=e("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]),_={...t},k=_.useInsertionEffect||(e=>e());var M="undefined"!=typeof document?n:o;let O=!1,D=0;const P=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+D++;const L=_.useId||function(){const[e,n]=t.useState(()=>O?P():void 0);return M(()=>{null==e&&n(P())},[]),t.useEffect(()=>{O=!0},[]),e};const I=t.createContext(null),j=t.createContext(null);function N(e){const{open:n=!1,onOpenChange:o,elements:r}=e,i=L(),a=t.useRef({}),[s]=t.useState(()=>function(){const e=new Map;return{emit(t,n){var o;null==(o=e.get(t))||o.forEach(e=>e(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var o;e.set(t,(null==(o=e.get(t))?void 0:o.filter(e=>e!==n))||[])}}}()),l=null!=((null==(c=t.useContext(I))?void 0:c.id)||null);var c;const[u,d]=t.useState(r.reference),f=function(e){const n=t.useRef(()=>{});return k(()=>{n.current=e}),t.useCallback(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return null==n.current?void 0:n.current(...t)},[])}((e,t,n)=>{a.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:n,nested:l}),null==o||o(e,t,n)}),p=t.useMemo(()=>({setPositionReference:d}),[]),m=t.useMemo(()=>({reference:u||r.reference||null,floating:r.floating||null,domReference:r.reference}),[u,r.reference,r.floating]);return t.useMemo(()=>({dataRef:a,open:n,onOpenChange:f,elements:m,events:s,floatingId:i,refs:p}),[n,f,m,s,i,p])}function S(e){void 0===e&&(e={});const{nodeId:n}=e,o=N({...e,elements:{reference:null,floating:null,...e.elements}}),a=e.rootContext||o,s=a.elements,[l,c]=t.useState(null),[u,d]=t.useState(null),f=(null==s?void 0:s.domReference)||l,p=t.useRef(null),m=t.useContext(j);M(()=>{f&&(p.current=f)},[f]);const g=r({...e,elements:{...s,...u&&{reference:u}}}),h=t.useCallback(e=>{const t=i(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;d(t),g.refs.setReference(t)},[g.refs]),v=t.useCallback(e=>{(i(e)||null===e)&&(p.current=e,c(e)),(i(g.refs.reference.current)||null===g.refs.reference.current||null!==e&&!i(e))&&g.refs.setReference(e)},[g.refs]),x=t.useMemo(()=>({...g.refs,setReference:v,setPositionReference:h,domReference:p}),[g.refs,v,h]),y=t.useMemo(()=>({...g.elements,domReference:f}),[g.elements,f]),b=t.useMemo(()=>({...g,...a,refs:x,elements:y,nodeId:n}),[g,x,y,n,a]);return M(()=>{a.dataRef.current.floatingContext=b;const e=null==m?void 0:m.nodesRef.current.find(e=>e.id===n);e&&(e.context=b)}),t.useMemo(()=>({...g,context:b,refs:x,elements:y}),[g,x,y,b])}var H=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),z=t.forwardRef((e,t)=>m(h.span,{...e,ref:t,style:{...H,...e.style}}));z.displayName="VisuallyHidden";var A=z,[B,F]=v("Tooltip",[a]),K=a(),V="TooltipProvider",X=700,Y="tooltip.open",[q,W]=B(V),G=e=>{const{__scopeTooltip:n,delayDuration:o=X,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,s=t.useRef(!0),l=t.useRef(!1),c=t.useRef(0);return t.useEffect(()=>{const e=c.current;return()=>window.clearTimeout(e)},[]),m(q,{scope:n,isOpenDelayedRef:s,delayDuration:o,onOpen:t.useCallback(()=>{window.clearTimeout(c.current),s.current=!1},[]),onClose:t.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:t.useCallback(e=>{l.current=e},[]),disableHoverableContent:i,children:a})};G.displayName=V;var J="Tooltip",[Q,U]=B(J),Z=e=>{const{__scopeTooltip:n,children:o,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:s,delayDuration:l}=e,c=W(J,e.__scopeTooltip),u=K(n),[f,p]=t.useState(null),g=w(),h=t.useRef(0),v=s??c.disableHoverableContent,x=l??c.delayDuration,y=t.useRef(!1),[b,C]=T({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(Y))):c.onClose(),a?.(e)},caller:J}),R=t.useMemo(()=>b?y.current?"delayed-open":"instant-open":"closed",[b]),E=t.useCallback(()=>{window.clearTimeout(h.current),h.current=0,y.current=!1,C(!0)},[C]),_=t.useCallback(()=>{window.clearTimeout(h.current),h.current=0,C(!1)},[C]),k=t.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{y.current=!0,C(!0),h.current=0},x)},[x,C]);return t.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),m(d,{...u,children:m(Q,{scope:n,contentId:g,open:b,stateAttribute:R,trigger:f,onTriggerChange:p,onTriggerEnter:t.useCallback(()=>{c.isOpenDelayedRef.current?k():E()},[c.isOpenDelayedRef,k,E]),onTriggerLeave:t.useCallback(()=>{v?_():(window.clearTimeout(h.current),h.current=0)},[_,v]),onOpen:E,onClose:_,disableHoverableContent:v,children:o})})};Z.displayName=J;var $="TooltipTrigger",ee=t.forwardRef((e,n)=>{const{__scopeTooltip:o,...r}=e,i=U($,o),a=W($,o),l=K(o),c=t.useRef(null),u=C(n,c,i.onTriggerChange),d=t.useRef(!1),f=t.useRef(!1),p=t.useCallback(()=>d.current=!1,[]);return t.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),m(s,{asChild:!0,...l,children:m(h.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:u,onPointerMove:x(e.onPointerMove,e=>{"touch"!==e.pointerType&&(f.current||a.isPointerInTransitRef.current||(i.onTriggerEnter(),f.current=!0))}),onPointerLeave:x(e.onPointerLeave,()=>{i.onTriggerLeave(),f.current=!1}),onPointerDown:x(e.onPointerDown,()=>{i.open&&i.onClose(),d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:x(e.onFocus,()=>{d.current||i.onOpen()}),onBlur:x(e.onBlur,i.onClose),onClick:x(e.onClick,i.onClose)})})});ee.displayName=$;var te="TooltipPortal",[ne,oe]=B(te,{forceMount:void 0}),re=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,i=U(te,t);return m(ne,{scope:t,forceMount:n,children:m(y,{present:n||i.open,children:m(f,{asChild:!0,container:r,children:o})})})};re.displayName=te;var ie="TooltipContent",ae=t.forwardRef((e,t)=>{const n=oe(ie,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...i}=e,a=U(ie,e.__scopeTooltip);return m(y,{present:o||a.open,children:a.disableHoverableContent?m(de,{side:r,...i,ref:t}):m(se,{side:r,...i,ref:t})})}),se=t.forwardRef((e,n)=>{const o=U(ie,e.__scopeTooltip),r=W(ie,e.__scopeTooltip),i=t.useRef(null),a=C(n,i),[s,l]=t.useState(null),{trigger:c,onClose:u}=o,d=i.current,{onPointerInTransitChange:f}=r,p=t.useCallback(()=>{l(null),f(!1)},[f]),g=t.useCallback((e,t)=>{const n=e.currentTarget,o={x:e.clientX,y:e.clientY},r=function(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return o}(o,function(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,o,r,i)){case i:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}(o,n.getBoundingClientRect())),i=function(e){const t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),function(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const e=t[t.length-1],n=t[t.length-2];if(!((e.x-n.x)*(o.y-n.y)>=(e.y-n.y)*(o.x-n.x)))break;t.pop()}t.push(o)}t.pop();const n=[];for(let t=e.length-1;t>=0;t--){const o=e[t];for(;n.length>=2;){const e=n[n.length-1],t=n[n.length-2];if(!((e.x-t.x)*(o.y-t.y)>=(e.y-t.y)*(o.x-t.x)))break;n.pop()}n.push(o)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...r,...function(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}(t.getBoundingClientRect())]);l(i),f(!0)},[f]);return t.useEffect(()=>()=>p(),[p]),t.useEffect(()=>{if(c&&d){const e=e=>g(e,d),t=e=>g(e,c);return c.addEventListener("pointerleave",e),d.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),d.removeEventListener("pointerleave",t)}}},[c,d,g,p]),t.useEffect(()=>{if(s){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},o=c?.contains(t)||d?.contains(t),r=!function(e,t){const{x:n,y:o}=e;let r=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e],s=t[i],l=a.x,c=a.y,u=s.x,d=s.y;c>o!=d>o&&n<(u-l)*(o-c)/(d-c)+l&&(r=!r)}return r}(n,s);o?p():r&&(p(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[c,d,s,u,p]),m(de,{...e,ref:a})}),[le,ce]=B(J,{isInside:!1}),ue=b("TooltipContent"),de=t.forwardRef((e,n)=>{const{__scopeTooltip:o,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:s,...u}=e,d=U(ie,o),f=K(o),{onClose:p}=d;return t.useEffect(()=>(document.addEventListener(Y,p),()=>document.removeEventListener(Y,p)),[p]),t.useEffect(()=>{if(d.trigger){const e=e=>{const t=e.target;t?.contains(d.trigger)&&p()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[d.trigger,p]),m(l,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:p,children:g(c,{"data-state":d.stateAttribute,...f,...u,ref:n,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[m(ue,{children:r}),m(le,{scope:o,isInside:!0,children:m(A,{id:d.contentId,role:"tooltip",children:i||r})})]})})});ae.displayName=ie;var fe="TooltipArrow",pe=t.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=K(n);return ce(fe,n).isInside?null:m(u,{...r,...o,ref:t})});pe.displayName=fe;var me=G,ge=Z,he=ee,ve=re,xe=ae,ye=pe;const be=e=>{var{delayDuration:t=0}=e,n=p(e,["delayDuration"]);return m(me,Object.assign({"data-slot":"tooltip-provider",delayDuration:t},n))},Ce=e=>{var t=p(e,[]);return m(be,{children:m(ge,Object.assign({"data-slot":"tooltip"},t))})},we=e=>{var t=p(e,[]);return m(he,Object.assign({"data-slot":"tooltip-trigger"},t))},Te=e=>{var{className:t,sideOffset:n=0,children:o}=e,r=p(e,["className","sideOffset","children"]);return m(ve,{children:g(xe,Object.assign({"data-slot":"tooltip-content",sideOffset:n,className:R("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",t)},r,{children:[o,m(ye,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]}))})};export{E as R,be as T,H as V,Ce as a,we as b,Te as c,S as u};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{c as e}from"./createLucideIcon-70ab5429.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.378.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/const a=e("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);export{a as T};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{c as a}from"./createLucideIcon-70ab5429.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.378.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/const e=a("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]),o=a("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),y=a("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);
|
|
8
|
+
/**
|
|
9
|
+
* @license lucide-react v0.378.0 - ISC
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the ISC license.
|
|
12
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
13
|
+
*/export{e as D,o as L,y as U};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(r){var o,t,n="";if("string"==typeof r||"number"==typeof r)n+=r;else if("object"==typeof r)if(Array.isArray(r)){var l=r.length;for(o=0;o<l;o++)r[o]&&(t=e(r[o]))&&(n&&(n+=" "),n+=t)}else for(t in r)r[t]&&(n&&(n+=" "),n+=t);return n}function r(){for(var r,o,t=0,n="",l=arguments.length;t<l;t++)(r=arguments[t])&&(o=e(r))&&(n&&(n+=" "),n+=o);return n}const o=e=>{const r=s(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{const o=e.split("-");return""===o[0]&&1!==o.length&&o.shift(),t(o,r)||l(e)},getConflictingClassGroupIds:(e,r)=>{const t=o[e]||[];return r&&n[e]?[...t,...n[e]]:t}}},t=(e,r)=>{if(0===e.length)return r.classGroupId;const o=e[0],n=r.nextPart.get(o),l=n?t(e.slice(1),n):void 0;if(l)return l;if(0===r.validators.length)return;const s=e.join("-");return r.validators.find(({validator:e})=>e(s))?.classGroupId},n=/^\[(.+)\]$/,l=e=>{if(n.test(e)){const r=n.exec(e)[1],o=r?.substring(0,r.indexOf(":"));if(o)return"arbitrary.."+o}},s=e=>{const{theme:r,prefix:o}=e,t={nextPart:new Map,validators:[]};return c(Object.entries(e.classGroups),o).forEach(([e,o])=>{a(o,t,e,r)}),t},a=(e,r,o,t)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?r:i(r,e)).classGroupId=o)}if("function"==typeof e)return d(e)?void a(e(t),r,o,t):void r.validators.push({validator:e,classGroupId:o});Object.entries(e).forEach(([e,n])=>{a(n,i(r,e),o,t)})})},i=(e,r)=>{let o=e;return r.split("-").forEach(e=>{o.nextPart.has(e)||o.nextPart.set(e,{nextPart:new Map,validators:[]}),o=o.nextPart.get(e)}),o},d=e=>e.isThemeGetter,c=(e,r)=>r?e.map(([e,o])=>[e,o.map(e=>"string"==typeof e?r+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,o])=>[r+e,o])):e)]):e,p=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,o=new Map,t=new Map;const n=(n,l)=>{o.set(n,l),r++,r>e&&(r=0,t=o,o=new Map)};return{get(e){let r=o.get(e);return void 0!==r?r:void 0!==(r=t.get(e))?(n(e,r),r):void 0},set(e,r){o.has(e)?o.set(e,r):n(e,r)}}},u=e=>{const{separator:r,experimentalParseClassName:o}=e,t=1===r.length,n=r[0],l=r.length,s=e=>{const o=[];let s,a=0,i=0;for(let d=0;d<e.length;d++){let c=e[d];if(0===a){if(c===n&&(t||e.slice(d,d+l)===r)){o.push(e.slice(i,d)),i=d+l;continue}if("/"===c){s=d;continue}}"["===c?a++:"]"===c&&a--}const d=0===o.length?e:e.substring(i),c=d.startsWith("!");return{modifiers:o,hasImportantModifier:c,baseClassName:c?d.substring(1):d,maybePostfixModifierPosition:s&&s>i?s-i:void 0}};return o?e=>o({className:e,parseClassName:s}):s},b=e=>{if(e.length<=1)return e;const r=[];let o=[];return e.forEach(e=>{"["===e[0]?(r.push(...o.sort(),e),o=[]):o.push(e)}),r.push(...o.sort()),r},f=/\s+/;function m(){let e,r,o=0,t="";for(;o<arguments.length;)(e=arguments[o++])&&(r=g(e))&&(t&&(t+=" "),t+=r);return t}const g=e=>{if("string"==typeof e)return e;let r,o="";for(let t=0;t<e.length;t++)e[t]&&(r=g(e[t]))&&(o&&(o+=" "),o+=r);return o};function h(e,...r){let t,n,l,s=function(i){const d=r.reduce((e,r)=>r(e),e());return t=(e=>({cache:p(e.cacheSize),parseClassName:u(e),...o(e)}))(d),n=t.cache.get,l=t.cache.set,s=a,a(i)};function a(e){const r=n(e);if(r)return r;const o=((e,r)=>{const{parseClassName:o,getClassGroupId:t,getConflictingClassGroupIds:n}=r,l=[],s=e.trim().split(f);let a="";for(let e=s.length-1;e>=0;e-=1){const r=s[e],{modifiers:i,hasImportantModifier:d,baseClassName:c,maybePostfixModifierPosition:p}=o(r);let u=Boolean(p),f=t(u?c.substring(0,p):c);if(!f){if(!u){a=r+(a.length>0?" "+a:a);continue}if(f=t(c),!f){a=r+(a.length>0?" "+a:a);continue}u=!1}const m=b(i).join(":"),g=d?m+"!":m,h=g+f;if(l.includes(h))continue;l.push(h);const x=n(f,u);for(let e=0;e<x.length;++e){const r=x[e];l.push(g+r)}a=r+(a.length>0?" "+a:a)}return a})(e,t);return l(e,o),o}return function(){return s(m.apply(null,arguments))}}const x=e=>{const r=r=>r[e]||[];return r.isThemeGetter=!0,r},y=/^\[(?:([a-z-]+):)?(.+)\]$/i,v=/^\d+\/\d+$/,w=new Set(["px","full","screen"]),k=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,z=/\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$/,C=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,j=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,G=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,N=e=>I(e)||w.has(e)||v.test(e),P=e=>D(e,"length",F),I=e=>Boolean(e)&&!Number.isNaN(Number(e)),M=e=>D(e,"number",I),S=e=>Boolean(e)&&Number.isInteger(Number(e)),$=e=>e.endsWith("%")&&I(e.slice(0,-1)),E=e=>y.test(e),O=e=>k.test(e),R=new Set(["length","size","percentage"]),W=e=>D(e,R,H),B=e=>D(e,"position",H),q=new Set(["image","url"]),A=e=>D(e,q,K),T=e=>D(e,"",J),_=()=>!0,D=(e,r,o)=>{const t=y.exec(e);return!!t&&(t[1]?"string"==typeof r?t[1]===r:r.has(t[1]):o(t[2]))},F=e=>z.test(e)&&!C.test(e),H=()=>!1,J=e=>j.test(e),K=e=>G.test(e),L=h(()=>{const e=x("colors"),r=x("spacing"),o=x("blur"),t=x("brightness"),n=x("borderColor"),l=x("borderRadius"),s=x("borderSpacing"),a=x("borderWidth"),i=x("contrast"),d=x("grayscale"),c=x("hueRotate"),p=x("invert"),u=x("gap"),b=x("gradientColorStops"),f=x("gradientColorStopPositions"),m=x("inset"),g=x("margin"),h=x("opacity"),y=x("padding"),v=x("saturate"),w=x("scale"),k=x("sepia"),z=x("skew"),C=x("space"),j=x("translate"),G=()=>["auto",E,r],R=()=>[E,r],q=()=>["",N,P],D=()=>["auto",I,E],F=()=>["","0",E],H=()=>[I,E];return{cacheSize:500,separator:":",theme:{colors:[_],spacing:[N,P],blur:["none","",O,E],brightness:H(),borderColor:[e],borderRadius:["none","","full",O,E],borderSpacing:R(),borderWidth:q(),contrast:H(),grayscale:F(),hueRotate:H(),invert:F(),gap:R(),gradientColorStops:[e],gradientColorStopPositions:[$,P],inset:G(),margin:G(),opacity:H(),padding:R(),saturate:H(),scale:H(),sepia:F(),skew:H(),space:R(),translate:R()},classGroups:{aspect:[{aspect:["auto","square","video",E]}],container:["container"],columns:[{columns:[O]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"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"],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:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",E]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",S,E]}],basis:[{basis:G()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",E]}],grow:[{grow:F()}],shrink:[{shrink:F()}],order:[{order:["first","last","none",S,E]}],"grid-cols":[{"grid-cols":[_]}],"col-start-end":[{col:["auto",{span:["full",S,E]},E]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[_]}],"row-start-end":[{row:["auto",{span:[S,E]},E]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",E]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",E]}],gap:[{gap:[u]}],"gap-x":[{"gap-x":[u]}],"gap-y":[{"gap-y":[u]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",E,r]}],"min-w":[{"min-w":[E,r,"min","max","fit"]}],"max-w":[{"max-w":[E,r,"none","full","min","max","fit","prose",{screen:[O]},O]}],h:[{h:[E,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[E,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[E,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[E,r,"auto","min","max","fit"]}],"font-size":[{text:["base",O,P]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",M]}],"font-family":[{font:[_]}],"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:["tighter","tight","normal","wide","wider","widest",E]}],"line-clamp":[{"line-clamp":["none",I,M]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",N,E]}],"list-image":[{"list-image":["none",E]}],"list-style-type":[{list:["none","disc","decimal",E]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[h]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[h]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",N,P]}],"underline-offset":[{"underline-offset":["auto",N,E]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",E]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",E]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[h]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",B]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",W]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},A]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[f]}],"gradient-via-pos":[{via:[f]}],"gradient-to-pos":[{to:[f]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[h]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[h]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[N,E]}],"outline-w":[{outline:[N,P]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[h]}],"ring-offset-w":[{"ring-offset":[N,P]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",O,T]}],"shadow-color":[{shadow:[_]}],opacity:[{opacity:[h]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[t]}],contrast:[{contrast:[i]}],"drop-shadow":[{"drop-shadow":["","none",O,E]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[p]}],saturate:[{saturate:[v]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[t]}],"backdrop-contrast":[{"backdrop-contrast":[i]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[h]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",E]}],duration:[{duration:H()}],ease:[{ease:["linear","in","out","in-out",E]}],delay:[{delay:H()}],animate:[{animate:["none","spin","ping","pulse","bounce",E]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[S,E]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[z]}],"skew-y":[{"skew-y":[z]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",E]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",E]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"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",E]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[N,P,M]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}});function Q(...e){return L(r(e))}export{r as a,Q as c};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{c as e}from"./createLucideIcon-70ab5429.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.378.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/const t=e("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);export{t as X};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../../../src/code/elements/code.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../../../src/code/elements/code.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAI/D,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAO/E,OAAO,CAAC,MAAM,CAAC;IAEb,UAAU,MAAM;QACd,MAAM,EAAE,kBAAkB,CAAC,eAAe,EAAE,YAAY,CAAC,GAAG,IAAI,CAAC;KAClE;CACF;AAsBD,eAAO,MAAM,gBAAgB,gDAK1B,wBAAwB,4CA+M1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"language-select.d.ts","sourceRoot":"","sources":["../../../src/code/elements/language-select.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"language-select.d.ts","sourceRoot":"","sources":["../../../src/code/elements/language-select.tsx"],"names":[],"mappings":"AASA,KAAK,cAAc,GAAG;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,mBAAmB,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,SAAS,cAAc,EAAE,CAAC;IACnC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,cAAc,qDAKxB,mBAAmB,4CA8ErB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-group-content.d.ts","sourceRoot":"","sources":["../../../src/code-group/elements/code-group-content.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"code-group-content.d.ts","sourceRoot":"","sources":["../../../src/code-group/elements/code-group-content.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,wBAAwB,EAAgB,MAAM,gBAAgB,CAAC;AAyB7E,eAAO,MAAM,gBAAgB,UAAW,wBAAwB,4CAgM/D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-group-item-heading.d.ts","sourceRoot":"","sources":["../../../src/code-group/elements/code-group-item-heading.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAO/D,eAAO,MAAM,oBAAoB,UAAW,wBAAwB,
|
|
1
|
+
{"version":3,"file":"code-group-item-heading.d.ts","sourceRoot":"","sources":["../../../src/code-group/elements/code-group-item-heading.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAO/D,eAAO,MAAM,oBAAoB,UAAW,wBAAwB,4CAwCnE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-group-list.d.ts","sourceRoot":"","sources":["../../../src/code-group/elements/code-group-list.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAO/D,eAAO,MAAM,aAAa,UAAW,wBAAwB,
|
|
1
|
+
{"version":3,"file":"code-group-list.d.ts","sourceRoot":"","sources":["../../../src/code-group/elements/code-group-list.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAO/D,eAAO,MAAM,aAAa,UAAW,wBAAwB,4CAuC5D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as o,jsxs as e}from"react/jsx-runtime";import{useEffect as r,useRef as t,useMemo as i,useState as n}from"react";import{useYooptaEditor as a,Blocks as l,Elements as c}from"@yoopta/editor";import{Transforms as d,Element as s,Editor as u,Text as v}from"slate";import{T as g,a as p,b,c as m}from"./chunks/tabs-eeea28d9.js";import{a as h}from"./chunks/_tslib-35bb891d.js";import{isLanguageSupported as f,SHIKI_CODE_LANGUAGES as k,HighlightedCodeOverlay as j,CodeGroupCommands as y}from"@yoopta/code";import{C as w,c as x}from"./chunks/index-e9d6a4a8.js";import{L as O}from"./chunks/language-select-d2235078.js";import{B as N}from"./chunks/button-ecb0aed1.js";import{S as C}from"./chunks/sparkles-c8608d1b.js";import{C as T}from"./chunks/check-9adcfdfa.js";import{T as I}from"./chunks/trash-2-8f855002.js";import{X as B}from"./chunks/x-ec326bc0.js";import{S,a as E}from"./chunks/scroll-area-f7cd99a3.js";import{P as F}from"./chunks/plus-0381140e.js";import{s as z}from"./chunks/style-inject.es-e87a8d02.js";import"./chunks/index-8dc6d938.js";import"react-dom";import"./chunks/index-91a5b8d5.js";import"./chunks/index-b273f426.js";import"./chunks/index-aaeb33b0.js";import"./chunks/index-325e2e09.js";import"./chunks/index-70f4e709.js";import"./chunks/index-7725d7e0.js";import"./chunks/index-13505606.js";import"./chunks/utils-de9c4c2b.js";import"./chunks/createLucideIcon-70ab5429.js";import"./chunks/input-2708c7f4.js";import"./chunks/popover-53c769ba.js";import"./chunks/index-842a4484.js";import"./chunks/Combination-ee85502b.js";import"./chunks/chevron-down-abe5f871.js";import"./chunks/index-056e5c06.js";const L=o=>{var e;if(v.isText(o))return o.text;if("object"==typeof o&&null!==o&&"children"in o){const r=o.children;return null!==(e=null==r?void 0:r.map(L).join("\n"))&&void 0!==e?e:""}return""};z("[data-code-group-container] [data-state=active]{background-color:var(--code-group-tab-active-bg)!important;border-bottom-color:var(--code-group-tab-active-fg)!important;color:var(--code-group-tab-active-fg)!important}[data-code-group-container] [data-state=inactive]{background-color:var(--code-group-tab-inactive-bg)!important;color:var(--code-group-tab-inactive-fg)!important}");const P={"code-group-container":{render:e=>{var t,i;const{attributes:n,children:c,blockId:u,element:v}=e,p=a(),b=null===(t=e.element.props)||void 0===t?void 0:t.theme;r(()=>{var o,e,r,t,i,n,a,l,c,d,s,u,v,g,p,m,h,f,k,j,y,w,x,O,N,C,T,I,B,S,E,F,z,L,P,H;if(window.yShiki){const G=window.yShiki.getTheme(b),A=null!==(t=null!==(e=null===(o=G.colors)||void 0===o?void 0:o["tab.activeBackground"])&&void 0!==e?e:null===(r=G.colors)||void 0===r?void 0:r["editorTab.activeBackground"])&&void 0!==t?t:G.bg,D={"code-group-tab-active-bg":A,"code-group-tab-inactive-bg":null!==(d=null!==(l=null!==(n=null===(i=G.colors)||void 0===i?void 0:i["tab.inactiveBackground"])&&void 0!==n?n:null===(a=G.colors)||void 0===a?void 0:a["editorTab.inactiveBackground"])&&void 0!==l?l:null===(c=G.colors)||void 0===c?void 0:c["editorGroupHeader.tabsBackground"])&&void 0!==d?d:G.bg,"code-group-tab-active-fg":null!==(g=null!==(u=null===(s=G.colors)||void 0===s?void 0:s["tab.activeForeground"])&&void 0!==u?u:null===(v=G.colors)||void 0===v?void 0:v["editorTab.activeForeground"])&&void 0!==g?g:G.fg,"code-group-tab-inactive-fg":null!==(j=null!==(f=null!==(m=null===(p=G.colors)||void 0===p?void 0:p["tab.inactiveForeground"])&&void 0!==m?m:null===(h=G.colors)||void 0===h?void 0:h["editorTab.inactiveForeground"])&&void 0!==f?f:null===(k=G.colors)||void 0===k?void 0:k.foreground)&&void 0!==j?j:G.fg,"code-group-tab-active-border":null!==(O=null!==(w=null===(y=G.colors)||void 0===y?void 0:y["tab.activeBorder"])&&void 0!==w?w:null===(x=G.colors)||void 0===x?void 0:x["editorTab.activeBorder"])&&void 0!==O?O:A,"code-group-tab-border":null!==(S=null!==(I=null!==(C=null===(N=G.colors)||void 0===N?void 0:N["tab.border"])&&void 0!==C?C:null===(T=G.colors)||void 0===T?void 0:T["editorGroupHeader.border"])&&void 0!==I?I:null===(B=G.colors)||void 0===B?void 0:B["editorGroup.border"])&&void 0!==S?S:"transparent","code-group-editor-bg":null!==(F=null===(E=G.colors)||void 0===E?void 0:E["editor.background"])&&void 0!==F?F:G.bg,"code-group-editor-fg":null!==(L=null===(z=G.colors)||void 0===z?void 0:z["editor.foreground"])&&void 0!==L?L:G.fg,"code-group-editor-cursor":null!==(H=null===(P=G.colors)||void 0===P?void 0:P["editorCursor.foreground"])&&void 0!==H?H:G.fg};Object.entries(D).forEach(([o,e])=>{document.documentElement.style.setProperty(`--${o}`,e)})}},[b]);return o("div",Object.assign({},n,{"data-code-group-container":!0,className:"w-full"},{children:o(g,Object.assign({value:null===(i=v.props)||void 0===i?void 0:i.activeTabId,onValueChange:o=>{const e=l.getBlockSlate(p,{id:u});e&&d.setNodes(e,{props:Object.assign(Object.assign({},v.props),{activeTabId:o})},{at:[0],match:o=>s.isElement(o)&&"code-group-container"===o.type})},className:"w-full"},{children:c}))}))}},"code-group-list":{render:r=>{const{attributes:t,children:i,blockId:n}=r,l=a();return e(S,Object.assign({className:"w-full"},{children:[e(m,Object.assign({},t,{className:"w-full relative justify-start h-8 rounded-none rounded-t-lg bg-transparent p-0 border-b border-x-0 border-t-0",style:{backgroundColor:"var(--code-group-tab-inactive-bg)",borderBottomColor:"var(--code-group-tab-border)"}},{children:[i,!l.readOnly&&o("button",Object.assign({type:"button",contentEditable:!1,onClick:o=>{l.readOnly||(o.preventDefault(),o.stopPropagation(),y.addTabItem(l,n))},className:"ml-1 flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-1.5 h-7",style:{color:"var(--code-group-tab-inactive-fg)"},title:"Add tab"},{children:o(F,{className:"h-3.5 w-3.5 shrink-0"})}))]})),o(E,{orientation:"horizontal"})]}))}},"code-group-item-heading":{render:r=>{const{attributes:t,children:i,element:n,blockId:s}=r,u=a();return e(b,Object.assign({},t,{value:n.id,className:"relative group/tab flex items-center gap-1.5 px-3 h-7 rounded-none rounded-t-lg border-b-2 border-transparent whitespace-nowrap text-xs font-normal transition-colors",style:{backgroundColor:"var(--code-group-tab-inactive-bg, hsl(var(--muted)))",color:"var(--code-group-tab-inactive-fg, hsl(var(--muted-foreground)))"}},{children:[o("div",Object.assign({className:"flex-1 min-w-0"},{children:i})),!u.readOnly&&o("span",Object.assign({contentEditable:!1,onClick:()=>{if(u.readOnly)return;const o=l.getBlockSlate(u,{id:s});if(!o)return;const e=c.getElementPath(u,{blockId:s,element:n});e&&(d.select(o,e),y.deleteTabItem(u,s,{tabId:n.id}))},className:"ml-1 flex items-center justify-center rounded-sm opacity-0 group-hover/tab:opacity-100 transition-opacity hover:bg-black/10 dark:hover:bg-white/10 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-0.5",style:{color:"inherit"},title:"Close tab"},{children:o(B,{className:"h-3 w-3 shrink-0"})}))]}))}},"code-group-content":{render:d=>{var v,g,b,m;const{attributes:B,children:S,element:E,blockId:F}=d,z=t(null),P=a(),H=null!==(g=null===(v=null==E?void 0:E.props)||void 0===v?void 0:v.language)&&void 0!==g?g:"javascript",G=i(()=>{var o,e,r;const t=l.getBlockSlate(P,{id:F});if(!t)return"github-dark";const i=null===(o=Array.from(u.nodes(t,{at:[0],match:o=>s.isElement(o)&&"code-group-container"===o.type})))||void 0===o?void 0:o[0];if(!i)return"github-dark";const[n]=i;return n&&null!==(r=null===(e=n.props)||void 0===e?void 0:e.theme)&&void 0!==r?r:"github-dark"},[P,F]),[A,D]=n(!1),[V,q]=n(!1),[R,$]=n({buttonForeground:""});r(()=>{var o,e,r,t;if(window.yShiki){const i=window.yShiki.getTheme(G);$({buttonForeground:null!==(t=null!==(e=null===(o=i.colors)||void 0===o?void 0:o["button.foreground"])&&void 0!==e?e:null===(r=i.colors)||void 0===r?void 0:r["icon.foreground"])&&void 0!==t?t:i.fg})}},[G]);const _=f(H),J=null!==(b=k.find(o=>o.value===H))&&void 0!==b?b:k[0];return o(p,Object.assign({},B,{value:null===(m=E.props)||void 0===m?void 0:m.referenceId,className:"rounded-b-lg mt-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0"},{children:e("div",Object.assign({className:"relative group/code-group-content overflow-hidden"},{children:[e("div",Object.assign({contentEditable:!1,className:"absolute top-2 right-2 z-20 flex items-center gap-2 opacity-0 group-hover/code-group-content:opacity-100 transition-opacity",style:{backgroundColor:"var(--code-group-tab-active-bg)",padding:"4px",borderRadius:"4px"}},{children:[o(O,{value:H,options:k,onValueChange:o=>{if(P.readOnly)return;const e=c.getElementPath(P,{blockId:F,element:E});e&&c.updateElement(P,{blockId:F,type:"code-group-content",props:Object.assign(Object.assign({},E.props),{language:o}),path:e})},currentLabel:J.label}),_&&o(N,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>h(void 0,void 0,void 0,function*(){var o;if(V)return;const e=null===(o=E.props)||void 0===o?void 0:o.referenceId;if(e){q(!0);try{yield y.beautifyTab(P,F,e)}finally{q(!1)}}}),disabled:V,title:"Beautify code",style:{color:R.buttonForeground||"var(--code-group-tab-active-fg)"}},{children:o(C,{className:"h-4 w-4 "+(V?"animate-pulse":"")})})),o(N,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{const o=L(E);x(o)&&(D(!0),setTimeout(()=>D(!1),1500))},title:A?"Copied!":"Copy code",style:{color:R.buttonForeground||"var(--code-group-tab-active-fg)"}},{children:o(A?T:w,{className:"h-4 w-4"})})),!P.readOnly&&o(N,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{var o;P.readOnly||y.deleteTabItem(P,F,{tabId:null===(o=E.props)||void 0===o?void 0:o.referenceId})},title:"Delete code",style:{color:R.buttonForeground||"var(--code-group-tab-active-fg)"}},{children:o(I,{className:"h-4 w-4"})}))]})),e("div",Object.assign({className:"relative bg-background overflow-hidden rounded-lg",style:{backgroundColor:"var(--code-group-editor-bg)",color:"var(--code-group-editor-fg)",caretColor:"var(--code-group-editor-cursor)"}},{children:[o("div",Object.assign({ref:z,className:"absolute inset-0 p-4 font-mono text-sm whitespace-pre overflow-auto pointer-events-none z-10 select-none",style:{lineHeight:"1.6",tabSize:2},contentEditable:!1,"aria-hidden":"true"},{children:o(j,{element:E,language:H,theme:G})})),o("div",Object.assign({className:"relative p-4 font-mono text-sm whitespace-pre overflow-auto",style:{lineHeight:"1.6",tabSize:2,color:"transparent",caretColor:"var(--code-group-editor-cursor)"},onScroll:o=>{z.current&&(z.current.scrollTop=o.currentTarget.scrollTop,z.current.scrollLeft=o.currentTarget.scrollLeft)}},{children:S}))]}))]}))}))}}};export{P as CodeGroupUI};
|
package/dist/code.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./chunks/_tslib-35bb891d.js";import{jsxs as o,jsx as t}from"react/jsx-runtime";import{useState as n,useMemo as r,useRef as a,useEffect as i,useCallback as s}from"react";import{CodeCommands as l,isLanguageSupported as c,SHIKI_CODE_LANGUAGES as d,SHIKI_CODE_THEMES as u,HighlightedCodeOverlay as m}from"@yoopta/code";import{useYooptaEditor as v,Blocks as g,Elements as b}from"@yoopta/editor";import{c as p,C as h}from"./chunks/index-e9d6a4a8.js";import{Editor as f,Element as k,Text as j}from"slate";import{S as x,L as y}from"./chunks/language-select-d2235078.js";import{B as C}from"./chunks/button-ecb0aed1.js";import{I as w}from"./chunks/input-2708c7f4.js";import{P as N,a as O,b as B}from"./chunks/popover-53c769ba.js";import{c as L}from"./chunks/utils-de9c4c2b.js";import{C as T}from"./chunks/chevron-down-abe5f871.js";import{S}from"./chunks/sparkles-c8608d1b.js";import{C as E}from"./chunks/check-9adcfdfa.js";import{T as I}from"./chunks/trash-2-8f855002.js";import"./chunks/createLucideIcon-70ab5429.js";import"./chunks/index-8dc6d938.js";import"react-dom";import"./chunks/index-91a5b8d5.js";import"./chunks/index-842a4484.js";import"./chunks/index-70f4e709.js";import"./chunks/Combination-ee85502b.js";import"./chunks/index-325e2e09.js";import"./chunks/index-7725d7e0.js";const z=({value:e,options:a,onValueChange:i,currentLabel:s})=>{const[l,c]=n(!1),[d,u]=n(""),m=r(()=>{if(!d)return a;const e=d.toLowerCase();return a.filter(o=>o.label.toLowerCase().includes(e)||o.value.toLowerCase().includes(e))},[d,a]);return o(N,Object.assign({open:l,onOpenChange:c},{children:[t(O,Object.assign({asChild:!0},{children:o(C,Object.assign({variant:"outline",size:"sm",className:"h-7 gap-1.5 text-xs",contentEditable:!1},{children:[s,t(T,{className:"h-3 w-3 opacity-50"})]}))})),t(B,Object.assign({className:"w-64 p-0",align:"start",contentEditable:!1,onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()},{children:o("div",Object.assign({className:"p-2"},{children:[o("div",Object.assign({className:"relative mb-2"},{children:[t(x,{className:"absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),t(w,{placeholder:"Search theme...",value:d,onChange:e=>u(e.target.value),className:"h-8 pl-7 text-xs",autoFocus:!0})]})),t("div",Object.assign({className:"max-h-[200px] overflow-y-auto"},{children:0===m.length?t("div",Object.assign({className:"px-2 py-4 text-center text-sm text-muted-foreground"},{children:"No themes found"})):t("div",Object.assign({className:"space-y-0.5"},{children:m.map(o=>t("button",Object.assign({type:"button",onClick:()=>{return e=o.value,i(e),c(!1),void u("");var e},className:L("w-full rounded-sm px-2 py-1.5 text-left text-xs transition-colors","hover:bg-accent hover:text-accent-foreground",e===o.value&&"bg-accent text-accent-foreground")},{children:o.label}),o.value))}))}))]}))}))]}))},F=e=>{var o;if(j.isText(e))return e.text;if("object"==typeof e&&null!==e&&"children"in e){const t=e.children;return null!==(o=null==t?void 0:t.map(F).join("\n"))&&void 0!==o?o:""}return""},P={code:{render:({attributes:r,children:j,element:x,blockId:w})=>{var N,O,B,L,T,P;const A=v(),V=null!==(O=null===(N=x.props)||void 0===N?void 0:N.language)&&void 0!==O?O:"javascript",D=null!==(L=null===(B=x.props)||void 0===B?void 0:B.theme)&&void 0!==L?L:"github-dark",H=a(null),[M,_]=n(!1),[q,G]=n(!1),[J,K]=n({background:"",foreground:"",caret:"",tabActiveBackground:"",tabInactiveBackground:"",buttonForeground:""});i(()=>{var e,o,t,n,r,a,i,s,l,c,d,u,m,v;if(window.yShiki){const g=window.yShiki.getTheme(D);K({background:g.bg,foreground:g.fg,caret:null!==(o=null===(e=g.colors)||void 0===e?void 0:e["editorCursor.foreground"])&&void 0!==o?o:g.fg,tabActiveBackground:null!==(a=null!==(n=null===(t=g.colors)||void 0===t?void 0:t["editorTab.activeBackground"])&&void 0!==n?n:null===(r=g.colors)||void 0===r?void 0:r["tab.activeBackground"])&&void 0!==a?a:g.bg,tabInactiveBackground:null!==(c=null!==(s=null===(i=g.colors)||void 0===i?void 0:i["editorTab.inactiveBackground"])&&void 0!==s?s:null===(l=g.colors)||void 0===l?void 0:l["tab.inactiveBackground"])&&void 0!==c?c:g.bg,buttonForeground:null!==(v=null!==(u=null===(d=g.colors)||void 0===d?void 0:d["button.foreground"])&&void 0!==u?u:null===(m=g.colors)||void 0===m?void 0:m["icon.foreground"])&&void 0!==v?v:g.fg})}},[D]);const Q=s(()=>{const e=F(x);p(e)&&(_(!0),setTimeout(()=>_(!1),1500))},[x]),R=s(()=>{if(A.readOnly)return;const e=g.getBlockSlate(A,{id:w});if(!e)return;const o=b.getElementPath(A,{blockId:w,element:x});if(!o)return;const t=o?f.parent(e,o):void 0;t&&k.isElement(t[0])&&!f.isEditor(t[0])?b.deleteElement(A,{blockId:w,type:"code",path:o}):g.deleteBlock(A,{blockId:w,focus:!0})},[A,w,x]),U=s(e=>{l.updateCodeLanguage(A,w,e)},[A,w]),W=s(e=>{l.updateCodeTheme(A,w,e)},[A,w]),X=s(()=>e(void 0,void 0,void 0,function*(){if(!q){G(!0);try{yield l.beautifyCode(A,w)}finally{G(!1)}}}),[A,w,q]),Y=c(V),Z=null!==(T=d.find(e=>e.value===V))&&void 0!==T?T:d[0],$=null!==(P=u.find(e=>e.value===D))&&void 0!==P?P:u[0];return o("div",Object.assign({},r,{className:"relative my-2 group/code-block rounded-lg border border-border bg-muted/50 overflow-hidden"},{children:[o("div",Object.assign({contentEditable:!1,className:"flex items-center justify-between px-4 py-2 border-b border-border select-none",style:{backgroundColor:J.tabActiveBackground||void 0}},{children:[o("div",Object.assign({className:"flex items-center gap-2"},{children:[t(y,{value:V,options:d,onValueChange:e=>U(e),currentLabel:Z.label}),t(z,{value:D,options:u,onValueChange:e=>W(e),currentLabel:$.label})]})),o("div",Object.assign({className:"flex items-center gap-1 opacity-0 group-hover/code-block:opacity-100 transition-opacity"},{children:[Y&&t(C,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:X,disabled:q,title:"Beautify code",style:{color:J.buttonForeground||void 0}},{children:t(S,{className:"h-4 w-4 "+(q?"animate-pulse":"")})})),t(C,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:Q,title:M?"Copied!":"Copy code",style:{color:J.buttonForeground||void 0}},{children:t(M?E:h,{className:"h-4 w-4"})})),!A.readOnly&&t(C,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:R,title:"Delete code block",style:{color:J.buttonForeground||void 0}},{children:t(I,{className:"h-4 w-4"})}))]}))]})),o("div",Object.assign({className:"relative bg-background overflow-hidden",style:{backgroundColor:J.background,color:J.foreground,caretColor:J.caret}},{children:[t("div",Object.assign({ref:H,className:"absolute inset-0 p-4 font-mono text-sm whitespace-pre overflow-auto pointer-events-none z-10 select-none",style:{lineHeight:"1.6",tabSize:2},contentEditable:!1,"aria-hidden":"true"},{children:t(m,{element:x,language:V,theme:D})})),t("div",Object.assign({className:"relative p-4 font-mono text-sm whitespace-pre overflow-auto",style:{lineHeight:"1.6",tabSize:2,color:"transparent",caretColor:J.caret},onScroll:e=>{H.current&&(H.current.scrollTop=e.currentTarget.scrollTop,H.current.scrollLeft=e.currentTarget.scrollLeft)}},{children:j}))]}))]}))}}};export{P as CodeUI};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"divider.d.ts","sourceRoot":"","sources":["../../../src/divider/elements/divider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAgB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"divider.d.ts","sourceRoot":"","sources":["../../../src/divider/elements/divider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAgB,MAAM,gBAAgB,CAAC;AA6E7E,eAAO,MAAM,OAAO,UAAW,wBAAwB,4CAsEtD,CAAC"}
|