@blocknote/shadcn 0.14.0 → 0.14.1

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.
@@ -1,4 +1,4 @@
1
- (function(j,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("react"),require("@blocknote/react"),require("class-variance-authority"),require("clsx"),require("tailwind-merge"),require("@radix-ui/react-slot"),require("@radix-ui/react-dropdown-menu"),require("lucide-react"),require("react-hook-form"),require("@radix-ui/react-label"),require("@radix-ui/react-popover"),require("@radix-ui/react-select"),require("@radix-ui/react-tabs"),require("@radix-ui/react-toggle"),require("@radix-ui/react-tooltip"),require("@blocknote/core")):typeof define=="function"&&define.amd?define(["exports","react","@blocknote/react","class-variance-authority","clsx","tailwind-merge","@radix-ui/react-slot","@radix-ui/react-dropdown-menu","lucide-react","react-hook-form","@radix-ui/react-label","@radix-ui/react-popover","@radix-ui/react-select","@radix-ui/react-tabs","@radix-ui/react-toggle","@radix-ui/react-tooltip","@blocknote/core"],y):(j=typeof globalThis<"u"?globalThis:j||self,y(j["blocknote-shadcn"]={},j.React,j.react,j.classVarianceAuthority,j.clsx,j.tailwindMerge,j.reactSlot,j.DropdownMenuPrimitive,j.lucideReact,j.reactHookForm,j.LabelPrimitive,j.PopoverPrimitive,j.SelectPrimitive,j.TabsPrimitive,j.TogglePrimitive,j.TooltipPrimitive,j.core))})(this,function(j,y,ve,H,ht,yt,ge,wt,L,oe,Ct,Nt,jt,Tt,St,Rt,C){"use strict";function B(t){if(t&&typeof t=="object"&&"default"in t)return t;const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:()=>t[r]})}}return n.default=t,Object.freeze(n)}const p=B(y),T=B(wt),be=B(Ct),X=B(Nt),E=B(jt),V=B(Tt),xe=B(St),Y=B(Rt);var ae={exports:{}},U={};/**
1
+ (function(N,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react"),require("@blocknote/react"),require("class-variance-authority"),require("clsx"),require("tailwind-merge"),require("@radix-ui/react-slot"),require("@radix-ui/react-dropdown-menu"),require("lucide-react"),require("react-hook-form"),require("@radix-ui/react-label"),require("@radix-ui/react-popover"),require("@radix-ui/react-select"),require("@radix-ui/react-tabs"),require("@radix-ui/react-toggle"),require("@radix-ui/react-tooltip"),require("@blocknote/core")):typeof define=="function"&&define.amd?define(["exports","react","@blocknote/react","class-variance-authority","clsx","tailwind-merge","@radix-ui/react-slot","@radix-ui/react-dropdown-menu","lucide-react","react-hook-form","@radix-ui/react-label","@radix-ui/react-popover","@radix-ui/react-select","@radix-ui/react-tabs","@radix-ui/react-toggle","@radix-ui/react-tooltip","@blocknote/core"],x):(N=typeof globalThis<"u"?globalThis:N||self,x(N["blocknote-shadcn"]={},N.React,N.react,N.classVarianceAuthority,N.clsx,N.tailwindMerge,N.reactSlot,N.DropdownMenuPrimitive,N.lucideReact,N.reactHookForm,N.LabelPrimitive,N.PopoverPrimitive,N.SelectPrimitive,N.TabsPrimitive,N.TogglePrimitive,N.TooltipPrimitive,N.core))})(this,function(N,x,Z,Q,wt,Ct,xe,jt,L,se,Nt,Tt,St,Rt,Et,_t,C){"use strict";function B(t){if(t&&typeof t=="object"&&"default"in t)return t;const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:()=>t[r]})}}return n.default=t,Object.freeze(n)}const m=B(x),T=B(jt),he=B(Nt),ee=B(Tt),E=B(St),V=B(Rt),ye=B(Et),U=B(_t);var ie={exports:{}},K={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var he;function Et(){if(he)return U;he=1;var t=p.default,n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(x,m,v){var b,_={},D=null,A=null;v!==void 0&&(D=""+v),m.key!==void 0&&(D=""+m.key),m.ref!==void 0&&(A=m.ref);for(b in m)a.call(m,b)&&!l.hasOwnProperty(b)&&(_[b]=m[b]);if(x&&x.defaultProps)for(b in m=x.defaultProps,m)_[b]===void 0&&(_[b]=m[b]);return{$$typeof:n,type:x,key:D,ref:A,props:_,_owner:i.current}}return U.Fragment=r,U.jsx=c,U.jsxs=c,U}var G={};/**
9
+ */var we;function Pt(){if(we)return K;we=1;var t=m.default,n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function c(h,v,f){var g,_={},D=null,z=null;f!==void 0&&(D=""+f),v.key!==void 0&&(D=""+v.key),v.ref!==void 0&&(z=v.ref);for(g in v)a.call(v,g)&&!d.hasOwnProperty(g)&&(_[g]=v[g]);if(h&&h.defaultProps)for(g in v=h.defaultProps,v)_[g]===void 0&&(_[g]=v[g]);return{$$typeof:n,type:h,key:D,ref:z,props:_,_owner:i.current}}return K.Fragment=r,K.jsx=c,K.jsxs=c,K}var J={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,15 +14,20 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var ye;function _t(){return ye||(ye=1,process.env.NODE_ENV!=="production"&&function(){var t=p.default,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),x=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),Je=Symbol.iterator,kr="@@iterator";function Fr(e){if(e===null||typeof e!="object")return null;var s=Je&&e[Je]||e[kr];return typeof s=="function"?s:null}var z=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function I(e){{for(var s=arguments.length,d=new Array(s>1?s-1:0),f=1;f<s;f++)d[f-1]=arguments[f];Or("error",e,d)}}function Or(e,s,d){{var f=z.ReactDebugCurrentFrame,w=f.getStackAddendum();w!==""&&(s+="%s",d=d.concat([w]));var N=d.map(function(h){return String(h)});N.unshift("Warning: "+s),Function.prototype.apply.call(console[e],console,N)}}var Lr=!1,Br=!1,Vr=!1,$r=!1,Ar=!1,Ke;Ke=Symbol.for("react.module.reference");function zr(e){return!!(typeof e=="string"||typeof e=="function"||e===a||e===l||Ar||e===i||e===v||e===b||$r||e===A||Lr||Br||Vr||typeof e=="object"&&e!==null&&(e.$$typeof===D||e.$$typeof===_||e.$$typeof===c||e.$$typeof===x||e.$$typeof===m||e.$$typeof===Ke||e.getModuleId!==void 0))}function Wr(e,s,d){var f=e.displayName;if(f)return f;var w=s.displayName||s.name||"";return w!==""?d+"("+w+")":d}function He(e){return e.displayName||"Context"}function F(e){if(e==null)return null;if(typeof e.tag=="number"&&I("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case a:return"Fragment";case r:return"Portal";case l:return"Profiler";case i:return"StrictMode";case v:return"Suspense";case b:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case x:var s=e;return He(s)+".Consumer";case c:var d=e;return He(d._context)+".Provider";case m:return Wr(e,e.render,"ForwardRef");case _:var f=e.displayName||null;return f!==null?f:F(e.type)||"Memo";case D:{var w=e,N=w._payload,h=w._init;try{return F(h(N))}catch{return null}}}return null}var $=Object.assign,J=0,Xe,Ze,Qe,et,tt,rt,nt;function ot(){}ot.__reactDisabledLog=!0;function qr(){{if(J===0){Xe=console.log,Ze=console.info,Qe=console.warn,et=console.error,tt=console.group,rt=console.groupCollapsed,nt=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ot,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}J++}}function Yr(){{if(J--,J===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},e,{value:Xe}),info:$({},e,{value:Ze}),warn:$({},e,{value:Qe}),error:$({},e,{value:et}),group:$({},e,{value:tt}),groupCollapsed:$({},e,{value:rt}),groupEnd:$({},e,{value:nt})})}J<0&&I("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ie=z.ReactCurrentDispatcher,de;function Q(e,s,d){{if(de===void 0)try{throw Error()}catch(w){var f=w.stack.trim().match(/\n( *(at )?)/);de=f&&f[1]||""}return`
18
- `+de+e}}var le=!1,ee;{var Ur=typeof WeakMap=="function"?WeakMap:Map;ee=new Ur}function at(e,s){if(!e||le)return"";{var d=ee.get(e);if(d!==void 0)return d}var f;le=!0;var w=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var N;N=ie.current,ie.current=null,qr();try{if(s){var h=function(){throw Error()};if(Object.defineProperty(h.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(h,[])}catch(O){f=O}Reflect.construct(e,[],h)}else{try{h.call()}catch(O){f=O}e.call(h.prototype)}}else{try{throw Error()}catch(O){f=O}e()}}catch(O){if(O&&f&&typeof O.stack=="string"){for(var g=O.stack.split(`
19
- `),M=f.stack.split(`
20
- `),R=g.length-1,P=M.length-1;R>=1&&P>=0&&g[R]!==M[P];)P--;for(;R>=1&&P>=0;R--,P--)if(g[R]!==M[P]){if(R!==1||P!==1)do if(R--,P--,P<0||g[R]!==M[P]){var k=`
21
- `+g[R].replace(" at new "," at ");return e.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",e.displayName)),typeof e=="function"&&ee.set(e,k),k}while(R>=1&&P>=0);break}}}finally{le=!1,ie.current=N,Yr(),Error.prepareStackTrace=w}var q=e?e.displayName||e.name:"",xt=q?Q(q):"";return typeof e=="function"&&ee.set(e,xt),xt}function Gr(e,s,d){return at(e,!1)}function Jr(e){var s=e.prototype;return!!(s&&s.isReactComponent)}function te(e,s,d){if(e==null)return"";if(typeof e=="function")return at(e,Jr(e));if(typeof e=="string")return Q(e);switch(e){case v:return Q("Suspense");case b:return Q("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case m:return Gr(e.render);case _:return te(e.type,s,d);case D:{var f=e,w=f._payload,N=f._init;try{return te(N(w),s,d)}catch{}}}return""}var re=Object.prototype.hasOwnProperty,st={},it=z.ReactDebugCurrentFrame;function ne(e){if(e){var s=e._owner,d=te(e.type,e._source,s?s.type:null);it.setExtraStackFrame(d)}else it.setExtraStackFrame(null)}function Kr(e,s,d,f,w){{var N=Function.call.bind(re);for(var h in e)if(N(e,h)){var g=void 0;try{if(typeof e[h]!="function"){var M=Error((f||"React class")+": "+d+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw M.name="Invariant Violation",M}g=e[h](s,h,f,d,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(R){g=R}g&&!(g instanceof Error)&&(ne(w),I("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",f||"React class",d,h,typeof g),ne(null)),g instanceof Error&&!(g.message in st)&&(st[g.message]=!0,ne(w),I("Failed %s type: %s",d,g.message),ne(null))}}}var Hr=Array.isArray;function ce(e){return Hr(e)}function Xr(e){{var s=typeof Symbol=="function"&&Symbol.toStringTag,d=s&&e[Symbol.toStringTag]||e.constructor.name||"Object";return d}}function Zr(e){try{return dt(e),!1}catch{return!0}}function dt(e){return""+e}function lt(e){if(Zr(e))return I("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Xr(e)),dt(e)}var K=z.ReactCurrentOwner,Qr={key:!0,ref:!0,__self:!0,__source:!0},ct,ut,ue;ue={};function en(e){if(re.call(e,"ref")){var s=Object.getOwnPropertyDescriptor(e,"ref").get;if(s&&s.isReactWarning)return!1}return e.ref!==void 0}function tn(e){if(re.call(e,"key")){var s=Object.getOwnPropertyDescriptor(e,"key").get;if(s&&s.isReactWarning)return!1}return e.key!==void 0}function rn(e,s){if(typeof e.ref=="string"&&K.current&&s&&K.current.stateNode!==s){var d=F(K.current.type);ue[d]||(I('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',F(K.current.type),e.ref),ue[d]=!0)}}function nn(e,s){{var d=function(){ct||(ct=!0,I("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",s))};d.isReactWarning=!0,Object.defineProperty(e,"key",{get:d,configurable:!0})}}function on(e,s){{var d=function(){ut||(ut=!0,I("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",s))};d.isReactWarning=!0,Object.defineProperty(e,"ref",{get:d,configurable:!0})}}var an=function(e,s,d,f,w,N,h){var g={$$typeof:n,type:e,key:s,ref:d,props:h,_owner:N};return g._store={},Object.defineProperty(g._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(g,"_self",{configurable:!1,enumerable:!1,writable:!1,value:f}),Object.defineProperty(g,"_source",{configurable:!1,enumerable:!1,writable:!1,value:w}),Object.freeze&&(Object.freeze(g.props),Object.freeze(g)),g};function sn(e,s,d,f,w){{var N,h={},g=null,M=null;d!==void 0&&(lt(d),g=""+d),tn(s)&&(lt(s.key),g=""+s.key),en(s)&&(M=s.ref,rn(s,w));for(N in s)re.call(s,N)&&!Qr.hasOwnProperty(N)&&(h[N]=s[N]);if(e&&e.defaultProps){var R=e.defaultProps;for(N in R)h[N]===void 0&&(h[N]=R[N])}if(g||M){var P=typeof e=="function"?e.displayName||e.name||"Unknown":e;g&&nn(h,P),M&&on(h,P)}return an(e,g,M,w,f,K.current,h)}}var fe=z.ReactCurrentOwner,ft=z.ReactDebugCurrentFrame;function W(e){if(e){var s=e._owner,d=te(e.type,e._source,s?s.type:null);ft.setExtraStackFrame(d)}else ft.setExtraStackFrame(null)}var pe;pe=!1;function me(e){return typeof e=="object"&&e!==null&&e.$$typeof===n}function pt(){{if(fe.current){var e=F(fe.current.type);if(e)return`
17
+ */var Ce;function Dt(){return Ce||(Ce=1,process.env.NODE_ENV!=="production"&&function(){var t=m.default,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),h=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),z=Symbol.for("react.offscreen"),He=Symbol.iterator,Fr="@@iterator";function Lr(e){if(e===null||typeof e!="object")return null;var s=He&&e[He]||e[Fr];return typeof s=="function"?s:null}var W=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function I(e){{for(var s=arguments.length,l=new Array(s>1?s-1:0),p=1;p<s;p++)l[p-1]=arguments[p];Br("error",e,l)}}function Br(e,s,l){{var p=W.ReactDebugCurrentFrame,w=p.getStackAddendum();w!==""&&(s+="%s",l=l.concat([w]));var j=l.map(function(y){return String(y)});j.unshift("Warning: "+s),Function.prototype.apply.call(console[e],console,j)}}var Vr=!1,Ar=!1,$r=!1,zr=!1,Wr=!1,Xe;Xe=Symbol.for("react.module.reference");function qr(e){return!!(typeof e=="string"||typeof e=="function"||e===a||e===d||Wr||e===i||e===f||e===g||zr||e===z||Vr||Ar||$r||typeof e=="object"&&e!==null&&(e.$$typeof===D||e.$$typeof===_||e.$$typeof===c||e.$$typeof===h||e.$$typeof===v||e.$$typeof===Xe||e.getModuleId!==void 0))}function Yr(e,s,l){var p=e.displayName;if(p)return p;var w=s.displayName||s.name||"";return w!==""?l+"("+w+")":l}function Ze(e){return e.displayName||"Context"}function F(e){if(e==null)return null;if(typeof e.tag=="number"&&I("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case a:return"Fragment";case r:return"Portal";case d:return"Profiler";case i:return"StrictMode";case f:return"Suspense";case g:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case h:var s=e;return Ze(s)+".Consumer";case c:var l=e;return Ze(l._context)+".Provider";case v:return Yr(e,e.render,"ForwardRef");case _:var p=e.displayName||null;return p!==null?p:F(e.type)||"Memo";case D:{var w=e,j=w._payload,y=w._init;try{return F(y(j))}catch{return null}}}return null}var A=Object.assign,G=0,Qe,et,tt,rt,nt,ot,at;function st(){}st.__reactDisabledLog=!0;function Ur(){{if(G===0){Qe=console.log,et=console.info,tt=console.warn,rt=console.error,nt=console.group,ot=console.groupCollapsed,at=console.groupEnd;var e={configurable:!0,enumerable:!0,value:st,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}G++}}function Kr(){{if(G--,G===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},e,{value:Qe}),info:A({},e,{value:et}),warn:A({},e,{value:tt}),error:A({},e,{value:rt}),group:A({},e,{value:nt}),groupCollapsed:A({},e,{value:ot}),groupEnd:A({},e,{value:at})})}G<0&&I("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var de=W.ReactCurrentDispatcher,ce;function re(e,s,l){{if(ce===void 0)try{throw Error()}catch(w){var p=w.stack.trim().match(/\n( *(at )?)/);ce=p&&p[1]||""}return`
18
+ `+ce+e}}var ue=!1,ne;{var Jr=typeof WeakMap=="function"?WeakMap:Map;ne=new Jr}function it(e,s){if(!e||ue)return"";{var l=ne.get(e);if(l!==void 0)return l}var p;ue=!0;var w=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var j;j=de.current,de.current=null,Ur();try{if(s){var y=function(){throw Error()};if(Object.defineProperty(y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(y,[])}catch(k){p=k}Reflect.construct(e,[],y)}else{try{y.call()}catch(k){p=k}e.call(y.prototype)}}else{try{throw Error()}catch(k){p=k}e()}}catch(k){if(k&&p&&typeof k.stack=="string"){for(var b=k.stack.split(`
19
+ `),M=p.stack.split(`
20
+ `),R=b.length-1,P=M.length-1;R>=1&&P>=0&&b[R]!==M[P];)P--;for(;R>=1&&P>=0;R--,P--)if(b[R]!==M[P]){if(R!==1||P!==1)do if(R--,P--,P<0||b[R]!==M[P]){var O=`
21
+ `+b[R].replace(" at new "," at ");return e.displayName&&O.includes("<anonymous>")&&(O=O.replace("<anonymous>",e.displayName)),typeof e=="function"&&ne.set(e,O),O}while(R>=1&&P>=0);break}}}finally{ue=!1,de.current=j,Kr(),Error.prepareStackTrace=w}var Y=e?e.displayName||e.name:"",$=Y?re(Y):"";return typeof e=="function"&&ne.set(e,$),$}function Gr(e,s,l){return it(e,!1)}function Hr(e){var s=e.prototype;return!!(s&&s.isReactComponent)}function oe(e,s,l){if(e==null)return"";if(typeof e=="function")return it(e,Hr(e));if(typeof e=="string")return re(e);switch(e){case f:return re("Suspense");case g:return re("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case v:return Gr(e.render);case _:return oe(e.type,s,l);case D:{var p=e,w=p._payload,j=p._init;try{return oe(j(w),s,l)}catch{}}}return""}var H=Object.prototype.hasOwnProperty,lt={},dt=W.ReactDebugCurrentFrame;function ae(e){if(e){var s=e._owner,l=oe(e.type,e._source,s?s.type:null);dt.setExtraStackFrame(l)}else dt.setExtraStackFrame(null)}function Xr(e,s,l,p,w){{var j=Function.call.bind(H);for(var y in e)if(j(e,y)){var b=void 0;try{if(typeof e[y]!="function"){var M=Error((p||"React class")+": "+l+" type `"+y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[y]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw M.name="Invariant Violation",M}b=e[y](s,y,p,l,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(R){b=R}b&&!(b instanceof Error)&&(ae(w),I("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",p||"React class",l,y,typeof b),ae(null)),b instanceof Error&&!(b.message in lt)&&(lt[b.message]=!0,ae(w),I("Failed %s type: %s",l,b.message),ae(null))}}}var Zr=Array.isArray;function fe(e){return Zr(e)}function Qr(e){{var s=typeof Symbol=="function"&&Symbol.toStringTag,l=s&&e[Symbol.toStringTag]||e.constructor.name||"Object";return l}}function en(e){try{return ct(e),!1}catch{return!0}}function ct(e){return""+e}function ut(e){if(en(e))return I("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Qr(e)),ct(e)}var X=W.ReactCurrentOwner,tn={key:!0,ref:!0,__self:!0,__source:!0},ft,pt,pe;pe={};function rn(e){if(H.call(e,"ref")){var s=Object.getOwnPropertyDescriptor(e,"ref").get;if(s&&s.isReactWarning)return!1}return e.ref!==void 0}function nn(e){if(H.call(e,"key")){var s=Object.getOwnPropertyDescriptor(e,"key").get;if(s&&s.isReactWarning)return!1}return e.key!==void 0}function on(e,s){if(typeof e.ref=="string"&&X.current&&s&&X.current.stateNode!==s){var l=F(X.current.type);pe[l]||(I('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',F(X.current.type),e.ref),pe[l]=!0)}}function an(e,s){{var l=function(){ft||(ft=!0,I("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",s))};l.isReactWarning=!0,Object.defineProperty(e,"key",{get:l,configurable:!0})}}function sn(e,s){{var l=function(){pt||(pt=!0,I("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",s))};l.isReactWarning=!0,Object.defineProperty(e,"ref",{get:l,configurable:!0})}}var ln=function(e,s,l,p,w,j,y){var b={$$typeof:n,type:e,key:s,ref:l,props:y,_owner:j};return b._store={},Object.defineProperty(b._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(b,"_self",{configurable:!1,enumerable:!1,writable:!1,value:p}),Object.defineProperty(b,"_source",{configurable:!1,enumerable:!1,writable:!1,value:w}),Object.freeze&&(Object.freeze(b.props),Object.freeze(b)),b};function dn(e,s,l,p,w){{var j,y={},b=null,M=null;l!==void 0&&(ut(l),b=""+l),nn(s)&&(ut(s.key),b=""+s.key),rn(s)&&(M=s.ref,on(s,w));for(j in s)H.call(s,j)&&!tn.hasOwnProperty(j)&&(y[j]=s[j]);if(e&&e.defaultProps){var R=e.defaultProps;for(j in R)y[j]===void 0&&(y[j]=R[j])}if(b||M){var P=typeof e=="function"?e.displayName||e.name||"Unknown":e;b&&an(y,P),M&&sn(y,P)}return ln(e,b,M,w,p,X.current,y)}}var me=W.ReactCurrentOwner,mt=W.ReactDebugCurrentFrame;function q(e){if(e){var s=e._owner,l=oe(e.type,e._source,s?s.type:null);mt.setExtraStackFrame(l)}else mt.setExtraStackFrame(null)}var ve;ve=!1;function ge(e){return typeof e=="object"&&e!==null&&e.$$typeof===n}function vt(){{if(me.current){var e=F(me.current.type);if(e)return`
22
22
 
23
- Check the render method of \``+e+"`."}return""}}function dn(e){{if(e!==void 0){var s=e.fileName.replace(/^.*[\\\/]/,""),d=e.lineNumber;return`
23
+ Check the render method of \``+e+"`."}return""}}function cn(e){{if(e!==void 0){var s=e.fileName.replace(/^.*[\\\/]/,""),l=e.lineNumber;return`
24
24
 
25
- Check your code at `+s+":"+d+"."}return""}}var mt={};function ln(e){{var s=pt();if(!s){var d=typeof e=="string"?e:e.displayName||e.name;d&&(s=`
25
+ Check your code at `+s+":"+l+"."}return""}}var gt={};function un(e){{var s=vt();if(!s){var l=typeof e=="string"?e:e.displayName||e.name;l&&(s=`
26
26
 
27
- Check the top-level render call using <`+d+">.")}return s}}function vt(e,s){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var d=ln(s);if(mt[d])return;mt[d]=!0;var f="";e&&e._owner&&e._owner!==fe.current&&(f=" It was passed a child from "+F(e._owner.type)+"."),W(e),I('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',d,f),W(null)}}function gt(e,s){{if(typeof e!="object")return;if(ce(e))for(var d=0;d<e.length;d++){var f=e[d];me(f)&&vt(f,s)}else if(me(e))e._store&&(e._store.validated=!0);else if(e){var w=Fr(e);if(typeof w=="function"&&w!==e.entries)for(var N=w.call(e),h;!(h=N.next()).done;)me(h.value)&&vt(h.value,s)}}}function cn(e){{var s=e.type;if(s==null||typeof s=="string")return;var d;if(typeof s=="function")d=s.propTypes;else if(typeof s=="object"&&(s.$$typeof===m||s.$$typeof===_))d=s.propTypes;else return;if(d){var f=F(s);Kr(d,e.props,"prop",f,e)}else if(s.PropTypes!==void 0&&!pe){pe=!0;var w=F(s);I("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",w||"Unknown")}typeof s.getDefaultProps=="function"&&!s.getDefaultProps.isReactClassApproved&&I("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function un(e){{for(var s=Object.keys(e.props),d=0;d<s.length;d++){var f=s[d];if(f!=="children"&&f!=="key"){W(e),I("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",f),W(null);break}}e.ref!==null&&(W(e),I("Invalid attribute `ref` supplied to `React.Fragment`."),W(null))}}function bt(e,s,d,f,w,N){{var h=zr(e);if(!h){var g="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(g+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var M=dn(w);M?g+=M:g+=pt();var R;e===null?R="null":ce(e)?R="array":e!==void 0&&e.$$typeof===n?(R="<"+(F(e.type)||"Unknown")+" />",g=" Did you accidentally export a JSX literal instead of a component?"):R=typeof e,I("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",R,g)}var P=sn(e,s,d,w,N);if(P==null)return P;if(h){var k=s.children;if(k!==void 0)if(f)if(ce(k)){for(var q=0;q<k.length;q++)gt(k[q],e);Object.freeze&&Object.freeze(k)}else I("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else gt(k,e)}return e===a?un(P):cn(P),P}}function fn(e,s,d){return bt(e,s,d,!0)}function pn(e,s,d){return bt(e,s,d,!1)}var mn=pn,vn=fn;G.Fragment=a,G.jsx=mn,G.jsxs=vn}()),G}process.env.NODE_ENV==="production"?ae.exports=Et():ae.exports=_t();var o=ae.exports;function u(...t){return yt.twMerge(ht.clsx(t))}const Pt=H.cva("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Dt({className:t,variant:n,...r}){return o.jsx("div",{className:u(Pt({variant:n}),t),...r})}const It=H.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),we=p.forwardRef(({className:t,variant:n,size:r,asChild:a=!1,...i},l)=>{const c=a?ge.Slot:"button";return o.jsx(c,{className:u(It({variant:n,size:r,className:t})),ref:l,...i})});we.displayName="Button";const Ce=p.forwardRef(({className:t,...n},r)=>o.jsx("div",{ref:r,className:u("rounded-lg border bg-card text-card-foreground shadow-sm",t),...n}));Ce.displayName="Card";const Mt=p.forwardRef(({className:t,...n},r)=>o.jsx("div",{ref:r,className:u("flex flex-col space-y-1.5 p-6",t),...n}));Mt.displayName="CardHeader";const kt=p.forwardRef(({className:t,...n},r)=>o.jsx("h3",{ref:r,className:u("text-2xl font-semibold leading-none tracking-tight",t),...n}));kt.displayName="CardTitle";const Ft=p.forwardRef(({className:t,...n},r)=>o.jsx("p",{ref:r,className:u("text-sm text-muted-foreground",t),...n}));Ft.displayName="CardDescription";const Ne=p.forwardRef(({className:t,...n},r)=>o.jsx("div",{ref:r,className:u("p-6 pt-0",t),...n}));Ne.displayName="CardContent";const Ot=p.forwardRef(({className:t,...n},r)=>o.jsx("div",{ref:r,className:u("flex items-center p-6 pt-0",t),...n}));Ot.displayName="CardFooter";const Lt=T.Root,Bt=T.Trigger,Vt=T.Sub,je=p.forwardRef(({className:t,inset:n,children:r,...a},i)=>o.jsxs(T.SubTrigger,{ref:i,className:u("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",n&&"pl-8",t),...a,children:[r,o.jsx(L.ChevronRight,{className:"ml-auto h-4 w-4"})]}));je.displayName=T.SubTrigger.displayName;const Te=p.forwardRef(({className:t,...n},r)=>o.jsx(T.SubContent,{ref:r,className:u("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",t),...n}));Te.displayName=T.SubContent.displayName;const Se=p.forwardRef(({className:t,sideOffset:n=4,...r},a)=>o.jsx(T.Content,{ref:a,sideOffset:n,className:u("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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",t),...r}));Se.displayName=T.Content.displayName;const Re=p.forwardRef(({className:t,inset:n,...r},a)=>o.jsx(T.Item,{ref:a,className:u("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n&&"pl-8",t),...r}));Re.displayName=T.Item.displayName;const Ee=p.forwardRef(({className:t,children:n,checked:r,...a},i)=>o.jsxs(T.CheckboxItem,{ref:i,className:u("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:r,...a,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(T.ItemIndicator,{children:o.jsx(L.Check,{className:"h-4 w-4"})})}),n]}));Ee.displayName=T.CheckboxItem.displayName;const $t=p.forwardRef(({className:t,children:n,...r},a)=>o.jsxs(T.RadioItem,{ref:a,className:u("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...r,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(T.ItemIndicator,{children:o.jsx(L.Circle,{className:"h-2 w-2 fill-current"})})}),n]}));$t.displayName=T.RadioItem.displayName;const _e=p.forwardRef(({className:t,inset:n,...r},a)=>o.jsx(T.Label,{ref:a,className:u("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",t),...r}));_e.displayName=T.Label.displayName;const Pe=p.forwardRef(({className:t,...n},r)=>o.jsx(T.Separator,{ref:r,className:u("-mx-1 my-1 h-px bg-muted",t),...n}));Pe.displayName=T.Separator.displayName;const At=H.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),se=p.forwardRef(({className:t,...n},r)=>o.jsx(be.Root,{ref:r,className:u(At(),t),...n}));se.displayName=be.Root.displayName;const zt=oe.FormProvider,Wt=p.createContext({}),Z=()=>{const t=p.useContext(Wt),n=p.useContext(De),{getFieldState:r,formState:a}=oe.useFormContext(),i=r(t.name,a);if(!t)throw new Error("useFormField should be used within <FormField>");const{id:l}=n;return{id:l,name:t.name,formItemId:`${l}-form-item`,formDescriptionId:`${l}-form-item-description`,formMessageId:`${l}-form-item-message`,...i}},De=p.createContext({}),qt=p.forwardRef(({className:t,...n},r)=>{const a=p.useId();return o.jsx(De.Provider,{value:{id:a},children:o.jsx("div",{ref:r,className:u("space-y-2",t),...n})})});qt.displayName="FormItem";const Yt=p.forwardRef(({className:t,...n},r)=>{const{error:a,formItemId:i}=Z();return o.jsx(se,{ref:r,className:u(a&&"text-destructive",t),htmlFor:i,...n})});Yt.displayName="FormLabel";const Ut=p.forwardRef(({...t},n)=>{const{error:r,formItemId:a,formDescriptionId:i,formMessageId:l}=Z();return o.jsx(ge.Slot,{ref:n,id:a,"aria-describedby":r?`${i} ${l}`:`${i}`,"aria-invalid":!!r,...t})});Ut.displayName="FormControl";const Gt=p.forwardRef(({className:t,...n},r)=>{const{formDescriptionId:a}=Z();return o.jsx("p",{ref:r,id:a,className:u("text-sm text-muted-foreground",t),...n})});Gt.displayName="FormDescription";const Jt=p.forwardRef(({className:t,children:n,...r},a)=>{const{error:i,formMessageId:l}=Z(),c=i?String(i==null?void 0:i.message):n;return c?o.jsx("p",{ref:a,id:l,className:u("text-sm font-medium text-destructive",t),...r,children:c}):null});Jt.displayName="FormMessage";const Ie=p.forwardRef(({className:t,type:n,...r},a)=>o.jsx("input",{type:n,className:u("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:a,...r}));Ie.displayName="Input";const Kt=X.Root,Ht=X.Trigger,Me=p.forwardRef(({className:t,align:n="center",sideOffset:r=4,...a},i)=>o.jsx(X.Content,{ref:i,align:n,sideOffset:r,className:u("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",t),...a}));Me.displayName=X.Content.displayName;const Xt=E.Root,Zt=E.Value,ke=p.forwardRef(({className:t,children:n,...r},a)=>o.jsxs(E.Trigger,{ref:a,className:u("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...r,children:[n,o.jsx(E.Icon,{asChild:!0,children:o.jsx(L.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));ke.displayName=E.Trigger.displayName;const Fe=p.forwardRef(({className:t,...n},r)=>o.jsx(E.ScrollUpButton,{ref:r,className:u("flex cursor-default items-center justify-center py-1",t),...n,children:o.jsx(L.ChevronUp,{className:"h-4 w-4"})}));Fe.displayName=E.ScrollUpButton.displayName;const Oe=p.forwardRef(({className:t,...n},r)=>o.jsx(E.ScrollDownButton,{ref:r,className:u("flex cursor-default items-center justify-center py-1",t),...n,children:o.jsx(L.ChevronDown,{className:"h-4 w-4"})}));Oe.displayName=E.ScrollDownButton.displayName;const Le=p.forwardRef(({className:t,children:n,position:r="popper",...a},i)=>o.jsxs(E.Content,{ref:i,className:u("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,...a,children:[o.jsx(Fe,{}),o.jsx(E.Viewport,{className:u("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),o.jsx(Oe,{})]}));Le.displayName=E.Content.displayName;const Qt=p.forwardRef(({className:t,...n},r)=>o.jsx(E.Label,{ref:r,className:u("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...n}));Qt.displayName=E.Label.displayName;const Be=p.forwardRef(({className:t,children:n,...r},a)=>o.jsxs(E.Item,{ref:a,className:u("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...r,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(E.ItemIndicator,{children:o.jsx(L.Check,{className:"h-4 w-4"})})}),o.jsx(E.ItemText,{children:n})]}));Be.displayName=E.Item.displayName;const er=p.forwardRef(({className:t,...n},r)=>o.jsx(E.Separator,{ref:r,className:u("-mx-1 my-1 h-px bg-muted",t),...n}));er.displayName=E.Separator.displayName;const tr=V.Root,Ve=p.forwardRef(({className:t,...n},r)=>o.jsx(V.List,{ref:r,className:u("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t),...n}));Ve.displayName=V.List.displayName;const $e=p.forwardRef(({className:t,...n},r)=>o.jsx(V.Trigger,{ref:r,className:u("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 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-sm",t),...n}));$e.displayName=V.Trigger.displayName;const Ae=p.forwardRef(({className:t,...n},r)=>o.jsx(V.Content,{ref:r,className:u("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...n}));Ae.displayName=V.Content.displayName;const rr=H.cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground 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=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),ze=p.forwardRef(({className:t,variant:n,size:r,...a},i)=>o.jsx(xe.Root,{ref:i,className:u(rr({variant:n,size:r,className:t})),...a}));ze.displayName=xe.Root.displayName;const nr=Y.Provider,or=Y.Root,ar=Y.Trigger,We=p.forwardRef(({className:t,sideOffset:n=4,...r},a)=>o.jsx(Y.Content,{ref:a,sideOffset:n,className:u("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md 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",t),...r}));We.displayName=Y.Content.displayName;const sr={Badge:{Badge:Dt},Button:{Button:we},Card:{Card:Ce,CardContent:Ne},DropdownMenu:{DropdownMenu:Lt,DropdownMenuCheckboxItem:Ee,DropdownMenuContent:Se,DropdownMenuItem:Re,DropdownMenuLabel:_e,DropdownMenuSeparator:Pe,DropdownMenuSub:Vt,DropdownMenuSubContent:Te,DropdownMenuSubTrigger:je,DropdownMenuTrigger:Bt},Form:{Form:zt},Input:{Input:Ie},Label:{Label:se},Popover:{Popover:Kt,PopoverContent:Me,PopoverTrigger:Ht},Select:{Select:Xt,SelectContent:Le,SelectItem:Be,SelectTrigger:ke,SelectValue:Zt},Tabs:{Tabs:tr,TabsContent:Ae,TabsList:Ve,TabsTrigger:$e},Toggle:{Toggle:ze},Tooltip:{Tooltip:or,TooltipContent:We,TooltipProvider:nr,TooltipTrigger:ar}},qe=y.createContext(void 0);function S(){return y.useContext(qe)}const ir=t=>{const{children:n,...r}=t;C.assertEmpty(r);const a=S(),i=oe.useForm();return o.jsx(a.Form.Form,{...i,children:n})},dr=t=>y.forwardRef((n,r)=>o.jsx(t,{onPointerDown:a=>{a.nativeEvent.fakeEvent||(a.ctrlKey=!0)},onPointerUp:a=>{const i=new PointerEvent("pointerdown",a.nativeEvent);i.fakeEvent=!0,a.target.dispatchEvent(i)},...n,ref:r})),lr=t=>{const{children:n,onOpenChange:r,position:a,sub:i,...l}=t;C.assertEmpty(l);const c=S();return i?o.jsx(c.DropdownMenu.DropdownMenuSub,{onOpenChange:r,children:n}):o.jsx(c.DropdownMenu.DropdownMenu,{onOpenChange:r,children:n})},cr=t=>{const{children:n,sub:r,...a}=t;C.assertEmpty(a);const i=S(),l=y.useMemo(()=>dr(i.DropdownMenu.DropdownMenuTrigger),[i.DropdownMenu.DropdownMenuTrigger]);return r?o.jsx(i.DropdownMenu.DropdownMenuSubTrigger,{children:n}):o.jsx(l,{asChild:!0,...a,children:n})},ur=y.forwardRef((t,n)=>{const{className:r,children:a,sub:i,...l}=t;C.assertEmpty(l);const c=S();return i?o.jsx(c.DropdownMenu.DropdownMenuSubContent,{className:r,ref:n,children:a}):o.jsx(c.DropdownMenu.DropdownMenuContent,{className:r,ref:n,children:a})}),fr=y.forwardRef((t,n)=>{const{className:r,children:a,icon:i,checked:l,subTrigger:c,onClick:x,...m}=t;C.assertEmpty(m);const v=S();return c?o.jsxs(o.Fragment,{children:[i,a]}):l!==void 0?o.jsxs(v.DropdownMenu.DropdownMenuCheckboxItem,{className:u(r,"gap-1"),ref:n,checked:l,onClick:x,...m,children:[i,a]}):o.jsxs(v.DropdownMenu.DropdownMenuItem,{className:r,ref:n,onClick:x,...m,children:[i,a,c&&o.jsx(L.ChevronRight,{className:"ml-auto h-4 w-4"})]})}),pr=y.forwardRef((t,n)=>{const{className:r,...a}=t;C.assertEmpty(a);const i=S();return o.jsx(i.DropdownMenu.DropdownMenuSeparator,{className:r,ref:n})}),mr=y.forwardRef((t,n)=>{const{className:r,children:a,...i}=t;C.assertEmpty(i);const l=S();return o.jsx(l.DropdownMenu.DropdownMenuLabel,{className:r,ref:n,children:a})}),vr=y.forwardRef((t,n)=>{const{className:r,tabs:a,defaultOpenTab:i,openTab:l,setOpenTab:c,loading:x,...m}=t;C.assertEmpty(m);const v=S();return o.jsxs(v.Tabs.Tabs,{className:u(r,"bg-popover p-2 rounded-lg"),ref:n,value:l,defaultValue:i,onValueChange:c,children:[o.jsx(v.Tabs.TabsList,{children:a.map(b=>o.jsx(v.Tabs.TabsTrigger,{value:b.name,children:b.name},b.name))}),a.map(b=>o.jsx(v.Tabs.TabsContent,{value:b.name,children:o.jsx(v.Card.Card,{children:o.jsx(v.Card.CardContent,{className:"p-4",children:b.tabPanel})})},b.name))]})}),gr=y.forwardRef((t,n)=>{const{className:r,children:a,onClick:i,label:l,...c}=t;C.assertEmpty(c);const x=S();return o.jsx(x.Button.Button,{type:"submit",className:r,"aria-label":l,ref:n,onClick:i,children:a})}),br=y.forwardRef((t,n)=>{const{className:r,accept:a,value:i,placeholder:l,onChange:c,...x}=t;C.assertEmpty(x);const m=S();return o.jsx(m.Input.Input,{type:"file",className:r,ref:n,accept:a,value:i?i.name:void 0,onChange:async v=>c==null?void 0:c(v.target.files[0]),placeholder:l})}),xr=y.forwardRef((t,n)=>{const{className:r,children:a,...i}=t;return C.assertEmpty(i),o.jsx("div",{className:u(r,"flex flex-col gap-2 items-start justify-center"),ref:n,children:a})}),hr=y.forwardRef((t,n)=>{const{className:r,value:a,placeholder:i,onKeyDown:l,onChange:c,...x}=t;C.assertEmpty(x);const m=S();return o.jsx(m.Input.Input,{"data-test":"embed-input",className:u(r,"w-80"),ref:n,value:a,placeholder:i,onKeyDown:l,onChange:c})}),yr=t=>{const{children:n,opened:r,position:a,...i}=t;C.assertEmpty(i);const l=S();return o.jsx(l.Popover.Popover,{open:r,children:n})},wr=y.forwardRef((t,n)=>{const{children:r,...a}=t;C.assertEmpty(a);const i=S();return o.jsx(i.Popover.PopoverTrigger,{ref:n,asChild:!0,children:r})}),Cr=y.forwardRef((t,n)=>{const{className:r,variant:a,children:i,...l}=t;C.assertEmpty(l);const c=S();return o.jsx(c.Popover.PopoverContent,{sideOffset:8,className:u(r,"flex flex-col gap-2",a==="panel-popover"?"p-0 border-none shadow-none max-w-none w-fit":""),ref:n,children:i})}),Nr=y.forwardRef((t,n)=>{const{className:r,children:a,...i}=t;return C.assertEmpty(i,!1),o.jsx("div",{className:r,ref:n,...i,children:a})}),jr=y.forwardRef((t,n)=>{const{className:r,children:a,icon:i,onClick:l,onDragEnd:c,onDragStart:x,draggable:m,label:v,...b}=t;C.assertEmpty(b,!1);const _=S();return o.jsxs(_.Button.Button,{variant:"ghost",className:u(r,"text-gray-400"),ref:n,"aria-label":v,onClick:l,onDragStart:x,onDragEnd:c,draggable:m,...b,children:[i,a]})}),Tr=y.forwardRef((t,n)=>{const{className:r,children:a,id:i,...l}=t;return C.assertEmpty(l),o.jsx("div",{id:i,role:"listbox",className:u("z-50 min-w-[8rem] overflow-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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",r),ref:n,children:a})}),Sr=y.forwardRef((t,n)=>{const{className:r,children:a,...i}=t;return C.assertEmpty(i),o.jsx("div",{className:u("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r),ref:n,children:o.jsx("div",{children:a})})}),Rr=y.forwardRef((t,n)=>{const r=S(),{className:a,item:i,isSelected:l,onClick:c,id:x,...m}=t;return C.assertEmpty(m),o.jsxs("div",{className:u("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),ref:n,id:x,onClick:c,role:"option","aria-selected":l||void 0,children:[i.icon&&o.jsx("div",{className:"p-3","data-position":"left",children:i.icon}),o.jsxs("div",{className:"flex-1",children:[o.jsx("div",{className:"text-base",children:i.title}),o.jsx("div",{className:"text-xs",children:i.subtext})]}),i.badge&&o.jsx("div",{"data-position":"right",className:"text-xs",children:o.jsx(r.Badge.Badge,{variant:"secondary",children:i.badge})})]})}),Er=y.forwardRef((t,n)=>{const{className:r,children:a,...i}=t;return C.assertEmpty(i),o.jsx("div",{className:u("px-2 py-1.5 text-sm font-semibold",r),ref:n,children:a})}),_r=y.forwardRef((t,n)=>{const{className:r,children:a,...i}=t;return C.assertEmpty(i),o.jsx("div",{className:r,ref:n,children:a})}),Pr=y.forwardRef((t,n)=>{const{className:r,children:a,draggable:i,onDragStart:l,onDragEnd:c,style:x,label:m,...v}=t;C.assertEmpty(v,!1);const b=S();return o.jsx(b.Button.Button,{variant:"ghost",className:u(r,"p-0 h-fit w-fit text-gray-400"),ref:n,"aria-label":m,draggable:i,onDragStart:l,onDragEnd:c,style:x,...v,children:a})}),Dr=y.forwardRef(t=>{const{className:n,name:r,label:a,icon:i,value:l,autoFocus:c,placeholder:x,onKeyDown:m,onChange:v,onSubmit:b,..._}=t;C.assertEmpty(_);const D=S();return a?o.jsxs("div",{children:[o.jsx(D.Label.Label,{htmlFor:a,children:a}),o.jsx(D.Input.Input,{className:n,id:a,name:r,autoFocus:c,placeholder:x,value:l,onKeyDown:m,onChange:v,onSubmit:b})]}):o.jsx(D.Input.Input,{"aria-label":r,name:r,autoFocus:c,placeholder:x,value:l,onKeyDown:m,onChange:v,onSubmit:b})}),Ye=y.forwardRef((t,n)=>{const{className:r,children:a,onMouseEnter:i,onMouseLeave:l,...c}=t;C.assertEmpty(c);const x=S();return o.jsx(x.Tooltip.TooltipProvider,{delayDuration:0,children:o.jsx("div",{className:u(r,"flex gap-1 p-1 bg-popover text-popover-foreground border rounded-lg shadow-md"),ref:n,onMouseEnter:i,onMouseLeave:l,children:a})})}),Ue=y.forwardRef((t,n)=>{const{className:r,children:a,mainTooltip:i,secondaryTooltip:l,icon:c,isSelected:x,isDisabled:m,onClick:v,label:b,..._}=t;C.assertEmpty(_,!1);const D=S(),A=x===void 0?o.jsxs(D.Button.Button,{className:r,variant:"ghost",disabled:m,onClick:v,ref:n,"aria-label":b,..._,children:[c,a]}):o.jsxs(D.Toggle.Toggle,{className:u(r,"data-[state=open]:bg-accent data-[state=closed]:text-accent-foreground"),"aria-label":b,onClick:v,pressed:x,disabled:m,"data-state":x?"on":"off","data-disabled":m,ref:n,..._,children:[c,a]});return o.jsxs(D.Tooltip.Tooltip,{children:[o.jsx(D.Tooltip.TooltipTrigger,{asChild:!0,children:A}),o.jsxs(D.Tooltip.TooltipContent,{className:"flex flex-col items-center",children:[o.jsx("span",{children:i}),l&&o.jsx("span",{children:l})]})]})}),Ir=y.forwardRef((t,n)=>{const{className:r,items:a,isDisabled:i,...l}=t;C.assertEmpty(l);const c=S(),x=v=>o.jsxs("div",{className:"flex gap-1 items-center",children:[v.icon,v.text]}),m=a.filter(v=>v.isSelected)[0];return m?o.jsxs(c.Select.Select,{value:m.text,onValueChange:v=>{var b,_;return(_=(b=a.find(D=>D.text===v)).onClick)==null?void 0:_.call(b)},disabled:i,children:[o.jsx(c.Select.SelectTrigger,{className:"border-none",children:o.jsx(c.Select.SelectValue,{})}),o.jsx(c.Select.SelectContent,{className:r,ref:n,children:a.map(v=>o.jsx(c.Select.SelectItem,{disabled:v.isDisabled,value:v.text,children:o.jsx(x,{...v})},v.text))})]}):null}),gn="",Ge={FormattingToolbar:{Root:Ye,Button:Ue,Select:Ir},FilePanel:{Root:vr,Button:gr,FileInput:br,TabPanel:xr,TextInput:hr},LinkToolbar:{Root:Ye,Button:Ue},SideMenu:{Root:Nr,Button:jr},SuggestionMenu:{Root:Tr,Item:Rr,EmptyItem:Sr,Label:Er,Loader:_r},TableHandle:{Root:Pr},Generic:{Form:{Root:ir,TextInput:Dr},Menu:{Root:lr,Trigger:cr,Dropdown:ur,Divider:pr,Label:mr,Item:fr},Popover:{Root:yr,Trigger:wr,Content:Cr}}},Mr=t=>{const{shadCNComponents:n,...r}=t,a=y.useMemo(()=>({...n,...sr}),[n]);return o.jsx(qe.Provider,{value:a,children:o.jsx(ve.ComponentsContext.Provider,{value:Ge,children:o.jsx(ve.BlockNoteViewRaw,{...r})})})};j.BlockNoteView=Mr,j.components=Ge,Object.defineProperty(j,Symbol.toStringTag,{value:"Module"})});
27
+ Check the top-level render call using <`+l+">.")}return s}}function bt(e,s){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var l=un(s);if(gt[l])return;gt[l]=!0;var p="";e&&e._owner&&e._owner!==me.current&&(p=" It was passed a child from "+F(e._owner.type)+"."),q(e),I('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',l,p),q(null)}}function xt(e,s){{if(typeof e!="object")return;if(fe(e))for(var l=0;l<e.length;l++){var p=e[l];ge(p)&&bt(p,s)}else if(ge(e))e._store&&(e._store.validated=!0);else if(e){var w=Lr(e);if(typeof w=="function"&&w!==e.entries)for(var j=w.call(e),y;!(y=j.next()).done;)ge(y.value)&&bt(y.value,s)}}}function fn(e){{var s=e.type;if(s==null||typeof s=="string")return;var l;if(typeof s=="function")l=s.propTypes;else if(typeof s=="object"&&(s.$$typeof===v||s.$$typeof===_))l=s.propTypes;else return;if(l){var p=F(s);Xr(l,e.props,"prop",p,e)}else if(s.PropTypes!==void 0&&!ve){ve=!0;var w=F(s);I("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",w||"Unknown")}typeof s.getDefaultProps=="function"&&!s.getDefaultProps.isReactClassApproved&&I("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function pn(e){{for(var s=Object.keys(e.props),l=0;l<s.length;l++){var p=s[l];if(p!=="children"&&p!=="key"){q(e),I("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",p),q(null);break}}e.ref!==null&&(q(e),I("Invalid attribute `ref` supplied to `React.Fragment`."),q(null))}}var ht={};function yt(e,s,l,p,w,j){{var y=qr(e);if(!y){var b="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(b+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var M=cn(w);M?b+=M:b+=vt();var R;e===null?R="null":fe(e)?R="array":e!==void 0&&e.$$typeof===n?(R="<"+(F(e.type)||"Unknown")+" />",b=" Did you accidentally export a JSX literal instead of a component?"):R=typeof e,I("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",R,b)}var P=dn(e,s,l,w,j);if(P==null)return P;if(y){var O=s.children;if(O!==void 0)if(p)if(fe(O)){for(var Y=0;Y<O.length;Y++)xt(O[Y],e);Object.freeze&&Object.freeze(O)}else I("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else xt(O,e)}if(H.call(s,"key")){var $=F(e),k=Object.keys(s).filter(function(hn){return hn!=="key"}),be=k.length>0?"{key: someKey, "+k.join(": ..., ")+": ...}":"{key: someKey}";if(!ht[$+be]){var xn=k.length>0?"{"+k.join(": ..., ")+": ...}":"{}";I(`A props object containing a "key" prop is being spread into JSX:
28
+ let props = %s;
29
+ <%s {...props} />
30
+ React keys must be passed directly to JSX without using spread:
31
+ let props = %s;
32
+ <%s key={someKey} {...props} />`,be,$,xn,$),ht[$+be]=!0}}return e===a?pn(P):fn(P),P}}function mn(e,s,l){return yt(e,s,l,!0)}function vn(e,s,l){return yt(e,s,l,!1)}var gn=vn,bn=mn;J.Fragment=a,J.jsx=gn,J.jsxs=bn}()),J}process.env.NODE_ENV==="production"?ie.exports=Pt():ie.exports=Dt();var o=ie.exports;function u(...t){return Ct.twMerge(wt.clsx(t))}const It=Q.cva("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Mt({className:t,variant:n,...r}){return o.jsx("div",{className:u(It({variant:n}),t),...r})}const kt=Q.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),je=m.forwardRef(({className:t,variant:n,size:r,asChild:a=!1,...i},d)=>{const c=a?xe.Slot:"button";return o.jsx(c,{className:u(kt({variant:n,size:r,className:t})),ref:d,...i})});je.displayName="Button";const Ne=m.forwardRef(({className:t,...n},r)=>o.jsx("div",{ref:r,className:u("rounded-lg border bg-card text-card-foreground shadow-sm",t),...n}));Ne.displayName="Card";const Ot=m.forwardRef(({className:t,...n},r)=>o.jsx("div",{ref:r,className:u("flex flex-col space-y-1.5 p-6",t),...n}));Ot.displayName="CardHeader";const Ft=m.forwardRef(({className:t,...n},r)=>o.jsx("h3",{ref:r,className:u("text-2xl font-semibold leading-none tracking-tight",t),...n}));Ft.displayName="CardTitle";const Lt=m.forwardRef(({className:t,...n},r)=>o.jsx("p",{ref:r,className:u("text-sm text-muted-foreground",t),...n}));Lt.displayName="CardDescription";const Te=m.forwardRef(({className:t,...n},r)=>o.jsx("div",{ref:r,className:u("p-6 pt-0",t),...n}));Te.displayName="CardContent";const Bt=m.forwardRef(({className:t,...n},r)=>o.jsx("div",{ref:r,className:u("flex items-center p-6 pt-0",t),...n}));Bt.displayName="CardFooter";const Vt=T.Root,At=T.Trigger,$t=T.Sub,Se=m.forwardRef(({className:t,inset:n,children:r,...a},i)=>o.jsxs(T.SubTrigger,{ref:i,className:u("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",n&&"pl-8",t),...a,children:[r,o.jsx(L.ChevronRight,{className:"ml-auto h-4 w-4"})]}));Se.displayName=T.SubTrigger.displayName;const Re=m.forwardRef(({className:t,...n},r)=>o.jsx(T.SubContent,{ref:r,className:u("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",t),...n}));Re.displayName=T.SubContent.displayName;const Ee=m.forwardRef(({className:t,sideOffset:n=4,...r},a)=>o.jsx(T.Content,{ref:a,sideOffset:n,className:u("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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",t),...r}));Ee.displayName=T.Content.displayName;const _e=m.forwardRef(({className:t,inset:n,...r},a)=>o.jsx(T.Item,{ref:a,className:u("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n&&"pl-8",t),...r}));_e.displayName=T.Item.displayName;const Pe=m.forwardRef(({className:t,children:n,checked:r,...a},i)=>o.jsxs(T.CheckboxItem,{ref:i,className:u("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:r,...a,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(T.ItemIndicator,{children:o.jsx(L.Check,{className:"h-4 w-4"})})}),n]}));Pe.displayName=T.CheckboxItem.displayName;const zt=m.forwardRef(({className:t,children:n,...r},a)=>o.jsxs(T.RadioItem,{ref:a,className:u("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...r,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(T.ItemIndicator,{children:o.jsx(L.Circle,{className:"h-2 w-2 fill-current"})})}),n]}));zt.displayName=T.RadioItem.displayName;const De=m.forwardRef(({className:t,inset:n,...r},a)=>o.jsx(T.Label,{ref:a,className:u("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",t),...r}));De.displayName=T.Label.displayName;const Ie=m.forwardRef(({className:t,...n},r)=>o.jsx(T.Separator,{ref:r,className:u("-mx-1 my-1 h-px bg-muted",t),...n}));Ie.displayName=T.Separator.displayName;const Wt=Q.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),le=m.forwardRef(({className:t,...n},r)=>o.jsx(he.Root,{ref:r,className:u(Wt(),t),...n}));le.displayName=he.Root.displayName;const qt=se.FormProvider,Yt=m.createContext({}),te=()=>{const t=m.useContext(Yt),n=m.useContext(Me),{getFieldState:r,formState:a}=se.useFormContext(),i=r(t.name,a);if(!t)throw new Error("useFormField should be used within <FormField>");const{id:d}=n;return{id:d,name:t.name,formItemId:`${d}-form-item`,formDescriptionId:`${d}-form-item-description`,formMessageId:`${d}-form-item-message`,...i}},Me=m.createContext({}),Ut=m.forwardRef(({className:t,...n},r)=>{const a=m.useId();return o.jsx(Me.Provider,{value:{id:a},children:o.jsx("div",{ref:r,className:u("space-y-2",t),...n})})});Ut.displayName="FormItem";const Kt=m.forwardRef(({className:t,...n},r)=>{const{error:a,formItemId:i}=te();return o.jsx(le,{ref:r,className:u(a&&"text-destructive",t),htmlFor:i,...n})});Kt.displayName="FormLabel";const Jt=m.forwardRef(({...t},n)=>{const{error:r,formItemId:a,formDescriptionId:i,formMessageId:d}=te();return o.jsx(xe.Slot,{ref:n,id:a,"aria-describedby":r?`${i} ${d}`:`${i}`,"aria-invalid":!!r,...t})});Jt.displayName="FormControl";const Gt=m.forwardRef(({className:t,...n},r)=>{const{formDescriptionId:a}=te();return o.jsx("p",{ref:r,id:a,className:u("text-sm text-muted-foreground",t),...n})});Gt.displayName="FormDescription";const Ht=m.forwardRef(({className:t,children:n,...r},a)=>{const{error:i,formMessageId:d}=te(),c=i?String(i==null?void 0:i.message):n;return c?o.jsx("p",{ref:a,id:d,className:u("text-sm font-medium text-destructive",t),...r,children:c}):null});Ht.displayName="FormMessage";const ke=m.forwardRef(({className:t,type:n,...r},a)=>o.jsx("input",{type:n,className:u("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:a,...r}));ke.displayName="Input";const Xt=ee.Root,Zt=ee.Trigger,Oe=m.forwardRef(({className:t,align:n="center",sideOffset:r=4,...a},i)=>o.jsx(ee.Content,{ref:i,align:n,sideOffset:r,className:u("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",t),...a}));Oe.displayName=ee.Content.displayName;const Qt=E.Root,er=E.Value,Fe=m.forwardRef(({className:t,children:n,...r},a)=>o.jsxs(E.Trigger,{ref:a,className:u("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...r,children:[n,o.jsx(E.Icon,{asChild:!0,children:o.jsx(L.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Fe.displayName=E.Trigger.displayName;const Le=m.forwardRef(({className:t,...n},r)=>o.jsx(E.ScrollUpButton,{ref:r,className:u("flex cursor-default items-center justify-center py-1",t),...n,children:o.jsx(L.ChevronUp,{className:"h-4 w-4"})}));Le.displayName=E.ScrollUpButton.displayName;const Be=m.forwardRef(({className:t,...n},r)=>o.jsx(E.ScrollDownButton,{ref:r,className:u("flex cursor-default items-center justify-center py-1",t),...n,children:o.jsx(L.ChevronDown,{className:"h-4 w-4"})}));Be.displayName=E.ScrollDownButton.displayName;const Ve=m.forwardRef(({className:t,children:n,position:r="popper",...a},i)=>o.jsxs(E.Content,{ref:i,className:u("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,...a,children:[o.jsx(Le,{}),o.jsx(E.Viewport,{className:u("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),o.jsx(Be,{})]}));Ve.displayName=E.Content.displayName;const tr=m.forwardRef(({className:t,...n},r)=>o.jsx(E.Label,{ref:r,className:u("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...n}));tr.displayName=E.Label.displayName;const Ae=m.forwardRef(({className:t,children:n,...r},a)=>o.jsxs(E.Item,{ref:a,className:u("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...r,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(E.ItemIndicator,{children:o.jsx(L.Check,{className:"h-4 w-4"})})}),o.jsx(E.ItemText,{children:n})]}));Ae.displayName=E.Item.displayName;const rr=m.forwardRef(({className:t,...n},r)=>o.jsx(E.Separator,{ref:r,className:u("-mx-1 my-1 h-px bg-muted",t),...n}));rr.displayName=E.Separator.displayName;const nr=V.Root,$e=m.forwardRef(({className:t,...n},r)=>o.jsx(V.List,{ref:r,className:u("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t),...n}));$e.displayName=V.List.displayName;const ze=m.forwardRef(({className:t,...n},r)=>o.jsx(V.Trigger,{ref:r,className:u("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 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-sm",t),...n}));ze.displayName=V.Trigger.displayName;const We=m.forwardRef(({className:t,...n},r)=>o.jsx(V.Content,{ref:r,className:u("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...n}));We.displayName=V.Content.displayName;const or=Q.cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground 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=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),qe=m.forwardRef(({className:t,variant:n,size:r,...a},i)=>o.jsx(ye.Root,{ref:i,className:u(or({variant:n,size:r,className:t})),...a}));qe.displayName=ye.Root.displayName;const ar=U.Provider,sr=U.Root,ir=U.Trigger,Ye=m.forwardRef(({className:t,sideOffset:n=4,...r},a)=>o.jsx(U.Content,{ref:a,sideOffset:n,className:u("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md 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",t),...r}));Ye.displayName=U.Content.displayName;const lr={Badge:{Badge:Mt},Button:{Button:je},Card:{Card:Ne,CardContent:Te},DropdownMenu:{DropdownMenu:Vt,DropdownMenuCheckboxItem:Pe,DropdownMenuContent:Ee,DropdownMenuItem:_e,DropdownMenuLabel:De,DropdownMenuSeparator:Ie,DropdownMenuSub:$t,DropdownMenuSubContent:Re,DropdownMenuSubTrigger:Se,DropdownMenuTrigger:At},Form:{Form:qt},Input:{Input:ke},Label:{Label:le},Popover:{Popover:Xt,PopoverContent:Oe,PopoverTrigger:Zt},Select:{Select:Qt,SelectContent:Ve,SelectItem:Ae,SelectTrigger:Fe,SelectValue:er},Tabs:{Tabs:nr,TabsContent:We,TabsList:$e,TabsTrigger:ze},Toggle:{Toggle:qe},Tooltip:{Tooltip:sr,TooltipContent:Ye,TooltipProvider:ar,TooltipTrigger:ir}},Ue=x.createContext(void 0);function S(){return x.useContext(Ue)}const dr=t=>{const{children:n,...r}=t;C.assertEmpty(r);const a=S(),i=se.useForm();return o.jsx(a.Form.Form,{...i,children:n})},cr=t=>x.forwardRef((n,r)=>o.jsx(t,{onPointerDown:a=>{a.nativeEvent.fakeEvent||(a.ctrlKey=!0)},onPointerUp:a=>{const i=new PointerEvent("pointerdown",a.nativeEvent);i.fakeEvent=!0,a.target.dispatchEvent(i)},...n,ref:r})),ur=t=>{const{children:n,onOpenChange:r,position:a,sub:i,...d}=t;C.assertEmpty(d);const c=S();return i?o.jsx(c.DropdownMenu.DropdownMenuSub,{onOpenChange:r,children:n}):o.jsx(c.DropdownMenu.DropdownMenu,{onOpenChange:r,children:n})},fr=t=>{const{children:n,sub:r,...a}=t;C.assertEmpty(a);const i=S(),d=x.useMemo(()=>cr(i.DropdownMenu.DropdownMenuTrigger),[i.DropdownMenu.DropdownMenuTrigger]);return r?o.jsx(i.DropdownMenu.DropdownMenuSubTrigger,{children:n}):o.jsx(d,{asChild:!0,...a,children:n})},pr=x.forwardRef((t,n)=>{const{className:r,children:a,sub:i,...d}=t;C.assertEmpty(d);const c=S();return i?o.jsx(c.DropdownMenu.DropdownMenuSubContent,{className:r,ref:n,children:a}):o.jsx(c.DropdownMenu.DropdownMenuContent,{className:r,ref:n,children:a})}),mr=x.forwardRef((t,n)=>{const{className:r,children:a,icon:i,checked:d,subTrigger:c,onClick:h,...v}=t;C.assertEmpty(v);const f=S();return c?o.jsxs(o.Fragment,{children:[i,a]}):d!==void 0?o.jsxs(f.DropdownMenu.DropdownMenuCheckboxItem,{className:u(r,"gap-1"),ref:n,checked:d,onClick:h,...v,children:[i,a]}):o.jsxs(f.DropdownMenu.DropdownMenuItem,{className:r,ref:n,onClick:h,...v,children:[i,a,c&&o.jsx(L.ChevronRight,{className:"ml-auto h-4 w-4"})]})}),vr=x.forwardRef((t,n)=>{const{className:r,...a}=t;C.assertEmpty(a);const i=S();return o.jsx(i.DropdownMenu.DropdownMenuSeparator,{className:r,ref:n})}),gr=x.forwardRef((t,n)=>{const{className:r,children:a,...i}=t;C.assertEmpty(i);const d=S();return o.jsx(d.DropdownMenu.DropdownMenuLabel,{className:r,ref:n,children:a})}),br=x.forwardRef((t,n)=>{const{className:r,tabs:a,defaultOpenTab:i,openTab:d,setOpenTab:c,loading:h,...v}=t;C.assertEmpty(v);const f=S();return o.jsxs(f.Tabs.Tabs,{className:u(r,"bg-popover p-2 rounded-lg"),ref:n,value:d,defaultValue:i,onValueChange:c,children:[o.jsx(f.Tabs.TabsList,{children:a.map(g=>o.jsx(f.Tabs.TabsTrigger,{value:g.name,children:g.name},g.name))}),a.map(g=>o.jsx(f.Tabs.TabsContent,{value:g.name,children:o.jsx(f.Card.Card,{children:o.jsx(f.Card.CardContent,{className:"p-4",children:g.tabPanel})})},g.name))]})}),xr=x.forwardRef((t,n)=>{const{className:r,children:a,onClick:i,label:d,...c}=t;C.assertEmpty(c);const h=S();return o.jsx(h.Button.Button,{type:"submit",className:r,"aria-label":d,ref:n,onClick:i,children:a})}),hr=x.forwardRef((t,n)=>{const{className:r,accept:a,value:i,placeholder:d,onChange:c,...h}=t;C.assertEmpty(h);const v=S();return o.jsx(v.Input.Input,{type:"file",className:r,ref:n,accept:a,value:i?i.name:void 0,onChange:async f=>c==null?void 0:c(f.target.files[0]),placeholder:d})}),yr=x.forwardRef((t,n)=>{const{className:r,children:a,...i}=t;return C.assertEmpty(i),o.jsx("div",{className:u(r,"flex flex-col gap-2 items-start justify-center"),ref:n,children:a})}),wr=x.forwardRef((t,n)=>{const{className:r,value:a,placeholder:i,onKeyDown:d,onChange:c,...h}=t;C.assertEmpty(h);const v=S();return o.jsx(v.Input.Input,{"data-test":"embed-input",className:u(r,"w-80"),ref:n,value:a,placeholder:i,onKeyDown:d,onChange:c})}),Cr=t=>{const{children:n,opened:r,position:a,...i}=t;C.assertEmpty(i);const d=S();return o.jsx(d.Popover.Popover,{open:r,children:n})},jr=x.forwardRef((t,n)=>{const{children:r,...a}=t;C.assertEmpty(a);const i=S();return o.jsx(i.Popover.PopoverTrigger,{ref:n,asChild:!0,children:r})}),Nr=x.forwardRef((t,n)=>{const{className:r,variant:a,children:i,...d}=t;C.assertEmpty(d);const c=S();return o.jsx(c.Popover.PopoverContent,{sideOffset:8,className:u(r,"flex flex-col gap-2",a==="panel-popover"?"p-0 border-none shadow-none max-w-none w-fit":""),ref:n,children:i})}),Tr=x.forwardRef((t,n)=>{const{className:r,children:a,...i}=t;return C.assertEmpty(i,!1),o.jsx("div",{className:r,ref:n,...i,children:a})}),Sr=x.forwardRef((t,n)=>{const{className:r,children:a,icon:i,onClick:d,onDragEnd:c,onDragStart:h,draggable:v,label:f,...g}=t;C.assertEmpty(g,!1);const _=S();return o.jsxs(_.Button.Button,{variant:"ghost",className:u(r,"text-gray-400"),ref:n,"aria-label":f,onClick:d,onDragStart:h,onDragEnd:c,draggable:v,...g,children:[i,a]})}),Rr=x.forwardRef((t,n)=>{const{className:r,children:a,id:i,...d}=t;return C.assertEmpty(d),o.jsx("div",{id:i,role:"listbox",className:u("z-50 min-w-[8rem] overflow-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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",r),ref:n,children:a})}),Er=x.forwardRef((t,n)=>{const{className:r,children:a,...i}=t;return C.assertEmpty(i),o.jsx("div",{className:u("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r),ref:n,children:o.jsx("div",{children:a})})}),_r=x.forwardRef((t,n)=>{const r=S(),{className:a,item:i,isSelected:d,onClick:c,id:h,...v}=t;C.assertEmpty(v);const f=x.useRef(null);return x.useEffect(()=>{if(!f.current||!d)return;const g=Z.elementOverflow(f.current);g==="top"?f.current.scrollIntoView(!0):g==="bottom"&&f.current.scrollIntoView(!1)},[d]),o.jsxs("div",{className:u("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),ref:Z.mergeRefs([n,f]),id:h,onClick:c,role:"option","aria-selected":d||void 0,children:[i.icon&&o.jsx("div",{className:"p-3","data-position":"left",children:i.icon}),o.jsxs("div",{className:"flex-1",children:[o.jsx("div",{className:"text-base",children:i.title}),o.jsx("div",{className:"text-xs",children:i.subtext})]}),i.badge&&o.jsx("div",{"data-position":"right",className:"text-xs",children:o.jsx(r.Badge.Badge,{variant:"secondary",children:i.badge})})]})}),Pr=x.forwardRef((t,n)=>{const{className:r,children:a,...i}=t;return C.assertEmpty(i),o.jsx("div",{className:u("px-2 py-1.5 text-sm font-semibold",r),ref:n,children:a})}),Dr=x.forwardRef((t,n)=>{const{className:r,children:a,...i}=t;return C.assertEmpty(i),o.jsx("div",{className:r,ref:n,children:a})}),Ir=x.forwardRef((t,n)=>{const{className:r,children:a,draggable:i,onDragStart:d,onDragEnd:c,style:h,label:v,...f}=t;C.assertEmpty(f,!1);const g=S();return o.jsx(g.Button.Button,{variant:"ghost",className:u(r,"p-0 h-fit w-fit text-gray-400"),ref:n,"aria-label":v,draggable:i,onDragStart:d,onDragEnd:c,style:h,...f,children:a})}),Mr=x.forwardRef(t=>{const{className:n,name:r,label:a,icon:i,value:d,autoFocus:c,placeholder:h,onKeyDown:v,onChange:f,onSubmit:g,..._}=t;C.assertEmpty(_);const D=S();return a?o.jsxs("div",{children:[o.jsx(D.Label.Label,{htmlFor:a,children:a}),o.jsx(D.Input.Input,{className:n,id:a,name:r,autoFocus:c,placeholder:h,value:d,onKeyDown:v,onChange:f,onSubmit:g})]}):o.jsx(D.Input.Input,{"aria-label":r,name:r,autoFocus:c,placeholder:h,value:d,onKeyDown:v,onChange:f,onSubmit:g})}),Ke=x.forwardRef((t,n)=>{const{className:r,children:a,onMouseEnter:i,onMouseLeave:d,...c}=t;C.assertEmpty(c);const h=S();return o.jsx(h.Tooltip.TooltipProvider,{delayDuration:0,children:o.jsx("div",{className:u(r,"flex gap-1 p-1 bg-popover text-popover-foreground border rounded-lg shadow-md"),ref:n,onMouseEnter:i,onMouseLeave:d,children:a})})}),Je=x.forwardRef((t,n)=>{const{className:r,children:a,mainTooltip:i,secondaryTooltip:d,icon:c,isSelected:h,isDisabled:v,onClick:f,label:g,..._}=t;C.assertEmpty(_,!1);const D=S(),z=h===void 0?o.jsxs(D.Button.Button,{className:r,variant:"ghost",disabled:v,onClick:f,ref:n,"aria-label":g,..._,children:[c,a]}):o.jsxs(D.Toggle.Toggle,{className:u(r,"data-[state=open]:bg-accent data-[state=closed]:text-accent-foreground"),"aria-label":g,onClick:f,pressed:h,disabled:v,"data-state":h?"on":"off","data-disabled":v,ref:n,..._,children:[c,a]});return o.jsxs(D.Tooltip.Tooltip,{children:[o.jsx(D.Tooltip.TooltipTrigger,{asChild:!0,children:z}),o.jsxs(D.Tooltip.TooltipContent,{className:"flex flex-col items-center",children:[o.jsx("span",{children:i}),d&&o.jsx("span",{children:d})]})]})}),kr=x.forwardRef((t,n)=>{const{className:r,items:a,isDisabled:i,...d}=t;C.assertEmpty(d);const c=S(),h=f=>o.jsxs("div",{className:"flex gap-1 items-center",children:[f.icon,f.text]}),v=a.filter(f=>f.isSelected)[0];return v?o.jsxs(c.Select.Select,{value:v.text,onValueChange:f=>{var g,_;return(_=(g=a.find(D=>D.text===f)).onClick)==null?void 0:_.call(g)},disabled:i,children:[o.jsx(c.Select.SelectTrigger,{className:"border-none",children:o.jsx(c.Select.SelectValue,{})}),o.jsx(c.Select.SelectContent,{className:r,ref:n,children:a.map(f=>o.jsx(c.Select.SelectItem,{disabled:f.isDisabled,value:f.text,children:o.jsx(h,{...f})},f.text))})]}):null}),yn="",Ge={FormattingToolbar:{Root:Ke,Button:Je,Select:kr},FilePanel:{Root:br,Button:xr,FileInput:hr,TabPanel:yr,TextInput:wr},LinkToolbar:{Root:Ke,Button:Je},SideMenu:{Root:Tr,Button:Sr},SuggestionMenu:{Root:Rr,Item:_r,EmptyItem:Er,Label:Pr,Loader:Dr},TableHandle:{Root:Ir},Generic:{Form:{Root:dr,TextInput:Mr},Menu:{Root:ur,Trigger:fr,Dropdown:pr,Divider:vr,Label:gr,Item:mr},Popover:{Root:Cr,Trigger:jr,Content:Nr}}},Or=t=>{const{shadCNComponents:n,...r}=t,a=x.useMemo(()=>({...n,...lr}),[n]);return o.jsx(Ue.Provider,{value:a,children:o.jsx(Z.ComponentsContext.Provider,{value:Ge,children:o.jsx(Z.BlockNoteViewRaw,{...r})})})};N.BlockNoteView=Or,N.components=Ge,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})});
28
33
  //# sourceMappingURL=blocknote-shadcn.umd.cjs.map