@yext/visual-editor 0.0.2 → 0.0.4

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
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),rr=require("@measured/puck"),Hr=require("react-dom");function Qn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const d=Qn(E),Ur=Qn(Hr);var Dr={exports:{}},kt={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),tr=require("@measured/puck"),Hr=require("react-dom");function Qn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const d=Qn(E),Ur=Qn(Hr);var Nr={exports:{}},Ot={};/**
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 wn;function Es(){if(wn)return kt;wn=1;var e=E,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(i,l,u){var f,v={},c=null,m=null;u!==void 0&&(c=""+u),l.key!==void 0&&(c=""+l.key),l.ref!==void 0&&(m=l.ref);for(f in l)n.call(l,f)&&!a.hasOwnProperty(f)&&(v[f]=l[f]);if(i&&i.defaultProps)for(f in l=i.defaultProps,l)v[f]===void 0&&(v[f]=l[f]);return{$$typeof:t,type:i,key:c,ref:m,props:v,_owner:o.current}}return kt.Fragment=r,kt.jsx=s,kt.jsxs=s,kt}var Nt={};/**
9
+ */var wn;function Es(){if(wn)return Ot;wn=1;var e=E,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(i,l,u){var f,v={},c=null,h=null;u!==void 0&&(c=""+u),l.key!==void 0&&(c=""+l.key),l.ref!==void 0&&(h=l.ref);for(f in l)n.call(l,f)&&!a.hasOwnProperty(f)&&(v[f]=l[f]);if(i&&i.defaultProps)for(f in l=i.defaultProps,l)v[f]===void 0&&(v[f]=l[f]);return{$$typeof:t,type:i,key:c,ref:h,props:v,_owner:o.current}}return Ot.Fragment=r,Ot.jsx=s,Ot.jsxs=s,Ot}var kt={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,20 +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 xn;function Cs(){return xn||(xn=1,process.env.NODE_ENV!=="production"&&function(){var e=E,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),i=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),g=Symbol.iterator,h="@@iterator";function b(p){if(p===null||typeof p!="object")return null;var C=g&&p[g]||p[h];return typeof C=="function"?C:null}var w=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(p){{for(var C=arguments.length,T=new Array(C>1?C-1:0),M=1;M<C;M++)T[M-1]=arguments[M];S("error",p,T)}}function S(p,C,T){{var M=w.ReactDebugCurrentFrame,q=M.getStackAddendum();q!==""&&(C+="%s",T=T.concat([q]));var Q=T.map(function(Y){return String(Y)});Q.unshift("Warning: "+C),Function.prototype.apply.call(console[p],console,Q)}}var R=!1,P=!1,N=!1,k=!1,B=!1,U;U=Symbol.for("react.module.reference");function G(p){return!!(typeof p=="string"||typeof p=="function"||p===n||p===a||B||p===o||p===u||p===f||k||p===m||R||P||N||typeof p=="object"&&p!==null&&(p.$$typeof===c||p.$$typeof===v||p.$$typeof===s||p.$$typeof===i||p.$$typeof===l||p.$$typeof===U||p.getModuleId!==void 0))}function X(p,C,T){var M=p.displayName;if(M)return M;var q=C.displayName||C.name||"";return q!==""?T+"("+q+")":T}function _(p){return p.displayName||"Context"}function W(p){if(p==null)return null;if(typeof p.tag=="number"&&x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof p=="function")return p.displayName||p.name||null;if(typeof p=="string")return p;switch(p){case n:return"Fragment";case r:return"Portal";case a:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if(typeof p=="object")switch(p.$$typeof){case i:var C=p;return _(C)+".Consumer";case s:var T=p;return _(T._context)+".Provider";case l:return X(p,p.render,"ForwardRef");case v:var M=p.displayName||null;return M!==null?M:W(p.type)||"Memo";case c:{var q=p,Q=q._payload,Y=q._init;try{return W(Y(Q))}catch{return null}}}return null}var $=Object.assign,V=0,D,O,A,j,ae,F,H;function Z(){}Z.__reactDisabledLog=!0;function ue(){{if(V===0){D=console.log,O=console.info,A=console.warn,j=console.error,ae=console.group,F=console.groupCollapsed,H=console.groupEnd;var p={configurable:!0,enumerable:!0,value:Z,writable:!0};Object.defineProperties(console,{info:p,log:p,warn:p,error:p,group:p,groupCollapsed:p,groupEnd:p})}V++}}function Se(){{if(V--,V===0){var p={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},p,{value:D}),info:$({},p,{value:O}),warn:$({},p,{value:A}),error:$({},p,{value:j}),group:$({},p,{value:ae}),groupCollapsed:$({},p,{value:F}),groupEnd:$({},p,{value:H})})}V<0&&x("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ee=w.ReactCurrentDispatcher,Te;function he(p,C,T){{if(Te===void 0)try{throw Error()}catch(q){var M=q.stack.trim().match(/\n( *(at )?)/);Te=M&&M[1]||""}return`
18
- `+Te+p}}var xe=!1,me;{var st=typeof WeakMap=="function"?WeakMap:Map;me=new st}function je(p,C){if(!p||xe)return"";{var T=me.get(p);if(T!==void 0)return T}var M;xe=!0;var q=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Q;Q=ee.current,ee.current=null,ue();try{if(C){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(pe){M=pe}Reflect.construct(p,[],Y)}else{try{Y.call()}catch(pe){M=pe}p.call(Y.prototype)}}else{try{throw Error()}catch(pe){M=pe}p()}}catch(pe){if(pe&&M&&typeof pe.stack=="string"){for(var z=pe.stack.split(`
17
+ */var xn;function Cs(){return xn||(xn=1,process.env.NODE_ENV!=="production"&&function(){var e=E,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),i=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),m=Symbol.iterator,g="@@iterator";function b(p){if(p===null||typeof p!="object")return null;var C=m&&p[m]||p[g];return typeof C=="function"?C:null}var x=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(p){{for(var C=arguments.length,A=new Array(C>1?C-1:0),M=1;M<C;M++)A[M-1]=arguments[M];S("error",p,A)}}function S(p,C,A){{var M=x.ReactDebugCurrentFrame,q=M.getStackAddendum();q!==""&&(C+="%s",A=A.concat([q]));var Q=A.map(function(Y){return String(Y)});Q.unshift("Warning: "+C),Function.prototype.apply.call(console[p],console,Q)}}var R=!1,P=!1,N=!1,O=!1,B=!1,G;G=Symbol.for("react.module.reference");function U(p){return!!(typeof p=="string"||typeof p=="function"||p===n||p===a||B||p===o||p===u||p===f||O||p===h||R||P||N||typeof p=="object"&&p!==null&&(p.$$typeof===c||p.$$typeof===v||p.$$typeof===s||p.$$typeof===i||p.$$typeof===l||p.$$typeof===G||p.getModuleId!==void 0))}function K(p,C,A){var M=p.displayName;if(M)return M;var q=C.displayName||C.name||"";return q!==""?A+"("+q+")":A}function _(p){return p.displayName||"Context"}function W(p){if(p==null)return null;if(typeof p.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof p=="function")return p.displayName||p.name||null;if(typeof p=="string")return p;switch(p){case n:return"Fragment";case r:return"Portal";case a:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if(typeof p=="object")switch(p.$$typeof){case i:var C=p;return _(C)+".Consumer";case s:var A=p;return _(A._context)+".Provider";case l:return K(p,p.render,"ForwardRef");case v:var M=p.displayName||null;return M!==null?M:W(p.type)||"Memo";case c:{var q=p,Q=q._payload,Y=q._init;try{return W(Y(Q))}catch{return null}}}return null}var F=Object.assign,V=0,H,j,k,T,ee,D,$;function X(){}X.__reactDisabledLog=!0;function ue(){{if(V===0){H=console.log,j=console.info,k=console.warn,T=console.error,ee=console.group,D=console.groupCollapsed,$=console.groupEnd;var p={configurable:!0,enumerable:!0,value:X,writable:!0};Object.defineProperties(console,{info:p,log:p,warn:p,error:p,group:p,groupCollapsed:p,groupEnd:p})}V++}}function Se(){{if(V--,V===0){var p={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:F({},p,{value:H}),info:F({},p,{value:j}),warn:F({},p,{value:k}),error:F({},p,{value:T}),group:F({},p,{value:ee}),groupCollapsed:F({},p,{value:D}),groupEnd:F({},p,{value:$})})}V<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var te=x.ReactCurrentDispatcher,Oe;function he(p,C,A){{if(Oe===void 0)try{throw Error()}catch(q){var M=q.stack.trim().match(/\n( *(at )?)/);Oe=M&&M[1]||""}return`
18
+ `+Oe+p}}var xe=!1,me;{var st=typeof WeakMap=="function"?WeakMap:Map;me=new st}function je(p,C){if(!p||xe)return"";{var A=me.get(p);if(A!==void 0)return A}var M;xe=!0;var q=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Q;Q=te.current,te.current=null,ue();try{if(C){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(pe){M=pe}Reflect.construct(p,[],Y)}else{try{Y.call()}catch(pe){M=pe}p.call(Y.prototype)}}else{try{throw Error()}catch(pe){M=pe}p()}}catch(pe){if(pe&&M&&typeof pe.stack=="string"){for(var z=pe.stack.split(`
19
19
  `),ce=M.stack.split(`
20
- `),ne=z.length-1,oe=ce.length-1;ne>=1&&oe>=0&&z[ne]!==ce[oe];)oe--;for(;ne>=1&&oe>=0;ne--,oe--)if(z[ne]!==ce[oe]){if(ne!==1||oe!==1)do if(ne--,oe--,oe<0||z[ne]!==ce[oe]){var Ce=`
21
- `+z[ne].replace(" at new "," at ");return p.displayName&&Ce.includes("<anonymous>")&&(Ce=Ce.replace("<anonymous>",p.displayName)),typeof p=="function"&&me.set(p,Ce),Ce}while(ne>=1&&oe>=0);break}}}finally{xe=!1,ee.current=Q,Se(),Error.prepareStackTrace=q}var dt=p?p.displayName||p.name:"",et=dt?he(dt):"";return typeof p=="function"&&me.set(p,et),et}function Me(p,C,T){return je(p,!1)}function Qe(p){var C=p.prototype;return!!(C&&C.isReactComponent)}function Ie(p,C,T){if(p==null)return"";if(typeof p=="function")return je(p,Qe(p));if(typeof p=="string")return he(p);switch(p){case u:return he("Suspense");case f:return he("SuspenseList")}if(typeof p=="object")switch(p.$$typeof){case l:return Me(p.render);case v:return Ie(p.type,C,T);case c:{var M=p,q=M._payload,Q=M._init;try{return Ie(Q(q),C,T)}catch{}}}return""}var de=Object.prototype.hasOwnProperty,it={},lt=w.ReactDebugCurrentFrame;function re(p){if(p){var C=p._owner,T=Ie(p.type,p._source,C?C.type:null);lt.setExtraStackFrame(T)}else lt.setExtraStackFrame(null)}function Ve(p,C,T,M,q){{var Q=Function.call.bind(de);for(var Y in p)if(Q(p,Y)){var z=void 0;try{if(typeof p[Y]!="function"){var ce=Error((M||"React class")+": "+T+" type `"+Y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof p[Y]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ce.name="Invariant Violation",ce}z=p[Y](C,Y,M,T,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ne){z=ne}z&&!(z instanceof Error)&&(re(q),x("%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).",M||"React class",T,Y,typeof z),re(null)),z instanceof Error&&!(z.message in it)&&(it[z.message]=!0,re(q),x("Failed %s type: %s",T,z.message),re(null))}}}var mr=Array.isArray;function Rt(p){return mr(p)}function ct(p){{var C=typeof Symbol=="function"&&Symbol.toStringTag,T=C&&p[Symbol.toStringTag]||p.constructor.name||"Object";return T}}function yr(p){try{return Pt(p),!1}catch{return!0}}function Pt(p){return""+p}function ut(p){if(yr(p))return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ct(p)),Pt(p)}var Ee=w.ReactCurrentOwner,Ft={key:!0,ref:!0,__self:!0,__source:!0},Le,At,Tt;Tt={};function Bt(p){if(de.call(p,"ref")){var C=Object.getOwnPropertyDescriptor(p,"ref").get;if(C&&C.isReactWarning)return!1}return p.ref!==void 0}function Wt(p){if(de.call(p,"key")){var C=Object.getOwnPropertyDescriptor(p,"key").get;if(C&&C.isReactWarning)return!1}return p.key!==void 0}function br(p,C){if(typeof p.ref=="string"&&Ee.current&&C&&Ee.current.stateNode!==C){var T=W(Ee.current.type);Tt[T]||(x('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',W(Ee.current.type),p.ref),Tt[T]=!0)}}function Ot(p,C){{var T=function(){Le||(Le=!0,x("%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)",C))};T.isReactWarning=!0,Object.defineProperty(p,"key",{get:T,configurable:!0})}}function Oe(p,C){{var T=function(){At||(At=!0,x("%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)",C))};T.isReactWarning=!0,Object.defineProperty(p,"ref",{get:T,configurable:!0})}}var wr=function(p,C,T,M,q,Q,Y){var z={$$typeof:t,type:p,key:C,ref:T,props:Y,_owner:Q};return z._store={},Object.defineProperty(z._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(z,"_self",{configurable:!1,enumerable:!1,writable:!1,value:M}),Object.defineProperty(z,"_source",{configurable:!1,enumerable:!1,writable:!1,value:q}),Object.freeze&&(Object.freeze(z.props),Object.freeze(z)),z};function I(p,C,T,M,q){{var Q,Y={},z=null,ce=null;T!==void 0&&(ut(T),z=""+T),Wt(C)&&(ut(C.key),z=""+C.key),Bt(C)&&(ce=C.ref,br(C,q));for(Q in C)de.call(C,Q)&&!Ft.hasOwnProperty(Q)&&(Y[Q]=C[Q]);if(p&&p.defaultProps){var ne=p.defaultProps;for(Q in ne)Y[Q]===void 0&&(Y[Q]=ne[Q])}if(z||ce){var oe=typeof p=="function"?p.displayName||p.name||"Unknown":p;z&&Ot(Y,oe),ce&&Oe(Y,oe)}return wr(p,z,ce,q,M,Ee.current,Y)}}var K=w.ReactCurrentOwner,J=w.ReactDebugCurrentFrame;function ie(p){if(p){var C=p._owner,T=Ie(p.type,p._source,C?C.type:null);J.setExtraStackFrame(T)}else J.setExtraStackFrame(null)}var fe;fe=!1;function He(p){return typeof p=="object"&&p!==null&&p.$$typeof===t}function zt(){{if(K.current){var p=W(K.current.type);if(p)return`
20
+ `),oe=z.length-1,ae=ce.length-1;oe>=1&&ae>=0&&z[oe]!==ce[ae];)ae--;for(;oe>=1&&ae>=0;oe--,ae--)if(z[oe]!==ce[ae]){if(oe!==1||ae!==1)do if(oe--,ae--,ae<0||z[oe]!==ce[ae]){var Ce=`
21
+ `+z[oe].replace(" at new "," at ");return p.displayName&&Ce.includes("<anonymous>")&&(Ce=Ce.replace("<anonymous>",p.displayName)),typeof p=="function"&&me.set(p,Ce),Ce}while(oe>=1&&ae>=0);break}}}finally{xe=!1,te.current=Q,Se(),Error.prepareStackTrace=q}var dt=p?p.displayName||p.name:"",et=dt?he(dt):"";return typeof p=="function"&&me.set(p,et),et}function Me(p,C,A){return je(p,!1)}function Qe(p){var C=p.prototype;return!!(C&&C.isReactComponent)}function Le(p,C,A){if(p==null)return"";if(typeof p=="function")return je(p,Qe(p));if(typeof p=="string")return he(p);switch(p){case u:return he("Suspense");case f:return he("SuspenseList")}if(typeof p=="object")switch(p.$$typeof){case l:return Me(p.render);case v:return Le(p.type,C,A);case c:{var M=p,q=M._payload,Q=M._init;try{return Le(Q(q),C,A)}catch{}}}return""}var de=Object.prototype.hasOwnProperty,it={},lt=x.ReactDebugCurrentFrame;function ne(p){if(p){var C=p._owner,A=Le(p.type,p._source,C?C.type:null);lt.setExtraStackFrame(A)}else lt.setExtraStackFrame(null)}function Ve(p,C,A,M,q){{var Q=Function.call.bind(de);for(var Y in p)if(Q(p,Y)){var z=void 0;try{if(typeof p[Y]!="function"){var ce=Error((M||"React class")+": "+A+" type `"+Y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof p[Y]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ce.name="Invariant Violation",ce}z=p[Y](C,Y,M,A,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(oe){z=oe}z&&!(z instanceof Error)&&(ne(q),w("%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).",M||"React class",A,Y,typeof z),ne(null)),z instanceof Error&&!(z.message in it)&&(it[z.message]=!0,ne(q),w("Failed %s type: %s",A,z.message),ne(null))}}}var hr=Array.isArray;function St(p){return hr(p)}function ct(p){{var C=typeof Symbol=="function"&&Symbol.toStringTag,A=C&&p[Symbol.toStringTag]||p.constructor.name||"Object";return A}}function mr(p){try{return Rt(p),!1}catch{return!0}}function Rt(p){return""+p}function ut(p){if(mr(p))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ct(p)),Rt(p)}var Ee=x.ReactCurrentOwner,$t={key:!0,ref:!0,__self:!0,__source:!0},Ie,Pt,At;At={};function Ft(p){if(de.call(p,"ref")){var C=Object.getOwnPropertyDescriptor(p,"ref").get;if(C&&C.isReactWarning)return!1}return p.ref!==void 0}function Bt(p){if(de.call(p,"key")){var C=Object.getOwnPropertyDescriptor(p,"key").get;if(C&&C.isReactWarning)return!1}return p.key!==void 0}function yr(p,C){if(typeof p.ref=="string"&&Ee.current&&C&&Ee.current.stateNode!==C){var A=W(Ee.current.type);At[A]||(w('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',W(Ee.current.type),p.ref),At[A]=!0)}}function Tt(p,C){{var A=function(){Ie||(Ie=!0,w("%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)",C))};A.isReactWarning=!0,Object.defineProperty(p,"key",{get:A,configurable:!0})}}function ke(p,C){{var A=function(){Pt||(Pt=!0,w("%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)",C))};A.isReactWarning=!0,Object.defineProperty(p,"ref",{get:A,configurable:!0})}}var br=function(p,C,A,M,q,Q,Y){var z={$$typeof:t,type:p,key:C,ref:A,props:Y,_owner:Q};return z._store={},Object.defineProperty(z._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(z,"_self",{configurable:!1,enumerable:!1,writable:!1,value:M}),Object.defineProperty(z,"_source",{configurable:!1,enumerable:!1,writable:!1,value:q}),Object.freeze&&(Object.freeze(z.props),Object.freeze(z)),z};function L(p,C,A,M,q){{var Q,Y={},z=null,ce=null;A!==void 0&&(ut(A),z=""+A),Bt(C)&&(ut(C.key),z=""+C.key),Ft(C)&&(ce=C.ref,yr(C,q));for(Q in C)de.call(C,Q)&&!$t.hasOwnProperty(Q)&&(Y[Q]=C[Q]);if(p&&p.defaultProps){var oe=p.defaultProps;for(Q in oe)Y[Q]===void 0&&(Y[Q]=oe[Q])}if(z||ce){var ae=typeof p=="function"?p.displayName||p.name||"Unknown":p;z&&Tt(Y,ae),ce&&ke(Y,ae)}return br(p,z,ce,q,M,Ee.current,Y)}}var J=x.ReactCurrentOwner,Z=x.ReactDebugCurrentFrame;function ie(p){if(p){var C=p._owner,A=Le(p.type,p._source,C?C.type:null);Z.setExtraStackFrame(A)}else Z.setExtraStackFrame(null)}var fe;fe=!1;function He(p){return typeof p=="object"&&p!==null&&p.$$typeof===t}function Wt(){{if(J.current){var p=W(J.current.type);if(p)return`
22
22
 
23
- Check the render method of \``+p+"`."}return""}}function fs(p){return""}var gn={};function ps(p){{var C=zt();if(!C){var T=typeof p=="string"?p:p.displayName||p.name;T&&(C=`
23
+ Check the render method of \``+p+"`."}return""}}function fs(p){return""}var gn={};function ps(p){{var C=Wt();if(!C){var A=typeof p=="string"?p:p.displayName||p.name;A&&(C=`
24
24
 
25
- Check the top-level render call using <`+T+">.")}return C}}function hn(p,C){{if(!p._store||p._store.validated||p.key!=null)return;p._store.validated=!0;var T=ps(C);if(gn[T])return;gn[T]=!0;var M="";p&&p._owner&&p._owner!==K.current&&(M=" It was passed a child from "+W(p._owner.type)+"."),ie(p),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',T,M),ie(null)}}function mn(p,C){{if(typeof p!="object")return;if(Rt(p))for(var T=0;T<p.length;T++){var M=p[T];He(M)&&hn(M,C)}else if(He(p))p._store&&(p._store.validated=!0);else if(p){var q=b(p);if(typeof q=="function"&&q!==p.entries)for(var Q=q.call(p),Y;!(Y=Q.next()).done;)He(Y.value)&&hn(Y.value,C)}}}function vs(p){{var C=p.type;if(C==null||typeof C=="string")return;var T;if(typeof C=="function")T=C.propTypes;else if(typeof C=="object"&&(C.$$typeof===l||C.$$typeof===v))T=C.propTypes;else return;if(T){var M=W(C);Ve(T,p.props,"prop",M,p)}else if(C.PropTypes!==void 0&&!fe){fe=!0;var q=W(C);x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",q||"Unknown")}typeof C.getDefaultProps=="function"&&!C.getDefaultProps.isReactClassApproved&&x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function gs(p){{for(var C=Object.keys(p.props),T=0;T<C.length;T++){var M=C[T];if(M!=="children"&&M!=="key"){ie(p),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",M),ie(null);break}}p.ref!==null&&(ie(p),x("Invalid attribute `ref` supplied to `React.Fragment`."),ie(null))}}var yn={};function bn(p,C,T,M,q,Q){{var Y=G(p);if(!Y){var z="";(p===void 0||typeof p=="object"&&p!==null&&Object.keys(p).length===0)&&(z+=" 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 ce=fs();ce?z+=ce:z+=zt();var ne;p===null?ne="null":Rt(p)?ne="array":p!==void 0&&p.$$typeof===t?(ne="<"+(W(p.type)||"Unknown")+" />",z=" Did you accidentally export a JSX literal instead of a component?"):ne=typeof p,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ne,z)}var oe=I(p,C,T,q,Q);if(oe==null)return oe;if(Y){var Ce=C.children;if(Ce!==void 0)if(M)if(Rt(Ce)){for(var dt=0;dt<Ce.length;dt++)mn(Ce[dt],p);Object.freeze&&Object.freeze(Ce)}else x("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 mn(Ce,p)}if(de.call(C,"key")){var et=W(p),pe=Object.keys(C).filter(function(xs){return xs!=="key"}),xr=pe.length>0?"{key: someKey, "+pe.join(": ..., ")+": ...}":"{key: someKey}";if(!yn[et+xr]){var ws=pe.length>0?"{"+pe.join(": ..., ")+": ...}":"{}";x(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+A+">.")}return C}}function hn(p,C){{if(!p._store||p._store.validated||p.key!=null)return;p._store.validated=!0;var A=ps(C);if(gn[A])return;gn[A]=!0;var M="";p&&p._owner&&p._owner!==J.current&&(M=" It was passed a child from "+W(p._owner.type)+"."),ie(p),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',A,M),ie(null)}}function mn(p,C){{if(typeof p!="object")return;if(St(p))for(var A=0;A<p.length;A++){var M=p[A];He(M)&&hn(M,C)}else if(He(p))p._store&&(p._store.validated=!0);else if(p){var q=b(p);if(typeof q=="function"&&q!==p.entries)for(var Q=q.call(p),Y;!(Y=Q.next()).done;)He(Y.value)&&hn(Y.value,C)}}}function vs(p){{var C=p.type;if(C==null||typeof C=="string")return;var A;if(typeof C=="function")A=C.propTypes;else if(typeof C=="object"&&(C.$$typeof===l||C.$$typeof===v))A=C.propTypes;else return;if(A){var M=W(C);Ve(A,p.props,"prop",M,p)}else if(C.PropTypes!==void 0&&!fe){fe=!0;var q=W(C);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",q||"Unknown")}typeof C.getDefaultProps=="function"&&!C.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function gs(p){{for(var C=Object.keys(p.props),A=0;A<C.length;A++){var M=C[A];if(M!=="children"&&M!=="key"){ie(p),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",M),ie(null);break}}p.ref!==null&&(ie(p),w("Invalid attribute `ref` supplied to `React.Fragment`."),ie(null))}}var yn={};function bn(p,C,A,M,q,Q){{var Y=U(p);if(!Y){var z="";(p===void 0||typeof p=="object"&&p!==null&&Object.keys(p).length===0)&&(z+=" 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 ce=fs();ce?z+=ce:z+=Wt();var oe;p===null?oe="null":St(p)?oe="array":p!==void 0&&p.$$typeof===t?(oe="<"+(W(p.type)||"Unknown")+" />",z=" Did you accidentally export a JSX literal instead of a component?"):oe=typeof p,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",oe,z)}var ae=L(p,C,A,q,Q);if(ae==null)return ae;if(Y){var Ce=C.children;if(Ce!==void 0)if(M)if(St(Ce)){for(var dt=0;dt<Ce.length;dt++)mn(Ce[dt],p);Object.freeze&&Object.freeze(Ce)}else w("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 mn(Ce,p)}if(de.call(C,"key")){var et=W(p),pe=Object.keys(C).filter(function(xs){return xs!=="key"}),wr=pe.length>0?"{key: someKey, "+pe.join(": ..., ")+": ...}":"{key: someKey}";if(!yn[et+wr]){var ws=pe.length>0?"{"+pe.join(": ..., ")+": ...}":"{}";w(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,xr,et,ws,et),yn[et+xr]=!0}}return p===n?gs(oe):vs(oe),oe}}function hs(p,C,T){return bn(p,C,T,!0)}function ms(p,C,T){return bn(p,C,T,!1)}var ys=ms,bs=hs;Nt.Fragment=n,Nt.jsx=ys,Nt.jsxs=bs}()),Nt}process.env.NODE_ENV==="production"?Dr.exports=Es():Dr.exports=Cs();var y=Dr.exports;/**
30
+ <%s key={someKey} {...props} />`,wr,et,ws,et),yn[et+wr]=!0}}return p===n?gs(ae):vs(ae),ae}}function hs(p,C,A){return bn(p,C,A,!0)}function ms(p,C,A){return bn(p,C,A,!1)}var ys=ms,bs=hs;kt.Fragment=n,kt.jsx=ys,kt.jsxs=bs}()),kt}process.env.NODE_ENV==="production"?Nr.exports=Es():Nr.exports=Cs();var y=Nr.exports;/**
31
31
  * @license lucide-react v0.414.0 - ISC
32
32
  *
33
33
  * This source code is licensed under the ISC license.
@@ -47,32 +47,32 @@ React keys must be passed directly to JSX without using spread:
47
47
  *
48
48
  * This source code is licensed under the ISC license.
49
49
  * See the LICENSE file in the root directory of this source tree.
50
- */const cr=(e,t)=>{const r=E.forwardRef(({className:n,...o},a)=>E.createElement(Ps,{ref:a,iconNode:t,className:eo(`lucide-${Ss(e)}`,n),...o}));return r.displayName=`${e}`,r};/**
50
+ */const lr=(e,t)=>{const r=E.forwardRef(({className:n,...o},a)=>E.createElement(Ps,{ref:a,iconNode:t,className:eo(`lucide-${Ss(e)}`,n),...o}));return r.displayName=`${e}`,r};/**
51
51
  * @license lucide-react v0.414.0 - ISC
52
52
  *
53
53
  * This source code is licensed under the ISC license.
54
54
  * See the LICENSE file in the root directory of this source tree.
55
- */const As=cr("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
55
+ */const As=lr("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
56
56
  * @license lucide-react v0.414.0 - ISC
57
57
  *
58
58
  * This source code is licensed under the ISC license.
59
59
  * See the LICENSE file in the root directory of this source tree.
60
- */const Ts=cr("PanelRight",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
60
+ */const Ts=lr("PanelRight",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
61
61
  * @license lucide-react v0.414.0 - ISC
62
62
  *
63
63
  * This source code is licensed under the ISC license.
64
64
  * See the LICENSE file in the root directory of this source tree.
65
- */const Os=cr("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
65
+ */const Os=lr("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
66
66
  * @license lucide-react v0.414.0 - ISC
67
67
  *
68
68
  * This source code is licensed under the ISC license.
69
69
  * See the LICENSE file in the root directory of this source tree.
70
- */const ks=cr("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"}]]);function Ns(e,t){const r=d.createContext(t);function n(a){const{children:s,...i}=a,l=d.useMemo(()=>i,Object.values(i));return y.jsx(r.Provider,{value:l,children:s})}function o(a){const s=d.useContext(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return n.displayName=e+"Provider",[n,o]}function xt(e,t=[]){let r=[];function n(a,s){const i=d.createContext(s),l=r.length;r=[...r,s];function u(v){const{scope:c,children:m,...g}=v,h=(c==null?void 0:c[e][l])||i,b=d.useMemo(()=>g,Object.values(g));return y.jsx(h.Provider,{value:b,children:m})}function f(v,c){const m=(c==null?void 0:c[e][l])||i,g=d.useContext(m);if(g)return g;if(s!==void 0)return s;throw new Error(`\`${v}\` must be used within \`${a}\``)}return u.displayName=a+"Provider",[u,f]}const o=()=>{const a=r.map(s=>d.createContext(s));return function(i){const l=(i==null?void 0:i[e])||a;return d.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return o.scopeName=e,[n,Ds(o,...t)]}function Ds(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=n.reduce((i,{useScope:l,scopeName:u})=>{const v=l(a)[`__scope${u}`];return{...i,...v}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function _s(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function to(...e){return t=>e.forEach(r=>_s(r,t))}function ge(...e){return d.useCallback(to(...e),e)}function le(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var nt=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},js=d.useId||(()=>{}),Ms=0;function Jt(e){const[t,r]=d.useState(js());return nt(()=>{r(n=>n??String(Ms++))},[e]),t?`radix-${t}`:""}function qe(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Yr({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=Is({defaultProp:t,onChange:r}),a=e!==void 0,s=a?e:n,i=qe(r),l=d.useCallback(u=>{if(a){const v=typeof u=="function"?u(e):u;v!==e&&i(v)}else o(u)},[a,e,o,i]);return[s,l]}function Is({defaultProp:e,onChange:t}){const r=d.useState(e),[n]=r,o=d.useRef(n),a=qe(t);return d.useEffect(()=>{o.current!==n&&(a(n),o.current=n)},[n,o,a]),r}var It=d.forwardRef((e,t)=>{const{children:r,...n}=e,o=d.Children.toArray(r),a=o.find(Ls);if(a){const s=a.props.children,i=o.map(l=>l===a?d.Children.count(s)>1?d.Children.only(null):d.isValidElement(s)?s.props.children:null:l);return y.jsx(_r,{...n,ref:t,children:d.isValidElement(s)?d.cloneElement(s,void 0,i):null})}return y.jsx(_r,{...n,ref:t,children:r})});It.displayName="Slot";var _r=d.forwardRef((e,t)=>{const{children:r,...n}=e;if(d.isValidElement(r)){const o=Fs(r);return d.cloneElement(r,{...$s(n,r.props),ref:t?to(t,o):o})}return d.Children.count(r)>1?d.Children.only(null):null});_r.displayName="SlotClone";var Gr=({children:e})=>y.jsx(y.Fragment,{children:e});function Ls(e){return d.isValidElement(e)&&e.type===Gr}function $s(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{a(...i),o(...i)}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function Fs(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Bs=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],se=Bs.reduce((e,t)=>{const r=d.forwardRef((n,o)=>{const{asChild:a,...s}=n,i=a?It:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(i,{...s,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ws(e,t){e&&Ur.flushSync(()=>e.dispatchEvent(t))}function zs(e,t=globalThis==null?void 0:globalThis.document){const r=qe(e);d.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Vs="DismissableLayer",jr="dismissableLayer.update",Hs="dismissableLayer.pointerDownOutside",Us="dismissableLayer.focusOutside",En,ro=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Xr=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...l}=e,u=d.useContext(ro),[f,v]=d.useState(null),c=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=d.useState({}),g=ge(t,k=>v(k)),h=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=h.indexOf(b),x=f?h.indexOf(f):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,R=x>=w,P=Xs(k=>{const B=k.target,U=[...u.branches].some(G=>G.contains(B));!R||U||(o==null||o(k),s==null||s(k),k.defaultPrevented||i==null||i())},c),N=qs(k=>{const B=k.target;[...u.branches].some(G=>G.contains(B))||(a==null||a(k),s==null||s(k),k.defaultPrevented||i==null||i())},c);return zs(k=>{x===u.layers.size-1&&(n==null||n(k),!k.defaultPrevented&&i&&(k.preventDefault(),i()))},c),d.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(En=c.body.style.pointerEvents,c.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Cn(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(c.body.style.pointerEvents=En)}},[f,c,r,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Cn())},[f,u]),d.useEffect(()=>{const k=()=>m({});return document.addEventListener(jr,k),()=>document.removeEventListener(jr,k)},[]),y.jsx(se.div,{...l,ref:g,style:{pointerEvents:S?R?"auto":"none":void 0,...e.style},onFocusCapture:le(e.onFocusCapture,N.onFocusCapture),onBlurCapture:le(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:le(e.onPointerDownCapture,P.onPointerDownCapture)})});Xr.displayName=Vs;var Ys="DismissableLayerBranch",Gs=d.forwardRef((e,t)=>{const r=d.useContext(ro),n=d.useRef(null),o=ge(t,n);return d.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),y.jsx(se.div,{...e,ref:o})});Gs.displayName=Ys;function Xs(e,t=globalThis==null?void 0:globalThis.document){const r=qe(e),n=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=i=>{if(i.target&&!n.current){let l=function(){no(Hs,r,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function qs(e,t=globalThis==null?void 0:globalThis.document){const r=qe(e),n=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!n.current&&no(Us,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Cn(){const e=new CustomEvent(jr);document.dispatchEvent(e)}function no(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Ws(o,a):o.dispatchEvent(a)}var Er="focusScope.autoFocusOnMount",Cr="focusScope.autoFocusOnUnmount",Sn={bubbles:!1,cancelable:!0},Ks="FocusScope",oo=d.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,l]=d.useState(null),u=qe(o),f=qe(a),v=d.useRef(null),c=ge(t,h=>l(h)),m=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(n){let h=function(S){if(m.paused||!i)return;const R=S.target;i.contains(R)?v.current=R:Ge(v.current,{select:!0})},b=function(S){if(m.paused||!i)return;const R=S.relatedTarget;R!==null&&(i.contains(R)||Ge(v.current,{select:!0}))},w=function(S){if(document.activeElement===document.body)for(const P of S)P.removedNodes.length>0&&Ge(i)};document.addEventListener("focusin",h),document.addEventListener("focusout",b);const x=new MutationObserver(w);return i&&x.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",b),x.disconnect()}}},[n,i,m.paused]),d.useEffect(()=>{if(i){Pn.add(m);const h=document.activeElement;if(!i.contains(h)){const w=new CustomEvent(Er,Sn);i.addEventListener(Er,u),i.dispatchEvent(w),w.defaultPrevented||(Js(ri(ao(i)),{select:!0}),document.activeElement===h&&Ge(i))}return()=>{i.removeEventListener(Er,u),setTimeout(()=>{const w=new CustomEvent(Cr,Sn);i.addEventListener(Cr,f),i.dispatchEvent(w),w.defaultPrevented||Ge(h??document.body,{select:!0}),i.removeEventListener(Cr,f),Pn.remove(m)},0)}}},[i,u,f,m]);const g=d.useCallback(h=>{if(!r&&!n||m.paused)return;const b=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,w=document.activeElement;if(b&&w){const x=h.currentTarget,[S,R]=Zs(x);S&&R?!h.shiftKey&&w===R?(h.preventDefault(),r&&Ge(S,{select:!0})):h.shiftKey&&w===S&&(h.preventDefault(),r&&Ge(R,{select:!0})):w===x&&h.preventDefault()}},[r,n,m.paused]);return y.jsx(se.div,{tabIndex:-1,...s,ref:c,onKeyDown:g})});oo.displayName=Ks;function Js(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Ge(n,{select:t}),document.activeElement!==r)return}function Zs(e){const t=ao(e),r=Rn(t,e),n=Rn(t.reverse(),e);return[r,n]}function ao(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Rn(e,t){for(const r of e)if(!Qs(r,{upTo:t}))return r}function Qs(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ei(e){return e instanceof HTMLInputElement&&"select"in e}function Ge(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&ei(e)&&t&&e.select()}}var Pn=ti();function ti(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=An(e,t),e.unshift(t)},remove(t){var r;e=An(e,t),(r=e[0])==null||r.resume()}}}function An(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function ri(e){return e.filter(t=>t.tagName!=="A")}var ni="Portal",so=d.forwardRef((e,t)=>{var i;const{container:r,...n}=e,[o,a]=d.useState(!1);nt(()=>a(!0),[]);const s=r||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Hr.createPortal(y.jsx(se.div,{...n,ref:t}),s):null});so.displayName=ni;function oi(e,t){return d.useReducer((r,n)=>t[r][n]??r,e)}var Lt=e=>{const{present:t,children:r}=e,n=ai(t),o=typeof r=="function"?r({present:n.isPresent}):d.Children.only(r),a=ge(n.ref,si(o));return typeof r=="function"||n.isPresent?d.cloneElement(o,{ref:a}):null};Lt.displayName="Presence";function ai(e){const[t,r]=d.useState(),n=d.useRef({}),o=d.useRef(e),a=d.useRef("none"),s=e?"mounted":"unmounted",[i,l]=oi(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=Vt(n.current);a.current=i==="mounted"?u:"none"},[i]),nt(()=>{const u=n.current,f=o.current;if(f!==e){const c=a.current,m=Vt(u);e?l("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&c!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),nt(()=>{if(t){const u=v=>{const m=Vt(n.current).includes(v.animationName);v.target===t&&m&&Ur.flushSync(()=>l("ANIMATION_END"))},f=v=>{v.target===t&&(a.current=Vt(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:d.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function Vt(e){return(e==null?void 0:e.animationName)||"none"}function si(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Sr=0;function ii(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Tn()),document.body.insertAdjacentElement("beforeend",e[1]??Tn()),Sr++,()=>{Sr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Sr--}},[])}function Tn(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Ne=function(){return Ne=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Ne.apply(this,arguments)};function io(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function li(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var Zt="right-scroll-bar-position",Qt="width-before-scroll-bar",ci="with-scroll-bars-hidden",ui="--removed-body-scroll-bar-size";function Rr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function di(e,t){var r=E.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var fi=typeof window<"u"?d.useLayoutEffect:d.useEffect,On=new WeakMap;function pi(e,t){var r=di(null,function(n){return e.forEach(function(o){return Rr(o,n)})});return fi(function(){var n=On.get(r);if(n){var o=new Set(n),a=new Set(e),s=r.current;o.forEach(function(i){a.has(i)||Rr(i,null)}),a.forEach(function(i){o.has(i)||Rr(i,s)})}On.set(r,e)},[e]),r}function vi(e){return e}function gi(e,t){t===void 0&&(t=vi);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var s=t(a,n);return r.push(s),function(){r=r.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(n=!0;r.length;){var s=r;r=[],s.forEach(a)}r={push:function(i){return a(i)},filter:function(){return r}}},assignMedium:function(a){n=!0;var s=[];if(r.length){var i=r;r=[],i.forEach(a),s=r}var l=function(){var f=s;s=[],f.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(f){s.push(f),u()},filter:function(f){return s=s.filter(f),r}}}};return o}function hi(e){e===void 0&&(e={});var t=gi(null);return t.options=Ne({async:!0,ssr:!1},e),t}var lo=function(e){var t=e.sideCar,r=io(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return d.createElement(n,Ne({},r))};lo.isSideCarExport=!0;function mi(e,t){return e.useMedium(t),lo}var co=hi(),Pr=function(){},ur=d.forwardRef(function(e,t){var r=d.useRef(null),n=d.useState({onScrollCapture:Pr,onWheelCapture:Pr,onTouchMoveCapture:Pr}),o=n[0],a=n[1],s=e.forwardProps,i=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,v=e.shards,c=e.sideCar,m=e.noIsolation,g=e.inert,h=e.allowPinchZoom,b=e.as,w=b===void 0?"div":b,x=e.gapMode,S=io(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=c,P=pi([r,t]),N=Ne(Ne({},S),o);return d.createElement(d.Fragment,null,f&&d.createElement(R,{sideCar:co,removeScrollBar:u,shards:v,noIsolation:m,inert:g,setCallbacks:a,allowPinchZoom:!!h,lockRef:r,gapMode:x}),s?d.cloneElement(d.Children.only(i),Ne(Ne({},N),{ref:P})):d.createElement(w,Ne({},N,{className:l,ref:P}),i))});ur.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ur.classNames={fullWidth:Qt,zeroRight:Zt};var yi=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function bi(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=yi();return t&&e.setAttribute("nonce",t),e}function wi(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function xi(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ei=function(){var e=0,t=null;return{add:function(r){e==0&&(t=bi())&&(wi(t,r),xi(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ci=function(){var e=Ei();return function(t,r){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},uo=function(){var e=Ci(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Si={left:0,top:0,right:0,gap:0},Ar=function(e){return parseInt(e||"",10)||0},Ri=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ar(r),Ar(n),Ar(o)]},Pi=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Si;var t=Ri(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Ai=uo(),ht="data-scroll-locked",Ti=function(e,t,r,n){var o=e.left,a=e.top,s=e.right,i=e.gap;return r===void 0&&(r="margin"),`
70
+ */const ks=lr("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"}]]);function Ns(e,t){const r=d.createContext(t);function n(a){const{children:s,...i}=a,l=d.useMemo(()=>i,Object.values(i));return y.jsx(r.Provider,{value:l,children:s})}function o(a){const s=d.useContext(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return n.displayName=e+"Provider",[n,o]}function wt(e,t=[]){let r=[];function n(a,s){const i=d.createContext(s),l=r.length;r=[...r,s];function u(v){const{scope:c,children:h,...m}=v,g=(c==null?void 0:c[e][l])||i,b=d.useMemo(()=>m,Object.values(m));return y.jsx(g.Provider,{value:b,children:h})}function f(v,c){const h=(c==null?void 0:c[e][l])||i,m=d.useContext(h);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${v}\` must be used within \`${a}\``)}return u.displayName=a+"Provider",[u,f]}const o=()=>{const a=r.map(s=>d.createContext(s));return function(i){const l=(i==null?void 0:i[e])||a;return d.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return o.scopeName=e,[n,Ds(o,...t)]}function Ds(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=n.reduce((i,{useScope:l,scopeName:u})=>{const v=l(a)[`__scope${u}`];return{...i,...v}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function _s(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function to(...e){return t=>e.forEach(r=>_s(r,t))}function ge(...e){return d.useCallback(to(...e),e)}function le(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var nt=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},js=d.useId||(()=>{}),Ms=0;function qt(e){const[t,r]=d.useState(js());return nt(()=>{r(n=>n??String(Ms++))},[e]),t?`radix-${t}`:""}function Xe(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Yr({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=Ls({defaultProp:t,onChange:r}),a=e!==void 0,s=a?e:n,i=Xe(r),l=d.useCallback(u=>{if(a){const v=typeof u=="function"?u(e):u;v!==e&&i(v)}else o(u)},[a,e,o,i]);return[s,l]}function Ls({defaultProp:e,onChange:t}){const r=d.useState(e),[n]=r,o=d.useRef(n),a=Xe(t);return d.useEffect(()=>{o.current!==n&&(a(n),o.current=n)},[n,o,a]),r}var Mt=d.forwardRef((e,t)=>{const{children:r,...n}=e,o=d.Children.toArray(r),a=o.find(Is);if(a){const s=a.props.children,i=o.map(l=>l===a?d.Children.count(s)>1?d.Children.only(null):d.isValidElement(s)?s.props.children:null:l);return y.jsx(Dr,{...n,ref:t,children:d.isValidElement(s)?d.cloneElement(s,void 0,i):null})}return y.jsx(Dr,{...n,ref:t,children:r})});Mt.displayName="Slot";var Dr=d.forwardRef((e,t)=>{const{children:r,...n}=e;if(d.isValidElement(r)){const o=Fs(r);return d.cloneElement(r,{...$s(n,r.props),ref:t?to(t,o):o})}return d.Children.count(r)>1?d.Children.only(null):null});Dr.displayName="SlotClone";var Gr=({children:e})=>y.jsx(y.Fragment,{children:e});function Is(e){return d.isValidElement(e)&&e.type===Gr}function $s(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{a(...i),o(...i)}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function Fs(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Bs=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],se=Bs.reduce((e,t)=>{const r=d.forwardRef((n,o)=>{const{asChild:a,...s}=n,i=a?Mt:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(i,{...s,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ws(e,t){e&&Ur.flushSync(()=>e.dispatchEvent(t))}function zs(e,t=globalThis==null?void 0:globalThis.document){const r=Xe(e);d.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Vs="DismissableLayer",_r="dismissableLayer.update",Hs="dismissableLayer.pointerDownOutside",Us="dismissableLayer.focusOutside",En,ro=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Kr=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...l}=e,u=d.useContext(ro),[f,v]=d.useState(null),c=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=d.useState({}),m=ge(t,O=>v(O)),g=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=g.indexOf(b),w=f?g.indexOf(f):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,R=w>=x,P=Ks(O=>{const B=O.target,G=[...u.branches].some(U=>U.contains(B));!R||G||(o==null||o(O),s==null||s(O),O.defaultPrevented||i==null||i())},c),N=Xs(O=>{const B=O.target;[...u.branches].some(U=>U.contains(B))||(a==null||a(O),s==null||s(O),O.defaultPrevented||i==null||i())},c);return zs(O=>{w===u.layers.size-1&&(n==null||n(O),!O.defaultPrevented&&i&&(O.preventDefault(),i()))},c),d.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(En=c.body.style.pointerEvents,c.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Cn(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(c.body.style.pointerEvents=En)}},[f,c,r,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Cn())},[f,u]),d.useEffect(()=>{const O=()=>h({});return document.addEventListener(_r,O),()=>document.removeEventListener(_r,O)},[]),y.jsx(se.div,{...l,ref:m,style:{pointerEvents:S?R?"auto":"none":void 0,...e.style},onFocusCapture:le(e.onFocusCapture,N.onFocusCapture),onBlurCapture:le(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:le(e.onPointerDownCapture,P.onPointerDownCapture)})});Kr.displayName=Vs;var Ys="DismissableLayerBranch",Gs=d.forwardRef((e,t)=>{const r=d.useContext(ro),n=d.useRef(null),o=ge(t,n);return d.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),y.jsx(se.div,{...e,ref:o})});Gs.displayName=Ys;function Ks(e,t=globalThis==null?void 0:globalThis.document){const r=Xe(e),n=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=i=>{if(i.target&&!n.current){let l=function(){no(Hs,r,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Xs(e,t=globalThis==null?void 0:globalThis.document){const r=Xe(e),n=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!n.current&&no(Us,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Cn(){const e=new CustomEvent(_r);document.dispatchEvent(e)}function no(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Ws(o,a):o.dispatchEvent(a)}var xr="focusScope.autoFocusOnMount",Er="focusScope.autoFocusOnUnmount",Sn={bubbles:!1,cancelable:!0},qs="FocusScope",oo=d.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,l]=d.useState(null),u=Xe(o),f=Xe(a),v=d.useRef(null),c=ge(t,g=>l(g)),h=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(n){let g=function(S){if(h.paused||!i)return;const R=S.target;i.contains(R)?v.current=R:Ge(v.current,{select:!0})},b=function(S){if(h.paused||!i)return;const R=S.relatedTarget;R!==null&&(i.contains(R)||Ge(v.current,{select:!0}))},x=function(S){if(document.activeElement===document.body)for(const P of S)P.removedNodes.length>0&&Ge(i)};document.addEventListener("focusin",g),document.addEventListener("focusout",b);const w=new MutationObserver(x);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",b),w.disconnect()}}},[n,i,h.paused]),d.useEffect(()=>{if(i){Pn.add(h);const g=document.activeElement;if(!i.contains(g)){const x=new CustomEvent(xr,Sn);i.addEventListener(xr,u),i.dispatchEvent(x),x.defaultPrevented||(Js(ri(ao(i)),{select:!0}),document.activeElement===g&&Ge(i))}return()=>{i.removeEventListener(xr,u),setTimeout(()=>{const x=new CustomEvent(Er,Sn);i.addEventListener(Er,f),i.dispatchEvent(x),x.defaultPrevented||Ge(g??document.body,{select:!0}),i.removeEventListener(Er,f),Pn.remove(h)},0)}}},[i,u,f,h]);const m=d.useCallback(g=>{if(!r&&!n||h.paused)return;const b=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,x=document.activeElement;if(b&&x){const w=g.currentTarget,[S,R]=Zs(w);S&&R?!g.shiftKey&&x===R?(g.preventDefault(),r&&Ge(S,{select:!0})):g.shiftKey&&x===S&&(g.preventDefault(),r&&Ge(R,{select:!0})):x===w&&g.preventDefault()}},[r,n,h.paused]);return y.jsx(se.div,{tabIndex:-1,...s,ref:c,onKeyDown:m})});oo.displayName=qs;function Js(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Ge(n,{select:t}),document.activeElement!==r)return}function Zs(e){const t=ao(e),r=Rn(t,e),n=Rn(t.reverse(),e);return[r,n]}function ao(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Rn(e,t){for(const r of e)if(!Qs(r,{upTo:t}))return r}function Qs(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ei(e){return e instanceof HTMLInputElement&&"select"in e}function Ge(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&ei(e)&&t&&e.select()}}var Pn=ti();function ti(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=An(e,t),e.unshift(t)},remove(t){var r;e=An(e,t),(r=e[0])==null||r.resume()}}}function An(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function ri(e){return e.filter(t=>t.tagName!=="A")}var ni="Portal",so=d.forwardRef((e,t)=>{var i;const{container:r,...n}=e,[o,a]=d.useState(!1);nt(()=>a(!0),[]);const s=r||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Hr.createPortal(y.jsx(se.div,{...n,ref:t}),s):null});so.displayName=ni;function oi(e,t){return d.useReducer((r,n)=>t[r][n]??r,e)}var Lt=e=>{const{present:t,children:r}=e,n=ai(t),o=typeof r=="function"?r({present:n.isPresent}):d.Children.only(r),a=ge(n.ref,si(o));return typeof r=="function"||n.isPresent?d.cloneElement(o,{ref:a}):null};Lt.displayName="Presence";function ai(e){const[t,r]=d.useState(),n=d.useRef({}),o=d.useRef(e),a=d.useRef("none"),s=e?"mounted":"unmounted",[i,l]=oi(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=zt(n.current);a.current=i==="mounted"?u:"none"},[i]),nt(()=>{const u=n.current,f=o.current;if(f!==e){const c=a.current,h=zt(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&c!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),nt(()=>{if(t){const u=v=>{const h=zt(n.current).includes(v.animationName);v.target===t&&h&&Ur.flushSync(()=>l("ANIMATION_END"))},f=v=>{v.target===t&&(a.current=zt(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:d.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function zt(e){return(e==null?void 0:e.animationName)||"none"}function si(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Cr=0;function ii(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Tn()),document.body.insertAdjacentElement("beforeend",e[1]??Tn()),Cr++,()=>{Cr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Cr--}},[])}function Tn(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Ne=function(){return Ne=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Ne.apply(this,arguments)};function io(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function li(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var Jt="right-scroll-bar-position",Zt="width-before-scroll-bar",ci="with-scroll-bars-hidden",ui="--removed-body-scroll-bar-size";function Sr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function di(e,t){var r=E.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var fi=typeof window<"u"?d.useLayoutEffect:d.useEffect,On=new WeakMap;function pi(e,t){var r=di(null,function(n){return e.forEach(function(o){return Sr(o,n)})});return fi(function(){var n=On.get(r);if(n){var o=new Set(n),a=new Set(e),s=r.current;o.forEach(function(i){a.has(i)||Sr(i,null)}),a.forEach(function(i){o.has(i)||Sr(i,s)})}On.set(r,e)},[e]),r}function vi(e){return e}function gi(e,t){t===void 0&&(t=vi);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var s=t(a,n);return r.push(s),function(){r=r.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(n=!0;r.length;){var s=r;r=[],s.forEach(a)}r={push:function(i){return a(i)},filter:function(){return r}}},assignMedium:function(a){n=!0;var s=[];if(r.length){var i=r;r=[],i.forEach(a),s=r}var l=function(){var f=s;s=[],f.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(f){s.push(f),u()},filter:function(f){return s=s.filter(f),r}}}};return o}function hi(e){e===void 0&&(e={});var t=gi(null);return t.options=Ne({async:!0,ssr:!1},e),t}var lo=function(e){var t=e.sideCar,r=io(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return d.createElement(n,Ne({},r))};lo.isSideCarExport=!0;function mi(e,t){return e.useMedium(t),lo}var co=hi(),Rr=function(){},cr=d.forwardRef(function(e,t){var r=d.useRef(null),n=d.useState({onScrollCapture:Rr,onWheelCapture:Rr,onTouchMoveCapture:Rr}),o=n[0],a=n[1],s=e.forwardProps,i=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,v=e.shards,c=e.sideCar,h=e.noIsolation,m=e.inert,g=e.allowPinchZoom,b=e.as,x=b===void 0?"div":b,w=e.gapMode,S=io(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=c,P=pi([r,t]),N=Ne(Ne({},S),o);return d.createElement(d.Fragment,null,f&&d.createElement(R,{sideCar:co,removeScrollBar:u,shards:v,noIsolation:h,inert:m,setCallbacks:a,allowPinchZoom:!!g,lockRef:r,gapMode:w}),s?d.cloneElement(d.Children.only(i),Ne(Ne({},N),{ref:P})):d.createElement(x,Ne({},N,{className:l,ref:P}),i))});cr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};cr.classNames={fullWidth:Zt,zeroRight:Jt};var yi=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function bi(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=yi();return t&&e.setAttribute("nonce",t),e}function wi(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function xi(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ei=function(){var e=0,t=null;return{add:function(r){e==0&&(t=bi())&&(wi(t,r),xi(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ci=function(){var e=Ei();return function(t,r){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},uo=function(){var e=Ci(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Si={left:0,top:0,right:0,gap:0},Pr=function(e){return parseInt(e||"",10)||0},Ri=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Pr(r),Pr(n),Pr(o)]},Pi=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Si;var t=Ri(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Ai=uo(),gt="data-scroll-locked",Ti=function(e,t,r,n){var o=e.left,a=e.top,s=e.right,i=e.gap;return r===void 0&&(r="margin"),`
71
71
  .`.concat(ci,` {
72
72
  overflow: hidden `).concat(n,`;
73
73
  padding-right: `).concat(i,"px ").concat(n,`;
74
74
  }
75
- body[`).concat(ht,`] {
75
+ body[`).concat(gt,`] {
76
76
  overflow: hidden `).concat(n,`;
77
77
  overscroll-behavior: contain;
78
78
  `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
@@ -85,42 +85,42 @@ React keys must be passed directly to JSX without using spread:
85
85
  `),r==="padding"&&"padding-right: ".concat(i,"px ").concat(n,";")].filter(Boolean).join(""),`
86
86
  }
87
87
 
88
- .`).concat(Zt,` {
88
+ .`).concat(Jt,` {
89
89
  right: `).concat(i,"px ").concat(n,`;
90
90
  }
91
91
 
92
- .`).concat(Qt,` {
92
+ .`).concat(Zt,` {
93
93
  margin-right: `).concat(i,"px ").concat(n,`;
94
94
  }
95
95
 
96
- .`).concat(Zt," .").concat(Zt,` {
96
+ .`).concat(Jt," .").concat(Jt,` {
97
97
  right: 0 `).concat(n,`;
98
98
  }
99
99
 
100
- .`).concat(Qt," .").concat(Qt,` {
100
+ .`).concat(Zt," .").concat(Zt,` {
101
101
  margin-right: 0 `).concat(n,`;
102
102
  }
103
103
 
104
- body[`).concat(ht,`] {
104
+ body[`).concat(gt,`] {
105
105
  `).concat(ui,": ").concat(i,`px;
106
106
  }
107
- `)},kn=function(){var e=parseInt(document.body.getAttribute(ht)||"0",10);return isFinite(e)?e:0},Oi=function(){d.useEffect(function(){return document.body.setAttribute(ht,(kn()+1).toString()),function(){var e=kn()-1;e<=0?document.body.removeAttribute(ht):document.body.setAttribute(ht,e.toString())}},[])},ki=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;Oi();var a=d.useMemo(function(){return Pi(o)},[o]);return d.createElement(Ai,{styles:Ti(a,!t,o,r?"":"!important")})},Mr=!1;if(typeof window<"u")try{var Ht=Object.defineProperty({},"passive",{get:function(){return Mr=!0,!0}});window.addEventListener("test",Ht,Ht),window.removeEventListener("test",Ht,Ht)}catch{Mr=!1}var ft=Mr?{passive:!1}:!1,Ni=function(e){return e.tagName==="TEXTAREA"},fo=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Ni(e)&&r[t]==="visible")},Di=function(e){return fo(e,"overflowY")},_i=function(e){return fo(e,"overflowX")},Nn=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=po(e,n);if(o){var a=vo(e,n),s=a[1],i=a[2];if(s>i)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},ji=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Mi=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},po=function(e,t){return e==="v"?Di(t):_i(t)},vo=function(e,t){return e==="v"?ji(t):Mi(t)},Ii=function(e,t){return e==="h"&&t==="rtl"?-1:1},Li=function(e,t,r,n,o){var a=Ii(e,window.getComputedStyle(t).direction),s=a*n,i=r.target,l=t.contains(i),u=!1,f=s>0,v=0,c=0;do{var m=vo(e,i),g=m[0],h=m[1],b=m[2],w=h-b-a*g;(g||w)&&po(e,i)&&(v+=w,c+=g),i instanceof ShadowRoot?i=i.host:i=i.parentNode}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(f&&(Math.abs(v)<1||!o)||!f&&(Math.abs(c)<1||!o))&&(u=!0),u},Ut=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Dn=function(e){return[e.deltaX,e.deltaY]},_n=function(e){return e&&"current"in e?e.current:e},$i=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Fi=function(e){return`
107
+ `)},kn=function(){var e=parseInt(document.body.getAttribute(gt)||"0",10);return isFinite(e)?e:0},Oi=function(){d.useEffect(function(){return document.body.setAttribute(gt,(kn()+1).toString()),function(){var e=kn()-1;e<=0?document.body.removeAttribute(gt):document.body.setAttribute(gt,e.toString())}},[])},ki=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;Oi();var a=d.useMemo(function(){return Pi(o)},[o]);return d.createElement(Ai,{styles:Ti(a,!t,o,r?"":"!important")})},jr=!1;if(typeof window<"u")try{var Vt=Object.defineProperty({},"passive",{get:function(){return jr=!0,!0}});window.addEventListener("test",Vt,Vt),window.removeEventListener("test",Vt,Vt)}catch{jr=!1}var ft=jr?{passive:!1}:!1,Ni=function(e){return e.tagName==="TEXTAREA"},fo=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Ni(e)&&r[t]==="visible")},Di=function(e){return fo(e,"overflowY")},_i=function(e){return fo(e,"overflowX")},Nn=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=po(e,n);if(o){var a=vo(e,n),s=a[1],i=a[2];if(s>i)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},ji=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Mi=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},po=function(e,t){return e==="v"?Di(t):_i(t)},vo=function(e,t){return e==="v"?ji(t):Mi(t)},Li=function(e,t){return e==="h"&&t==="rtl"?-1:1},Ii=function(e,t,r,n,o){var a=Li(e,window.getComputedStyle(t).direction),s=a*n,i=r.target,l=t.contains(i),u=!1,f=s>0,v=0,c=0;do{var h=vo(e,i),m=h[0],g=h[1],b=h[2],x=g-b-a*m;(m||x)&&po(e,i)&&(v+=x,c+=m),i instanceof ShadowRoot?i=i.host:i=i.parentNode}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(f&&(Math.abs(v)<1||!o)||!f&&(Math.abs(c)<1||!o))&&(u=!0),u},Ht=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Dn=function(e){return[e.deltaX,e.deltaY]},_n=function(e){return e&&"current"in e?e.current:e},$i=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Fi=function(e){return`
108
108
  .block-interactivity-`.concat(e,` {pointer-events: none;}
109
109
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
110
- `)},Bi=0,pt=[];function Wi(e){var t=d.useRef([]),r=d.useRef([0,0]),n=d.useRef(),o=d.useState(Bi++)[0],a=d.useState(uo)[0],s=d.useRef(e);d.useEffect(function(){s.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=li([e.lockRef.current],(e.shards||[]).map(_n),!0).filter(Boolean);return h.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=d.useCallback(function(h,b){if("touches"in h&&h.touches.length===2)return!s.current.allowPinchZoom;var w=Ut(h),x=r.current,S="deltaX"in h?h.deltaX:x[0]-w[0],R="deltaY"in h?h.deltaY:x[1]-w[1],P,N=h.target,k=Math.abs(S)>Math.abs(R)?"h":"v";if("touches"in h&&k==="h"&&N.type==="range")return!1;var B=Nn(k,N);if(!B)return!0;if(B?P=k:(P=k==="v"?"h":"v",B=Nn(k,N)),!B)return!1;if(!n.current&&"changedTouches"in h&&(S||R)&&(n.current=P),!P)return!0;var U=n.current||P;return Li(U,b,h,U==="h"?S:R,!0)},[]),l=d.useCallback(function(h){var b=h;if(!(!pt.length||pt[pt.length-1]!==a)){var w="deltaY"in b?Dn(b):Ut(b),x=t.current.filter(function(P){return P.name===b.type&&(P.target===b.target||b.target===P.shadowParent)&&$i(P.delta,w)})[0];if(x&&x.should){b.cancelable&&b.preventDefault();return}if(!x){var S=(s.current.shards||[]).map(_n).filter(Boolean).filter(function(P){return P.contains(b.target)}),R=S.length>0?i(b,S[0]):!s.current.noIsolation;R&&b.cancelable&&b.preventDefault()}}},[]),u=d.useCallback(function(h,b,w,x){var S={name:h,delta:b,target:w,should:x,shadowParent:zi(w)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(R){return R!==S})},1)},[]),f=d.useCallback(function(h){r.current=Ut(h),n.current=void 0},[]),v=d.useCallback(function(h){u(h.type,Dn(h),h.target,i(h,e.lockRef.current))},[]),c=d.useCallback(function(h){u(h.type,Ut(h),h.target,i(h,e.lockRef.current))},[]);d.useEffect(function(){return pt.push(a),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:c}),document.addEventListener("wheel",l,ft),document.addEventListener("touchmove",l,ft),document.addEventListener("touchstart",f,ft),function(){pt=pt.filter(function(h){return h!==a}),document.removeEventListener("wheel",l,ft),document.removeEventListener("touchmove",l,ft),document.removeEventListener("touchstart",f,ft)}},[]);var m=e.removeScrollBar,g=e.inert;return d.createElement(d.Fragment,null,g?d.createElement(a,{styles:Fi(o)}):null,m?d.createElement(ki,{gapMode:e.gapMode}):null)}function zi(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Vi=mi(co,Wi);var go=d.forwardRef(function(e,t){return d.createElement(ur,Ne({},e,{ref:t,sideCar:Vi}))});go.classNames=ur.classNames;var Hi=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},vt=new WeakMap,Yt=new WeakMap,Gt={},Tr=0,ho=function(e){return e&&(e.host||ho(e.parentNode))},Ui=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=ho(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Yi=function(e,t,r,n){var o=Ui(t,Array.isArray(e)?e:[e]);Gt[r]||(Gt[r]=new WeakMap);var a=Gt[r],s=[],i=new Set,l=new Set(o),u=function(v){!v||i.has(v)||(i.add(v),u(v.parentNode))};o.forEach(u);var f=function(v){!v||l.has(v)||Array.prototype.forEach.call(v.children,function(c){if(i.has(c))f(c);else try{var m=c.getAttribute(n),g=m!==null&&m!=="false",h=(vt.get(c)||0)+1,b=(a.get(c)||0)+1;vt.set(c,h),a.set(c,b),s.push(c),h===1&&g&&Yt.set(c,!0),b===1&&c.setAttribute(r,"true"),g||c.setAttribute(n,"true")}catch(w){console.error("aria-hidden: cannot operate on ",c,w)}})};return f(t),i.clear(),Tr++,function(){s.forEach(function(v){var c=vt.get(v)-1,m=a.get(v)-1;vt.set(v,c),a.set(v,m),c||(Yt.has(v)||v.removeAttribute(n),Yt.delete(v)),m||v.removeAttribute(r)}),Tr--,Tr||(vt=new WeakMap,vt=new WeakMap,Yt=new WeakMap,Gt={})}},Gi=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=Hi(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),Yi(n,o,r,"aria-hidden")):function(){return null}},qr="Dialog",[mo,yo]=xt(qr),[Xi,Ae]=mo(qr),bo=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,i=d.useRef(null),l=d.useRef(null),[u=!1,f]=Yr({prop:n,defaultProp:o,onChange:a});return y.jsx(Xi,{scope:t,triggerRef:i,contentRef:l,contentId:Jt(),titleId:Jt(),descriptionId:Jt(),open:u,onOpenChange:f,onOpenToggle:d.useCallback(()=>f(v=>!v),[f]),modal:s,children:r})};bo.displayName=qr;var wo="DialogTrigger",xo=d.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Ae(wo,r),a=ge(t,o.triggerRef);return y.jsx(se.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Zr(o.open),...n,ref:a,onClick:le(e.onClick,o.onOpenToggle)})});xo.displayName=wo;var Kr="DialogPortal",[qi,Eo]=mo(Kr,{forceMount:void 0}),Co=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,a=Ae(Kr,t);return y.jsx(qi,{scope:t,forceMount:r,children:d.Children.map(n,s=>y.jsx(Lt,{present:r||a.open,children:y.jsx(so,{asChild:!0,container:o,children:s})}))})};Co.displayName=Kr;var nr="DialogOverlay",So=d.forwardRef((e,t)=>{const r=Eo(nr,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=Ae(nr,e.__scopeDialog);return a.modal?y.jsx(Lt,{present:n||a.open,children:y.jsx(Ki,{...o,ref:t})}):null});So.displayName=nr;var Ki=d.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Ae(nr,r);return y.jsx(go,{as:It,allowPinchZoom:!0,shards:[o.contentRef],children:y.jsx(se.div,{"data-state":Zr(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),ot="DialogContent",Ro=d.forwardRef((e,t)=>{const r=Eo(ot,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=Ae(ot,e.__scopeDialog);return y.jsx(Lt,{present:n||a.open,children:a.modal?y.jsx(Ji,{...o,ref:t}):y.jsx(Zi,{...o,ref:t})})});Ro.displayName=ot;var Ji=d.forwardRef((e,t)=>{const r=Ae(ot,e.__scopeDialog),n=d.useRef(null),o=ge(t,r.contentRef,n);return d.useEffect(()=>{const a=n.current;if(a)return Gi(a)},[]),y.jsx(Po,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:le(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=r.triggerRef.current)==null||s.focus()}),onPointerDownOutside:le(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&a.preventDefault()}),onFocusOutside:le(e.onFocusOutside,a=>a.preventDefault())})}),Zi=d.forwardRef((e,t)=>{const r=Ae(ot,e.__scopeDialog),n=d.useRef(!1),o=d.useRef(!1);return y.jsx(Po,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(n.current||(i=r.triggerRef.current)==null||i.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Po=d.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,i=Ae(ot,r),l=d.useRef(null),u=ge(t,l);return ii(),y.jsxs(y.Fragment,{children:[y.jsx(oo,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:y.jsx(Xr,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Zr(i.open),...s,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),y.jsxs(y.Fragment,{children:[y.jsx(el,{titleId:i.titleId}),y.jsx(rl,{contentRef:l,descriptionId:i.descriptionId})]})]})}),Jr="DialogTitle",Ao=d.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Ae(Jr,r);return y.jsx(se.h2,{id:o.titleId,...n,ref:t})});Ao.displayName=Jr;var To="DialogDescription",Oo=d.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Ae(To,r);return y.jsx(se.p,{id:o.descriptionId,...n,ref:t})});Oo.displayName=To;var ko="DialogClose",No=d.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Ae(ko,r);return y.jsx(se.button,{type:"button",...n,ref:t,onClick:le(e.onClick,()=>o.onOpenChange(!1))})});No.displayName=ko;function Zr(e){return e?"open":"closed"}var Do="DialogTitleWarning",[Qi,_o]=Ns(Do,{contentName:ot,titleName:Jr,docsSlug:"dialog"}),el=({titleId:e})=>{const t=_o(Do),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
110
+ `)},Bi=0,pt=[];function Wi(e){var t=d.useRef([]),r=d.useRef([0,0]),n=d.useRef(),o=d.useState(Bi++)[0],a=d.useState(uo)[0],s=d.useRef(e);d.useEffect(function(){s.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=li([e.lockRef.current],(e.shards||[]).map(_n),!0).filter(Boolean);return g.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=d.useCallback(function(g,b){if("touches"in g&&g.touches.length===2)return!s.current.allowPinchZoom;var x=Ht(g),w=r.current,S="deltaX"in g?g.deltaX:w[0]-x[0],R="deltaY"in g?g.deltaY:w[1]-x[1],P,N=g.target,O=Math.abs(S)>Math.abs(R)?"h":"v";if("touches"in g&&O==="h"&&N.type==="range")return!1;var B=Nn(O,N);if(!B)return!0;if(B?P=O:(P=O==="v"?"h":"v",B=Nn(O,N)),!B)return!1;if(!n.current&&"changedTouches"in g&&(S||R)&&(n.current=P),!P)return!0;var G=n.current||P;return Ii(G,b,g,G==="h"?S:R,!0)},[]),l=d.useCallback(function(g){var b=g;if(!(!pt.length||pt[pt.length-1]!==a)){var x="deltaY"in b?Dn(b):Ht(b),w=t.current.filter(function(P){return P.name===b.type&&(P.target===b.target||b.target===P.shadowParent)&&$i(P.delta,x)})[0];if(w&&w.should){b.cancelable&&b.preventDefault();return}if(!w){var S=(s.current.shards||[]).map(_n).filter(Boolean).filter(function(P){return P.contains(b.target)}),R=S.length>0?i(b,S[0]):!s.current.noIsolation;R&&b.cancelable&&b.preventDefault()}}},[]),u=d.useCallback(function(g,b,x,w){var S={name:g,delta:b,target:x,should:w,shadowParent:zi(x)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(R){return R!==S})},1)},[]),f=d.useCallback(function(g){r.current=Ht(g),n.current=void 0},[]),v=d.useCallback(function(g){u(g.type,Dn(g),g.target,i(g,e.lockRef.current))},[]),c=d.useCallback(function(g){u(g.type,Ht(g),g.target,i(g,e.lockRef.current))},[]);d.useEffect(function(){return pt.push(a),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:c}),document.addEventListener("wheel",l,ft),document.addEventListener("touchmove",l,ft),document.addEventListener("touchstart",f,ft),function(){pt=pt.filter(function(g){return g!==a}),document.removeEventListener("wheel",l,ft),document.removeEventListener("touchmove",l,ft),document.removeEventListener("touchstart",f,ft)}},[]);var h=e.removeScrollBar,m=e.inert;return d.createElement(d.Fragment,null,m?d.createElement(a,{styles:Fi(o)}):null,h?d.createElement(ki,{gapMode:e.gapMode}):null)}function zi(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Vi=mi(co,Wi);var go=d.forwardRef(function(e,t){return d.createElement(cr,Ne({},e,{ref:t,sideCar:Vi}))});go.classNames=cr.classNames;var Hi=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},vt=new WeakMap,Ut=new WeakMap,Yt={},Ar=0,ho=function(e){return e&&(e.host||ho(e.parentNode))},Ui=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=ho(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Yi=function(e,t,r,n){var o=Ui(t,Array.isArray(e)?e:[e]);Yt[r]||(Yt[r]=new WeakMap);var a=Yt[r],s=[],i=new Set,l=new Set(o),u=function(v){!v||i.has(v)||(i.add(v),u(v.parentNode))};o.forEach(u);var f=function(v){!v||l.has(v)||Array.prototype.forEach.call(v.children,function(c){if(i.has(c))f(c);else try{var h=c.getAttribute(n),m=h!==null&&h!=="false",g=(vt.get(c)||0)+1,b=(a.get(c)||0)+1;vt.set(c,g),a.set(c,b),s.push(c),g===1&&m&&Ut.set(c,!0),b===1&&c.setAttribute(r,"true"),m||c.setAttribute(n,"true")}catch(x){console.error("aria-hidden: cannot operate on ",c,x)}})};return f(t),i.clear(),Ar++,function(){s.forEach(function(v){var c=vt.get(v)-1,h=a.get(v)-1;vt.set(v,c),a.set(v,h),c||(Ut.has(v)||v.removeAttribute(n),Ut.delete(v)),h||v.removeAttribute(r)}),Ar--,Ar||(vt=new WeakMap,vt=new WeakMap,Ut=new WeakMap,Yt={})}},Gi=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=Hi(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),Yi(n,o,r,"aria-hidden")):function(){return null}},Xr="Dialog",[mo,yo]=wt(Xr),[Ki,Te]=mo(Xr),bo=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,i=d.useRef(null),l=d.useRef(null),[u=!1,f]=Yr({prop:n,defaultProp:o,onChange:a});return y.jsx(Ki,{scope:t,triggerRef:i,contentRef:l,contentId:qt(),titleId:qt(),descriptionId:qt(),open:u,onOpenChange:f,onOpenToggle:d.useCallback(()=>f(v=>!v),[f]),modal:s,children:r})};bo.displayName=Xr;var wo="DialogTrigger",xo=d.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Te(wo,r),a=ge(t,o.triggerRef);return y.jsx(se.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Zr(o.open),...n,ref:a,onClick:le(e.onClick,o.onOpenToggle)})});xo.displayName=wo;var qr="DialogPortal",[Xi,Eo]=mo(qr,{forceMount:void 0}),Co=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,a=Te(qr,t);return y.jsx(Xi,{scope:t,forceMount:r,children:d.Children.map(n,s=>y.jsx(Lt,{present:r||a.open,children:y.jsx(so,{asChild:!0,container:o,children:s})}))})};Co.displayName=qr;var rr="DialogOverlay",So=d.forwardRef((e,t)=>{const r=Eo(rr,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=Te(rr,e.__scopeDialog);return a.modal?y.jsx(Lt,{present:n||a.open,children:y.jsx(qi,{...o,ref:t})}):null});So.displayName=rr;var qi=d.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Te(rr,r);return y.jsx(go,{as:Mt,allowPinchZoom:!0,shards:[o.contentRef],children:y.jsx(se.div,{"data-state":Zr(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),ot="DialogContent",Ro=d.forwardRef((e,t)=>{const r=Eo(ot,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=Te(ot,e.__scopeDialog);return y.jsx(Lt,{present:n||a.open,children:a.modal?y.jsx(Ji,{...o,ref:t}):y.jsx(Zi,{...o,ref:t})})});Ro.displayName=ot;var Ji=d.forwardRef((e,t)=>{const r=Te(ot,e.__scopeDialog),n=d.useRef(null),o=ge(t,r.contentRef,n);return d.useEffect(()=>{const a=n.current;if(a)return Gi(a)},[]),y.jsx(Po,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:le(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=r.triggerRef.current)==null||s.focus()}),onPointerDownOutside:le(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&a.preventDefault()}),onFocusOutside:le(e.onFocusOutside,a=>a.preventDefault())})}),Zi=d.forwardRef((e,t)=>{const r=Te(ot,e.__scopeDialog),n=d.useRef(!1),o=d.useRef(!1);return y.jsx(Po,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(n.current||(i=r.triggerRef.current)==null||i.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Po=d.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,i=Te(ot,r),l=d.useRef(null),u=ge(t,l);return ii(),y.jsxs(y.Fragment,{children:[y.jsx(oo,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:y.jsx(Kr,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Zr(i.open),...s,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),y.jsxs(y.Fragment,{children:[y.jsx(el,{titleId:i.titleId}),y.jsx(rl,{contentRef:l,descriptionId:i.descriptionId})]})]})}),Jr="DialogTitle",Ao=d.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Te(Jr,r);return y.jsx(se.h2,{id:o.titleId,...n,ref:t})});Ao.displayName=Jr;var To="DialogDescription",Oo=d.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Te(To,r);return y.jsx(se.p,{id:o.descriptionId,...n,ref:t})});Oo.displayName=To;var ko="DialogClose",No=d.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Te(ko,r);return y.jsx(se.button,{type:"button",...n,ref:t,onClick:le(e.onClick,()=>o.onOpenChange(!1))})});No.displayName=ko;function Zr(e){return e?"open":"closed"}var Do="DialogTitleWarning",[Qi,_o]=Ns(Do,{contentName:ot,titleName:Jr,docsSlug:"dialog"}),el=({titleId:e})=>{const t=_o(Do),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
111
111
 
112
112
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
113
113
 
114
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return d.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},tl="DialogDescriptionWarning",rl=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${_o(tl).contentName}}.`;return d.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},nl=bo,ol=xo,al=Co,sl=So,il=Ro,ll=Ao,cl=Oo,jo=No,Mo="AlertDialog",[ul,Fd]=xt(Mo,[yo]),We=yo(),Io=e=>{const{__scopeAlertDialog:t,...r}=e,n=We(t);return y.jsx(nl,{...n,...r,modal:!0})};Io.displayName=Mo;var dl="AlertDialogTrigger",Lo=d.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=We(r);return y.jsx(ol,{...o,...n,ref:t})});Lo.displayName=dl;var fl="AlertDialogPortal",$o=e=>{const{__scopeAlertDialog:t,...r}=e,n=We(t);return y.jsx(al,{...n,...r})};$o.displayName=fl;var pl="AlertDialogOverlay",Fo=d.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=We(r);return y.jsx(sl,{...o,...n,ref:t})});Fo.displayName=pl;var mt="AlertDialogContent",[vl,gl]=ul(mt),Bo=d.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...o}=e,a=We(r),s=d.useRef(null),i=ge(t,s),l=d.useRef(null);return y.jsx(Qi,{contentName:mt,titleName:Wo,docsSlug:"alert-dialog",children:y.jsx(vl,{scope:r,cancelRef:l,children:y.jsxs(il,{role:"alertdialog",...a,...o,ref:i,onOpenAutoFocus:le(o.onOpenAutoFocus,u=>{var f;u.preventDefault(),(f=l.current)==null||f.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[y.jsx(Gr,{children:n}),y.jsx(ml,{contentRef:s})]})})})});Bo.displayName=mt;var Wo="AlertDialogTitle",zo=d.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=We(r);return y.jsx(ll,{...o,...n,ref:t})});zo.displayName=Wo;var Vo="AlertDialogDescription",Ho=d.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=We(r);return y.jsx(cl,{...o,...n,ref:t})});Ho.displayName=Vo;var hl="AlertDialogAction",Uo=d.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=We(r);return y.jsx(jo,{...o,...n,ref:t})});Uo.displayName=hl;var Yo="AlertDialogCancel",Go=d.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:o}=gl(Yo,r),a=We(r),s=ge(t,o);return y.jsx(jo,{...a,...n,ref:s})});Go.displayName=Yo;var ml=({contentRef:e})=>{const t=`\`${mt}\` requires a description for the component to be accessible for screen reader users.
114
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return d.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},tl="DialogDescriptionWarning",rl=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${_o(tl).contentName}}.`;return d.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},nl=bo,ol=xo,al=Co,sl=So,il=Ro,ll=Ao,cl=Oo,jo=No,Mo="AlertDialog",[ul,Fd]=wt(Mo,[yo]),We=yo(),Lo=e=>{const{__scopeAlertDialog:t,...r}=e,n=We(t);return y.jsx(nl,{...n,...r,modal:!0})};Lo.displayName=Mo;var dl="AlertDialogTrigger",Io=d.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=We(r);return y.jsx(ol,{...o,...n,ref:t})});Io.displayName=dl;var fl="AlertDialogPortal",$o=e=>{const{__scopeAlertDialog:t,...r}=e,n=We(t);return y.jsx(al,{...n,...r})};$o.displayName=fl;var pl="AlertDialogOverlay",Fo=d.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=We(r);return y.jsx(sl,{...o,...n,ref:t})});Fo.displayName=pl;var ht="AlertDialogContent",[vl,gl]=ul(ht),Bo=d.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...o}=e,a=We(r),s=d.useRef(null),i=ge(t,s),l=d.useRef(null);return y.jsx(Qi,{contentName:ht,titleName:Wo,docsSlug:"alert-dialog",children:y.jsx(vl,{scope:r,cancelRef:l,children:y.jsxs(il,{role:"alertdialog",...a,...o,ref:i,onOpenAutoFocus:le(o.onOpenAutoFocus,u=>{var f;u.preventDefault(),(f=l.current)==null||f.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[y.jsx(Gr,{children:n}),y.jsx(ml,{contentRef:s})]})})})});Bo.displayName=ht;var Wo="AlertDialogTitle",zo=d.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=We(r);return y.jsx(ll,{...o,...n,ref:t})});zo.displayName=Wo;var Vo="AlertDialogDescription",Ho=d.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=We(r);return y.jsx(cl,{...o,...n,ref:t})});Ho.displayName=Vo;var hl="AlertDialogAction",Uo=d.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=We(r);return y.jsx(jo,{...o,...n,ref:t})});Uo.displayName=hl;var Yo="AlertDialogCancel",Go=d.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:o}=gl(Yo,r),a=We(r),s=ge(t,o);return y.jsx(jo,{...a,...n,ref:s})});Go.displayName=Yo;var ml=({contentRef:e})=>{const t=`\`${ht}\` requires a description for the component to be accessible for screen reader users.
115
115
 
116
- You can add a description to the \`${mt}\` by passing a \`${Vo}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
116
+ You can add a description to the \`${ht}\` by passing a \`${Vo}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
117
117
 
118
- Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${mt}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
118
+ Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${ht}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
119
119
 
120
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return d.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},yl=Io,bl=Lo,wl=$o,Xo=Fo,qo=Bo,Ko=Uo,Jo=Go,Zo=zo,Qo=Ho;function ea(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=ea(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function xl(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=ea(e))&&(n&&(n+=" "),n+=t);return n}const Qr="-";function El(e){const t=Sl(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;function o(s){const i=s.split(Qr);return i[0]===""&&i.length!==1&&i.shift(),ta(i,t)||Cl(s)}function a(s,i){const l=r[s]||[];return i&&n[s]?[...l,...n[s]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:a}}function ta(e,t){var s;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?ta(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(Qr);return(s=t.validators.find(({validator:i})=>i(a)))==null?void 0:s.classGroupId}const jn=/^\[(.+)\]$/;function Cl(e){if(jn.test(e)){const t=jn.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}function Sl(e){const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return Pl(Object.entries(e.classGroups),r).forEach(([a,s])=>{Ir(s,n,a,t)}),n}function Ir(e,t,r,n){e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:Mn(t,o);a.classGroupId=r;return}if(typeof o=="function"){if(Rl(o)){Ir(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([a,s])=>{Ir(s,Mn(t,a),r,n)})})}function Mn(e,t){let r=e;return t.split(Qr).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r}function Rl(e){return e.isThemeGetter}function Pl(e,t){return t?e.map(([r,n])=>{const o=n.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,i])=>[t+s,i])):a);return[r,o]}):e}function Al(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;function o(a,s){r.set(a,s),t++,t>e&&(t=0,n=r,r=new Map)}return{get(a){let s=r.get(a);if(s!==void 0)return s;if((s=n.get(a))!==void 0)return o(a,s),s},set(a,s){r.has(a)?r.set(a,s):o(a,s)}}}const ra="!";function Tl(e){const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,o=t[0],a=t.length;function s(i){const l=[];let u=0,f=0,v;for(let b=0;b<i.length;b++){let w=i[b];if(u===0){if(w===o&&(n||i.slice(b,b+a)===t)){l.push(i.slice(f,b)),f=b+a;continue}if(w==="/"){v=b;continue}}w==="["?u++:w==="]"&&u--}const c=l.length===0?i:i.substring(f),m=c.startsWith(ra),g=m?c.substring(1):c,h=v&&v>f?v-f:void 0;return{modifiers:l,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:h}}return r?function(l){return r({className:l,parseClassName:s})}:s}function Ol(e){if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t}function kl(e){return{cache:Al(e.cacheSize),parseClassName:Tl(e),...El(e)}}const Nl=/\s+/;function Dl(e,t){const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o}=t,a=new Set;return e.trim().split(Nl).map(s=>{const{modifiers:i,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:f}=r(s);let v=!!f,c=n(v?u.substring(0,f):u);if(!c){if(!v)return{isTailwindClass:!1,originalClassName:s};if(c=n(u),!c)return{isTailwindClass:!1,originalClassName:s};v=!1}const m=Ol(i).join(":");return{isTailwindClass:!0,modifierId:l?m+ra:m,classGroupId:c,originalClassName:s,hasPostfixModifier:v}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:i,classGroupId:l,hasPostfixModifier:u}=s,f=i+l;return a.has(f)?!1:(a.add(f),o(l,u).forEach(v=>a.add(i+v)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function _l(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=na(t))&&(n&&(n+=" "),n+=r);return n}function na(e){if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=na(e[n]))&&(r&&(r+=" "),r+=t);return r}function jl(e,...t){let r,n,o,a=s;function s(l){const u=t.reduce((f,v)=>v(f),e());return r=kl(u),n=r.cache.get,o=r.cache.set,a=i,i(l)}function i(l){const u=n(l);if(u)return u;const f=Dl(l,r);return o(l,f),f}return function(){return a(_l.apply(null,arguments))}}function te(e){const t=r=>r[e]||[];return t.isThemeGetter=!0,t}const oa=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ml=/^\d+\/\d+$/,Il=new Set(["px","full","screen"]),Ll=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$l=/\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$/,Fl=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Bl=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Wl=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function $e(e){return rt(e)||Il.has(e)||Ml.test(e)}function Ue(e){return Et(e,"length",ql)}function rt(e){return!!e&&!Number.isNaN(Number(e))}function Xt(e){return Et(e,"number",rt)}function Dt(e){return!!e&&Number.isInteger(Number(e))}function zl(e){return e.endsWith("%")&&rt(e.slice(0,-1))}function L(e){return oa.test(e)}function Ye(e){return Ll.test(e)}const Vl=new Set(["length","size","percentage"]);function Hl(e){return Et(e,Vl,aa)}function Ul(e){return Et(e,"position",aa)}const Yl=new Set(["image","url"]);function Gl(e){return Et(e,Yl,Jl)}function Xl(e){return Et(e,"",Kl)}function _t(){return!0}function Et(e,t,r){const n=oa.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1}function ql(e){return $l.test(e)&&!Fl.test(e)}function aa(){return!1}function Kl(e){return Bl.test(e)}function Jl(e){return Wl.test(e)}function Zl(){const e=te("colors"),t=te("spacing"),r=te("blur"),n=te("brightness"),o=te("borderColor"),a=te("borderRadius"),s=te("borderSpacing"),i=te("borderWidth"),l=te("contrast"),u=te("grayscale"),f=te("hueRotate"),v=te("invert"),c=te("gap"),m=te("gradientColorStops"),g=te("gradientColorStopPositions"),h=te("inset"),b=te("margin"),w=te("opacity"),x=te("padding"),S=te("saturate"),R=te("scale"),P=te("sepia"),N=te("skew"),k=te("space"),B=te("translate"),U=()=>["auto","contain","none"],G=()=>["auto","hidden","clip","visible","scroll"],X=()=>["auto",L,t],_=()=>[L,t],W=()=>["",$e,Ue],$=()=>["auto",rt,L],V=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["solid","dashed","dotted","double","none"],O=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>["start","end","center","between","around","evenly","stretch"],j=()=>["","0",L],ae=()=>["auto","avoid","all","avoid-page","page","left","right","column"],F=()=>[rt,Xt],H=()=>[rt,L];return{cacheSize:500,separator:":",theme:{colors:[_t],spacing:[$e,Ue],blur:["none","",Ye,L],brightness:F(),borderColor:[e],borderRadius:["none","","full",Ye,L],borderSpacing:_(),borderWidth:W(),contrast:F(),grayscale:j(),hueRotate:H(),invert:j(),gap:_(),gradientColorStops:[e],gradientColorStopPositions:[zl,Ue],inset:X(),margin:X(),opacity:F(),padding:_(),saturate:F(),scale:F(),sepia:j(),skew:H(),space:_(),translate:_()},classGroups:{aspect:[{aspect:["auto","square","video",L]}],container:["container"],columns:[{columns:[Ye]}],"break-after":[{"break-after":ae()}],"break-before":[{"break-before":ae()}],"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:[...V(),L]}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Dt,L]}],basis:[{basis:X()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",L]}],grow:[{grow:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",Dt,L]}],"grid-cols":[{"grid-cols":[_t]}],"col-start-end":[{col:["auto",{span:["full",Dt,L]},L]}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":[_t]}],"row-start-end":[{row:["auto",{span:[Dt,L]},L]}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",L]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",L]}],gap:[{gap:[c]}],"gap-x":[{"gap-x":[c]}],"gap-y":[{"gap-y":[c]}],"justify-content":[{justify:["normal",...A()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...A(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...A(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",L,t]}],"min-w":[{"min-w":[L,t,"min","max","fit"]}],"max-w":[{"max-w":[L,t,"none","full","min","max","fit","prose",{screen:[Ye]},Ye]}],h:[{h:[L,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[L,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[L,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[L,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ye,Ue]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Xt]}],"font-family":[{font:[_t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",L]}],"line-clamp":[{"line-clamp":["none",rt,Xt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",$e,L]}],"list-image":[{"list-image":["none",L]}],"list-style-type":[{list:["none","disc","decimal",L]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",$e,Ue]}],"underline-offset":[{"underline-offset":["auto",$e,L]}],"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:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",L]}],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",L]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...V(),Ul]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Hl]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Gl]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...D(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:D()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...D()]}],"outline-offset":[{"outline-offset":[$e,L]}],"outline-w":[{outline:[$e,Ue]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[$e,Ue]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ye,Xl]}],"shadow-color":[{shadow:[_t]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...O(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":O()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ye,L]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[v]}],saturate:[{saturate:[S]}],sepia:[{sepia:[P]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[v]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"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",L]}],duration:[{duration:H()}],ease:[{ease:["linear","in","out","in-out",L]}],delay:[{delay:H()}],animate:[{animate:["none","spin","ping","pulse","bounce",L]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[Dt,L]}],"translate-x":[{"translate-x":[B]}],"translate-y":[{"translate-y":[B]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",L]}],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",L]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"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",L]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[$e,Ue,Xt]}],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-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"]}}}const Ql=jl(Zl);function ve(...e){return Ql(xl(e))}function sa(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=sa(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function ec(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=sa(e))&&(n&&(n+=" "),n+=t);return n}const In=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Ln=ec,ia=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Ln(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(u=>{const f=r==null?void 0:r[u],v=a==null?void 0:a[u];if(f===null)return null;const c=In(f)||In(v);return o[u][c]}),i=r&&Object.entries(r).reduce((u,f)=>{let[v,c]=f;return c===void 0||(u[v]=c),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let{class:v,className:c,...m}=f;return Object.entries(m).every(g=>{let[h,b]=g;return Array.isArray(b)?b.includes({...a,...i}[h]):{...a,...i}[h]===b})?[...u,v,c]:u},[]);return Ln(e,s,l,r==null?void 0:r.class,r==null?void 0:r.className)},en=ia("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-secondary active:bg-primary-foreground active:text-primary active:border-primary focus:border-2",secondary:"bg-primary-foreground text-primary border-2 border-primary hover:bg-primary hover:text-primary-foreground active:bg-secondary active:text-secondary-foreground focus:border-2",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border-primary border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 rounded-md 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"}}),tc=d.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},a)=>{const s=n?It:"button";return y.jsx(s,{className:ve(en({variant:t,size:r,className:e})),ref:a,...o})});tc.displayName="Button";const rc=yl,nc=bl,oc=wl,la=d.forwardRef(({className:e,...t},r)=>y.jsx(Xo,{className:ve("ve-fixed ve-inset-0 ve-z-50 ve-bg-black/80 data-[state=open]:ve-animate-in data-[state=closed]:ve-animate-out data-[state=closed]:ve-fade-out-0 data-[state=open]:ve-fade-in-0",e),...t,ref:r}));la.displayName=Xo.displayName;const ca=d.forwardRef(({className:e,...t},r)=>y.jsxs(oc,{children:[y.jsx(la,{}),y.jsx(qo,{ref:r,className:ve("ve-fixed ve-left-[50%] ve-top-[50%] ve-z-50 ve-grid ve-w-full ve-max-w-lg ve-translate-x-[-50%] ve-translate-y-[-50%] ve-gap-4 ve-border ve-bg-background ve-p-6 ve-shadow-lg ve-duration-200 data-[state=open]:ve-animate-in data-[state=closed]:ve-animate-out data-[state=closed]:ve-fade-out-0 data-[state=open]:ve-fade-in-0 data-[state=closed]:ve-zoom-out-95 data-[state=open]:ve-zoom-in-95 data-[state=closed]:ve-slide-out-to-left-1/2 data-[state=closed]:ve-slide-out-to-top-[48%] data-[state=open]:ve-slide-in-from-left-1/2 data-[state=open]:ve-slide-in-from-top-[48%] sm:ve-rounded-lg",e),...t})]}));ca.displayName=qo.displayName;const ua=({className:e,...t})=>y.jsx("div",{className:ve("ve-flex ve-flex-col ve-space-y-2 ve-text-center sm:ve-text-left",e),...t});ua.displayName="AlertDialogHeader";const da=({className:e,...t})=>y.jsx("div",{className:ve("ve-flex ve-flex-col-reverse sm:ve-flex-row sm:ve-justify-end sm:ve-space-x-2",e),...t});da.displayName="AlertDialogFooter";const fa=d.forwardRef(({className:e,...t},r)=>y.jsx(Zo,{ref:r,className:ve("ve-text-lg ve-font-semibold",e),...t}));fa.displayName=Zo.displayName;const pa=d.forwardRef(({className:e,...t},r)=>y.jsx(Qo,{ref:r,className:ve("ve-text-sm ve-text-muted-foreground",e),...t}));pa.displayName=Qo.displayName;const ac=d.forwardRef(({className:e,...t},r)=>y.jsx(Ko,{ref:r,className:ve(en(),e),...t}));ac.displayName=Ko.displayName;const va=d.forwardRef(({className:e,...t},r)=>y.jsx(Jo,{ref:r,className:ve(en({variant:"outline"}),"ve-mt-2 sm:ve-mt-0",e),...t}));va.displayName=Jo.displayName;const sc=ia("ve-inline-flex ve-items-center ve-justify-center ve-whitespace-nowrap ve-rounded-md ve-text-sm ve-font-medium ve-ring-offset-background ve-transition-colors focus-visible:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-ring focus-visible:ve-ring-offset-2 disabled:ve-pointer-events-none disabled:ve-opacity-50",{variants:{variant:{default:"ve-bg-primary ve-text-primary-foreground hover:ve-bg-primary/90",destructive:"ve-bg-destructive ve-text-destructive-foreground hover:ve-bg-destructive/90",outline:"ve-border ve-border-input ve-bg-background hover:ve-bg-accent hover:ve-text-accent-foreground",secondary:"ve-bg-secondary ve-text-secondary-foreground hover:ve-bg-secondary/80",ghost:"hover:ve-bg-accent hover:ve-text-accent-foreground",link:"ve-text-primary ve-underline-offset-4 hover:ve-underline"},size:{default:"ve-h-10 ve-rounded-md ve-px-4 ve-py-2",sm:"ve-h-9 ve-rounded-md ve-px-3",lg:"ve-h-11 ve-rounded-md ve-px-8",icon:"ve-h-10 ve-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Xe=d.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},a)=>{const s=n?It:"button";return y.jsx(s,{className:ve(sc({variant:t,size:r,className:e})),ref:a,...o})});Xe.displayName="Button";function ic(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function ga(e){const[t,r]=d.useState(void 0);return nt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;r({width:s,height:i})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var tn="Switch",[lc,Bd]=xt(tn),[cc,uc]=lc(tn),ha=d.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:a,required:s,disabled:i,value:l="on",onCheckedChange:u,...f}=e,[v,c]=d.useState(null),m=ge(t,x=>c(x)),g=d.useRef(!1),h=v?!!v.closest("form"):!0,[b=!1,w]=Yr({prop:o,defaultProp:a,onChange:u});return y.jsxs(cc,{scope:r,checked:b,disabled:i,children:[y.jsx(se.button,{type:"button",role:"switch","aria-checked":b,"aria-required":s,"data-state":ba(b),"data-disabled":i?"":void 0,disabled:i,value:l,...f,ref:m,onClick:le(e.onClick,x=>{w(S=>!S),h&&(g.current=x.isPropagationStopped(),g.current||x.stopPropagation())})}),h&&y.jsx(dc,{control:v,bubbles:!g.current,name:n,value:l,checked:b,required:s,disabled:i,style:{transform:"translateX(-100%)"}})]})});ha.displayName=tn;var ma="SwitchThumb",ya=d.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=uc(ma,r);return y.jsx(se.span,{"data-state":ba(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});ya.displayName=ma;var dc=e=>{const{control:t,checked:r,bubbles:n=!0,...o}=e,a=d.useRef(null),s=ic(r),i=ga(t);return d.useEffect(()=>{const l=a.current,u=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(u,"checked").set;if(s!==r&&v){const c=new Event("click",{bubbles:n});v.call(l,r),l.dispatchEvent(c)}},[s,r,n]),y.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:a,style:{...e.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function ba(e){return e?"checked":"unchecked"}var wa=ha,fc=ya;const xa=d.forwardRef(({className:e,...t},r)=>y.jsx(wa,{className:ve("ve-self-center ve-peer ve-inline-flex ve-h-5 ve-w-9 ve-shrink-0 ve-cursor-pointer ve-items-center ve-rounded-full ve-border-2 ve-border-transparent ve-transition-colors focus-visible:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-ring focus-visible:ve-ring-offset-2 focus-visible:ve-ring-offset-background disabled:ve-cursor-not-allowed disabled:ve-opacity-50 data-[state=checked]:ve-bg-primary data-[state=unchecked]:ve-bg-input",e),...t,ref:r,children:y.jsx(fc,{className:ve("ve-self-center ve-pointer-events-none ve-block ve-h-4 ve-w-4 ve-rounded-full ve-bg-background ve-shadow-lg ve-ring-0 ve-transition-transform data-[state=checked]:ve-translate-x-4 data-[state=unchecked]:ve-translate-x-0")})}));xa.displayName=wa.displayName;const pc=["top","right","bottom","left"],De=Math.min,be=Math.max,or=Math.round,qt=Math.floor,Ke=e=>({x:e,y:e}),vc={left:"right",right:"left",bottom:"top",top:"bottom"},gc={start:"end",end:"start"};function Lr(e,t,r){return be(e,De(t,r))}function Fe(e,t){return typeof e=="function"?e(t):e}function Be(e){return e.split("-")[0]}function Ct(e){return e.split("-")[1]}function rn(e){return e==="x"?"y":"x"}function nn(e){return e==="y"?"height":"width"}function Je(e){return["top","bottom"].includes(Be(e))?"y":"x"}function on(e){return rn(Je(e))}function hc(e,t,r){r===void 0&&(r=!1);const n=Ct(e),o=on(e),a=nn(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=ar(s)),[s,ar(s)]}function mc(e){const t=ar(e);return[$r(e),t,$r(t)]}function $r(e){return e.replace(/start|end/g,t=>gc[t])}function yc(e,t,r){const n=["left","right"],o=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?a:s;default:return[]}}function bc(e,t,r,n){const o=Ct(e);let a=yc(Be(e),r==="start",n);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map($r)))),a}function ar(e){return e.replace(/left|right|bottom|top/g,t=>vc[t])}function wc(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ea(e){return typeof e!="number"?wc(e):{top:e,right:e,bottom:e,left:e}}function sr(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function $n(e,t,r){let{reference:n,floating:o}=e;const a=Je(t),s=on(t),i=nn(s),l=Be(t),u=a==="y",f=n.x+n.width/2-o.width/2,v=n.y+n.height/2-o.height/2,c=n[i]/2-o[i]/2;let m;switch(l){case"top":m={x:f,y:n.y-o.height};break;case"bottom":m={x:f,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:v};break;case"left":m={x:n.x-o.width,y:v};break;default:m={x:n.x,y:n.y}}switch(Ct(t)){case"start":m[s]-=c*(r&&u?-1:1);break;case"end":m[s]+=c*(r&&u?-1:1);break}return m}const xc=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:s}=r,i=a.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:v}=$n(u,n,l),c=n,m={},g=0;for(let h=0;h<i.length;h++){const{name:b,fn:w}=i[h],{x,y:S,data:R,reset:P}=await w({x:f,y:v,initialPlacement:n,placement:c,strategy:o,middlewareData:m,rects:u,platform:s,elements:{reference:e,floating:t}});f=x??f,v=S??v,m={...m,[b]:{...m[b],...R}},P&&g<=50&&(g++,typeof P=="object"&&(P.placement&&(c=P.placement),P.rects&&(u=P.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):P.rects),{x:f,y:v}=$n(u,c,l)),h=-1)}return{x:f,y:v,placement:c,strategy:o,middlewareData:m}};async function jt(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:v="floating",altBoundary:c=!1,padding:m=0}=Fe(t,e),g=Ea(m),b=i[c?v==="floating"?"reference":"floating":v],w=sr(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(b)))==null||r?b:b.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:f,strategy:l})),x=v==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),R=await(a.isElement==null?void 0:a.isElement(S))?await(a.getScale==null?void 0:a.getScale(S))||{x:1,y:1}:{x:1,y:1},P=sr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:x,offsetParent:S,strategy:l}):x);return{top:(w.top-P.top+g.top)/R.y,bottom:(P.bottom-w.bottom+g.bottom)/R.y,left:(w.left-P.left+g.left)/R.x,right:(P.right-w.right+g.right)/R.x}}const Ec=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:u,padding:f=0}=Fe(e,t)||{};if(u==null)return{};const v=Ea(f),c={x:r,y:n},m=on(o),g=nn(m),h=await s.getDimensions(u),b=m==="y",w=b?"top":"left",x=b?"bottom":"right",S=b?"clientHeight":"clientWidth",R=a.reference[g]+a.reference[m]-c[m]-a.floating[g],P=c[m]-a.reference[m],N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let k=N?N[S]:0;(!k||!await(s.isElement==null?void 0:s.isElement(N)))&&(k=i.floating[S]||a.floating[g]);const B=R/2-P/2,U=k/2-h[g]/2-1,G=De(v[w],U),X=De(v[x],U),_=G,W=k-h[g]-X,$=k/2-h[g]/2+B,V=Lr(_,$,W),D=!l.arrow&&Ct(o)!=null&&$!==V&&a.reference[g]/2-($<_?G:X)-h[g]/2<0,O=D?$<_?$-_:$-W:0;return{[m]:c[m]+O,data:{[m]:V,centerOffset:$-V-O,...D&&{alignmentOffset:O}},reset:D}}}),Cc=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:u}=t,{mainAxis:f=!0,crossAxis:v=!0,fallbackPlacements:c,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...b}=Fe(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const w=Be(o),x=Je(i),S=Be(i)===i,R=await(l.isRTL==null?void 0:l.isRTL(u.floating)),P=c||(S||!h?[ar(i)]:mc(i)),N=g!=="none";!c&&N&&P.push(...bc(i,h,g,R));const k=[i,...P],B=await jt(t,b),U=[];let G=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&U.push(B[w]),v){const $=hc(o,s,R);U.push(B[$[0]],B[$[1]])}if(G=[...G,{placement:o,overflows:U}],!U.every($=>$<=0)){var X,_;const $=(((X=a.flip)==null?void 0:X.index)||0)+1,V=k[$];if(V)return{data:{index:$,overflows:G},reset:{placement:V}};let D=(_=G.filter(O=>O.overflows[0]<=0).sort((O,A)=>O.overflows[1]-A.overflows[1])[0])==null?void 0:_.placement;if(!D)switch(m){case"bestFit":{var W;const O=(W=G.filter(A=>{if(N){const j=Je(A.placement);return j===x||j==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(j=>j>0).reduce((j,ae)=>j+ae,0)]).sort((A,j)=>A[1]-j[1])[0])==null?void 0:W[0];O&&(D=O);break}case"initialPlacement":D=i;break}if(o!==D)return{reset:{placement:D}}}return{}}}};function Fn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Bn(e){return pc.some(t=>e[t]>=0)}const Sc=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=Fe(e,t);switch(n){case"referenceHidden":{const a=await jt(t,{...o,elementContext:"reference"}),s=Fn(a,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Bn(s)}}}case"escaped":{const a=await jt(t,{...o,altBoundary:!0}),s=Fn(a,r.floating);return{data:{escapedOffsets:s,escaped:Bn(s)}}}default:return{}}}}};async function Rc(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=Be(r),i=Ct(r),l=Je(r)==="y",u=["left","top"].includes(s)?-1:1,f=a&&l?-1:1,v=Fe(t,e);let{mainAxis:c,crossAxis:m,alignmentAxis:g}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...v};return i&&typeof g=="number"&&(m=i==="end"?g*-1:g),l?{x:m*f,y:c*u}:{x:c*u,y:m*f}}const Pc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:s,middlewareData:i}=t,l=await Rc(t,e);return s===((r=i.offset)==null?void 0:r.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:s}}}}},Ac=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:b=>{let{x:w,y:x}=b;return{x:w,y:x}}},...l}=Fe(e,t),u={x:r,y:n},f=await jt(t,l),v=Je(Be(o)),c=rn(v);let m=u[c],g=u[v];if(a){const b=c==="y"?"top":"left",w=c==="y"?"bottom":"right",x=m+f[b],S=m-f[w];m=Lr(x,m,S)}if(s){const b=v==="y"?"top":"left",w=v==="y"?"bottom":"right",x=g+f[b],S=g-f[w];g=Lr(x,g,S)}const h=i.fn({...t,[c]:m,[v]:g});return{...h,data:{x:h.x-r,y:h.y-n}}}}},Tc=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:u=!0}=Fe(e,t),f={x:r,y:n},v=Je(o),c=rn(v);let m=f[c],g=f[v];const h=Fe(i,t),b=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const S=c==="y"?"height":"width",R=a.reference[c]-a.floating[S]+b.mainAxis,P=a.reference[c]+a.reference[S]-b.mainAxis;m<R?m=R:m>P&&(m=P)}if(u){var w,x;const S=c==="y"?"width":"height",R=["top","left"].includes(Be(o)),P=a.reference[v]-a.floating[S]+(R&&((w=s.offset)==null?void 0:w[v])||0)+(R?0:b.crossAxis),N=a.reference[v]+a.reference[S]+(R?0:((x=s.offset)==null?void 0:x[v])||0)-(R?b.crossAxis:0);g<P?g=P:g>N&&(g=N)}return{[c]:m,[v]:g}}}},Oc=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:o,elements:a}=t,{apply:s=()=>{},...i}=Fe(e,t),l=await jt(t,i),u=Be(r),f=Ct(r),v=Je(r)==="y",{width:c,height:m}=n.floating;let g,h;u==="top"||u==="bottom"?(g=u,h=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(h=u,g=f==="end"?"top":"bottom");const b=m-l.top-l.bottom,w=c-l.left-l.right,x=De(m-l[g],b),S=De(c-l[h],w),R=!t.middlewareData.shift;let P=x,N=S;if(v?N=f||R?De(S,w):w:P=f||R?De(x,b):b,R&&!f){const B=be(l.left,0),U=be(l.right,0),G=be(l.top,0),X=be(l.bottom,0);v?N=c-2*(B!==0||U!==0?B+U:be(l.left,l.right)):P=m-2*(G!==0||X!==0?G+X:be(l.top,l.bottom))}await s({...t,availableWidth:N,availableHeight:P});const k=await o.getDimensions(a.floating);return c!==k.width||m!==k.height?{reset:{rects:!0}}:{}}}};function St(e){return Ca(e)?(e.nodeName||"").toLowerCase():"#document"}function we(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ze(e){var t;return(t=(Ca(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ca(e){return e instanceof Node||e instanceof we(e).Node}function Re(e){return e instanceof Element||e instanceof we(e).Element}function _e(e){return e instanceof HTMLElement||e instanceof we(e).HTMLElement}function Wn(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof we(e).ShadowRoot}function $t(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function kc(e){return["table","td","th"].includes(St(e))}function dr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function an(e){const t=sn(),r=Re(e)?Pe(e):e;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function Nc(e){let t=Ze(e);for(;_e(t)&&!bt(t);){if(an(t))return t;if(dr(t))return null;t=Ze(t)}return null}function sn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function bt(e){return["html","body","#document"].includes(St(e))}function Pe(e){return we(e).getComputedStyle(e)}function fr(e){return Re(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ze(e){if(St(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Wn(e)&&e.host||ze(e);return Wn(t)?t.host:t}function Sa(e){const t=Ze(e);return bt(t)?e.ownerDocument?e.ownerDocument.body:e.body:_e(t)&&$t(t)?t:Sa(t)}function Mt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Sa(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),s=we(o);if(a){const i=Fr(s);return t.concat(s,s.visualViewport||[],$t(o)?o:[],i&&r?Mt(i):[])}return t.concat(o,Mt(o,[],r))}function Fr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ra(e){const t=Pe(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=_e(e),a=o?e.offsetWidth:r,s=o?e.offsetHeight:n,i=or(r)!==a||or(n)!==s;return i&&(r=a,n=s),{width:r,height:n,$:i}}function ln(e){return Re(e)?e:e.contextElement}function yt(e){const t=ln(e);if(!_e(t))return Ke(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=Ra(t);let s=(a?or(r.width):r.width)/n,i=(a?or(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const Dc=Ke(0);function Pa(e){const t=we(e);return!sn()||!t.visualViewport?Dc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _c(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==we(e)?!1:t}function at(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=ln(e);let s=Ke(1);t&&(n?Re(n)&&(s=yt(n)):s=yt(e));const i=_c(a,r,n)?Pa(a):Ke(0);let l=(o.left+i.x)/s.x,u=(o.top+i.y)/s.y,f=o.width/s.x,v=o.height/s.y;if(a){const c=we(a),m=n&&Re(n)?we(n):n;let g=c,h=Fr(g);for(;h&&n&&m!==g;){const b=yt(h),w=h.getBoundingClientRect(),x=Pe(h),S=w.left+(h.clientLeft+parseFloat(x.paddingLeft))*b.x,R=w.top+(h.clientTop+parseFloat(x.paddingTop))*b.y;l*=b.x,u*=b.y,f*=b.x,v*=b.y,l+=S,u+=R,g=we(h),h=Fr(g)}}return sr({width:f,height:v,x:l,y:u})}function jc(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",s=ze(n),i=t?dr(t.floating):!1;if(n===s||i&&a)return r;let l={scrollLeft:0,scrollTop:0},u=Ke(1);const f=Ke(0),v=_e(n);if((v||!v&&!a)&&((St(n)!=="body"||$t(s))&&(l=fr(n)),_e(n))){const c=at(n);u=yt(n),f.x=c.x+n.clientLeft,f.y=c.y+n.clientTop}return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+f.x,y:r.y*u.y-l.scrollTop*u.y+f.y}}function Mc(e){return Array.from(e.getClientRects())}function Aa(e){return at(ze(e)).left+fr(e).scrollLeft}function Ic(e){const t=ze(e),r=fr(e),n=e.ownerDocument.body,o=be(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=be(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+Aa(e);const i=-r.scrollTop;return Pe(n).direction==="rtl"&&(s+=be(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:s,y:i}}function Lc(e,t){const r=we(e),n=ze(e),o=r.visualViewport;let a=n.clientWidth,s=n.clientHeight,i=0,l=0;if(o){a=o.width,s=o.height;const u=sn();(!u||u&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}return{width:a,height:s,x:i,y:l}}function $c(e,t){const r=at(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=_e(e)?yt(e):Ke(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=o*a.x,u=n*a.y;return{width:s,height:i,x:l,y:u}}function zn(e,t,r){let n;if(t==="viewport")n=Lc(e,r);else if(t==="document")n=Ic(ze(e));else if(Re(t))n=$c(t,r);else{const o=Pa(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return sr(n)}function Ta(e,t){const r=Ze(e);return r===t||!Re(r)||bt(r)?!1:Pe(r).position==="fixed"||Ta(r,t)}function Fc(e,t){const r=t.get(e);if(r)return r;let n=Mt(e,[],!1).filter(i=>Re(i)&&St(i)!=="body"),o=null;const a=Pe(e).position==="fixed";let s=a?Ze(e):e;for(;Re(s)&&!bt(s);){const i=Pe(s),l=an(s);!l&&i.position==="fixed"&&(o=null),(a?!l&&!o:!l&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||$t(s)&&!l&&Ta(e,s))?n=n.filter(f=>f!==s):o=i,s=Ze(s)}return t.set(e,n),n}function Bc(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?dr(t)?[]:Fc(t,this._c):[].concat(r),n],i=s[0],l=s.reduce((u,f)=>{const v=zn(t,f,o);return u.top=be(v.top,u.top),u.right=De(v.right,u.right),u.bottom=De(v.bottom,u.bottom),u.left=be(v.left,u.left),u},zn(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Wc(e){const{width:t,height:r}=Ra(e);return{width:t,height:r}}function zc(e,t,r){const n=_e(t),o=ze(t),a=r==="fixed",s=at(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=Ke(0);if(n||!n&&!a)if((St(t)!=="body"||$t(o))&&(i=fr(t)),n){const v=at(t,!0,a,t);l.x=v.x+t.clientLeft,l.y=v.y+t.clientTop}else o&&(l.x=Aa(o));const u=s.left+i.scrollLeft-l.x,f=s.top+i.scrollTop-l.y;return{x:u,y:f,width:s.width,height:s.height}}function Or(e){return Pe(e).position==="static"}function Vn(e,t){return!_e(e)||Pe(e).position==="fixed"?null:t?t(e):e.offsetParent}function Oa(e,t){const r=we(e);if(dr(e))return r;if(!_e(e)){let o=Ze(e);for(;o&&!bt(o);){if(Re(o)&&!Or(o))return o;o=Ze(o)}return r}let n=Vn(e,t);for(;n&&kc(n)&&Or(n);)n=Vn(n,t);return n&&bt(n)&&Or(n)&&!an(n)?r:n||Nc(e)||r}const Vc=async function(e){const t=this.getOffsetParent||Oa,r=this.getDimensions,n=await r(e.floating);return{reference:zc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Hc(e){return Pe(e).direction==="rtl"}const Uc={convertOffsetParentRelativeRectToViewportRelativeRect:jc,getDocumentElement:ze,getClippingRect:Bc,getOffsetParent:Oa,getElementRects:Vc,getClientRects:Mc,getDimensions:Wc,getScale:yt,isElement:Re,isRTL:Hc};function Yc(e,t){let r=null,n;const o=ze(e);function a(){var i;clearTimeout(n),(i=r)==null||i.disconnect(),r=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const{left:u,top:f,width:v,height:c}=e.getBoundingClientRect();if(i||t(),!v||!c)return;const m=qt(f),g=qt(o.clientWidth-(u+v)),h=qt(o.clientHeight-(f+c)),b=qt(u),x={rootMargin:-m+"px "+-g+"px "+-h+"px "+-b+"px",threshold:be(0,De(1,l))||1};let S=!0;function R(P){const N=P[0].intersectionRatio;if(N!==l){if(!S)return s();N?s(!1,N):n=setTimeout(()=>{s(!1,1e-7)},1e3)}S=!1}try{r=new IntersectionObserver(R,{...x,root:o.ownerDocument})}catch{r=new IntersectionObserver(R,x)}r.observe(e)}return s(!0),a}function Gc(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=ln(e),f=o||a?[...u?Mt(u):[],...Mt(t)]:[];f.forEach(w=>{o&&w.addEventListener("scroll",r,{passive:!0}),a&&w.addEventListener("resize",r)});const v=u&&i?Yc(u,r):null;let c=-1,m=null;s&&(m=new ResizeObserver(w=>{let[x]=w;x&&x.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(c),c=requestAnimationFrame(()=>{var S;(S=m)==null||S.observe(t)})),r()}),u&&!l&&m.observe(u),m.observe(t));let g,h=l?at(e):null;l&&b();function b(){const w=at(e);h&&(w.x!==h.x||w.y!==h.y||w.width!==h.width||w.height!==h.height)&&r(),h=w,g=requestAnimationFrame(b)}return r(),()=>{var w;f.forEach(x=>{o&&x.removeEventListener("scroll",r),a&&x.removeEventListener("resize",r)}),v==null||v(),(w=m)==null||w.disconnect(),m=null,l&&cancelAnimationFrame(g)}}const Xc=Pc,qc=Ac,Kc=Cc,Jc=Oc,Zc=Sc,Hn=Ec,Qc=Tc,eu=(e,t,r)=>{const n=new Map,o={platform:Uc,...r},a={...o.platform,_c:n};return xc(e,t,{...o,platform:a})};var er=typeof document<"u"?E.useLayoutEffect:E.useEffect;function ir(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!ir(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!ir(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function ka(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Un(e,t){const r=ka(e);return Math.round(t*r)/r}function Yn(e){const t=d.useRef(e);return er(()=>{t.current=e}),t}function tu(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:l,open:u}=e,[f,v]=d.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[c,m]=d.useState(n);ir(c,n)||m(n);const[g,h]=d.useState(null),[b,w]=d.useState(null),x=d.useCallback(O=>{O!==N.current&&(N.current=O,h(O))},[]),S=d.useCallback(O=>{O!==k.current&&(k.current=O,w(O))},[]),R=a||g,P=s||b,N=d.useRef(null),k=d.useRef(null),B=d.useRef(f),U=l!=null,G=Yn(l),X=Yn(o),_=d.useCallback(()=>{if(!N.current||!k.current)return;const O={placement:t,strategy:r,middleware:c};X.current&&(O.platform=X.current),eu(N.current,k.current,O).then(A=>{const j={...A,isPositioned:!0};W.current&&!ir(B.current,j)&&(B.current=j,Ur.flushSync(()=>{v(j)}))})},[c,t,r,X]);er(()=>{u===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,v(O=>({...O,isPositioned:!1})))},[u]);const W=d.useRef(!1);er(()=>(W.current=!0,()=>{W.current=!1}),[]),er(()=>{if(R&&(N.current=R),P&&(k.current=P),R&&P){if(G.current)return G.current(R,P,_);_()}},[R,P,_,G,U]);const $=d.useMemo(()=>({reference:N,floating:k,setReference:x,setFloating:S}),[x,S]),V=d.useMemo(()=>({reference:R,floating:P}),[R,P]),D=d.useMemo(()=>{const O={position:r,left:0,top:0};if(!V.floating)return O;const A=Un(V.floating,f.x),j=Un(V.floating,f.y);return i?{...O,transform:"translate("+A+"px, "+j+"px)",...ka(V.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:A,top:j}},[r,i,V.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:_,refs:$,elements:V,floatingStyles:D}),[f,_,$,V,D])}const ru=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Hn({element:n.current,padding:o}).fn(r):{}:n?Hn({element:n,padding:o}).fn(r):{}}}},nu=(e,t)=>({...Xc(e),options:[e,t]}),ou=(e,t)=>({...qc(e),options:[e,t]}),au=(e,t)=>({...Qc(e),options:[e,t]}),su=(e,t)=>({...Kc(e),options:[e,t]}),iu=(e,t)=>({...Jc(e),options:[e,t]}),lu=(e,t)=>({...Zc(e),options:[e,t]}),cu=(e,t)=>({...ru(e),options:[e,t]});var uu="Arrow",Na=d.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return y.jsx(se.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:y.jsx("polygon",{points:"0,0 30,0 15,10"})})});Na.displayName=uu;var du=Na,cn="Popper",[Da,_a]=xt(cn),[fu,ja]=Da(cn),Ma=e=>{const{__scopePopper:t,children:r}=e,[n,o]=d.useState(null);return y.jsx(fu,{scope:t,anchor:n,onAnchorChange:o,children:r})};Ma.displayName=cn;var Ia="PopperAnchor",La=d.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=ja(Ia,r),s=d.useRef(null),i=ge(t,s);return d.useEffect(()=>{a.onAnchorChange((n==null?void 0:n.current)||s.current)}),n?null:y.jsx(se.div,{...o,ref:i})});La.displayName=Ia;var un="PopperContent",[pu,vu]=Da(un),$a=d.forwardRef((e,t)=>{var Te,he,xe,me,st,je;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:v="partial",hideWhenDetached:c=!1,updatePositionStrategy:m="optimized",onPlaced:g,...h}=e,b=ja(un,r),[w,x]=d.useState(null),S=ge(t,Me=>x(Me)),[R,P]=d.useState(null),N=ga(R),k=(N==null?void 0:N.width)??0,B=(N==null?void 0:N.height)??0,U=n+(a!=="center"?"-"+a:""),G=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},X=Array.isArray(u)?u:[u],_=X.length>0,W={padding:G,boundary:X.filter(hu),altBoundary:_},{refs:$,floatingStyles:V,placement:D,isPositioned:O,middlewareData:A}=tu({strategy:"fixed",placement:U,whileElementsMounted:(...Me)=>Gc(...Me,{animationFrame:m==="always"}),elements:{reference:b.anchor},middleware:[nu({mainAxis:o+B,alignmentAxis:s}),l&&ou({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?au():void 0,...W}),l&&su({...W}),iu({...W,apply:({elements:Me,rects:Qe,availableWidth:Ie,availableHeight:de})=>{const{width:it,height:lt}=Qe.reference,re=Me.floating.style;re.setProperty("--radix-popper-available-width",`${Ie}px`),re.setProperty("--radix-popper-available-height",`${de}px`),re.setProperty("--radix-popper-anchor-width",`${it}px`),re.setProperty("--radix-popper-anchor-height",`${lt}px`)}}),R&&cu({element:R,padding:i}),mu({arrowWidth:k,arrowHeight:B}),c&&lu({strategy:"referenceHidden",...W})]}),[j,ae]=Wa(D),F=qe(g);nt(()=>{O&&(F==null||F())},[O,F]);const H=(Te=A.arrow)==null?void 0:Te.x,Z=(he=A.arrow)==null?void 0:he.y,ue=((xe=A.arrow)==null?void 0:xe.centerOffset)!==0,[Se,ee]=d.useState();return nt(()=>{w&&ee(window.getComputedStyle(w).zIndex)},[w]),y.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:O?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Se,"--radix-popper-transform-origin":[(me=A.transformOrigin)==null?void 0:me.x,(st=A.transformOrigin)==null?void 0:st.y].join(" "),...((je=A.hide)==null?void 0:je.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:y.jsx(pu,{scope:r,placedSide:j,onArrowChange:P,arrowX:H,arrowY:Z,shouldHideArrow:ue,children:y.jsx(se.div,{"data-side":j,"data-align":ae,...h,ref:S,style:{...h.style,animation:O?void 0:"none"}})})})});$a.displayName=un;var Fa="PopperArrow",gu={top:"bottom",right:"left",bottom:"top",left:"right"},Ba=d.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=vu(Fa,n),s=gu[a.placedSide];return y.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:y.jsx(du,{...o,ref:r,style:{...o.style,display:"block"}})})});Ba.displayName=Fa;function hu(e){return e!==null}var mu=e=>({name:"transformOrigin",options:e,fn(t){var b,w,x;const{placement:r,rects:n,middlewareData:o}=t,s=((b=o.arrow)==null?void 0:b.centerOffset)!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,f]=Wa(r),v={start:"0%",center:"50%",end:"100%"}[f],c=(((w=o.arrow)==null?void 0:w.x)??0)+i/2,m=(((x=o.arrow)==null?void 0:x.y)??0)+l/2;let g="",h="";return u==="bottom"?(g=s?v:`${c}px`,h=`${-l}px`):u==="top"?(g=s?v:`${c}px`,h=`${n.floating.height+l}px`):u==="right"?(g=`${-l}px`,h=s?v:`${m}px`):u==="left"&&(g=`${n.floating.width+l}px`,h=s?v:`${m}px`),{data:{x:g,y:h}}}});function Wa(e){const[t,r="center"]=e.split("-");return[t,r]}var yu=Ma,bu=La,wu=$a,xu=Ba,Eu="VisuallyHidden",za=d.forwardRef((e,t)=>y.jsx(se.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));za.displayName=Eu;var Cu=za,[pr,Wd]=xt("Tooltip",[_a]),vr=_a(),Va="TooltipProvider",Su=700,Br="tooltip.open",[Ru,dn]=pr(Va),Ha=e=>{const{__scopeTooltip:t,delayDuration:r=Su,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,[s,i]=d.useState(!0),l=d.useRef(!1),u=d.useRef(0);return d.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),y.jsx(Ru,{scope:t,isOpenDelayed:s,delayDuration:r,onOpen:d.useCallback(()=>{window.clearTimeout(u.current),i(!1)},[]),onClose:d.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>i(!0),n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:d.useCallback(f=>{l.current=f},[]),disableHoverableContent:o,children:a})};Ha.displayName=Va;var gr="Tooltip",[Pu,hr]=pr(gr),Ua=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=dn(gr,e.__scopeTooltip),u=vr(t),[f,v]=d.useState(null),c=Jt(),m=d.useRef(0),g=s??l.disableHoverableContent,h=i??l.delayDuration,b=d.useRef(!1),[w=!1,x]=Yr({prop:n,defaultProp:o,onChange:k=>{k?(l.onOpen(),document.dispatchEvent(new CustomEvent(Br))):l.onClose(),a==null||a(k)}}),S=d.useMemo(()=>w?b.current?"delayed-open":"instant-open":"closed",[w]),R=d.useCallback(()=>{window.clearTimeout(m.current),b.current=!1,x(!0)},[x]),P=d.useCallback(()=>{window.clearTimeout(m.current),x(!1)},[x]),N=d.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{b.current=!0,x(!0)},h)},[h,x]);return d.useEffect(()=>()=>window.clearTimeout(m.current),[]),y.jsx(yu,{...u,children:y.jsx(Pu,{scope:t,contentId:c,open:w,stateAttribute:S,trigger:f,onTriggerChange:v,onTriggerEnter:d.useCallback(()=>{l.isOpenDelayed?N():R()},[l.isOpenDelayed,N,R]),onTriggerLeave:d.useCallback(()=>{g?P():window.clearTimeout(m.current)},[P,g]),onOpen:R,onClose:P,disableHoverableContent:g,children:r})})};Ua.displayName=gr;var Wr="TooltipTrigger",Ya=d.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=hr(Wr,r),a=dn(Wr,r),s=vr(r),i=d.useRef(null),l=ge(t,i,o.onTriggerChange),u=d.useRef(!1),f=d.useRef(!1),v=d.useCallback(()=>u.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),y.jsx(bu,{asChild:!0,...s,children:y.jsx(se.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:l,onPointerMove:le(e.onPointerMove,c=>{c.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:le(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:le(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:le(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:le(e.onBlur,o.onClose),onClick:le(e.onClick,o.onClose)})})});Ya.displayName=Wr;var Au="TooltipPortal",[zd,Tu]=pr(Au,{forceMount:void 0}),wt="TooltipContent",Ga=d.forwardRef((e,t)=>{const r=Tu(wt,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,s=hr(wt,e.__scopeTooltip);return y.jsx(Lt,{present:n||s.open,children:s.disableHoverableContent?y.jsx(Xa,{side:o,...a,ref:t}):y.jsx(Ou,{side:o,...a,ref:t})})}),Ou=d.forwardRef((e,t)=>{const r=hr(wt,e.__scopeTooltip),n=dn(wt,e.__scopeTooltip),o=d.useRef(null),a=ge(t,o),[s,i]=d.useState(null),{trigger:l,onClose:u}=r,f=o.current,{onPointerInTransitChange:v}=n,c=d.useCallback(()=>{i(null),v(!1)},[v]),m=d.useCallback((g,h)=>{const b=g.currentTarget,w={x:g.clientX,y:g.clientY},x=Du(w,b.getBoundingClientRect()),S=_u(w,x),R=ju(h.getBoundingClientRect()),P=Iu([...S,...R]);i(P),v(!0)},[v]);return d.useEffect(()=>()=>c(),[c]),d.useEffect(()=>{if(l&&f){const g=b=>m(b,f),h=b=>m(b,l);return l.addEventListener("pointerleave",g),f.addEventListener("pointerleave",h),()=>{l.removeEventListener("pointerleave",g),f.removeEventListener("pointerleave",h)}}},[l,f,m,c]),d.useEffect(()=>{if(s){const g=h=>{const b=h.target,w={x:h.clientX,y:h.clientY},x=(l==null?void 0:l.contains(b))||(f==null?void 0:f.contains(b)),S=!Mu(w,s);x?c():S&&(c(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,f,s,u,c]),y.jsx(Xa,{...e,ref:a})}),[ku,Nu]=pr(gr,{isInside:!1}),Xa=d.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=hr(wt,r),u=vr(r),{onClose:f}=l;return d.useEffect(()=>(document.addEventListener(Br,f),()=>document.removeEventListener(Br,f)),[f]),d.useEffect(()=>{if(l.trigger){const v=c=>{const m=c.target;m!=null&&m.contains(l.trigger)&&f()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[l.trigger,f]),y.jsx(Xr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:v=>v.preventDefault(),onDismiss:f,children:y.jsxs(wu,{"data-state":l.stateAttribute,...u,...i,ref:t,style:{...i.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:[y.jsx(Gr,{children:n}),y.jsx(ku,{scope:r,isInside:!0,children:y.jsx(Cu,{id:l.contentId,role:"tooltip",children:o||n})})]})})});Ga.displayName=wt;var qa="TooltipArrow",Ka=d.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=vr(r);return Nu(qa,r).isInside?null:y.jsx(xu,{...o,...n,ref:t})});Ka.displayName=qa;function Du(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function _u(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function ju(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function Mu(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a].x,l=t[a].y,u=t[s].x,f=t[s].y;l>n!=f>n&&r<(u-i)*(n-l)/(f-l)+i&&(o=!o)}return o}function Iu(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),Lu(t)}function Lu(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 a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const a=r[r.length-1],s=r[r.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var $u=Ha,Fu=Ua,Bu=Ya,Ja=Ga,Wu=Ka;const Za=$u,Qa=Fu,es=Bu,ts=Wu,fn=d.forwardRef(({className:e,sideOffset:t=4,...r},n)=>y.jsx(Ja,{ref:n,sideOffset:t,className:ve("ve-z-50 ve-overflow-hidden ve-rounded-[6px] ve-bg-popover ve-px-3 ve-py-1.5 ve-text-sm ve-text-popover-foreground",e),...r}));fn.displayName=Ja.displayName;const zu=({displayName:e,fieldId:t,children:r})=>{const{tooltipsVisible:n}=ns();let o="";return e&&t?o=`${e} (${t})`:t?o=`(${t})`:e&&(o=`${e}`),y.jsx(Za,{children:y.jsxs(Qa,{open:n&&!!o,children:[y.jsx(es,{asChild:!0,children:y.jsx("div",{className:n?"ve-outline-2 ve-outline-dotted ve-outline-[#5A58F2]":"",children:r})}),y.jsxs(fn,{children:[y.jsx("p",{children:o}),y.jsx(ts,{fill:"bg-popover"})]})]})})},rs=E.createContext(void 0),Vu=({children:e})=>{const[t,r]=E.useState(!1),n=()=>{r(o=>!o)};return y.jsx(rs.Provider,{value:{tooltipsVisible:t,toggleTooltips:n},children:e})},ns=()=>{const e=E.useContext(rs);return e||{tooltipsVisible:!1,toggleTooltips:()=>{}}},Hu=(e,t,r,n,o,a)=>{const{dispatch:s,history:{back:i,forward:l,histories:u,index:f,hasFuture:v,setHistories:c}}=rr.usePuck();return E.useEffect(()=>{t(u,f)},[f,u,t]),y.jsxs("header",{className:"puck-header puck-css",children:[y.jsxs("div",{className:"header-left",children:[y.jsx(Yu,{}),y.jsx(Gu,{})]}),y.jsx("div",{className:"header-center"}),y.jsxs("div",{className:"actions",children:[y.jsx(Xe,{variant:"ghost",size:"icon",disabled:f===0,onClick:i,children:y.jsx(Os,{className:"sm-icon"})}),y.jsx(Xe,{variant:"ghost",size:"icon",disabled:!v,onClick:l,children:y.jsx(ks,{className:"sm-icon"})}),y.jsx(Uu,{disabled:u.length===0,onClearLocalChanges:()=>{e(),c([]),s({type:"setData",data:n})}}),!a&&y.jsx(Xe,{variant:"secondary",disabled:u.length===0,onClick:async()=>{await o(r),e()},children:"Publish"})]})]})},Uu=({disabled:e,onClearLocalChanges:t})=>{const[r,n]=E.useState(!1),o=()=>{t(),n(!1)};return y.jsxs(rc,{open:r,onOpenChange:n,children:[y.jsx(nc,{disabled:e,asChild:!0,children:y.jsx(Xe,{variant:"outline",children:"Clear Local Changes"})}),y.jsxs(ca,{className:"puck-css",children:[y.jsxs(ua,{children:[y.jsx(fa,{children:"Clear Local Changes"}),y.jsx(pa,{children:"This action will remove your local changes. It cannot be undone."})]}),y.jsxs(da,{children:[y.jsx(va,{children:"Cancel"}),y.jsx(Xe,{onClick:o,children:"Confirm"})]})]})]})},Yu=()=>{const{dispatch:e,appState:{ui:{leftSideBarVisible:t,rightSideBarVisible:r}}}=rr.usePuck(),n=E.useCallback(o=>{const a=window.matchMedia("(min-width: 638px)").matches,s=o==="left"?t:r,i=o==="left"?"rightSideBarVisible":"leftSideBarVisible";e({type:"setUi",ui:{[`${o}SideBarVisible`]:!s,...a?{}:{[i]:!1}}})},[e,t,r]);return y.jsxs(y.Fragment,{children:[y.jsx(Xe,{variant:"ghost",size:"icon",onClick:()=>{n("left")},children:y.jsx(As,{className:"sm-icon"})}),y.jsx(Xe,{variant:"ghost",size:"icon",onClick:()=>{n("right")},children:y.jsx(Ts,{className:"sm-icon"})})]})},Gu=()=>{const{toggleTooltips:e,tooltipsVisible:t}=ns();return y.jsx(Za,{children:y.jsxs(Qa,{children:[y.jsx(es,{asChild:!0,children:y.jsxs("div",{className:"ve-flex ve-flex-row ve-self-center ve-gap-3 ve-pl-2",children:[y.jsx(xa,{onCheckedChange:e}),y.jsx("p",{className:"ve-self-center ve-text-sm",children:"Entity Fields"})]})}),y.jsxs(fn,{children:[t?"Hide Entity Fields":"Show Entity Fields",y.jsx(ts,{fill:"ve-bg-popover"})]})]})})},Gn="ROLE_",Xn="TEMPLATE_",Xu="LAYOUT_",qu="ENTITY_";function tt(e,t,r,n,o){const a=e?"dev":"";if(!t||!r||!o&&!n)throw new Error("Unable to generate local storage key, missing query parameters");if(t===Md.INDIVIDUAL){if(!o)throw new Error(`EntityId required for role ${t}`);return a+Gn+t+Xn+r+qu+o}if(!n)throw new Error(`LayoutId required for role ${t}`);return a+Gn+t+Xn+r+Xu+n}const Ku=({puckConfig:e,puckInitialHistory:t,isLoading:r,clearHistory:n,templateMetadata:o,saveState:a,saveSaveState:s,saveVisualConfigData:i,sendDevSaveStateData:l,visualConfigurationData:u})=>{const[f,v]=E.useState(!1),c=E.useRef(-1),m=E.useCallback((w,x)=>{var S;x!==-1&&c.current!==x&&w.length>0&&(c.current=x,window.localStorage.setItem(tt(o.isDevMode,o.role,o.templateId,o.layoutId,o.entityId),JSON.stringify(w)),(a==null?void 0:a.hash)!==w[x].id&&(o.isDevMode?l({payload:{devSaveStateData:JSON.stringify((S=w[x].data)==null?void 0:S.data)}}):s({payload:{hash:w[x].id,history:JSON.stringify(w[x].data)}})))},[o,tt,a]),g=()=>{n(o.isDevMode,o.role,o.templateId,o.layoutId,o.entityId),c.current=-1},h=async w=>{i({payload:{visualConfigurationData:JSON.stringify(w)}})},b=async()=>{if(!r&&!f){v(!0);return}};return y.jsx(Vu,{children:y.jsx(rr.Puck,{config:e,data:t.histories[t.index].data.data??{root:{},content:[],zones:{}},initialHistory:t,onChange:b,overrides:{header:()=>{const{appState:w}=rr.usePuck();return Hu(g,m,w.data,u,h,o.isDevMode)}}})})};var pn="Progress",vn=100,[Ju,Vd]=xt(pn),[Zu,Qu]=Ju(pn),os=d.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:o,getValueLabel:a=ed,...s}=e;(o||o===0)&&!qn(o)&&console.error(td(`${o}`,"Progress"));const i=qn(o)?o:vn;n!==null&&!Kn(n,i)&&console.error(rd(`${n}`,"Progress"));const l=Kn(n,i)?n:null,u=lr(l)?a(l,i):void 0;return y.jsx(Zu,{scope:r,value:l,max:i,children:y.jsx(se.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":lr(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":is(l,i),"data-value":l??void 0,"data-max":i,...s,ref:t})})});os.displayName=pn;var as="ProgressIndicator",ss=d.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,o=Qu(as,r);return y.jsx(se.div,{"data-state":is(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...n,ref:t})});ss.displayName=as;function ed(e,t){return`${Math.round(e/t*100)}%`}function is(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function lr(e){return typeof e=="number"}function qn(e){return lr(e)&&!isNaN(e)&&e>0}function Kn(e,t){return lr(e)&&!isNaN(e)&&e<=t&&e>=0}function td(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${vn}\`.`}function rd(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
120
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return d.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},yl=Lo,bl=Io,wl=$o,Ko=Fo,Xo=Bo,qo=Uo,Jo=Go,Zo=zo,Qo=Ho;function ea(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=ea(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function xl(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=ea(e))&&(n&&(n+=" "),n+=t);return n}const Qr="-";function El(e){const t=Sl(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;function o(s){const i=s.split(Qr);return i[0]===""&&i.length!==1&&i.shift(),ta(i,t)||Cl(s)}function a(s,i){const l=r[s]||[];return i&&n[s]?[...l,...n[s]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:a}}function ta(e,t){var s;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?ta(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(Qr);return(s=t.validators.find(({validator:i})=>i(a)))==null?void 0:s.classGroupId}const jn=/^\[(.+)\]$/;function Cl(e){if(jn.test(e)){const t=jn.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}function Sl(e){const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return Pl(Object.entries(e.classGroups),r).forEach(([a,s])=>{Mr(s,n,a,t)}),n}function Mr(e,t,r,n){e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:Mn(t,o);a.classGroupId=r;return}if(typeof o=="function"){if(Rl(o)){Mr(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([a,s])=>{Mr(s,Mn(t,a),r,n)})})}function Mn(e,t){let r=e;return t.split(Qr).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r}function Rl(e){return e.isThemeGetter}function Pl(e,t){return t?e.map(([r,n])=>{const o=n.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,i])=>[t+s,i])):a);return[r,o]}):e}function Al(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;function o(a,s){r.set(a,s),t++,t>e&&(t=0,n=r,r=new Map)}return{get(a){let s=r.get(a);if(s!==void 0)return s;if((s=n.get(a))!==void 0)return o(a,s),s},set(a,s){r.has(a)?r.set(a,s):o(a,s)}}}const ra="!";function Tl(e){const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,o=t[0],a=t.length;function s(i){const l=[];let u=0,f=0,v;for(let b=0;b<i.length;b++){let x=i[b];if(u===0){if(x===o&&(n||i.slice(b,b+a)===t)){l.push(i.slice(f,b)),f=b+a;continue}if(x==="/"){v=b;continue}}x==="["?u++:x==="]"&&u--}const c=l.length===0?i:i.substring(f),h=c.startsWith(ra),m=h?c.substring(1):c,g=v&&v>f?v-f:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:g}}return r?function(l){return r({className:l,parseClassName:s})}:s}function Ol(e){if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t}function kl(e){return{cache:Al(e.cacheSize),parseClassName:Tl(e),...El(e)}}const Nl=/\s+/;function Dl(e,t){const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o}=t,a=new Set;return e.trim().split(Nl).map(s=>{const{modifiers:i,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:f}=r(s);let v=!!f,c=n(v?u.substring(0,f):u);if(!c){if(!v)return{isTailwindClass:!1,originalClassName:s};if(c=n(u),!c)return{isTailwindClass:!1,originalClassName:s};v=!1}const h=Ol(i).join(":");return{isTailwindClass:!0,modifierId:l?h+ra:h,classGroupId:c,originalClassName:s,hasPostfixModifier:v}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:i,classGroupId:l,hasPostfixModifier:u}=s,f=i+l;return a.has(f)?!1:(a.add(f),o(l,u).forEach(v=>a.add(i+v)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function _l(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=na(t))&&(n&&(n+=" "),n+=r);return n}function na(e){if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=na(e[n]))&&(r&&(r+=" "),r+=t);return r}function jl(e,...t){let r,n,o,a=s;function s(l){const u=t.reduce((f,v)=>v(f),e());return r=kl(u),n=r.cache.get,o=r.cache.set,a=i,i(l)}function i(l){const u=n(l);if(u)return u;const f=Dl(l,r);return o(l,f),f}return function(){return a(_l.apply(null,arguments))}}function re(e){const t=r=>r[e]||[];return t.isThemeGetter=!0,t}const oa=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ml=/^\d+\/\d+$/,Ll=new Set(["px","full","screen"]),Il=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$l=/\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$/,Fl=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Bl=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Wl=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function $e(e){return rt(e)||Ll.has(e)||Ml.test(e)}function Ue(e){return xt(e,"length",Xl)}function rt(e){return!!e&&!Number.isNaN(Number(e))}function Gt(e){return xt(e,"number",rt)}function Nt(e){return!!e&&Number.isInteger(Number(e))}function zl(e){return e.endsWith("%")&&rt(e.slice(0,-1))}function I(e){return oa.test(e)}function Ye(e){return Il.test(e)}const Vl=new Set(["length","size","percentage"]);function Hl(e){return xt(e,Vl,aa)}function Ul(e){return xt(e,"position",aa)}const Yl=new Set(["image","url"]);function Gl(e){return xt(e,Yl,Jl)}function Kl(e){return xt(e,"",ql)}function Dt(){return!0}function xt(e,t,r){const n=oa.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1}function Xl(e){return $l.test(e)&&!Fl.test(e)}function aa(){return!1}function ql(e){return Bl.test(e)}function Jl(e){return Wl.test(e)}function Zl(){const e=re("colors"),t=re("spacing"),r=re("blur"),n=re("brightness"),o=re("borderColor"),a=re("borderRadius"),s=re("borderSpacing"),i=re("borderWidth"),l=re("contrast"),u=re("grayscale"),f=re("hueRotate"),v=re("invert"),c=re("gap"),h=re("gradientColorStops"),m=re("gradientColorStopPositions"),g=re("inset"),b=re("margin"),x=re("opacity"),w=re("padding"),S=re("saturate"),R=re("scale"),P=re("sepia"),N=re("skew"),O=re("space"),B=re("translate"),G=()=>["auto","contain","none"],U=()=>["auto","hidden","clip","visible","scroll"],K=()=>["auto",I,t],_=()=>[I,t],W=()=>["",$e,Ue],F=()=>["auto",rt,I],V=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["solid","dashed","dotted","double","none"],j=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],k=()=>["start","end","center","between","around","evenly","stretch"],T=()=>["","0",I],ee=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>[rt,Gt],$=()=>[rt,I];return{cacheSize:500,separator:":",theme:{colors:[Dt],spacing:[$e,Ue],blur:["none","",Ye,I],brightness:D(),borderColor:[e],borderRadius:["none","","full",Ye,I],borderSpacing:_(),borderWidth:W(),contrast:D(),grayscale:T(),hueRotate:$(),invert:T(),gap:_(),gradientColorStops:[e],gradientColorStopPositions:[zl,Ue],inset:K(),margin:K(),opacity:D(),padding:_(),saturate:D(),scale:D(),sepia:T(),skew:$(),space:_(),translate:_()},classGroups:{aspect:[{aspect:["auto","square","video",I]}],container:["container"],columns:[{columns:[Ye]}],"break-after":[{"break-after":ee()}],"break-before":[{"break-before":ee()}],"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:[...V(),I]}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Nt,I]}],basis:[{basis:K()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",I]}],grow:[{grow:T()}],shrink:[{shrink:T()}],order:[{order:["first","last","none",Nt,I]}],"grid-cols":[{"grid-cols":[Dt]}],"col-start-end":[{col:["auto",{span:["full",Nt,I]},I]}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":[Dt]}],"row-start-end":[{row:["auto",{span:[Nt,I]},I]}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",I]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",I]}],gap:[{gap:[c]}],"gap-x":[{"gap-x":[c]}],"gap-y":[{"gap-y":[c]}],"justify-content":[{justify:["normal",...k()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...k(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...k(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[O]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[O]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",I,t]}],"min-w":[{"min-w":[I,t,"min","max","fit"]}],"max-w":[{"max-w":[I,t,"none","full","min","max","fit","prose",{screen:[Ye]},Ye]}],h:[{h:[I,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[I,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[I,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[I,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ye,Ue]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Gt]}],"font-family":[{font:[Dt]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",I]}],"line-clamp":[{"line-clamp":["none",rt,Gt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",$e,I]}],"list-image":[{"list-image":["none",I]}],"list-style-type":[{list:["none","disc","decimal",I]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",$e,Ue]}],"underline-offset":[{"underline-offset":["auto",$e,I]}],"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:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",I]}],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",I]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...V(),Ul]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Hl]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Gl]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...H(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:H()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...H()]}],"outline-offset":[{"outline-offset":[$e,I]}],"outline-w":[{outline:[$e,Ue]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[$e,Ue]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ye,Kl]}],"shadow-color":[{shadow:[Dt]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...j(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":j()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ye,I]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[v]}],saturate:[{saturate:[S]}],sepia:[{sepia:[P]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[v]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"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",I]}],duration:[{duration:$()}],ease:[{ease:["linear","in","out","in-out",I]}],delay:[{delay:$()}],animate:[{animate:["none","spin","ping","pulse","bounce",I]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[Nt,I]}],"translate-x":[{"translate-x":[B]}],"translate-y":[{"translate-y":[B]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",I]}],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",I]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"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",I]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[$e,Ue,Gt]}],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-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"]}}}const Ql=jl(Zl);function ve(...e){return Ql(xl(e))}function sa(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=sa(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function ec(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=sa(e))&&(n&&(n+=" "),n+=t);return n}const Ln=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,In=ec,ia=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return In(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(u=>{const f=r==null?void 0:r[u],v=a==null?void 0:a[u];if(f===null)return null;const c=Ln(f)||Ln(v);return o[u][c]}),i=r&&Object.entries(r).reduce((u,f)=>{let[v,c]=f;return c===void 0||(u[v]=c),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let{class:v,className:c,...h}=f;return Object.entries(h).every(m=>{let[g,b]=m;return Array.isArray(b)?b.includes({...a,...i}[g]):{...a,...i}[g]===b})?[...u,v,c]:u},[]);return In(e,s,l,r==null?void 0:r.class,r==null?void 0:r.className)},en=ia("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-secondary active:bg-primary-foreground active:text-primary active:border-primary focus:border-2",secondary:"bg-primary-foreground text-primary border-2 border-primary hover:bg-primary hover:text-primary-foreground active:bg-secondary active:text-secondary-foreground focus:border-2",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border-primary border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 rounded-md 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"}}),tc=d.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},a)=>{const s=n?Mt:"button";return y.jsx(s,{className:ve(en({variant:t,size:r,className:e})),ref:a,...o})});tc.displayName="Button";const rc=yl,nc=bl,oc=wl,la=d.forwardRef(({className:e,...t},r)=>y.jsx(Ko,{className:ve("ve-fixed ve-inset-0 ve-z-50 ve-bg-black/80 data-[state=open]:ve-animate-in data-[state=closed]:ve-animate-out data-[state=closed]:ve-fade-out-0 data-[state=open]:ve-fade-in-0",e),...t,ref:r}));la.displayName=Ko.displayName;const ca=d.forwardRef(({className:e,...t},r)=>y.jsxs(oc,{children:[y.jsx(la,{}),y.jsx(Xo,{ref:r,className:ve("ve-fixed ve-left-[50%] ve-top-[50%] ve-z-50 ve-grid ve-w-full ve-max-w-lg ve-translate-x-[-50%] ve-translate-y-[-50%] ve-gap-4 ve-border ve-bg-background ve-p-6 ve-shadow-lg ve-duration-200 data-[state=open]:ve-animate-in data-[state=closed]:ve-animate-out data-[state=closed]:ve-fade-out-0 data-[state=open]:ve-fade-in-0 data-[state=closed]:ve-zoom-out-95 data-[state=open]:ve-zoom-in-95 data-[state=closed]:ve-slide-out-to-left-1/2 data-[state=closed]:ve-slide-out-to-top-[48%] data-[state=open]:ve-slide-in-from-left-1/2 data-[state=open]:ve-slide-in-from-top-[48%] sm:ve-rounded-lg",e),...t})]}));ca.displayName=Xo.displayName;const ua=({className:e,...t})=>y.jsx("div",{className:ve("ve-flex ve-flex-col ve-space-y-2 ve-text-center sm:ve-text-left",e),...t});ua.displayName="AlertDialogHeader";const da=({className:e,...t})=>y.jsx("div",{className:ve("ve-flex ve-flex-col-reverse sm:ve-flex-row sm:ve-justify-end sm:ve-space-x-2",e),...t});da.displayName="AlertDialogFooter";const fa=d.forwardRef(({className:e,...t},r)=>y.jsx(Zo,{ref:r,className:ve("ve-text-lg ve-font-semibold",e),...t}));fa.displayName=Zo.displayName;const pa=d.forwardRef(({className:e,...t},r)=>y.jsx(Qo,{ref:r,className:ve("ve-text-sm ve-text-muted-foreground",e),...t}));pa.displayName=Qo.displayName;const ac=d.forwardRef(({className:e,...t},r)=>y.jsx(qo,{ref:r,className:ve(en(),e),...t}));ac.displayName=qo.displayName;const va=d.forwardRef(({className:e,...t},r)=>y.jsx(Jo,{ref:r,className:ve(en({variant:"outline"}),"ve-mt-2 sm:ve-mt-0",e),...t}));va.displayName=Jo.displayName;const sc=ia("ve-inline-flex ve-items-center ve-justify-center ve-whitespace-nowrap ve-rounded-md ve-text-sm ve-font-medium ve-ring-offset-background ve-transition-colors focus-visible:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-ring focus-visible:ve-ring-offset-2 disabled:ve-pointer-events-none disabled:ve-opacity-50",{variants:{variant:{default:"ve-bg-primary ve-text-primary-foreground hover:ve-bg-primary/90",destructive:"ve-bg-destructive ve-text-destructive-foreground hover:ve-bg-destructive/90",outline:"ve-border ve-border-input ve-bg-background hover:ve-bg-accent hover:ve-text-accent-foreground",secondary:"ve-bg-secondary ve-text-secondary-foreground hover:ve-bg-secondary/80",ghost:"hover:ve-bg-accent hover:ve-text-accent-foreground",link:"ve-text-primary ve-underline-offset-4 hover:ve-underline"},size:{default:"ve-h-10 ve-rounded-md ve-px-4 ve-py-2",sm:"ve-h-9 ve-rounded-md ve-px-3",lg:"ve-h-11 ve-rounded-md ve-px-8",icon:"ve-h-10 ve-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ke=d.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},a)=>{const s=n?Mt:"button";return y.jsx(s,{className:ve(sc({variant:t,size:r,className:e})),ref:a,...o})});Ke.displayName="Button";function ic(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function ga(e){const[t,r]=d.useState(void 0);return nt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;r({width:s,height:i})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var tn="Switch",[lc,Bd]=wt(tn),[cc,uc]=lc(tn),ha=d.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:a,required:s,disabled:i,value:l="on",onCheckedChange:u,...f}=e,[v,c]=d.useState(null),h=ge(t,w=>c(w)),m=d.useRef(!1),g=v?!!v.closest("form"):!0,[b=!1,x]=Yr({prop:o,defaultProp:a,onChange:u});return y.jsxs(cc,{scope:r,checked:b,disabled:i,children:[y.jsx(se.button,{type:"button",role:"switch","aria-checked":b,"aria-required":s,"data-state":ba(b),"data-disabled":i?"":void 0,disabled:i,value:l,...f,ref:h,onClick:le(e.onClick,w=>{x(S=>!S),g&&(m.current=w.isPropagationStopped(),m.current||w.stopPropagation())})}),g&&y.jsx(dc,{control:v,bubbles:!m.current,name:n,value:l,checked:b,required:s,disabled:i,style:{transform:"translateX(-100%)"}})]})});ha.displayName=tn;var ma="SwitchThumb",ya=d.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=uc(ma,r);return y.jsx(se.span,{"data-state":ba(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});ya.displayName=ma;var dc=e=>{const{control:t,checked:r,bubbles:n=!0,...o}=e,a=d.useRef(null),s=ic(r),i=ga(t);return d.useEffect(()=>{const l=a.current,u=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(u,"checked").set;if(s!==r&&v){const c=new Event("click",{bubbles:n});v.call(l,r),l.dispatchEvent(c)}},[s,r,n]),y.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:a,style:{...e.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function ba(e){return e?"checked":"unchecked"}var wa=ha,fc=ya;const xa=d.forwardRef(({className:e,...t},r)=>y.jsx(wa,{className:ve("ve-self-center ve-peer ve-inline-flex ve-h-5 ve-w-9 ve-shrink-0 ve-cursor-pointer ve-items-center ve-rounded-full ve-border-2 ve-border-transparent ve-transition-colors focus-visible:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-ring focus-visible:ve-ring-offset-2 focus-visible:ve-ring-offset-background disabled:ve-cursor-not-allowed disabled:ve-opacity-50 data-[state=checked]:ve-bg-primary data-[state=unchecked]:ve-bg-input",e),...t,ref:r,children:y.jsx(fc,{className:ve("ve-self-center ve-pointer-events-none ve-block ve-h-4 ve-w-4 ve-rounded-full ve-bg-background ve-shadow-lg ve-ring-0 ve-transition-transform data-[state=checked]:ve-translate-x-4 data-[state=unchecked]:ve-translate-x-0")})}));xa.displayName=wa.displayName;const pc=["top","right","bottom","left"],De=Math.min,be=Math.max,nr=Math.round,Kt=Math.floor,qe=e=>({x:e,y:e}),vc={left:"right",right:"left",bottom:"top",top:"bottom"},gc={start:"end",end:"start"};function Lr(e,t,r){return be(e,De(t,r))}function Fe(e,t){return typeof e=="function"?e(t):e}function Be(e){return e.split("-")[0]}function Et(e){return e.split("-")[1]}function rn(e){return e==="x"?"y":"x"}function nn(e){return e==="y"?"height":"width"}function Je(e){return["top","bottom"].includes(Be(e))?"y":"x"}function on(e){return rn(Je(e))}function hc(e,t,r){r===void 0&&(r=!1);const n=Et(e),o=on(e),a=nn(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=or(s)),[s,or(s)]}function mc(e){const t=or(e);return[Ir(e),t,Ir(t)]}function Ir(e){return e.replace(/start|end/g,t=>gc[t])}function yc(e,t,r){const n=["left","right"],o=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?a:s;default:return[]}}function bc(e,t,r,n){const o=Et(e);let a=yc(Be(e),r==="start",n);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(Ir)))),a}function or(e){return e.replace(/left|right|bottom|top/g,t=>vc[t])}function wc(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ea(e){return typeof e!="number"?wc(e):{top:e,right:e,bottom:e,left:e}}function ar(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function $n(e,t,r){let{reference:n,floating:o}=e;const a=Je(t),s=on(t),i=nn(s),l=Be(t),u=a==="y",f=n.x+n.width/2-o.width/2,v=n.y+n.height/2-o.height/2,c=n[i]/2-o[i]/2;let h;switch(l){case"top":h={x:f,y:n.y-o.height};break;case"bottom":h={x:f,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:v};break;case"left":h={x:n.x-o.width,y:v};break;default:h={x:n.x,y:n.y}}switch(Et(t)){case"start":h[s]-=c*(r&&u?-1:1);break;case"end":h[s]+=c*(r&&u?-1:1);break}return h}const xc=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:s}=r,i=a.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:v}=$n(u,n,l),c=n,h={},m=0;for(let g=0;g<i.length;g++){const{name:b,fn:x}=i[g],{x:w,y:S,data:R,reset:P}=await x({x:f,y:v,initialPlacement:n,placement:c,strategy:o,middlewareData:h,rects:u,platform:s,elements:{reference:e,floating:t}});f=w??f,v=S??v,h={...h,[b]:{...h[b],...R}},P&&m<=50&&(m++,typeof P=="object"&&(P.placement&&(c=P.placement),P.rects&&(u=P.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):P.rects),{x:f,y:v}=$n(u,c,l)),g=-1)}return{x:f,y:v,placement:c,strategy:o,middlewareData:h}};async function _t(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:v="floating",altBoundary:c=!1,padding:h=0}=Fe(t,e),m=Ea(h),b=i[c?v==="floating"?"reference":"floating":v],x=ar(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(b)))==null||r?b:b.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:f,strategy:l})),w=v==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),R=await(a.isElement==null?void 0:a.isElement(S))?await(a.getScale==null?void 0:a.getScale(S))||{x:1,y:1}:{x:1,y:1},P=ar(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:w,offsetParent:S,strategy:l}):w);return{top:(x.top-P.top+m.top)/R.y,bottom:(P.bottom-x.bottom+m.bottom)/R.y,left:(x.left-P.left+m.left)/R.x,right:(P.right-x.right+m.right)/R.x}}const Ec=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:u,padding:f=0}=Fe(e,t)||{};if(u==null)return{};const v=Ea(f),c={x:r,y:n},h=on(o),m=nn(h),g=await s.getDimensions(u),b=h==="y",x=b?"top":"left",w=b?"bottom":"right",S=b?"clientHeight":"clientWidth",R=a.reference[m]+a.reference[h]-c[h]-a.floating[m],P=c[h]-a.reference[h],N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let O=N?N[S]:0;(!O||!await(s.isElement==null?void 0:s.isElement(N)))&&(O=i.floating[S]||a.floating[m]);const B=R/2-P/2,G=O/2-g[m]/2-1,U=De(v[x],G),K=De(v[w],G),_=U,W=O-g[m]-K,F=O/2-g[m]/2+B,V=Lr(_,F,W),H=!l.arrow&&Et(o)!=null&&F!==V&&a.reference[m]/2-(F<_?U:K)-g[m]/2<0,j=H?F<_?F-_:F-W:0;return{[h]:c[h]+j,data:{[h]:V,centerOffset:F-V-j,...H&&{alignmentOffset:j}},reset:H}}}),Cc=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:u}=t,{mainAxis:f=!0,crossAxis:v=!0,fallbackPlacements:c,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...b}=Fe(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const x=Be(o),w=Je(i),S=Be(i)===i,R=await(l.isRTL==null?void 0:l.isRTL(u.floating)),P=c||(S||!g?[or(i)]:mc(i)),N=m!=="none";!c&&N&&P.push(...bc(i,g,m,R));const O=[i,...P],B=await _t(t,b),G=[];let U=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&G.push(B[x]),v){const F=hc(o,s,R);G.push(B[F[0]],B[F[1]])}if(U=[...U,{placement:o,overflows:G}],!G.every(F=>F<=0)){var K,_;const F=(((K=a.flip)==null?void 0:K.index)||0)+1,V=O[F];if(V)return{data:{index:F,overflows:U},reset:{placement:V}};let H=(_=U.filter(j=>j.overflows[0]<=0).sort((j,k)=>j.overflows[1]-k.overflows[1])[0])==null?void 0:_.placement;if(!H)switch(h){case"bestFit":{var W;const j=(W=U.filter(k=>{if(N){const T=Je(k.placement);return T===w||T==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(T=>T>0).reduce((T,ee)=>T+ee,0)]).sort((k,T)=>k[1]-T[1])[0])==null?void 0:W[0];j&&(H=j);break}case"initialPlacement":H=i;break}if(o!==H)return{reset:{placement:H}}}return{}}}};function Fn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Bn(e){return pc.some(t=>e[t]>=0)}const Sc=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=Fe(e,t);switch(n){case"referenceHidden":{const a=await _t(t,{...o,elementContext:"reference"}),s=Fn(a,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Bn(s)}}}case"escaped":{const a=await _t(t,{...o,altBoundary:!0}),s=Fn(a,r.floating);return{data:{escapedOffsets:s,escaped:Bn(s)}}}default:return{}}}}};async function Rc(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=Be(r),i=Et(r),l=Je(r)==="y",u=["left","top"].includes(s)?-1:1,f=a&&l?-1:1,v=Fe(t,e);let{mainAxis:c,crossAxis:h,alignmentAxis:m}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...v};return i&&typeof m=="number"&&(h=i==="end"?m*-1:m),l?{x:h*f,y:c*u}:{x:c*u,y:h*f}}const Pc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:s,middlewareData:i}=t,l=await Rc(t,e);return s===((r=i.offset)==null?void 0:r.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:s}}}}},Ac=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:b=>{let{x,y:w}=b;return{x,y:w}}},...l}=Fe(e,t),u={x:r,y:n},f=await _t(t,l),v=Je(Be(o)),c=rn(v);let h=u[c],m=u[v];if(a){const b=c==="y"?"top":"left",x=c==="y"?"bottom":"right",w=h+f[b],S=h-f[x];h=Lr(w,h,S)}if(s){const b=v==="y"?"top":"left",x=v==="y"?"bottom":"right",w=m+f[b],S=m-f[x];m=Lr(w,m,S)}const g=i.fn({...t,[c]:h,[v]:m});return{...g,data:{x:g.x-r,y:g.y-n}}}}},Tc=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:u=!0}=Fe(e,t),f={x:r,y:n},v=Je(o),c=rn(v);let h=f[c],m=f[v];const g=Fe(i,t),b=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const S=c==="y"?"height":"width",R=a.reference[c]-a.floating[S]+b.mainAxis,P=a.reference[c]+a.reference[S]-b.mainAxis;h<R?h=R:h>P&&(h=P)}if(u){var x,w;const S=c==="y"?"width":"height",R=["top","left"].includes(Be(o)),P=a.reference[v]-a.floating[S]+(R&&((x=s.offset)==null?void 0:x[v])||0)+(R?0:b.crossAxis),N=a.reference[v]+a.reference[S]+(R?0:((w=s.offset)==null?void 0:w[v])||0)-(R?b.crossAxis:0);m<P?m=P:m>N&&(m=N)}return{[c]:h,[v]:m}}}},Oc=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:o,elements:a}=t,{apply:s=()=>{},...i}=Fe(e,t),l=await _t(t,i),u=Be(r),f=Et(r),v=Je(r)==="y",{width:c,height:h}=n.floating;let m,g;u==="top"||u==="bottom"?(m=u,g=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(g=u,m=f==="end"?"top":"bottom");const b=h-l.top-l.bottom,x=c-l.left-l.right,w=De(h-l[m],b),S=De(c-l[g],x),R=!t.middlewareData.shift;let P=w,N=S;if(v?N=f||R?De(S,x):x:P=f||R?De(w,b):b,R&&!f){const B=be(l.left,0),G=be(l.right,0),U=be(l.top,0),K=be(l.bottom,0);v?N=c-2*(B!==0||G!==0?B+G:be(l.left,l.right)):P=h-2*(U!==0||K!==0?U+K:be(l.top,l.bottom))}await s({...t,availableWidth:N,availableHeight:P});const O=await o.getDimensions(a.floating);return c!==O.width||h!==O.height?{reset:{rects:!0}}:{}}}};function Ct(e){return Ca(e)?(e.nodeName||"").toLowerCase():"#document"}function we(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ze(e){var t;return(t=(Ca(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ca(e){return e instanceof Node||e instanceof we(e).Node}function Pe(e){return e instanceof Element||e instanceof we(e).Element}function _e(e){return e instanceof HTMLElement||e instanceof we(e).HTMLElement}function Wn(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof we(e).ShadowRoot}function It(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Ae(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function kc(e){return["table","td","th"].includes(Ct(e))}function ur(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function an(e){const t=sn(),r=Pe(e)?Ae(e):e;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function Nc(e){let t=Ze(e);for(;_e(t)&&!yt(t);){if(an(t))return t;if(ur(t))return null;t=Ze(t)}return null}function sn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function yt(e){return["html","body","#document"].includes(Ct(e))}function Ae(e){return we(e).getComputedStyle(e)}function dr(e){return Pe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ze(e){if(Ct(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Wn(e)&&e.host||ze(e);return Wn(t)?t.host:t}function Sa(e){const t=Ze(e);return yt(t)?e.ownerDocument?e.ownerDocument.body:e.body:_e(t)&&It(t)?t:Sa(t)}function jt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Sa(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),s=we(o);if(a){const i=$r(s);return t.concat(s,s.visualViewport||[],It(o)?o:[],i&&r?jt(i):[])}return t.concat(o,jt(o,[],r))}function $r(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ra(e){const t=Ae(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=_e(e),a=o?e.offsetWidth:r,s=o?e.offsetHeight:n,i=nr(r)!==a||nr(n)!==s;return i&&(r=a,n=s),{width:r,height:n,$:i}}function ln(e){return Pe(e)?e:e.contextElement}function mt(e){const t=ln(e);if(!_e(t))return qe(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=Ra(t);let s=(a?nr(r.width):r.width)/n,i=(a?nr(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const Dc=qe(0);function Pa(e){const t=we(e);return!sn()||!t.visualViewport?Dc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _c(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==we(e)?!1:t}function at(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=ln(e);let s=qe(1);t&&(n?Pe(n)&&(s=mt(n)):s=mt(e));const i=_c(a,r,n)?Pa(a):qe(0);let l=(o.left+i.x)/s.x,u=(o.top+i.y)/s.y,f=o.width/s.x,v=o.height/s.y;if(a){const c=we(a),h=n&&Pe(n)?we(n):n;let m=c,g=$r(m);for(;g&&n&&h!==m;){const b=mt(g),x=g.getBoundingClientRect(),w=Ae(g),S=x.left+(g.clientLeft+parseFloat(w.paddingLeft))*b.x,R=x.top+(g.clientTop+parseFloat(w.paddingTop))*b.y;l*=b.x,u*=b.y,f*=b.x,v*=b.y,l+=S,u+=R,m=we(g),g=$r(m)}}return ar({width:f,height:v,x:l,y:u})}function jc(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",s=ze(n),i=t?ur(t.floating):!1;if(n===s||i&&a)return r;let l={scrollLeft:0,scrollTop:0},u=qe(1);const f=qe(0),v=_e(n);if((v||!v&&!a)&&((Ct(n)!=="body"||It(s))&&(l=dr(n)),_e(n))){const c=at(n);u=mt(n),f.x=c.x+n.clientLeft,f.y=c.y+n.clientTop}return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+f.x,y:r.y*u.y-l.scrollTop*u.y+f.y}}function Mc(e){return Array.from(e.getClientRects())}function Aa(e){return at(ze(e)).left+dr(e).scrollLeft}function Lc(e){const t=ze(e),r=dr(e),n=e.ownerDocument.body,o=be(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=be(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+Aa(e);const i=-r.scrollTop;return Ae(n).direction==="rtl"&&(s+=be(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:s,y:i}}function Ic(e,t){const r=we(e),n=ze(e),o=r.visualViewport;let a=n.clientWidth,s=n.clientHeight,i=0,l=0;if(o){a=o.width,s=o.height;const u=sn();(!u||u&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}return{width:a,height:s,x:i,y:l}}function $c(e,t){const r=at(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=_e(e)?mt(e):qe(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=o*a.x,u=n*a.y;return{width:s,height:i,x:l,y:u}}function zn(e,t,r){let n;if(t==="viewport")n=Ic(e,r);else if(t==="document")n=Lc(ze(e));else if(Pe(t))n=$c(t,r);else{const o=Pa(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return ar(n)}function Ta(e,t){const r=Ze(e);return r===t||!Pe(r)||yt(r)?!1:Ae(r).position==="fixed"||Ta(r,t)}function Fc(e,t){const r=t.get(e);if(r)return r;let n=jt(e,[],!1).filter(i=>Pe(i)&&Ct(i)!=="body"),o=null;const a=Ae(e).position==="fixed";let s=a?Ze(e):e;for(;Pe(s)&&!yt(s);){const i=Ae(s),l=an(s);!l&&i.position==="fixed"&&(o=null),(a?!l&&!o:!l&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||It(s)&&!l&&Ta(e,s))?n=n.filter(f=>f!==s):o=i,s=Ze(s)}return t.set(e,n),n}function Bc(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?ur(t)?[]:Fc(t,this._c):[].concat(r),n],i=s[0],l=s.reduce((u,f)=>{const v=zn(t,f,o);return u.top=be(v.top,u.top),u.right=De(v.right,u.right),u.bottom=De(v.bottom,u.bottom),u.left=be(v.left,u.left),u},zn(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Wc(e){const{width:t,height:r}=Ra(e);return{width:t,height:r}}function zc(e,t,r){const n=_e(t),o=ze(t),a=r==="fixed",s=at(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=qe(0);if(n||!n&&!a)if((Ct(t)!=="body"||It(o))&&(i=dr(t)),n){const v=at(t,!0,a,t);l.x=v.x+t.clientLeft,l.y=v.y+t.clientTop}else o&&(l.x=Aa(o));const u=s.left+i.scrollLeft-l.x,f=s.top+i.scrollTop-l.y;return{x:u,y:f,width:s.width,height:s.height}}function Tr(e){return Ae(e).position==="static"}function Vn(e,t){return!_e(e)||Ae(e).position==="fixed"?null:t?t(e):e.offsetParent}function Oa(e,t){const r=we(e);if(ur(e))return r;if(!_e(e)){let o=Ze(e);for(;o&&!yt(o);){if(Pe(o)&&!Tr(o))return o;o=Ze(o)}return r}let n=Vn(e,t);for(;n&&kc(n)&&Tr(n);)n=Vn(n,t);return n&&yt(n)&&Tr(n)&&!an(n)?r:n||Nc(e)||r}const Vc=async function(e){const t=this.getOffsetParent||Oa,r=this.getDimensions,n=await r(e.floating);return{reference:zc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Hc(e){return Ae(e).direction==="rtl"}const Uc={convertOffsetParentRelativeRectToViewportRelativeRect:jc,getDocumentElement:ze,getClippingRect:Bc,getOffsetParent:Oa,getElementRects:Vc,getClientRects:Mc,getDimensions:Wc,getScale:mt,isElement:Pe,isRTL:Hc};function Yc(e,t){let r=null,n;const o=ze(e);function a(){var i;clearTimeout(n),(i=r)==null||i.disconnect(),r=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const{left:u,top:f,width:v,height:c}=e.getBoundingClientRect();if(i||t(),!v||!c)return;const h=Kt(f),m=Kt(o.clientWidth-(u+v)),g=Kt(o.clientHeight-(f+c)),b=Kt(u),w={rootMargin:-h+"px "+-m+"px "+-g+"px "+-b+"px",threshold:be(0,De(1,l))||1};let S=!0;function R(P){const N=P[0].intersectionRatio;if(N!==l){if(!S)return s();N?s(!1,N):n=setTimeout(()=>{s(!1,1e-7)},1e3)}S=!1}try{r=new IntersectionObserver(R,{...w,root:o.ownerDocument})}catch{r=new IntersectionObserver(R,w)}r.observe(e)}return s(!0),a}function Gc(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=ln(e),f=o||a?[...u?jt(u):[],...jt(t)]:[];f.forEach(x=>{o&&x.addEventListener("scroll",r,{passive:!0}),a&&x.addEventListener("resize",r)});const v=u&&i?Yc(u,r):null;let c=-1,h=null;s&&(h=new ResizeObserver(x=>{let[w]=x;w&&w.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(c),c=requestAnimationFrame(()=>{var S;(S=h)==null||S.observe(t)})),r()}),u&&!l&&h.observe(u),h.observe(t));let m,g=l?at(e):null;l&&b();function b(){const x=at(e);g&&(x.x!==g.x||x.y!==g.y||x.width!==g.width||x.height!==g.height)&&r(),g=x,m=requestAnimationFrame(b)}return r(),()=>{var x;f.forEach(w=>{o&&w.removeEventListener("scroll",r),a&&w.removeEventListener("resize",r)}),v==null||v(),(x=h)==null||x.disconnect(),h=null,l&&cancelAnimationFrame(m)}}const Kc=Pc,Xc=Ac,qc=Cc,Jc=Oc,Zc=Sc,Hn=Ec,Qc=Tc,eu=(e,t,r)=>{const n=new Map,o={platform:Uc,...r},a={...o.platform,_c:n};return xc(e,t,{...o,platform:a})};var Qt=typeof document<"u"?E.useLayoutEffect:E.useEffect;function sr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!sr(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!sr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function ka(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Un(e,t){const r=ka(e);return Math.round(t*r)/r}function Yn(e){const t=d.useRef(e);return Qt(()=>{t.current=e}),t}function tu(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:l,open:u}=e,[f,v]=d.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[c,h]=d.useState(n);sr(c,n)||h(n);const[m,g]=d.useState(null),[b,x]=d.useState(null),w=d.useCallback(j=>{j!==N.current&&(N.current=j,g(j))},[]),S=d.useCallback(j=>{j!==O.current&&(O.current=j,x(j))},[]),R=a||m,P=s||b,N=d.useRef(null),O=d.useRef(null),B=d.useRef(f),G=l!=null,U=Yn(l),K=Yn(o),_=d.useCallback(()=>{if(!N.current||!O.current)return;const j={placement:t,strategy:r,middleware:c};K.current&&(j.platform=K.current),eu(N.current,O.current,j).then(k=>{const T={...k,isPositioned:!0};W.current&&!sr(B.current,T)&&(B.current=T,Ur.flushSync(()=>{v(T)}))})},[c,t,r,K]);Qt(()=>{u===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,v(j=>({...j,isPositioned:!1})))},[u]);const W=d.useRef(!1);Qt(()=>(W.current=!0,()=>{W.current=!1}),[]),Qt(()=>{if(R&&(N.current=R),P&&(O.current=P),R&&P){if(U.current)return U.current(R,P,_);_()}},[R,P,_,U,G]);const F=d.useMemo(()=>({reference:N,floating:O,setReference:w,setFloating:S}),[w,S]),V=d.useMemo(()=>({reference:R,floating:P}),[R,P]),H=d.useMemo(()=>{const j={position:r,left:0,top:0};if(!V.floating)return j;const k=Un(V.floating,f.x),T=Un(V.floating,f.y);return i?{...j,transform:"translate("+k+"px, "+T+"px)",...ka(V.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:k,top:T}},[r,i,V.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:_,refs:F,elements:V,floatingStyles:H}),[f,_,F,V,H])}const ru=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Hn({element:n.current,padding:o}).fn(r):{}:n?Hn({element:n,padding:o}).fn(r):{}}}},nu=(e,t)=>({...Kc(e),options:[e,t]}),ou=(e,t)=>({...Xc(e),options:[e,t]}),au=(e,t)=>({...Qc(e),options:[e,t]}),su=(e,t)=>({...qc(e),options:[e,t]}),iu=(e,t)=>({...Jc(e),options:[e,t]}),lu=(e,t)=>({...Zc(e),options:[e,t]}),cu=(e,t)=>({...ru(e),options:[e,t]});var uu="Arrow",Na=d.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return y.jsx(se.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:y.jsx("polygon",{points:"0,0 30,0 15,10"})})});Na.displayName=uu;var du=Na,cn="Popper",[Da,_a]=wt(cn),[fu,ja]=Da(cn),Ma=e=>{const{__scopePopper:t,children:r}=e,[n,o]=d.useState(null);return y.jsx(fu,{scope:t,anchor:n,onAnchorChange:o,children:r})};Ma.displayName=cn;var La="PopperAnchor",Ia=d.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=ja(La,r),s=d.useRef(null),i=ge(t,s);return d.useEffect(()=>{a.onAnchorChange((n==null?void 0:n.current)||s.current)}),n?null:y.jsx(se.div,{...o,ref:i})});Ia.displayName=La;var un="PopperContent",[pu,vu]=Da(un),$a=d.forwardRef((e,t)=>{var Oe,he,xe,me,st,je;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:v="partial",hideWhenDetached:c=!1,updatePositionStrategy:h="optimized",onPlaced:m,...g}=e,b=ja(un,r),[x,w]=d.useState(null),S=ge(t,Me=>w(Me)),[R,P]=d.useState(null),N=ga(R),O=(N==null?void 0:N.width)??0,B=(N==null?void 0:N.height)??0,G=n+(a!=="center"?"-"+a:""),U=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},K=Array.isArray(u)?u:[u],_=K.length>0,W={padding:U,boundary:K.filter(hu),altBoundary:_},{refs:F,floatingStyles:V,placement:H,isPositioned:j,middlewareData:k}=tu({strategy:"fixed",placement:G,whileElementsMounted:(...Me)=>Gc(...Me,{animationFrame:h==="always"}),elements:{reference:b.anchor},middleware:[nu({mainAxis:o+B,alignmentAxis:s}),l&&ou({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?au():void 0,...W}),l&&su({...W}),iu({...W,apply:({elements:Me,rects:Qe,availableWidth:Le,availableHeight:de})=>{const{width:it,height:lt}=Qe.reference,ne=Me.floating.style;ne.setProperty("--radix-popper-available-width",`${Le}px`),ne.setProperty("--radix-popper-available-height",`${de}px`),ne.setProperty("--radix-popper-anchor-width",`${it}px`),ne.setProperty("--radix-popper-anchor-height",`${lt}px`)}}),R&&cu({element:R,padding:i}),mu({arrowWidth:O,arrowHeight:B}),c&&lu({strategy:"referenceHidden",...W})]}),[T,ee]=Wa(H),D=Xe(m);nt(()=>{j&&(D==null||D())},[j,D]);const $=(Oe=k.arrow)==null?void 0:Oe.x,X=(he=k.arrow)==null?void 0:he.y,ue=((xe=k.arrow)==null?void 0:xe.centerOffset)!==0,[Se,te]=d.useState();return nt(()=>{x&&te(window.getComputedStyle(x).zIndex)},[x]),y.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:j?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Se,"--radix-popper-transform-origin":[(me=k.transformOrigin)==null?void 0:me.x,(st=k.transformOrigin)==null?void 0:st.y].join(" "),...((je=k.hide)==null?void 0:je.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:y.jsx(pu,{scope:r,placedSide:T,onArrowChange:P,arrowX:$,arrowY:X,shouldHideArrow:ue,children:y.jsx(se.div,{"data-side":T,"data-align":ee,...g,ref:S,style:{...g.style,animation:j?void 0:"none"}})})})});$a.displayName=un;var Fa="PopperArrow",gu={top:"bottom",right:"left",bottom:"top",left:"right"},Ba=d.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=vu(Fa,n),s=gu[a.placedSide];return y.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:y.jsx(du,{...o,ref:r,style:{...o.style,display:"block"}})})});Ba.displayName=Fa;function hu(e){return e!==null}var mu=e=>({name:"transformOrigin",options:e,fn(t){var b,x,w;const{placement:r,rects:n,middlewareData:o}=t,s=((b=o.arrow)==null?void 0:b.centerOffset)!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,f]=Wa(r),v={start:"0%",center:"50%",end:"100%"}[f],c=(((x=o.arrow)==null?void 0:x.x)??0)+i/2,h=(((w=o.arrow)==null?void 0:w.y)??0)+l/2;let m="",g="";return u==="bottom"?(m=s?v:`${c}px`,g=`${-l}px`):u==="top"?(m=s?v:`${c}px`,g=`${n.floating.height+l}px`):u==="right"?(m=`${-l}px`,g=s?v:`${h}px`):u==="left"&&(m=`${n.floating.width+l}px`,g=s?v:`${h}px`),{data:{x:m,y:g}}}});function Wa(e){const[t,r="center"]=e.split("-");return[t,r]}var yu=Ma,bu=Ia,wu=$a,xu=Ba,Eu="VisuallyHidden",za=d.forwardRef((e,t)=>y.jsx(se.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));za.displayName=Eu;var Cu=za,[fr,Wd]=wt("Tooltip",[_a]),pr=_a(),Va="TooltipProvider",Su=700,Fr="tooltip.open",[Ru,dn]=fr(Va),Ha=e=>{const{__scopeTooltip:t,delayDuration:r=Su,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,[s,i]=d.useState(!0),l=d.useRef(!1),u=d.useRef(0);return d.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),y.jsx(Ru,{scope:t,isOpenDelayed:s,delayDuration:r,onOpen:d.useCallback(()=>{window.clearTimeout(u.current),i(!1)},[]),onClose:d.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>i(!0),n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:d.useCallback(f=>{l.current=f},[]),disableHoverableContent:o,children:a})};Ha.displayName=Va;var vr="Tooltip",[Pu,gr]=fr(vr),Ua=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=dn(vr,e.__scopeTooltip),u=pr(t),[f,v]=d.useState(null),c=qt(),h=d.useRef(0),m=s??l.disableHoverableContent,g=i??l.delayDuration,b=d.useRef(!1),[x=!1,w]=Yr({prop:n,defaultProp:o,onChange:O=>{O?(l.onOpen(),document.dispatchEvent(new CustomEvent(Fr))):l.onClose(),a==null||a(O)}}),S=d.useMemo(()=>x?b.current?"delayed-open":"instant-open":"closed",[x]),R=d.useCallback(()=>{window.clearTimeout(h.current),b.current=!1,w(!0)},[w]),P=d.useCallback(()=>{window.clearTimeout(h.current),w(!1)},[w]),N=d.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{b.current=!0,w(!0)},g)},[g,w]);return d.useEffect(()=>()=>window.clearTimeout(h.current),[]),y.jsx(yu,{...u,children:y.jsx(Pu,{scope:t,contentId:c,open:x,stateAttribute:S,trigger:f,onTriggerChange:v,onTriggerEnter:d.useCallback(()=>{l.isOpenDelayed?N():R()},[l.isOpenDelayed,N,R]),onTriggerLeave:d.useCallback(()=>{m?P():window.clearTimeout(h.current)},[P,m]),onOpen:R,onClose:P,disableHoverableContent:m,children:r})})};Ua.displayName=vr;var Br="TooltipTrigger",Ya=d.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=gr(Br,r),a=dn(Br,r),s=pr(r),i=d.useRef(null),l=ge(t,i,o.onTriggerChange),u=d.useRef(!1),f=d.useRef(!1),v=d.useCallback(()=>u.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),y.jsx(bu,{asChild:!0,...s,children:y.jsx(se.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:l,onPointerMove:le(e.onPointerMove,c=>{c.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:le(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:le(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:le(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:le(e.onBlur,o.onClose),onClick:le(e.onClick,o.onClose)})})});Ya.displayName=Br;var Au="TooltipPortal",[zd,Tu]=fr(Au,{forceMount:void 0}),bt="TooltipContent",Ga=d.forwardRef((e,t)=>{const r=Tu(bt,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,s=gr(bt,e.__scopeTooltip);return y.jsx(Lt,{present:n||s.open,children:s.disableHoverableContent?y.jsx(Ka,{side:o,...a,ref:t}):y.jsx(Ou,{side:o,...a,ref:t})})}),Ou=d.forwardRef((e,t)=>{const r=gr(bt,e.__scopeTooltip),n=dn(bt,e.__scopeTooltip),o=d.useRef(null),a=ge(t,o),[s,i]=d.useState(null),{trigger:l,onClose:u}=r,f=o.current,{onPointerInTransitChange:v}=n,c=d.useCallback(()=>{i(null),v(!1)},[v]),h=d.useCallback((m,g)=>{const b=m.currentTarget,x={x:m.clientX,y:m.clientY},w=Du(x,b.getBoundingClientRect()),S=_u(x,w),R=ju(g.getBoundingClientRect()),P=Lu([...S,...R]);i(P),v(!0)},[v]);return d.useEffect(()=>()=>c(),[c]),d.useEffect(()=>{if(l&&f){const m=b=>h(b,f),g=b=>h(b,l);return l.addEventListener("pointerleave",m),f.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",m),f.removeEventListener("pointerleave",g)}}},[l,f,h,c]),d.useEffect(()=>{if(s){const m=g=>{const b=g.target,x={x:g.clientX,y:g.clientY},w=(l==null?void 0:l.contains(b))||(f==null?void 0:f.contains(b)),S=!Mu(x,s);w?c():S&&(c(),u())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[l,f,s,u,c]),y.jsx(Ka,{...e,ref:a})}),[ku,Nu]=fr(vr,{isInside:!1}),Ka=d.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=gr(bt,r),u=pr(r),{onClose:f}=l;return d.useEffect(()=>(document.addEventListener(Fr,f),()=>document.removeEventListener(Fr,f)),[f]),d.useEffect(()=>{if(l.trigger){const v=c=>{const h=c.target;h!=null&&h.contains(l.trigger)&&f()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[l.trigger,f]),y.jsx(Kr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:v=>v.preventDefault(),onDismiss:f,children:y.jsxs(wu,{"data-state":l.stateAttribute,...u,...i,ref:t,style:{...i.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:[y.jsx(Gr,{children:n}),y.jsx(ku,{scope:r,isInside:!0,children:y.jsx(Cu,{id:l.contentId,role:"tooltip",children:o||n})})]})})});Ga.displayName=bt;var Xa="TooltipArrow",qa=d.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=pr(r);return Nu(Xa,r).isInside?null:y.jsx(xu,{...o,...n,ref:t})});qa.displayName=Xa;function Du(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function _u(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function ju(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function Mu(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a].x,l=t[a].y,u=t[s].x,f=t[s].y;l>n!=f>n&&r<(u-i)*(n-l)/(f-l)+i&&(o=!o)}return o}function Lu(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),Iu(t)}function Iu(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 a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const a=r[r.length-1],s=r[r.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var $u=Ha,Fu=Ua,Bu=Ya,Ja=Ga,Wu=qa;const Za=$u,Qa=Fu,es=Bu,ts=Wu,fn=d.forwardRef(({className:e,sideOffset:t=4,...r},n)=>y.jsx(Ja,{ref:n,sideOffset:t,className:ve("ve-z-50 ve-overflow-hidden ve-rounded-[6px] ve-bg-popover ve-px-3 ve-py-1.5 ve-text-sm ve-text-popover-foreground",e),...r}));fn.displayName=Ja.displayName;const zu=({displayName:e,fieldId:t,children:r})=>{const{tooltipsVisible:n}=ns();let o="";return e&&t?o=`${e} (${t})`:t?o=`(${t})`:e&&(o=`${e}`),y.jsx(Za,{children:y.jsxs(Qa,{open:n&&!!o,children:[y.jsx(es,{children:y.jsx("div",{className:n?"ve-outline-2 ve-outline-dotted ve-outline-[#5A58F2]":"",children:r})}),y.jsxs(fn,{children:[y.jsx("p",{children:o}),y.jsx(ts,{fill:"bg-popover"})]})]})})},rs=E.createContext(void 0),Vu=({children:e})=>{const[t,r]=E.useState(!1),n=()=>{r(o=>!o)};return y.jsx(rs.Provider,{value:{tooltipsVisible:t,toggleTooltips:n},children:e})},ns=()=>{const e=E.useContext(rs);return e||{tooltipsVisible:!1,toggleTooltips:()=>{}}},Hu=(e,t,r,n,o,a)=>{const{dispatch:s,history:{back:i,forward:l,histories:u,index:f,hasFuture:v,setHistories:c}}=tr.usePuck();return E.useEffect(()=>{t(u,f)},[f,u,t]),y.jsxs("header",{className:"puck-header puck-css",children:[y.jsxs("div",{className:"header-left",children:[y.jsx(Yu,{}),y.jsx(Gu,{})]}),y.jsx("div",{className:"header-center"}),y.jsxs("div",{className:"actions",children:[y.jsx(Ke,{variant:"ghost",size:"icon",disabled:f===0,onClick:i,children:y.jsx(Os,{className:"sm-icon"})}),y.jsx(Ke,{variant:"ghost",size:"icon",disabled:!v,onClick:l,children:y.jsx(ks,{className:"sm-icon"})}),y.jsx(Uu,{disabled:u.length===0,onClearLocalChanges:()=>{e(),c([]),s({type:"setData",data:n})}}),!a&&y.jsx(Ke,{variant:"secondary",disabled:u.length===0,onClick:async()=>{await o(r),e()},children:"Publish"})]})]})},Uu=({disabled:e,onClearLocalChanges:t})=>{const[r,n]=E.useState(!1),o=()=>{t(),n(!1)};return y.jsxs(rc,{open:r,onOpenChange:n,children:[y.jsx(nc,{disabled:e,asChild:!0,children:y.jsx(Ke,{variant:"outline",children:"Clear Local Changes"})}),y.jsxs(ca,{className:"puck-css",children:[y.jsxs(ua,{children:[y.jsx(fa,{children:"Clear Local Changes"}),y.jsx(pa,{children:"This action will remove your local changes. It cannot be undone."})]}),y.jsxs(da,{children:[y.jsx(va,{children:"Cancel"}),y.jsx(Ke,{onClick:o,children:"Confirm"})]})]})]})},Yu=()=>{const{dispatch:e,appState:{ui:{leftSideBarVisible:t,rightSideBarVisible:r}}}=tr.usePuck(),n=E.useCallback(o=>{const a=window.matchMedia("(min-width: 638px)").matches,s=o==="left"?t:r,i=o==="left"?"rightSideBarVisible":"leftSideBarVisible";e({type:"setUi",ui:{[`${o}SideBarVisible`]:!s,...a?{}:{[i]:!1}}})},[e,t,r]);return y.jsxs(y.Fragment,{children:[y.jsx(Ke,{variant:"ghost",size:"icon",onClick:()=>{n("left")},children:y.jsx(As,{className:"sm-icon"})}),y.jsx(Ke,{variant:"ghost",size:"icon",onClick:()=>{n("right")},children:y.jsx(Ts,{className:"sm-icon"})})]})},Gu=()=>{const{toggleTooltips:e,tooltipsVisible:t}=ns();return y.jsx(Za,{children:y.jsxs(Qa,{children:[y.jsx(es,{asChild:!0,children:y.jsxs("div",{className:"ve-flex ve-flex-row ve-self-center ve-gap-3 ve-pl-2",children:[y.jsx(xa,{onCheckedChange:e}),y.jsx("p",{className:"ve-self-center ve-text-sm",children:"Entity Fields"})]})}),y.jsxs(fn,{children:[t?"Hide Entity Fields":"Show Entity Fields",y.jsx(ts,{fill:"ve-bg-popover"})]})]})})},Gn="ROLE_",Kn="TEMPLATE_",Ku="LAYOUT_",Xu="ENTITY_";function Wr(e,t,r,n,o){const a=e?"dev":"";if(!t||!r||!o&&!n)throw new Error("Unable to generate local storage key, missing query parameters");if(t===Md.INDIVIDUAL){if(!o)throw new Error(`EntityId required for role ${t}`);return a+Gn+t+Kn+r+Xu+o}if(!n)throw new Error(`LayoutId required for role ${t}`);return a+Gn+t+Kn+r+Ku+n}const qu=({puckConfig:e,puckInitialHistory:t,isLoading:r,clearHistory:n,templateMetadata:o,saveState:a,saveSaveState:s,saveVisualConfigData:i,sendDevSaveStateData:l,visualConfigurationData:u,buildLocalStorageKey:f})=>{const[v,c]=E.useState(!1),h=E.useRef(-1),m=E.useCallback((w,S)=>{var R;S!==-1&&h.current!==S&&w.length>0&&(h.current=S,window.localStorage.setItem(f(),JSON.stringify(w)),(a==null?void 0:a.hash)!==w[S].id&&(o.isDevMode&&!o.devOverride?l({payload:{devSaveStateData:JSON.stringify((R=w[S].data)==null?void 0:R.data)}}):s({payload:{hash:w[S].id,history:JSON.stringify(w[S].data)}})))},[o,Wr,a]),g=()=>{n(),h.current=-1},b=async w=>{i({payload:{visualConfigurationData:JSON.stringify(w)}})},x=async()=>{if(!r&&!v){c(!0);return}};return y.jsx(Vu,{children:y.jsx(tr.Puck,{config:e,data:t.histories[t.index].data.data??{root:{},content:[],zones:{}},initialHistory:t,onChange:x,overrides:{header:()=>{const{appState:w}=tr.usePuck();return Hu(g,m,w.data,u,b,o.isDevMode&&!o.devOverride)}}})})};var pn="Progress",vn=100,[Ju,Vd]=wt(pn),[Zu,Qu]=Ju(pn),os=d.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:o,getValueLabel:a=ed,...s}=e;(o||o===0)&&!Xn(o)&&console.error(td(`${o}`,"Progress"));const i=Xn(o)?o:vn;n!==null&&!qn(n,i)&&console.error(rd(`${n}`,"Progress"));const l=qn(n,i)?n:null,u=ir(l)?a(l,i):void 0;return y.jsx(Zu,{scope:r,value:l,max:i,children:y.jsx(se.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":ir(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":is(l,i),"data-value":l??void 0,"data-max":i,...s,ref:t})})});os.displayName=pn;var as="ProgressIndicator",ss=d.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,o=Qu(as,r);return y.jsx(se.div,{"data-state":is(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...n,ref:t})});ss.displayName=as;function ed(e,t){return`${Math.round(e/t*100)}%`}function is(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function ir(e){return typeof e=="number"}function Xn(e){return ir(e)&&!isNaN(e)&&e>0}function qn(e,t){return ir(e)&&!isNaN(e)&&e<=t&&e>=0}function td(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${vn}\`.`}function rd(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
121
121
  - a positive number
122
122
  - less than the value passed to \`max\` (or ${vn} if no \`max\` prop is set)
123
123
  - \`null\` or \`undefined\` if the progress is indeterminate.
124
124
 
125
- Defaulting to \`null\`.`}var ls=os,nd=ss;const cs=d.forwardRef(({className:e,value:t,...r},n)=>y.jsx(ls,{ref:n,className:ve("ve-relative ve-h-4 ve-w-full ve-overflow-hidden ve-rounded-full ve-bg-secondary",e),...r,children:y.jsx(nd,{className:"ve-h-full ve-w-full ve-flex-1 ve-bg-primary ve-transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));cs.displayName=ls.displayName;function od({progress:e}){return y.jsxs("div",{className:"ve-flex ve-h-screen ve-loading-wrapper ve-w-screen ve-flex-col ve-items-center ve-justify-center puck-css",children:[y.jsx(cs,{className:"ve-w-1/3 ve-loading-progress",value:e}),y.jsx("div",{children:"Loading Visual Editor..."})]})}var Jn=["light","dark"],ad="(prefers-color-scheme: dark)",sd=d.createContext(void 0),id={setTheme:e=>{},themes:[]},ld=()=>{var e;return(e=d.useContext(sd))!=null?e:id};d.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:o,defaultTheme:a,value:s,attrs:i,nonce:l})=>{let u=a==="system",f=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${i.map(g=>`'${g}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,v=o?Jn.includes(a)&&a?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${a}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",c=(g,h=!1,b=!0)=>{let w=s?s[g]:g,x=h?g+"|| ''":`'${w}'`,S="";return o&&b&&!h&&Jn.includes(g)&&(S+=`d.style.colorScheme = '${g}';`),r==="class"?h||w?S+=`c.add(${x})`:S+="null":w&&(S+=`d[s](n,${x})`),S},m=e?`!function(){${f}${c(e)}}()`:n?`!function(){try{${f}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${ad}',m=window.matchMedia(t);if(m.media!==t||m.matches){${c("dark")}}else{${c("light")}}}else if(e){${s?`var x=${JSON.stringify(s)};`:""}${c(s?"x[e]":"e",!0)}}${u?"":"else{"+c(a,!1,!1)+"}"}${v}}catch(e){}}()`:`!function(){try{${f}var e=localStorage.getItem('${t}');if(e){${s?`var x=${JSON.stringify(s)};`:""}${c(s?"x[e]":"e",!0)}}else{${c(a,!1,!1)};}${v}}catch(t){}}();`;return d.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:m}})});var cd=e=>{switch(e){case"success":return fd;case"info":return vd;case"warning":return pd;case"error":return gd;default:return null}},ud=Array(12).fill(0),dd=({visible:e})=>E.createElement("div",{className:"sonner-loading-wrapper","data-visible":e},E.createElement("div",{className:"sonner-spinner"},ud.map((t,r)=>E.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),fd=E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},E.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),pd=E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},E.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),vd=E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},E.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),gd=E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},E.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),hd=()=>{let[e,t]=E.useState(document.hidden);return E.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},zr=1,md=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:zr++,a=this.toasts.find(i=>i.id===o),s=e.dismissible===void 0?!0:e.dismissible;return a?this.toasts=this.toasts.map(i=>i.id===o?(this.publish({...i,...e,id:o,title:r}),{...i,...e,id:o,dismissible:s,title:r}):i):this.addToast({title:r,...n,dismissible:s,id:o}),o},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),o=r!==void 0;return n.then(async a=>{if(bd(a)&&!a.ok){o=!1;let s=typeof t.error=="function"?await t.error(`HTTP error! status: ${a.status}`):t.error,i=typeof t.description=="function"?await t.description(`HTTP error! status: ${a.status}`):t.description;this.create({id:r,type:"error",message:s,description:i})}else if(t.success!==void 0){o=!1;let s=typeof t.success=="function"?await t.success(a):t.success,i=typeof t.description=="function"?await t.description(a):t.description;this.create({id:r,type:"success",message:s,description:i})}}).catch(async a=>{if(t.error!==void 0){o=!1;let s=typeof t.error=="function"?await t.error(a):t.error,i=typeof t.description=="function"?await t.description(a):t.description;this.create({id:r,type:"error",message:s,description:i})}}).finally(()=>{var a;o&&(this.dismiss(r),r=void 0),(a=t.finally)==null||a.call(t)}),r},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||zr++;return this.create({jsx:e(r),id:r,...t}),r},this.subscribers=[],this.toasts=[]}},ye=new md,yd=(e,t)=>{let r=(t==null?void 0:t.id)||zr++;return ye.addToast({title:e,...t,id:r}),r},bd=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",wd=yd,xd=()=>ye.toasts;Object.assign(wd,{success:ye.success,info:ye.info,warning:ye.warning,error:ye.error,custom:ye.custom,message:ye.message,promise:ye.promise,dismiss:ye.dismiss,loading:ye.loading},{getHistory:xd});function Ed(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}Ed(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
126
- `);function Kt(e){return e.label!==void 0}var Cd=3,Sd="32px",Rd=4e3,Pd=356,Ad=14,Td=20,Od=200;function kd(...e){return e.filter(Boolean).join(" ")}var Nd=e=>{var t,r,n,o,a,s,i,l,u,f;let{invert:v,toast:c,unstyled:m,interacting:g,setHeights:h,visibleToasts:b,heights:w,index:x,toasts:S,expanded:R,removeToast:P,defaultRichColors:N,closeButton:k,style:B,cancelButtonStyle:U,actionButtonStyle:G,className:X="",descriptionClassName:_="",duration:W,position:$,gap:V,loadingIcon:D,expandByDefault:O,classNames:A,icons:j,closeButtonAriaLabel:ae="Close toast",pauseWhenPageIsHidden:F,cn:H}=e,[Z,ue]=E.useState(!1),[Se,ee]=E.useState(!1),[Te,he]=E.useState(!1),[xe,me]=E.useState(!1),[st,je]=E.useState(0),[Me,Qe]=E.useState(0),Ie=E.useRef(null),de=E.useRef(null),it=x===0,lt=x+1<=b,re=c.type,Ve=c.dismissible!==!1,mr=c.className||"",Rt=c.descriptionClassName||"",ct=E.useMemo(()=>w.findIndex(I=>I.toastId===c.id)||0,[w,c.id]),yr=E.useMemo(()=>{var I;return(I=c.closeButton)!=null?I:k},[c.closeButton,k]),Pt=E.useMemo(()=>c.duration||W||Rd,[c.duration,W]),ut=E.useRef(0),Ee=E.useRef(0),Ft=E.useRef(0),Le=E.useRef(null),[At,Tt]=$.split("-"),Bt=E.useMemo(()=>w.reduce((I,K,J)=>J>=ct?I:I+K.height,0),[w,ct]),Wt=hd(),br=c.invert||v,Ot=re==="loading";Ee.current=E.useMemo(()=>ct*V+Bt,[ct,Bt]),E.useEffect(()=>{ue(!0)},[]),E.useLayoutEffect(()=>{if(!Z)return;let I=de.current,K=I.style.height;I.style.height="auto";let J=I.getBoundingClientRect().height;I.style.height=K,Qe(J),h(ie=>ie.find(fe=>fe.toastId===c.id)?ie.map(fe=>fe.toastId===c.id?{...fe,height:J}:fe):[{toastId:c.id,height:J,position:c.position},...ie])},[Z,c.title,c.description,h,c.id]);let Oe=E.useCallback(()=>{ee(!0),je(Ee.current),h(I=>I.filter(K=>K.toastId!==c.id)),setTimeout(()=>{P(c)},Od)},[c,P,h,Ee]);E.useEffect(()=>{if(c.promise&&re==="loading"||c.duration===1/0||c.type==="loading")return;let I,K=Pt;return R||g||F&&Wt?(()=>{if(Ft.current<ut.current){let J=new Date().getTime()-ut.current;K=K-J}Ft.current=new Date().getTime()})():K!==1/0&&(ut.current=new Date().getTime(),I=setTimeout(()=>{var J;(J=c.onAutoClose)==null||J.call(c,c),Oe()},K)),()=>clearTimeout(I)},[R,g,O,c,Pt,Oe,c.promise,re,F,Wt]),E.useEffect(()=>{let I=de.current;if(I){let K=I.getBoundingClientRect().height;return Qe(K),h(J=>[{toastId:c.id,height:K,position:c.position},...J]),()=>h(J=>J.filter(ie=>ie.toastId!==c.id))}},[h,c.id]),E.useEffect(()=>{c.delete&&Oe()},[Oe,c.delete]);function wr(){return j!=null&&j.loading?E.createElement("div",{className:"sonner-loader","data-visible":re==="loading"},j.loading):D?E.createElement("div",{className:"sonner-loader","data-visible":re==="loading"},D):E.createElement(dd,{visible:re==="loading"})}return E.createElement("li",{"aria-live":c.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:de,className:H(X,mr,A==null?void 0:A.toast,(t=c==null?void 0:c.classNames)==null?void 0:t.toast,A==null?void 0:A.default,A==null?void 0:A[re],(r=c==null?void 0:c.classNames)==null?void 0:r[re]),"data-sonner-toast":"","data-rich-colors":(n=c.richColors)!=null?n:N,"data-styled":!(c.jsx||c.unstyled||m),"data-mounted":Z,"data-promise":!!c.promise,"data-removed":Se,"data-visible":lt,"data-y-position":At,"data-x-position":Tt,"data-index":x,"data-front":it,"data-swiping":Te,"data-dismissible":Ve,"data-type":re,"data-invert":br,"data-swipe-out":xe,"data-expanded":!!(R||O&&Z),style:{"--index":x,"--toasts-before":x,"--z-index":S.length-x,"--offset":`${Se?st:Ee.current}px`,"--initial-height":O?"auto":`${Me}px`,...B,...c.style},onPointerDown:I=>{Ot||!Ve||(Ie.current=new Date,je(Ee.current),I.target.setPointerCapture(I.pointerId),I.target.tagName!=="BUTTON"&&(he(!0),Le.current={x:I.clientX,y:I.clientY}))},onPointerUp:()=>{var I,K,J,ie;if(xe||!Ve)return;Le.current=null;let fe=Number(((I=de.current)==null?void 0:I.style.getPropertyValue("--swipe-amount").replace("px",""))||0),He=new Date().getTime()-((K=Ie.current)==null?void 0:K.getTime()),zt=Math.abs(fe)/He;if(Math.abs(fe)>=Td||zt>.11){je(Ee.current),(J=c.onDismiss)==null||J.call(c,c),Oe(),me(!0);return}(ie=de.current)==null||ie.style.setProperty("--swipe-amount","0px"),he(!1)},onPointerMove:I=>{var K;if(!Le.current||!Ve)return;let J=I.clientY-Le.current.y,ie=I.clientX-Le.current.x,fe=(At==="top"?Math.min:Math.max)(0,J),He=I.pointerType==="touch"?10:2;Math.abs(fe)>He?(K=de.current)==null||K.style.setProperty("--swipe-amount",`${J}px`):Math.abs(ie)>He&&(Le.current=null)}},yr&&!c.jsx?E.createElement("button",{"aria-label":ae,"data-disabled":Ot,"data-close-button":!0,onClick:Ot||!Ve?()=>{}:()=>{var I;Oe(),(I=c.onDismiss)==null||I.call(c,c)},className:H(A==null?void 0:A.closeButton,(o=c==null?void 0:c.classNames)==null?void 0:o.closeButton)},E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},E.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),E.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,c.jsx||E.isValidElement(c.title)?c.jsx||c.title:E.createElement(E.Fragment,null,re||c.icon||c.promise?E.createElement("div",{"data-icon":"",className:H(A==null?void 0:A.icon,(a=c==null?void 0:c.classNames)==null?void 0:a.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||wr():null,c.type!=="loading"?c.icon||(j==null?void 0:j[re])||cd(re):null):null,E.createElement("div",{"data-content":"",className:H(A==null?void 0:A.content,(s=c==null?void 0:c.classNames)==null?void 0:s.content)},E.createElement("div",{"data-title":"",className:H(A==null?void 0:A.title,(i=c==null?void 0:c.classNames)==null?void 0:i.title)},c.title),c.description?E.createElement("div",{"data-description":"",className:H(_,Rt,A==null?void 0:A.description,(l=c==null?void 0:c.classNames)==null?void 0:l.description)},c.description):null),E.isValidElement(c.cancel)?c.cancel:c.cancel&&Kt(c.cancel)?E.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||U,onClick:I=>{var K,J;Kt(c.cancel)&&Ve&&((J=(K=c.cancel).onClick)==null||J.call(K,I),Oe())},className:H(A==null?void 0:A.cancelButton,(u=c==null?void 0:c.classNames)==null?void 0:u.cancelButton)},c.cancel.label):null,E.isValidElement(c.action)?c.action:c.action&&Kt(c.action)?E.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||G,onClick:I=>{var K,J;Kt(c.action)&&(I.defaultPrevented||((J=(K=c.action).onClick)==null||J.call(K,I),Oe()))},className:H(A==null?void 0:A.actionButton,(f=c==null?void 0:c.classNames)==null?void 0:f.actionButton)},c.action.label):null))};function Zn(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var Dd=e=>{let{invert:t,position:r="bottom-right",hotkey:n=["altKey","KeyT"],expand:o,closeButton:a,className:s,offset:i,theme:l="light",richColors:u,duration:f,style:v,visibleToasts:c=Cd,toastOptions:m,dir:g=Zn(),gap:h=Ad,loadingIcon:b,icons:w,containerAriaLabel:x="Notifications",pauseWhenPageIsHidden:S,cn:R=kd}=e,[P,N]=E.useState([]),k=E.useMemo(()=>Array.from(new Set([r].concat(P.filter(F=>F.position).map(F=>F.position)))),[P,r]),[B,U]=E.useState([]),[G,X]=E.useState(!1),[_,W]=E.useState(!1),[$,V]=E.useState(l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),D=E.useRef(null),O=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),A=E.useRef(null),j=E.useRef(!1),ae=E.useCallback(F=>{var H;(H=P.find(Z=>Z.id===F.id))!=null&&H.delete||ye.dismiss(F.id),N(Z=>Z.filter(({id:ue})=>ue!==F.id))},[P]);return E.useEffect(()=>ye.subscribe(F=>{if(F.dismiss){N(H=>H.map(Z=>Z.id===F.id?{...Z,delete:!0}:Z));return}setTimeout(()=>{Hr.flushSync(()=>{N(H=>{let Z=H.findIndex(ue=>ue.id===F.id);return Z!==-1?[...H.slice(0,Z),{...H[Z],...F},...H.slice(Z+1)]:[F,...H]})})})}),[]),E.useEffect(()=>{if(l!=="system"){V(l);return}l==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:F})=>{V(F?"dark":"light")})},[l]),E.useEffect(()=>{P.length<=1&&X(!1)},[P]),E.useEffect(()=>{let F=H=>{var Z,ue;n.every(Se=>H[Se]||H.code===Se)&&(X(!0),(Z=D.current)==null||Z.focus()),H.code==="Escape"&&(document.activeElement===D.current||(ue=D.current)!=null&&ue.contains(document.activeElement))&&X(!1)};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[n]),E.useEffect(()=>{if(D.current)return()=>{A.current&&(A.current.focus({preventScroll:!0}),A.current=null,j.current=!1)}},[D.current]),P.length?E.createElement("section",{"aria-label":`${x} ${O}`,tabIndex:-1},k.map((F,H)=>{var Z;let[ue,Se]=F.split("-");return E.createElement("ol",{key:F,dir:g==="auto"?Zn():g,tabIndex:-1,ref:D,className:s,"data-sonner-toaster":!0,"data-theme":$,"data-y-position":ue,"data-x-position":Se,style:{"--front-toast-height":`${((Z=B[0])==null?void 0:Z.height)||0}px`,"--offset":typeof i=="number"?`${i}px`:i||Sd,"--width":`${Pd}px`,"--gap":`${h}px`,...v},onBlur:ee=>{j.current&&!ee.currentTarget.contains(ee.relatedTarget)&&(j.current=!1,A.current&&(A.current.focus({preventScroll:!0}),A.current=null))},onFocus:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||j.current||(j.current=!0,A.current=ee.relatedTarget)},onMouseEnter:()=>X(!0),onMouseMove:()=>X(!0),onMouseLeave:()=>{_||X(!1)},onPointerDown:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||W(!0)},onPointerUp:()=>W(!1)},P.filter(ee=>!ee.position&&H===0||ee.position===F).map((ee,Te)=>{var he,xe;return E.createElement(Nd,{key:ee.id,icons:w,index:Te,toast:ee,defaultRichColors:u,duration:(he=m==null?void 0:m.duration)!=null?he:f,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:t,visibleToasts:c,closeButton:(xe=m==null?void 0:m.closeButton)!=null?xe:a,interacting:_,position:F,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:ae,toasts:P.filter(me=>me.position==ee.position),heights:B.filter(me=>me.position==ee.position),setHeights:U,expandByDefault:o,gap:h,loadingIcon:b,expanded:G,pauseWhenPageIsHidden:S,cn:R})}))})):null};const _d=({...e})=>{const{theme:t="system"}=ld();return y.jsx(Dd,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:ve-bg-background group-[.toaster]:ve-text-foreground group-[.toaster]:ve-border-border group-[.toaster]:ve-shadow-lg",description:"group-[.toast]:ve-text-muted-foreground",actionButton:"group-[.toast]:ve-bg-primary group-[.toast]:ve-text-primary-foreground",cancelButton:"group-[.toast]:ve-bg-muted group-[.toast]:ve-text-muted-foreground"}},...e})},us=(e,t,r="*")=>t==null?void 0:t.postMessage(e,{targetOrigin:r}),gt=(e,t)=>{const[r,n]=E.useState("pending");return ds(e,t,jd(n)),{sendToParent:a=>{if(!window.parent)throw new Error("Parent window has closed");n("pending");for(const s of t)us({...a,type:e},window.parent,s)},status:r}},tr=(e,t,r)=>{ds(e,t,(o,a,s)=>{const{type:i,payload:l}=o;i===e&&typeof r=="function"&&r(u=>us({...u,type:e},s,a),l)})},ds=(e,t,r)=>{const[n,o]=E.useState(),[a,s]=E.useState(),i=E.useRef(),l=E.useRef();i.current=n,l.current=a;const u=E.useCallback(({origin:f,source:v,data:c})=>{var g;if((g=c.source)!=null&&g.startsWith("react-devtools"))return;if(!t.includes(f))throw new Error("Unrecognized origin");const{type:m}=c;m===e&&(s(v),o(f),r(c,f,v))},[e,t,s,o,r]);E.useEffect(()=>(window.addEventListener("message",u),()=>window.removeEventListener("message",u)),[e,a,n,u])},jd=e=>(t,r,n)=>{const{status:o}=t;o==="success"?e("success"):o==="error"&&e("error")},Md={GLOBAL:"global",INDIVIDUAL:"individual"},ke=["http://localhost","https://dev.yext.com","https://qa.yext.com","https://sandbox.yext.com","https://www.yext.com","https://app-qa.eu.yext.com","https://app.eu.yext.com"],Id=({document:e,puckConfigs:t})=>{const[r,n]=E.useState({histories:[],index:-1}),[o,a]=E.useState(),[s,i]=E.useState(!1),[l,u]=E.useState(),[f,v]=E.useState(!1),[c,m]=E.useState(void 0),[g,h]=E.useState(),[b,w]=E.useState(),[x,S]=E.useState(!1);E.useEffect(()=>{if(typeof window<"u"){const D=window.location.ancestorOrigins;D.length===0||!D[0].includes("pagescdn")&&!D[0].includes("yext.com")?window.location.assign("/404.html"):S(!0)}},[]),tr("getTemplateMetadata",ke,(D,O)=>{const A=t.get(O.templateId);w(A),h(O),D({status:"success",payload:{message:"payload received"}})}),E.useEffect(()=>{if(g!=null&&g.isDevMode)try{m(pageSets)}catch{console.warn("pageSets are not defined")}},[g==null?void 0:g.isDevMode]);const R=(D,O,A,j,ae)=>{window.localStorage.removeItem(tt(D,O,A,j,ae))},P=(D,O,A,j,ae)=>{R(D,O,A,j,ae),_()},N=E.useRef(!0);E.useEffect(()=>{if(N.current){N.current=!1;return}k()},[g,l,o]);const k=E.useCallback(()=>{if(!s||!f||!g)return;if(g.isDevMode){const A=window.localStorage.getItem(tt(g.isDevMode,g.role,g.templateId,g.layoutId,g.entityId));if(A){const j=JSON.parse(A),ae=j.length-1;n({histories:j,index:ae});return}n({histories:o?[{id:"root",data:{data:o}}]:[],index:o?0:-1});return}if(!l){R(g.isDevMode,g.role,g.templateId,g.layoutId,g.entityId),n({histories:o?[{id:"root",data:{data:o}}]:[],index:o?0:-1});return}const D=window.localStorage.getItem(tt(g.isDevMode,g.role,g.templateId,g.layoutId,g.entityId));if(!D){n({histories:o?[{id:"root",data:{data:o}},kr(l.history).data]:[kr(l.history).data],index:o?1:0});return}const O=JSON.parse(D).findIndex(A=>A.id===(l==null?void 0:l.hash));if(O!==-1){n({histories:JSON.parse(D),index:O});return}R(g.isDevMode,g.role,g.templateId,g.layoutId,g.entityId)},[n,R,tt]),{sendToParent:B}=gt("iFrameLoaded",ke),{sendToParent:U}=gt("sendDevSaveStateData",ke);E.useEffect(()=>{B({payload:{message:"iFrame is loaded"}})},[]),E.useEffect(()=>{var D;if(g!=null&&g.isDevMode){const O=window.localStorage.getItem(tt(g.isDevMode,g.role,g.templateId,g.layoutId,g.entityId)),A=O?JSON.parse(O):[],j=JSON.stringify(A.length>0?(D=A[A.length-1].data)==null?void 0:D.data:{});U({payload:{devSaveStateData:j}})}},[g]),tr("getSaveState",ke,(D,O)=>{u(O),v(!0),D({status:"success",payload:{message:"saveState received"}})}),tr("getVisualConfigurationData",ke,(D,O)=>{a(kr(O.visualConfigurationData)),i(!0),D({status:"success",payload:{message:"getVisualConfigurationData received"}})});const{sendToParent:G}=gt("pushPageSets",ke);E.useEffect(()=>{typeof window<"u"&&(g!=null&&g.isDevMode)&&c&&G({payload:c})},[g==null?void 0:g.isDevMode,c]);const{sendToParent:X}=gt("saveSaveState",ke),{sendToParent:_}=gt("deleteSaveState",ke),{sendToParent:W}=gt("saveVisualConfigData",ke),$=!b||!g||!e||!f||!s,V=100*(!!b+!!g+!!e+f+s)/6;return y.jsxs(y.Fragment,{children:[$?x&&y.jsx(od,{progress:V}):y.jsx(Ku,{puckConfig:b,isLoading:$,puckInitialHistory:r,clearHistory:g!=null&&g.isDevMode?R:P,templateMetadata:g,saveState:l,saveSaveState:X,saveVisualConfigData:W,sendDevSaveStateData:U,visualConfigurationData:o}),y.jsx(_d,{closeButton:!0,richColors:!0})]})},kr=e=>JSON.parse(e.replace(/\\"/g,'"')),Ld=()=>{const[e,t]=E.useState();return tr("getEntityDocument",ke,(r,n)=>{t(n),r({status:"success",payload:{message:"getEntityDocument received"}})}),e},Vr=JSON.stringify({root:{},content:[],zones:{}});function $d(e,t){var i,l,u;if(!t)throw new Error("Unable to parse puck data, template name must be defined in config.");const{document:r}=e,n=r.c_visualConfigurations??[],o=r.c_pages_layouts??[],a=(i=r._site)==null?void 0:i.c_visualLayouts;for(const f of n)if(f.template===t){const v=JSON.parse(Nr(f.data,t));return{...e,document:{...r,visualTemplate:v}}}for(const f of o)if(((l=f.c_visualConfiguration)==null?void 0:l.template)===t){const v=JSON.parse(Nr(f.c_visualConfiguration.data,t));return{...e,document:{...r,visualTemplate:v}}}for(const f of a)if(((u=f.c_visualConfiguration)==null?void 0:u.template)===t){const v=JSON.parse(Nr(f.c_visualConfiguration.data,t));return{...e,document:{...r,visualTemplate:v}}}console.warn(`Unable to find puck data for template: ${t}`);const s=JSON.parse(Vr);return{...e,document:{...r,visualTemplate:s}}}function Nr(e,t){if(!e||e.length<1)return console.warn(`Missing visual editor data for template: ${t}`),Vr;try{JSON.parse(e)}catch{return console.warn(`Invalid visual editor data for template: ${t}`),Vr}return e}exports.Editor=Id;exports.EntityField=zu;exports.resolveVisualEditorData=$d;exports.useDocumentProvider=Ld;
125
+ Defaulting to \`null\`.`}var ls=os,nd=ss;const cs=d.forwardRef(({className:e,value:t,...r},n)=>y.jsx(ls,{ref:n,className:ve("ve-relative ve-h-4 ve-w-full ve-overflow-hidden ve-rounded-full ve-bg-secondary",e),...r,children:y.jsx(nd,{className:"ve-h-full ve-w-full ve-flex-1 ve-bg-primary ve-transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));cs.displayName=ls.displayName;function od({progress:e}){return y.jsxs("div",{className:"ve-flex ve-h-screen ve-loading-wrapper ve-w-screen ve-flex-col ve-items-center ve-justify-center puck-css",children:[y.jsx(cs,{className:"ve-w-1/3 ve-loading-progress",value:e}),y.jsx("div",{children:"Loading Visual Editor..."})]})}var Jn=["light","dark"],ad="(prefers-color-scheme: dark)",sd=d.createContext(void 0),id={setTheme:e=>{},themes:[]},ld=()=>{var e;return(e=d.useContext(sd))!=null?e:id};d.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:o,defaultTheme:a,value:s,attrs:i,nonce:l})=>{let u=a==="system",f=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${i.map(m=>`'${m}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,v=o?Jn.includes(a)&&a?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${a}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",c=(m,g=!1,b=!0)=>{let x=s?s[m]:m,w=g?m+"|| ''":`'${x}'`,S="";return o&&b&&!g&&Jn.includes(m)&&(S+=`d.style.colorScheme = '${m}';`),r==="class"?g||x?S+=`c.add(${w})`:S+="null":x&&(S+=`d[s](n,${w})`),S},h=e?`!function(){${f}${c(e)}}()`:n?`!function(){try{${f}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${ad}',m=window.matchMedia(t);if(m.media!==t||m.matches){${c("dark")}}else{${c("light")}}}else if(e){${s?`var x=${JSON.stringify(s)};`:""}${c(s?"x[e]":"e",!0)}}${u?"":"else{"+c(a,!1,!1)+"}"}${v}}catch(e){}}()`:`!function(){try{${f}var e=localStorage.getItem('${t}');if(e){${s?`var x=${JSON.stringify(s)};`:""}${c(s?"x[e]":"e",!0)}}else{${c(a,!1,!1)};}${v}}catch(t){}}();`;return d.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})});var cd=e=>{switch(e){case"success":return fd;case"info":return vd;case"warning":return pd;case"error":return gd;default:return null}},ud=Array(12).fill(0),dd=({visible:e})=>E.createElement("div",{className:"sonner-loading-wrapper","data-visible":e},E.createElement("div",{className:"sonner-spinner"},ud.map((t,r)=>E.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),fd=E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},E.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),pd=E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},E.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),vd=E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},E.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),gd=E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},E.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),hd=()=>{let[e,t]=E.useState(document.hidden);return E.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},zr=1,md=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:zr++,a=this.toasts.find(i=>i.id===o),s=e.dismissible===void 0?!0:e.dismissible;return a?this.toasts=this.toasts.map(i=>i.id===o?(this.publish({...i,...e,id:o,title:r}),{...i,...e,id:o,dismissible:s,title:r}):i):this.addToast({title:r,...n,dismissible:s,id:o}),o},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),o=r!==void 0;return n.then(async a=>{if(bd(a)&&!a.ok){o=!1;let s=typeof t.error=="function"?await t.error(`HTTP error! status: ${a.status}`):t.error,i=typeof t.description=="function"?await t.description(`HTTP error! status: ${a.status}`):t.description;this.create({id:r,type:"error",message:s,description:i})}else if(t.success!==void 0){o=!1;let s=typeof t.success=="function"?await t.success(a):t.success,i=typeof t.description=="function"?await t.description(a):t.description;this.create({id:r,type:"success",message:s,description:i})}}).catch(async a=>{if(t.error!==void 0){o=!1;let s=typeof t.error=="function"?await t.error(a):t.error,i=typeof t.description=="function"?await t.description(a):t.description;this.create({id:r,type:"error",message:s,description:i})}}).finally(()=>{var a;o&&(this.dismiss(r),r=void 0),(a=t.finally)==null||a.call(t)}),r},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||zr++;return this.create({jsx:e(r),id:r,...t}),r},this.subscribers=[],this.toasts=[]}},ye=new md,yd=(e,t)=>{let r=(t==null?void 0:t.id)||zr++;return ye.addToast({title:e,...t,id:r}),r},bd=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",wd=yd,xd=()=>ye.toasts;Object.assign(wd,{success:ye.success,info:ye.info,warning:ye.warning,error:ye.error,custom:ye.custom,message:ye.message,promise:ye.promise,dismiss:ye.dismiss,loading:ye.loading},{getHistory:xd});function Ed(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}Ed(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
126
+ `);function Xt(e){return e.label!==void 0}var Cd=3,Sd="32px",Rd=4e3,Pd=356,Ad=14,Td=20,Od=200;function kd(...e){return e.filter(Boolean).join(" ")}var Nd=e=>{var t,r,n,o,a,s,i,l,u,f;let{invert:v,toast:c,unstyled:h,interacting:m,setHeights:g,visibleToasts:b,heights:x,index:w,toasts:S,expanded:R,removeToast:P,defaultRichColors:N,closeButton:O,style:B,cancelButtonStyle:G,actionButtonStyle:U,className:K="",descriptionClassName:_="",duration:W,position:F,gap:V,loadingIcon:H,expandByDefault:j,classNames:k,icons:T,closeButtonAriaLabel:ee="Close toast",pauseWhenPageIsHidden:D,cn:$}=e,[X,ue]=E.useState(!1),[Se,te]=E.useState(!1),[Oe,he]=E.useState(!1),[xe,me]=E.useState(!1),[st,je]=E.useState(0),[Me,Qe]=E.useState(0),Le=E.useRef(null),de=E.useRef(null),it=w===0,lt=w+1<=b,ne=c.type,Ve=c.dismissible!==!1,hr=c.className||"",St=c.descriptionClassName||"",ct=E.useMemo(()=>x.findIndex(L=>L.toastId===c.id)||0,[x,c.id]),mr=E.useMemo(()=>{var L;return(L=c.closeButton)!=null?L:O},[c.closeButton,O]),Rt=E.useMemo(()=>c.duration||W||Rd,[c.duration,W]),ut=E.useRef(0),Ee=E.useRef(0),$t=E.useRef(0),Ie=E.useRef(null),[Pt,At]=F.split("-"),Ft=E.useMemo(()=>x.reduce((L,J,Z)=>Z>=ct?L:L+J.height,0),[x,ct]),Bt=hd(),yr=c.invert||v,Tt=ne==="loading";Ee.current=E.useMemo(()=>ct*V+Ft,[ct,Ft]),E.useEffect(()=>{ue(!0)},[]),E.useLayoutEffect(()=>{if(!X)return;let L=de.current,J=L.style.height;L.style.height="auto";let Z=L.getBoundingClientRect().height;L.style.height=J,Qe(Z),g(ie=>ie.find(fe=>fe.toastId===c.id)?ie.map(fe=>fe.toastId===c.id?{...fe,height:Z}:fe):[{toastId:c.id,height:Z,position:c.position},...ie])},[X,c.title,c.description,g,c.id]);let ke=E.useCallback(()=>{te(!0),je(Ee.current),g(L=>L.filter(J=>J.toastId!==c.id)),setTimeout(()=>{P(c)},Od)},[c,P,g,Ee]);E.useEffect(()=>{if(c.promise&&ne==="loading"||c.duration===1/0||c.type==="loading")return;let L,J=Rt;return R||m||D&&Bt?(()=>{if($t.current<ut.current){let Z=new Date().getTime()-ut.current;J=J-Z}$t.current=new Date().getTime()})():J!==1/0&&(ut.current=new Date().getTime(),L=setTimeout(()=>{var Z;(Z=c.onAutoClose)==null||Z.call(c,c),ke()},J)),()=>clearTimeout(L)},[R,m,j,c,Rt,ke,c.promise,ne,D,Bt]),E.useEffect(()=>{let L=de.current;if(L){let J=L.getBoundingClientRect().height;return Qe(J),g(Z=>[{toastId:c.id,height:J,position:c.position},...Z]),()=>g(Z=>Z.filter(ie=>ie.toastId!==c.id))}},[g,c.id]),E.useEffect(()=>{c.delete&&ke()},[ke,c.delete]);function br(){return T!=null&&T.loading?E.createElement("div",{className:"sonner-loader","data-visible":ne==="loading"},T.loading):H?E.createElement("div",{className:"sonner-loader","data-visible":ne==="loading"},H):E.createElement(dd,{visible:ne==="loading"})}return E.createElement("li",{"aria-live":c.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:de,className:$(K,hr,k==null?void 0:k.toast,(t=c==null?void 0:c.classNames)==null?void 0:t.toast,k==null?void 0:k.default,k==null?void 0:k[ne],(r=c==null?void 0:c.classNames)==null?void 0:r[ne]),"data-sonner-toast":"","data-rich-colors":(n=c.richColors)!=null?n:N,"data-styled":!(c.jsx||c.unstyled||h),"data-mounted":X,"data-promise":!!c.promise,"data-removed":Se,"data-visible":lt,"data-y-position":Pt,"data-x-position":At,"data-index":w,"data-front":it,"data-swiping":Oe,"data-dismissible":Ve,"data-type":ne,"data-invert":yr,"data-swipe-out":xe,"data-expanded":!!(R||j&&X),style:{"--index":w,"--toasts-before":w,"--z-index":S.length-w,"--offset":`${Se?st:Ee.current}px`,"--initial-height":j?"auto":`${Me}px`,...B,...c.style},onPointerDown:L=>{Tt||!Ve||(Le.current=new Date,je(Ee.current),L.target.setPointerCapture(L.pointerId),L.target.tagName!=="BUTTON"&&(he(!0),Ie.current={x:L.clientX,y:L.clientY}))},onPointerUp:()=>{var L,J,Z,ie;if(xe||!Ve)return;Ie.current=null;let fe=Number(((L=de.current)==null?void 0:L.style.getPropertyValue("--swipe-amount").replace("px",""))||0),He=new Date().getTime()-((J=Le.current)==null?void 0:J.getTime()),Wt=Math.abs(fe)/He;if(Math.abs(fe)>=Td||Wt>.11){je(Ee.current),(Z=c.onDismiss)==null||Z.call(c,c),ke(),me(!0);return}(ie=de.current)==null||ie.style.setProperty("--swipe-amount","0px"),he(!1)},onPointerMove:L=>{var J;if(!Ie.current||!Ve)return;let Z=L.clientY-Ie.current.y,ie=L.clientX-Ie.current.x,fe=(Pt==="top"?Math.min:Math.max)(0,Z),He=L.pointerType==="touch"?10:2;Math.abs(fe)>He?(J=de.current)==null||J.style.setProperty("--swipe-amount",`${Z}px`):Math.abs(ie)>He&&(Ie.current=null)}},mr&&!c.jsx?E.createElement("button",{"aria-label":ee,"data-disabled":Tt,"data-close-button":!0,onClick:Tt||!Ve?()=>{}:()=>{var L;ke(),(L=c.onDismiss)==null||L.call(c,c)},className:$(k==null?void 0:k.closeButton,(o=c==null?void 0:c.classNames)==null?void 0:o.closeButton)},E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},E.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),E.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,c.jsx||E.isValidElement(c.title)?c.jsx||c.title:E.createElement(E.Fragment,null,ne||c.icon||c.promise?E.createElement("div",{"data-icon":"",className:$(k==null?void 0:k.icon,(a=c==null?void 0:c.classNames)==null?void 0:a.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||br():null,c.type!=="loading"?c.icon||(T==null?void 0:T[ne])||cd(ne):null):null,E.createElement("div",{"data-content":"",className:$(k==null?void 0:k.content,(s=c==null?void 0:c.classNames)==null?void 0:s.content)},E.createElement("div",{"data-title":"",className:$(k==null?void 0:k.title,(i=c==null?void 0:c.classNames)==null?void 0:i.title)},c.title),c.description?E.createElement("div",{"data-description":"",className:$(_,St,k==null?void 0:k.description,(l=c==null?void 0:c.classNames)==null?void 0:l.description)},c.description):null),E.isValidElement(c.cancel)?c.cancel:c.cancel&&Xt(c.cancel)?E.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||G,onClick:L=>{var J,Z;Xt(c.cancel)&&Ve&&((Z=(J=c.cancel).onClick)==null||Z.call(J,L),ke())},className:$(k==null?void 0:k.cancelButton,(u=c==null?void 0:c.classNames)==null?void 0:u.cancelButton)},c.cancel.label):null,E.isValidElement(c.action)?c.action:c.action&&Xt(c.action)?E.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||U,onClick:L=>{var J,Z;Xt(c.action)&&(L.defaultPrevented||((Z=(J=c.action).onClick)==null||Z.call(J,L),ke()))},className:$(k==null?void 0:k.actionButton,(f=c==null?void 0:c.classNames)==null?void 0:f.actionButton)},c.action.label):null))};function Zn(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var Dd=e=>{let{invert:t,position:r="bottom-right",hotkey:n=["altKey","KeyT"],expand:o,closeButton:a,className:s,offset:i,theme:l="light",richColors:u,duration:f,style:v,visibleToasts:c=Cd,toastOptions:h,dir:m=Zn(),gap:g=Ad,loadingIcon:b,icons:x,containerAriaLabel:w="Notifications",pauseWhenPageIsHidden:S,cn:R=kd}=e,[P,N]=E.useState([]),O=E.useMemo(()=>Array.from(new Set([r].concat(P.filter(D=>D.position).map(D=>D.position)))),[P,r]),[B,G]=E.useState([]),[U,K]=E.useState(!1),[_,W]=E.useState(!1),[F,V]=E.useState(l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),H=E.useRef(null),j=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),k=E.useRef(null),T=E.useRef(!1),ee=E.useCallback(D=>{var $;($=P.find(X=>X.id===D.id))!=null&&$.delete||ye.dismiss(D.id),N(X=>X.filter(({id:ue})=>ue!==D.id))},[P]);return E.useEffect(()=>ye.subscribe(D=>{if(D.dismiss){N($=>$.map(X=>X.id===D.id?{...X,delete:!0}:X));return}setTimeout(()=>{Hr.flushSync(()=>{N($=>{let X=$.findIndex(ue=>ue.id===D.id);return X!==-1?[...$.slice(0,X),{...$[X],...D},...$.slice(X+1)]:[D,...$]})})})}),[]),E.useEffect(()=>{if(l!=="system"){V(l);return}l==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:D})=>{V(D?"dark":"light")})},[l]),E.useEffect(()=>{P.length<=1&&K(!1)},[P]),E.useEffect(()=>{let D=$=>{var X,ue;n.every(Se=>$[Se]||$.code===Se)&&(K(!0),(X=H.current)==null||X.focus()),$.code==="Escape"&&(document.activeElement===H.current||(ue=H.current)!=null&&ue.contains(document.activeElement))&&K(!1)};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[n]),E.useEffect(()=>{if(H.current)return()=>{k.current&&(k.current.focus({preventScroll:!0}),k.current=null,T.current=!1)}},[H.current]),P.length?E.createElement("section",{"aria-label":`${w} ${j}`,tabIndex:-1},O.map((D,$)=>{var X;let[ue,Se]=D.split("-");return E.createElement("ol",{key:D,dir:m==="auto"?Zn():m,tabIndex:-1,ref:H,className:s,"data-sonner-toaster":!0,"data-theme":F,"data-y-position":ue,"data-x-position":Se,style:{"--front-toast-height":`${((X=B[0])==null?void 0:X.height)||0}px`,"--offset":typeof i=="number"?`${i}px`:i||Sd,"--width":`${Pd}px`,"--gap":`${g}px`,...v},onBlur:te=>{T.current&&!te.currentTarget.contains(te.relatedTarget)&&(T.current=!1,k.current&&(k.current.focus({preventScroll:!0}),k.current=null))},onFocus:te=>{te.target instanceof HTMLElement&&te.target.dataset.dismissible==="false"||T.current||(T.current=!0,k.current=te.relatedTarget)},onMouseEnter:()=>K(!0),onMouseMove:()=>K(!0),onMouseLeave:()=>{_||K(!1)},onPointerDown:te=>{te.target instanceof HTMLElement&&te.target.dataset.dismissible==="false"||W(!0)},onPointerUp:()=>W(!1)},P.filter(te=>!te.position&&$===0||te.position===D).map((te,Oe)=>{var he,xe;return E.createElement(Nd,{key:te.id,icons:x,index:Oe,toast:te,defaultRichColors:u,duration:(he=h==null?void 0:h.duration)!=null?he:f,className:h==null?void 0:h.className,descriptionClassName:h==null?void 0:h.descriptionClassName,invert:t,visibleToasts:c,closeButton:(xe=h==null?void 0:h.closeButton)!=null?xe:a,interacting:_,position:D,style:h==null?void 0:h.style,unstyled:h==null?void 0:h.unstyled,classNames:h==null?void 0:h.classNames,cancelButtonStyle:h==null?void 0:h.cancelButtonStyle,actionButtonStyle:h==null?void 0:h.actionButtonStyle,removeToast:ee,toasts:P.filter(me=>me.position==te.position),heights:B.filter(me=>me.position==te.position),setHeights:G,expandByDefault:o,gap:g,loadingIcon:b,expanded:U,pauseWhenPageIsHidden:S,cn:R})}))})):null};const _d=({...e})=>{const{theme:t="system"}=ld();return y.jsx(Dd,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:ve-bg-background group-[.toaster]:ve-text-foreground group-[.toaster]:ve-border-border group-[.toaster]:ve-shadow-lg",description:"group-[.toast]:ve-text-muted-foreground",actionButton:"group-[.toast]:ve-bg-primary group-[.toast]:ve-text-primary-foreground",cancelButton:"group-[.toast]:ve-bg-muted group-[.toast]:ve-text-muted-foreground"}},...e})},us=(e,t,r="*")=>t==null?void 0:t.postMessage(e,{targetOrigin:r}),tt=(e,t)=>{const[r,n]=E.useState("pending");return ds(e,t,jd(n)),{sendToParent:a=>{if(!window.parent)throw new Error("Parent window has closed");n("pending");for(const s of t)us({...a,type:e},window.parent,s)},status:r}},er=(e,t,r)=>{ds(e,t,(o,a,s)=>{const{type:i,payload:l}=o;i===e&&typeof r=="function"&&r(u=>us({...u,type:e},s,a),l)})},ds=(e,t,r)=>{const[n,o]=E.useState(),[a,s]=E.useState(),i=E.useRef(),l=E.useRef();i.current=n,l.current=a;const u=E.useCallback(({origin:f,source:v,data:c})=>{var m;if((m=c.source)!=null&&m.startsWith("react-devtools"))return;if(!t.includes(f))throw new Error("Unrecognized origin");const{type:h}=c;h===e&&(s(v),o(f),r(c,f,v))},[e,t,s,o,r]);E.useEffect(()=>(window.addEventListener("message",u),()=>window.removeEventListener("message",u)),[e,a,n,u])},jd=e=>(t,r,n)=>{const{status:o}=t;o==="success"?e("success"):o==="error"&&e("error")},Md={GLOBAL:"global",INDIVIDUAL:"individual"},Re=["http://localhost","https://dev.yext.com","https://qa.yext.com","https://sandbox.yext.com","https://www.yext.com","https://app-qa.eu.yext.com","https://app.eu.yext.com"],Ld=({document:e,componentRegistry:t})=>{const[r,n]=E.useState({histories:[],index:-1}),[o,a]=E.useState(),[s,i]=E.useState(!1),[l,u]=E.useState(),[f,v]=E.useState(!1),[c,h]=E.useState(void 0),[m,g]=E.useState(),[b,x]=E.useState(),[w,S]=E.useState(!1),R=E.useCallback(()=>m?Wr(m.isDevMode&&!m.devOverride,m.role,m.templateId,m.layoutId,m.entityId):"",[m]);E.useEffect(()=>{if(typeof window<"u"){const T=window.location.ancestorOrigins;T.length===0||!T[0].includes("pagescdn")&&!T[0].includes("yext.com")&&!T[0].includes("localhost")?window.location.assign("/404.html"):S(!0)}},[]),er("getTemplateMetadata",Re,(T,ee)=>{const D=t.get(ee.templateId);x(D),g(ee),T({status:"success",payload:{message:"payload received"}})}),E.useEffect(()=>{if(m!=null&&m.isDevMode)try{h(pageSets)}catch{console.warn("pageSets are not defined")}},[m==null?void 0:m.isDevMode]);const P=()=>{window.localStorage.removeItem(R())},N=()=>{P(),W()},O=E.useRef(!0);E.useEffect(()=>{if(O.current){O.current=!1;return}B()},[m,l,o]);const B=E.useCallback(()=>{if(!s||!f||!m)return;if(m.isDevMode&&!m.devOverride){const D=window.localStorage.getItem(R());if(D){const $=JSON.parse(D),X=$.length-1;n({histories:$,index:X});return}n({histories:o?[{id:"root",data:{data:o}}]:[],index:o?0:-1});return}if(!l){P(),n({histories:o?[{id:"root",data:{data:o}}]:[],index:o?0:-1});return}const T=window.localStorage.getItem(R());if(!T){n({histories:o?[{id:"root",data:{data:o}},{id:l.hash,data:Or(l.history)}]:[{id:l.hash,data:Or(l.history)}],index:o?1:0});return}const ee=JSON.parse(T).findIndex(D=>D.id===(l==null?void 0:l.hash));if(ee!==-1){n({histories:JSON.parse(T),index:ee});return}P()},[n,P,Wr]),{sendToParent:G}=tt("iFrameLoaded",Re),{sendToParent:U}=tt("sendDevSaveStateData",Re);E.useEffect(()=>{G({payload:{message:"iFrame is loaded"}})},[]),E.useEffect(()=>{var T;if(m!=null&&m.isDevMode){const ee=window.localStorage.getItem(R()),D=ee?JSON.parse(ee):[],$=JSON.stringify(D.length>0?(T=D[D.length-1].data)==null?void 0:T.data:{});U({payload:{devSaveStateData:$}})}},[m]),er("getSaveState",Re,(T,ee)=>{u(ee),v(!0),T({status:"success",payload:{message:"saveState received"}})}),er("getVisualConfigurationData",Re,(T,ee)=>{a(Or(ee.visualConfigurationData)),i(!0),T({status:"success",payload:{message:"getVisualConfigurationData received"}})});const{sendToParent:K}=tt("pushPageSets",Re);E.useEffect(()=>{typeof window<"u"&&(m!=null&&m.isDevMode)&&c&&K({payload:c})},[m==null?void 0:m.isDevMode,c]);const{sendToParent:_}=tt("saveSaveState",Re),{sendToParent:W}=tt("deleteSaveState",Re),{sendToParent:F}=tt("saveVisualConfigData",Re),{sendToParent:V}=tt("openQuickFind",Re),H=T=>{(T.ctrlKey||T.metaKey)&&T.key==="k"&&V()};E.useEffect(()=>(window.addEventListener("keydown",H),()=>{window.removeEventListener("keydown",H)}),[]);const j=!b||!m||!e||!f||!s,k=100*(!!b+!!m+!!e+f+s)/6;return y.jsxs(y.Fragment,{children:[j?w&&y.jsx(od,{progress:k}):y.jsx(qu,{puckConfig:b,isLoading:j,puckInitialHistory:r,clearHistory:m.isDevMode&&!m.devOverride?P:N,templateMetadata:m,saveState:l,saveSaveState:_,saveVisualConfigData:F,sendDevSaveStateData:U,visualConfigurationData:o,buildLocalStorageKey:R}),y.jsx(_d,{closeButton:!0,richColors:!0})]})},Or=e=>JSON.parse(e.replace(/\\"/g,'"')),Id=()=>{const[e,t]=E.useState();return er("getEntityDocument",Re,(r,n)=>{t(n),r({status:"success",payload:{message:"getEntityDocument received"}})}),e},Vr=JSON.stringify({root:{},content:[],zones:{}});function $d(e,t){var i,l,u;if(!t)throw new Error("Unable to parse puck data, template name must be defined in config.");const{document:r}=e,n=r.c_visualConfigurations??[],o=r.c_pages_layouts??[],a=(i=r._site)==null?void 0:i.c_visualLayouts;for(const f of n)if(f.template===t){const v=JSON.parse(kr(f.data,t));return{...e,document:{...r,visualTemplate:v}}}for(const f of o)if(((l=f.c_visualConfiguration)==null?void 0:l.template)===t){const v=JSON.parse(kr(f.c_visualConfiguration.data,t));return{...e,document:{...r,visualTemplate:v}}}if(a){for(const f of a)if(((u=f.c_visualConfiguration)==null?void 0:u.template)===t){const v=JSON.parse(kr(f.c_visualConfiguration.data,t));return{...e,document:{...r,visualTemplate:v}}}}console.warn(`Unable to find puck data for template: ${t}`);const s=JSON.parse(Vr);return{...e,document:{...r,visualTemplate:s}}}function kr(e,t){if(!e||e.length<1)return console.warn(`Missing visual editor data for template: ${t}`),Vr;try{JSON.parse(e)}catch{return console.warn(`Invalid visual editor data for template: ${t}`),Vr}return e}exports.Editor=Ld;exports.EntityField=zu;exports.resolveVisualEditorData=$d;exports.useDocumentProvider=Id;