@yext/visual-editor 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/index.d.cts +86 -60
- package/dist/index.d.ts +86 -60
- package/dist/style.css +1 -1
- package/dist/visual-editor.cjs +55 -47
- package/dist/visual-editor.js +4190 -3363
- package/package.json +6 -2
package/dist/visual-editor.cjs
CHANGED
|
@@ -1,123 +1,131 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
|
|
3
|
-
(c) Sindre Sorhus
|
|
4
|
-
@license MIT
|
|
5
|
-
*/var wr,wn;function to(){if(wn)return wr;wn=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function o(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var s={},i=0;i<10;i++)s["_"+String.fromCharCode(i)]=i;var c=Object.getOwnPropertyNames(s).map(function(u){return s[u]});if(c.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(u){d[u]=u}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return wr=o()?Object.assign:function(a,s){for(var i,c=n(a),d,u=1;u<arguments.length;u++){i=Object(arguments[u]);for(var g in i)t.call(i,g)&&(c[g]=i[g]);if(e){d=e(i);for(var l=0;l<d.length;l++)r.call(i,d[l])&&(c[d[l]]=i[d[l]])}}return c},wr}/** @license React v17.0.2
|
|
1
|
+
"use strict";var hi=Object.defineProperty;var yi=(e,t,n)=>t in e?hi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var _t=(e,t,n)=>yi(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),Be=require("@measured/puck"),ir=require("react-dom");function Eo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const d=Eo(E),cr=Eo(ir);var Vn={exports:{}},jt={};/**
|
|
2
|
+
* @license React
|
|
6
3
|
* react-jsx-runtime.production.min.js
|
|
7
4
|
*
|
|
8
5
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
9
6
|
*
|
|
10
7
|
* This source code is licensed under the MIT license found in the
|
|
11
8
|
* LICENSE file in the root directory of this source tree.
|
|
12
|
-
*/var
|
|
9
|
+
*/var Vr;function bi(){if(Vr)return jt;Vr=1;var e=E,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=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,c,u){var f,p={},l=null,g=null;u!==void 0&&(l=""+u),c.key!==void 0&&(l=""+c.key),c.ref!==void 0&&(g=c.ref);for(f in c)r.call(c,f)&&!a.hasOwnProperty(f)&&(p[f]=c[f]);if(i&&i.defaultProps)for(f in c=i.defaultProps,c)p[f]===void 0&&(p[f]=c[f]);return{$$typeof:t,type:i,key:l,ref:g,props:p,_owner:o.current}}return jt.Fragment=n,jt.jsx=s,jt.jsxs=s,jt}var Mt={};/**
|
|
10
|
+
* @license React
|
|
13
11
|
* react-jsx-runtime.development.js
|
|
14
12
|
*
|
|
15
13
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
16
14
|
*
|
|
17
15
|
* This source code is licensed under the MIT license found in the
|
|
18
16
|
* LICENSE file in the root directory of this source tree.
|
|
19
|
-
*/var
|
|
20
|
-
`+
|
|
21
|
-
`),
|
|
22
|
-
`),
|
|
23
|
-
`+
|
|
17
|
+
*/var zr;function xi(){return zr||(zr=1,process.env.NODE_ENV!=="production"&&function(){var e=E,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=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"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),l=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),y=Symbol.iterator,h="@@iterator";function b(m){if(m===null||typeof m!="object")return null;var S=y&&m[y]||m[h];return typeof S=="function"?S:null}var x=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(m){{for(var S=arguments.length,T=new Array(S>1?S-1:0),j=1;j<S;j++)T[j-1]=arguments[j];C("error",m,T)}}function C(m,S,T){{var j=x.ReactDebugCurrentFrame,Z=j.getStackAddendum();Z!==""&&(S+="%s",T=T.concat([Z]));var te=T.map(function(K){return String(K)});te.unshift("Warning: "+S),Function.prototype.apply.call(console[m],console,te)}}var P=!1,R=!1,D=!1,A=!1,O=!1,$;$=Symbol.for("react.module.reference");function M(m){return!!(typeof m=="string"||typeof m=="function"||m===r||m===a||O||m===o||m===u||m===f||A||m===g||P||R||D||typeof m=="object"&&m!==null&&(m.$$typeof===l||m.$$typeof===p||m.$$typeof===s||m.$$typeof===i||m.$$typeof===c||m.$$typeof===$||m.getModuleId!==void 0))}function z(m,S,T){var j=m.displayName;if(j)return j;var Z=S.displayName||S.name||"";return Z!==""?T+"("+Z+")":T}function k(m){return m.displayName||"Context"}function I(m){if(m==null)return null;if(typeof m.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof m=="function")return m.displayName||m.name||null;if(typeof m=="string")return m;switch(m){case r:return"Fragment";case n:return"Portal";case a:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if(typeof m=="object")switch(m.$$typeof){case i:var S=m;return k(S)+".Consumer";case s:var T=m;return k(T._context)+".Provider";case c:return z(m,m.render,"ForwardRef");case p:var j=m.displayName||null;return j!==null?j:I(m.type)||"Memo";case l:{var Z=m,te=Z._payload,K=Z._init;try{return I(K(te))}catch{return null}}}return null}var B=Object.assign,q=0,_,X,N,U,se,L,H;function J(){}J.__reactDisabledLog=!0;function G(){{if(q===0){_=console.log,X=console.info,N=console.warn,U=console.error,se=console.group,L=console.groupCollapsed,H=console.groupEnd;var m={configurable:!0,enumerable:!0,value:J,writable:!0};Object.defineProperties(console,{info:m,log:m,warn:m,error:m,group:m,groupCollapsed:m,groupEnd:m})}q++}}function ne(){{if(q--,q===0){var m={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:B({},m,{value:_}),info:B({},m,{value:X}),warn:B({},m,{value:N}),error:B({},m,{value:U}),group:B({},m,{value:se}),groupCollapsed:B({},m,{value:L}),groupEnd:B({},m,{value:H})})}q<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var V=x.ReactCurrentDispatcher,fe;function me(m,S,T){{if(fe===void 0)try{throw Error()}catch(Z){var j=Z.stack.trim().match(/\n( *(at )?)/);fe=j&&j[1]||""}return`
|
|
18
|
+
`+fe+m}}var Re=!1,xe;{var ut=typeof WeakMap=="function"?WeakMap:Map;xe=new ut}function Me(m,S){if(!m||Re)return"";{var T=xe.get(m);if(T!==void 0)return T}var j;Re=!0;var Z=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var te;te=V.current,V.current=null,G();try{if(S){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(be){j=be}Reflect.construct(m,[],K)}else{try{K.call()}catch(be){j=be}m.call(K.prototype)}}else{try{throw Error()}catch(be){j=be}m()}}catch(be){if(be&&j&&typeof be.stack=="string"){for(var Y=be.stack.split(`
|
|
19
|
+
`),ge=j.stack.split(`
|
|
20
|
+
`),ce=Y.length-1,le=ge.length-1;ce>=1&&le>=0&&Y[ce]!==ge[le];)le--;for(;ce>=1&&le>=0;ce--,le--)if(Y[ce]!==ge[le]){if(ce!==1||le!==1)do if(ce--,le--,le<0||Y[ce]!==ge[le]){var Ae=`
|
|
21
|
+
`+Y[ce].replace(" at new "," at ");return m.displayName&&Ae.includes("<anonymous>")&&(Ae=Ae.replace("<anonymous>",m.displayName)),typeof m=="function"&&xe.set(m,Ae),Ae}while(ce>=1&&le>=0);break}}}finally{Re=!1,V.current=te,ne(),Error.prepareStackTrace=Z}var mt=m?m.displayName||m.name:"",ot=mt?me(mt):"";return typeof m=="function"&&xe.set(m,ot),ot}function Ie(m,S,T){return Me(m,!1)}function rt(m){var S=m.prototype;return!!(S&&S.isReactComponent)}function Le(m,S,T){if(m==null)return"";if(typeof m=="function")return Me(m,rt(m));if(typeof m=="string")return me(m);switch(m){case u:return me("Suspense");case f:return me("SuspenseList")}if(typeof m=="object")switch(m.$$typeof){case c:return Ie(m.render);case p:return Le(m.type,S,T);case l:{var j=m,Z=j._payload,te=j._init;try{return Le(te(Z),S,T)}catch{}}}return""}var he=Object.prototype.hasOwnProperty,dt={},ft=x.ReactDebugCurrentFrame;function ie(m){if(m){var S=m._owner,T=Le(m.type,m._source,S?S.type:null);ft.setExtraStackFrame(T)}else ft.setExtraStackFrame(null)}function Ge(m,S,T,j,Z){{var te=Function.call.bind(he);for(var K in m)if(te(m,K)){var Y=void 0;try{if(typeof m[K]!="function"){var ge=Error((j||"React class")+": "+T+" type `"+K+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof m[K]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ge.name="Invariant Violation",ge}Y=m[K](S,K,j,T,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ce){Y=ce}Y&&!(Y instanceof Error)&&(ie(Z),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).",j||"React class",T,K,typeof Y),ie(null)),Y instanceof Error&&!(Y.message in dt)&&(dt[Y.message]=!0,ie(Z),w("Failed %s type: %s",T,Y.message),ie(null))}}}var Rn=Array.isArray;function Tt(m){return Rn(m)}function pt(m){{var S=typeof Symbol=="function"&&Symbol.toStringTag,T=S&&m[Symbol.toStringTag]||m.constructor.name||"Object";return T}}function Pn(m){try{return Nt(m),!1}catch{return!0}}function Nt(m){return""+m}function vt(m){if(Pn(m))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",pt(m)),Nt(m)}var Pe=x.ReactCurrentOwner,Ht={key:!0,ref:!0,__self:!0,__source:!0},Fe,Ot,Dt;Dt={};function Gt(m){if(he.call(m,"ref")){var S=Object.getOwnPropertyDescriptor(m,"ref").get;if(S&&S.isReactWarning)return!1}return m.ref!==void 0}function Yt(m){if(he.call(m,"key")){var S=Object.getOwnPropertyDescriptor(m,"key").get;if(S&&S.isReactWarning)return!1}return m.key!==void 0}function An(m,S){if(typeof m.ref=="string"&&Pe.current&&S&&Pe.current.stateNode!==S){var T=I(Pe.current.type);Dt[T]||(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',I(Pe.current.type),m.ref),Dt[T]=!0)}}function kt(m,S){{var T=function(){Fe||(Fe=!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)",S))};T.isReactWarning=!0,Object.defineProperty(m,"key",{get:T,configurable:!0})}}function De(m,S){{var T=function(){Ot||(Ot=!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)",S))};T.isReactWarning=!0,Object.defineProperty(m,"ref",{get:T,configurable:!0})}}var Tn=function(m,S,T,j,Z,te,K){var Y={$$typeof:t,type:m,key:S,ref:T,props:K,_owner:te};return Y._store={},Object.defineProperty(Y._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Y,"_self",{configurable:!1,enumerable:!1,writable:!1,value:j}),Object.defineProperty(Y,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Z}),Object.freeze&&(Object.freeze(Y.props),Object.freeze(Y)),Y};function F(m,S,T,j,Z){{var te,K={},Y=null,ge=null;T!==void 0&&(vt(T),Y=""+T),Yt(S)&&(vt(S.key),Y=""+S.key),Gt(S)&&(ge=S.ref,An(S,Z));for(te in S)he.call(S,te)&&!Ht.hasOwnProperty(te)&&(K[te]=S[te]);if(m&&m.defaultProps){var ce=m.defaultProps;for(te in ce)K[te]===void 0&&(K[te]=ce[te])}if(Y||ge){var le=typeof m=="function"?m.displayName||m.name||"Unknown":m;Y&&kt(K,le),ge&&De(K,le)}return Tn(m,Y,ge,Z,j,Pe.current,K)}}var Q=x.ReactCurrentOwner,ee=x.ReactDebugCurrentFrame;function pe(m){if(m){var S=m._owner,T=Le(m.type,m._source,S?S.type:null);ee.setExtraStackFrame(T)}else ee.setExtraStackFrame(null)}var ye;ye=!1;function Ye(m){return typeof m=="object"&&m!==null&&m.$$typeof===t}function Kt(){{if(Q.current){var m=I(Q.current.type);if(m)return`
|
|
24
22
|
|
|
25
|
-
Check the render method of \``+
|
|
23
|
+
Check the render method of \``+m+"`."}return""}}function ii(m){return""}var Lr={};function ci(m){{var S=Kt();if(!S){var T=typeof m=="string"?m:m.displayName||m.name;T&&(S=`
|
|
26
24
|
|
|
27
|
-
Check the top-level render call using <`+T+">.")}return S}}function
|
|
25
|
+
Check the top-level render call using <`+T+">.")}return S}}function Fr(m,S){{if(!m._store||m._store.validated||m.key!=null)return;m._store.validated=!0;var T=ci(S);if(Lr[T])return;Lr[T]=!0;var j="";m&&m._owner&&m._owner!==Q.current&&(j=" It was passed a child from "+I(m._owner.type)+"."),pe(m),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',T,j),pe(null)}}function $r(m,S){{if(typeof m!="object")return;if(Tt(m))for(var T=0;T<m.length;T++){var j=m[T];Ye(j)&&Fr(j,S)}else if(Ye(m))m._store&&(m._store.validated=!0);else if(m){var Z=b(m);if(typeof Z=="function"&&Z!==m.entries)for(var te=Z.call(m),K;!(K=te.next()).done;)Ye(K.value)&&Fr(K.value,S)}}}function li(m){{var S=m.type;if(S==null||typeof S=="string")return;var T;if(typeof S=="function")T=S.propTypes;else if(typeof S=="object"&&(S.$$typeof===c||S.$$typeof===p))T=S.propTypes;else return;if(T){var j=I(S);Ge(T,m.props,"prop",j,m)}else if(S.PropTypes!==void 0&&!ye){ye=!0;var Z=I(S);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Z||"Unknown")}typeof S.getDefaultProps=="function"&&!S.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ui(m){{for(var S=Object.keys(m.props),T=0;T<S.length;T++){var j=S[T];if(j!=="children"&&j!=="key"){pe(m),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",j),pe(null);break}}m.ref!==null&&(pe(m),w("Invalid attribute `ref` supplied to `React.Fragment`."),pe(null))}}var Br={};function Wr(m,S,T,j,Z,te){{var K=M(m);if(!K){var Y="";(m===void 0||typeof m=="object"&&m!==null&&Object.keys(m).length===0)&&(Y+=" 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 ge=ii();ge?Y+=ge:Y+=Kt();var ce;m===null?ce="null":Tt(m)?ce="array":m!==void 0&&m.$$typeof===t?(ce="<"+(I(m.type)||"Unknown")+" />",Y=" Did you accidentally export a JSX literal instead of a component?"):ce=typeof m,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ce,Y)}var le=F(m,S,T,Z,te);if(le==null)return le;if(K){var Ae=S.children;if(Ae!==void 0)if(j)if(Tt(Ae)){for(var mt=0;mt<Ae.length;mt++)$r(Ae[mt],m);Object.freeze&&Object.freeze(Ae)}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 $r(Ae,m)}if(he.call(S,"key")){var ot=I(m),be=Object.keys(S).filter(function(gi){return gi!=="key"}),Nn=be.length>0?"{key: someKey, "+be.join(": ..., ")+": ...}":"{key: someKey}";if(!Br[ot+Nn]){var mi=be.length>0?"{"+be.join(": ..., ")+": ...}":"{}";w(`A props object containing a "key" prop is being spread into JSX:
|
|
26
|
+
let props = %s;
|
|
27
|
+
<%s {...props} />
|
|
28
|
+
React keys must be passed directly to JSX without using spread:
|
|
29
|
+
let props = %s;
|
|
30
|
+
<%s key={someKey} {...props} />`,Nn,ot,mi,ot),Br[ot+Nn]=!0}}return m===r?ui(le):li(le),le}}function di(m,S,T){return Wr(m,S,T,!0)}function fi(m,S,T){return Wr(m,S,T,!1)}var pi=fi,vi=di;Mt.Fragment=r,Mt.jsx=pi,Mt.jsxs=vi}()),Mt}process.env.NODE_ENV==="production"?Vn.exports=bi():Vn.exports=xi();var v=Vn.exports;/**
|
|
28
31
|
* @license lucide-react v0.414.0 - ISC
|
|
29
32
|
*
|
|
30
33
|
* This source code is licensed under the ISC license.
|
|
31
34
|
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/const
|
|
35
|
+
*/const wi=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Co=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
|
|
33
36
|
* @license lucide-react v0.414.0 - ISC
|
|
34
37
|
*
|
|
35
38
|
* This source code is licensed under the ISC license.
|
|
36
39
|
* See the LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/var
|
|
40
|
+
*/var Ei={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
38
41
|
* @license lucide-react v0.414.0 - ISC
|
|
39
42
|
*
|
|
40
43
|
* This source code is licensed under the ISC license.
|
|
41
44
|
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/const
|
|
45
|
+
*/const Ci=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:s,...i},c)=>E.createElement("svg",{ref:c,...Ei,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Co("lucide",o),...i},[...s.map(([u,f])=>E.createElement(u,f)),...Array.isArray(a)?a:[a]]));/**
|
|
43
46
|
* @license lucide-react v0.414.0 - ISC
|
|
44
47
|
*
|
|
45
48
|
* This source code is licensed under the ISC license.
|
|
46
49
|
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/const
|
|
50
|
+
*/const Wt=(e,t)=>{const n=E.forwardRef(({className:r,...o},a)=>E.createElement(Ci,{ref:a,iconNode:t,className:Co(`lucide-${wi(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
|
|
48
51
|
* @license lucide-react v0.414.0 - ISC
|
|
49
52
|
*
|
|
50
53
|
* This source code is licensed under the ISC license.
|
|
51
54
|
* See the LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/const
|
|
55
|
+
*/const Si=Wt("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
53
56
|
* @license lucide-react v0.414.0 - ISC
|
|
54
57
|
*
|
|
55
58
|
* This source code is licensed under the ISC license.
|
|
56
59
|
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/const
|
|
60
|
+
*/const Ri=Wt("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
|
|
58
61
|
* @license lucide-react v0.414.0 - ISC
|
|
59
62
|
*
|
|
60
63
|
* This source code is licensed under the ISC license.
|
|
61
64
|
* See the LICENSE file in the root directory of this source tree.
|
|
62
|
-
*/const
|
|
65
|
+
*/const Pi=Wt("PanelRight",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
|
|
63
66
|
* @license lucide-react v0.414.0 - ISC
|
|
64
67
|
*
|
|
65
68
|
* This source code is licensed under the ISC license.
|
|
66
69
|
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/const js=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 Ms(e,t){const r=f.createContext(t);function n(a){const{children:s,...i}=a,c=f.useMemo(()=>i,Object.values(i));return m.jsx(r.Provider,{value:c,children:s})}function o(a){const s=f.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 St(e,t=[]){let r=[];function n(a,s){const i=f.createContext(s),c=r.length;r=[...r,s];function d(g){const{scope:l,children:v,...x}=g,h=(l==null?void 0:l[e][c])||i,y=f.useMemo(()=>x,Object.values(x));return m.jsx(h.Provider,{value:y,children:v})}function u(g,l){const v=(l==null?void 0:l[e][c])||i,x=f.useContext(v);if(x)return x;if(s!==void 0)return s;throw new Error(`\`${g}\` must be used within \`${a}\``)}return d.displayName=a+"Provider",[d,u]}const o=()=>{const a=r.map(s=>f.createContext(s));return function(i){const c=(i==null?void 0:i[e])||a;return f.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[n,Ls(o,...t)]}function Ls(...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:c,scopeName:d})=>{const g=c(a)[`__scope${d}`];return{...i,...g}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function Is(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function no(...e){return t=>e.forEach(r=>Is(r,t))}function pe(...e){return f.useCallback(no(...e),e)}function ue(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 it=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},$s=f.useId||(()=>{}),Fs=0;function Qt(e){const[t,r]=f.useState($s());return it(()=>{r(n=>n??String(Fs++))},[e]),t?`radix-${t}`:""}function Je(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Xr({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=Bs({defaultProp:t,onChange:r}),a=e!==void 0,s=a?e:n,i=Je(r),c=f.useCallback(d=>{if(a){const g=typeof d=="function"?d(e):d;g!==e&&i(g)}else o(d)},[a,e,o,i]);return[s,c]}function Bs({defaultProp:e,onChange:t}){const r=f.useState(e),[n]=r,o=f.useRef(n),a=Je(t);return f.useEffect(()=>{o.current!==n&&(a(n),o.current=n)},[n,o,a]),r}var It=f.forwardRef((e,t)=>{const{children:r,...n}=e,o=f.Children.toArray(r),a=o.find(Ws);if(a){const s=a.props.children,i=o.map(c=>c===a?f.Children.count(s)>1?f.Children.only(null):f.isValidElement(s)?s.props.children:null:c);return m.jsx(Mr,{...n,ref:t,children:f.isValidElement(s)?f.cloneElement(s,void 0,i):null})}return m.jsx(Mr,{...n,ref:t,children:r})});It.displayName="Slot";var Mr=f.forwardRef((e,t)=>{const{children:r,...n}=e;if(f.isValidElement(r)){const o=Vs(r);return f.cloneElement(r,{...zs(n,r.props),ref:t?no(t,o):o})}return f.Children.count(r)>1?f.Children.only(null):null});Mr.displayName="SlotClone";var Jr=({children:e})=>m.jsx(m.Fragment,{children:e});function Ws(e){return f.isValidElement(e)&&e.type===Jr}function zs(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 Vs(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 Hs=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],le=Hs.reduce((e,t)=>{const r=f.forwardRef((n,o)=>{const{asChild:a,...s}=n,i=a?It:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(i,{...s,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Us(e,t){e&&Kr.flushSync(()=>e.dispatchEvent(t))}function Ys(e,t=globalThis==null?void 0:globalThis.document){const r=Je(e);f.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 Gs="DismissableLayer",Lr="dismissableLayer.update",qs="dismissableLayer.pointerDownOutside",Ks="dismissableLayer.focusOutside",Sn,oo=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Zr=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...c}=e,d=f.useContext(oo),[u,g]=f.useState(null),l=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=f.useState({}),x=pe(t,O=>g(O)),h=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),E=h.indexOf(y),b=u?h.indexOf(u):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,P=b>=E,R=Zs(O=>{const N=O.target,z=[...d.branches].some(H=>H.contains(N));!P||z||(o==null||o(O),s==null||s(O),O.defaultPrevented||i==null||i())},l),D=Qs(O=>{const N=O.target;[...d.branches].some(H=>H.contains(N))||(a==null||a(O),s==null||s(O),O.defaultPrevented||i==null||i())},l);return Ys(O=>{b===d.layers.size-1&&(n==null||n(O),!O.defaultPrevented&&i&&(O.preventDefault(),i()))},l),f.useEffect(()=>{if(u)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Sn=l.body.style.pointerEvents,l.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(u)),d.layers.add(u),Pn(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(l.body.style.pointerEvents=Sn)}},[u,l,r,d]),f.useEffect(()=>()=>{u&&(d.layers.delete(u),d.layersWithOutsidePointerEventsDisabled.delete(u),Pn())},[u,d]),f.useEffect(()=>{const O=()=>v({});return document.addEventListener(Lr,O),()=>document.removeEventListener(Lr,O)},[]),m.jsx(le.div,{...c,ref:x,style:{pointerEvents:C?P?"auto":"none":void 0,...e.style},onFocusCapture:ue(e.onFocusCapture,D.onFocusCapture),onBlurCapture:ue(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:ue(e.onPointerDownCapture,R.onPointerDownCapture)})});Zr.displayName=Gs;var Xs="DismissableLayerBranch",Js=f.forwardRef((e,t)=>{const r=f.useContext(oo),n=f.useRef(null),o=pe(t,n);return f.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),m.jsx(le.div,{...e,ref:o})});Js.displayName=Xs;function Zs(e,t=globalThis==null?void 0:globalThis.document){const r=Je(e),n=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const a=i=>{if(i.target&&!n.current){let c=function(){ao(qs,r,d,{discrete:!0})};const d={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}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=Je(e),n=f.useRef(!1);return f.useEffect(()=>{const o=a=>{a.target&&!n.current&&ao(Ks,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 Pn(){const e=new CustomEvent(Lr);document.dispatchEvent(e)}function ao(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?Us(o,a):o.dispatchEvent(a)}var Cr="focusScope.autoFocusOnMount",Sr="focusScope.autoFocusOnUnmount",Rn={bubbles:!1,cancelable:!0},ei="FocusScope",so=f.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,c]=f.useState(null),d=Je(o),u=Je(a),g=f.useRef(null),l=pe(t,h=>c(h)),v=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(n){let h=function(C){if(v.paused||!i)return;const P=C.target;i.contains(P)?g.current=P:Ke(g.current,{select:!0})},y=function(C){if(v.paused||!i)return;const P=C.relatedTarget;P!==null&&(i.contains(P)||Ke(g.current,{select:!0}))},E=function(C){if(document.activeElement===document.body)for(const R of C)R.removedNodes.length>0&&Ke(i)};document.addEventListener("focusin",h),document.addEventListener("focusout",y);const b=new MutationObserver(E);return i&&b.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",y),b.disconnect()}}},[n,i,v.paused]),f.useEffect(()=>{if(i){Tn.add(v);const h=document.activeElement;if(!i.contains(h)){const E=new CustomEvent(Cr,Rn);i.addEventListener(Cr,d),i.dispatchEvent(E),E.defaultPrevented||(ti(si(io(i)),{select:!0}),document.activeElement===h&&Ke(i))}return()=>{i.removeEventListener(Cr,d),setTimeout(()=>{const E=new CustomEvent(Sr,Rn);i.addEventListener(Sr,u),i.dispatchEvent(E),E.defaultPrevented||Ke(h??document.body,{select:!0}),i.removeEventListener(Sr,u),Tn.remove(v)},0)}}},[i,d,u,v]);const x=f.useCallback(h=>{if(!r&&!n||v.paused)return;const y=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,E=document.activeElement;if(y&&E){const b=h.currentTarget,[C,P]=ri(b);C&&P?!h.shiftKey&&E===P?(h.preventDefault(),r&&Ke(C,{select:!0})):h.shiftKey&&E===C&&(h.preventDefault(),r&&Ke(P,{select:!0})):E===b&&h.preventDefault()}},[r,n,v.paused]);return m.jsx(le.div,{tabIndex:-1,...s,ref:l,onKeyDown:x})});so.displayName=ei;function ti(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Ke(n,{select:t}),document.activeElement!==r)return}function ri(e){const t=io(e),r=An(t,e),n=An(t.reverse(),e);return[r,n]}function io(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 An(e,t){for(const r of e)if(!ni(r,{upTo:t}))return r}function ni(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 oi(e){return e instanceof HTMLInputElement&&"select"in e}function Ke(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&oi(e)&&t&&e.select()}}var Tn=ai();function ai(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=On(e,t),e.unshift(t)},remove(t){var r;e=On(e,t),(r=e[0])==null||r.resume()}}}function On(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function si(e){return e.filter(t=>t.tagName!=="A")}var ii="Portal",lo=f.forwardRef((e,t)=>{var i;const{container:r,...n}=e,[o,a]=f.useState(!1);it(()=>a(!0),[]);const s=r||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?qr.createPortal(m.jsx(le.div,{...n,ref:t}),s):null});lo.displayName=ii;function li(e,t){return f.useReducer((r,n)=>t[r][n]??r,e)}var $t=e=>{const{present:t,children:r}=e,n=ci(t),o=typeof r=="function"?r({present:n.isPresent}):f.Children.only(r),a=pe(n.ref,ui(o));return typeof r=="function"||n.isPresent?f.cloneElement(o,{ref:a}):null};$t.displayName="Presence";function ci(e){const[t,r]=f.useState(),n=f.useRef({}),o=f.useRef(e),a=f.useRef("none"),s=e?"mounted":"unmounted",[i,c]=li(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const d=Ut(n.current);a.current=i==="mounted"?d:"none"},[i]),it(()=>{const d=n.current,u=o.current;if(u!==e){const l=a.current,v=Ut(d);e?c("MOUNT"):v==="none"||(d==null?void 0:d.display)==="none"?c("UNMOUNT"):c(u&&l!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),it(()=>{if(t){const d=g=>{const v=Ut(n.current).includes(g.animationName);g.target===t&&v&&Kr.flushSync(()=>c("ANIMATION_END"))},u=g=>{g.target===t&&(a.current=Ut(n.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:f.useCallback(d=>{d&&(n.current=getComputedStyle(d)),r(d)},[])}}function Ut(e){return(e==null?void 0:e.animationName)||"none"}function ui(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 Pr=0;function di(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Nn()),document.body.insertAdjacentElement("beforeend",e[1]??Nn()),Pr++,()=>{Pr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Pr--}},[])}function Nn(){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 ke=function(){return ke=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},ke.apply(this,arguments)};function co(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 fi(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 er="right-scroll-bar-position",tr="width-before-scroll-bar",pi="with-scroll-bars-hidden",gi="--removed-body-scroll-bar-size";function Rr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function vi(e,t){var r=w.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 hi=typeof window<"u"?f.useLayoutEffect:f.useEffect,Dn=new WeakMap;function mi(e,t){var r=vi(null,function(n){return e.forEach(function(o){return Rr(o,n)})});return hi(function(){var n=Dn.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)})}Dn.set(r,e)},[e]),r}function bi(e){return e}function yi(e,t){t===void 0&&(t=bi);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 c=function(){var u=s;s=[],u.forEach(a)},d=function(){return Promise.resolve().then(c)};d(),r={push:function(u){s.push(u),d()},filter:function(u){return s=s.filter(u),r}}}};return o}function xi(e){e===void 0&&(e={});var t=yi(null);return t.options=ke({async:!0,ssr:!1},e),t}var uo=function(e){var t=e.sideCar,r=co(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 f.createElement(n,ke({},r))};uo.isSideCarExport=!0;function wi(e,t){return e.useMedium(t),uo}var fo=xi(),Ar=function(){},ur=f.forwardRef(function(e,t){var r=f.useRef(null),n=f.useState({onScrollCapture:Ar,onWheelCapture:Ar,onTouchMoveCapture:Ar}),o=n[0],a=n[1],s=e.forwardProps,i=e.children,c=e.className,d=e.removeScrollBar,u=e.enabled,g=e.shards,l=e.sideCar,v=e.noIsolation,x=e.inert,h=e.allowPinchZoom,y=e.as,E=y===void 0?"div":y,b=e.gapMode,C=co(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=l,R=mi([r,t]),D=ke(ke({},C),o);return f.createElement(f.Fragment,null,u&&f.createElement(P,{sideCar:fo,removeScrollBar:d,shards:g,noIsolation:v,inert:x,setCallbacks:a,allowPinchZoom:!!h,lockRef:r,gapMode:b}),s?f.cloneElement(f.Children.only(i),ke(ke({},D),{ref:R})):f.createElement(E,ke({},D,{className:c,ref:R}),i))});ur.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ur.classNames={fullWidth:tr,zeroRight:er};var Ei=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ci(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ei();return t&&e.setAttribute("nonce",t),e}function Si(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Pi(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ri=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Ci())&&(Si(t,r),Pi(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ai=function(){var e=Ri();return function(t,r){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},po=function(){var e=Ai(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Ti={left:0,top:0,right:0,gap:0},Tr=function(e){return parseInt(e||"",10)||0},Oi=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[Tr(r),Tr(n),Tr(o)]},Ni=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ti;var t=Oi(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])}},Di=po(),yt="data-scroll-locked",ki=function(e,t,r,n){var o=e.left,a=e.top,s=e.right,i=e.gap;return r===void 0&&(r="margin"),`
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
*/const Ai=Wt("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"}]]);/**
|
|
71
|
+
* @license lucide-react v0.414.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/const Ti=Wt("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 Ni(e,t){const n=d.createContext(t);function r(a){const{children:s,...i}=a,c=d.useMemo(()=>i,Object.values(i));return v.jsx(n.Provider,{value:c,children:s})}function o(a){const s=d.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",[r,o]}function nt(e,t=[]){let n=[];function r(a,s){const i=d.createContext(s),c=n.length;n=[...n,s];function u(p){const{scope:l,children:g,...y}=p,h=(l==null?void 0:l[e][c])||i,b=d.useMemo(()=>y,Object.values(y));return v.jsx(h.Provider,{value:b,children:g})}function f(p,l){const g=(l==null?void 0:l[e][c])||i,y=d.useContext(g);if(y)return y;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${a}\``)}return u.displayName=a+"Provider",[u,f]}const o=()=>{const a=n.map(s=>d.createContext(s));return function(i){const c=(i==null?void 0:i[e])||a;return d.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[r,Oi(o,...t)]}function Oi(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=r.reduce((i,{useScope:c,scopeName:u})=>{const p=c(a)[`__scope${u}`];return{...i,...p}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Di(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function So(...e){return t=>e.forEach(n=>Di(n,t))}function ue(...e){return d.useCallback(So(...e),e)}function oe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var We=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},ki=d.useId||(()=>{}),_i=0;function Ft(e){const[t,n]=d.useState(ki());return We(()=>{n(r=>r??String(_i++))},[e]),t?`radix-${t}`:""}function Ve(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Vt({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=ji({defaultProp:t,onChange:n}),a=e!==void 0,s=a?e:r,i=Ve(n),c=d.useCallback(u=>{if(a){const p=typeof u=="function"?u(e):u;p!==e&&i(p)}else o(u)},[a,e,o,i]);return[s,c]}function ji({defaultProp:e,onChange:t}){const n=d.useState(e),[r]=n,o=d.useRef(r),a=Ve(t);return d.useEffect(()=>{o.current!==r&&(a(r),o.current=r)},[r,o,a]),n}var it=d.forwardRef((e,t)=>{const{children:n,...r}=e,o=d.Children.toArray(n),a=o.find(Mi);if(a){const s=a.props.children,i=o.map(c=>c===a?d.Children.count(s)>1?d.Children.only(null):d.isValidElement(s)?s.props.children:null:c);return v.jsx(zn,{...r,ref:t,children:d.isValidElement(s)?d.cloneElement(s,void 0,i):null})}return v.jsx(zn,{...r,ref:t,children:n})});it.displayName="Slot";var zn=d.forwardRef((e,t)=>{const{children:n,...r}=e;if(d.isValidElement(n)){const o=Li(n);return d.cloneElement(n,{...Ii(r,n.props),ref:t?So(t,o):o})}return d.Children.count(n)>1?d.Children.only(null):null});zn.displayName="SlotClone";var lr=({children:e})=>v.jsx(v.Fragment,{children:e});function Mi(e){return d.isValidElement(e)&&e.type===lr}function Ii(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{a(...i),o(...i)}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Li(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Fi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ae=Fi.reduce((e,t)=>{const n=d.forwardRef((r,o)=>{const{asChild:a,...s}=r,i=a?it:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(i,{...s,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function $i(e,t){e&&cr.flushSync(()=>e.dispatchEvent(t))}function Bi(e,t=globalThis==null?void 0:globalThis.document){const n=Ve(e);d.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Wi="DismissableLayer",Un="dismissableLayer.update",Vi="dismissableLayer.pointerDownOutside",zi="dismissableLayer.focusOutside",Ur,Ro=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ur=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...c}=e,u=d.useContext(Ro),[f,p]=d.useState(null),l=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=d.useState({}),y=ue(t,A=>p(A)),h=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=h.indexOf(b),w=f?h.indexOf(f):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,P=w>=x,R=Gi(A=>{const O=A.target,$=[...u.branches].some(M=>M.contains(O));!P||$||(o==null||o(A),s==null||s(A),A.defaultPrevented||i==null||i())},l),D=Yi(A=>{const O=A.target;[...u.branches].some(M=>M.contains(O))||(a==null||a(A),s==null||s(A),A.defaultPrevented||i==null||i())},l);return Bi(A=>{w===u.layers.size-1&&(r==null||r(A),!A.defaultPrevented&&i&&(A.preventDefault(),i()))},l),d.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ur=l.body.style.pointerEvents,l.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Hr(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(l.body.style.pointerEvents=Ur)}},[f,l,n,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Hr())},[f,u]),d.useEffect(()=>{const A=()=>g({});return document.addEventListener(Un,A),()=>document.removeEventListener(Un,A)},[]),v.jsx(ae.div,{...c,ref:y,style:{pointerEvents:C?P?"auto":"none":void 0,...e.style},onFocusCapture:oe(e.onFocusCapture,D.onFocusCapture),onBlurCapture:oe(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:oe(e.onPointerDownCapture,R.onPointerDownCapture)})});ur.displayName=Wi;var Ui="DismissableLayerBranch",Hi=d.forwardRef((e,t)=>{const n=d.useContext(Ro),r=d.useRef(null),o=ue(t,r);return d.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),v.jsx(ae.div,{...e,ref:o})});Hi.displayName=Ui;function Gi(e,t=globalThis==null?void 0:globalThis.document){const n=Ve(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let c=function(){Po(Vi,n,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Yi(e,t=globalThis==null?void 0:globalThis.document){const n=Ve(e),r=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!r.current&&Po(zi,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Hr(){const e=new CustomEvent(Un);document.dispatchEvent(e)}function Po(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?$i(o,a):o.dispatchEvent(a)}var On="focusScope.autoFocusOnMount",Dn="focusScope.autoFocusOnUnmount",Gr={bubbles:!1,cancelable:!0},Ki="FocusScope",Ao=d.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,c]=d.useState(null),u=Ve(o),f=Ve(a),p=d.useRef(null),l=ue(t,h=>c(h)),g=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(r){let h=function(C){if(g.paused||!i)return;const P=C.target;i.contains(P)?p.current=P:Xe(p.current,{select:!0})},b=function(C){if(g.paused||!i)return;const P=C.relatedTarget;P!==null&&(i.contains(P)||Xe(p.current,{select:!0}))},x=function(C){if(document.activeElement===document.body)for(const R of C)R.removedNodes.length>0&&Xe(i)};document.addEventListener("focusin",h),document.addEventListener("focusout",b);const w=new MutationObserver(x);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",b),w.disconnect()}}},[r,i,g.paused]),d.useEffect(()=>{if(i){Kr.add(g);const h=document.activeElement;if(!i.contains(h)){const x=new CustomEvent(On,Gr);i.addEventListener(On,u),i.dispatchEvent(x),x.defaultPrevented||(qi(ec(To(i)),{select:!0}),document.activeElement===h&&Xe(i))}return()=>{i.removeEventListener(On,u),setTimeout(()=>{const x=new CustomEvent(Dn,Gr);i.addEventListener(Dn,f),i.dispatchEvent(x),x.defaultPrevented||Xe(h??document.body,{select:!0}),i.removeEventListener(Dn,f),Kr.remove(g)},0)}}},[i,u,f,g]);const y=d.useCallback(h=>{if(!n&&!r||g.paused)return;const b=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,x=document.activeElement;if(b&&x){const w=h.currentTarget,[C,P]=Xi(w);C&&P?!h.shiftKey&&x===P?(h.preventDefault(),n&&Xe(C,{select:!0})):h.shiftKey&&x===C&&(h.preventDefault(),n&&Xe(P,{select:!0})):x===w&&h.preventDefault()}},[n,r,g.paused]);return v.jsx(ae.div,{tabIndex:-1,...s,ref:l,onKeyDown:y})});Ao.displayName=Ki;function qi(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Xe(r,{select:t}),document.activeElement!==n)return}function Xi(e){const t=To(e),n=Yr(t,e),r=Yr(t.reverse(),e);return[n,r]}function To(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Yr(e,t){for(const n of e)if(!Ji(n,{upTo:t}))return n}function Ji(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 Zi(e){return e instanceof HTMLInputElement&&"select"in e}function Xe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Zi(e)&&t&&e.select()}}var Kr=Qi();function Qi(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=qr(e,t),e.unshift(t)},remove(t){var n;e=qr(e,t),(n=e[0])==null||n.resume()}}}function qr(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ec(e){return e.filter(t=>t.tagName!=="A")}var tc="Portal",No=d.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,a]=d.useState(!1);We(()=>a(!0),[]);const s=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?ir.createPortal(v.jsx(ae.div,{...r,ref:t}),s):null});No.displayName=tc;function nc(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}var zt=e=>{const{present:t,children:n}=e,r=rc(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),a=ue(r.ref,oc(o));return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:a}):null};zt.displayName="Presence";function rc(e){const[t,n]=d.useState(),r=d.useRef({}),o=d.useRef(e),a=d.useRef("none"),s=e?"mounted":"unmounted",[i,c]=nc(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=qt(r.current);a.current=i==="mounted"?u:"none"},[i]),We(()=>{const u=r.current,f=o.current;if(f!==e){const l=a.current,g=qt(u);e?c("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&l!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),We(()=>{if(t){const u=p=>{const g=qt(r.current).includes(p.animationName);p.target===t&&g&&cr.flushSync(()=>c("ANIMATION_END"))},f=p=>{p.target===t&&(a.current=qt(r.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 c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:d.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function qt(e){return(e==null?void 0:e.animationName)||"none"}function oc(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var kn=0;function ac(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Xr()),document.body.insertAdjacentElement("beforeend",e[1]??Xr()),kn++,()=>{kn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),kn--}},[])}function Xr(){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 ke=function(){return ke=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},ke.apply(this,arguments)};function Oo(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function sc(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var on="right-scroll-bar-position",an="width-before-scroll-bar",ic="with-scroll-bars-hidden",cc="--removed-body-scroll-bar-size";function _n(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function lc(e,t){var n=E.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var uc=typeof window<"u"?d.useLayoutEffect:d.useEffect,Jr=new WeakMap;function dc(e,t){var n=lc(null,function(r){return e.forEach(function(o){return _n(o,r)})});return uc(function(){var r=Jr.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(i){a.has(i)||_n(i,null)}),a.forEach(function(i){o.has(i)||_n(i,s)})}Jr.set(n,e)},[e]),n}function fc(e){return e}function pc(e,t){t===void 0&&(t=fc);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(i){return a(i)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var i=n;n=[],i.forEach(a),s=n}var c=function(){var f=s;s=[],f.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(f){s.push(f),u()},filter:function(f){return s=s.filter(f),n}}}};return o}function vc(e){e===void 0&&(e={});var t=pc(null);return t.options=ke({async:!0,ssr:!1},e),t}var Do=function(e){var t=e.sideCar,n=Oo(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return d.createElement(r,ke({},n))};Do.isSideCarExport=!0;function mc(e,t){return e.useMedium(t),Do}var ko=vc(),jn=function(){},vn=d.forwardRef(function(e,t){var n=d.useRef(null),r=d.useState({onScrollCapture:jn,onWheelCapture:jn,onTouchMoveCapture:jn}),o=r[0],a=r[1],s=e.forwardProps,i=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,l=e.sideCar,g=e.noIsolation,y=e.inert,h=e.allowPinchZoom,b=e.as,x=b===void 0?"div":b,w=e.gapMode,C=Oo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=l,R=dc([n,t]),D=ke(ke({},C),o);return d.createElement(d.Fragment,null,f&&d.createElement(P,{sideCar:ko,removeScrollBar:u,shards:p,noIsolation:g,inert:y,setCallbacks:a,allowPinchZoom:!!h,lockRef:n,gapMode:w}),s?d.cloneElement(d.Children.only(i),ke(ke({},D),{ref:R})):d.createElement(x,ke({},D,{className:c,ref:R}),i))});vn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};vn.classNames={fullWidth:an,zeroRight:on};var gc=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function hc(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=gc();return t&&e.setAttribute("nonce",t),e}function yc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function bc(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var xc=function(){var e=0,t=null;return{add:function(n){e==0&&(t=hc())&&(yc(t,n),bc(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},wc=function(){var e=xc();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},_o=function(){var e=wc(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Ec={left:0,top:0,right:0,gap:0},Mn=function(e){return parseInt(e||"",10)||0},Cc=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Mn(n),Mn(r),Mn(o)]},Sc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ec;var t=Cc(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Rc=_o(),bt="data-scroll-locked",Pc=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
|
|
76
|
+
.`.concat(ic,` {
|
|
77
|
+
overflow: hidden `).concat(r,`;
|
|
78
|
+
padding-right: `).concat(i,"px ").concat(r,`;
|
|
71
79
|
}
|
|
72
|
-
body[`).concat(
|
|
73
|
-
overflow: hidden `).concat(
|
|
80
|
+
body[`).concat(bt,`] {
|
|
81
|
+
overflow: hidden `).concat(r,`;
|
|
74
82
|
overscroll-behavior: contain;
|
|
75
|
-
`).concat([t&&"position: relative ".concat(
|
|
83
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
76
84
|
padding-left: `.concat(o,`px;
|
|
77
85
|
padding-top: `).concat(a,`px;
|
|
78
86
|
padding-right: `).concat(s,`px;
|
|
79
87
|
margin-left:0;
|
|
80
88
|
margin-top:0;
|
|
81
|
-
margin-right: `).concat(i,"px ").concat(
|
|
82
|
-
`),
|
|
89
|
+
margin-right: `).concat(i,"px ").concat(r,`;
|
|
90
|
+
`),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
83
91
|
}
|
|
84
92
|
|
|
85
|
-
.`).concat(
|
|
86
|
-
right: `).concat(i,"px ").concat(
|
|
93
|
+
.`).concat(on,` {
|
|
94
|
+
right: `).concat(i,"px ").concat(r,`;
|
|
87
95
|
}
|
|
88
96
|
|
|
89
|
-
.`).concat(
|
|
90
|
-
margin-right: `).concat(i,"px ").concat(
|
|
97
|
+
.`).concat(an,` {
|
|
98
|
+
margin-right: `).concat(i,"px ").concat(r,`;
|
|
91
99
|
}
|
|
92
100
|
|
|
93
|
-
.`).concat(
|
|
94
|
-
right: 0 `).concat(
|
|
101
|
+
.`).concat(on," .").concat(on,` {
|
|
102
|
+
right: 0 `).concat(r,`;
|
|
95
103
|
}
|
|
96
104
|
|
|
97
|
-
.`).concat(
|
|
98
|
-
margin-right: 0 `).concat(
|
|
105
|
+
.`).concat(an," .").concat(an,` {
|
|
106
|
+
margin-right: 0 `).concat(r,`;
|
|
99
107
|
}
|
|
100
108
|
|
|
101
|
-
body[`).concat(
|
|
102
|
-
`).concat(
|
|
109
|
+
body[`).concat(bt,`] {
|
|
110
|
+
`).concat(cc,": ").concat(i,`px;
|
|
103
111
|
}
|
|
104
|
-
`)},
|
|
112
|
+
`)},Zr=function(){var e=parseInt(document.body.getAttribute(bt)||"0",10);return isFinite(e)?e:0},Ac=function(){d.useEffect(function(){return document.body.setAttribute(bt,(Zr()+1).toString()),function(){var e=Zr()-1;e<=0?document.body.removeAttribute(bt):document.body.setAttribute(bt,e.toString())}},[])},Tc=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Ac();var a=d.useMemo(function(){return Sc(o)},[o]);return d.createElement(Rc,{styles:Pc(a,!t,o,n?"":"!important")})},Hn=!1;if(typeof window<"u")try{var Xt=Object.defineProperty({},"passive",{get:function(){return Hn=!0,!0}});window.addEventListener("test",Xt,Xt),window.removeEventListener("test",Xt,Xt)}catch{Hn=!1}var gt=Hn?{passive:!1}:!1,Nc=function(e){return e.tagName==="TEXTAREA"},jo=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Nc(e)&&n[t]==="visible")},Oc=function(e){return jo(e,"overflowY")},Dc=function(e){return jo(e,"overflowX")},Qr=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Mo(e,r);if(o){var a=Io(e,r),s=a[1],i=a[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},kc=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},_c=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Mo=function(e,t){return e==="v"?Oc(t):Dc(t)},Io=function(e,t){return e==="v"?kc(t):_c(t)},jc=function(e,t){return e==="h"&&t==="rtl"?-1:1},Mc=function(e,t,n,r,o){var a=jc(e,window.getComputedStyle(t).direction),s=a*r,i=n.target,c=t.contains(i),u=!1,f=s>0,p=0,l=0;do{var g=Io(e,i),y=g[0],h=g[1],b=g[2],x=h-b-a*y;(y||x)&&Mo(e,i)&&(p+=x,l+=y),i instanceof ShadowRoot?i=i.host:i=i.parentNode}while(!c&&i!==document.body||c&&(t.contains(i)||t===i));return(f&&(Math.abs(p)<1||!o)||!f&&(Math.abs(l)<1||!o))&&(u=!0),u},Jt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},eo=function(e){return[e.deltaX,e.deltaY]},to=function(e){return e&&"current"in e?e.current:e},Ic=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Lc=function(e){return`
|
|
105
113
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
106
114
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
107
|
-
`)},
|
|
115
|
+
`)},Fc=0,ht=[];function $c(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),o=d.useState(Fc++)[0],a=d.useState(_o)[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=sc([e.lockRef.current],(e.shards||[]).map(to),!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 x=Jt(h),w=n.current,C="deltaX"in h?h.deltaX:w[0]-x[0],P="deltaY"in h?h.deltaY:w[1]-x[1],R,D=h.target,A=Math.abs(C)>Math.abs(P)?"h":"v";if("touches"in h&&A==="h"&&D.type==="range")return!1;var O=Qr(A,D);if(!O)return!0;if(O?R=A:(R=A==="v"?"h":"v",O=Qr(A,D)),!O)return!1;if(!r.current&&"changedTouches"in h&&(C||P)&&(r.current=R),!R)return!0;var $=r.current||R;return Mc($,b,h,$==="h"?C:P,!0)},[]),c=d.useCallback(function(h){var b=h;if(!(!ht.length||ht[ht.length-1]!==a)){var x="deltaY"in b?eo(b):Jt(b),w=t.current.filter(function(R){return R.name===b.type&&(R.target===b.target||b.target===R.shadowParent)&&Ic(R.delta,x)})[0];if(w&&w.should){b.cancelable&&b.preventDefault();return}if(!w){var C=(s.current.shards||[]).map(to).filter(Boolean).filter(function(R){return R.contains(b.target)}),P=C.length>0?i(b,C[0]):!s.current.noIsolation;P&&b.cancelable&&b.preventDefault()}}},[]),u=d.useCallback(function(h,b,x,w){var C={name:h,delta:b,target:x,should:w,shadowParent:Bc(x)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(P){return P!==C})},1)},[]),f=d.useCallback(function(h){n.current=Jt(h),r.current=void 0},[]),p=d.useCallback(function(h){u(h.type,eo(h),h.target,i(h,e.lockRef.current))},[]),l=d.useCallback(function(h){u(h.type,Jt(h),h.target,i(h,e.lockRef.current))},[]);d.useEffect(function(){return ht.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:l}),document.addEventListener("wheel",c,gt),document.addEventListener("touchmove",c,gt),document.addEventListener("touchstart",f,gt),function(){ht=ht.filter(function(h){return h!==a}),document.removeEventListener("wheel",c,gt),document.removeEventListener("touchmove",c,gt),document.removeEventListener("touchstart",f,gt)}},[]);var g=e.removeScrollBar,y=e.inert;return d.createElement(d.Fragment,null,y?d.createElement(a,{styles:Lc(o)}):null,g?d.createElement(Tc,{gapMode:e.gapMode}):null)}function Bc(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Wc=mc(ko,$c);var Lo=d.forwardRef(function(e,t){return d.createElement(vn,ke({},e,{ref:t,sideCar:Wc}))});Lo.classNames=vn.classNames;var Vc=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},yt=new WeakMap,Zt=new WeakMap,Qt={},In=0,Fo=function(e){return e&&(e.host||Fo(e.parentNode))},zc=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Fo(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Uc=function(e,t,n,r){var o=zc(t,Array.isArray(e)?e:[e]);Qt[n]||(Qt[n]=new WeakMap);var a=Qt[n],s=[],i=new Set,c=new Set(o),u=function(p){!p||i.has(p)||(i.add(p),u(p.parentNode))};o.forEach(u);var f=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(l){if(i.has(l))f(l);else try{var g=l.getAttribute(r),y=g!==null&&g!=="false",h=(yt.get(l)||0)+1,b=(a.get(l)||0)+1;yt.set(l,h),a.set(l,b),s.push(l),h===1&&y&&Zt.set(l,!0),b===1&&l.setAttribute(n,"true"),y||l.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",l,x)}})};return f(t),i.clear(),In++,function(){s.forEach(function(p){var l=yt.get(p)-1,g=a.get(p)-1;yt.set(p,l),a.set(p,g),l||(Zt.has(p)||p.removeAttribute(r),Zt.delete(p)),g||p.removeAttribute(n)}),In--,In||(yt=new WeakMap,yt=new WeakMap,Zt=new WeakMap,Qt={})}},Hc=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Vc(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Uc(r,o,n,"aria-hidden")):function(){return null}},dr="Dialog",[$o,Bo]=nt(dr),[Gc,Oe]=$o(dr),Wo=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,i=d.useRef(null),c=d.useRef(null),[u=!1,f]=Vt({prop:r,defaultProp:o,onChange:a});return v.jsx(Gc,{scope:t,triggerRef:i,contentRef:c,contentId:Ft(),titleId:Ft(),descriptionId:Ft(),open:u,onOpenChange:f,onOpenToggle:d.useCallback(()=>f(p=>!p),[f]),modal:s,children:n})};Wo.displayName=dr;var Vo="DialogTrigger",zo=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Oe(Vo,n),a=ue(t,o.triggerRef);return v.jsx(ae.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":vr(o.open),...r,ref:a,onClick:oe(e.onClick,o.onOpenToggle)})});zo.displayName=Vo;var fr="DialogPortal",[Yc,Uo]=$o(fr,{forceMount:void 0}),Ho=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=Oe(fr,t);return v.jsx(Yc,{scope:t,forceMount:n,children:d.Children.map(r,s=>v.jsx(zt,{present:n||a.open,children:v.jsx(No,{asChild:!0,container:o,children:s})}))})};Ho.displayName=fr;var cn="DialogOverlay",Go=d.forwardRef((e,t)=>{const n=Uo(cn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Oe(cn,e.__scopeDialog);return a.modal?v.jsx(zt,{present:r||a.open,children:v.jsx(Kc,{...o,ref:t})}):null});Go.displayName=cn;var Kc=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Oe(cn,n);return v.jsx(Lo,{as:it,allowPinchZoom:!0,shards:[o.contentRef],children:v.jsx(ae.div,{"data-state":vr(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ct="DialogContent",Yo=d.forwardRef((e,t)=>{const n=Uo(ct,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Oe(ct,e.__scopeDialog);return v.jsx(zt,{present:r||a.open,children:a.modal?v.jsx(qc,{...o,ref:t}):v.jsx(Xc,{...o,ref:t})})});Yo.displayName=ct;var qc=d.forwardRef((e,t)=>{const n=Oe(ct,e.__scopeDialog),r=d.useRef(null),o=ue(t,n.contentRef,r);return d.useEffect(()=>{const a=r.current;if(a)return Hc(a)},[]),v.jsx(Ko,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:oe(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:oe(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&a.preventDefault()}),onFocusOutside:oe(e.onFocusOutside,a=>a.preventDefault())})}),Xc=d.forwardRef((e,t)=>{const n=Oe(ct,e.__scopeDialog),r=d.useRef(!1),o=d.useRef(!1);return v.jsx(Ko,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Ko=d.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,i=Oe(ct,n),c=d.useRef(null),u=ue(t,c);return ac(),v.jsxs(v.Fragment,{children:[v.jsx(Ao,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:v.jsx(ur,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":vr(i.open),...s,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),v.jsxs(v.Fragment,{children:[v.jsx(Zc,{titleId:i.titleId}),v.jsx(el,{contentRef:c,descriptionId:i.descriptionId})]})]})}),pr="DialogTitle",qo=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Oe(pr,n);return v.jsx(ae.h2,{id:o.titleId,...r,ref:t})});qo.displayName=pr;var Xo="DialogDescription",Jo=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Oe(Xo,n);return v.jsx(ae.p,{id:o.descriptionId,...r,ref:t})});Jo.displayName=Xo;var Zo="DialogClose",Qo=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Oe(Zo,n);return v.jsx(ae.button,{type:"button",...r,ref:t,onClick:oe(e.onClick,()=>o.onOpenChange(!1))})});Qo.displayName=Zo;function vr(e){return e?"open":"closed"}var ea="DialogTitleWarning",[Jc,ta]=Ni(ea,{contentName:ct,titleName:pr,docsSlug:"dialog"}),Zc=({titleId:e})=>{const t=ta(ea),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
108
116
|
|
|
109
117
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
110
118
|
|
|
111
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return
|
|
119
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return d.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Qc="DialogDescriptionWarning",el=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ta(Qc).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(r))},[r,e,t]),null},tl=Wo,nl=zo,rl=Ho,ol=Go,al=Yo,sl=qo,il=Jo,na=Qo,ra="AlertDialog",[cl,Ip]=nt(ra,[Bo]),He=Bo(),oa=e=>{const{__scopeAlertDialog:t,...n}=e,r=He(t);return v.jsx(tl,{...r,...n,modal:!0})};oa.displayName=ra;var ll="AlertDialogTrigger",aa=d.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=He(n);return v.jsx(nl,{...o,...r,ref:t})});aa.displayName=ll;var ul="AlertDialogPortal",sa=e=>{const{__scopeAlertDialog:t,...n}=e,r=He(t);return v.jsx(rl,{...r,...n})};sa.displayName=ul;var dl="AlertDialogOverlay",ia=d.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=He(n);return v.jsx(ol,{...o,...r,ref:t})});ia.displayName=dl;var xt="AlertDialogContent",[fl,pl]=cl(xt),ca=d.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,a=He(n),s=d.useRef(null),i=ue(t,s),c=d.useRef(null);return v.jsx(Jc,{contentName:xt,titleName:la,docsSlug:"alert-dialog",children:v.jsx(fl,{scope:n,cancelRef:c,children:v.jsxs(al,{role:"alertdialog",...a,...o,ref:i,onOpenAutoFocus:oe(o.onOpenAutoFocus,u=>{var f;u.preventDefault(),(f=c.current)==null||f.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[v.jsx(lr,{children:r}),v.jsx(ml,{contentRef:s})]})})})});ca.displayName=xt;var la="AlertDialogTitle",ua=d.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=He(n);return v.jsx(sl,{...o,...r,ref:t})});ua.displayName=la;var da="AlertDialogDescription",fa=d.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=He(n);return v.jsx(il,{...o,...r,ref:t})});fa.displayName=da;var vl="AlertDialogAction",pa=d.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=He(n);return v.jsx(na,{...o,...r,ref:t})});pa.displayName=vl;var va="AlertDialogCancel",ma=d.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=pl(va,n),a=He(n),s=ue(t,o);return v.jsx(na,{...a,...r,ref:s})});ma.displayName=va;var ml=({contentRef:e})=>{const t=`\`${xt}\` requires a description for the component to be accessible for screen reader users.
|
|
112
120
|
|
|
113
|
-
You can add a description to the \`${xt}\` by passing a \`${
|
|
121
|
+
You can add a description to the \`${xt}\` by passing a \`${da}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
114
122
|
|
|
115
123
|
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 \`${xt}\`. 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.
|
|
116
124
|
|
|
117
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return f.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},El=$o,Cl=Fo,Sl=Bo,Xo=Wo,Jo=zo,Zo=Go,Qo=Ko,ea=Ho,ta=Yo;function ra(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=ra(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Pl(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=ra(e))&&(n&&(n+=" "),n+=t);return n}const nn="-";function Rl(e){const t=Tl(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;function o(s){const i=s.split(nn);return i[0]===""&&i.length!==1&&i.shift(),na(i,t)||Al(s)}function a(s,i){const c=r[s]||[];return i&&n[s]?[...c,...n[s]]:c}return{getClassGroupId:o,getConflictingClassGroupIds:a}}function na(e,t){var s;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?na(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(nn);return(s=t.validators.find(({validator:i})=>i(a)))==null?void 0:s.classGroupId}const Ln=/^\[(.+)\]$/;function Al(e){if(Ln.test(e)){const t=Ln.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}function Tl(e){const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return Nl(Object.entries(e.classGroups),r).forEach(([a,s])=>{$r(s,n,a,t)}),n}function $r(e,t,r,n){e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:In(t,o);a.classGroupId=r;return}if(typeof o=="function"){if(Ol(o)){$r(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([a,s])=>{$r(s,In(t,a),r,n)})})}function In(e,t){let r=e;return t.split(nn).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r}function Ol(e){return e.isThemeGetter}function Nl(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 Dl(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 oa="!";function kl(e){const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,o=t[0],a=t.length;function s(i){const c=[];let d=0,u=0,g;for(let y=0;y<i.length;y++){let E=i[y];if(d===0){if(E===o&&(n||i.slice(y,y+a)===t)){c.push(i.slice(u,y)),u=y+a;continue}if(E==="/"){g=y;continue}}E==="["?d++:E==="]"&&d--}const l=c.length===0?i:i.substring(u),v=l.startsWith(oa),x=v?l.substring(1):l,h=g&&g>u?g-u:void 0;return{modifiers:c,hasImportantModifier:v,baseClassName:x,maybePostfixModifierPosition:h}}return r?function(c){return r({className:c,parseClassName:s})}:s}function _l(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 jl(e){return{cache:Dl(e.cacheSize),parseClassName:kl(e),...Rl(e)}}const Ml=/\s+/;function Ll(e,t){const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o}=t,a=new Set;return e.trim().split(Ml).map(s=>{const{modifiers:i,hasImportantModifier:c,baseClassName:d,maybePostfixModifierPosition:u}=r(s);let g=!!u,l=n(g?d.substring(0,u):d);if(!l){if(!g)return{isTailwindClass:!1,originalClassName:s};if(l=n(d),!l)return{isTailwindClass:!1,originalClassName:s};g=!1}const v=_l(i).join(":");return{isTailwindClass:!0,modifierId:c?v+oa:v,classGroupId:l,originalClassName:s,hasPostfixModifier:g}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:i,classGroupId:c,hasPostfixModifier:d}=s,u=i+c;return a.has(u)?!1:(a.add(u),o(c,d).forEach(g=>a.add(i+g)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function Il(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=aa(t))&&(n&&(n+=" "),n+=r);return n}function aa(e){if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=aa(e[n]))&&(r&&(r+=" "),r+=t);return r}function $l(e,...t){let r,n,o,a=s;function s(c){const d=t.reduce((u,g)=>g(u),e());return r=jl(d),n=r.cache.get,o=r.cache.set,a=i,i(c)}function i(c){const d=n(c);if(d)return d;const u=Ll(c,r);return o(c,u),u}return function(){return a(Il.apply(null,arguments))}}function ne(e){const t=r=>r[e]||[];return t.isThemeGetter=!0,t}const sa=/^\[(?:([a-z-]+):)?(.+)\]$/i,Fl=/^\d+\/\d+$/,Bl=new Set(["px","full","screen"]),Wl=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zl=/\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$/,Vl=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Hl=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ul=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Be(e){return st(e)||Bl.has(e)||Fl.test(e)}function Ge(e){return Pt(e,"length",Ql)}function st(e){return!!e&&!Number.isNaN(Number(e))}function Xt(e){return Pt(e,"number",st)}function kt(e){return!!e&&Number.isInteger(Number(e))}function Yl(e){return e.endsWith("%")&&st(e.slice(0,-1))}function $(e){return sa.test(e)}function qe(e){return Wl.test(e)}const Gl=new Set(["length","size","percentage"]);function ql(e){return Pt(e,Gl,ia)}function Kl(e){return Pt(e,"position",ia)}const Xl=new Set(["image","url"]);function Jl(e){return Pt(e,Xl,tc)}function Zl(e){return Pt(e,"",ec)}function _t(){return!0}function Pt(e,t,r){const n=sa.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1}function Ql(e){return zl.test(e)&&!Vl.test(e)}function ia(){return!1}function ec(e){return Hl.test(e)}function tc(e){return Ul.test(e)}function rc(){const e=ne("colors"),t=ne("spacing"),r=ne("blur"),n=ne("brightness"),o=ne("borderColor"),a=ne("borderRadius"),s=ne("borderSpacing"),i=ne("borderWidth"),c=ne("contrast"),d=ne("grayscale"),u=ne("hueRotate"),g=ne("invert"),l=ne("gap"),v=ne("gradientColorStops"),x=ne("gradientColorStopPositions"),h=ne("inset"),y=ne("margin"),E=ne("opacity"),b=ne("padding"),C=ne("saturate"),P=ne("scale"),R=ne("sepia"),D=ne("skew"),O=ne("space"),N=ne("translate"),z=()=>["auto","contain","none"],H=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto",$,t],_=()=>[$,t],Y=()=>["",Be,Ge],M=()=>["auto",st,$],X=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],K=()=>["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"],B=()=>["","0",$],oe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>[st,Xt],W=()=>[st,$];return{cacheSize:500,separator:":",theme:{colors:[_t],spacing:[Be,Ge],blur:["none","",qe,$],brightness:I(),borderColor:[e],borderRadius:["none","","full",qe,$],borderSpacing:_(),borderWidth:Y(),contrast:I(),grayscale:B(),hueRotate:W(),invert:B(),gap:_(),gradientColorStops:[e],gradientColorStopPositions:[Yl,Ge],inset:U(),margin:U(),opacity:I(),padding:_(),saturate:I(),scale:I(),sepia:B(),skew:W(),space:_(),translate:_()},classGroups:{aspect:[{aspect:["auto","square","video",$]}],container:["container"],columns:[{columns:[qe]}],"break-after":[{"break-after":oe()}],"break-before":[{"break-before":oe()}],"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:[...X(),$]}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],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",kt,$]}],basis:[{basis:U()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",$]}],grow:[{grow:B()}],shrink:[{shrink:B()}],order:[{order:["first","last","none",kt,$]}],"grid-cols":[{"grid-cols":[_t]}],"col-start-end":[{col:["auto",{span:["full",kt,$]},$]}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":[_t]}],"row-start-end":[{row:["auto",{span:[kt,$]},$]}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",$]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",$]}],gap:[{gap:[l]}],"gap-x":[{"gap-x":[l]}],"gap-y":[{"gap-y":[l]}],"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:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"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",$,t]}],"min-w":[{"min-w":[$,t,"min","max","fit"]}],"max-w":[{"max-w":[$,t,"none","full","min","max","fit","prose",{screen:[qe]},qe]}],h:[{h:[$,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[$,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[$,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[$,t,"auto","min","max","fit"]}],"font-size":[{text:["base",qe,Ge]}],"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",$]}],"line-clamp":[{"line-clamp":["none",st,Xt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Be,$]}],"list-image":[{"list-image":["none",$]}],"list-style-type":[{list:["none","disc","decimal",$]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[E]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Be,Ge]}],"underline-offset":[{"underline-offset":["auto",Be,$]}],"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",$]}],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",$]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[E]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...X(),Kl]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ql]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Jl]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],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":[E]}],"border-style":[{border:[...F(),"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":[E]}],"divide-style":[{divide:F()}],"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:["",...F()]}],"outline-offset":[{"outline-offset":[Be,$]}],"outline-w":[{outline:[Be,Ge]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[E]}],"ring-offset-w":[{"ring-offset":[Be,Ge]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",qe,Zl]}],"shadow-color":[{shadow:[_t]}],opacity:[{opacity:[E]}],"mix-blend":[{"mix-blend":[...K(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":K()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",qe,$]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[g]}],saturate:[{saturate:[C]}],sepia:[{sepia:[R]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[E]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[R]}],"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",$]}],duration:[{duration:W()}],ease:[{ease:["linear","in","out","in-out",$]}],delay:[{delay:W()}],animate:[{animate:["none","spin","ping","pulse","bounce",$]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[P]}],"scale-x":[{"scale-x":[P]}],"scale-y":[{"scale-y":[P]}],rotate:[{rotate:[kt,$]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[D]}],"skew-y":[{"skew-y":[D]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$]}],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",$]}],"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",$]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Be,Ge,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 nc=$l(rc);function fe(...e){return nc(Pl(e))}function la(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=la(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function oc(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=la(e))&&(n&&(n+=" "),n+=t);return n}const $n=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Fn=oc,ca=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Fn(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(d=>{const u=r==null?void 0:r[d],g=a==null?void 0:a[d];if(u===null)return null;const l=$n(u)||$n(g);return o[d][l]}),i=r&&Object.entries(r).reduce((d,u)=>{let[g,l]=u;return l===void 0||(d[g]=l),d},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,u)=>{let{class:g,className:l,...v}=u;return Object.entries(v).every(x=>{let[h,y]=x;return Array.isArray(y)?y.includes({...a,...i}[h]):{...a,...i}[h]===y})?[...d,g,l]:d},[]);return Fn(e,s,c,r==null?void 0:r.class,r==null?void 0:r.className)},on=ca("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"}}),ac=f.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},a)=>{const s=n?It:"button";return m.jsx(s,{className:fe(on({variant:t,size:r,className:e})),ref:a,...o})});ac.displayName="Button";const sc=El,ic=Cl,lc=Sl,ua=f.forwardRef(({className:e,...t},r)=>m.jsx(Xo,{className:fe("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}));ua.displayName=Xo.displayName;const da=f.forwardRef(({className:e,...t},r)=>m.jsxs(lc,{children:[m.jsx(ua,{}),m.jsx(Jo,{ref:r,className:fe("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})]}));da.displayName=Jo.displayName;const fa=({className:e,...t})=>m.jsx("div",{className:fe("ve-flex ve-flex-col ve-space-y-2 ve-text-center sm:ve-text-left",e),...t});fa.displayName="AlertDialogHeader";const pa=({className:e,...t})=>m.jsx("div",{className:fe("ve-flex ve-flex-col-reverse sm:ve-flex-row sm:ve-justify-end sm:ve-space-x-2",e),...t});pa.displayName="AlertDialogFooter";const ga=f.forwardRef(({className:e,...t},r)=>m.jsx(ea,{ref:r,className:fe("ve-text-lg ve-font-semibold",e),...t}));ga.displayName=ea.displayName;const va=f.forwardRef(({className:e,...t},r)=>m.jsx(ta,{ref:r,className:fe("ve-text-sm ve-text-muted-foreground",e),...t}));va.displayName=ta.displayName;const cc=f.forwardRef(({className:e,...t},r)=>m.jsx(Zo,{ref:r,className:fe(on(),e),...t}));cc.displayName=Zo.displayName;const ha=f.forwardRef(({className:e,...t},r)=>m.jsx(Qo,{ref:r,className:fe(on({variant:"outline"}),"ve-mt-2 sm:ve-mt-0",e),...t}));ha.displayName=Qo.displayName;const uc=ca("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=f.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},a)=>{const s=n?It:"button";return m.jsx(s,{className:fe(uc({variant:t,size:r,className:e})),ref:a,...o})});Xe.displayName="Button";function dc(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function ma(e){const[t,r]=f.useState(void 0);return it(()=>{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 c=a.borderBoxSize,d=Array.isArray(c)?c[0]:c;s=d.inlineSize,i=d.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 an="Switch",[fc,tf]=St(an),[pc,gc]=fc(an),ba=f.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:a,required:s,disabled:i,value:c="on",onCheckedChange:d,...u}=e,[g,l]=f.useState(null),v=pe(t,b=>l(b)),x=f.useRef(!1),h=g?!!g.closest("form"):!0,[y=!1,E]=Xr({prop:o,defaultProp:a,onChange:d});return m.jsxs(pc,{scope:r,checked:y,disabled:i,children:[m.jsx(le.button,{type:"button",role:"switch","aria-checked":y,"aria-required":s,"data-state":wa(y),"data-disabled":i?"":void 0,disabled:i,value:c,...u,ref:v,onClick:ue(e.onClick,b=>{E(C=>!C),h&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),h&&m.jsx(vc,{control:g,bubbles:!x.current,name:n,value:c,checked:y,required:s,disabled:i,style:{transform:"translateX(-100%)"}})]})});ba.displayName=an;var ya="SwitchThumb",xa=f.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=gc(ya,r);return m.jsx(le.span,{"data-state":wa(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});xa.displayName=ya;var vc=e=>{const{control:t,checked:r,bubbles:n=!0,...o}=e,a=f.useRef(null),s=dc(r),i=ma(t);return f.useEffect(()=>{const c=a.current,d=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(d,"checked").set;if(s!==r&&g){const l=new Event("click",{bubbles:n});g.call(c,r),c.dispatchEvent(l)}},[s,r,n]),m.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 wa(e){return e?"checked":"unchecked"}var Ea=ba,hc=xa;const Ca=f.forwardRef(({className:e,...t},r)=>m.jsx(Ea,{className:fe("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:m.jsx(hc,{className:fe("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")})}));Ca.displayName=Ea.displayName;const mc=["top","right","bottom","left"],Ze=Math.min,be=Math.max,or=Math.round,Jt=Math.floor,Qe=e=>({x:e,y:e}),bc={left:"right",right:"left",bottom:"top",top:"bottom"},yc={start:"end",end:"start"};function Fr(e,t,r){return be(e,Ze(t,r))}function We(e,t){return typeof e=="function"?e(t):e}function ze(e){return e.split("-")[0]}function Rt(e){return e.split("-")[1]}function sn(e){return e==="x"?"y":"x"}function ln(e){return e==="y"?"height":"width"}function et(e){return["top","bottom"].includes(ze(e))?"y":"x"}function cn(e){return sn(et(e))}function xc(e,t,r){r===void 0&&(r=!1);const n=Rt(e),o=cn(e),a=ln(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 wc(e){const t=ar(e);return[Br(e),t,Br(t)]}function Br(e){return e.replace(/start|end/g,t=>yc[t])}function Ec(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 Cc(e,t,r,n){const o=Rt(e);let a=Ec(ze(e),r==="start",n);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(Br)))),a}function ar(e){return e.replace(/left|right|bottom|top/g,t=>bc[t])}function Sc(e){return{top:0,right:0,bottom:0,left:0,...e}}function Sa(e){return typeof e!="number"?Sc(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 Bn(e,t,r){let{reference:n,floating:o}=e;const a=et(t),s=cn(t),i=ln(s),c=ze(t),d=a==="y",u=n.x+n.width/2-o.width/2,g=n.y+n.height/2-o.height/2,l=n[i]/2-o[i]/2;let v;switch(c){case"top":v={x:u,y:n.y-o.height};break;case"bottom":v={x:u,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:g};break;case"left":v={x:n.x-o.width,y:g};break;default:v={x:n.x,y:n.y}}switch(Rt(t)){case"start":v[s]-=l*(r&&d?-1:1);break;case"end":v[s]+=l*(r&&d?-1:1);break}return v}const Pc=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:s}=r,i=a.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:g}=Bn(d,n,c),l=n,v={},x=0;for(let h=0;h<i.length;h++){const{name:y,fn:E}=i[h],{x:b,y:C,data:P,reset:R}=await E({x:u,y:g,initialPlacement:n,placement:l,strategy:o,middlewareData:v,rects:d,platform:s,elements:{reference:e,floating:t}});u=b??u,g=C??g,v={...v,[y]:{...v[y],...P}},R&&x<=50&&(x++,typeof R=="object"&&(R.placement&&(l=R.placement),R.rects&&(d=R.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:u,y:g}=Bn(d,l,c)),h=-1)}return{x:u,y:g,placement:l,strategy:o,middlewareData:v}};async function Mt(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:s,elements:i,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:g="floating",altBoundary:l=!1,padding:v=0}=We(t,e),x=Sa(v),y=i[l?g==="floating"?"reference":"floating":g],E=sr(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(y)))==null||r?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:d,rootBoundary:u,strategy:c})),b=g==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),P=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},R=sr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:b,offsetParent:C,strategy:c}):b);return{top:(E.top-R.top+x.top)/P.y,bottom:(R.bottom-E.bottom+x.bottom)/P.y,left:(E.left-R.left+x.left)/P.x,right:(R.right-E.right+x.right)/P.x}}const Rc=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:s,elements:i,middlewareData:c}=t,{element:d,padding:u=0}=We(e,t)||{};if(d==null)return{};const g=Sa(u),l={x:r,y:n},v=cn(o),x=ln(v),h=await s.getDimensions(d),y=v==="y",E=y?"top":"left",b=y?"bottom":"right",C=y?"clientHeight":"clientWidth",P=a.reference[x]+a.reference[v]-l[v]-a.floating[x],R=l[v]-a.reference[v],D=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let O=D?D[C]:0;(!O||!await(s.isElement==null?void 0:s.isElement(D)))&&(O=i.floating[C]||a.floating[x]);const N=P/2-R/2,z=O/2-h[x]/2-1,H=Ze(g[E],z),U=Ze(g[b],z),_=H,Y=O-h[x]-U,M=O/2-h[x]/2+N,X=Fr(_,M,Y),F=!c.arrow&&Rt(o)!=null&&M!==X&&a.reference[x]/2-(M<_?H:U)-h[x]/2<0,K=F?M<_?M-_:M-Y:0;return{[v]:l[v]+K,data:{[v]:X,centerOffset:M-X-K,...F&&{alignmentOffset:K}},reset:F}}}),Ac=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:c,elements:d}=t,{mainAxis:u=!0,crossAxis:g=!0,fallbackPlacements:l,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:h=!0,...y}=We(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const E=ze(o),b=et(i),C=ze(i)===i,P=await(c.isRTL==null?void 0:c.isRTL(d.floating)),R=l||(C||!h?[ar(i)]:wc(i)),D=x!=="none";!l&&D&&R.push(...Cc(i,h,x,P));const O=[i,...R],N=await Mt(t,y),z=[];let H=((n=a.flip)==null?void 0:n.overflows)||[];if(u&&z.push(N[E]),g){const M=xc(o,s,P);z.push(N[M[0]],N[M[1]])}if(H=[...H,{placement:o,overflows:z}],!z.every(M=>M<=0)){var U,_;const M=(((U=a.flip)==null?void 0:U.index)||0)+1,X=O[M];if(X)return{data:{index:M,overflows:H},reset:{placement:X}};let F=(_=H.filter(K=>K.overflows[0]<=0).sort((K,A)=>K.overflows[1]-A.overflows[1])[0])==null?void 0:_.placement;if(!F)switch(v){case"bestFit":{var Y;const K=(Y=H.filter(A=>{if(D){const B=et(A.placement);return B===b||B==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(B=>B>0).reduce((B,oe)=>B+oe,0)]).sort((A,B)=>A[1]-B[1])[0])==null?void 0:Y[0];K&&(F=K);break}case"initialPlacement":F=i;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function Wn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function zn(e){return mc.some(t=>e[t]>=0)}const Tc=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=We(e,t);switch(n){case"referenceHidden":{const a=await Mt(t,{...o,elementContext:"reference"}),s=Wn(a,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:zn(s)}}}case"escaped":{const a=await Mt(t,{...o,altBoundary:!0}),s=Wn(a,r.floating);return{data:{escapedOffsets:s,escaped:zn(s)}}}default:return{}}}}};async function Oc(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=ze(r),i=Rt(r),c=et(r)==="y",d=["left","top"].includes(s)?-1:1,u=a&&c?-1:1,g=We(t,e);let{mainAxis:l,crossAxis:v,alignmentAxis:x}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return i&&typeof x=="number"&&(v=i==="end"?x*-1:x),c?{x:v*u,y:l*d}:{x:l*d,y:v*u}}const Nc=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,c=await Oc(t,e);return s===((r=i.offset)==null?void 0:r.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:s}}}}},Dc=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:y=>{let{x:E,y:b}=y;return{x:E,y:b}}},...c}=We(e,t),d={x:r,y:n},u=await Mt(t,c),g=et(ze(o)),l=sn(g);let v=d[l],x=d[g];if(a){const y=l==="y"?"top":"left",E=l==="y"?"bottom":"right",b=v+u[y],C=v-u[E];v=Fr(b,v,C)}if(s){const y=g==="y"?"top":"left",E=g==="y"?"bottom":"right",b=x+u[y],C=x-u[E];x=Fr(b,x,C)}const h=i.fn({...t,[l]:v,[g]:x});return{...h,data:{x:h.x-r,y:h.y-n,enabled:{[l]:a,[g]:s}}}}}},kc=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:c=!0,crossAxis:d=!0}=We(e,t),u={x:r,y:n},g=et(o),l=sn(g);let v=u[l],x=u[g];const h=We(i,t),y=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){const C=l==="y"?"height":"width",P=a.reference[l]-a.floating[C]+y.mainAxis,R=a.reference[l]+a.reference[C]-y.mainAxis;v<P?v=P:v>R&&(v=R)}if(d){var E,b;const C=l==="y"?"width":"height",P=["top","left"].includes(ze(o)),R=a.reference[g]-a.floating[C]+(P&&((E=s.offset)==null?void 0:E[g])||0)+(P?0:y.crossAxis),D=a.reference[g]+a.reference[C]+(P?0:((b=s.offset)==null?void 0:b[g])||0)-(P?y.crossAxis:0);x<R?x=R:x>D&&(x=D)}return{[l]:v,[g]:x}}}},_c=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:c=()=>{},...d}=We(e,t),u=await Mt(t,d),g=ze(o),l=Rt(o),v=et(o)==="y",{width:x,height:h}=a.floating;let y,E;g==="top"||g==="bottom"?(y=g,E=l===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(E=g,y=l==="end"?"top":"bottom");const b=h-u.top-u.bottom,C=x-u.left-u.right,P=Ze(h-u[y],b),R=Ze(x-u[E],C),D=!t.middlewareData.shift;let O=P,N=R;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=C),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(O=b),D&&!l){const H=be(u.left,0),U=be(u.right,0),_=be(u.top,0),Y=be(u.bottom,0);v?N=x-2*(H!==0||U!==0?H+U:be(u.left,u.right)):O=h-2*(_!==0||Y!==0?_+Y:be(u.top,u.bottom))}await c({...t,availableWidth:N,availableHeight:O});const z=await s.getDimensions(i.floating);return x!==z.width||h!==z.height?{reset:{rects:!0}}:{}}}};function dr(){return typeof window<"u"}function At(e){return Pa(e)?(e.nodeName||"").toLowerCase():"#document"}function ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Me(e){var t;return(t=(Pa(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Pa(e){return dr()?e instanceof Node||e instanceof ye(e).Node:!1}function Ae(e){return dr()?e instanceof Element||e instanceof ye(e).Element:!1}function je(e){return dr()?e instanceof HTMLElement||e instanceof ye(e).HTMLElement:!1}function Vn(e){return!dr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ye(e).ShadowRoot}function Ft(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Te(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function jc(e){return["table","td","th"].includes(At(e))}function fr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function un(e){const t=dn(),r=Ae(e)?Te(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 Mc(e){let t=tt(e);for(;je(t)&&!Et(t);){if(un(t))return t;if(fr(t))return null;t=tt(t)}return null}function dn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Et(e){return["html","body","#document"].includes(At(e))}function Te(e){return ye(e).getComputedStyle(e)}function pr(e){return Ae(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tt(e){if(At(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Vn(e)&&e.host||Me(e);return Vn(t)?t.host:t}function Ra(e){const t=tt(e);return Et(t)?e.ownerDocument?e.ownerDocument.body:e.body:je(t)&&Ft(t)?t:Ra(t)}function Lt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Ra(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),s=ye(o);if(a){const i=Wr(s);return t.concat(s,s.visualViewport||[],Ft(o)?o:[],i&&r?Lt(i):[])}return t.concat(o,Lt(o,[],r))}function Wr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Aa(e){const t=Te(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=je(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 fn(e){return Ae(e)?e:e.contextElement}function wt(e){const t=fn(e);if(!je(t))return Qe(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=Aa(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 Lc=Qe(0);function Ta(e){const t=ye(e);return!dn()||!t.visualViewport?Lc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ic(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ye(e)?!1:t}function ct(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=fn(e);let s=Qe(1);t&&(n?Ae(n)&&(s=wt(n)):s=wt(e));const i=Ic(a,r,n)?Ta(a):Qe(0);let c=(o.left+i.x)/s.x,d=(o.top+i.y)/s.y,u=o.width/s.x,g=o.height/s.y;if(a){const l=ye(a),v=n&&Ae(n)?ye(n):n;let x=l,h=Wr(x);for(;h&&n&&v!==x;){const y=wt(h),E=h.getBoundingClientRect(),b=Te(h),C=E.left+(h.clientLeft+parseFloat(b.paddingLeft))*y.x,P=E.top+(h.clientTop+parseFloat(b.paddingTop))*y.y;c*=y.x,d*=y.y,u*=y.x,g*=y.y,c+=C,d+=P,x=ye(h),h=Wr(x)}}return sr({width:u,height:g,x:c,y:d})}function $c(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",s=Me(n),i=t?fr(t.floating):!1;if(n===s||i&&a)return r;let c={scrollLeft:0,scrollTop:0},d=Qe(1);const u=Qe(0),g=je(n);if((g||!g&&!a)&&((At(n)!=="body"||Ft(s))&&(c=pr(n)),je(n))){const l=ct(n);d=wt(n),u.x=l.x+n.clientLeft,u.y=l.y+n.clientTop}return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-c.scrollLeft*d.x+u.x,y:r.y*d.y-c.scrollTop*d.y+u.y}}function Fc(e){return Array.from(e.getClientRects())}function zr(e,t){const r=pr(e).scrollLeft;return t?t.left+r:ct(Me(e)).left+r}function Bc(e){const t=Me(e),r=pr(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+zr(e);const i=-r.scrollTop;return Te(n).direction==="rtl"&&(s+=be(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:s,y:i}}function Wc(e,t){const r=ye(e),n=Me(e),o=r.visualViewport;let a=n.clientWidth,s=n.clientHeight,i=0,c=0;if(o){a=o.width,s=o.height;const d=dn();(!d||d&&t==="fixed")&&(i=o.offsetLeft,c=o.offsetTop)}return{width:a,height:s,x:i,y:c}}function zc(e,t){const r=ct(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=je(e)?wt(e):Qe(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,c=o*a.x,d=n*a.y;return{width:s,height:i,x:c,y:d}}function Hn(e,t,r){let n;if(t==="viewport")n=Wc(e,r);else if(t==="document")n=Bc(Me(e));else if(Ae(t))n=zc(t,r);else{const o=Ta(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return sr(n)}function Oa(e,t){const r=tt(e);return r===t||!Ae(r)||Et(r)?!1:Te(r).position==="fixed"||Oa(r,t)}function Vc(e,t){const r=t.get(e);if(r)return r;let n=Lt(e,[],!1).filter(i=>Ae(i)&&At(i)!=="body"),o=null;const a=Te(e).position==="fixed";let s=a?tt(e):e;for(;Ae(s)&&!Et(s);){const i=Te(s),c=un(s);!c&&i.position==="fixed"&&(o=null),(a?!c&&!o:!c&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ft(s)&&!c&&Oa(e,s))?n=n.filter(u=>u!==s):o=i,s=tt(s)}return t.set(e,n),n}function Hc(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?fr(t)?[]:Vc(t,this._c):[].concat(r),n],i=s[0],c=s.reduce((d,u)=>{const g=Hn(t,u,o);return d.top=be(g.top,d.top),d.right=Ze(g.right,d.right),d.bottom=Ze(g.bottom,d.bottom),d.left=be(g.left,d.left),d},Hn(t,i,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Uc(e){const{width:t,height:r}=Aa(e);return{width:t,height:r}}function Yc(e,t,r){const n=je(t),o=Me(t),a=r==="fixed",s=ct(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const c=Qe(0);if(n||!n&&!a)if((At(t)!=="body"||Ft(o))&&(i=pr(t)),n){const v=ct(t,!0,a,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else o&&(c.x=zr(o));let d=0,u=0;if(o&&!n&&!a){const v=o.getBoundingClientRect();u=v.top+i.scrollTop,d=v.left+i.scrollLeft-zr(o,v)}const g=s.left+i.scrollLeft-c.x-d,l=s.top+i.scrollTop-c.y-u;return{x:g,y:l,width:s.width,height:s.height}}function Nr(e){return Te(e).position==="static"}function Un(e,t){if(!je(e)||Te(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Me(e)===r&&(r=r.ownerDocument.body),r}function Na(e,t){const r=ye(e);if(fr(e))return r;if(!je(e)){let o=tt(e);for(;o&&!Et(o);){if(Ae(o)&&!Nr(o))return o;o=tt(o)}return r}let n=Un(e,t);for(;n&&jc(n)&&Nr(n);)n=Un(n,t);return n&&Et(n)&&Nr(n)&&!un(n)?r:n||Mc(e)||r}const Gc=async function(e){const t=this.getOffsetParent||Na,r=this.getDimensions,n=await r(e.floating);return{reference:Yc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function qc(e){return Te(e).direction==="rtl"}const Kc={convertOffsetParentRelativeRectToViewportRelativeRect:$c,getDocumentElement:Me,getClippingRect:Hc,getOffsetParent:Na,getElementRects:Gc,getClientRects:Fc,getDimensions:Uc,getScale:wt,isElement:Ae,isRTL:qc};function Xc(e,t){let r=null,n;const o=Me(e);function a(){var i;clearTimeout(n),(i=r)==null||i.disconnect(),r=null}function s(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),a();const{left:d,top:u,width:g,height:l}=e.getBoundingClientRect();if(i||t(),!g||!l)return;const v=Jt(u),x=Jt(o.clientWidth-(d+g)),h=Jt(o.clientHeight-(u+l)),y=Jt(d),b={rootMargin:-v+"px "+-x+"px "+-h+"px "+-y+"px",threshold:be(0,Ze(1,c))||1};let C=!0;function P(R){const D=R[0].intersectionRatio;if(D!==c){if(!C)return s();D?s(!1,D):n=setTimeout(()=>{s(!1,1e-7)},1e3)}C=!1}try{r=new IntersectionObserver(P,{...b,root:o.ownerDocument})}catch{r=new IntersectionObserver(P,b)}r.observe(e)}return s(!0),a}function Jc(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:c=!1}=n,d=fn(e),u=o||a?[...d?Lt(d):[],...Lt(t)]:[];u.forEach(E=>{o&&E.addEventListener("scroll",r,{passive:!0}),a&&E.addEventListener("resize",r)});const g=d&&i?Xc(d,r):null;let l=-1,v=null;s&&(v=new ResizeObserver(E=>{let[b]=E;b&&b.target===d&&v&&(v.unobserve(t),cancelAnimationFrame(l),l=requestAnimationFrame(()=>{var C;(C=v)==null||C.observe(t)})),r()}),d&&!c&&v.observe(d),v.observe(t));let x,h=c?ct(e):null;c&&y();function y(){const E=ct(e);h&&(E.x!==h.x||E.y!==h.y||E.width!==h.width||E.height!==h.height)&&r(),h=E,x=requestAnimationFrame(y)}return r(),()=>{var E;u.forEach(b=>{o&&b.removeEventListener("scroll",r),a&&b.removeEventListener("resize",r)}),g==null||g(),(E=v)==null||E.disconnect(),v=null,c&&cancelAnimationFrame(x)}}const Zc=Nc,Qc=Dc,eu=Ac,tu=_c,ru=Tc,Yn=Rc,nu=kc,ou=(e,t,r)=>{const n=new Map,o={platform:Kc,...r},a={...o.platform,_c:n};return Pc(e,t,{...o,platform:a})};var rr=typeof document<"u"?w.useLayoutEffect:w.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 Da(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Gn(e,t){const r=Da(e);return Math.round(t*r)/r}function Dr(e){const t=f.useRef(e);return rr(()=>{t.current=e}),t}function au(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:c,open:d}=e,[u,g]=f.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[l,v]=f.useState(n);ir(l,n)||v(n);const[x,h]=f.useState(null),[y,E]=f.useState(null),b=f.useCallback(A=>{A!==D.current&&(D.current=A,h(A))},[]),C=f.useCallback(A=>{A!==O.current&&(O.current=A,E(A))},[]),P=a||x,R=s||y,D=f.useRef(null),O=f.useRef(null),N=f.useRef(u),z=c!=null,H=Dr(c),U=Dr(o),_=Dr(d),Y=f.useCallback(()=>{if(!D.current||!O.current)return;const A={placement:t,strategy:r,middleware:l};U.current&&(A.platform=U.current),ou(D.current,O.current,A).then(B=>{const oe={...B,isPositioned:_.current!==!1};M.current&&!ir(N.current,oe)&&(N.current=oe,Kr.flushSync(()=>{g(oe)}))})},[l,t,r,U,_]);rr(()=>{d===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,g(A=>({...A,isPositioned:!1})))},[d]);const M=f.useRef(!1);rr(()=>(M.current=!0,()=>{M.current=!1}),[]),rr(()=>{if(P&&(D.current=P),R&&(O.current=R),P&&R){if(H.current)return H.current(P,R,Y);Y()}},[P,R,Y,H,z]);const X=f.useMemo(()=>({reference:D,floating:O,setReference:b,setFloating:C}),[b,C]),F=f.useMemo(()=>({reference:P,floating:R}),[P,R]),K=f.useMemo(()=>{const A={position:r,left:0,top:0};if(!F.floating)return A;const B=Gn(F.floating,u.x),oe=Gn(F.floating,u.y);return i?{...A,transform:"translate("+B+"px, "+oe+"px)",...Da(F.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:B,top:oe}},[r,i,F.floating,u.x,u.y]);return f.useMemo(()=>({...u,update:Y,refs:X,elements:F,floatingStyles:K}),[u,Y,X,F,K])}const su=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?Yn({element:n.current,padding:o}).fn(r):{}:n?Yn({element:n,padding:o}).fn(r):{}}}},iu=(e,t)=>({...Zc(e),options:[e,t]}),lu=(e,t)=>({...Qc(e),options:[e,t]}),cu=(e,t)=>({...nu(e),options:[e,t]}),uu=(e,t)=>({...eu(e),options:[e,t]}),du=(e,t)=>({...tu(e),options:[e,t]}),fu=(e,t)=>({...ru(e),options:[e,t]}),pu=(e,t)=>({...su(e),options:[e,t]});var gu="Arrow",ka=f.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return m.jsx(le.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});ka.displayName=gu;var vu=ka,pn="Popper",[_a,ja]=St(pn),[hu,Ma]=_a(pn),La=e=>{const{__scopePopper:t,children:r}=e,[n,o]=f.useState(null);return m.jsx(hu,{scope:t,anchor:n,onAnchorChange:o,children:r})};La.displayName=pn;var Ia="PopperAnchor",$a=f.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=Ma(Ia,r),s=f.useRef(null),i=pe(t,s);return f.useEffect(()=>{a.onAnchorChange((n==null?void 0:n.current)||s.current)}),n?null:m.jsx(le.div,{...o,ref:i})});$a.displayName=Ia;var gn="PopperContent",[mu,bu]=_a(gn),Fa=f.forwardRef((e,t)=>{var xe,ge,we,ve,ut,Le;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:g="partial",hideWhenDetached:l=!1,updatePositionStrategy:v="optimized",onPlaced:x,...h}=e,y=Ma(gn,r),[E,b]=f.useState(null),C=pe(t,Ne=>b(Ne)),[P,R]=f.useState(null),D=ma(P),O=(D==null?void 0:D.width)??0,N=(D==null?void 0:D.height)??0,z=n+(a!=="center"?"-"+a:""),H=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},U=Array.isArray(d)?d:[d],_=U.length>0,Y={padding:H,boundary:U.filter(xu),altBoundary:_},{refs:M,floatingStyles:X,placement:F,isPositioned:K,middlewareData:A}=au({strategy:"fixed",placement:z,whileElementsMounted:(...Ne)=>Jc(...Ne,{animationFrame:v==="always"}),elements:{reference:y.anchor},middleware:[iu({mainAxis:o+N,alignmentAxis:s}),c&&lu({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?cu():void 0,...Y}),c&&uu({...Y}),du({...Y,apply:({elements:Ne,rects:rt,availableWidth:Ie,availableHeight:Re})=>{const{width:dt,height:He}=rt.reference,ie=Ne.floating.style;ie.setProperty("--radix-popper-available-width",`${Ie}px`),ie.setProperty("--radix-popper-available-height",`${Re}px`),ie.setProperty("--radix-popper-anchor-width",`${dt}px`),ie.setProperty("--radix-popper-anchor-height",`${He}px`)}}),P&&pu({element:P,padding:i}),wu({arrowWidth:O,arrowHeight:N}),l&&fu({strategy:"referenceHidden",...Y})]}),[B,oe]=za(F),I=Je(x);it(()=>{K&&(I==null||I())},[K,I]);const W=(xe=A.arrow)==null?void 0:xe.x,k=(ge=A.arrow)==null?void 0:ge.y,J=((we=A.arrow)==null?void 0:we.centerOffset)!==0,[te,G]=f.useState();return it(()=>{E&&G(window.getComputedStyle(E).zIndex)},[E]),m.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:K?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:te,"--radix-popper-transform-origin":[(ve=A.transformOrigin)==null?void 0:ve.x,(ut=A.transformOrigin)==null?void 0:ut.y].join(" "),...((Le=A.hide)==null?void 0:Le.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(mu,{scope:r,placedSide:B,onArrowChange:R,arrowX:W,arrowY:k,shouldHideArrow:J,children:m.jsx(le.div,{"data-side":B,"data-align":oe,...h,ref:C,style:{...h.style,animation:K?void 0:"none"}})})})});Fa.displayName=gn;var Ba="PopperArrow",yu={top:"bottom",right:"left",bottom:"top",left:"right"},Wa=f.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=bu(Ba,n),s=yu[a.placedSide];return m.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:m.jsx(vu,{...o,ref:r,style:{...o.style,display:"block"}})})});Wa.displayName=Ba;function xu(e){return e!==null}var wu=e=>({name:"transformOrigin",options:e,fn(t){var y,E,b;const{placement:r,rects:n,middlewareData:o}=t,s=((y=o.arrow)==null?void 0:y.centerOffset)!==0,i=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[d,u]=za(r),g={start:"0%",center:"50%",end:"100%"}[u],l=(((E=o.arrow)==null?void 0:E.x)??0)+i/2,v=(((b=o.arrow)==null?void 0:b.y)??0)+c/2;let x="",h="";return d==="bottom"?(x=s?g:`${l}px`,h=`${-c}px`):d==="top"?(x=s?g:`${l}px`,h=`${n.floating.height+c}px`):d==="right"?(x=`${-c}px`,h=s?g:`${v}px`):d==="left"&&(x=`${n.floating.width+c}px`,h=s?g:`${v}px`),{data:{x,y:h}}}});function za(e){const[t,r="center"]=e.split("-");return[t,r]}var Eu=La,Cu=$a,Su=Fa,Pu=Wa,Ru="VisuallyHidden",Va=f.forwardRef((e,t)=>m.jsx(le.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}}));Va.displayName=Ru;var Au=Va,[gr,rf]=St("Tooltip",[ja]),vr=ja(),Ha="TooltipProvider",Tu=700,Vr="tooltip.open",[Ou,vn]=gr(Ha),Ua=e=>{const{__scopeTooltip:t,delayDuration:r=Tu,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,[s,i]=f.useState(!0),c=f.useRef(!1),d=f.useRef(0);return f.useEffect(()=>{const u=d.current;return()=>window.clearTimeout(u)},[]),m.jsx(Ou,{scope:t,isOpenDelayed:s,delayDuration:r,onOpen:f.useCallback(()=>{window.clearTimeout(d.current),i(!1)},[]),onClose:f.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>i(!0),n)},[n]),isPointerInTransitRef:c,onPointerInTransitChange:f.useCallback(u=>{c.current=u},[]),disableHoverableContent:o,children:a})};Ua.displayName=Ha;var hr="Tooltip",[Nu,mr]=gr(hr),Ya=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,c=vn(hr,e.__scopeTooltip),d=vr(t),[u,g]=f.useState(null),l=Qt(),v=f.useRef(0),x=s??c.disableHoverableContent,h=i??c.delayDuration,y=f.useRef(!1),[E=!1,b]=Xr({prop:n,defaultProp:o,onChange:O=>{O?(c.onOpen(),document.dispatchEvent(new CustomEvent(Vr))):c.onClose(),a==null||a(O)}}),C=f.useMemo(()=>E?y.current?"delayed-open":"instant-open":"closed",[E]),P=f.useCallback(()=>{window.clearTimeout(v.current),y.current=!1,b(!0)},[b]),R=f.useCallback(()=>{window.clearTimeout(v.current),b(!1)},[b]),D=f.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{y.current=!0,b(!0)},h)},[h,b]);return f.useEffect(()=>()=>window.clearTimeout(v.current),[]),m.jsx(Eu,{...d,children:m.jsx(Nu,{scope:t,contentId:l,open:E,stateAttribute:C,trigger:u,onTriggerChange:g,onTriggerEnter:f.useCallback(()=>{c.isOpenDelayed?D():P()},[c.isOpenDelayed,D,P]),onTriggerLeave:f.useCallback(()=>{x?R():window.clearTimeout(v.current)},[R,x]),onOpen:P,onClose:R,disableHoverableContent:x,children:r})})};Ya.displayName=hr;var Hr="TooltipTrigger",Ga=f.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=mr(Hr,r),a=vn(Hr,r),s=vr(r),i=f.useRef(null),c=pe(t,i,o.onTriggerChange),d=f.useRef(!1),u=f.useRef(!1),g=f.useCallback(()=>d.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),m.jsx(Cu,{asChild:!0,...s,children:m.jsx(le.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:c,onPointerMove:ue(e.onPointerMove,l=>{l.pointerType!=="touch"&&!u.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:ue(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:ue(e.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:ue(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:ue(e.onBlur,o.onClose),onClick:ue(e.onClick,o.onClose)})})});Ga.displayName=Hr;var Du="TooltipPortal",[nf,ku]=gr(Du,{forceMount:void 0}),Ct="TooltipContent",qa=f.forwardRef((e,t)=>{const r=ku(Ct,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,s=mr(Ct,e.__scopeTooltip);return m.jsx($t,{present:n||s.open,children:s.disableHoverableContent?m.jsx(Ka,{side:o,...a,ref:t}):m.jsx(_u,{side:o,...a,ref:t})})}),_u=f.forwardRef((e,t)=>{const r=mr(Ct,e.__scopeTooltip),n=vn(Ct,e.__scopeTooltip),o=f.useRef(null),a=pe(t,o),[s,i]=f.useState(null),{trigger:c,onClose:d}=r,u=o.current,{onPointerInTransitChange:g}=n,l=f.useCallback(()=>{i(null),g(!1)},[g]),v=f.useCallback((x,h)=>{const y=x.currentTarget,E={x:x.clientX,y:x.clientY},b=Lu(E,y.getBoundingClientRect()),C=Iu(E,b),P=$u(h.getBoundingClientRect()),R=Bu([...C,...P]);i(R),g(!0)},[g]);return f.useEffect(()=>()=>l(),[l]),f.useEffect(()=>{if(c&&u){const x=y=>v(y,u),h=y=>v(y,c);return c.addEventListener("pointerleave",x),u.addEventListener("pointerleave",h),()=>{c.removeEventListener("pointerleave",x),u.removeEventListener("pointerleave",h)}}},[c,u,v,l]),f.useEffect(()=>{if(s){const x=h=>{const y=h.target,E={x:h.clientX,y:h.clientY},b=(c==null?void 0:c.contains(y))||(u==null?void 0:u.contains(y)),C=!Fu(E,s);b?l():C&&(l(),d())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,u,s,d,l]),m.jsx(Ka,{...e,ref:a})}),[ju,Mu]=gr(hr,{isInside:!1}),Ka=f.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,c=mr(Ct,r),d=vr(r),{onClose:u}=c;return f.useEffect(()=>(document.addEventListener(Vr,u),()=>document.removeEventListener(Vr,u)),[u]),f.useEffect(()=>{if(c.trigger){const g=l=>{const v=l.target;v!=null&&v.contains(c.trigger)&&u()};return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[c.trigger,u]),m.jsx(Zr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:g=>g.preventDefault(),onDismiss:u,children:m.jsxs(Su,{"data-state":c.stateAttribute,...d,...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:[m.jsx(Jr,{children:n}),m.jsx(ju,{scope:r,isInside:!0,children:m.jsx(Au,{id:c.contentId,role:"tooltip",children:o||n})})]})})});qa.displayName=Ct;var Xa="TooltipArrow",Ja=f.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=vr(r);return Mu(Xa,r).isInside?null:m.jsx(Pu,{...o,...n,ref:t})});Ja.displayName=Xa;function Lu(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 Iu(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 $u(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 Fu(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,c=t[a].y,d=t[s].x,u=t[s].y;c>n!=u>n&&r<(d-i)*(n-c)/(u-c)+i&&(o=!o)}return o}function Bu(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),Wu(t)}function Wu(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 zu=Ua,Vu=Ya,Hu=Ga,Za=qa,Uu=Ja;const Qa=zu,es=Vu,ts=Hu,rs=Uu,hn=f.forwardRef(({className:e,sideOffset:t=4,...r},n)=>m.jsx(Za,{ref:n,sideOffset:t,className:fe("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}));hn.displayName=Za.displayName;const Yu=({displayName:e,fieldId:t,children:r})=>{const{tooltipsVisible:n}=os();let o="";return e&&t?o=`${e} (${t})`:t?o=`(${t})`:e&&(o=`${e}`),m.jsx("div",{children:m.jsx(Qa,{children:m.jsxs(es,{open:n&&!!o,children:[m.jsx(ts,{asChild:!0,children:m.jsx("div",{className:n?"ve-outline-2 ve-outline-dotted ve-outline-[#5A58F2]":"",children:r})}),m.jsxs(hn,{children:[m.jsx("p",{children:o}),m.jsx(rs,{fill:"bg-popover"})]})]})})})},ns=w.createContext(void 0),Gu=({children:e})=>{const[t,r]=w.useState(!1),n=()=>{r(o=>!o)};return m.jsx(ns.Provider,{value:{tooltipsVisible:t,toggleTooltips:n},children:e})},os=()=>{const e=w.useContext(ns);return e||{tooltipsVisible:!1,toggleTooltips:()=>{}}},qu=(e,t,r,n,o,a)=>{const{history:{back:s,forward:i,histories:c,index:d,hasPast:u,hasFuture:g,setHistories:l}}=_e.usePuck();return w.useEffect(()=>{t(c,d)},[d,c,t]),m.jsxs("header",{className:"puck-header",children:[m.jsxs("div",{className:"header-left",children:[m.jsx(Xu,{}),m.jsx(Ju,{})]}),m.jsx("div",{className:"header-center"}),m.jsxs("div",{className:"actions",children:[m.jsx(Xe,{variant:"ghost",size:"icon",disabled:!u,onClick:s,children:m.jsx(_s,{className:"sm-icon"})}),m.jsx(Xe,{variant:"ghost",size:"icon",disabled:!g,onClick:i,children:m.jsx(js,{className:"sm-icon"})}),m.jsx(Ku,{disabled:c.length===1,onClearLocalChanges:()=>{e(),l([{id:"root",state:{data:n}}])}}),!a&&m.jsx(Xe,{variant:"secondary",disabled:c.length===1,onClick:async()=>{await o(r),e()},children:"Publish"})]})]})},Ku=({disabled:e,onClearLocalChanges:t})=>{const[r,n]=w.useState(!1),o=()=>{t(),n(!1)};return m.jsxs(sc,{open:r,onOpenChange:n,children:[m.jsx(ic,{disabled:e,asChild:!0,children:m.jsx(Xe,{variant:"outline",children:"Clear Local Changes"})}),m.jsxs(da,{children:[m.jsxs(fa,{children:[m.jsx(ga,{children:"Clear Local Changes"}),m.jsx(va,{children:"This action will remove your local changes. It cannot be undone."})]}),m.jsxs(pa,{children:[m.jsx(ha,{children:"Cancel"}),m.jsx(Xe,{onClick:o,children:"Confirm"})]})]})]})},Xu=()=>{const{dispatch:e,appState:{ui:{leftSideBarVisible:t,rightSideBarVisible:r}}}=_e.usePuck(),n=w.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 m.jsxs(m.Fragment,{children:[m.jsx(Xe,{variant:"ghost",size:"icon",onClick:()=>{n("left")},children:m.jsx(Ds,{className:"sm-icon"})}),m.jsx(Xe,{variant:"ghost",size:"icon",onClick:()=>{n("right")},children:m.jsx(ks,{className:"sm-icon"})})]})},Ju=()=>{const{toggleTooltips:e,tooltipsVisible:t}=os();return m.jsx(Qa,{children:m.jsxs(es,{children:[m.jsx(ts,{asChild:!0,children:m.jsxs("div",{className:"ve-flex ve-flex-row ve-self-center ve-gap-3 ve-pl-2",children:[m.jsx(Ca,{onCheckedChange:e,checked:t}),m.jsx("p",{className:"ve-self-center ve-text-sm",children:"Entity Fields"})]})}),m.jsxs(hn,{children:[t?"Hide Entity Fields":"Show Entity Fields",m.jsx(rs,{fill:"ve-bg-popover"})]})]})})},qn="ROLE_",Kn="TEMPLATE_",Zu="LAYOUT_",Qu="ENTITY_";function Ur(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===Bd.INDIVIDUAL){if(!o)throw new Error(`EntityId required for role ${t}`);return a+qn+t+Kn+r+Qu+o}if(!n)throw new Error(`LayoutId required for role ${t}`);return a+qn+t+Kn+r+Zu+n}const ed=({puckConfig:e,puckInitialHistory:t,isLoading:r,clearHistory:n,templateMetadata:o,saveState:a,saveSaveState:s,saveVisualConfigData:i,sendDevSaveStateData:c,buildLocalStorageKey:d,devLogger:u})=>{const[g,l]=w.useState(!1),v=w.useRef(0),x=w.useCallback((b,C)=>{C!==0&&v.current!==C&&b.length>0&&(u.logFunc("handleHistoryChange"),u.logData("PUCK_INDEX",C),u.logData("PUCK_HISTORY",b),v.current=C,u.logFunc("saveToLocalStorage"),window.localStorage.setItem(d(),JSON.stringify(b)),(a==null?void 0:a.hash)!==b[C].id&&(o.isDevMode&&!o.devOverride?(u.logFunc("sendDevSaveStateData"),c({payload:{devSaveStateData:JSON.stringify(b[C].state.data)}})):(u.logFunc("saveSaveState"),s({payload:{hash:b[C].id,history:JSON.stringify(b[C].state)}}))))},[o,Ur,a]),h=()=>{n(),v.current=0},y=async b=>{u.logFunc("saveVisualConfigData"),i({payload:{visualConfigurationData:JSON.stringify(b)}})},E=async()=>{if(!r&&!g){l(!0);return}};return m.jsx(Gu,{children:m.jsx(_e.Puck,{config:e,data:{},initialHistory:t,onChange:E,overrides:{header:()=>{const{appState:b}=_e.usePuck();return qu(h,x,b.data,t==null?void 0:t.histories[0].state.data,y,o.isDevMode&&!o.devOverride)}}})})};var mn="Progress",bn=100,[td,of]=St(mn),[rd,nd]=td(mn),as=f.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:o,getValueLabel:a=od,...s}=e;(o||o===0)&&!Xn(o)&&console.error(ad(`${o}`,"Progress"));const i=Xn(o)?o:bn;n!==null&&!Jn(n,i)&&console.error(sd(`${n}`,"Progress"));const c=Jn(n,i)?n:null,d=lr(c)?a(c,i):void 0;return m.jsx(rd,{scope:r,value:c,max:i,children:m.jsx(le.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":lr(c)?c:void 0,"aria-valuetext":d,role:"progressbar","data-state":ls(c,i),"data-value":c??void 0,"data-max":i,...s,ref:t})})});as.displayName=mn;var ss="ProgressIndicator",is=f.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,o=nd(ss,r);return m.jsx(le.div,{"data-state":ls(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...n,ref:t})});is.displayName=ss;function od(e,t){return`${Math.round(e/t*100)}%`}function ls(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function lr(e){return typeof e=="number"}function Xn(e){return lr(e)&&!isNaN(e)&&e>0}function Jn(e,t){return lr(e)&&!isNaN(e)&&e<=t&&e>=0}function ad(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${bn}\`.`}function sd(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
125
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return d.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},gl=oa,hl=aa,yl=sa,ga=ia,ha=ca,ya=pa,ba=ma,xa=ua,wa=fa;function Ea(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ea(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function bl(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ea(e))&&(r&&(r+=" "),r+=t);return r}const mr="-";function xl(e){const t=El(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(s){const i=s.split(mr);return i[0]===""&&i.length!==1&&i.shift(),Ca(i,t)||wl(s)}function a(s,i){const c=n[s]||[];return i&&r[s]?[...c,...r[s]]:c}return{getClassGroupId:o,getConflictingClassGroupIds:a}}function Ca(e,t){var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Ca(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(mr);return(s=t.validators.find(({validator:i})=>i(a)))==null?void 0:s.classGroupId}const no=/^\[(.+)\]$/;function wl(e){if(no.test(e)){const t=no.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function El(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Sl(Object.entries(e.classGroups),n).forEach(([a,s])=>{Gn(s,r,a,t)}),r}function Gn(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:ro(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(Cl(o)){Gn(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,s])=>{Gn(s,ro(t,a),n,r)})})}function ro(e,t){let n=e;return t.split(mr).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function Cl(e){return e.isThemeGetter}function Sl(e,t){return t?e.map(([n,r])=>{const o=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,i])=>[t+s,i])):a);return[n,o]}):e}function Rl(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(a,s){n.set(a,s),t++,t>e&&(t=0,r=n,n=new Map)}return{get(a){let s=n.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return o(a,s),s},set(a,s){n.has(a)?n.set(a,s):o(a,s)}}}const Sa="!";function Pl(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],a=t.length;function s(i){const c=[];let u=0,f=0,p;for(let b=0;b<i.length;b++){let x=i[b];if(u===0){if(x===o&&(r||i.slice(b,b+a)===t)){c.push(i.slice(f,b)),f=b+a;continue}if(x==="/"){p=b;continue}}x==="["?u++:x==="]"&&u--}const l=c.length===0?i:i.substring(f),g=l.startsWith(Sa),y=g?l.substring(1):l,h=p&&p>f?p-f:void 0;return{modifiers:c,hasImportantModifier:g,baseClassName:y,maybePostfixModifierPosition:h}}return n?function(c){return n({className:c,parseClassName:s})}:s}function Al(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function Tl(e){return{cache:Rl(e.cacheSize),parseClassName:Pl(e),...xl(e)}}const Nl=/\s+/;function Ol(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=new Set;return e.trim().split(Nl).map(s=>{const{modifiers:i,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:f}=n(s);let p=!!f,l=r(p?u.substring(0,f):u);if(!l){if(!p)return{isTailwindClass:!1,originalClassName:s};if(l=r(u),!l)return{isTailwindClass:!1,originalClassName:s};p=!1}const g=Al(i).join(":");return{isTailwindClass:!0,modifierId:c?g+Sa:g,classGroupId:l,originalClassName:s,hasPostfixModifier:p}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:i,classGroupId:c,hasPostfixModifier:u}=s,f=i+c;return a.has(f)?!1:(a.add(f),o(c,u).forEach(p=>a.add(i+p)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function Dl(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Ra(t))&&(r&&(r+=" "),r+=n);return r}function Ra(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ra(e[r]))&&(n&&(n+=" "),n+=t);return n}function kl(e,...t){let n,r,o,a=s;function s(c){const u=t.reduce((f,p)=>p(f),e());return n=Tl(u),r=n.cache.get,o=n.cache.set,a=i,i(c)}function i(c){const u=r(c);if(u)return u;const f=Ol(c,n);return o(c,f),f}return function(){return a(Dl.apply(null,arguments))}}function re(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const Pa=/^\[(?:([a-z-]+):)?(.+)\]$/i,_l=/^\d+\/\d+$/,jl=new Set(["px","full","screen"]),Ml=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Il=/\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$/,Ll=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Fl=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$l=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function $e(e){return st(e)||jl.has(e)||_l.test(e)}function Ke(e){return Rt(e,"length",Yl)}function st(e){return!!e&&!Number.isNaN(Number(e))}function en(e){return Rt(e,"number",st)}function It(e){return!!e&&Number.isInteger(Number(e))}function Bl(e){return e.endsWith("%")&&st(e.slice(0,-1))}function W(e){return Pa.test(e)}function qe(e){return Ml.test(e)}const Wl=new Set(["length","size","percentage"]);function Vl(e){return Rt(e,Wl,Aa)}function zl(e){return Rt(e,"position",Aa)}const Ul=new Set(["image","url"]);function Hl(e){return Rt(e,Ul,ql)}function Gl(e){return Rt(e,"",Kl)}function Lt(){return!0}function Rt(e,t,n){const r=Pa.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function Yl(e){return Il.test(e)&&!Ll.test(e)}function Aa(){return!1}function Kl(e){return Fl.test(e)}function ql(e){return $l.test(e)}function Xl(){const e=re("colors"),t=re("spacing"),n=re("blur"),r=re("brightness"),o=re("borderColor"),a=re("borderRadius"),s=re("borderSpacing"),i=re("borderWidth"),c=re("contrast"),u=re("grayscale"),f=re("hueRotate"),p=re("invert"),l=re("gap"),g=re("gradientColorStops"),y=re("gradientColorStopPositions"),h=re("inset"),b=re("margin"),x=re("opacity"),w=re("padding"),C=re("saturate"),P=re("scale"),R=re("sepia"),D=re("skew"),A=re("space"),O=re("translate"),$=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto",W,t],k=()=>[W,t],I=()=>["",$e,Ke],B=()=>["auto",st,W],q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],_=()=>["solid","dashed","dotted","double","none"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>["start","end","center","between","around","evenly","stretch"],U=()=>["","0",W],se=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>[st,en],H=()=>[st,W];return{cacheSize:500,separator:":",theme:{colors:[Lt],spacing:[$e,Ke],blur:["none","",qe,W],brightness:L(),borderColor:[e],borderRadius:["none","","full",qe,W],borderSpacing:k(),borderWidth:I(),contrast:L(),grayscale:U(),hueRotate:H(),invert:U(),gap:k(),gradientColorStops:[e],gradientColorStopPositions:[Bl,Ke],inset:z(),margin:z(),opacity:L(),padding:k(),saturate:L(),scale:L(),sepia:U(),skew:H(),space:k(),translate:k()},classGroups:{aspect:[{aspect:["auto","square","video",W]}],container:["container"],columns:[{columns:[qe]}],"break-after":[{"break-after":se()}],"break-before":[{"break-before":se()}],"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:[...q(),W]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],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",It,W]}],basis:[{basis:z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",W]}],grow:[{grow:U()}],shrink:[{shrink:U()}],order:[{order:["first","last","none",It,W]}],"grid-cols":[{"grid-cols":[Lt]}],"col-start-end":[{col:["auto",{span:["full",It,W]},W]}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":[Lt]}],"row-start-end":[{row:["auto",{span:[It,W]},W]}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",W]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",W]}],gap:[{gap:[l]}],"gap-x":[{"gap-x":[l]}],"gap-y":[{"gap-y":[l]}],"justify-content":[{justify:["normal",...N()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...N(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...N(),"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":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",W,t]}],"min-w":[{"min-w":[W,t,"min","max","fit"]}],"max-w":[{"max-w":[W,t,"none","full","min","max","fit","prose",{screen:[qe]},qe]}],h:[{h:[W,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[W,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[W,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[W,t,"auto","min","max","fit"]}],"font-size":[{text:["base",qe,Ke]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",en]}],"font-family":[{font:[Lt]}],"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",W]}],"line-clamp":[{"line-clamp":["none",st,en]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",$e,W]}],"list-image":[{"list-image":["none",W]}],"list-style-type":[{list:["none","disc","decimal",W]}],"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:[..._(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",$e,Ke]}],"underline-offset":[{"underline-offset":["auto",$e,W]}],"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:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",W]}],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",W]}],"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:[...q(),zl]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Vl]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Hl]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],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:[..._(),"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:_()}],"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:["",..._()]}],"outline-offset":[{"outline-offset":[$e,W]}],"outline-w":[{outline:[$e,Ke]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[$e,Ke]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",qe,Gl]}],"shadow-color":[{shadow:[Lt]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...X(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":X()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",qe,W]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[p]}],saturate:[{saturate:[C]}],sepia:[{sepia:[R]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[R]}],"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",W]}],duration:[{duration:H()}],ease:[{ease:["linear","in","out","in-out",W]}],delay:[{delay:H()}],animate:[{animate:["none","spin","ping","pulse","bounce",W]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[P]}],"scale-x":[{"scale-x":[P]}],"scale-y":[{"scale-y":[P]}],rotate:[{rotate:[It,W]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[D]}],"skew-y":[{"skew-y":[D]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",W]}],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",W]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",W]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[$e,Ke,en]}],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 Jl=kl(Xl);function de(...e){return Jl(bl(e))}function Ta(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Ta(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Zl(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Ta(e))&&(r&&(r+=" "),r+=t);return r}const oo=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,ao=Zl,mn=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return ao(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(u=>{const f=n==null?void 0:n[u],p=a==null?void 0:a[u];if(f===null)return null;const l=oo(f)||oo(p);return o[u][l]}),i=n&&Object.entries(n).reduce((u,f)=>{let[p,l]=f;return l===void 0||(u[p]=l),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:p,className:l,...g}=f;return Object.entries(g).every(y=>{let[h,b]=y;return Array.isArray(b)?b.includes({...a,...i}[h]):{...a,...i}[h]===b})?[...u,p,l]:u},[]);return ao(e,s,c,n==null?void 0:n.class,n==null?void 0:n.className)},gr=mn("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"}}),Ql=d.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},a)=>{const s=r?it:"button";return v.jsx(s,{className:de(gr({variant:t,size:n,className:e})),ref:a,...o})});Ql.displayName="Button";const eu=gl,tu=hl,nu=yl,Na=d.forwardRef(({className:e,...t},n)=>v.jsx(ga,{className:de("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:n}));Na.displayName=ga.displayName;const Oa=d.forwardRef(({className:e,...t},n)=>v.jsxs(nu,{children:[v.jsx(Na,{}),v.jsx(ha,{ref:n,className:de("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})]}));Oa.displayName=ha.displayName;const Da=({className:e,...t})=>v.jsx("div",{className:de("ve-flex ve-flex-col ve-space-y-2 ve-text-center sm:ve-text-left",e),...t});Da.displayName="AlertDialogHeader";const ka=({className:e,...t})=>v.jsx("div",{className:de("ve-flex ve-flex-col-reverse sm:ve-flex-row sm:ve-justify-end sm:ve-space-x-2",e),...t});ka.displayName="AlertDialogFooter";const _a=d.forwardRef(({className:e,...t},n)=>v.jsx(xa,{ref:n,className:de("ve-text-lg ve-font-semibold",e),...t}));_a.displayName=xa.displayName;const ja=d.forwardRef(({className:e,...t},n)=>v.jsx(wa,{ref:n,className:de("ve-text-sm ve-text-muted-foreground",e),...t}));ja.displayName=wa.displayName;const ru=d.forwardRef(({className:e,...t},n)=>v.jsx(ya,{ref:n,className:de(gr(),e),...t}));ru.displayName=ya.displayName;const Ma=d.forwardRef(({className:e,...t},n)=>v.jsx(ba,{ref:n,className:de(gr({variant:"outline"}),"ve-mt-2 sm:ve-mt-0",e),...t}));Ma.displayName=ba.displayName;const ou=mn("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"}}),Je=d.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},a)=>{const s=r?it:"button";return v.jsx(s,{className:de(ou({variant:t,size:n,className:e})),ref:a,...o})});Je.displayName="Button";function Ia(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 hr(e){const[t,n]=d.useState(void 0);return We(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;n({width:s,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var yr="Switch",[au,Lp]=nt(yr),[su,iu]=au(yr),La=d.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:s,disabled:i,value:c="on",onCheckedChange:u,...f}=e,[p,l]=d.useState(null),g=ue(t,w=>l(w)),y=d.useRef(!1),h=p?!!p.closest("form"):!0,[b=!1,x]=Vt({prop:o,defaultProp:a,onChange:u});return v.jsxs(su,{scope:n,checked:b,disabled:i,children:[v.jsx(ae.button,{type:"button",role:"switch","aria-checked":b,"aria-required":s,"data-state":Ba(b),"data-disabled":i?"":void 0,disabled:i,value:c,...f,ref:g,onClick:oe(e.onClick,w=>{x(C=>!C),h&&(y.current=w.isPropagationStopped(),y.current||w.stopPropagation())})}),h&&v.jsx(cu,{control:p,bubbles:!y.current,name:r,value:c,checked:b,required:s,disabled:i,style:{transform:"translateX(-100%)"}})]})});La.displayName=yr;var Fa="SwitchThumb",$a=d.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=iu(Fa,n);return v.jsx(ae.span,{"data-state":Ba(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});$a.displayName=Fa;var cu=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=d.useRef(null),s=Ia(n),i=hr(t);return d.useEffect(()=>{const c=a.current,u=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(u,"checked").set;if(s!==n&&p){const l=new Event("click",{bubbles:r});p.call(c,n),c.dispatchEvent(l)}},[s,n,r]),v.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...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=La,lu=$a;const br=d.forwardRef(({className:e,...t},n)=>v.jsx(Wa,{className:de("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:n,children:v.jsx(lu,{className:de("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")})}));br.displayName=Wa.displayName;const uu=["top","right","bottom","left"],Ze=Math.min,Ce=Math.max,ln=Math.round,tn=Math.floor,Qe=e=>({x:e,y:e}),du={left:"right",right:"left",bottom:"top",top:"bottom"},fu={start:"end",end:"start"};function Yn(e,t,n){return Ce(e,Ze(t,n))}function ze(e,t){return typeof e=="function"?e(t):e}function Ue(e){return e.split("-")[0]}function Pt(e){return e.split("-")[1]}function xr(e){return e==="x"?"y":"x"}function wr(e){return e==="y"?"height":"width"}function et(e){return["top","bottom"].includes(Ue(e))?"y":"x"}function Er(e){return xr(et(e))}function pu(e,t,n){n===void 0&&(n=!1);const r=Pt(e),o=Er(e),a=wr(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=un(s)),[s,un(s)]}function vu(e){const t=un(e);return[Kn(e),t,Kn(t)]}function Kn(e){return e.replace(/start|end/g,t=>fu[t])}function mu(e,t,n){const r=["left","right"],o=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?a:s;default:return[]}}function gu(e,t,n,r){const o=Pt(e);let a=mu(Ue(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(Kn)))),a}function un(e){return e.replace(/left|right|bottom|top/g,t=>du[t])}function hu(e){return{top:0,right:0,bottom:0,left:0,...e}}function Va(e){return typeof e!="number"?hu(e):{top:e,right:e,bottom:e,left:e}}function dn(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function so(e,t,n){let{reference:r,floating:o}=e;const a=et(t),s=Er(t),i=wr(s),c=Ue(t),u=a==="y",f=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,l=r[i]/2-o[i]/2;let g;switch(c){case"top":g={x:f,y:r.y-o.height};break;case"bottom":g={x:f,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:p};break;case"left":g={x:r.x-o.width,y:p};break;default:g={x:r.x,y:r.y}}switch(Pt(t)){case"start":g[s]-=l*(n&&u?-1:1);break;case"end":g[s]+=l*(n&&u?-1:1);break}return g}const yu=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,i=a.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=so(u,r,c),l=r,g={},y=0;for(let h=0;h<i.length;h++){const{name:b,fn:x}=i[h],{x:w,y:C,data:P,reset:R}=await x({x:f,y:p,initialPlacement:r,placement:l,strategy:o,middlewareData:g,rects:u,platform:s,elements:{reference:e,floating:t}});f=w??f,p=C??p,g={...g,[b]:{...g[b],...P}},R&&y<=50&&(y++,typeof R=="object"&&(R.placement&&(l=R.placement),R.rects&&(u=R.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:f,y:p}=so(u,l,c)),h=-1)}return{x:f,y:p,placement:l,strategy:o,middlewareData:g}};async function $t(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:i,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:l=!1,padding:g=0}=ze(t,e),y=Va(g),b=i[l?p==="floating"?"reference":"floating":p],x=dn(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(b)))==null||n?b:b.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:f,strategy:c})),w=p==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),P=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},R=dn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:w,offsetParent:C,strategy:c}):w);return{top:(x.top-R.top+y.top)/P.y,bottom:(R.bottom-x.bottom+y.bottom)/P.y,left:(x.left-R.left+y.left)/P.x,right:(R.right-x.right+y.right)/P.x}}const bu=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:s,elements:i,middlewareData:c}=t,{element:u,padding:f=0}=ze(e,t)||{};if(u==null)return{};const p=Va(f),l={x:n,y:r},g=Er(o),y=wr(g),h=await s.getDimensions(u),b=g==="y",x=b?"top":"left",w=b?"bottom":"right",C=b?"clientHeight":"clientWidth",P=a.reference[y]+a.reference[g]-l[g]-a.floating[y],R=l[g]-a.reference[g],D=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let A=D?D[C]:0;(!A||!await(s.isElement==null?void 0:s.isElement(D)))&&(A=i.floating[C]||a.floating[y]);const O=P/2-R/2,$=A/2-h[y]/2-1,M=Ze(p[x],$),z=Ze(p[w],$),k=M,I=A-h[y]-z,B=A/2-h[y]/2+O,q=Yn(k,B,I),_=!c.arrow&&Pt(o)!=null&&B!==q&&a.reference[y]/2-(B<k?M:z)-h[y]/2<0,X=_?B<k?B-k:B-I:0;return{[g]:l[g]+X,data:{[g]:q,centerOffset:B-q-X,..._&&{alignmentOffset:X}},reset:_}}}),xu=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:l,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:h=!0,...b}=ze(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const x=Ue(o),w=et(i),C=Ue(i)===i,P=await(c.isRTL==null?void 0:c.isRTL(u.floating)),R=l||(C||!h?[un(i)]:vu(i)),D=y!=="none";!l&&D&&R.push(...gu(i,h,y,P));const A=[i,...R],O=await $t(t,b),$=[];let M=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&$.push(O[x]),p){const B=pu(o,s,P);$.push(O[B[0]],O[B[1]])}if(M=[...M,{placement:o,overflows:$}],!$.every(B=>B<=0)){var z,k;const B=(((z=a.flip)==null?void 0:z.index)||0)+1,q=A[B];if(q)return{data:{index:B,overflows:M},reset:{placement:q}};let _=(k=M.filter(X=>X.overflows[0]<=0).sort((X,N)=>X.overflows[1]-N.overflows[1])[0])==null?void 0:k.placement;if(!_)switch(g){case"bestFit":{var I;const X=(I=M.filter(N=>{if(D){const U=et(N.placement);return U===w||U==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(U=>U>0).reduce((U,se)=>U+se,0)]).sort((N,U)=>N[1]-U[1])[0])==null?void 0:I[0];X&&(_=X);break}case"initialPlacement":_=i;break}if(o!==_)return{reset:{placement:_}}}return{}}}};function io(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function co(e){return uu.some(t=>e[t]>=0)}const wu=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=ze(e,t);switch(r){case"referenceHidden":{const a=await $t(t,{...o,elementContext:"reference"}),s=io(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:co(s)}}}case"escaped":{const a=await $t(t,{...o,altBoundary:!0}),s=io(a,n.floating);return{data:{escapedOffsets:s,escaped:co(s)}}}default:return{}}}}};async function Eu(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Ue(n),i=Pt(n),c=et(n)==="y",u=["left","top"].includes(s)?-1:1,f=a&&c?-1:1,p=ze(t,e);let{mainAxis:l,crossAxis:g,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return i&&typeof y=="number"&&(g=i==="end"?y*-1:y),c?{x:g*f,y:l*u}:{x:l*u,y:g*f}}const Cu=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:s,middlewareData:i}=t,c=await Eu(t,e);return s===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:s}}}}},Su=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:b=>{let{x,y:w}=b;return{x,y:w}}},...c}=ze(e,t),u={x:n,y:r},f=await $t(t,c),p=et(Ue(o)),l=xr(p);let g=u[l],y=u[p];if(a){const b=l==="y"?"top":"left",x=l==="y"?"bottom":"right",w=g+f[b],C=g-f[x];g=Yn(w,g,C)}if(s){const b=p==="y"?"top":"left",x=p==="y"?"bottom":"right",w=y+f[b],C=y-f[x];y=Yn(w,y,C)}const h=i.fn({...t,[l]:g,[p]:y});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[l]:a,[p]:s}}}}}},Ru=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:c=!0,crossAxis:u=!0}=ze(e,t),f={x:n,y:r},p=et(o),l=xr(p);let g=f[l],y=f[p];const h=ze(i,t),b=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){const C=l==="y"?"height":"width",P=a.reference[l]-a.floating[C]+b.mainAxis,R=a.reference[l]+a.reference[C]-b.mainAxis;g<P?g=P:g>R&&(g=R)}if(u){var x,w;const C=l==="y"?"width":"height",P=["top","left"].includes(Ue(o)),R=a.reference[p]-a.floating[C]+(P&&((x=s.offset)==null?void 0:x[p])||0)+(P?0:b.crossAxis),D=a.reference[p]+a.reference[C]+(P?0:((w=s.offset)==null?void 0:w[p])||0)-(P?b.crossAxis:0);y<R?y=R:y>D&&(y=D)}return{[l]:g,[p]:y}}}},Pu=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:c=()=>{},...u}=ze(e,t),f=await $t(t,u),p=Ue(o),l=Pt(o),g=et(o)==="y",{width:y,height:h}=a.floating;let b,x;p==="top"||p==="bottom"?(b=p,x=l===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(x=p,b=l==="end"?"top":"bottom");const w=h-f.top-f.bottom,C=y-f.left-f.right,P=Ze(h-f[b],w),R=Ze(y-f[x],C),D=!t.middlewareData.shift;let A=P,O=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(A=w),D&&!l){const M=Ce(f.left,0),z=Ce(f.right,0),k=Ce(f.top,0),I=Ce(f.bottom,0);g?O=y-2*(M!==0||z!==0?M+z:Ce(f.left,f.right)):A=h-2*(k!==0||I!==0?k+I:Ce(f.top,f.bottom))}await c({...t,availableWidth:O,availableHeight:A});const $=await s.getDimensions(i.floating);return y!==$.width||h!==$.height?{reset:{rects:!0}}:{}}}};function gn(){return typeof window<"u"}function At(e){return za(e)?(e.nodeName||"").toLowerCase():"#document"}function Se(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function je(e){var t;return(t=(za(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function za(e){return gn()?e instanceof Node||e instanceof Se(e).Node:!1}function Te(e){return gn()?e instanceof Element||e instanceof Se(e).Element:!1}function _e(e){return gn()?e instanceof HTMLElement||e instanceof Se(e).HTMLElement:!1}function lo(e){return!gn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Se(e).ShadowRoot}function Ut(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ne(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Au(e){return["table","td","th"].includes(At(e))}function hn(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Cr(e){const t=Sr(),n=Te(e)?Ne(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Tu(e){let t=tt(e);for(;_e(t)&&!Ct(t);){if(Cr(t))return t;if(hn(t))return null;t=tt(t)}return null}function Sr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ct(e){return["html","body","#document"].includes(At(e))}function Ne(e){return Se(e).getComputedStyle(e)}function yn(e){return Te(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tt(e){if(At(e)==="html")return e;const t=e.assignedSlot||e.parentNode||lo(e)&&e.host||je(e);return lo(t)?t.host:t}function Ua(e){const t=tt(e);return Ct(t)?e.ownerDocument?e.ownerDocument.body:e.body:_e(t)&&Ut(t)?t:Ua(t)}function Bt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ua(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=Se(o);if(a){const i=qn(s);return t.concat(s,s.visualViewport||[],Ut(o)?o:[],i&&n?Bt(i):[])}return t.concat(o,Bt(o,[],n))}function qn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ha(e){const t=Ne(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=_e(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=ln(n)!==a||ln(r)!==s;return i&&(n=a,r=s),{width:n,height:r,$:i}}function Rr(e){return Te(e)?e:e.contextElement}function wt(e){const t=Rr(e);if(!_e(t))return Qe(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Ha(t);let s=(a?ln(n.width):n.width)/r,i=(a?ln(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const Nu=Qe(0);function Ga(e){const t=Se(e);return!Sr()||!t.visualViewport?Nu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ou(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Se(e)?!1:t}function lt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Rr(e);let s=Qe(1);t&&(r?Te(r)&&(s=wt(r)):s=wt(e));const i=Ou(a,n,r)?Ga(a):Qe(0);let c=(o.left+i.x)/s.x,u=(o.top+i.y)/s.y,f=o.width/s.x,p=o.height/s.y;if(a){const l=Se(a),g=r&&Te(r)?Se(r):r;let y=l,h=qn(y);for(;h&&r&&g!==y;){const b=wt(h),x=h.getBoundingClientRect(),w=Ne(h),C=x.left+(h.clientLeft+parseFloat(w.paddingLeft))*b.x,P=x.top+(h.clientTop+parseFloat(w.paddingTop))*b.y;c*=b.x,u*=b.y,f*=b.x,p*=b.y,c+=C,u+=P,y=Se(h),h=qn(y)}}return dn({width:f,height:p,x:c,y:u})}function Du(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=je(r),i=t?hn(t.floating):!1;if(r===s||i&&a)return n;let c={scrollLeft:0,scrollTop:0},u=Qe(1);const f=Qe(0),p=_e(r);if((p||!p&&!a)&&((At(r)!=="body"||Ut(s))&&(c=yn(r)),_e(r))){const l=lt(r);u=wt(r),f.x=l.x+r.clientLeft,f.y=l.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x,y:n.y*u.y-c.scrollTop*u.y+f.y}}function ku(e){return Array.from(e.getClientRects())}function Xn(e,t){const n=yn(e).scrollLeft;return t?t.left+n:lt(je(e)).left+n}function _u(e){const t=je(e),n=yn(e),r=e.ownerDocument.body,o=Ce(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ce(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Xn(e);const i=-n.scrollTop;return Ne(r).direction==="rtl"&&(s+=Ce(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:i}}function ju(e,t){const n=Se(e),r=je(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,c=0;if(o){a=o.width,s=o.height;const u=Sr();(!u||u&&t==="fixed")&&(i=o.offsetLeft,c=o.offsetTop)}return{width:a,height:s,x:i,y:c}}function Mu(e,t){const n=lt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=_e(e)?wt(e):Qe(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,c=o*a.x,u=r*a.y;return{width:s,height:i,x:c,y:u}}function uo(e,t,n){let r;if(t==="viewport")r=ju(e,n);else if(t==="document")r=_u(je(e));else if(Te(t))r=Mu(t,n);else{const o=Ga(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return dn(r)}function Ya(e,t){const n=tt(e);return n===t||!Te(n)||Ct(n)?!1:Ne(n).position==="fixed"||Ya(n,t)}function Iu(e,t){const n=t.get(e);if(n)return n;let r=Bt(e,[],!1).filter(i=>Te(i)&&At(i)!=="body"),o=null;const a=Ne(e).position==="fixed";let s=a?tt(e):e;for(;Te(s)&&!Ct(s);){const i=Ne(s),c=Cr(s);!c&&i.position==="fixed"&&(o=null),(a?!c&&!o:!c&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ut(s)&&!c&&Ya(e,s))?r=r.filter(f=>f!==s):o=i,s=tt(s)}return t.set(e,r),r}function Lu(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?hn(t)?[]:Iu(t,this._c):[].concat(n),r],i=s[0],c=s.reduce((u,f)=>{const p=uo(t,f,o);return u.top=Ce(p.top,u.top),u.right=Ze(p.right,u.right),u.bottom=Ze(p.bottom,u.bottom),u.left=Ce(p.left,u.left),u},uo(t,i,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Fu(e){const{width:t,height:n}=Ha(e);return{width:t,height:n}}function $u(e,t,n){const r=_e(t),o=je(t),a=n==="fixed",s=lt(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const c=Qe(0);if(r||!r&&!a)if((At(t)!=="body"||Ut(o))&&(i=yn(t)),r){const g=lt(t,!0,a,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else o&&(c.x=Xn(o));let u=0,f=0;if(o&&!r&&!a){const g=o.getBoundingClientRect();f=g.top+i.scrollTop,u=g.left+i.scrollLeft-Xn(o,g)}const p=s.left+i.scrollLeft-c.x-u,l=s.top+i.scrollTop-c.y-f;return{x:p,y:l,width:s.width,height:s.height}}function Ln(e){return Ne(e).position==="static"}function fo(e,t){if(!_e(e)||Ne(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return je(e)===n&&(n=n.ownerDocument.body),n}function Ka(e,t){const n=Se(e);if(hn(e))return n;if(!_e(e)){let o=tt(e);for(;o&&!Ct(o);){if(Te(o)&&!Ln(o))return o;o=tt(o)}return n}let r=fo(e,t);for(;r&&Au(r)&&Ln(r);)r=fo(r,t);return r&&Ct(r)&&Ln(r)&&!Cr(r)?n:r||Tu(e)||n}const Bu=async function(e){const t=this.getOffsetParent||Ka,n=this.getDimensions,r=await n(e.floating);return{reference:$u(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Wu(e){return Ne(e).direction==="rtl"}const Vu={convertOffsetParentRelativeRectToViewportRelativeRect:Du,getDocumentElement:je,getClippingRect:Lu,getOffsetParent:Ka,getElementRects:Bu,getClientRects:ku,getDimensions:Fu,getScale:wt,isElement:Te,isRTL:Wu};function zu(e,t){let n=null,r;const o=je(e);function a(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function s(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),a();const{left:u,top:f,width:p,height:l}=e.getBoundingClientRect();if(i||t(),!p||!l)return;const g=tn(f),y=tn(o.clientWidth-(u+p)),h=tn(o.clientHeight-(f+l)),b=tn(u),w={rootMargin:-g+"px "+-y+"px "+-h+"px "+-b+"px",threshold:Ce(0,Ze(1,c))||1};let C=!0;function P(R){const D=R[0].intersectionRatio;if(D!==c){if(!C)return s();D?s(!1,D):r=setTimeout(()=>{s(!1,1e-7)},1e3)}C=!1}try{n=new IntersectionObserver(P,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(P,w)}n.observe(e)}return s(!0),a}function Uu(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Rr(e),f=o||a?[...u?Bt(u):[],...Bt(t)]:[];f.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),a&&x.addEventListener("resize",n)});const p=u&&i?zu(u,n):null;let l=-1,g=null;s&&(g=new ResizeObserver(x=>{let[w]=x;w&&w.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(l),l=requestAnimationFrame(()=>{var C;(C=g)==null||C.observe(t)})),n()}),u&&!c&&g.observe(u),g.observe(t));let y,h=c?lt(e):null;c&&b();function b(){const x=lt(e);h&&(x.x!==h.x||x.y!==h.y||x.width!==h.width||x.height!==h.height)&&n(),h=x,y=requestAnimationFrame(b)}return n(),()=>{var x;f.forEach(w=>{o&&w.removeEventListener("scroll",n),a&&w.removeEventListener("resize",n)}),p==null||p(),(x=g)==null||x.disconnect(),g=null,c&&cancelAnimationFrame(y)}}const Hu=Cu,Gu=Su,Yu=xu,Ku=Pu,qu=wu,po=bu,Xu=Ru,Ju=(e,t,n)=>{const r=new Map,o={platform:Vu,...n},a={...o.platform,_c:r};return yu(e,t,{...o,platform:a})};var sn=typeof document<"u"?E.useLayoutEffect:E.useEffect;function fn(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 n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!fn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!fn(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function qa(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vo(e,t){const n=qa(e);return Math.round(t*n)/n}function Fn(e){const t=d.useRef(e);return sn(()=>{t.current=e}),t}function Zu(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:c,open:u}=e,[f,p]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[l,g]=d.useState(r);fn(l,r)||g(r);const[y,h]=d.useState(null),[b,x]=d.useState(null),w=d.useCallback(N=>{N!==D.current&&(D.current=N,h(N))},[]),C=d.useCallback(N=>{N!==A.current&&(A.current=N,x(N))},[]),P=a||y,R=s||b,D=d.useRef(null),A=d.useRef(null),O=d.useRef(f),$=c!=null,M=Fn(c),z=Fn(o),k=Fn(u),I=d.useCallback(()=>{if(!D.current||!A.current)return;const N={placement:t,strategy:n,middleware:l};z.current&&(N.platform=z.current),Ju(D.current,A.current,N).then(U=>{const se={...U,isPositioned:k.current!==!1};B.current&&!fn(O.current,se)&&(O.current=se,cr.flushSync(()=>{p(se)}))})},[l,t,n,z,k]);sn(()=>{u===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,p(N=>({...N,isPositioned:!1})))},[u]);const B=d.useRef(!1);sn(()=>(B.current=!0,()=>{B.current=!1}),[]),sn(()=>{if(P&&(D.current=P),R&&(A.current=R),P&&R){if(M.current)return M.current(P,R,I);I()}},[P,R,I,M,$]);const q=d.useMemo(()=>({reference:D,floating:A,setReference:w,setFloating:C}),[w,C]),_=d.useMemo(()=>({reference:P,floating:R}),[P,R]),X=d.useMemo(()=>{const N={position:n,left:0,top:0};if(!_.floating)return N;const U=vo(_.floating,f.x),se=vo(_.floating,f.y);return i?{...N,transform:"translate("+U+"px, "+se+"px)",...qa(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:U,top:se}},[n,i,_.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:I,refs:q,elements:_,floatingStyles:X}),[f,I,q,_,X])}const Qu=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?po({element:r.current,padding:o}).fn(n):{}:r?po({element:r,padding:o}).fn(n):{}}}},ed=(e,t)=>({...Hu(e),options:[e,t]}),td=(e,t)=>({...Gu(e),options:[e,t]}),nd=(e,t)=>({...Xu(e),options:[e,t]}),rd=(e,t)=>({...Yu(e),options:[e,t]}),od=(e,t)=>({...Ku(e),options:[e,t]}),ad=(e,t)=>({...qu(e),options:[e,t]}),sd=(e,t)=>({...Qu(e),options:[e,t]});var id="Arrow",Xa=d.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return v.jsx(ae.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});Xa.displayName=id;var cd=Xa,Pr="Popper",[Ja,Za]=nt(Pr),[ld,Qa]=Ja(Pr),es=e=>{const{__scopePopper:t,children:n}=e,[r,o]=d.useState(null);return v.jsx(ld,{scope:t,anchor:r,onAnchorChange:o,children:n})};es.displayName=Pr;var ts="PopperAnchor",ns=d.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Qa(ts,n),s=d.useRef(null),i=ue(t,s);return d.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:v.jsx(ae.div,{...o,ref:i})});ns.displayName=ts;var Ar="PopperContent",[ud,dd]=Ja(Ar),rs=d.forwardRef((e,t)=>{var fe,me,Re,xe,ut,Me;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:l=!1,updatePositionStrategy:g="optimized",onPlaced:y,...h}=e,b=Qa(Ar,n),[x,w]=d.useState(null),C=ue(t,Ie=>w(Ie)),[P,R]=d.useState(null),D=hr(P),A=(D==null?void 0:D.width)??0,O=(D==null?void 0:D.height)??0,$=r+(a!=="center"?"-"+a:""),M=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},z=Array.isArray(u)?u:[u],k=z.length>0,I={padding:M,boundary:z.filter(pd),altBoundary:k},{refs:B,floatingStyles:q,placement:_,isPositioned:X,middlewareData:N}=Zu({strategy:"fixed",placement:$,whileElementsMounted:(...Ie)=>Uu(...Ie,{animationFrame:g==="always"}),elements:{reference:b.anchor},middleware:[ed({mainAxis:o+O,alignmentAxis:s}),c&&td({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?nd():void 0,...I}),c&&rd({...I}),od({...I,apply:({elements:Ie,rects:rt,availableWidth:Le,availableHeight:he})=>{const{width:dt,height:ft}=rt.reference,ie=Ie.floating.style;ie.setProperty("--radix-popper-available-width",`${Le}px`),ie.setProperty("--radix-popper-available-height",`${he}px`),ie.setProperty("--radix-popper-anchor-width",`${dt}px`),ie.setProperty("--radix-popper-anchor-height",`${ft}px`)}}),P&&sd({element:P,padding:i}),vd({arrowWidth:A,arrowHeight:O}),l&&ad({strategy:"referenceHidden",...I})]}),[U,se]=ss(_),L=Ve(y);We(()=>{X&&(L==null||L())},[X,L]);const H=(fe=N.arrow)==null?void 0:fe.x,J=(me=N.arrow)==null?void 0:me.y,G=((Re=N.arrow)==null?void 0:Re.centerOffset)!==0,[ne,V]=d.useState();return We(()=>{x&&V(window.getComputedStyle(x).zIndex)},[x]),v.jsx("div",{ref:B.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:X?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[(xe=N.transformOrigin)==null?void 0:xe.x,(ut=N.transformOrigin)==null?void 0:ut.y].join(" "),...((Me=N.hide)==null?void 0:Me.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsx(ud,{scope:n,placedSide:U,onArrowChange:R,arrowX:H,arrowY:J,shouldHideArrow:G,children:v.jsx(ae.div,{"data-side":U,"data-align":se,...h,ref:C,style:{...h.style,animation:X?void 0:"none"}})})})});rs.displayName=Ar;var os="PopperArrow",fd={top:"bottom",right:"left",bottom:"top",left:"right"},as=d.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=dd(os,r),s=fd[a.placedSide];return v.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:v.jsx(cd,{...o,ref:n,style:{...o.style,display:"block"}})})});as.displayName=os;function pd(e){return e!==null}var vd=e=>({name:"transformOrigin",options:e,fn(t){var b,x,w;const{placement:n,rects:r,middlewareData:o}=t,s=((b=o.arrow)==null?void 0:b.centerOffset)!==0,i=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[u,f]=ss(n),p={start:"0%",center:"50%",end:"100%"}[f],l=(((x=o.arrow)==null?void 0:x.x)??0)+i/2,g=(((w=o.arrow)==null?void 0:w.y)??0)+c/2;let y="",h="";return u==="bottom"?(y=s?p:`${l}px`,h=`${-c}px`):u==="top"?(y=s?p:`${l}px`,h=`${r.floating.height+c}px`):u==="right"?(y=`${-c}px`,h=s?p:`${g}px`):u==="left"&&(y=`${r.floating.width+c}px`,h=s?p:`${g}px`),{data:{x:y,y:h}}}});function ss(e){const[t,n="center"]=e.split("-");return[t,n]}var md=es,gd=ns,hd=rs,yd=as,bd="VisuallyHidden",is=d.forwardRef((e,t)=>v.jsx(ae.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}}));is.displayName=bd;var xd=is,[bn,Fp]=nt("Tooltip",[Za]),xn=Za(),cs="TooltipProvider",wd=700,Jn="tooltip.open",[Ed,Tr]=bn(cs),ls=e=>{const{__scopeTooltip:t,delayDuration:n=wd,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,[s,i]=d.useState(!0),c=d.useRef(!1),u=d.useRef(0);return d.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),v.jsx(Ed,{scope:t,isOpenDelayed:s,delayDuration:n,onOpen:d.useCallback(()=>{window.clearTimeout(u.current),i(!1)},[]),onClose:d.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>i(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:d.useCallback(f=>{c.current=f},[]),disableHoverableContent:o,children:a})};ls.displayName=cs;var wn="Tooltip",[Cd,En]=bn(wn),us=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,c=Tr(wn,e.__scopeTooltip),u=xn(t),[f,p]=d.useState(null),l=Ft(),g=d.useRef(0),y=s??c.disableHoverableContent,h=i??c.delayDuration,b=d.useRef(!1),[x=!1,w]=Vt({prop:r,defaultProp:o,onChange:A=>{A?(c.onOpen(),document.dispatchEvent(new CustomEvent(Jn))):c.onClose(),a==null||a(A)}}),C=d.useMemo(()=>x?b.current?"delayed-open":"instant-open":"closed",[x]),P=d.useCallback(()=>{window.clearTimeout(g.current),b.current=!1,w(!0)},[w]),R=d.useCallback(()=>{window.clearTimeout(g.current),w(!1)},[w]),D=d.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{b.current=!0,w(!0)},h)},[h,w]);return d.useEffect(()=>()=>window.clearTimeout(g.current),[]),v.jsx(md,{...u,children:v.jsx(Cd,{scope:t,contentId:l,open:x,stateAttribute:C,trigger:f,onTriggerChange:p,onTriggerEnter:d.useCallback(()=>{c.isOpenDelayed?D():P()},[c.isOpenDelayed,D,P]),onTriggerLeave:d.useCallback(()=>{y?R():window.clearTimeout(g.current)},[R,y]),onOpen:P,onClose:R,disableHoverableContent:y,children:n})})};us.displayName=wn;var Zn="TooltipTrigger",ds=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=En(Zn,n),a=Tr(Zn,n),s=xn(n),i=d.useRef(null),c=ue(t,i,o.onTriggerChange),u=d.useRef(!1),f=d.useRef(!1),p=d.useCallback(()=>u.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),v.jsx(gd,{asChild:!0,...s,children:v.jsx(ae.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:oe(e.onPointerMove,l=>{l.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:oe(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:oe(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:oe(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:oe(e.onBlur,o.onClose),onClick:oe(e.onClick,o.onClose)})})});ds.displayName=Zn;var Sd="TooltipPortal",[$p,Rd]=bn(Sd,{forceMount:void 0}),St="TooltipContent",fs=d.forwardRef((e,t)=>{const n=Rd(St,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=En(St,e.__scopeTooltip);return v.jsx(zt,{present:r||s.open,children:s.disableHoverableContent?v.jsx(ps,{side:o,...a,ref:t}):v.jsx(Pd,{side:o,...a,ref:t})})}),Pd=d.forwardRef((e,t)=>{const n=En(St,e.__scopeTooltip),r=Tr(St,e.__scopeTooltip),o=d.useRef(null),a=ue(t,o),[s,i]=d.useState(null),{trigger:c,onClose:u}=n,f=o.current,{onPointerInTransitChange:p}=r,l=d.useCallback(()=>{i(null),p(!1)},[p]),g=d.useCallback((y,h)=>{const b=y.currentTarget,x={x:y.clientX,y:y.clientY},w=Nd(x,b.getBoundingClientRect()),C=Od(x,w),P=Dd(h.getBoundingClientRect()),R=_d([...C,...P]);i(R),p(!0)},[p]);return d.useEffect(()=>()=>l(),[l]),d.useEffect(()=>{if(c&&f){const y=b=>g(b,f),h=b=>g(b,c);return c.addEventListener("pointerleave",y),f.addEventListener("pointerleave",h),()=>{c.removeEventListener("pointerleave",y),f.removeEventListener("pointerleave",h)}}},[c,f,g,l]),d.useEffect(()=>{if(s){const y=h=>{const b=h.target,x={x:h.clientX,y:h.clientY},w=(c==null?void 0:c.contains(b))||(f==null?void 0:f.contains(b)),C=!kd(x,s);w?l():C&&(l(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[c,f,s,u,l]),v.jsx(ps,{...e,ref:a})}),[Ad,Td]=bn(wn,{isInside:!1}),ps=d.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,c=En(St,n),u=xn(n),{onClose:f}=c;return d.useEffect(()=>(document.addEventListener(Jn,f),()=>document.removeEventListener(Jn,f)),[f]),d.useEffect(()=>{if(c.trigger){const p=l=>{const g=l.target;g!=null&&g.contains(c.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[c.trigger,f]),v.jsx(ur,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:v.jsxs(hd,{"data-state":c.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:[v.jsx(lr,{children:r}),v.jsx(Ad,{scope:n,isInside:!0,children:v.jsx(xd,{id:c.contentId,role:"tooltip",children:o||r})})]})})});fs.displayName=St;var vs="TooltipArrow",ms=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=xn(n);return Td(vs,n).isInside?null:v.jsx(yd,{...o,...r,ref:t})});ms.displayName=vs;function Nd(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Od(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Dd(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function kd(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a].x,c=t[a].y,u=t[s].x,f=t[s].y;c>r!=f>r&&n<(u-i)*(r-c)/(f-c)+i&&(o=!o)}return o}function _d(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),jd(t)}function jd(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];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 n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Md=ls,Id=us,Ld=ds,gs=fs,Fd=ms;const Nr=Md,Or=Id,Dr=Ld,kr=Fd,Cn=d.forwardRef(({className:e,sideOffset:t=4,...n},r)=>v.jsx(gs,{ref:r,sideOffset:t,className:de("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),...n}));Cn.displayName=gs.displayName;const $d=({displayName:e,fieldId:t,children:n})=>{const{tooltipsVisible:r}=ys();let o="";return e&&t?o=`${e} (${t})`:t?o=`(${t})`:e&&(o=`${e}`),v.jsx("div",{children:v.jsx(Nr,{children:v.jsxs(Or,{open:r&&!!o,children:[v.jsx(Dr,{asChild:!0,children:v.jsx("div",{className:r?"ve-outline-2 ve-outline-dotted ve-outline-[#5A58F2]":"",children:n})}),v.jsxs(Cn,{children:[v.jsx("p",{children:o}),v.jsx(kr,{fill:"bg-popover"})]})]})})})},hs=E.createContext(void 0),Bd=({children:e})=>{const[t,n]=E.useState(!1),r=()=>{n(o=>!o)};return v.jsx(hs.Provider,{value:{tooltipsVisible:t,toggleTooltips:r},children:e})},ys=()=>{const e=E.useContext(hs);return e||{tooltipsVisible:!1,toggleTooltips:()=>{}}},Wd=(e,t,n,r,o,a,s,i)=>{const{history:{back:c,forward:u,histories:f,index:p,hasPast:l,hasFuture:g,setHistories:y}}=Be.usePuck();return E.useEffect(()=>{t(f,p)},[p,f,t]),v.jsxs("header",{className:"puck-header",children:[v.jsxs("div",{className:"header-left",children:[v.jsx(zd,{}),v.jsx(Ud,{}),v.jsx(Hd,{themeModeActive:s,toggleThemeMode:i})]}),v.jsx("div",{className:"header-center"}),v.jsxs("div",{className:"actions",children:[!s&&v.jsx(Je,{variant:"ghost",size:"icon",disabled:!l,onClick:c,children:v.jsx(Ai,{className:"sm-icon"})}),!s&&v.jsx(Je,{variant:"ghost",size:"icon",disabled:!g,onClick:u,children:v.jsx(Ti,{className:"sm-icon"})}),v.jsx(Vd,{disabled:f.length===1,onClearLocalChanges:()=>{e(),y([{id:"root",state:{data:r}}])}}),!a&&v.jsx(Je,{variant:"secondary",disabled:f.length===1,onClick:async()=>{await o(n),e()},children:"Publish"})]})]})},Vd=({disabled:e,onClearLocalChanges:t})=>{const[n,r]=E.useState(!1),o=()=>{t(),r(!1)};return v.jsxs(eu,{open:n,onOpenChange:r,children:[v.jsx(tu,{disabled:e,asChild:!0,children:v.jsx(Je,{variant:"outline",children:"Clear Local Changes"})}),v.jsxs(Oa,{children:[v.jsxs(Da,{children:[v.jsx(_a,{children:"Clear Local Changes"}),v.jsx(ja,{children:"This action will remove your local changes. It cannot be undone."})]}),v.jsxs(ka,{children:[v.jsx(Ma,{children:"Cancel"}),v.jsx(Je,{onClick:o,children:"Confirm"})]})]})]})},zd=()=>{const{dispatch:e,appState:{ui:{leftSideBarVisible:t,rightSideBarVisible:n}}}=Be.usePuck(),r=E.useCallback(o=>{const a=window.matchMedia("(min-width: 638px)").matches,s=o==="left"?t:n,i=o==="left"?"rightSideBarVisible":"leftSideBarVisible";e({type:"setUi",ui:{[`${o}SideBarVisible`]:!s,...a?{}:{[i]:!1}}})},[e,t,n]);return v.jsxs(v.Fragment,{children:[v.jsx(Je,{variant:"ghost",size:"icon",onClick:()=>{r("left")},children:v.jsx(Ri,{className:"sm-icon"})}),v.jsx(Je,{variant:"ghost",size:"icon",onClick:()=>{r("right")},children:v.jsx(Pi,{className:"sm-icon"})})]})},Ud=()=>{const{toggleTooltips:e,tooltipsVisible:t}=ys();return v.jsx(Nr,{children:v.jsxs(Or,{children:[v.jsx(Dr,{asChild:!0,children:v.jsxs("div",{className:"ve-flex ve-flex-row ve-self-center ve-gap-3 ve-pl-2",children:[v.jsx(br,{onCheckedChange:e,checked:t}),v.jsx("p",{className:"ve-self-center ve-text-sm",children:"Entity Fields"})]})}),v.jsxs(Cn,{children:[t?"Hide Entity Fields":"Show Entity Fields",v.jsx(kr,{fill:"ve-bg-popover"})]})]})})},Hd=({themeModeActive:e,toggleThemeMode:t})=>v.jsx(Nr,{children:v.jsxs(Or,{children:[v.jsx(Dr,{asChild:!0,children:v.jsxs("div",{className:"ve-flex ve-flex-row ve-self-center ve-gap-3 ve-pl-2",children:[v.jsx(br,{onCheckedChange:t,checked:e}),v.jsx("p",{className:"ve-self-center ve-text-sm",children:"Theme Mode"})]})}),v.jsxs(Cn,{children:[e?"Disable Theme Mode":"Enable Theme Mode",v.jsx(kr,{fill:"ve-bg-popover"})]})]})}),mo="ROLE_",go="TEMPLATE_",Gd="LAYOUT_",Yd="ENTITY_";function Qn(e,t,n,r,o){const a=e?"dev":"";if(!t||!n||!o&&!r)throw new Error("Unable to generate local storage key, missing query parameters");if(t===$f.INDIVIDUAL){if(!o)throw new Error(`EntityId required for role ${t}`);return a+mo+t+go+n+Yd+o}if(!r)throw new Error(`LayoutId required for role ${t}`);return a+mo+t+go+n+Gd+r}const Kd=mn("ve-relative ve-rounded ve-border ve-m-4 ve-mb-0 ve-p-4 ve-[&>svg~*]:pl-7 ve-[&>svg+div]:translate-y-[-3px] ve-[&>svg]:absolute ve-[&>svg]:left-4 ve-[&>svg]:top-4 ve-[&>svg]:text-foreground",{variants:{variant:{default:"ve-bg-background ve-text-foreground",destructive:"ve-border-destructive/50 ve-text-destructive ve-dark:border-destructive ve-[&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),er=E.forwardRef(({className:e,variant:t,...n},r)=>v.jsx("div",{ref:r,role:"alert",className:de(Kd({variant:t}),e),...n}));er.displayName="Alert";const qd=E.forwardRef(({className:e,...t},n)=>v.jsx("h5",{ref:n,className:de("ve-mb-1 ve-font-medium ve-leading-none ve-tracking-tight",e),...t}));qd.displayName="AlertTitle";const tr=E.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:de("ve-text-sm [&_p]:ve-leading-relaxed",e),...t}));tr.displayName="AlertDescription";const bs=e=>{const t={label:e.label,type:"object",objectFields:{}};return Object.entries(e.styles).forEach(([n,r])=>{if("type"in r){const o=Xd(r);o&&(t.objectFields[n]=o)}else t.objectFields[n]=bs(r)}),t},Xd=e=>{switch(e.type){case"number":return{label:e.label,type:"number"};case"select":return{label:e.label,type:"select",options:e.options};case"color":return{label:e.label,type:"text"}}},xs=(e,t)=>{const n={};return Object.entries(t.styles).forEach(([r,o])=>{"type"in o?n[r]=(e==null?void 0:e[r])??o.default:n[r]=xs(e==null?void 0:e[r],o)}),n},Jd=e=>{const{saveTheme:t,themeConfig:n,savedThemeValues:r}=e;if(!n)return v.jsx("div",{children:v.jsx(er,{children:v.jsx(tr,{children:"Please contact your developer to set up theme management."})})});const o=(a,s)=>{const i={...n,[a]:{...n[a],styles:s}};t(i)};return v.jsxs("div",{children:[v.jsx(er,{children:v.jsx(tr,{children:"Changes to the theme will affect all templates and layouts for the entire site."})}),Object.entries(n).map(([a,s])=>{const i=bs(s),c=xs(r,s);return v.jsx(Be.AutoFieldPrivate,{field:i,onChange:u=>o(a,u),value:c},a)})]})},Zd=({puckConfig:e,puckInitialHistory:t,isLoading:n,clearHistory:r,templateMetadata:o,saveState:a,saveSaveState:s,saveVisualConfigData:i,sendDevSaveStateData:c,buildLocalStorageKey:u,devLogger:f,themeConfig:p})=>{const[l,g]=E.useState(!1),[y,h]=E.useState(!1),b=E.useRef(0),x=E.useCallback((A,O)=>{O!==0&&b.current!==O&&A.length>0&&(f.logFunc("handleHistoryChange"),f.logData("PUCK_INDEX",O),f.logData("PUCK_HISTORY",A),b.current=O,f.logFunc("saveToLocalStorage"),window.localStorage.setItem(u(),JSON.stringify(A)),(a==null?void 0:a.hash)!==A[O].id&&(o.isDevMode&&!o.devOverride?(f.logFunc("sendDevSaveStateData"),c({payload:{devSaveStateData:JSON.stringify(A[O].state.data)}})):(f.logFunc("saveSaveState"),s({payload:{hash:A[O].id,history:JSON.stringify(A[O].state)}}))))},[o,Qn,a]),w=()=>{r(),b.current=0},C=()=>{},P=async A=>{y||(f.logFunc("saveVisualConfigData"),i({payload:{visualConfigurationData:JSON.stringify(A)}}))},R=async()=>{if(!n&&!l){g(!0);return}},D=()=>{h(A=>!A)};return v.jsx(Bd,{children:v.jsx(Be.Puck,{config:e,data:{},initialHistory:t,onChange:R,overrides:{header:()=>{const{appState:A,refreshPermissions:O,config:$}=Be.usePuck();return E.useEffect(()=>{Object.values($.components).forEach(k=>{k.resolvePermissions=()=>({drag:!y,duplicate:!y,delete:!y,insert:!y,edit:!y})});const M=document.querySelector("[class*='PuckLayout-leftSideBar'] > div[class*='SidebarSection--noBorderTop']");M&&(M.style.display=y?"none":"");const z=document.querySelector("[class*='PuckLayout-rightSideBar'] > div[class*='SidebarSection--noBorderTop'] > div[class*='SidebarSection-title']");z&&(z.style.display=y?"none":""),O()},[y]),Wd(w,x,A.data,t==null?void 0:t.histories[0].state.data,P,o.isDevMode&&!o.devOverride,y,D)},actionBar:y?()=>v.jsx(v.Fragment,{}):void 0,components:y?()=>v.jsx(v.Fragment,{}):void 0,fields:y?()=>v.jsx(Jd,{themeConfig:p,saveTheme:C,savedThemeValues:void 0}):void 0}})})};var _r="Progress",jr=100,[Qd,Bp]=nt(_r),[ef,tf]=Qd(_r),ws=d.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=nf,...s}=e;(o||o===0)&&!ho(o)&&console.error(rf(`${o}`,"Progress"));const i=ho(o)?o:jr;r!==null&&!yo(r,i)&&console.error(of(`${r}`,"Progress"));const c=yo(r,i)?r:null,u=pn(c)?a(c,i):void 0;return v.jsx(ef,{scope:n,value:c,max:i,children:v.jsx(ae.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":pn(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":Ss(c,i),"data-value":c??void 0,"data-max":i,...s,ref:t})})});ws.displayName=_r;var Es="ProgressIndicator",Cs=d.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=tf(Es,n);return v.jsx(ae.div,{"data-state":Ss(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});Cs.displayName=Es;function nf(e,t){return`${Math.round(e/t*100)}%`}function Ss(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function pn(e){return typeof e=="number"}function ho(e){return pn(e)&&!isNaN(e)&&e>0}function yo(e,t){return pn(e)&&!isNaN(e)&&e<=t&&e>=0}function rf(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${jr}\`.`}function of(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
118
126
|
- a positive number
|
|
119
|
-
- less than the value passed to \`max\` (or ${
|
|
127
|
+
- less than the value passed to \`max\` (or ${jr} if no \`max\` prop is set)
|
|
120
128
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
121
129
|
|
|
122
|
-
Defaulting to \`null\`.`}var cs=as,id=is;const us=f.forwardRef(({className:e,value:t,...r},n)=>m.jsx(cs,{ref:n,className:fe("ve-relative ve-h-4 ve-w-full ve-overflow-hidden ve-rounded-full ve-bg-secondary",e),...r,children:m.jsx(id,{className:"ve-h-full ve-w-full ve-flex-1 ve-bg-primary ve-transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));us.displayName=cs.displayName;function ld({progress:e}){return m.jsxs("div",{className:"ve-flex ve-h-screen ve-loading-wrapper ve-w-screen ve-flex-col ve-items-center ve-justify-center",children:[m.jsx(us,{className:"ve-w-1/3 ve-loading-progress",value:e}),m.jsx("div",{children:"Loading Visual Editor..."})]})}var Zn=["light","dark"],cd="(prefers-color-scheme: dark)",ud=f.createContext(void 0),dd={setTheme:e=>{},themes:[]},fd=()=>{var e;return(e=f.useContext(ud))!=null?e:dd};f.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:o,defaultTheme:a,value:s,attrs:i,nonce:c})=>{let d=a==="system",u=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${i.map(x=>`'${x}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,g=o?Zn.includes(a)&&a?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${a}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",l=(x,h=!1,y=!0)=>{let E=s?s[x]:x,b=h?x+"|| ''":`'${E}'`,C="";return o&&y&&!h&&Zn.includes(x)&&(C+=`d.style.colorScheme = '${x}';`),r==="class"?h||E?C+=`c.add(${b})`:C+="null":E&&(C+=`d[s](n,${b})`),C},v=e?`!function(){${u}${l(e)}}()`:n?`!function(){try{${u}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${d})){var t='${cd}',m=window.matchMedia(t);if(m.media!==t||m.matches){${l("dark")}}else{${l("light")}}}else if(e){${s?`var x=${JSON.stringify(s)};`:""}${l(s?"x[e]":"e",!0)}}${d?"":"else{"+l(a,!1,!1)+"}"}${g}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${t}');if(e){${s?`var x=${JSON.stringify(s)};`:""}${l(s?"x[e]":"e",!0)}}else{${l(a,!1,!1)};}${g}}catch(t){}}();`;return f.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:v}})});var pd=e=>{switch(e){case"success":return hd;case"info":return bd;case"warning":return md;case"error":return yd;default:return null}},gd=Array(12).fill(0),vd=({visible:e})=>w.createElement("div",{className:"sonner-loading-wrapper","data-visible":e},w.createElement("div",{className:"sonner-spinner"},gd.map((t,r)=>w.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),hd=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},w.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"})),md=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},w.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"})),bd=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},w.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"})),yd=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},w.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"})),xd=()=>{let[e,t]=w.useState(document.hidden);return w.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},Yr=1,wd=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:Yr++,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(Cd(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)||Yr++;return this.create({jsx:e(r),id:r,...t}),r},this.subscribers=[],this.toasts=[]}},me=new wd,Ed=(e,t)=>{let r=(t==null?void 0:t.id)||Yr++;return me.addToast({title:e,...t,id:r}),r},Cd=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Sd=Ed,Pd=()=>me.toasts;Object.assign(Sd,{success:me.success,info:me.info,warning:me.warning,error:me.error,custom:me.custom,message:me.message,promise:me.promise,dismiss:me.dismiss,loading:me.loading},{getHistory:Pd});function Rd(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))}Rd(`: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%)}
|
|
123
|
-
`);function Zt(e){return e.label!==void 0}var Ad=3,Td="32px",Od=4e3,Nd=356,Dd=14,kd=20,_d=200;function jd(...e){return e.filter(Boolean).join(" ")}var Md=e=>{var t,r,n,o,a,s,i,c,d,u;let{invert:g,toast:l,unstyled:v,interacting:x,setHeights:h,visibleToasts:y,heights:E,index:b,toasts:C,expanded:P,removeToast:R,defaultRichColors:D,closeButton:O,style:N,cancelButtonStyle:z,actionButtonStyle:H,className:U="",descriptionClassName:_="",duration:Y,position:M,gap:X,loadingIcon:F,expandByDefault:K,classNames:A,icons:B,closeButtonAriaLabel:oe="Close toast",pauseWhenPageIsHidden:I,cn:W}=e,[k,J]=w.useState(!1),[te,G]=w.useState(!1),[xe,ge]=w.useState(!1),[we,ve]=w.useState(!1),[ut,Le]=w.useState(0),[Ne,rt]=w.useState(0),Ie=w.useRef(null),Re=w.useRef(null),dt=b===0,He=b+1<=y,ie=l.type,Ee=l.dismissible!==!1,Tt=l.className||"",br=l.descriptionClassName||"",nt=w.useMemo(()=>E.findIndex(L=>L.toastId===l.id)||0,[E,l.id]),Bt=w.useMemo(()=>{var L;return(L=l.closeButton)!=null?L:O},[l.closeButton,O]),ft=w.useMemo(()=>l.duration||Y||Od,[l.duration,Y]),Ot=w.useRef(0),Ue=w.useRef(0),Wt=w.useRef(0),Ye=w.useRef(null),[zt,yr]=M.split("-"),Vt=w.useMemo(()=>E.reduce((L,Q,Z)=>Z>=nt?L:L+Q.height,0),[E,nt]),pt=xd(),Ht=l.invert||g,De=ie==="loading";Ue.current=w.useMemo(()=>nt*X+Vt,[nt,Vt]),w.useEffect(()=>{J(!0)},[]),w.useLayoutEffect(()=>{if(!k)return;let L=Re.current,Q=L.style.height;L.style.height="auto";let Z=L.getBoundingClientRect().height;L.style.height=Q,rt(Z),h(Se=>Se.find(he=>he.toastId===l.id)?Se.map(he=>he.toastId===l.id?{...he,height:Z}:he):[{toastId:l.id,height:Z,position:l.position},...Se])},[k,l.title,l.description,h,l.id]);let Ce=w.useCallback(()=>{G(!0),Le(Ue.current),h(L=>L.filter(Q=>Q.toastId!==l.id)),setTimeout(()=>{R(l)},_d)},[l,R,h,Ue]);w.useEffect(()=>{if(l.promise&&ie==="loading"||l.duration===1/0||l.type==="loading")return;let L,Q=ft;return P||x||I&&pt?(()=>{if(Wt.current<Ot.current){let Z=new Date().getTime()-Ot.current;Q=Q-Z}Wt.current=new Date().getTime()})():Q!==1/0&&(Ot.current=new Date().getTime(),L=setTimeout(()=>{var Z;(Z=l.onAutoClose)==null||Z.call(l,l),Ce()},Q)),()=>clearTimeout(L)},[P,x,K,l,ft,Ce,l.promise,ie,I,pt]),w.useEffect(()=>{let L=Re.current;if(L){let Q=L.getBoundingClientRect().height;return rt(Q),h(Z=>[{toastId:l.id,height:Q,position:l.position},...Z]),()=>h(Z=>Z.filter(Se=>Se.toastId!==l.id))}},[h,l.id]),w.useEffect(()=>{l.delete&&Ce()},[Ce,l.delete]);function Nt(){return B!=null&&B.loading?w.createElement("div",{className:"sonner-loader","data-visible":ie==="loading"},B.loading):F?w.createElement("div",{className:"sonner-loader","data-visible":ie==="loading"},F):w.createElement(vd,{visible:ie==="loading"})}return w.createElement("li",{"aria-live":l.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:Re,className:W(U,Tt,A==null?void 0:A.toast,(t=l==null?void 0:l.classNames)==null?void 0:t.toast,A==null?void 0:A.default,A==null?void 0:A[ie],(r=l==null?void 0:l.classNames)==null?void 0:r[ie]),"data-sonner-toast":"","data-rich-colors":(n=l.richColors)!=null?n:D,"data-styled":!(l.jsx||l.unstyled||v),"data-mounted":k,"data-promise":!!l.promise,"data-removed":te,"data-visible":He,"data-y-position":zt,"data-x-position":yr,"data-index":b,"data-front":dt,"data-swiping":xe,"data-dismissible":Ee,"data-type":ie,"data-invert":Ht,"data-swipe-out":we,"data-expanded":!!(P||K&&k),style:{"--index":b,"--toasts-before":b,"--z-index":C.length-b,"--offset":`${te?ut:Ue.current}px`,"--initial-height":K?"auto":`${Ne}px`,...N,...l.style},onPointerDown:L=>{De||!Ee||(Ie.current=new Date,Le(Ue.current),L.target.setPointerCapture(L.pointerId),L.target.tagName!=="BUTTON"&&(ge(!0),Ye.current={x:L.clientX,y:L.clientY}))},onPointerUp:()=>{var L,Q,Z,Se;if(we||!Ee)return;Ye.current=null;let he=Number(((L=Re.current)==null?void 0:L.style.getPropertyValue("--swipe-amount").replace("px",""))||0),ot=new Date().getTime()-((Q=Ie.current)==null?void 0:Q.getTime()),xr=Math.abs(he)/ot;if(Math.abs(he)>=kd||xr>.11){Le(Ue.current),(Z=l.onDismiss)==null||Z.call(l,l),Ce(),ve(!0);return}(Se=Re.current)==null||Se.style.setProperty("--swipe-amount","0px"),ge(!1)},onPointerMove:L=>{var Q;if(!Ye.current||!Ee)return;let Z=L.clientY-Ye.current.y,Se=L.clientX-Ye.current.x,he=(zt==="top"?Math.min:Math.max)(0,Z),ot=L.pointerType==="touch"?10:2;Math.abs(he)>ot?(Q=Re.current)==null||Q.style.setProperty("--swipe-amount",`${Z}px`):Math.abs(Se)>ot&&(Ye.current=null)}},Bt&&!l.jsx?w.createElement("button",{"aria-label":oe,"data-disabled":De,"data-close-button":!0,onClick:De||!Ee?()=>{}:()=>{var L;Ce(),(L=l.onDismiss)==null||L.call(l,l)},className:W(A==null?void 0:A.closeButton,(o=l==null?void 0:l.classNames)==null?void 0:o.closeButton)},w.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"},w.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),w.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,l.jsx||w.isValidElement(l.title)?l.jsx||l.title:w.createElement(w.Fragment,null,ie||l.icon||l.promise?w.createElement("div",{"data-icon":"",className:W(A==null?void 0:A.icon,(a=l==null?void 0:l.classNames)==null?void 0:a.icon)},l.promise||l.type==="loading"&&!l.icon?l.icon||Nt():null,l.type!=="loading"?l.icon||(B==null?void 0:B[ie])||pd(ie):null):null,w.createElement("div",{"data-content":"",className:W(A==null?void 0:A.content,(s=l==null?void 0:l.classNames)==null?void 0:s.content)},w.createElement("div",{"data-title":"",className:W(A==null?void 0:A.title,(i=l==null?void 0:l.classNames)==null?void 0:i.title)},l.title),l.description?w.createElement("div",{"data-description":"",className:W(_,br,A==null?void 0:A.description,(c=l==null?void 0:l.classNames)==null?void 0:c.description)},l.description):null),w.isValidElement(l.cancel)?l.cancel:l.cancel&&Zt(l.cancel)?w.createElement("button",{"data-button":!0,"data-cancel":!0,style:l.cancelButtonStyle||z,onClick:L=>{var Q,Z;Zt(l.cancel)&&Ee&&((Z=(Q=l.cancel).onClick)==null||Z.call(Q,L),Ce())},className:W(A==null?void 0:A.cancelButton,(d=l==null?void 0:l.classNames)==null?void 0:d.cancelButton)},l.cancel.label):null,w.isValidElement(l.action)?l.action:l.action&&Zt(l.action)?w.createElement("button",{"data-button":!0,"data-action":!0,style:l.actionButtonStyle||H,onClick:L=>{var Q,Z;Zt(l.action)&&(L.defaultPrevented||((Z=(Q=l.action).onClick)==null||Z.call(Q,L),Ce()))},className:W(A==null?void 0:A.actionButton,(u=l==null?void 0:l.classNames)==null?void 0:u.actionButton)},l.action.label):null))};function Qn(){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 Ld=e=>{let{invert:t,position:r="bottom-right",hotkey:n=["altKey","KeyT"],expand:o,closeButton:a,className:s,offset:i,theme:c="light",richColors:d,duration:u,style:g,visibleToasts:l=Ad,toastOptions:v,dir:x=Qn(),gap:h=Dd,loadingIcon:y,icons:E,containerAriaLabel:b="Notifications",pauseWhenPageIsHidden:C,cn:P=jd}=e,[R,D]=w.useState([]),O=w.useMemo(()=>Array.from(new Set([r].concat(R.filter(I=>I.position).map(I=>I.position)))),[R,r]),[N,z]=w.useState([]),[H,U]=w.useState(!1),[_,Y]=w.useState(!1),[M,X]=w.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),F=w.useRef(null),K=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),A=w.useRef(null),B=w.useRef(!1),oe=w.useCallback(I=>{var W;(W=R.find(k=>k.id===I.id))!=null&&W.delete||me.dismiss(I.id),D(k=>k.filter(({id:J})=>J!==I.id))},[R]);return w.useEffect(()=>me.subscribe(I=>{if(I.dismiss){D(W=>W.map(k=>k.id===I.id?{...k,delete:!0}:k));return}setTimeout(()=>{qr.flushSync(()=>{D(W=>{let k=W.findIndex(J=>J.id===I.id);return k!==-1?[...W.slice(0,k),{...W[k],...I},...W.slice(k+1)]:[I,...W]})})})}),[]),w.useEffect(()=>{if(c!=="system"){X(c);return}c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?X("dark"):X("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:I})=>{X(I?"dark":"light")})},[c]),w.useEffect(()=>{R.length<=1&&U(!1)},[R]),w.useEffect(()=>{let I=W=>{var k,J;n.every(te=>W[te]||W.code===te)&&(U(!0),(k=F.current)==null||k.focus()),W.code==="Escape"&&(document.activeElement===F.current||(J=F.current)!=null&&J.contains(document.activeElement))&&U(!1)};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[n]),w.useEffect(()=>{if(F.current)return()=>{A.current&&(A.current.focus({preventScroll:!0}),A.current=null,B.current=!1)}},[F.current]),R.length?w.createElement("section",{"aria-label":`${b} ${K}`,tabIndex:-1},O.map((I,W)=>{var k;let[J,te]=I.split("-");return w.createElement("ol",{key:I,dir:x==="auto"?Qn():x,tabIndex:-1,ref:F,className:s,"data-sonner-toaster":!0,"data-theme":M,"data-y-position":J,"data-x-position":te,style:{"--front-toast-height":`${((k=N[0])==null?void 0:k.height)||0}px`,"--offset":typeof i=="number"?`${i}px`:i||Td,"--width":`${Nd}px`,"--gap":`${h}px`,...g},onBlur:G=>{B.current&&!G.currentTarget.contains(G.relatedTarget)&&(B.current=!1,A.current&&(A.current.focus({preventScroll:!0}),A.current=null))},onFocus:G=>{G.target instanceof HTMLElement&&G.target.dataset.dismissible==="false"||B.current||(B.current=!0,A.current=G.relatedTarget)},onMouseEnter:()=>U(!0),onMouseMove:()=>U(!0),onMouseLeave:()=>{_||U(!1)},onPointerDown:G=>{G.target instanceof HTMLElement&&G.target.dataset.dismissible==="false"||Y(!0)},onPointerUp:()=>Y(!1)},R.filter(G=>!G.position&&W===0||G.position===I).map((G,xe)=>{var ge,we;return w.createElement(Md,{key:G.id,icons:E,index:xe,toast:G,defaultRichColors:d,duration:(ge=v==null?void 0:v.duration)!=null?ge:u,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:t,visibleToasts:l,closeButton:(we=v==null?void 0:v.closeButton)!=null?we:a,interacting:_,position:I,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,removeToast:oe,toasts:R.filter(ve=>ve.position==G.position),heights:N.filter(ve=>ve.position==G.position),setHeights:z,expandByDefault:o,gap:h,loadingIcon:y,expanded:H,pauseWhenPageIsHidden:C,cn:P})}))})):null};const Id=({...e})=>{const{theme:t="system"}=fd();return m.jsx(Ld,{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})},ds=(e,t,r="*")=>t==null?void 0:t.postMessage(e,{targetOrigin:r}),at=(e,t)=>{const[r,n]=w.useState("pending");return fs(e,t,$d(n)),{sendToParent:a=>{if(!window.parent)throw new Error("Parent window has closed");n("pending");for(const s of t)ds({...a,type:e},window.parent,s)},status:r}},jt=(e,t,r)=>{fs(e,t,(o,a,s)=>{const{type:i,payload:c}=o;i===e&&typeof r=="function"&&r(d=>ds({...d,type:e},s,a),c)})},fs=(e,t,r)=>{const[n,o]=w.useState(),[a,s]=w.useState(),i=w.useRef(),c=w.useRef();i.current=n,c.current=a;const d=w.useCallback(({origin:u,source:g,data:l})=>{var x;if((x=l==null?void 0:l.source)!=null&&x.startsWith("react-devtools")||!t.includes(u))return;const{type:v}=l;v===e&&(s(g),o(u),r(l,u,g))},[e,t,s,o,r]);w.useEffect(()=>(window.addEventListener("message",d),()=>window.removeEventListener("message",d)),[e,a,n,d])},$d=e=>(t,r,n)=>{const{status:o}=t;o==="success"?e("success"):o==="error"&&e("error")};class Fd{constructor(t=!1){Dt(this,"enable",t=>{this.enabled=t,this.enabled&&console.log("[DEBUG] xYextDebug enabled")});Dt(this,"logData",(t,r)=>{this.enabled&&console.log("[DEBUG]",t,"-",r)});Dt(this,"logFunc",t=>{this.enabled&&console.log("[DEBUG] -->",t,"called")});Dt(this,"log",t=>{this.enabled&&console.log("[DEBUG]",t)});this.enabled=t,this.enabled&&console.log("[DEBUG] xYextDebug enabled")}}const Bd={GLOBAL:"global",INDIVIDUAL:"individual"},Pe=["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"],ce=new Fd,Wd=({document:e,componentRegistry:t})=>{const[r,n]=w.useState(),[o,a]=w.useState(!1),[s,i]=w.useState(),[c,d]=w.useState(!1),[u,g]=w.useState(),[l,v]=w.useState(!1),[x,h]=w.useState(void 0),[y,E]=w.useState(void 0),[b,C]=w.useState(),[P,R]=w.useState(),[D,O]=w.useState(!1);e&&ce.logData("DOCUMENT",e);const N=w.useCallback(()=>b?Ur(b.isDevMode&&!b.devOverride,b.role,b.templateId,b.layoutId,b.entityId):"",[b]);w.useEffect(()=>{if(typeof window<"u"){const k=window.location.ancestorOrigins;k.length===0||!k[0].includes("pagescdn")&&!k[0].includes("yext.com")&&!k[0].includes("localhost")?window.location.assign("/404.html"):O(!0)}},[]),jt("getTemplateMetadata",Pe,(k,J)=>{const te=t.get(J.templateId);R(te);const G=J;C(J),ce.enable(G.isxYextDebug),ce.logData("TEMPLATE_METADATA",G),ce.logData("PUCK_CONFIG",te),k({status:"success",payload:{message:"payload received"}})}),w.useEffect(()=>{if(b!=null&&b.isDevMode)try{h(pageSets),E(siteStream)}catch{console.warn("pageSets are not defined")}},[b==null?void 0:b.isDevMode]);const z=()=>{ce.logFunc("clearLocalStorage"),window.localStorage.removeItem(N())},H=()=>{ce.logFunc("clearHistory"),z(),K()},U=w.useRef(!0);w.useEffect(()=>{if(U.current){U.current=!1;return}_()},[b,l,c]);const _=w.useCallback(()=>{if(!c||!l||!b)return;if(ce.logFunc("loadPuckInitialHistory"),b.isDevMode&&!b.devOverride){const te=window.localStorage.getItem(N());if(te){ce.log("Dev Mode - Using localStorage");const G=JSON.parse(te),xe=G.length-1;n({histories:G,index:xe,appendData:!1}),a(!0);return}ce.log("Dev Mode - No localStorage. Using data from Content"),s&&n({histories:[{id:"root",state:{data:s}}],appendData:!1}),a(!0);return}if(!u){z(),ce.log("Prod Mode - No saveState. Using data from Content"),s&&n({histories:[{id:"root",state:{data:s}}],appendData:!1}),a(!0);return}const k=window.localStorage.getItem(N());if(!k){ce.log("Prod Mode - No localStorage. Using saveState"),n({histories:s?[{id:"root",state:{data:s}},{id:u.hash,state:kr(u.history)}]:[{id:u.hash,state:kr(u.history)}],index:s?1:0,appendData:!1}),a(!0);return}const J=JSON.parse(k).findIndex(te=>te.id===(u==null?void 0:u.hash));if(J!==-1){ce.log("Prod Mode - Using localStorage"),n({histories:JSON.parse(k),index:J,appendData:!1}),a(!0);return}z()},[n,a,z,Ur]);w.useEffect(()=>{r&&ce.logData("PUCK_INITIAL_HISTORY",r)},[r]);const{sendToParent:Y}=at("iFrameLoaded",Pe),{sendToParent:M}=at("sendDevSaveStateData",Pe);w.useEffect(()=>{Y({payload:{message:"iFrame is loaded"}})},[]),w.useEffect(()=>{var k;if(b!=null&&b.isDevMode){const J=window.localStorage.getItem(N()),te=J?JSON.parse(J):[],G=JSON.stringify(te.length>0?(k=te[te.length-1].data)==null?void 0:k.data:{});M({payload:{devSaveStateData:G}})}},[b]),jt("getSaveState",Pe,(k,J)=>{ce.logData("SAVE_STATE",J),g(J),v(!0),k({status:"success",payload:{message:"saveState received"}})}),jt("getVisualConfigurationData",Pe,(k,J)=>{const te=kr(J.visualConfigurationData);ce.logData("VISUAL_CONFIGURATION_DATA",te),i(te),d(!0),k({status:"success",payload:{message:"getVisualConfigurationData received"}})});const{sendToParent:X}=at("pushPageSets",Pe);w.useEffect(()=>{typeof window<"u"&&(b!=null&&b.isDevMode)&&x&&X({payload:{...x,siteStream:y}})},[b==null?void 0:b.isDevMode,x]);const{sendToParent:F}=at("saveSaveState",Pe),{sendToParent:K}=at("deleteSaveState",Pe),{sendToParent:A}=at("saveVisualConfigData",Pe),{sendToParent:B}=at("openQuickFind",Pe),oe=k=>{(k.ctrlKey||k.metaKey)&&k.key==="k"&&B()};w.useEffect(()=>(window.addEventListener("keydown",oe),()=>{window.removeEventListener("keydown",oe)}),[]);const I=!P||!b||!e||!l||!c||!o,W=100*(!!P+!!b+!!e+l+c+o)/6;return m.jsxs(m.Fragment,{children:[I?D&&m.jsx(ld,{progress:W}):m.jsx(ed,{puckConfig:P,isLoading:I,puckInitialHistory:r,clearHistory:b.isDevMode&&!b.devOverride?z:H,templateMetadata:b,saveState:u,saveSaveState:F,saveVisualConfigData:A,sendDevSaveStateData:M,buildLocalStorageKey:N,devLogger:ce}),m.jsx(Id,{closeButton:!0,richColors:!0})]})},kr=e=>JSON.parse(e.replace(/\\"/g,'"')),zd=()=>{const[e,t]=w.useState();return jt("getEntityDocument",Pe,(r,n)=>{t(n),r({status:"success",payload:{message:"getEntityDocument received"}})}),e},Vd=()=>{const[e,t]=w.useState(void 0);return jt("getTemplateStream",Pe,(r,n)=>{t(n),r({status:"success",payload:{message:"templateStream received"}})}),e},ps=f.createContext(void 0),Hd=({entityFields:e,children:t})=>m.jsx(ps.Provider,{value:e,children:t}),gs=()=>{const e=f.useContext(ps);if(!e)throw new Error("useEntityFields must be used within a DocumentProvider");return e},Ud=["uid","meta","slug","c_visualConfigurations","c_pages_layouts"],Yd=["type.image","type.hours","type.address"],vs=e=>hs(e,""),hs=(e,t)=>{var n,o,a;const r=t?`${t}.${e.name}`:e.name;if(Yd.includes(ms(e)))return[{name:r,schemaField:e}];if((n=e.children)!=null&&n.fields&&((a=(o=e.children)==null?void 0:o.fields)==null?void 0:a.length)>0){const s=[];for(const i of e.children.fields)s.push(...hs(i,r));return s}return[{name:r,schemaField:e}]},ms=e=>e.definition.typeName||e.definition.typeRegistryId||Object.entries(e.definition.type)[0][1];function Gd(e,t,r){const n=e.get(t)||[];return n.push(r),e.set(t,n),e}const qd=(e,t)=>e.reduce((r,n)=>{if(n.definition.isList)return r;const o=vs(n);for(const a of o){const s=ms(a.schemaField);s&&(r=Gd(r,s,a.name))}return r},new Map),bs=e=>{let r=gs().stream.schema.fields.filter(n=>!Ud.includes(n.name));if(e!=null&&e.allowList){const n=r.map(o=>o.name);e.allowList.forEach(o=>{n.includes(o)||console.warn(`The entity field filter allowList included ${o}, which does not exist in the stream.`)}),r=r.filter(o=>e.allowList.includes(o.name))}if(e!=null&&e.disallowList&&(r=r.filter(n=>!e.disallowList.includes(n.name))),e!=null&&e.types){const n=qd(r);e.types.forEach(o=>{r=r.filter(a=>{var s;return(s=n.get(o))==null?void 0:s.includes(a.name)})})}if(e!=null&&e.includeSubfields){const n=[];for(const o of r){const a=vs(o);for(const s of a)n.push({...s.schemaField,name:s.name})}r=n}return r},Kd=e=>({type:"custom",label:e.label,render:({field:t,value:r,onChange:n})=>{const o=bs(e.filter);return m.jsxs(m.Fragment,{children:[m.jsx(_e.FieldLabel,{label:t.label||"Label is undefined",children:m.jsx(_e.AutoField,{field:{type:"select",options:[{value:"",label:"Select a Content field"},...o.map(a=>({label:a.name,value:a.name}))]},onChange:a=>{n({fieldName:a,staticValue:r.staticValue})},value:r==null?void 0:r.fieldName})}),m.jsx(_e.FieldLabel,{label:"Static Value",className:"entityField-staticValue",children:m.jsx(_e.AutoField,{onChange:a=>n({fieldName:r.fieldName,staticValue:a}),value:r==null?void 0:r.staticValue,field:{type:"text"}})})]})}}),Xd=e=>{const t=bs(e.filter),r={};return r[e.fieldName]={label:"Entity Field",type:"select",options:t.map(n=>({label:n.name,value:n.name}))},m.jsx(m.Fragment,{children:m.jsx(_e.FieldLabel,{label:e.renderProps.field.label,children:m.jsx(_e.AutoField,{field:{type:"object",objectFields:{...r,...e.objectFields}},onChange:n=>e.renderProps.onChange(n),value:e.renderProps.value})})})},Gr=JSON.stringify({root:{},content:[],zones:{}});function Jd(e,t){var i,c,d;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 u of n)if(u.template===t){const g=JSON.parse(_r(u.data,t));return{...e,document:{...r,visualTemplate:g}}}for(const u of o)if(((c=u.c_visualConfiguration)==null?void 0:c.template)===t){const g=JSON.parse(_r(u.c_visualConfiguration.data,t));return{...e,document:{...r,visualTemplate:g}}}if(a){for(const u of a)if(((d=u.c_visualConfiguration)==null?void 0:d.template)===t){const g=JSON.parse(_r(u.c_visualConfiguration.data,t));return{...e,document:{...r,visualTemplate:g}}}}console.warn(`Unable to find puck data for template: ${t}`);const s=JSON.parse(Gr);return{...e,document:{...r,visualTemplate:s}}}function _r(e,t){if(!e||e.length<1)return console.warn(`Missing visual editor data for template: ${t}`),Gr;try{JSON.parse(e)}catch{return console.warn(`Invalid visual editor data for template: ${t}`),Gr}return e}const Zd=(e,t)=>{if(t.fieldName==="")return t.staticValue;try{const r=t.fieldName.split(".");let n=!1,o=e;for(let a=0;a<r.length;a++)if((o==null?void 0:o[r[a]])!==void 0)o=o[r[a]];else{n=!0;break}if(!n)return o}catch(r){console.error("Error in resolveYextEntityField:",r)}return console.warn(`The field ${t.fieldName} was not found in the document, defaulting to static value ${t.staticValue}.`),t.staticValue};exports.Editor=Wd;exports.EntityField=Yu;exports.EntityFieldsProvider=Hd;exports.YextEntityFieldSelector=Kd;exports.renderEntityFields=Xd;exports.resolveVisualEditorData=Jd;exports.resolveYextEntityField=Zd;exports.useEntityFields=gs;exports.usePlatformBridgeDocument=zd;exports.usePlatformBridgeEntityFields=Vd;
|
|
130
|
+
Defaulting to \`null\`.`}var Rs=ws,af=Cs;const Ps=d.forwardRef(({className:e,value:t,...n},r)=>v.jsx(Rs,{ref:r,className:de("ve-relative ve-h-4 ve-w-full ve-overflow-hidden ve-rounded-full ve-bg-secondary",e),...n,children:v.jsx(af,{className:"ve-h-full ve-w-full ve-flex-1 ve-bg-primary ve-transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Ps.displayName=Rs.displayName;function sf({progress:e}){return v.jsxs("div",{className:"ve-flex ve-h-screen ve-loading-wrapper ve-w-screen ve-flex-col ve-items-center ve-justify-center",children:[v.jsx(Ps,{className:"ve-w-1/3 ve-loading-progress",value:e}),v.jsx("div",{children:"Loading Visual Editor..."})]})}var bo=["light","dark"],cf="(prefers-color-scheme: dark)",lf=d.createContext(void 0),uf={setTheme:e=>{},themes:[]},df=()=>{var e;return(e=d.useContext(lf))!=null?e:uf};d.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:a,value:s,attrs:i,nonce:c})=>{let u=a==="system",f=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${i.map(y=>`'${y}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,p=o?bo.includes(a)&&a?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${a}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",l=(y,h=!1,b=!0)=>{let x=s?s[y]:y,w=h?y+"|| ''":`'${x}'`,C="";return o&&b&&!h&&bo.includes(y)&&(C+=`d.style.colorScheme = '${y}';`),n==="class"?h||x?C+=`c.add(${w})`:C+="null":x&&(C+=`d[s](n,${w})`),C},g=e?`!function(){${f}${l(e)}}()`:r?`!function(){try{${f}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${cf}',m=window.matchMedia(t);if(m.media!==t||m.matches){${l("dark")}}else{${l("light")}}}else if(e){${s?`var x=${JSON.stringify(s)};`:""}${l(s?"x[e]":"e",!0)}}${u?"":"else{"+l(a,!1,!1)+"}"}${p}}catch(e){}}()`:`!function(){try{${f}var e=localStorage.getItem('${t}');if(e){${s?`var x=${JSON.stringify(s)};`:""}${l(s?"x[e]":"e",!0)}}else{${l(a,!1,!1)};}${p}}catch(t){}}();`;return d.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:g}})});var ff=e=>{switch(e){case"success":return mf;case"info":return hf;case"warning":return gf;case"error":return yf;default:return null}},pf=Array(12).fill(0),vf=({visible:e})=>E.createElement("div",{className:"sonner-loading-wrapper","data-visible":e},E.createElement("div",{className:"sonner-spinner"},pf.map((t,n)=>E.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),mf=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"})),gf=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"})),hf=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"})),yf=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"})),bf=()=>{let[e,t]=E.useState(document.hidden);return E.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},nr=1,xf=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:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:nr++,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:n}),{...i,...e,id:o,dismissible:s,title:n}):i):this.addToast({title:n,...r,dismissible:s,id:o}),o},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({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 n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0;return r.then(async a=>{if(Ef(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:n,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:n,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:n,type:"error",message:s,description:i})}}).finally(()=>{var a;o&&(this.dismiss(n),n=void 0),(a=t.finally)==null||a.call(t)}),n},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||nr++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},Ee=new xf,wf=(e,t)=>{let n=(t==null?void 0:t.id)||nr++;return Ee.addToast({title:e,...t,id:n}),n},Ef=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Cf=wf,Sf=()=>Ee.toasts;Object.assign(Cf,{success:Ee.success,info:Ee.info,warning:Ee.warning,error:Ee.error,custom:Ee.custom,message:Ee.message,promise:Ee.promise,dismiss:Ee.dismiss,loading:Ee.loading},{getHistory:Sf});function Rf(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Rf(`: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%)}
|
|
131
|
+
`);function nn(e){return e.label!==void 0}var Pf=3,Af="32px",Tf=4e3,Nf=356,Of=14,Df=20,kf=200;function _f(...e){return e.filter(Boolean).join(" ")}var jf=e=>{var t,n,r,o,a,s,i,c,u,f;let{invert:p,toast:l,unstyled:g,interacting:y,setHeights:h,visibleToasts:b,heights:x,index:w,toasts:C,expanded:P,removeToast:R,defaultRichColors:D,closeButton:A,style:O,cancelButtonStyle:$,actionButtonStyle:M,className:z="",descriptionClassName:k="",duration:I,position:B,gap:q,loadingIcon:_,expandByDefault:X,classNames:N,icons:U,closeButtonAriaLabel:se="Close toast",pauseWhenPageIsHidden:L,cn:H}=e,[J,G]=E.useState(!1),[ne,V]=E.useState(!1),[fe,me]=E.useState(!1),[Re,xe]=E.useState(!1),[ut,Me]=E.useState(0),[Ie,rt]=E.useState(0),Le=E.useRef(null),he=E.useRef(null),dt=w===0,ft=w+1<=b,ie=l.type,Ge=l.dismissible!==!1,Rn=l.className||"",Tt=l.descriptionClassName||"",pt=E.useMemo(()=>x.findIndex(F=>F.toastId===l.id)||0,[x,l.id]),Pn=E.useMemo(()=>{var F;return(F=l.closeButton)!=null?F:A},[l.closeButton,A]),Nt=E.useMemo(()=>l.duration||I||Tf,[l.duration,I]),vt=E.useRef(0),Pe=E.useRef(0),Ht=E.useRef(0),Fe=E.useRef(null),[Ot,Dt]=B.split("-"),Gt=E.useMemo(()=>x.reduce((F,Q,ee)=>ee>=pt?F:F+Q.height,0),[x,pt]),Yt=bf(),An=l.invert||p,kt=ie==="loading";Pe.current=E.useMemo(()=>pt*q+Gt,[pt,Gt]),E.useEffect(()=>{G(!0)},[]),E.useLayoutEffect(()=>{if(!J)return;let F=he.current,Q=F.style.height;F.style.height="auto";let ee=F.getBoundingClientRect().height;F.style.height=Q,rt(ee),h(pe=>pe.find(ye=>ye.toastId===l.id)?pe.map(ye=>ye.toastId===l.id?{...ye,height:ee}:ye):[{toastId:l.id,height:ee,position:l.position},...pe])},[J,l.title,l.description,h,l.id]);let De=E.useCallback(()=>{V(!0),Me(Pe.current),h(F=>F.filter(Q=>Q.toastId!==l.id)),setTimeout(()=>{R(l)},kf)},[l,R,h,Pe]);E.useEffect(()=>{if(l.promise&&ie==="loading"||l.duration===1/0||l.type==="loading")return;let F,Q=Nt;return P||y||L&&Yt?(()=>{if(Ht.current<vt.current){let ee=new Date().getTime()-vt.current;Q=Q-ee}Ht.current=new Date().getTime()})():Q!==1/0&&(vt.current=new Date().getTime(),F=setTimeout(()=>{var ee;(ee=l.onAutoClose)==null||ee.call(l,l),De()},Q)),()=>clearTimeout(F)},[P,y,X,l,Nt,De,l.promise,ie,L,Yt]),E.useEffect(()=>{let F=he.current;if(F){let Q=F.getBoundingClientRect().height;return rt(Q),h(ee=>[{toastId:l.id,height:Q,position:l.position},...ee]),()=>h(ee=>ee.filter(pe=>pe.toastId!==l.id))}},[h,l.id]),E.useEffect(()=>{l.delete&&De()},[De,l.delete]);function Tn(){return U!=null&&U.loading?E.createElement("div",{className:"sonner-loader","data-visible":ie==="loading"},U.loading):_?E.createElement("div",{className:"sonner-loader","data-visible":ie==="loading"},_):E.createElement(vf,{visible:ie==="loading"})}return E.createElement("li",{"aria-live":l.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:he,className:H(z,Rn,N==null?void 0:N.toast,(t=l==null?void 0:l.classNames)==null?void 0:t.toast,N==null?void 0:N.default,N==null?void 0:N[ie],(n=l==null?void 0:l.classNames)==null?void 0:n[ie]),"data-sonner-toast":"","data-rich-colors":(r=l.richColors)!=null?r:D,"data-styled":!(l.jsx||l.unstyled||g),"data-mounted":J,"data-promise":!!l.promise,"data-removed":ne,"data-visible":ft,"data-y-position":Ot,"data-x-position":Dt,"data-index":w,"data-front":dt,"data-swiping":fe,"data-dismissible":Ge,"data-type":ie,"data-invert":An,"data-swipe-out":Re,"data-expanded":!!(P||X&&J),style:{"--index":w,"--toasts-before":w,"--z-index":C.length-w,"--offset":`${ne?ut:Pe.current}px`,"--initial-height":X?"auto":`${Ie}px`,...O,...l.style},onPointerDown:F=>{kt||!Ge||(Le.current=new Date,Me(Pe.current),F.target.setPointerCapture(F.pointerId),F.target.tagName!=="BUTTON"&&(me(!0),Fe.current={x:F.clientX,y:F.clientY}))},onPointerUp:()=>{var F,Q,ee,pe;if(Re||!Ge)return;Fe.current=null;let ye=Number(((F=he.current)==null?void 0:F.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Ye=new Date().getTime()-((Q=Le.current)==null?void 0:Q.getTime()),Kt=Math.abs(ye)/Ye;if(Math.abs(ye)>=Df||Kt>.11){Me(Pe.current),(ee=l.onDismiss)==null||ee.call(l,l),De(),xe(!0);return}(pe=he.current)==null||pe.style.setProperty("--swipe-amount","0px"),me(!1)},onPointerMove:F=>{var Q;if(!Fe.current||!Ge)return;let ee=F.clientY-Fe.current.y,pe=F.clientX-Fe.current.x,ye=(Ot==="top"?Math.min:Math.max)(0,ee),Ye=F.pointerType==="touch"?10:2;Math.abs(ye)>Ye?(Q=he.current)==null||Q.style.setProperty("--swipe-amount",`${ee}px`):Math.abs(pe)>Ye&&(Fe.current=null)}},Pn&&!l.jsx?E.createElement("button",{"aria-label":se,"data-disabled":kt,"data-close-button":!0,onClick:kt||!Ge?()=>{}:()=>{var F;De(),(F=l.onDismiss)==null||F.call(l,l)},className:H(N==null?void 0:N.closeButton,(o=l==null?void 0:l.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,l.jsx||E.isValidElement(l.title)?l.jsx||l.title:E.createElement(E.Fragment,null,ie||l.icon||l.promise?E.createElement("div",{"data-icon":"",className:H(N==null?void 0:N.icon,(a=l==null?void 0:l.classNames)==null?void 0:a.icon)},l.promise||l.type==="loading"&&!l.icon?l.icon||Tn():null,l.type!=="loading"?l.icon||(U==null?void 0:U[ie])||ff(ie):null):null,E.createElement("div",{"data-content":"",className:H(N==null?void 0:N.content,(s=l==null?void 0:l.classNames)==null?void 0:s.content)},E.createElement("div",{"data-title":"",className:H(N==null?void 0:N.title,(i=l==null?void 0:l.classNames)==null?void 0:i.title)},l.title),l.description?E.createElement("div",{"data-description":"",className:H(k,Tt,N==null?void 0:N.description,(c=l==null?void 0:l.classNames)==null?void 0:c.description)},l.description):null),E.isValidElement(l.cancel)?l.cancel:l.cancel&&nn(l.cancel)?E.createElement("button",{"data-button":!0,"data-cancel":!0,style:l.cancelButtonStyle||$,onClick:F=>{var Q,ee;nn(l.cancel)&&Ge&&((ee=(Q=l.cancel).onClick)==null||ee.call(Q,F),De())},className:H(N==null?void 0:N.cancelButton,(u=l==null?void 0:l.classNames)==null?void 0:u.cancelButton)},l.cancel.label):null,E.isValidElement(l.action)?l.action:l.action&&nn(l.action)?E.createElement("button",{"data-button":!0,"data-action":!0,style:l.actionButtonStyle||M,onClick:F=>{var Q,ee;nn(l.action)&&(F.defaultPrevented||((ee=(Q=l.action).onClick)==null||ee.call(Q,F),De()))},className:H(N==null?void 0:N.actionButton,(f=l==null?void 0:l.classNames)==null?void 0:f.actionButton)},l.action.label):null))};function xo(){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 Mf=e=>{let{invert:t,position:n="bottom-right",hotkey:r=["altKey","KeyT"],expand:o,closeButton:a,className:s,offset:i,theme:c="light",richColors:u,duration:f,style:p,visibleToasts:l=Pf,toastOptions:g,dir:y=xo(),gap:h=Of,loadingIcon:b,icons:x,containerAriaLabel:w="Notifications",pauseWhenPageIsHidden:C,cn:P=_f}=e,[R,D]=E.useState([]),A=E.useMemo(()=>Array.from(new Set([n].concat(R.filter(L=>L.position).map(L=>L.position)))),[R,n]),[O,$]=E.useState([]),[M,z]=E.useState(!1),[k,I]=E.useState(!1),[B,q]=E.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),_=E.useRef(null),X=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),N=E.useRef(null),U=E.useRef(!1),se=E.useCallback(L=>{var H;(H=R.find(J=>J.id===L.id))!=null&&H.delete||Ee.dismiss(L.id),D(J=>J.filter(({id:G})=>G!==L.id))},[R]);return E.useEffect(()=>Ee.subscribe(L=>{if(L.dismiss){D(H=>H.map(J=>J.id===L.id?{...J,delete:!0}:J));return}setTimeout(()=>{ir.flushSync(()=>{D(H=>{let J=H.findIndex(G=>G.id===L.id);return J!==-1?[...H.slice(0,J),{...H[J],...L},...H.slice(J+1)]:[L,...H]})})})}),[]),E.useEffect(()=>{if(c!=="system"){q(c);return}c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?q("dark"):q("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:L})=>{q(L?"dark":"light")})},[c]),E.useEffect(()=>{R.length<=1&&z(!1)},[R]),E.useEffect(()=>{let L=H=>{var J,G;r.every(ne=>H[ne]||H.code===ne)&&(z(!0),(J=_.current)==null||J.focus()),H.code==="Escape"&&(document.activeElement===_.current||(G=_.current)!=null&&G.contains(document.activeElement))&&z(!1)};return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)},[r]),E.useEffect(()=>{if(_.current)return()=>{N.current&&(N.current.focus({preventScroll:!0}),N.current=null,U.current=!1)}},[_.current]),R.length?E.createElement("section",{"aria-label":`${w} ${X}`,tabIndex:-1},A.map((L,H)=>{var J;let[G,ne]=L.split("-");return E.createElement("ol",{key:L,dir:y==="auto"?xo():y,tabIndex:-1,ref:_,className:s,"data-sonner-toaster":!0,"data-theme":B,"data-y-position":G,"data-x-position":ne,style:{"--front-toast-height":`${((J=O[0])==null?void 0:J.height)||0}px`,"--offset":typeof i=="number"?`${i}px`:i||Af,"--width":`${Nf}px`,"--gap":`${h}px`,...p},onBlur:V=>{U.current&&!V.currentTarget.contains(V.relatedTarget)&&(U.current=!1,N.current&&(N.current.focus({preventScroll:!0}),N.current=null))},onFocus:V=>{V.target instanceof HTMLElement&&V.target.dataset.dismissible==="false"||U.current||(U.current=!0,N.current=V.relatedTarget)},onMouseEnter:()=>z(!0),onMouseMove:()=>z(!0),onMouseLeave:()=>{k||z(!1)},onPointerDown:V=>{V.target instanceof HTMLElement&&V.target.dataset.dismissible==="false"||I(!0)},onPointerUp:()=>I(!1)},R.filter(V=>!V.position&&H===0||V.position===L).map((V,fe)=>{var me,Re;return E.createElement(jf,{key:V.id,icons:x,index:fe,toast:V,defaultRichColors:u,duration:(me=g==null?void 0:g.duration)!=null?me:f,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:t,visibleToasts:l,closeButton:(Re=g==null?void 0:g.closeButton)!=null?Re:a,interacting:k,position:L,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:se,toasts:R.filter(xe=>xe.position==V.position),heights:O.filter(xe=>xe.position==V.position),setHeights:$,expandByDefault:o,gap:h,loadingIcon:b,expanded:M,pauseWhenPageIsHidden:C,cn:P})}))})):null};const If=({...e})=>{const{theme:t="system"}=df();return v.jsx(Mf,{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})},As=(e,t,n="*")=>t==null?void 0:t.postMessage(e,{targetOrigin:n}),at=(e,t)=>{const[n,r]=E.useState("pending");return Ts(e,t,Lf(r)),{sendToParent:a=>{if(!window.parent)throw new Error("Parent window has closed");r("pending");for(const s of t)As({...a,type:e},window.parent,s)},status:n}},Et=(e,t,n)=>{Ts(e,t,(o,a,s)=>{const{type:i,payload:c}=o;i===e&&typeof n=="function"&&n(u=>As({...u,type:e},s,a),c)})},Ts=(e,t,n)=>{const[r,o]=E.useState(),[a,s]=E.useState(),i=E.useRef(),c=E.useRef();i.current=r,c.current=a;const u=E.useCallback(({origin:f,source:p,data:l})=>{var y;if((y=l==null?void 0:l.source)!=null&&y.startsWith("react-devtools")||!t.includes(f))return;const{type:g}=l;g===e&&(s(p),o(f),n(l,f,p))},[e,t,s,o,n]);E.useEffect(()=>(window.addEventListener("message",u),()=>window.removeEventListener("message",u)),[e,a,r,u])},Lf=e=>(t,n,r)=>{const{status:o}=t;o==="success"?e("success"):o==="error"&&e("error")};class Ff{constructor(t=!1){_t(this,"enable",t=>{this.enabled=t,this.enabled&&console.log("[DEBUG] xYextDebug enabled")});_t(this,"logData",(t,n)=>{this.enabled&&console.log("[DEBUG]",t,"-",n)});_t(this,"logFunc",t=>{this.enabled&&console.log("[DEBUG] -->",t,"called")});_t(this,"log",t=>{this.enabled&&console.log("[DEBUG]",t)});this.enabled=t,this.enabled&&console.log("[DEBUG] xYextDebug enabled")}}const $f={GLOBAL:"global",INDIVIDUAL:"individual"},we=["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"],ve=new Ff,Bf=({document:e,componentRegistry:t,themeConfig:n})=>{const[r,o]=E.useState(),[a,s]=E.useState(!1),[i,c]=E.useState(),[u,f]=E.useState(!1),[p,l]=E.useState(),[g,y]=E.useState(!1),[h,b]=E.useState(void 0),[x,w]=E.useState(void 0),[C,P]=E.useState(),[R,D]=E.useState(),[A,O]=E.useState(!1);e&&ve.logData("DOCUMENT",e);const $=E.useCallback(()=>C?Qn(C.isDevMode&&!C.devOverride,C.role,C.templateId,C.layoutId,C.entityId):"",[C]);E.useEffect(()=>{if(typeof window<"u"){const G=window.location.ancestorOrigins;G.length===0||!G[0].includes("pagescdn")&&!G[0].includes("yext.com")&&!G[0].includes("localhost")?window.location.assign("/404.html"):O(!0)}},[]),Et("getTemplateMetadata",we,(G,ne)=>{const V=t.get(ne.templateId);D(V);const fe=ne;P(ne),ve.enable(fe.isxYextDebug),ve.logData("TEMPLATE_METADATA",fe),ve.logData("PUCK_CONFIG",V),G({status:"success",payload:{message:"payload received"}})}),E.useEffect(()=>{if(C!=null&&C.isDevMode)try{b(pageSets),w(siteStream)}catch{console.warn("pageSets are not defined")}},[C==null?void 0:C.isDevMode]);const M=()=>{ve.logFunc("clearLocalStorage"),window.localStorage.removeItem($())},z=()=>{ve.logFunc("clearHistory"),M(),N()},k=E.useRef(!0);E.useEffect(()=>{if(k.current){k.current=!1;return}I()},[C,g,u]);const I=E.useCallback(()=>{if(!u||!g||!C)return;if(ve.logFunc("loadPuckInitialHistory"),C.isDevMode&&!C.devOverride){const V=window.localStorage.getItem($());if(V){ve.log("Dev Mode - Using localStorage");const fe=JSON.parse(V),me=fe.length-1;o({histories:fe,index:me,appendData:!1}),s(!0);return}ve.log("Dev Mode - No localStorage. Using data from Content"),i&&o({histories:[{id:"root",state:{data:i}}],appendData:!1}),s(!0);return}if(!p){M(),ve.log("Prod Mode - No saveState. Using data from Content"),i&&o({histories:[{id:"root",state:{data:i}}],appendData:!1}),s(!0);return}const G=window.localStorage.getItem($());if(!G){ve.log("Prod Mode - No localStorage. Using saveState"),o({histories:i?[{id:"root",state:{data:i}},{id:p.hash,state:$n(p.history)}]:[{id:p.hash,state:$n(p.history)}],index:i?1:0,appendData:!1}),s(!0);return}const ne=JSON.parse(G).findIndex(V=>V.id===(p==null?void 0:p.hash));if(ne!==-1){ve.log("Prod Mode - Using localStorage"),o({histories:JSON.parse(G),index:ne,appendData:!1}),s(!0);return}M()},[o,s,M,Qn]);E.useEffect(()=>{r&&ve.logData("PUCK_INITIAL_HISTORY",r)},[r]);const{sendToParent:B}=at("iFrameLoaded",we),{sendToParent:q}=at("sendDevSaveStateData",we);E.useEffect(()=>{B({payload:{message:"iFrame is loaded"}})},[]),E.useEffect(()=>{var G;if(C!=null&&C.isDevMode){const ne=window.localStorage.getItem($()),V=ne?JSON.parse(ne):[],fe=JSON.stringify(V.length>0?(G=V[V.length-1].data)==null?void 0:G.data:{});q({payload:{devSaveStateData:fe}})}},[C]),Et("getSaveState",we,(G,ne)=>{ve.logData("SAVE_STATE",ne),l(ne),y(!0),G({status:"success",payload:{message:"saveState received"}})}),Et("getVisualConfigurationData",we,(G,ne)=>{const V=$n(ne.visualConfigurationData);ve.logData("VISUAL_CONFIGURATION_DATA",V),c(V),f(!0),G({status:"success",payload:{message:"getVisualConfigurationData received"}})});const{sendToParent:_}=at("pushPageSets",we);E.useEffect(()=>{typeof window<"u"&&(C!=null&&C.isDevMode)&&h&&_({payload:{...h,siteStream:x}})},[C==null?void 0:C.isDevMode,h]);const{sendToParent:X}=at("saveSaveState",we),{sendToParent:N}=at("deleteSaveState",we),{sendToParent:U}=at("saveVisualConfigData",we),{sendToParent:se}=at("openQuickFind",we),L=G=>{(G.ctrlKey||G.metaKey)&&G.key==="k"&&se()};E.useEffect(()=>(window.addEventListener("keydown",L),()=>{window.removeEventListener("keydown",L)}),[]);const H=!R||!C||!e||!g||!u||!a,J=100*(!!R+!!C+!!e+g+u+a)/6;return v.jsxs(v.Fragment,{children:[H?A&&v.jsx(sf,{progress:J}):v.jsx(Zd,{puckConfig:R,isLoading:H,puckInitialHistory:r,clearHistory:C.isDevMode&&!C.devOverride?M:z,templateMetadata:C,saveState:p,saveSaveState:X,saveVisualConfigData:U,sendDevSaveStateData:q,buildLocalStorageKey:$,devLogger:ve,themeConfig:n}),v.jsx(If,{closeButton:!0,richColors:!0})]})},$n=e=>JSON.parse(e.replace(/\\"/g,'"')),Wf=()=>{const[e,t]=E.useState(void 0);return Et("getTemplateStream",we,(n,r)=>{t(r.stream.schema.fields),n({status:"success",payload:{message:"templateStream received"}})}),Et("getDevEntityFields",we,(n,r)=>{t(Vf(r)),n({status:"success",payload:{message:"getDevEntityFields received"}})}),e},Vf=e=>e.map(t=>({name:t.name,definition:{name:t.name,typeName:t.typeName,type:t.type,registryId:t.registryId,typeRegistryId:t.typeRegistryId,isList:t.isList},children:t.children??[]})),Ns=d.createContext(void 0),zf=({entityFields:e,children:t})=>v.jsx(Ns.Provider,{value:e,children:t}),Os=()=>{const e=d.useContext(Ns);if(!e)throw new Error("useEntityFields must be used within a DocumentProvider");return e},Uf=["uid","meta","slug","c_visualConfigurations","c_pages_layouts"],Hf=[],Ds=e=>ks(e,""),ks=(e,t)=>{var o,a,s;const n=t?`${t}.${e.name}`:e.name;if(Hf.includes(_s(e)))return[{name:n,schemaField:e}];if(e.definition.isList)return[];const r=[{name:n,schemaField:e}];if((o=e.children)!=null&&o.fields&&((s=(a=e.children)==null?void 0:a.fields)==null?void 0:s.length)>0)for(const i of e.children.fields)r.push(...ks(i,n));return r},_s=e=>e.definition.typeName||e.definition.typeRegistryId||Object.entries(e.definition.type)[0][1];function Gf(e,t,n){const r=e.get(t)||[];return r.push(n),e.set(t,r),e}const Yf=e=>e.reduce((t,n)=>{const r=Ds(n);for(const o of r){const a=_s(o.schemaField);a&&(t=Gf(t,a,o.name))}return t},new Map),Kf=e=>{let n=Os().filter(o=>!Uf.includes(o.name));if(e!=null&&e.allowList){const o=n.map(a=>a.name);e.allowList.forEach(a=>{o.includes(a)||console.warn(`The entity field filter allowList included ${a}, which does not exist in the stream.`)}),n=n.filter(a=>e.allowList.includes(a.name))}e!=null&&e.disallowList&&(n=n.filter(o=>!e.disallowList.includes(o.name)));let r=[];for(const o of n){const a=Ds(o);for(const s of a)r.push({...s.schemaField,name:s.name})}if(e!=null&&e.types){const o=Yf(r),a=[];e.types.forEach(s=>{a.push(...r.filter(i=>{var c;return(c=o.get(s))==null?void 0:c.includes(i.name)}))}),r=a}return r};function js(e,t=[]){let n=[];function r(a,s){const i=d.createContext(s),c=n.length;n=[...n,s];const u=p=>{var x;const{scope:l,children:g,...y}=p,h=((x=l==null?void 0:l[e])==null?void 0:x[c])||i,b=d.useMemo(()=>y,Object.values(y));return v.jsx(h.Provider,{value:b,children:g})};u.displayName=a+"Provider";function f(p,l){var h;const g=((h=l==null?void 0:l[e])==null?void 0:h[c])||i,y=d.useContext(g);if(y)return y;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[u,f]}const o=()=>{const a=n.map(s=>d.createContext(s));return function(i){const c=(i==null?void 0:i[e])||a;return d.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[r,qf(o,...t)]}function qf(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=r.reduce((i,{useScope:c,scopeName:u})=>{const p=c(a)[`__scope${u}`];return{...i,...p}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Xf(e){const t=e+"CollectionProvider",[n,r]=nt(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{const{scope:y,children:h}=g,b=E.useRef(null),x=E.useRef(new Map).current;return v.jsx(o,{scope:y,itemMap:x,collectionRef:b,children:h})};s.displayName=t;const i=e+"CollectionSlot",c=E.forwardRef((g,y)=>{const{scope:h,children:b}=g,x=a(i,h),w=ue(y,x.collectionRef);return v.jsx(it,{ref:w,children:b})});c.displayName=i;const u=e+"CollectionItemSlot",f="data-radix-collection-item",p=E.forwardRef((g,y)=>{const{scope:h,children:b,...x}=g,w=E.useRef(null),C=ue(y,w),P=a(u,h);return E.useEffect(()=>(P.itemMap.set(w,{ref:w,...x}),()=>void P.itemMap.delete(w))),v.jsx(it,{[f]:"",ref:C,children:b})});p.displayName=u;function l(g){const y=a(e+"CollectionConsumer",g);return E.useCallback(()=>{const b=y.collectionRef.current;if(!b)return[];const x=Array.from(b.querySelectorAll(`[${f}]`));return Array.from(y.itemMap.values()).sort((P,R)=>x.indexOf(P.ref.current)-x.indexOf(R.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:s,Slot:c,ItemSlot:p},l,r]}var Jf=d.createContext(void 0);function Ms(e){const t=d.useContext(Jf);return e||t||"ltr"}var Bn="rovingFocusGroup.onEntryFocus",Zf={bubbles:!1,cancelable:!0},Sn="RovingFocusGroup",[rr,Is,Qf]=Xf(Sn),[ep,Ls]=nt(Sn,[Qf]),[tp,np]=ep(Sn),Fs=d.forwardRef((e,t)=>v.jsx(rr.Provider,{scope:e.__scopeRovingFocusGroup,children:v.jsx(rr.Slot,{scope:e.__scopeRovingFocusGroup,children:v.jsx(rp,{...e,ref:t})})}));Fs.displayName=Sn;var rp=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...p}=e,l=d.useRef(null),g=ue(t,l),y=Ms(a),[h=null,b]=Vt({prop:s,defaultProp:i,onChange:c}),[x,w]=d.useState(!1),C=Ve(u),P=Is(n),R=d.useRef(!1),[D,A]=d.useState(0);return d.useEffect(()=>{const O=l.current;if(O)return O.addEventListener(Bn,C),()=>O.removeEventListener(Bn,C)},[C]),v.jsx(tp,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:h,onItemFocus:d.useCallback(O=>b(O),[b]),onItemShiftTab:d.useCallback(()=>w(!0),[]),onFocusableItemAdd:d.useCallback(()=>A(O=>O+1),[]),onFocusableItemRemove:d.useCallback(()=>A(O=>O-1),[]),children:v.jsx(ae.div,{tabIndex:x||D===0?-1:0,"data-orientation":r,...p,ref:g,style:{outline:"none",...e.style},onMouseDown:oe(e.onMouseDown,()=>{R.current=!0}),onFocus:oe(e.onFocus,O=>{const $=!R.current;if(O.target===O.currentTarget&&$&&!x){const M=new CustomEvent(Bn,Zf);if(O.currentTarget.dispatchEvent(M),!M.defaultPrevented){const z=P().filter(_=>_.focusable),k=z.find(_=>_.active),I=z.find(_=>_.id===h),q=[k,I,...z].filter(Boolean).map(_=>_.ref.current);Ws(q,f)}}R.current=!1}),onBlur:oe(e.onBlur,()=>w(!1))})})}),$s="RovingFocusGroupItem",Bs=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,...s}=e,i=Ft(),c=a||i,u=np($s,n),f=u.currentTabStopId===c,p=Is(n),{onFocusableItemAdd:l,onFocusableItemRemove:g}=u;return d.useEffect(()=>{if(r)return l(),()=>g()},[r,l,g]),v.jsx(rr.ItemSlot,{scope:n,id:c,focusable:r,active:o,children:v.jsx(ae.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:oe(e.onMouseDown,y=>{r?u.onItemFocus(c):y.preventDefault()}),onFocus:oe(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:oe(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){u.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const h=sp(y,u.orientation,u.dir);if(h!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let x=p().filter(w=>w.focusable).map(w=>w.ref.current);if(h==="last")x.reverse();else if(h==="prev"||h==="next"){h==="prev"&&x.reverse();const w=x.indexOf(y.currentTarget);x=u.loop?ip(x,w+1):x.slice(w+1)}setTimeout(()=>Ws(x))}})})})});Bs.displayName=$s;var op={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ap(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function sp(e,t,n){const r=ap(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return op[r]}function Ws(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function ip(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var cp=Fs,lp=Bs;function up(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}var Vs=e=>{const{present:t,children:n}=e,r=dp(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),a=ue(r.ref,fp(o));return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:a}):null};Vs.displayName="Presence";function dp(e){const[t,n]=d.useState(),r=d.useRef({}),o=d.useRef(e),a=d.useRef("none"),s=e?"mounted":"unmounted",[i,c]=up(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=rn(r.current);a.current=i==="mounted"?u:"none"},[i]),We(()=>{const u=r.current,f=o.current;if(f!==e){const l=a.current,g=rn(u);e?c("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&l!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),We(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,p=g=>{const h=rn(r.current).includes(g.animationName);if(g.target===t&&h&&(c("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},l=g=>{g.target===t&&(a.current=rn(r.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:d.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function rn(e){return(e==null?void 0:e.animationName)||"none"}function fp(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Mr="Radio",[pp,zs]=js(Mr),[vp,mp]=pp(Mr),Us=d.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:s,value:i="on",onCheck:c,form:u,...f}=e,[p,l]=d.useState(null),g=ue(t,b=>l(b)),y=d.useRef(!1),h=p?u||!!p.closest("form"):!0;return v.jsxs(vp,{scope:n,checked:o,disabled:s,children:[v.jsx(ae.button,{type:"button",role:"radio","aria-checked":o,"data-state":Ys(o),"data-disabled":s?"":void 0,disabled:s,value:i,...f,ref:g,onClick:oe(e.onClick,b=>{o||c==null||c(),h&&(y.current=b.isPropagationStopped(),y.current||b.stopPropagation())})}),h&&v.jsx(gp,{control:p,bubbles:!y.current,name:r,value:i,checked:o,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});Us.displayName=Mr;var Hs="RadioIndicator",Gs=d.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=mp(Hs,n);return v.jsx(Vs,{present:r||a.checked,children:v.jsx(ae.span,{"data-state":Ys(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});Gs.displayName=Hs;var gp=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=d.useRef(null),s=Ia(n),i=hr(t);return d.useEffect(()=>{const c=a.current,u=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(u,"checked").set;if(s!==n&&p){const l=new Event("click",{bubbles:r});p.call(c,n),c.dispatchEvent(l)}},[s,n,r]),v.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...e.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Ys(e){return e?"checked":"unchecked"}var hp=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Ir="RadioGroup",[yp,Wp]=js(Ir,[Ls,zs]),Ks=Ls(),qs=zs(),[bp,xp]=yp(Ir),Xs=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:s=!1,disabled:i=!1,orientation:c,dir:u,loop:f=!0,onValueChange:p,...l}=e,g=Ks(n),y=Ms(u),[h,b]=Vt({prop:a,defaultProp:o,onChange:p});return v.jsx(bp,{scope:n,name:r,required:s,disabled:i,value:h,onValueChange:b,children:v.jsx(cp,{asChild:!0,...g,orientation:c,dir:y,loop:f,children:v.jsx(ae.div,{role:"radiogroup","aria-required":s,"aria-orientation":c,"data-disabled":i?"":void 0,dir:y,...l,ref:t})})})});Xs.displayName=Ir;var Js="RadioGroupItem",Zs=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=xp(Js,n),s=a.disabled||r,i=Ks(n),c=qs(n),u=d.useRef(null),f=ue(t,u),p=a.value===o.value,l=d.useRef(!1);return d.useEffect(()=>{const g=h=>{hp.includes(h.key)&&(l.current=!0)},y=()=>l.current=!1;return document.addEventListener("keydown",g),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",g),document.removeEventListener("keyup",y)}},[]),v.jsx(lp,{asChild:!0,...i,focusable:!s,active:p,children:v.jsx(Us,{disabled:s,required:a.required,checked:p,...c,...o,name:a.name,ref:f,onCheck:()=>a.onValueChange(o.value),onKeyDown:oe(g=>{g.key==="Enter"&&g.preventDefault()}),onFocus:oe(o.onFocus,()=>{var g;l.current&&((g=u.current)==null||g.click())})})})});Zs.displayName=Js;var wp="RadioGroupIndicator",Qs=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=qs(n);return v.jsx(Gs,{...o,...r,ref:t})});Qs.displayName=wp;var ei=Xs,ti=Zs,Ep=Qs;const ni=d.forwardRef(({className:e,...t},n)=>v.jsx(ei,{className:de("ve-grid ve-gap-2",e),...t,ref:n}));ni.displayName=ei.displayName;const or=d.forwardRef(({className:e,...t},n)=>v.jsx(ti,{ref:n,className:de("ve-aspect-square ve-h-4 ve-w-4 ve-rounded-full ve-border ve-border-[#dcdcdc] ve-ring-offset focus:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-offset-2 disabled:ve-cursor-not-allowed disabled:ve-opacity-50",e),...t,children:v.jsx(Ep,{className:"ve-flex ve-items-center ve-justify-center",children:v.jsx(Si,{className:"ve-h-2.5 ve-w-2.5 ve-fill-current ve-text-current"})})}));or.displayName=ti.displayName;var Cp="Label",ri=d.forwardRef((e,t)=>v.jsx(ae.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));ri.displayName=Cp;var oi=ri;const Sp=mn("ve-text-sm ve-font-medium ve-leading-none peer-disabled:ve-cursor-not-allowed peer-disabled:ve-opacity-70"),ar=d.forwardRef(({className:e,...t},n)=>v.jsx(oi,{ref:n,className:de(Sp(),e),...t}));ar.displayName=oi.displayName;const Rp=["type.string","type.phone"],Pp=e=>{for(const t of Rp)if(e.includes(t))return!0},Ap=e=>({type:"custom",label:e.label,render:({field:t,value:n,onChange:r})=>{const o=Kf(e.filter),a=s=>{r({field:(n==null?void 0:n.field)??"",constantValue:(n==null?void 0:n.constantValue)??"",constantValueEnabled:s})};return v.jsxs(v.Fragment,{children:[Pp(e.filter.types)&&v.jsx(Tp,{constantValueEnabled:n==null?void 0:n.constantValueEnabled,toggleConstantValueEnabled:a}),n!=null&&n.constantValueEnabled?v.jsx(Be.FieldLabel,{label:"Constant Value",className:"entityField-constantValue",children:v.jsx(Be.AutoField,{onChange:s=>r({field:(n==null?void 0:n.field)??"",constantValue:s,constantValueEnabled:!0}),value:n==null?void 0:n.constantValue,field:{type:"text"}})}):v.jsx(Be.FieldLabel,{label:t.label||"Label is undefined",className:"ve-mt-2.5",children:v.jsx(Be.AutoField,{field:{type:"select",options:[{value:"",label:"Select a Content field"},...o.map(s=>({label:s.name,value:s.name}))]},onChange:s=>{r({field:s,constantValue:(n==null?void 0:n.constantValue)??"",constantValueEnabled:!1})},value:n==null?void 0:n.field})})]})}}),Tp=({constantValueEnabled:e,toggleConstantValueEnabled:t})=>v.jsx("div",{className:"ve-mb-2 ve-w-full",children:v.jsxs(ni,{defaultValue:(e==null?void 0:e.toString())??"false",children:[v.jsxs("div",{className:"ve-flex ve-items-center ve-space-x-2",children:[v.jsx(or,{value:"false",id:"ve-use-entity-value",onClick:()=>t(!1)}),v.jsx(ar,{htmlFor:"ve-use-entity-value",children:"Use Entity Value"})]}),v.jsxs("div",{className:"ve-flex ve-items-center ve-space-x-2",children:[v.jsx(or,{value:"true",id:"ve-use-constant-value",onClick:()=>t(!0)}),v.jsx(ar,{htmlFor:"ve-use-constant-value",children:"Use Constant Value"})]})]})}),Np=()=>{const[e,t]=E.useState();return Et("getEntityDocument",we,(n,r)=>{t(r),n({status:"success",payload:{message:"getEntityDocument received"}})}),e},Op=(e,t)=>{const n=e.c_theme;return!n||Object.keys(n).length===0?t??"":`${t??""}<style type="text/css">.components{`+Object.entries(n).map(([r,o])=>`${r}:${o} !important`).join(";")+"}</style>"},sr=JSON.stringify({root:{},content:[],zones:{}});function Dp(e,t){var i,c,u;if(!t)throw new Error("Unable to parse puck data, template name must be defined in config.");const{document:n}=e,r=n.visualConfigurations??[],o=n.pageLayouts??[],a=(i=n._site)==null?void 0:i.defaultLayouts;for(const f of r)if(f.pageSet===t){const p=JSON.parse(Wn(f.data,t));return{...e,document:{...n,visualTemplate:p}}}for(const f of o)if(((c=f.visualConfiguration)==null?void 0:c.pageSet)===t){const p=JSON.parse(Wn(f.visualConfiguration.data,t));return{...e,document:{...n,visualTemplate:p}}}if(a){for(const f of a)if(((u=f.visualConfiguration)==null?void 0:u.pageSet)===t){const p=JSON.parse(Wn(f.visualConfiguration.data,t));return{...e,document:{...n,visualTemplate:p}}}}console.warn(`Unable to find puck data for pageSet: ${t}`);const s=JSON.parse(sr);return{...e,document:{...n,visualTemplate:s}}}function Wn(e,t){if(!e||e.length<1)return console.warn(`Missing visual editor data for template: ${t}`),sr;try{JSON.parse(e)}catch{return console.warn(`Invalid visual editor data for template: ${t}`),sr}return e}const kp=(e,t)=>{if(!(!t||typeof t!="object"||!("field"in t)||!("constantValue"in t))){if(t.constantValueEnabled)return t.constantValue;if(t.field!==""){try{const n=t.field.split(".");let r=!1,o=e;for(let a=0;a<n.length;a++)if((o==null?void 0:o[n[a]])!==void 0)o=o[n[a]];else{r=!0;break}if(!r)return o}catch(n){console.error("Error in resolveYextEntityField:",n)}console.warn(`The field ${t.field} was not found in the document.`)}}},ai=e=>{const t={};for(const n in e){const r=e[n];"default"in r?t[n]=r.default:"styles"in r&&(t[n]=ai(r.styles))}return t},_p=e=>{const t={};for(const n in e){const r=e[n];t[n]=ai(r.styles)}return t},si=(e,t)=>{const n={...t};for(const r in e)if(r in e){const o=e[r],a=n[r];wo(o)&&wo(a)?n[r]=si(o,a):n[r]=o}return n},wo=e=>e!==null&&typeof e=="object",jp=(e,t)=>{const n=_p(t);return si(e,n)};exports.Editor=Bf;exports.EntityField=$d;exports.EntityFieldsProvider=zf;exports.YextEntityFieldSelector=Ap;exports.applyTheme=Op;exports.resolveVisualEditorData=Dp;exports.resolveYextEntityField=kp;exports.themeResolver=jp;exports.useEntityFields=Os;exports.usePlatformBridgeDocument=Np;exports.usePlatformBridgeEntityFields=Wf;
|