@zeturn/watercolor-react 1.1.42 → 1.1.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,52 +1,11 @@
1
- (function(I,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],y):(I=typeof globalThis<"u"?globalThis:I||self,y(I.WatercolorReact={},I.React,I.ReactDOM))})(this,function(I,y,Be){"use strict";function Ls(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qe={exports:{}},Te={};/**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var pt;function Vs(){if(pt)return Te;pt=1;var e=y,t=Symbol.for("react.element"),s=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function l(i,f,u){var o,m={},v=null,w=null;u!==void 0&&(v=""+u),f.key!==void 0&&(v=""+f.key),f.ref!==void 0&&(w=f.ref);for(o in f)r.call(f,o)&&!c.hasOwnProperty(o)&&(m[o]=f[o]);if(i&&i.defaultProps)for(o in f=i.defaultProps,f)m[o]===void 0&&(m[o]=f[o]);return{$$typeof:t,type:i,key:v,ref:w,props:m,_owner:a.current}}return Te.Fragment=s,Te.jsx=l,Te.jsxs=l,Te}var $e={};/**
10
- * @license React
11
- * react-jsx-runtime.development.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var ht;function Ws(){return ht||(ht=1,process.env.NODE_ENV!=="production"&&function(){var e=y,t=Symbol.for("react.element"),s=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),i=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),o=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),h=Symbol.iterator,p="@@iterator";function b(d){if(d===null||typeof d!="object")return null;var T=h&&d[h]||d[p];return typeof T=="function"?T:null}var g=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function k(d){{for(var T=arguments.length,B=new Array(T>1?T-1:0),X=1;X<T;X++)B[X-1]=arguments[X];E("error",d,B)}}function E(d,T,B){{var X=g.ReactDebugCurrentFrame,le=X.getStackAddendum();le!==""&&(T+="%s",B=B.concat([le]));var oe=B.map(function(re){return String(re)});oe.unshift("Warning: "+T),Function.prototype.apply.call(console[d],console,oe)}}var _=!1,x=!1,$=!1,z=!1,R=!1,G;G=Symbol.for("react.module.reference");function F(d){return!!(typeof d=="string"||typeof d=="function"||d===r||d===c||R||d===a||d===u||d===o||z||d===w||_||x||$||typeof d=="object"&&d!==null&&(d.$$typeof===v||d.$$typeof===m||d.$$typeof===l||d.$$typeof===i||d.$$typeof===f||d.$$typeof===G||d.getModuleId!==void 0))}function V(d,T,B){var X=d.displayName;if(X)return X;var le=T.displayName||T.name||"";return le!==""?B+"("+le+")":B}function Q(d){return d.displayName||"Context"}function K(d){if(d==null)return null;if(typeof d.tag=="number"&&k("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case r:return"Fragment";case s:return"Portal";case c:return"Profiler";case a:return"StrictMode";case u:return"Suspense";case o:return"SuspenseList"}if(typeof d=="object")switch(d.$$typeof){case i:var T=d;return Q(T)+".Consumer";case l:var B=d;return Q(B._context)+".Provider";case f:return V(d,d.render,"ForwardRef");case m:var X=d.displayName||null;return X!==null?X:K(d.type)||"Memo";case v:{var le=d,oe=le._payload,re=le._init;try{return K(re(oe))}catch{return null}}}return null}var O=Object.assign,D=0,C,M,ee,te,N,P,U;function W(){}W.__reactDisabledLog=!0;function q(){{if(D===0){C=console.log,M=console.info,ee=console.warn,te=console.error,N=console.group,P=console.groupCollapsed,U=console.groupEnd;var d={configurable:!0,enumerable:!0,value:W,writable:!0};Object.defineProperties(console,{info:d,log:d,warn:d,error:d,group:d,groupCollapsed:d,groupEnd:d})}D++}}function Z(){{if(D--,D===0){var d={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:O({},d,{value:C}),info:O({},d,{value:M}),warn:O({},d,{value:ee}),error:O({},d,{value:te}),group:O({},d,{value:N}),groupCollapsed:O({},d,{value:P}),groupEnd:O({},d,{value:U})})}D<0&&k("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var H=g.ReactCurrentDispatcher,Y;function J(d,T,B){{if(Y===void 0)try{throw Error()}catch(le){var X=le.stack.trim().match(/\n( *(at )?)/);Y=X&&X[1]||""}return`
18
- `+Y+d}}var j=!1,L;{var se=typeof WeakMap=="function"?WeakMap:Map;L=new se}function S(d,T){if(!d||j)return"";{var B=L.get(d);if(B!==void 0)return B}var X;j=!0;var le=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var oe;oe=H.current,H.current=null,q();try{if(T){var re=function(){throw Error()};if(Object.defineProperty(re.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(re,[])}catch(ve){X=ve}Reflect.construct(d,[],re)}else{try{re.call()}catch(ve){X=ve}d.call(re.prototype)}}else{try{throw Error()}catch(ve){X=ve}d()}}catch(ve){if(ve&&X&&typeof ve.stack=="string"){for(var ne=ve.stack.split(`
19
- `),he=X.stack.split(`
20
- `),de=ne.length-1,fe=he.length-1;de>=1&&fe>=0&&ne[de]!==he[fe];)fe--;for(;de>=1&&fe>=0;de--,fe--)if(ne[de]!==he[fe]){if(de!==1||fe!==1)do if(de--,fe--,fe<0||ne[de]!==he[fe]){var be=`
21
- `+ne[de].replace(" at new "," at ");return d.displayName&&be.includes("<anonymous>")&&(be=be.replace("<anonymous>",d.displayName)),typeof d=="function"&&L.set(d,be),be}while(de>=1&&fe>=0);break}}}finally{j=!1,H.current=oe,Z(),Error.prepareStackTrace=le}var Ee=d?d.displayName||d.name:"",Ce=Ee?J(Ee):"";return typeof d=="function"&&L.set(d,Ce),Ce}function pe(d,T,B){return S(d,!1)}function xe(d){var T=d.prototype;return!!(T&&T.isReactComponent)}function ge(d,T,B){if(d==null)return"";if(typeof d=="function")return S(d,xe(d));if(typeof d=="string")return J(d);switch(d){case u:return J("Suspense");case o:return J("SuspenseList")}if(typeof d=="object")switch(d.$$typeof){case f:return pe(d.render);case m:return ge(d.type,T,B);case v:{var X=d,le=X._payload,oe=X._init;try{return ge(oe(le),T,B)}catch{}}}return""}var je=Object.prototype.hasOwnProperty,Me={},We=g.ReactDebugCurrentFrame;function _e(d){if(d){var T=d._owner,B=ge(d.type,d._source,T?T.type:null);We.setExtraStackFrame(B)}else We.setExtraStackFrame(null)}function Ye(d,T,B,X,le){{var oe=Function.call.bind(je);for(var re in d)if(oe(d,re)){var ne=void 0;try{if(typeof d[re]!="function"){var he=Error((X||"React class")+": "+B+" type `"+re+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof d[re]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw he.name="Invariant Violation",he}ne=d[re](T,re,X,B,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(de){ne=de}ne&&!(ne instanceof Error)&&(_e(le),k("%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).",X||"React class",B,re,typeof ne),_e(null)),ne instanceof Error&&!(ne.message in Me)&&(Me[ne.message]=!0,_e(le),k("Failed %s type: %s",B,ne.message),_e(null))}}}var Ae=Array.isArray;function A(d){return Ae(d)}function ie(d){{var T=typeof Symbol=="function"&&Symbol.toStringTag,B=T&&d[Symbol.toStringTag]||d.constructor.name||"Object";return B}}function me(d){try{return Ne(d),!1}catch{return!0}}function Ne(d){return""+d}function De(d){if(me(d))return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ie(d)),Ne(d)}var Ue=g.ReactCurrentOwner,za={key:!0,ref:!0,__self:!0,__source:!0},Is,Ps;function Ga(d){if(je.call(d,"ref")){var T=Object.getOwnPropertyDescriptor(d,"ref").get;if(T&&T.isReactWarning)return!1}return d.ref!==void 0}function Ka(d){if(je.call(d,"key")){var T=Object.getOwnPropertyDescriptor(d,"key").get;if(T&&T.isReactWarning)return!1}return d.key!==void 0}function Xa(d,T){typeof d.ref=="string"&&Ue.current}function Ja(d,T){{var B=function(){Is||(Is=!0,k("%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)",T))};B.isReactWarning=!0,Object.defineProperty(d,"key",{get:B,configurable:!0})}}function Qa(d,T){{var B=function(){Ps||(Ps=!0,k("%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)",T))};B.isReactWarning=!0,Object.defineProperty(d,"ref",{get:B,configurable:!0})}}var Za=function(d,T,B,X,le,oe,re){var ne={$$typeof:t,type:d,key:T,ref:B,props:re,_owner:oe};return ne._store={},Object.defineProperty(ne._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ne,"_self",{configurable:!1,enumerable:!1,writable:!1,value:X}),Object.defineProperty(ne,"_source",{configurable:!1,enumerable:!1,writable:!1,value:le}),Object.freeze&&(Object.freeze(ne.props),Object.freeze(ne)),ne};function ec(d,T,B,X,le){{var oe,re={},ne=null,he=null;B!==void 0&&(De(B),ne=""+B),Ka(T)&&(De(T.key),ne=""+T.key),Ga(T)&&(he=T.ref,Xa(T,le));for(oe in T)je.call(T,oe)&&!za.hasOwnProperty(oe)&&(re[oe]=T[oe]);if(d&&d.defaultProps){var de=d.defaultProps;for(oe in de)re[oe]===void 0&&(re[oe]=de[oe])}if(ne||he){var fe=typeof d=="function"?d.displayName||d.name||"Unknown":d;ne&&Ja(re,fe),he&&Qa(re,fe)}return Za(d,ne,he,le,X,Ue.current,re)}}var ut=g.ReactCurrentOwner,Os=g.ReactDebugCurrentFrame;function Se(d){if(d){var T=d._owner,B=ge(d.type,d._source,T?T.type:null);Os.setExtraStackFrame(B)}else Os.setExtraStackFrame(null)}var dt;dt=!1;function ft(d){return typeof d=="object"&&d!==null&&d.$$typeof===t}function Ms(){{if(ut.current){var d=K(ut.current.type);if(d)return`
22
-
23
- Check the render method of \``+d+"`."}return""}}function tc(d){return""}var As={};function sc(d){{var T=Ms();if(!T){var B=typeof d=="string"?d:d.displayName||d.name;B&&(T=`
24
-
25
- Check the top-level render call using <`+B+">.")}return T}}function Ds(d,T){{if(!d._store||d._store.validated||d.key!=null)return;d._store.validated=!0;var B=sc(T);if(As[B])return;As[B]=!0;var X="";d&&d._owner&&d._owner!==ut.current&&(X=" It was passed a child from "+K(d._owner.type)+"."),Se(d),k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',B,X),Se(null)}}function Bs(d,T){{if(typeof d!="object")return;if(A(d))for(var B=0;B<d.length;B++){var X=d[B];ft(X)&&Ds(X,T)}else if(ft(d))d._store&&(d._store.validated=!0);else if(d){var le=b(d);if(typeof le=="function"&&le!==d.entries)for(var oe=le.call(d),re;!(re=oe.next()).done;)ft(re.value)&&Ds(re.value,T)}}}function nc(d){{var T=d.type;if(T==null||typeof T=="string")return;var B;if(typeof T=="function")B=T.propTypes;else if(typeof T=="object"&&(T.$$typeof===f||T.$$typeof===m))B=T.propTypes;else return;if(B){var X=K(T);Ye(B,d.props,"prop",X,d)}else if(T.PropTypes!==void 0&&!dt){dt=!0;var le=K(T);k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",le||"Unknown")}typeof T.getDefaultProps=="function"&&!T.getDefaultProps.isReactClassApproved&&k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function rc(d){{for(var T=Object.keys(d.props),B=0;B<T.length;B++){var X=T[B];if(X!=="children"&&X!=="key"){Se(d),k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",X),Se(null);break}}d.ref!==null&&(Se(d),k("Invalid attribute `ref` supplied to `React.Fragment`."),Se(null))}}var Fs={};function Rs(d,T,B,X,le,oe){{var re=F(d);if(!re){var ne="";(d===void 0||typeof d=="object"&&d!==null&&Object.keys(d).length===0)&&(ne+=" 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 he=tc();he?ne+=he:ne+=Ms();var de;d===null?de="null":A(d)?de="array":d!==void 0&&d.$$typeof===t?(de="<"+(K(d.type)||"Unknown")+" />",ne=" Did you accidentally export a JSX literal instead of a component?"):de=typeof d,k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",de,ne)}var fe=ec(d,T,B,le,oe);if(fe==null)return fe;if(re){var be=T.children;if(be!==void 0)if(X)if(A(be)){for(var Ee=0;Ee<be.length;Ee++)Bs(be[Ee],d);Object.freeze&&Object.freeze(be)}else k("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 Bs(be,d)}if(je.call(T,"key")){var Ce=K(d),ve=Object.keys(T).filter(function(uc){return uc!=="key"}),mt=ve.length>0?"{key: someKey, "+ve.join(": ..., ")+": ...}":"{key: someKey}";if(!Fs[Ce+mt]){var oc=ve.length>0?"{"+ve.join(": ..., ")+": ...}":"{}";k(`A props object containing a "key" prop is being spread into JSX:
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`react`),require(`react-dom`)):typeof define==`function`&&define.amd?define([`exports`,`react`,`react-dom`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.WatercolorReact={},e.React,e.ReactDOM))})(this,function(e,t,n){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var r=Object.create,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,l=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),u=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var s=o(t),l=0,u=s.length,d;l<u;l++)d=s[l],!c.call(e,d)&&d!==n&&i(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=a(t,d))||r.enumerable});return e},d=(e,t,n)=>(n=e==null?{}:r(s(e)),u(t||!e||!e.__esModule?i(n,`default`,{value:e,enumerable:!0}):n,e));t=d(t),n=d(n);var f=[`default`,`bordered`,`filled`];function p(e=`default`){return f.includes(e)?e:`default`}function m(e){return e?typeof e==`string`?e:Array.isArray(e)?e.filter(Boolean).join(` `):typeof e==`object`?Object.entries(e).filter(([,e])=>e).map(([e])=>e).join(` `):``:``}function h(e=`default`,t=``){let n=p(e),r=m(t);return[`wc-accordion`,n===`default`?``:`wc-accordion--${n}`,r].filter(Boolean).join(` `)}function g(e=[],t,n=!1){return n?e.includes(t)?e.filter(e=>e!==t):[...e,t]:e.includes(t)?[]:[t]}var _=l((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),v=l((e=>{process.env.NODE_ENV!==`production`&&(function(){function t(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===O?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case C:return`Suspense`;case w:return`SuspenseList`;case D:return`Activity`}if(typeof e==`object`)switch(typeof e.tag==`number`&&console.error(`Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.`),e.$$typeof){case g:return`Portal`;case x:return e.displayName||`Context`;case b:return(e._context.displayName||`Context`)+`.Consumer`;case S:var n=e.render;return e=e.displayName,e||=(e=n.displayName||n.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case T:return n=e.displayName||null,n===null?t(e.type)||`Memo`:n;case E:n=e._payload,e=e._init;try{return t(e(n))}catch{}}return null}function n(e){return``+e}function r(e){try{n(e);var t=!1}catch{t=!0}if(t){t=console;var r=t.error,i=typeof Symbol==`function`&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||`Object`;return r.call(t,`The provided key is an unsupported type %s. This value must be coerced to a string before using it here.`,i),n(e)}}function i(e){if(e===_)return`<>`;if(typeof e==`object`&&e&&e.$$typeof===E)return`<...>`;try{var n=t(e);return n?`<`+n+`>`:`<...>`}catch{return`<...>`}}function a(){var e=k.A;return e===null?null:e.getOwner()}function o(){return Error(`react-stack-top-frame`)}function s(e){if(A.call(e,`key`)){var t=Object.getOwnPropertyDescriptor(e,`key`).get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function c(e,t){function n(){N||(N=!0,console.error("%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://react.dev/link/special-props)",t))}n.isReactWarning=!0,Object.defineProperty(e,`key`,{get:n,configurable:!0})}function l(){var e=t(this.type);return P[e]||(P[e]=!0,console.error(`Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.`)),e=this.props.ref,e===void 0?null:e}function u(e,t,n,r,i,a){var o=n.ref;return e={$$typeof:h,type:e,key:t,props:n,_owner:r},(o===void 0?null:o)===null?Object.defineProperty(e,`ref`,{enumerable:!1,value:null}):Object.defineProperty(e,`ref`,{enumerable:!1,get:l}),e._store={},Object.defineProperty(e._store,`validated`,{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,`_debugInfo`,{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,`_debugStack`,{configurable:!1,enumerable:!1,writable:!0,value:i}),Object.defineProperty(e,`_debugTask`,{configurable:!1,enumerable:!1,writable:!0,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function d(e,n,i,o,l,d){var p=n.children;if(p!==void 0)if(o)if(j(p)){for(o=0;o<p.length;o++)f(p[o]);Object.freeze&&Object.freeze(p)}else console.error(`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 f(p);if(A.call(n,`key`)){p=t(e);var m=Object.keys(n).filter(function(e){return e!==`key`});o=0<m.length?`{key: someKey, `+m.join(`: ..., `)+`: ...}`:`{key: someKey}`,L[p+o]||(m=0<m.length?`{`+m.join(`: ..., `)+`: ...}`:`{}`,console.error(`A props object containing a "key" prop is being spread into JSX:
26
2
  let props = %s;
27
3
  <%s {...props} />
28
4
  React keys must be passed directly to JSX without using spread:
29
5
  let props = %s;
30
- <%s key={someKey} {...props} />`,mt,Ce,oc,Ce),Fs[Ce+mt]=!0}}return d===r?rc(fe):nc(fe),fe}}function ac(d,T,B){return Rs(d,T,B,!0)}function cc(d,T,B){return Rs(d,T,B,!1)}var lc=cc,ic=ac;$e.Fragment=r,$e.jsx=lc,$e.jsxs=ic}()),$e}process.env.NODE_ENV==="production"?qe.exports=Vs():qe.exports=Ws();var n=qe.exports;const Ys=["default","bordered","filled"];function Us(e="default"){return Ys.includes(e)?e:"default"}function qs(e){return e?typeof e=="string"?e:Array.isArray(e)?e.filter(Boolean).join(" "):typeof e=="object"?Object.entries(e).filter(([,t])=>t).map(([t])=>t).join(" "):"":""}function Hs(e="default",t=""){const s=Us(e),r=qs(t);return["wc-accordion",s!=="default"?`wc-accordion--${s}`:"",r].filter(Boolean).join(" ")}function zs(e=[],t,s=!1){return s?e.includes(t)?e.filter(r=>r!==t):[...e,t]:e.includes(t)?[]:[t]}const wt=({items:e=[],multiple:t=!1,variant:s="default",onToggle:r,className:a="",style:c={},"aria-label":l,...i})=>{const[f,u]=y.useState([]),o=Hs(s,a),m=w=>{const h=zs(f,w,t);u(h),r==null||r(w,h.includes(w))},v=w=>f.includes(w);return n.jsx("div",{className:o,style:c,role:"region","aria-label":l||"Accordion",...i,children:e.map((w,h)=>n.jsxs("div",{className:"wc-accordion-item",children:[n.jsxs("button",{className:`wc-accordion-header ${v(h)?"wc-accordion-header--active":""}`,onClick:()=>m(h),type:"button",children:[n.jsx("span",{className:"wc-accordion-title",children:w.title}),n.jsx("span",{className:`wc-accordion-icon ${v(h)?"wc-accordion-icon--rotated":""}`,children:n.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:n.jsx("polyline",{points:"6,9 12,15 18,9"})})})]}),n.jsx("div",{className:`wc-accordion-content ${v(h)?"wc-accordion-content--open":""}`,style:{display:v(h)?void 0:"none"},children:n.jsx("div",{className:"wc-accordion-content-inner",children:w.content})})]},h))})};wt.displayName="Accordion";const vt={success:"✓",info:"ⓘ",warning:"⚠",error:"✕"};function Gs(e){return vt[e]||vt.info}function Ks(e,t){return["wc-alert",`wc-alert--${e}`,`wc-alert--${t}`]}function Xs({type:e="info",variant:t="standard",title:s="",closable:r=!1,showIcon:a=!0,className:c="",children:l,onClose:i=()=>{}}){const[f,u]=y.useState(!0);if(!f)return null;const o=()=>{u(!1),i()},m=Ks(e,t),v=Gs(e),w=[...m,c].filter(Boolean).join(" ");return n.jsxs("div",{className:w,role:"alert",children:[a&&n.jsx("div",{className:"wc-alert-icon",children:n.jsx("span",{children:v})}),n.jsxs("div",{className:"wc-alert-content",children:[s&&n.jsx("div",{className:"wc-alert-title",children:s}),n.jsx("div",{className:"wc-alert-message",children:l})]}),r&&n.jsx("button",{type:"button",className:"wc-alert-close","aria-label":"关闭",onClick:o,children:"×"})]})}const Js=({children:e,position:t="fixed",color:s="default",elevation:r=4,variant:a="elevation",className:c="",style:l={},...i})=>{const f=`wc-appbar wc-appbar--${t} wc-appbar--${s} wc-appbar--elevation-${r} wc-appbar--${a} ${c}`;return n.jsx("div",{className:f,style:l,...i,children:e})},yt=({value:e=null,onChange:t,options:s=[],placeholder:r="Type to search...",label:a="",helperText:c="",error:l=!1,errorMessage:i="",required:f=!1,disabled:u=!1,readonly:o=!1,multiple:m=!1,freeSolo:v=!1,clearable:w=!0,fullWidth:h=!1,size:p="md",variant:b="outlined",minSearchLength:g=0,noOptionsText:k="No options found",name:E="",id:_="",className:x="",style:$={},onFocus:z,onBlur:R,onInputChange:G,filterOptions:F,renderOption:V,renderInput:Q,getOptionLabel:K,getOptionValue:O,...D})=>{const[C,M]=y.useState(!1),[ee,te]=y.useState(""),[N,P]=y.useState(-1),U=y.useRef(null),W=y.useRef(null),q=A=>A?typeof A=="object"?A.label||A.value||"":String(A):"",Z=A=>A?typeof A=="object"&&A.value!==void 0?A.value:A:null,H=K||q,Y=O||Z;y.useEffect(()=>{!m&&e?te(H(e)):e||te("")},[e,m]),y.useEffect(()=>{const A=ie=>{U.current&&!U.current.contains(ie.target)&&M(!1)};return document.addEventListener("mousedown",A),()=>{document.removeEventListener("mousedown",A)}},[]);const j=F?F(s,ee):((A,ie)=>!ie||ie.length<g?A:A.filter(me=>H(me).toLowerCase().includes(ie.toLowerCase())))(s,ee),L=A=>{const ie=Y(A);return m&&Array.isArray(e)?e.some(me=>Y(me)===ie):Y(e)===ie},se=()=>{const A=["wc-autocomplete"];return h&&A.push("wc-autocomplete--full-width"),A.concat(x).filter(Boolean).join(" ")},S=()=>{const A=["wc-autocomplete__label"];return A.push(`wc-autocomplete__label--${p}`),l&&A.push("wc-autocomplete__label--error"),A.join(" ")},pe=()=>{const A=["wc-autocomplete__container"];return A.push(`wc-autocomplete__container--${b}`),A.push(`wc-autocomplete__container--${p}`),u&&A.push("wc-autocomplete__container--disabled"),l&&A.push("wc-autocomplete__container--error"),C&&A.push("wc-autocomplete__container--open"),A.join(" ")},xe=(A,ie)=>{const me=["wc-autocomplete__option"];return L(A)&&me.push("wc-autocomplete__option--selected"),ie===N&&me.push("wc-autocomplete__option--highlighted"),A.disabled&&me.push("wc-autocomplete__option--disabled"),me.join(" ")},ge=A=>{M(!0),z==null||z(A)},je=A=>{setTimeout(()=>{M(!1),R==null||R(A)},200)},Me=A=>{const ie=A.target.value;te(ie),M(!0),P(-1),G==null||G(ie),v&&(t==null||t({target:{name:E,value:ie}}))},We=A=>{A.stopPropagation(),te(""),M(!1),P(-1);const ie=m?[]:null;t==null||t({target:{name:E,value:ie}})},_e=A=>{if(A.disabled)return;const ie=Y(A);let me;if(m){const Ne=Array.isArray(e)?[...e]:[],De=Ne.findIndex(Ue=>Y(Ue)===ie);De>-1?Ne.splice(De,1):Ne.push(A),me=Ne,te("")}else me=A,te(H(A)),M(!1);P(-1),t==null||t({target:{name:E,value:me}})},Ye=A=>{var ie;if(!C&&(A.key==="ArrowDown"||A.key==="ArrowUp")){M(!0),A.preventDefault();return}if(!(!C||j.length===0))switch(A.key){case"ArrowDown":A.preventDefault(),P(me=>Math.min(me+1,j.length-1));break;case"ArrowUp":A.preventDefault(),P(me=>Math.max(me-1,0));break;case"Enter":A.preventDefault(),N>=0&&N<j.length&&_e(j[N]);break;case"Escape":M(!1),P(-1),(ie=W.current)==null||ie.blur();break}},Ae=_||E||`autocomplete-${Math.random().toString(36).substr(2,9)}`;return n.jsxs("div",{className:se(),ref:U,style:$,children:[a&&n.jsxs("label",{htmlFor:Ae,className:S(),children:[a,f&&n.jsx("span",{className:"wc-autocomplete__required",children:"*"})]}),n.jsxs("div",{className:pe(),children:[Q?Q({id:Ae,value:ee,onChange:Me,onFocus:ge,onBlur:je,onKeyDown:Ye,placeholder:r,disabled:u,readonly:o,ref:W}):n.jsx("input",{id:Ae,ref:W,type:"text",className:"wc-autocomplete__input",placeholder:r,value:ee,onChange:Me,onFocus:ge,onBlur:je,onKeyDown:Ye,disabled:u,readOnly:o,autoComplete:"off"}),n.jsxs("div",{className:"wc-autocomplete__indicators",children:[w&&ee&&n.jsx("button",{type:"button",className:"wc-autocomplete__clear",onClick:We,tabIndex:-1,children:n.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),n.jsx("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]})}),n.jsx("div",{className:`wc-autocomplete__arrow${C&&j.length>0?" wc-autocomplete__arrow--open":""}`,children:n.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:n.jsx("polyline",{points:"6,9 12,15 18,9"})})})]})]}),C&&ee.length>=g&&n.jsx("div",{className:"wc-autocomplete__dropdown",children:j.length===0?n.jsx("div",{className:"wc-autocomplete__no-options",children:k}):n.jsx("div",{className:"wc-autocomplete__options",children:j.map((A,ie)=>n.jsxs("div",{className:xe(A,ie),onClick:()=>_e(A),onMouseEnter:()=>P(ie),children:[V?V(A,{selected:L(A)}):n.jsx("span",{className:"wc-autocomplete__option-text",children:H(A)}),L(A)&&n.jsx("svg",{className:"wc-autocomplete__option-check",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:n.jsx("polyline",{points:"20,6 9,17 4,12"})})]},Y(A)||ie))})}),(l||c)&&n.jsx("div",{children:l?n.jsx("p",{className:"wc-autocomplete__error",children:i||l}):n.jsx("p",{className:"wc-autocomplete__helper",children:c})})]})};yt.displayName="Autocomplete";function Qs({size:e,variant:t,color:s,src:r,imgError:a}){const c=["wc-avatar"];return typeof e=="string"&&c.push(`wc-avatar--${e}`),c.push(`wc-avatar--${t}`),(!r||a)&&c.push(`wc-avatar--${s}`),c}function Zs(e){const t={};return typeof e=="number"&&(t.width=`${e}px`,t.height=`${e}px`,t.fontSize=`${e*.4}px`),t}function en(e){if(!e)return"";const t=e.trim(),s=t.charAt(0);if(/[\u4e00-\u9fa5]/.test(s))return s;const a=t.split(/\s+/).filter(Boolean);return a.length===1?a[0].charAt(0).toUpperCase():(a[0].charAt(0)+a[1].charAt(0)).toUpperCase()}function tn(e){e(!0)}function sn(e){e(!1)}const bt=({src:e="",alt:t="",size:s="md",variant:r="circular",color:a="default",children:c="",className:l="",...i})=>{const[f,u]=y.useState(!1),o=Qs({size:s,variant:r,color:a,src:e,imgError:f}).concat(l).filter(Boolean).join(" "),m=Zs(s),v=en(c),w=()=>tn(u),h=()=>sn(u);return n.jsx("div",{className:o,style:m,...i,children:e&&!f?n.jsx("img",{src:e,alt:t,role:"img",onError:w,onLoad:h}):c?n.jsx("span",{className:"wc-avatar-text",children:v}):null})};bt.displayName="Avatar";const nn=["primary","secondary","success","warning","error","purple","orange","cyan","pink"];function rn(e){return nn.includes(e)}function an(e){return rn(e)?e:"primary"}function cn({variant:e,size:t,dot:s,className:r}){const c=["wc-badge",`wc-badge--${an(e)}`];return s?c.push(`wc-badge--dot-${t}`):c.push(`wc-badge--${t}`),r&&c.push(r),c.filter(Boolean).join(" ")}const gt=({children:e,variant:t="primary",size:s="md",dot:r=!1,className:a="",...c})=>{const l=cn({variant:t,size:s,dot:r,className:a});return n.jsx("span",{className:l,...c,children:!r&&e})};gt.displayName="Badge";const xt={success:"✓",info:"📢",warning:"⚠",error:"✕"};function ln(e,t,s){const r=["wc-banner",`wc-banner--${e}`,`wc-banner--${t}`];return s&&r.push("wc-banner--sticky"),r.join(" ")}function on(e){return xt[e]||xt.info}function un(e){return{zIndex:e}}function dn(e,t){e(!1),t&&t()}function fn(e){e&&e()}function mn({type:e="info",position:t="top",title:s="",message:r="",closable:a=!0,showIcon:c=!0,showDefaultAction:l=!1,actionText:i="立即行动",sticky:f=!0,zIndex:u=1e3,onClose:o,onAction:m,children:v}){const[w,h]=y.useState(!0);if(!w)return null;const p=ln(e,t,f),b=un(u),g=on(e),k=()=>{dn(h,o)},E=()=>{fn(m)},_=v&&y.Children.count(v)>0;return n.jsx("div",{className:p,style:b,children:n.jsxs("div",{className:"wc-banner-content",children:[c&&n.jsx("div",{className:"wc-banner-icon",children:g}),n.jsxs("div",{className:"wc-banner-text",children:[s&&n.jsx("div",{className:"wc-banner-title",children:s}),n.jsx("div",{className:"wc-banner-message",children:r})]}),(_||l)&&n.jsx("div",{className:"wc-banner-actions",children:_?v:n.jsx("button",{onClick:E,className:"wc-banner-action-btn",children:i})}),a&&n.jsx("button",{onClick:k,className:"wc-banner-close","aria-label":"关闭",children:"×"})]})})}function pn(e="",t="default",s=!0,r=!0,a="medium",c="default"){const l=["wc-blockquote"];return t&&t!=="default"&&t!=="card"&&l.push(`wc-blockquote--${t}`),s&&l.push("wc-blockquote--no-border"),r&&l.push("wc-blockquote--interactive"),a&&a!=="medium"&&l.push(`wc-blockquote--${a}`),c&&c!=="default"&&l.push(`wc-blockquote--${c}`),e&&l.push(e),l.filter(Boolean).join(" ")}function hn(e="",t="filled",s="default",r="medium",a=!0,c=!0){const l=["wc-card"];return t&&t!=="filled"&&l.push(`wc-card--${t}`),s&&s!=="default"&&l.push(`wc-card--${s}`),r&&r!=="medium"&&l.push(`wc-card--${r}`),a&&l.push("wc-card--interactive"),c&&l.push("wc-card--no-border"),e&&l.push(e),l.filter(Boolean).join(" ")}const He=({children:e,title:t="",variant:s="filled",color:r="default",size:a="medium",interactive:c=!0,noBorder:l=!0,className:i="",header:f=null,footer:u=null,style:o={},onClick:m,onMouseEnter:v,onMouseLeave:w,...h})=>{const p=hn(i,s,r,a,c,l),b=g=>{c&&m&&m(g)};return n.jsxs("div",{className:p,style:o,onClick:b,onMouseEnter:v,onMouseLeave:w,role:m?"button":void 0,tabIndex:m?0:void 0,...h,children:[f&&n.jsx("div",{className:"wc-card-header",children:f}),t&&n.jsx("div",{className:"wc-card-header",children:n.jsx("h3",{className:"wc-card__title",children:t})}),n.jsx("div",{className:"wc-card-content",children:e}),u&&n.jsx("div",{className:"wc-card-footer",children:u})]})};He.displayName="Card";function wn({cite:e="",children:t,className:s="",variant:r="default",noBorder:a=!0,interactive:c=!0,size:l="medium",color:i="default",...f}){if(r==="card")return n.jsxs(He,{variant:"filled",color:i,size:l,interactive:c,noBorder:a,className:s,...f,children:[n.jsx("p",{className:"quote-text",children:t}),e&&n.jsxs("footer",{className:"quote-cite",children:["— ",e]})]});const u=pn(s,r,a,c,l,i);return n.jsxs("blockquote",{className:u,...f,children:[n.jsx("p",{className:"quote-text",children:t}),e&&n.jsxs("footer",{className:"quote-cite",children:["— ",e]})]})}const we={0:"0",1:"0.25rem",2:"0.5rem",3:"0.75rem",4:"1rem",5:"1.25rem",6:"1.5rem",8:"2rem",10:"2.5rem",12:"3rem",16:"4rem",20:"5rem",24:"6rem"},jt={flex:"flex",block:"block",inline:"inline","inline-block":"inline-block",none:"hidden",grid:"grid"},_t={row:"flex-row",column:"flex-col","row-reverse":"flex-row-reverse","column-reverse":"flex-col-reverse"},Nt={"flex-start":"justify-start",center:"justify-center","flex-end":"justify-end","space-between":"justify-between","space-around":"justify-around","space-evenly":"justify-evenly"},Ct={"flex-start":"items-start",center:"items-center","flex-end":"items-end",stretch:"items-stretch",baseline:"items-baseline"},kt={wrap:"flex-wrap",nowrap:"flex-nowrap","wrap-reverse":"flex-wrap-reverse"};function ue(e){return typeof e=="number"?`${e}px`:e}function vn(e){const t=[];if(e.display&&jt[e.display]&&t.push(jt[e.display]),e.flexDirection&&_t[e.flexDirection]&&t.push(_t[e.flexDirection]),e.justifyContent&&Nt[e.justifyContent]&&t.push(Nt[e.justifyContent]),e.alignItems&&Ct[e.alignItems]&&t.push(Ct[e.alignItems]),e.flexWrap&&kt[e.flexWrap]&&t.push(kt[e.flexWrap]),e.gap!==void 0){const s=e.gap.toString();["0","1","2","3","4","5","6","8","10","12","16","20","24"].includes(s)&&t.push(`gap-${s}`)}return t}function yn(e){const t={};if(e.p!==void 0&&(t.padding=we[e.p]||ue(e.p)),e.pt!==void 0&&(t.paddingTop=we[e.pt]||ue(e.pt)),e.pr!==void 0&&(t.paddingRight=we[e.pr]||ue(e.pr)),e.pb!==void 0&&(t.paddingBottom=we[e.pb]||ue(e.pb)),e.pl!==void 0&&(t.paddingLeft=we[e.pl]||ue(e.pl)),e.px!==void 0){const s=we[e.px]||ue(e.px);t.paddingLeft=s,t.paddingRight=s}if(e.py!==void 0){const s=we[e.py]||ue(e.py);t.paddingTop=s,t.paddingBottom=s}if(e.m!==void 0&&(t.margin=we[e.m]||ue(e.m)),e.mt!==void 0&&(t.marginTop=we[e.mt]||ue(e.mt)),e.mr!==void 0&&(t.marginRight=we[e.mr]||ue(e.mr)),e.mb!==void 0&&(t.marginBottom=we[e.mb]||ue(e.mb)),e.ml!==void 0&&(t.marginLeft=we[e.ml]||ue(e.ml)),e.mx!==void 0){const s=we[e.mx]||ue(e.mx);t.marginLeft=s,t.marginRight=s}if(e.my!==void 0){const s=we[e.my]||ue(e.my);t.marginTop=s,t.marginBottom=s}return e.display&&(t.display=e.display),e.flexDirection&&(t.flexDirection=e.flexDirection),e.justifyContent&&(t.justifyContent=e.justifyContent),e.alignItems&&(t.alignItems=e.alignItems),e.flexWrap&&(t.flexWrap=e.flexWrap),e.gap!==void 0&&(t.gap=ue(e.gap)),e.bgcolor&&(t.backgroundColor=e.bgcolor),e.color&&(t.color=e.color),e.border&&(t.border=e.border),e.borderRadius!==void 0&&(t.borderRadius=typeof e.borderRadius=="number"?`${e.borderRadius}px`:e.borderRadius),e.width!==void 0&&(t.width=ue(e.width)),e.height!==void 0&&(t.height=ue(e.height)),e.minWidth!==void 0&&(t.minWidth=ue(e.minWidth)),e.minHeight!==void 0&&(t.minHeight=ue(e.minHeight)),e.maxWidth!==void 0&&(t.maxWidth=ue(e.maxWidth)),e.maxHeight!==void 0&&(t.maxHeight=ue(e.maxHeight)),t}function bn({component:e="div",children:t,className:s="",p:r,pt:a,pr:c,pb:l,pl:i,px:f,py:u,m:o,mt:m,mr:v,mb:w,ml:h,mx:p,my:b,display:g,flexDirection:k,justifyContent:E,alignItems:_,flexWrap:x,gap:$,bgcolor:z,color:R,border:G,borderRadius:F,width:V,height:Q,minWidth:K,minHeight:O,maxWidth:D,maxHeight:C,style:M={},...ee}){const te=vn({display:g,flexDirection:k,justifyContent:E,alignItems:_,flexWrap:x,gap:$}).concat(s).filter(Boolean).join(" "),N={...yn({p:r,pt:a,pr:c,pb:l,pl:i,px:f,py:u,m:o,mt:m,mr:v,mb:w,ml:h,mx:p,my:b,display:g,flexDirection:k,justifyContent:E,alignItems:_,flexWrap:x,gap:$,bgcolor:z,color:R,border:G,borderRadius:F,width:V,height:Q,minWidth:K,minHeight:O,maxWidth:D,maxHeight:C}),...M};return n.jsx(e,{className:te,style:N,...ee,children:t})}function gn(e,t,s,r){let a=[...e];if(t&&a.length&&a[0].label!=="首页"&&a.unshift({label:"首页",icon:s,href:"/"}),r>0&&a.length>r){const c=Math.max(1,r-2);a=[...a.slice(0,c),{label:"...",disabled:!0,isEllipsis:!0},...a.slice(-1)]}return a}function xn(e){return`wc-breadcrumb wc-breadcrumb--${e}`}function jn(e,t){const s=["wc-breadcrumb-item"];return e===t-1&&s.push("wc-breadcrumb-item--current"),s.join(" ")}function ze(e){const t=["wc-breadcrumb-link"];return e&&t.push("wc-breadcrumb-link--disabled"),t.join(" ")}function _n(e,t,s,r,a){return t.disabled||t.isEllipsis||s===r-1?(e.preventDefault(),!1):(a&&a(e,t,s),!0)}function Nn(e,t,s,r){return e!==t-1&&!s&&!r}function Cn({items:e=[],separator:t="/",variant:s="default",showHome:r=!1,homeIcon:a="🏠",maxItems:c=0,onItemClick:l}){const i=y.useMemo(()=>gn(e,r,a,c),[e,r,a,c]),f=(o,m,v)=>{_n(o,m,v,i.length,l)},u=xn(s);return n.jsx("nav",{className:u,"aria-label":"面包屑导航",role:"navigation",children:n.jsx("ol",{className:"wc-breadcrumb-list",children:i.map((o,m)=>n.jsxs("li",{className:jn(m,i.length),children:[Nn(m,i.length,o.disabled,o.isEllipsis)?o.href?n.jsxs("a",{href:o.href,className:ze(o.disabled),onClick:v=>f(v,o,m),children:[o.icon&&n.jsx("span",{className:"wc-breadcrumb-icon",dangerouslySetInnerHTML:{__html:o.icon}}),o.label]}):n.jsxs("button",{type:"button",onClick:v=>f(v,o,m),className:ze(o.disabled),children:[o.icon&&n.jsx("span",{className:"wc-breadcrumb-icon",dangerouslySetInnerHTML:{__html:o.icon}}),o.label]}):n.jsxs("span",{className:ze(!0),"aria-current":"page",children:[o.icon&&n.jsx("span",{className:"wc-breadcrumb-icon",dangerouslySetInnerHTML:{__html:o.icon}}),o.label]}),m<i.length-1&&n.jsx("span",{className:"wc-breadcrumb-separator",children:t})]},m))})})}const kn=["primary","secondary","filled","outlined","text","success","warning","error","info","purple","orange","cyan","pink"];function Sn(e){return kn.includes(e)}function En(e){return Sn(e)?e:"primary"}function Tn(e){const{variant:t,size:s,disabled:r,loading:a,fullWidth:c,uppercase:l,rounded:i,buttonStyle:f="filled"}=e,u=["wc-btn"];return u.push(`wc-btn--style-${f}`),u.push(`wc-btn--${En(t)}`),u.push(`wc-btn--${s}`),(r||a)&&u.push("wc-btn--disabled"),a&&u.push("wc-btn--loading"),c&&u.push("wc-btn--full-width"),l&&u.push("wc-btn--uppercase"),i===!1||i==="none"?u.push("wc-btn--rounded-none"):typeof i=="string"?u.push(`wc-btn--rounded-${i}`):u.push("wc-btn--rounded"),u}function $n({event:e,disabled:t,loading:s,href:r,target:a,onClick:c}){!t&&!s&&(r&&window.open(r,a),c==null||c(e))}const Ge=({children:e,variant:t="primary",buttonStyle:s="filled",size:r="md",disabled:a=!1,loading:c=!1,fullWidth:l=!1,type:i="button",href:f=null,target:u="_self",startIcon:o=null,endIcon:m=null,rounded:v=!0,uppercase:w=!1,ripple:h=!0,onClick:p,onMouseOver:b,onMouseOut:g,onFocus:k,onBlur:E,className:_="",style:x={},...$})=>{const[z,R]=y.useState(!1),[G,F]=y.useState(!1),V=Tn({variant:t,buttonStyle:s,size:r,disabled:a,loading:c,fullWidth:l,uppercase:w,rounded:v}).concat(_).filter(Boolean).join(" "),Q={...x},K=te=>{$n({event:te,disabled:a,loading:c,href:f,target:u,onClick:p})},O=te=>{R(!0),b==null||b(te)},D=te=>{R(!1),g==null||g(te)},C=te=>{F(!0),k==null||k(te)},M=te=>{F(!1),E==null||E(te)},ee=()=>n.jsx("span",{className:"wc-btn__loading",children:n.jsxs("svg",{className:"animate-spin h-4 w-4",fill:"none",viewBox:"0 0 24 24",children:[n.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),n.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})});return n.jsxs("button",{className:V,disabled:a||c,type:i,style:Q,onClick:K,onMouseOver:O,onMouseOut:D,onFocus:C,onBlur:M,...$,children:[c&&n.jsx(ee,{}),o&&!c&&n.jsx("span",{className:"wc-btn__start-icon",children:o}),n.jsx("span",{className:`wc-btn__content ${c?"opacity-0":""}`,children:e}),m&&!c&&n.jsx("span",{className:"wc-btn__end-icon",children:m})]})};Ge.displayName="Button";const St=({children:e,disableSpacing:t=!1,disablePadding:s=!1,justifyContent:r="flex-start",className:a="",...c})=>{const i=["wc-card-actions","wc-flex","wc-items-center",!s&&"wc-padding-2",!t&&"wc-gap-2",{"flex-start":"wc-justify-start",center:"wc-justify-center","flex-end":"wc-justify-end","space-between":"wc-justify-between","space-around":"wc-justify-around"}[r],a].filter(Boolean).join(" ");return n.jsx("div",{className:i,...c,children:e})};St.displayName="CardActions";const Et=({children:e,disablePadding:t=!1,padding:s="normal",className:r="",...a})=>{const l=["wc-card-content",!t&&{none:"",dense:"wc-padding-dense",normal:"wc-padding-normal",comfortable:"wc-padding-comfortable"}[s],r].filter(Boolean).join(" ");return n.jsx("div",{className:l,...a,children:e})};Et.displayName="CardContent";const In=["primary","secondary","success","warning","error","info"],Pn=["sm","md","lg"],Tt=({checked:e=!1,onChange:t,indeterminate:s=!1,disabled:r=!1,required:a=!1,size:c="md",color:l="primary",label:i="",labelPlacement:f="end",value:u=!0,name:o,className:m="",...v})=>{const w=y.useId(),[h,p]=y.useState(!1),b=In.includes(l)?l:"primary",g=Pn.includes(c)?c:"md",k=["wc-checkbox",`wc-checkbox--${g}`,(e||s)&&(s?"wc-checkbox--indeterminate":"wc-checkbox--checked"),r&&"wc-checkbox--disabled",h&&"wc-checkbox--focused",f==="start"?"wc-checkbox--label-start":"wc-checkbox--label-end",m].filter(Boolean).join(" "),E=["wc-checkbox__checkmark",`wc-checkbox__checkmark--${b}`,`wc-checkbox__checkmark--${g}`,(e||s)&&"wc-checkbox__checkmark--checked",s&&"wc-checkbox__checkmark--indeterminate"].filter(Boolean).join(" "),_=z=>{if(r)return;const R=z.target.checked;t==null||t({target:{name:o,value:u,checked:R},preventDefault:()=>{},stopPropagation:()=>{}})},x=s?n.jsx("div",{className:"indeterminate-icon"}):e?n.jsx("svg",{className:"checkmark-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",children:n.jsx("polyline",{points:"20,6 9,17 4,12"})}):null,$=i?n.jsx("span",{className:"checkbox-label",children:i}):null;return n.jsxs("label",{className:k,htmlFor:w,children:[f==="start"&&$,n.jsx("input",{id:w,type:"checkbox",className:"wc-checkbox__input",checked:e,disabled:r,required:a,value:u,name:o,"aria-checked":s?"mixed":e,"aria-disabled":r,"aria-required":a,onChange:_,onFocus:()=>p(!0),onBlur:()=>p(!1),ref:z=>{z&&(z.indeterminate=s)},...v}),n.jsx("span",{className:E,children:x}),f==="end"&&$]})};Tt.displayName="Checkbox";function On(e){const{size:t="md",variant:s="filled",color:r="default",clickable:a=!1,disabled:c=!1,className:l=""}=e,i=["wc-chip"];return i.push(`wc-chip--${t}`),i.push(`wc-chip--${s}`),i.push(`wc-chip--${r}`),a&&!c&&i.push("wc-chip--clickable"),c&&i.push("wc-chip--disabled"),l&&i.push(l),i.filter(Boolean).join(" ")}function Mn(e,t,s,r){t&&!s&&r&&r(e)}function An(e,t,s){e.stopPropagation(),!t&&s&&s(e)}function Dn(){return"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"}function Bn(){return n.jsx("svg",{width:"16",height:"16",viewBox:"0 0 20 20",fill:"currentColor",className:"w-4 h-4",children:n.jsx("path",{fillRule:"evenodd",d:Dn(),clipRule:"evenodd"})})}function Fn({label:e="",avatar:t="",deletable:s=!1,disabled:r=!1,clickable:a=!1,variant:c="filled",size:l="md",color:i="default",deleteIcon:f=null,onClick:u,onDelete:o,children:m}){const v=On({size:l,variant:c,color:i,clickable:a,disabled:r}),w=p=>{Mn(p,a,r,u)},h=p=>{An(p,r,o)};return n.jsxs("div",{className:v,onClick:w,children:[m&&m.avatar||t?n.jsx("div",{className:"wc-chip-avatar",children:m&&m.avatar?m.avatar:n.jsx("img",{src:t,alt:"",className:"w-full h-full object-cover rounded-full"})}):null,n.jsx("span",{className:"wc-chip-label",children:(m==null?void 0:m.label)||e}),s&&n.jsx("button",{type:"button",onClick:h,className:"wc-chip-delete","aria-label":"删除",children:f||Bn()})]})}function Rn(e,t){const s=typeof e=="string"?parseInt(e,10):e,r=s/2,a=(s-t)/2,c=2*Math.PI*a;return{sizeNumber:s,center:r,radius:a,circumference:c}}function Ln(e,t,s){return e==="determinate"?s-t/100*s:0}function Vn(e){const{color:t="primary",variant:s="indeterminate",overlay:r=!1,centered:a=!1,inline:c=!1,className:l=""}=e,i=["wc-circular-progress","inline-flex","relative","items-center","justify-center"];return i.push(`wc-circular-progress--${t}`),s==="indeterminate"&&i.push("wc-circular-progress--indeterminate"),r&&i.push("wc-circular-progress--overlay"),a&&i.push("wc-circular-progress--centered"),c&&i.push("wc-circular-progress--inline"),l&&i.push(l),i.filter(Boolean)}function Wn(e){const t=["wc-circular-progress-circle"];return e==="indeterminate"&&t.push("wc-circular-progress-circle--indeterminate"),t.filter(Boolean)}function Yn(e){return Math.round(e)}function Un(e){const{value:t=0,variant:s}=e,r={role:"progressbar","aria-valuemin":0,"aria-valuemax":100};return s==="determinate"&&(r["aria-valuenow"]=t),r}function qn({value:e=0,size:t=40,thickness:s=3.6,variant:r="indeterminate",color:a="primary",showValue:c=!1,overlay:l=!1,centered:i=!1,inline:f=!1,className:u="",...o}){const{sizeNumber:m,center:v,radius:w,circumference:h}=Rn(t,s),p=Ln(r,e,h),b=Vn({color:a,variant:r,overlay:l,centered:i,inline:f,className:u}).join(" "),g=Wn(r).join(" "),k=Un({value:e,variant:r});return n.jsxs("div",{className:b,...k,...o,children:[n.jsxs("svg",{width:m,height:m,viewBox:`0 0 ${m} ${m}`,className:"wc-circular-progress-svg",children:[n.jsx("circle",{cx:v,cy:v,r:w,strokeWidth:s,stroke:"currentColor",fill:"none",className:"wc-circular-progress-bg"}),n.jsx("circle",{cx:v,cy:v,r:w,strokeWidth:s,stroke:"currentColor",fill:"none",strokeDasharray:h,strokeDashoffset:p,className:g})]}),c&&n.jsxs("div",{className:"wc-circular-progress-value",children:[Yn(e),"%"]})]})}function Hn(e){const{size:t="md",shape:s="circle",disabled:r=!1,className:a=""}=e,c=["wc-color-picker"];return c.push(`wc-color-picker--${t}`),c.push(`wc-color-picker--${s}`),r&&c.push("wc-color-picker--disabled"),a&&c.push(a),c.filter(Boolean)}function zn(e,t,s){!t&&s&&s(e.target.value)}function Gn(e){return{backgroundColor:e}}function Kn({value:e="#ffffff",onChange:t,size:s="md",shape:r="circle",disabled:a=!1,className:c=""}){const l=Hn({size:s,shape:r,disabled:a,className:c}).join(" "),i=Gn(e),f=u=>{zn(u,a,t)};return n.jsxs("label",{className:l,children:[n.jsx("input",{type:"color",value:e,onChange:f,disabled:a,className:"wc-color-picker__input"}),n.jsx("span",{className:"wc-color-picker__preview",style:i})]})}const $t={xs:"max-w-xs",sm:"max-w-sm",md:"max-w-md",lg:"max-w-4xl",xl:"max-w-6xl","2xl":"max-w-7xl"};function Xn(e){const{maxWidth:t="lg",fluid:s=!1,fixed:r=!1,className:a=""}=e,l=["mx-auto px-4 sm:px-6 lg:px-8"];return s||r?l.push("w-full"):t&&$t[t]&&l.push($t[t]),a&&l.push(a),l.filter(Boolean)}function Jn({maxWidth:e="lg",fluid:t=!1,fixed:s=!1,className:r="",children:a}){const c=Xn({maxWidth:e,fluid:t,fixed:s,className:r}).join(" ");return n.jsx("div",{className:c,children:a})}function Qn(e){const{variant:t="default",size:s="md",copied:r=!1,copyError:a=!1,className:c=""}=e,l=["wc-copy"];return l.push(`wc-copy--${t}`),l.push(`wc-copy--${s}`),r&&l.push("wc-copy--copied"),a&&l.push("wc-copy--error"),c&&l.push(c),l.filter(Boolean)}function Zn(e,t){return t?"❌":e?"✓":"📋"}function er(e,t,s,r){return t?"错误":e?r:s}function tr(e,t,s,r){return t?r:e?s:""}async function sr(e){var t;try{if((t=navigator.clipboard)!=null&&t.writeText)return await navigator.clipboard.writeText(e),!0;{const s=document.createElement("textarea");s.value=e,s.style.position="fixed",s.style.left="-999999px",s.style.top="-999999px",document.body.appendChild(s),s.focus(),s.select();const r=document.execCommand("copy");return document.body.removeChild(s),r}}catch(s){return console.warn("复制失败:",s),!1}}async function nr(e,t,s,r,a,c,l,i){await sr(e)?(r(!0),a(!1),t(e)):(r(!1),a(!0),s(new Error("复制失败"))),l&&c&&(c(!0),setTimeout(()=>c(!1),1500)),setTimeout(()=>{r(!1),a(!1)},i)}function rr(e,t){let s="wc-copy-tooltip";return e&&(s+=" wc-copy-tooltip--success"),t&&(s+=" wc-copy-tooltip--error"),s}function ar({text:e,variant:t="default",size:s="md",showLabel:r=!0,showTooltip:a=!0,copyLabel:c="复制",copiedLabel:l="已复制",tooltipSuccess:i="复制成功!",tooltipError:f="复制失败",resetDelay:u=2e3,onCopy:o=()=>{},onError:m=()=>{},className:v="",children:w,icon:h}){const[p,b]=y.useState(!1),[g,k]=y.useState(!1),[E,_]=y.useState(!1),x=Qn({variant:t,size:s,copied:p,copyError:g,className:v}).join(" "),$=Zn(p,g),z=er(p,g,c,l),R=tr(p,g,i,f),G=rr(p,g),F=async()=>{await nr(e,o,m,b,k,_,a,u)};return n.jsxs("div",{className:x,onClick:F,children:[w??n.jsx("span",{className:"wc-copy-text",children:e}),n.jsxs("div",{className:"wc-copy-action",children:[h?n.jsx(h,{className:"wc-copy-icon"}):n.jsx("span",{className:"wc-copy-icon",dangerouslySetInnerHTML:{__html:$}}),r&&n.jsx("span",{className:"wc-copy-label",children:z})]}),a&&E&&n.jsx("div",{className:G,children:R})]})}function cr(e,t="YYYY-MM-DD"){if(!e||!(e instanceof Date))return"";const s=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return t.replace("YYYY",s).replace("MM",r).replace("DD",a)}function lr(e){if(!e)return!1;const t=new Date;return e.toDateString()===t.toDateString()}function ir(e,t){return!e||!t?!1:e.toDateString()===t.toDateString()}function or(e){const t=e.getFullYear(),s=e.getMonth(),r=new Date(t,s,1),a=new Date(t,s+1,0),c=r.getDay(),l=a.getDate(),i=[],f=new Date(t,s-1,0);for(let o=c-1;o>=0;o--)i.push({day:f.getDate()-o,month:"prev",date:new Date(t,s-1,f.getDate()-o)});for(let o=1;o<=l;o++)i.push({day:o,month:"current",date:new Date(t,s,o)});const u=42-i.length;for(let o=1;o<=u;o++)i.push({day:o,month:"next",date:new Date(t,s+1,o)});return i}function ur(e="md",t="default",s=!1,r=!1,a=!1){const c=["wc-datepicker-wrapper",`wc-datepicker-wrapper--${e}`,`wc-datepicker-wrapper--${t}`];return s&&c.push("wc-datepicker-wrapper--disabled"),r&&c.push("wc-datepicker-wrapper--focused"),a&&c.push("wc-datepicker-wrapper--open"),c.join(" ")}function dr(e,t){const s=["wc-datepicker-day"];return e.month==="prev"&&s.push("wc-datepicker-day--prev"),e.month==="next"&&s.push("wc-datepicker-day--next"),e.month==="current"&&s.push("wc-datepicker-day--current"),t&&ir(e.date,t)&&s.push("wc-datepicker-day--selected"),lr(e.date)&&s.push("wc-datepicker-day--today"),s.join(" ")}function fr({value:e=null,onChange:t=()=>{},placeholder:s="请选择日期",disabled:r=!1,size:a="md",variant:c="default",format:l="YYYY-MM-DD",showToday:i=!0,minDate:f=null,maxDate:u=null,className:o="",...m}){const v=y.useRef(null),[w,h]=y.useState(!1),[p,b]=y.useState(()=>e?new Date(e):new Date),[g,k]=y.useState(e?new Date(e):null);y.useEffect(()=>{k(e?new Date(e):null)},[e]),y.useEffect(()=>{const O=D=>{v.current&&!v.current.contains(D.target)&&h(!1)};return document.addEventListener("click",O),()=>document.removeEventListener("click",O)},[]);const E=g?cr(g,l):"",_=()=>{r||h(O=>!O)},x=O=>{b(D=>{const C=new Date(D);return C.setMonth(C.getMonth()+O),C})},$=O=>{if(G(O))return;const D=new Date(O.date);k(D),t(D),h(!1)},z=()=>{const O=new Date;k(O),t(O),h(!1)},R=()=>{k(null),t(null),h(!1)},G=O=>{const{date:D}=O;if(f){const C=f instanceof Date?f:new Date(f);if(D<C)return!0}if(u){const C=u instanceof Date?u:new Date(u);if(D>C)return!0}return!1},F=or(p),V=["日","一","二","三","四","五","六"],Q=`${p.getFullYear()}年${p.getMonth()+1}月`,K=[ur(a,c,r,!1,w),o].filter(Boolean).join(" ");return n.jsxs("div",{className:"wc-datepicker",ref:v,...m,children:[n.jsxs("div",{className:K,onClick:_,children:[n.jsx("input",{type:"text",className:"wc-datepicker-input",value:E,placeholder:s,disabled:r,readOnly:!0}),n.jsx("span",{className:"wc-datepicker-icon",children:"📅"})]}),w&&n.jsxs("div",{className:"wc-datepicker-dropdown",style:{zIndex:1e3},children:[n.jsxs("div",{className:"wc-datepicker-header",children:[n.jsx("button",{type:"button",className:"wc-datepicker-nav",onClick:()=>x(-1),children:"‹"}),n.jsx("span",{className:"wc-datepicker-title",children:Q}),n.jsx("button",{type:"button",className:"wc-datepicker-nav",onClick:()=>x(1),children:"›"})]}),n.jsx("div",{className:"wc-datepicker-weekdays",children:V.map(O=>n.jsx("div",{className:"wc-datepicker-weekday",children:O},O))}),n.jsx("div",{className:"wc-datepicker-days",children:F.map(O=>{const D=dr(O,g),C=G(O);return n.jsx("button",{type:"button",className:D,disabled:C,onClick:()=>$(O),children:O.day},`${O.month}-${O.day}`)})}),i&&n.jsxs("div",{className:"wc-datepicker-footer",children:[n.jsx("button",{type:"button",className:"wc-datepicker-today",onClick:z,children:"今天"}),n.jsx("button",{type:"button",className:"wc-datepicker-clear",onClick:R,children:"清除"})]})]})]})}const It=({variant:e="circular",size:t="md",color:s="primary",disabled:r=!1,label:a="",icon:c="",children:l,onClick:i,onFocus:f,onBlur:u,className:o="",style:m={},...v})=>{const[w,h]=y.useState(!1),p=["circular","extended"],b=["sm","md","lg"],g=["primary","secondary","inherit"];p.includes(e)||console.warn(`Invalid variant "${e}" for Fab component. Valid variants are: ${p.join(", ")}`),b.includes(t)||console.warn(`Invalid size "${t}" for Fab component. Valid sizes are: ${b.join(", ")}`),g.includes(s)||console.warn(`Invalid color "${s}" for Fab component. Valid colors are: ${g.join(", ")}`);const k=["wc-fab",`wc-fab--${e}`,`wc-fab--${t}`,`wc-fab--${s}`,r&&"wc-fab--disabled",w&&"wc-fab--focused",o].filter(Boolean).join(" "),E=$=>{!r&&i&&i($)},_=$=>{h(!0),f==null||f($)},x=$=>{h(!1),u==null||u($)};return n.jsxs("button",{className:k,disabled:r,onClick:E,onFocus:_,onBlur:x,style:m,...v,children:[(c||l)&&n.jsx("span",{className:"fab-icon",children:c?n.jsx("span",{dangerouslySetInnerHTML:{__html:c}}):l}),e==="extended"&&a&&n.jsx("span",{className:"fab-label",children:a})]})};It.displayName="Fab";const Pt=({item:e,showAvatar:t=!0,variant:s="timeline",color:r="var(--wc-primary-500)",dotSize:a=12,lineWidth:c=2,onItemClick:l})=>{const i=Array.isArray(e.children)&&e.children.length,f=typeof a=="number"?`${a}px`:a,u=typeof c=="number"?`${c}px`:c,o={"--feed-color":r,"--feed-dot-size":f,"--feed-line-width":u};return n.jsxs("li",{className:`wc-feed-item ${s} ${i?"has-children":""}`,style:o,onClick:()=>l&&l(e),children:[t&&e.avatar&&n.jsx("div",{className:"wc-feed-avatar",children:n.jsx("img",{src:e.avatar,alt:"avatar"})}),n.jsxs("div",{className:"wc-feed-content",children:[n.jsxs("div",{className:"wc-feed-header",children:[n.jsx("strong",{className:"wc-feed-author",children:e.author}),n.jsx("span",{className:"wc-feed-time",children:e.time})]}),n.jsx("p",{className:"wc-feed-text",children:e.text}),i&&n.jsx("ul",{className:"wc-feed-children",children:e.children.map(m=>n.jsx(Pt,{item:m,showAvatar:t,variant:s,color:r,dotSize:a,lineWidth:c,onItemClick:l},m.id||m.time))})]})]})},Ot=({items:e=[],variant:t="timeline",showAvatar:s=!0,color:r="var(--wc-primary-500)",dotSize:a=12,lineWidth:c=2,onItemClick:l,className:i=""})=>{const f=typeof c=="number"?`${c}px`:c,u={"--feed-color":r,"--feed-line-width":f};return n.jsx("ul",{className:`wc-feed-list ${t} ${i}`,style:u,children:e.map(o=>n.jsx(Pt,{item:o,variant:t,showAvatar:s,color:r,dotSize:a,lineWidth:c,onItemClick:l},o.id||o.time))})};Ot.displayName="Feed";const mr=({align:e,size:t,background:s,reverse:r,vertical:a,clickable:c,disabled:l,className:i,isDarkMode:f})=>["wc-feature-card",c&&"wc-feature-card--clickable",l,r&&"wc-feature-card--reverse",a&&"wc-feature-card--vertical",`wc-feature-card--${t}`,`wc-feature-card--${s}`,`wc-feature-card--${e}`,i,f&&"dark"].filter(Boolean);function pr(e,t){return["wc-feature-icon",`wc-feature-icon--${e}`,t].filter(Boolean)}function hr(e,t){return["wc-feature-content",`wc-feature-content--${e}`,t].filter(Boolean)}function wr(e,t){return["wc-feature-title",`wc-feature-title--${e}`,t].filter(Boolean)}const vr=(e,t)=>["wc-feature-description",`wc-feature-description--${e}`,t].filter(Boolean);function yr(e,t,s){s&&s(e)}function br(e,t){e.stopPropagation(),t&&t(e)}function dc(e){return e}const Mt=({title:e="Awesome Feature",description:t="Feature description goes here.",icon:s="",iconSize:r=48,size:a="md",align:c="left",background:l="default",bgColor:i="",reverse:f=!1,vertical:u=!1,ctaLabel:o="",ctaHref:m="#",onClick:v,onCtaClick:w,children:h,className:p="",style:b={},isDarkMode:g=!1})=>{const k=mr({align:c,size:a,background:l,reverse:f,vertical:u,clickable:!!v,disabled:!1,className:p}).join(" "),E=pr(r).join(" "),_=hr(c).join(" "),x=wr(a).join(" "),$=vr(a).join(" "),z={...i?{background:i}:{},...b};return n.jsxs("div",{className:`${k} ${g?"dark":""}`,style:z,onClick:R=>yr(R,!1,v),children:[s&&n.jsx("div",{className:E,children:typeof s=="string"?n.jsx("span",{className:"wc-feature-icon__inner",dangerouslySetInnerHTML:{__html:s}}):s}),n.jsxs("div",{className:_,children:[n.jsx("h3",{className:x,children:e}),n.jsx("p",{className:$,children:h||t}),o&&n.jsx("a",{href:m,className:"wc-feature-cta",onClick:R=>br(R,w),children:o})]})]})};Mt.displayName="Feature";const At=({multiple:e=!1,variant:t="block",accept:s="",label:r="选择文件",onChange:a,onInvalid:c,className:l="",style:i={}})=>{const f=y.useRef(null),u=h=>{if(!s)return!0;const p=s.split(",").map(g=>g.trim()),b=[...h].filter(g=>!p.some(k=>k.startsWith(".")?g.name.endsWith(k):g.type===k));return b.length?(c&&c(b),!1):!0},o=h=>{const p=h.target.files;u(p)&&a&&a(p)},m=h=>{h.preventDefault();const p=h.dataTransfer.files;u(p)&&a&&a(p)},v=()=>{var h;(h=f.current)==null||h.click()},w=()=>{switch(t){case"button":return n.jsx("span",{className:"wc-file-button",children:r});case"icon":return n.jsx("span",{className:"wc-file-icon",children:"⬆️"});default:return n.jsx("strong",{className:"wc-file-input-content__title",children:r})}};return n.jsxs("label",{className:`wc-file-input-wrapper variant-${t} ${l}`,onDragOver:h=>h.preventDefault(),onDrop:m,onClick:t!=="block"?v:void 0,children:[n.jsx("input",{ref:f,type:"file",multiple:e,accept:s,style:{display:"none"},onChange:o}),t==="block"?n.jsx("div",{className:"wc-file-input-content",children:w()}):w()]})};At.displayName="FileInput";const Dt=y.createContext(null),Bt=({disabled:e=!1,error:t=!1,required:s=!1,variant:r="outlined",size:a="md",fullWidth:c=!1,margin:l="normal",className:i="",style:f={},children:u,...o})=>{const m=y.useMemo(()=>({disabled:e,error:t,required:s,variant:r,size:a}),[e,t,s,r,a]),v=["form-control",c&&"form-control--full-width",l==="dense"&&"form-control--margin-dense",l==="normal"&&"form-control--margin-normal",e&&"form-control--disabled",t&&"form-control--error",i].filter(Boolean).join(" ");return n.jsx(Dt.Provider,{value:m,children:n.jsx("div",{className:v,style:f,...o,children:u})})};Bt.displayName="FormControl";const Ft=({label:e,labelPlacement:t="end",disabled:s=!1,required:r=!1,checked:a,value:c,className:l="",style:i={},onChange:f,children:u,...o})=>{const m=h=>{s||f==null||f(h)},v=["form-control-label",t==="start"&&"form-control-label--placement-start",t==="end"&&"form-control-label--placement-end",t==="top"&&"form-control-label--placement-top",t==="bottom"&&"form-control-label--placement-bottom",s&&"form-control-label--disabled",l].filter(Boolean).join(" "),w=["form-control-label__text",s&&"form-control-label__text--disabled"].filter(Boolean).join(" ");return n.jsxs("label",{className:v,onClick:m,style:i,...o,children:[t==="start"&&n.jsxs("span",{className:w,children:[e,r&&n.jsx("span",{className:"form-control-label__required",children:"*"})]}),n.jsx("span",{className:"form-control-label__control",children:u}),t!=="start"&&n.jsxs("span",{className:w,children:[e,r&&n.jsx("span",{className:"form-control-label__required",children:"*"})]})]})};Ft.displayName="FormControlLabel";const Rt=({row:e=!1,spacing:t="normal",className:s="",style:r={},children:a,...c})=>{const l=["form-group",e&&"form-group--row",t==="compact"&&"form-group--spacing-compact",t==="comfortable"&&"form-group--spacing-comfortable",s].filter(Boolean).join(" ");return n.jsx("div",{className:l,style:r,...c,children:a})};Rt.displayName="FormGroup";const Lt=({disabled:e=!1,error:t=!1,filled:s=!1,focused:r=!1,margin:a="normal",required:c=!1,variant:l="outlined",id:i,size:f="md",className:u="",style:o={},children:m,...v})=>{const w=y.useContext(Dt)||{},h=t||w.error,p=e||w.disabled,b=["form-helper-text",f==="sm"&&"form-helper-text--size-sm",f==="lg"&&"form-helper-text--size-lg",a==="dense"&&"form-helper-text--margin-dense",a==="normal"&&"form-helper-text--margin-normal",h&&"form-helper-text--error",p&&"form-helper-text--disabled",r&&"form-helper-text--focused",u].filter(Boolean).join(" ");return n.jsx("p",{id:i,className:b,style:o,...v,children:m})};Lt.displayName="FormHelperText";const Vt=({container:e=!1,item:t=!1,xs:s,sm:r,md:a,lg:c,xl:l,spacing:i=0,direction:f="row",justifyContent:u="flex-start",alignItems:o="stretch",className:m="",style:v={},children:w,...h})=>{const p=[];if(e){p.push("flex","flex-wrap");const b={row:"flex-row",column:"flex-col","row-reverse":"flex-row-reverse","column-reverse":"flex-col-reverse"};p.push(b[f]);const g={"flex-start":"justify-start",center:"justify-center","flex-end":"justify-end","space-between":"justify-between","space-around":"justify-around","space-evenly":"justify-evenly"};p.push(g[u]);const k={"flex-start":"items-start",center:"items-center","flex-end":"items-end",stretch:"items-stretch",baseline:"items-baseline"};if(p.push(k[o]),i>0){const E=i.toString();["1","2","3","4","5","6","8","10","12"].includes(E)?p.push(`gap-${E}`):p.push(`gap-${Math.floor(i/4)}`)}}return t&&(p.push("flex-shrink-0"),Object.entries({xs:"",sm:"sm:",md:"md:",lg:"lg:",xl:"xl:"}).forEach(([g,k])=>{const E={xs:s,sm:r,md:a,lg:c,xl:l}[g];if(E!==void 0)if(E==="auto")p.push(`${k}flex-auto`);else if(E===!0)p.push(`${k}flex-1`);else{const _=Math.round(E/12*100);p.push(`${k}w-${_===100?"full":_===50?"1/2":_===25?"1/4":_===75?"3/4":`[${_}%]`}`)}})),n.jsx("div",{className:[...p,m].filter(Boolean).join(" "),style:v,...h,children:w})};Vt.displayName="Grid";const Wt=({triggerText:e="Hover me",cardData:t={},variant:s="default",size:r="md",cardSize:a="md",position:c="top",delay:l=300,hideDelay:i=100,showArrow:f=!0,disabled:u=!1,onShow:o,onHide:m,onAction:v,className:w="",style:h={},children:p,card:b,...g})=>{var O,D;const[k,E]=y.useState(!1),_=y.useRef(null),x=y.useRef(null),$=y.useRef(null),z=y.useRef(`hover-card-${Math.random().toString(36).substr(2,9)}`),R=()=>{clearTimeout(_.current),clearTimeout(x.current)},G=()=>{u||(R(),_.current=setTimeout(()=>{E(!0),o==null||o()},l))},F=()=>{u||(R(),x.current=setTimeout(()=>{E(!1),m==null||m()},i))};y.useEffect(()=>()=>R(),[]);const V=C=>{var M;v==null||v(C),(M=C==null?void 0:C.onClick)==null||M.call(C)},Q=["hover-card-container",`hover-card-${s}`,`hover-card-size-${r}`,u&&"hover-card-disabled",w].filter(Boolean).join(" "),K=["hover-card-popup",`hover-card-position-${c}`,`hover-card-card-size-${a}`].join(" ");return n.jsxs("div",{className:Q,onMouseEnter:G,onMouseLeave:F,onTouchStart:G,onTouchEnd:F,style:h,...g,children:[n.jsx("span",{className:"hover-card-trigger",children:p||e}),k&&n.jsxs("div",{ref:$,className:K,style:{zIndex:1e3},role:"tooltip","aria-describedby":z.current,children:[f&&n.jsx("div",{className:`hover-card-arrow hover-card-arrow-${c}`}),n.jsx("div",{className:"hover-card-content",children:b?typeof b=="function"?b(t):b:n.jsxs(n.Fragment,{children:[t.image&&n.jsx("div",{className:"hover-card-image",children:n.jsx("img",{src:t.image,alt:t.imageAlt||t.title})}),n.jsxs("div",{className:"hover-card-body",children:[t.title&&n.jsx("h3",{className:"hover-card-title",children:t.title}),t.description&&n.jsx("p",{className:"hover-card-description",children:t.description}),((O=t.meta)==null?void 0:O.length)&&n.jsx("div",{className:"hover-card-meta",children:t.meta.map((C,M)=>n.jsx("span",{className:"hover-card-meta-item",children:C},M))}),((D=t.actions)==null?void 0:D.length)&&n.jsx("div",{className:"hover-card-actions",children:t.actions.map((C,M)=>n.jsx("button",{className:"hover-card-action-btn",onClick:()=>V(C),children:C.label},M))})]})]})})]})]})};Wt.displayName="HoverCard";var Ke={exports:{}},Fe={exports:{}},ae={};/** @license React v16.13.1
31
- * react-is.production.min.js
32
- *
33
- * Copyright (c) Facebook, Inc. and its affiliates.
34
- *
35
- * This source code is licensed under the MIT license found in the
36
- * LICENSE file in the root directory of this source tree.
37
- */var Yt;function gr(){if(Yt)return ae;Yt=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,s=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,c=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,o=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,v=e?Symbol.for("react.suspense_list"):60120,w=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function E(x){if(typeof x=="object"&&x!==null){var $=x.$$typeof;switch($){case t:switch(x=x.type,x){case f:case u:case r:case c:case a:case m:return x;default:switch(x=x&&x.$$typeof,x){case i:case o:case h:case w:case l:return x;default:return $}}case s:return $}}}function _(x){return E(x)===u}return ae.AsyncMode=f,ae.ConcurrentMode=u,ae.ContextConsumer=i,ae.ContextProvider=l,ae.Element=t,ae.ForwardRef=o,ae.Fragment=r,ae.Lazy=h,ae.Memo=w,ae.Portal=s,ae.Profiler=c,ae.StrictMode=a,ae.Suspense=m,ae.isAsyncMode=function(x){return _(x)||E(x)===f},ae.isConcurrentMode=_,ae.isContextConsumer=function(x){return E(x)===i},ae.isContextProvider=function(x){return E(x)===l},ae.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===t},ae.isForwardRef=function(x){return E(x)===o},ae.isFragment=function(x){return E(x)===r},ae.isLazy=function(x){return E(x)===h},ae.isMemo=function(x){return E(x)===w},ae.isPortal=function(x){return E(x)===s},ae.isProfiler=function(x){return E(x)===c},ae.isStrictMode=function(x){return E(x)===a},ae.isSuspense=function(x){return E(x)===m},ae.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===r||x===u||x===c||x===a||x===m||x===v||typeof x=="object"&&x!==null&&(x.$$typeof===h||x.$$typeof===w||x.$$typeof===l||x.$$typeof===i||x.$$typeof===o||x.$$typeof===b||x.$$typeof===g||x.$$typeof===k||x.$$typeof===p)},ae.typeOf=E,ae}var ce={};/** @license React v16.13.1
38
- * react-is.development.js
39
- *
40
- * Copyright (c) Facebook, Inc. and its affiliates.
41
- *
42
- * This source code is licensed under the MIT license found in the
43
- * LICENSE file in the root directory of this source tree.
44
- */var Ut;function xr(){return Ut||(Ut=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,s=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,c=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,o=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,v=e?Symbol.for("react.suspense_list"):60120,w=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function E(S){return typeof S=="string"||typeof S=="function"||S===r||S===u||S===c||S===a||S===m||S===v||typeof S=="object"&&S!==null&&(S.$$typeof===h||S.$$typeof===w||S.$$typeof===l||S.$$typeof===i||S.$$typeof===o||S.$$typeof===b||S.$$typeof===g||S.$$typeof===k||S.$$typeof===p)}function _(S){if(typeof S=="object"&&S!==null){var pe=S.$$typeof;switch(pe){case t:var xe=S.type;switch(xe){case f:case u:case r:case c:case a:case m:return xe;default:var ge=xe&&xe.$$typeof;switch(ge){case i:case o:case h:case w:case l:return ge;default:return pe}}case s:return pe}}}var x=f,$=u,z=i,R=l,G=t,F=o,V=r,Q=h,K=w,O=s,D=c,C=a,M=m,ee=!1;function te(S){return ee||(ee=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),N(S)||_(S)===f}function N(S){return _(S)===u}function P(S){return _(S)===i}function U(S){return _(S)===l}function W(S){return typeof S=="object"&&S!==null&&S.$$typeof===t}function q(S){return _(S)===o}function Z(S){return _(S)===r}function H(S){return _(S)===h}function Y(S){return _(S)===w}function J(S){return _(S)===s}function j(S){return _(S)===c}function L(S){return _(S)===a}function se(S){return _(S)===m}ce.AsyncMode=x,ce.ConcurrentMode=$,ce.ContextConsumer=z,ce.ContextProvider=R,ce.Element=G,ce.ForwardRef=F,ce.Fragment=V,ce.Lazy=Q,ce.Memo=K,ce.Portal=O,ce.Profiler=D,ce.StrictMode=C,ce.Suspense=M,ce.isAsyncMode=te,ce.isConcurrentMode=N,ce.isContextConsumer=P,ce.isContextProvider=U,ce.isElement=W,ce.isForwardRef=q,ce.isFragment=Z,ce.isLazy=H,ce.isMemo=Y,ce.isPortal=J,ce.isProfiler=j,ce.isStrictMode=L,ce.isSuspense=se,ce.isValidElementType=E,ce.typeOf=_}()),ce}var qt;function Ht(){return qt||(qt=1,process.env.NODE_ENV==="production"?Fe.exports=gr():Fe.exports=xr()),Fe.exports}/*
45
- object-assign
46
- (c) Sindre Sorhus
47
- @license MIT
48
- */var Xe,zt;function jr(){if(zt)return Xe;zt=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;function r(c){if(c==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(c)}function a(){try{if(!Object.assign)return!1;var c=new String("abc");if(c[5]="de",Object.getOwnPropertyNames(c)[0]==="5")return!1;for(var l={},i=0;i<10;i++)l["_"+String.fromCharCode(i)]=i;var f=Object.getOwnPropertyNames(l).map(function(o){return l[o]});if(f.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(o){u[o]=o}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Xe=a()?Object.assign:function(c,l){for(var i,f=r(c),u,o=1;o<arguments.length;o++){i=Object(arguments[o]);for(var m in i)t.call(i,m)&&(f[m]=i[m]);if(e){u=e(i);for(var v=0;v<u.length;v++)s.call(i,u[v])&&(f[u[v]]=i[u[v]])}}return f},Xe}var Je,Gt;function Qe(){if(Gt)return Je;Gt=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Je=e,Je}var Ze,Kt;function Xt(){return Kt||(Kt=1,Ze=Function.call.bind(Object.prototype.hasOwnProperty)),Ze}var et,Jt;function _r(){if(Jt)return et;Jt=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Qe(),s={},r=Xt();e=function(c){var l="Warning: "+c;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}}}function a(c,l,i,f,u){if(process.env.NODE_ENV!=="production"){for(var o in c)if(r(c,o)){var m;try{if(typeof c[o]!="function"){var v=Error((f||"React class")+": "+i+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof c[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw v.name="Invariant Violation",v}m=c[o](l,o,f,i,null,t)}catch(h){m=h}if(m&&!(m instanceof Error)&&e((f||"React class")+": type specification of "+i+" `"+o+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof m+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),m instanceof Error&&!(m.message in s)){s[m.message]=!0;var w=u?u():"";e("Failed "+i+" type: "+m.message+(w??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(s={})},et=a,et}var tt,Qt;function Nr(){if(Qt)return tt;Qt=1;var e=Ht(),t=jr(),s=Qe(),r=Xt(),a=_r(),c=function(){};process.env.NODE_ENV!=="production"&&(c=function(i){var f="Warning: "+i;typeof console<"u"&&console.error(f);try{throw new Error(f)}catch{}});function l(){return null}return tt=function(i,f){var u=typeof Symbol=="function"&&Symbol.iterator,o="@@iterator";function m(N){var P=N&&(u&&N[u]||N[o]);if(typeof P=="function")return P}var v="<<anonymous>>",w={array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:k(),arrayOf:E,element:_(),elementType:x(),instanceOf:$,node:F(),objectOf:R,oneOf:z,oneOfType:G,shape:Q,exact:K};function h(N,P){return N===P?N!==0||1/N===1/P:N!==N&&P!==P}function p(N,P){this.message=N,this.data=P&&typeof P=="object"?P:{},this.stack=""}p.prototype=Error.prototype;function b(N){if(process.env.NODE_ENV!=="production")var P={},U=0;function W(Z,H,Y,J,j,L,se){if(J=J||v,L=L||Y,se!==s){if(f){var S=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw S.name="Invariant Violation",S}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var pe=J+":"+Y;!P[pe]&&U<3&&(c("You are manually calling a React.PropTypes validation function for the `"+L+"` prop on `"+J+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),P[pe]=!0,U++)}}return H[Y]==null?Z?H[Y]===null?new p("The "+j+" `"+L+"` is marked as required "+("in `"+J+"`, but its value is `null`.")):new p("The "+j+" `"+L+"` is marked as required in "+("`"+J+"`, but its value is `undefined`.")):null:N(H,Y,J,j,L)}var q=W.bind(null,!1);return q.isRequired=W.bind(null,!0),q}function g(N){function P(U,W,q,Z,H,Y){var J=U[W],j=C(J);if(j!==N){var L=M(J);return new p("Invalid "+Z+" `"+H+"` of type "+("`"+L+"` supplied to `"+q+"`, expected ")+("`"+N+"`."),{expectedType:N})}return null}return b(P)}function k(){return b(l)}function E(N){function P(U,W,q,Z,H){if(typeof N!="function")return new p("Property `"+H+"` of component `"+q+"` has invalid PropType notation inside arrayOf.");var Y=U[W];if(!Array.isArray(Y)){var J=C(Y);return new p("Invalid "+Z+" `"+H+"` of type "+("`"+J+"` supplied to `"+q+"`, expected an array."))}for(var j=0;j<Y.length;j++){var L=N(Y,j,q,Z,H+"["+j+"]",s);if(L instanceof Error)return L}return null}return b(P)}function _(){function N(P,U,W,q,Z){var H=P[U];if(!i(H)){var Y=C(H);return new p("Invalid "+q+" `"+Z+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected a single ReactElement."))}return null}return b(N)}function x(){function N(P,U,W,q,Z){var H=P[U];if(!e.isValidElementType(H)){var Y=C(H);return new p("Invalid "+q+" `"+Z+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected a single ReactElement type."))}return null}return b(N)}function $(N){function P(U,W,q,Z,H){if(!(U[W]instanceof N)){var Y=N.name||v,J=te(U[W]);return new p("Invalid "+Z+" `"+H+"` of type "+("`"+J+"` supplied to `"+q+"`, expected ")+("instance of `"+Y+"`."))}return null}return b(P)}function z(N){if(!Array.isArray(N))return process.env.NODE_ENV!=="production"&&(arguments.length>1?c("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):c("Invalid argument supplied to oneOf, expected an array.")),l;function P(U,W,q,Z,H){for(var Y=U[W],J=0;J<N.length;J++)if(h(Y,N[J]))return null;var j=JSON.stringify(N,function(se,S){var pe=M(S);return pe==="symbol"?String(S):S});return new p("Invalid "+Z+" `"+H+"` of value `"+String(Y)+"` "+("supplied to `"+q+"`, expected one of "+j+"."))}return b(P)}function R(N){function P(U,W,q,Z,H){if(typeof N!="function")return new p("Property `"+H+"` of component `"+q+"` has invalid PropType notation inside objectOf.");var Y=U[W],J=C(Y);if(J!=="object")return new p("Invalid "+Z+" `"+H+"` of type "+("`"+J+"` supplied to `"+q+"`, expected an object."));for(var j in Y)if(r(Y,j)){var L=N(Y,j,q,Z,H+"."+j,s);if(L instanceof Error)return L}return null}return b(P)}function G(N){if(!Array.isArray(N))return process.env.NODE_ENV!=="production"&&c("Invalid argument supplied to oneOfType, expected an instance of array."),l;for(var P=0;P<N.length;P++){var U=N[P];if(typeof U!="function")return c("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ee(U)+" at index "+P+"."),l}function W(q,Z,H,Y,J){for(var j=[],L=0;L<N.length;L++){var se=N[L],S=se(q,Z,H,Y,J,s);if(S==null)return null;S.data&&r(S.data,"expectedType")&&j.push(S.data.expectedType)}var pe=j.length>0?", expected one of type ["+j.join(", ")+"]":"";return new p("Invalid "+Y+" `"+J+"` supplied to "+("`"+H+"`"+pe+"."))}return b(W)}function F(){function N(P,U,W,q,Z){return O(P[U])?null:new p("Invalid "+q+" `"+Z+"` supplied to "+("`"+W+"`, expected a ReactNode."))}return b(N)}function V(N,P,U,W,q){return new p((N||"React class")+": "+P+" type `"+U+"."+W+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+q+"`.")}function Q(N){function P(U,W,q,Z,H){var Y=U[W],J=C(Y);if(J!=="object")return new p("Invalid "+Z+" `"+H+"` of type `"+J+"` "+("supplied to `"+q+"`, expected `object`."));for(var j in N){var L=N[j];if(typeof L!="function")return V(q,Z,H,j,M(L));var se=L(Y,j,q,Z,H+"."+j,s);if(se)return se}return null}return b(P)}function K(N){function P(U,W,q,Z,H){var Y=U[W],J=C(Y);if(J!=="object")return new p("Invalid "+Z+" `"+H+"` of type `"+J+"` "+("supplied to `"+q+"`, expected `object`."));var j=t({},U[W],N);for(var L in j){var se=N[L];if(r(N,L)&&typeof se!="function")return V(q,Z,H,L,M(se));if(!se)return new p("Invalid "+Z+" `"+H+"` key `"+L+"` supplied to `"+q+"`.\nBad object: "+JSON.stringify(U[W],null," ")+`
49
- Valid keys: `+JSON.stringify(Object.keys(N),null," "));var S=se(Y,L,q,Z,H+"."+L,s);if(S)return S}return null}return b(P)}function O(N){switch(typeof N){case"number":case"string":case"undefined":return!0;case"boolean":return!N;case"object":if(Array.isArray(N))return N.every(O);if(N===null||i(N))return!0;var P=m(N);if(P){var U=P.call(N),W;if(P!==N.entries){for(;!(W=U.next()).done;)if(!O(W.value))return!1}else for(;!(W=U.next()).done;){var q=W.value;if(q&&!O(q[1]))return!1}}else return!1;return!0;default:return!1}}function D(N,P){return N==="symbol"?!0:P?P["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&P instanceof Symbol:!1}function C(N){var P=typeof N;return Array.isArray(N)?"array":N instanceof RegExp?"object":D(P,N)?"symbol":P}function M(N){if(typeof N>"u"||N===null)return""+N;var P=C(N);if(P==="object"){if(N instanceof Date)return"date";if(N instanceof RegExp)return"regexp"}return P}function ee(N){var P=M(N);switch(P){case"array":case"object":return"an "+P;case"boolean":case"date":case"regexp":return"a "+P;default:return P}}function te(N){return!N.constructor||!N.constructor.name?v:N.constructor.name}return w.checkPropTypes=a,w.resetWarningCache=a.resetWarningCache,w.PropTypes=w,w},tt}var st,Zt;function Cr(){if(Zt)return st;Zt=1;var e=Qe();function t(){}function s(){}return s.resetWarningCache=t,st=function(){function r(l,i,f,u,o,m){if(m!==e){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}}r.isRequired=r;function a(){return r}var c={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:s,resetWarningCache:t};return c.PropTypes=c,c},st}if(process.env.NODE_ENV!=="production"){var kr=Ht(),Sr=!0;Ke.exports=Nr()(kr.isElement,Sr)}else Ke.exports=Cr()();var Er=Ke.exports;const ye=Ls(Er),Ie=({className:e,style:t})=>n.jsx("span",{className:e,style:t}),Re=(e,t)=>y.lazy(()=>e().then(s=>({default:t(s)})).catch(s=>(console.warn("[Icon] 动态导入失败,已回退到占位符图标。",s),{default:Ie}))),Tr=(e,t,s)=>{switch(e){case"lucide":return Re(()=>import("@zeturn/watercolor-icons-lucide-react"),r=>{var a;return((a=r.getIcon)==null?void 0:a.call(r,t))||Ie});case"heroicons":return Re(()=>import("@zeturn/watercolor-icons-heroicons-react"),r=>{var a;return((a=r.getIcon)==null?void 0:a.call(r,t,s))||Ie});case"tabler":return Re(()=>import("@zeturn/watercolor-icons-tabler-react"),r=>{var a;return((a=r.getIcon)==null?void 0:a.call(r,t))||Ie});case"phosphor":return Re(()=>import("@zeturn/watercolor-icons-phosphor-react"),r=>{var a;return((a=r.getIcon)==null?void 0:a.call(r,t))||Ie});default:return null}},nt=e=>typeof e=="number"?e:{xs:16,sm:20,md:24,lg:32,xl:48}[e]||parseInt(e)||24,es=({library:e="lucide",name:t="",html:s="",size:r=24,color:a="currentColor",strokeWidth:c=2,variant:l="outline",className:i="",children:f,...u})=>{const o=y.useMemo(()=>{if(!t)return null;try{return Tr(e,t,l)}catch{return console.warn(`Icon "${t}" not found in library "${e}"`),null}},[e,t,l]),m=y.useMemo(()=>e==="feather"&&t?y.lazy(async()=>{try{const b=nt(r),{getFeatherSvg:g}=await import("@zeturn/watercolor-icons-feather"),k=await g(t,{width:b,height:b,strokeWidth:Number(c)});return{default:({className:E,style:_})=>n.jsx("span",{className:E,style:_,dangerouslySetInnerHTML:{__html:k}})}}catch{return console.warn(`Feather icon "${t}" not found`),{default:()=>n.jsx("span",{})}}}):null,[e,t,r,c]),v=y.useMemo(()=>e==="html"&&s?s:"",[e,s]),w=y.useMemo(()=>{const b={};if(a&&a!=="currentColor"&&(b.color=a),r){const g=nt(r);b.width=`${g}px`,b.height=`${g}px`}return b},[a,r]),h=y.useMemo(()=>{const g={size:nt(r),color:a,...u};return e==="lucide"&&(g.strokeWidth=c),e==="tabler"&&(g.stroke=c),g},[e,r,a,c,u]),p=`wc-icon ${i}`.trim();return m?n.jsx(y.Suspense,{fallback:n.jsx("span",{className:p,style:w}),children:n.jsx(m,{className:p,style:w})}):o?n.jsx(y.Suspense,{fallback:n.jsx("span",{className:p,style:w}),children:n.jsx(o,{className:p,style:w,...h})}):v?n.jsx("span",{className:p,style:w,dangerouslySetInnerHTML:{__html:v}}):n.jsx("span",{className:p,style:w,children:f})};es.propTypes={library:ye.oneOf(["lucide","heroicons","tabler","phosphor","feather","html"]),name:ye.string,html:ye.string,size:ye.oneOfType([ye.string,ye.number]),color:ye.string,strokeWidth:ye.oneOfType([ye.string,ye.number]),variant:ye.oneOf(["outline","solid","mini"]),className:ye.string,children:ye.node};const ts=({color:e="default",size:t="md",edge:s=!1,disabled:r=!1,icon:a="",children:c,onClick:l,onFocus:i,onBlur:f,className:u="",style:o={},...m})=>{const[v,w]=y.useState(!1),h=["default","primary","secondary","error","warning","info","success"],p=["sm","md","lg"],b=[!1,"start","end"];h.includes(e)||console.warn(`Invalid color "${e}" for IconButton component. Valid colors are: ${h.join(", ")}`),p.includes(t)||console.warn(`Invalid size "${t}" for IconButton component. Valid sizes are: ${p.join(", ")}`),b.includes(s)||console.warn(`Invalid edge "${s}" for IconButton component. Valid edges are: ${b.join(", ")}`);const g=["wc-icon-button",`wc-icon-button--${e}`,`wc-icon-button--${t}`,s&&`wc-icon-button--edge-${s}`,r&&"wc-icon-button--disabled",v&&"wc-icon-button--focused",u].filter(Boolean).join(" "),k=x=>{!r&&l&&l(x)},E=x=>{w(!0),i==null||i(x)},_=x=>{w(!1),f==null||f(x)};return n.jsx("button",{className:g,disabled:r,onClick:k,onFocus:E,onBlur:_,style:o,...m,children:n.jsx("span",{className:"icon-button-icon",children:a?n.jsx("span",{dangerouslySetInnerHTML:{__html:a}}):c})})};ts.displayName="IconButton";const ss=({images:e=[],title:t="",layout:s="grid",size:r="md",columns:a=3,gap:c=16,showInfo:l=!0,showCount:i=!0,showDownload:f=!1,showPagination:u=!1,itemsPerPage:o=12,lazyLoad:m=!0,loading:v=!1,className:w="",style:h={},onSelect:p,onDownload:b,onLightboxOpen:g,onLightboxClose:k,...E})=>{const[_,x]=y.useState(-1),[$,z]=y.useState(1),R=u?Math.ceil(e.length/o):1,G={sm:"75%",md:"66.67%",lg:"56.25%",xl:"50%"},F=u?e.slice(($-1)*o,$*o):e,V=C=>{const M=u?($-1)*o+C:C;x(M);const ee=e[M];p==null||p({index:M,image:ee}),g==null||g({index:M,image:ee})},Q=C=>{b==null||b(C);const M=document.createElement("a");M.href=C.src,M.download=C.title||"image",document.body.appendChild(M),M.click(),document.body.removeChild(M)},K=()=>{x(-1),k==null||k()},O=()=>x(C=>C>0?C-1:C),D=()=>x(C=>C<e.length-1?C+1:C);return y.useEffect(()=>{const C=M=>{M.key==="Escape"&&K(),_!==-1&&(M.key==="ArrowLeft"&&O(),M.key==="ArrowRight"&&D())};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[_]),n.jsxs("div",{className:["image-gallery",`gallery-layout-${s}`,`gallery-size-${r}`,v&&"gallery-loading",w].filter(Boolean).join(" "),style:h,...E,children:[(t||i)&&n.jsxs("div",{className:"gallery-header",children:[t&&n.jsx("h2",{className:"gallery-title",children:t}),i&&n.jsxs("div",{className:"gallery-count",children:[e.length," 张图片"]})]}),n.jsx("div",{className:"gallery-grid",style:s==="grid"?{gridTemplateColumns:`repeat(${a},1fr)`,gap:c}:s==="masonry"?{columnCount:a,columnGap:c}:{gap:c},children:F.map((C,M)=>n.jsxs("div",{className:"gallery-item",onClick:()=>V(M),tabIndex:0,role:"button","aria-label":`查看图片 ${M+1}`,children:[n.jsxs("div",{className:"gallery-image-container",style:{paddingBottom:G[r]},children:[n.jsx("img",{src:C.thumbnail||C.src,alt:C.alt||C.title,className:"gallery-image",loading:m?"lazy":"eager"}),n.jsx("div",{className:"gallery-overlay",children:n.jsxs("div",{className:"gallery-overlay-content",children:[n.jsx("button",{className:"gallery-action-btn gallery-view-btn","aria-label":`在灯箱中查看图片 ${M+1}`,onClick:ee=>{ee.stopPropagation(),V(M)},children:"👁️"}),f&&n.jsx("button",{className:"gallery-action-btn gallery-download-btn","aria-label":`下载图片 ${M+1}`,onClick:ee=>{ee.stopPropagation(),Q(C)},children:"📥"})]})})]}),l&&(C.title||C.description)&&n.jsxs("div",{className:"gallery-info",children:[C.title&&n.jsx("div",{className:"gallery-info-title",children:C.title}),C.description&&n.jsx("div",{className:"gallery-info-description",children:C.description})]})]},C.id||M))}),u&&R>1&&n.jsxs("div",{className:"gallery-pagination",children:[n.jsx("button",{className:"gallery-page-btn",disabled:$===1,onClick:()=>z(C=>C-1),children:"上一页"}),n.jsxs("span",{className:"gallery-page-info",children:["第 ",$," 页,共 ",R," 页"]}),n.jsx("button",{className:"gallery-page-btn",disabled:$===R,onClick:()=>z(C=>C+1),children:"下一页"})]}),_!==-1&&n.jsx("div",{className:"gallery-lightbox",onClick:K,role:"dialog","aria-modal":"true","aria-labelledby":"lightbox-title",children:n.jsxs("div",{className:"gallery-lightbox-content",onClick:C=>C.stopPropagation(),children:[n.jsx("button",{className:"gallery-lightbox-close",onClick:K,children:"✕"}),n.jsx("div",{className:"gallery-lightbox-image-container",children:n.jsx("img",{src:e[_].src,alt:e[_].alt,className:"gallery-lightbox-image"})}),(e[_].title||e[_].description)&&n.jsxs("div",{className:"gallery-lightbox-info",children:[e[_].title&&n.jsx("h3",{id:"lightbox-title",className:"gallery-lightbox-title",children:e[_].title}),e[_].description&&n.jsx("p",{className:"gallery-lightbox-description",children:e[_].description})]}),n.jsxs("div",{className:"gallery-lightbox-navigation",children:[n.jsx("button",{className:"gallery-lightbox-nav gallery-lightbox-prev",disabled:_===0,"aria-label":"上一张图片",onClick:O,children:"‹"}),n.jsxs("span",{className:"gallery-lightbox-counter",children:[_+1," / ",e.length]}),n.jsx("button",{className:"gallery-lightbox-nav gallery-lightbox-next",disabled:_===e.length-1,"aria-label":"下一张图片",onClick:D,children:"›"})]}),f&&n.jsx("button",{className:"gallery-action-btn gallery-download-btn",onClick:()=>Q(e[_]),children:"下载"})]})})]})};ss.displayName="ImageGallery";const ns=({value:e="",onChange:t,type:s="text",placeholder:r="",disabled:a=!1,readonly:c=!1,required:l=!1,autoFocus:i=!1,maxLength:f,minLength:u,size:o="md",variant:m="filled",color:v="primary",error:w=!1,helperText:h="",label:p="",startAdornment:b=null,endAdornment:g=null,fullWidth:k=!1,multiline:E=!1,rows:_=4,autoComplete:x="off",name:$="",id:z="",className:R="",style:G={},onFocus:F,onBlur:V,onKeyDown:Q,onKeyUp:K,onKeyPress:O,...D})=>{const[C,M]=y.useState(!1),[ee,te]=y.useState(!!e),N=y.useRef(null),P=y.useId(),U=z||P;y.useEffect(()=>{te(!!e)},[e]),y.useEffect(()=>{i&&N.current&&N.current.focus()},[i]);const W=j=>{const L=j.target.value;te(!!L),t==null||t(j)},q=j=>{M(!0),F==null||F(j)},Z=j=>{M(!1),V==null||V(j)},H=()=>{const j=["wc-input"];return j.push(`wc-input--${o}`),j.push(`wc-input--${m}`),w&&j.push("wc-input--error"),a&&j.push("wc-input--disabled"),c&&j.push("wc-input--readonly"),C&&j.push("wc-input--focused"),ee&&j.push("wc-input--has-value"),k&&j.push("wc-input--full-width"),b&&j.push("wc-input--has-start-adornment"),g&&j.push("wc-input--has-end-adornment"),j.concat(R).filter(Boolean).join(" ")},Y=()=>({...G}),J=E?"textarea":"input";return n.jsxs("div",{className:"wc-input-container",children:[p&&n.jsxs("label",{htmlFor:U,className:`wc-input-label ${C||ee?"wc-input-label--active":""} ${w?"wc-input-label--error":""}`,children:[p,l&&n.jsx("span",{className:"wc-input-label__required",children:"*"})]}),n.jsxs("div",{className:"wc-input-wrapper",children:[b&&n.jsx("div",{className:"wc-input-adornment wc-input-adornment--start",children:b}),n.jsx(J,{ref:N,className:H(),style:Y(),type:E?void 0:s,value:e,onChange:W,onFocus:q,onBlur:Z,onKeyDown:Q,onKeyUp:K,onKeyPress:O,placeholder:r,disabled:a,readOnly:c,required:l,maxLength:f,minLength:u,rows:E?_:void 0,autoComplete:x,name:$,id:U,...D}),g&&n.jsx("div",{className:"wc-input-adornment wc-input-adornment--end",children:g})]}),(h||w)&&n.jsx("div",{className:`wc-input-helper-text ${w?"wc-input-helper-text--error":""}`,children:w||h})]})};ns.displayName="Input";const $r=e=>{const{dense:t=!1,disablePadding:s=!1,variant:r,className:a=""}=e,c=["list"];return t&&c.push("list--dense"),s&&c.push("list--no-padding"),r&&c.push(`list--${r}`),a&&c.push(a),c},Ir=e=>{const{button:t=!1,disabled:s=!1,divider:r=!1,dense:a=!1,selected:c=!1,disableGutters:l=!1,draggable:i=!1,multiselect:f=!1,className:u=""}=e,o=["list-item"];return t&&o.push("list-item--button"),s&&o.push("list-item--disabled"),r&&o.push("list-item--divider"),a&&o.push("list-item--dense"),c&&o.push("list-item--selected"),l&&o.push("list-item--no-gutters"),i&&o.push("list-item--draggable"),f&&o.push("list-item--multiselect"),u&&o.push(u),o},Pr=e=>{const{position:t="start",className:s=""}=e,r=["list-item-icon"];return t&&r.push(`list-item-icon--${t}`),s&&r.push(s),r},Or=e=>{const{inset:t=!1,className:s=""}=e,r=["list-item-text"];return t&&r.push("list-item-text--inset"),s&&r.push(s),r},rs=y.createContext({dense:!1}),Mr=({children:e,dense:t=!1,disablePadding:s=!1,subheader:r="",className:a="",...c})=>{const l=$r({dense:t,disablePadding:s,className:a}).join(" ");return n.jsx(rs.Provider,{value:{dense:t},children:n.jsx("div",{role:"list",className:l,...c,children:e})})},Ar=({children:e,button:t=!1,disabled:s=!1,divider:r=!1,selected:a=!1,disableGutters:c=!1,multiselect:l=!1,component:i,className:f="",...u})=>{const{dense:o}=y.useContext(rs)||{dense:!1},m=Ir({button:t,disabled:s,divider:r,dense:o,selected:a,disableGutters:c,multiselect:l,className:f}).join(" "),v=i||(t?"button":"div");return n.jsx(v,{role:"listitem",className:m,disabled:t&&s,...u,children:e})},Dr=({children:e,position:t="start",className:s="",...r})=>{const a=Pr({position:t,className:s}).join(" ");return n.jsx("span",{className:a,...r,children:e})},Br=({primary:e="",secondary:t="",inset:s=!1,className:r="",...a})=>{const c=Or({inset:s,className:r}).join(" ");return n.jsxs("div",{className:c,...a,children:[e&&n.jsx("p",{className:"list-item-text-primary",children:e}),t&&n.jsx("p",{className:"list-item-text-secondary",children:t})]})},Fr=({size:e,variant:t,disabled:s,className:r})=>{const a=["wc-menu",`wc-menu--${e}`,`wc-menu--${t}`];return s&&a.push("wc-menu--disabled"),r&&a.push(r),a},Rr=(e,t)=>["wc-menu__menu",`wc-menu__menu--${e}`,t],Lr=({disabled:e})=>["wc-menu__button",e?"wc-menu__button--disabled":""],as=e=>{const t=["wc-menu__item"];return e.divider&&t.push("wc-menu__divider"),e.disabled&&t.push("wc-menu__item--disabled"),t},Vr=e=>["wc-menu__arrow",e?"wc-menu__arrow--open":""],Wr=(e,t,s,r,a)=>{t||(s(!e),e?a&&a():r&&r())},Yr=(e,t,s,r,a)=>{e.disabled||e.divider||(s&&s(e,t),r(!1),a&&a())},Ur=e=>{const t=s=>{e(s)};return{add:()=>document.addEventListener("click",t),remove:()=>document.removeEventListener("click",t)}},cs=({items:e=[],triggerText:t="选择选项",placement:s="bottom-start",size:r="md",variant:a="default",disabled:c=!1,trigger:l="click",illustration:i="",illustrationAlt:f="示意图",cardTitle:u="",cardDescription:o="",onSelect:m,onOpen:v,onClose:w,children:h,triggerContent:p,menuContent:b,className:g="",...k})=>{const[E,_]=y.useState(!1),x=y.useRef(null),$=y.useRef(null),z=Fr({size:r,variant:a,disabled:c,className:g}).join(" "),R=Rr(s,a==="card"?"wc-menu__menu--card":"").join(" "),G=Lr({disabled:c}).join(" "),F=Vr(E).join(" "),V=a==="card"?{minWidth:"320px",maxWidth:"450px"}:{minWidth:"120px"},Q=()=>{Wr(E,c,_,v,w)},K=(D,C)=>{Yr(D,C,m,_,w)},O=Ur(D=>{x.current&&!x.current.contains(D.target)&&(_(!1),w&&w())});return y.useEffect(()=>(E?O.add():O.remove(),()=>O.remove()),[E]),n.jsxs("div",{className:z,ref:x,...k,style:{backgroundColor:"var(--wc-bg-surface)",color:"var(--wc-text-primary)"},children:[n.jsx("div",{className:"wc-menu__trigger",onClick:Q,ref:$,children:p||h||n.jsxs("button",{className:G,children:[t,n.jsx("span",{className:F,children:n.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:n.jsx("polyline",{points:"6,9 12,15 18,9"})})})]})}),E&&n.jsx("div",{className:R,style:V,children:b||(a==="card"?n.jsxs("div",{className:"wc-menu__card",children:[n.jsxs("div",{className:"wc-menu__card-illustration",children:[i?n.jsx("img",{src:i,alt:f,className:"wc-menu__illustration-image"}):n.jsx("div",{className:"wc-menu__illustration-placeholder",children:n.jsx("span",{children:"🎨"})}),(u||o)&&n.jsxs("div",{className:"wc-menu__card-info",children:[u&&n.jsx("h4",{className:"wc-menu__card-title",children:u}),o&&n.jsx("p",{className:"wc-menu__card-description",children:o})]})]}),n.jsx("div",{className:"wc-menu__card-list",children:e.map((D,C)=>{if(D.divider)return n.jsx("div",{className:"wc-menu__divider"},D.key||C);const M=as(D).join(" ");return n.jsxs("div",{className:M,onClick:()=>K(D,C),children:[D.icon&&n.jsx("span",{className:"wc-menu__icon",children:D.icon}),n.jsx("span",{className:"wc-menu__label",children:D.label})]},D.key||C)})})]}):e.map((D,C)=>{if(D.divider)return n.jsx("div",{className:"wc-menu__divider"},D.key||C);const M=as(D).join(" ");return n.jsxs("div",{className:M,onClick:()=>K(D,C),children:[D.icon&&n.jsx("span",{className:"wc-menu__icon",children:D.icon}),n.jsx("span",{className:"wc-menu__label",children:D.label})]},D.key||C)}))})]})};cs.displayName="Menu";function qr({size:e="md",fullWidth:t=!1,fullScreen:s=!1,scroll:r="paper",position:a="center",className:c=""}={}){const l=["wc-modal"];return e&&!s&&l.push(`wc-modal--${e}`),s&&l.push("wc-modal--fullscreen"),t&&!s&&l.push("wc-modal--full-width"),r==="body"?l.push("wc-modal--scroll-body"):l.push("wc-modal--scroll-paper"),a&&a!=="center"&&l.push(`wc-modal--${a}`),c&&l.push(c),l.filter(Boolean).join(" ")}function Hr({centered:e=!0,position:t="center"}={}){const s=["wc-modal-overlay"];return(e||t==="center")&&s.push("wc-modal-overlay--centered"),t&&t!=="center"&&s.push(`wc-modal-overlay--${t}`),s.join(" ")}function zr(e,t,s=0){e(!1),t&&(s>0?setTimeout(()=>{t()},s):t())}function Gr(e,t,s){e.key==="Escape"&&t&&s()}function Kr(e){if(e){const t=e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');t.length>0?t[0].focus():e.focus()}}function Xr(e){if(!e)return()=>{};const t=e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),s=t[0],r=t[t.length-1],a=c=>{c.key==="Tab"&&(c.shiftKey?document.activeElement===s&&(c.preventDefault(),r==null||r.focus()):document.activeElement===r&&(c.preventDefault(),s==null||s.focus()))};return e.addEventListener("keydown",a),()=>{e.removeEventListener("keydown",a)}}const ls=({visible:e=!1,open:t=!1,title:s="",size:r="md",maxWidth:a=null,closable:c=!0,showCloseButton:l=!0,maskClosable:i=!0,closeOnOverlay:f=!0,disableBackdropClick:u=!1,disableEscapeKeyDown:o=!1,centered:m=!0,fullWidth:v=!1,fullScreen:w=!1,position:h="center",scroll:p="paper",lockScroll:b=!0,zIndex:g=1e3,showOverlay:k=!0,className:E="",onClose:_,children:x,header:$,footer:z,...R})=>{const[G,F]=y.useState(e||t),V=y.useRef(null),Q=y.useRef(null),K=y.useRef(null),O=e||t;y.useEffect(()=>{F(O)},[O]);const C=qr({size:a||r,fullWidth:v,fullScreen:w,scroll:p,position:h,className:E}),M=Hr({centered:h==="center"||m,position:h}),ee=()=>{zr(F,_)},te=()=>{(i||f)&&!u&&ee()},N=W=>{Gr(W,c&&!o,ee)};if(y.useEffect(()=>{if(G)return Q.current=document.activeElement,setTimeout(()=>{V.current&&(Kr(V.current),K.current=Xr(V.current))},100),document.addEventListener("keydown",N),b&&(document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",N),K.current&&(K.current(),K.current=null),Q.current&&Q.current.focus&&Q.current.focus(),b&&(document.body.style.overflow="")}},[G,c,o,b]),!G)return null;const P=c&&l!==!1,U=n.jsxs("div",{className:M,style:{zIndex:g},onClick:te,"data-testid":"modal-overlay",children:[k&&n.jsx("div",{className:"wc-modal__overlay"}),n.jsxs("div",{ref:V,className:C,onClick:W=>W.stopPropagation(),role:"dialog","aria-modal":"true","aria-labelledby":s?"modal-title":void 0,tabIndex:-1,...R,children:[P&&n.jsx(Ge,{variant:"text",size:"sm",className:"wc-modal__close",onClick:ee,"aria-label":"关闭",children:"×"}),(s||$)&&n.jsx("div",{className:"wc-modal__header",children:$||s&&n.jsx("h3",{id:"modal-title",className:"wc-modal__title",children:s})}),n.jsx("div",{className:"wc-modal__body",children:x}),z&&n.jsx("div",{className:"wc-modal__footer",children:z})]})]});return Be.createPortal(U,document.body)};ls.displayName="Modal";const Jr=({active:e=!0,duration:t=3e3,from:s=0,to:r,locale:a="",precision:c=0,showSeparator:l=!1,prefix:i="",suffix:f="",separator:u="",formatter:o=null,easing:m="linear",onFinish:v,className:w="",style:h={},...p})=>{const[b,g]=y.useState(s),[k,E]=y.useState(!1),_=y.useRef(null),x=y.useRef(null),$=V=>{_.current===null&&(_.current=V);const Q=Math.min((V-_.current)/t,1);g(s+(r-s)*Q),Q<1&&e?x.current=requestAnimationFrame($):(g(r),E(!1),v==null||v())},z=()=>{R(),_.current=null,e?(E(!0),x.current=requestAnimationFrame($)):(g(r),E(!1))},R=()=>{x.current&&(cancelAnimationFrame(x.current),x.current=null)};y.useEffect(()=>(z(),R),[e,s,r,t]);const G=V=>{if(o)return o(V);const Q=V.toFixed(c);let K=Q;if(l||u)if(u){const O=Q.split(".");O[0]=O[0].replace(/\B(?=(\d{3})+(?!\d))/g,u),K=O.join(".")}else K=Number(Q).toLocaleString(a||void 0,{minimumFractionDigits:c,maximumFractionDigits:c});return`${i}${K}${f}`},F=["wc-number-animation",k?"wc-number-animation--playing":"",m&&["ease-in","ease-out","ease-in-out"].includes(m)?`wc-number-animation--${m}`:"",w].filter(Boolean).join(" ");return n.jsx("span",{className:F,style:h,...p,children:G(b)})};function Qr({value:e=1,onChange:t,total:s,pageSize:r=10,siblingCount:a=1,boundaryCount:c=1,size:l="md",className:i="",...f}){const[u,o]=y.useState(e);y.useEffect(()=>{o(e)},[e]);const m=y.useMemo(()=>Math.max(1,Math.ceil(s/r)),[s,r]),v=(b,g)=>{const k=[];for(let E=b;E<=g;E++)k.push(E);return k},w=y.useMemo(()=>{const b=a*2+3+c*2;if(m<=b)return v(1,m).map($=>({key:$,num:$}));const g=Math.max(u-a,c+2),k=Math.min(u+a,m-c-1),E=g>c+2,_=k<m-c-1,x=[];for(let $=1;$<=c;$++)x.push({key:"b"+$,num:$});E&&x.push({key:"l-ellipsis",ellipsis:!0});for(let $=g;$<=k;$++)x.push({key:"m"+$,num:$});_&&x.push({key:"r-ellipsis",ellipsis:!0});for(let $=m-c+1;$<=m;$++)x.push({key:"e"+$,num:$});return x},[u,m,a,c]),h=y.useCallback(b=>{b<1||b>m||b===u||(o(b),t==null||t(b))},[u,m,t]);if(m<=1)return null;const p=["pagination","wc-pagination",l!=="md"?`wc-pagination--${l}`:"",i].filter(Boolean).join(" ");return n.jsxs("nav",{className:p,"aria-label":"分页导航",...f,children:[n.jsx("button",{className:"page-btn wc-page-btn wc-page-btn--prev wc-page-btn--nav",disabled:u===1,onClick:()=>h(u-1),"aria-label":"上一页",children:"‹"}),w.map(b=>b.ellipsis?n.jsx("span",{className:"page-ellipsis",children:"…"},b.key):n.jsx("button",{className:`page-btn wc-page-btn${b.num===u?" active wc-page-btn--active":""}`,onClick:()=>h(b.num),children:b.num},b.key)),n.jsx("button",{className:"page-btn wc-page-btn wc-page-btn--next wc-page-btn--nav",disabled:u===m,onClick:()=>h(u+1),"aria-label":"下一页",children:"›"})]})}const is={ELEVATION:"elevation",OUTLINED:"outlined"},Zr={SQUARE:"square",ROUNDED_SM:"rounded-sm",ROUNDED_LG:"rounded-lg",ROUNDED_XL:"rounded-xl",ROUNDED_2XL:"rounded-2xl",ROUNDED_FULL:"rounded-full"},ea={SM:"sm",MD:"md",LG:"lg",XL:"xl"},rt={DEFAULT:"default",PRIMARY:"primary",SUCCESS:"success",WARNING:"warning",ERROR:"error",INFO:"info"};function ta(e={}){const{variant:t=is.ELEVATION,elevation:s=1,square:r=!1,shape:a=null,size:c=null,color:l=rt.DEFAULT,hoverable:i=!1,clickable:f=!1,gradient:u=!1,frosted:o=!1,textured:m=!1,className:v=""}=e,w=["wc-paper"];if(t===is.OUTLINED)w.push("wc-paper--outlined");else{w.push("wc-paper--elevation");const h=Math.max(0,Math.min(24,Math.floor(Number(s)||0)));w.push(`wc-paper--elevation-${h}`)}return r?w.push("wc-paper--square"):a&&Zr[a.toUpperCase()]&&w.push(`wc-paper--${a}`),c&&ea[c.toUpperCase()]&&w.push(`wc-paper--${c}`),l!==rt.DEFAULT&&rt[l.toUpperCase()]&&w.push(`wc-paper--${l}`),i&&w.push("wc-paper--hoverable"),f&&w.push("wc-paper--clickable"),u&&w.push("wc-paper--gradient"),o&&w.push("wc-paper--frosted"),m&&w.push("wc-paper--textured"),v&&w.push(v),w.join(" ")}function sa({variant:e="elevation",elevation:t=1,square:s=!1,hoverable:r=!1,clickable:a=!1,color:c="default",size:l=null,className:i="",children:f,onClick:u,onMouseEnter:o,onMouseLeave:m,...v}){const w=Math.max(0,Math.min(24,Math.floor(Number(t)||0))),h=ta({variant:e,elevation:w,square:s,hoverable:r,clickable:a,color:c,size:l,className:i}),p=b=>{a&&u&&u(b)};return n.jsx("div",{className:h,onClick:p,onMouseEnter:o,onMouseLeave:m,style:{cursor:a?"pointer":"default",...v.style},...v,children:f})}function na({open:e,onOpenChange:t,triggerText:s="打开弹窗",trigger:r,placement:a="bottom",offset:c=8,children:l,className:i=""}){const[f,u]=y.useState(!1),o=e!=null,m=y.useRef(null),v=y.useRef(null),w=o?e:f,h=_=>{o||u(_),t==null||t(_)},p=()=>h(!1),b=()=>{h(!w)},g=y.useCallback(()=>{const _=m.current,x=v.current;if(!_||!x)return;const $=_.getBoundingClientRect(),z=x.getBoundingClientRect();let R=0,G=0;switch(a){case"top":R=$.top-z.height-c,G=$.left+($.width-z.width)/2;break;case"bottom":R=$.bottom+c,G=$.left+($.width-z.width)/2;break;case"left":R=$.top+($.height-z.height)/2,G=$.left-z.width-c;break;case"right":R=$.top+($.height-z.height)/2,G=$.right+c;break}x.style.top=`${R+window.scrollY}px`,x.style.left=`${G+window.scrollX}px`},[a,c]);y.useEffect(()=>{},[o,e]),y.useEffect(()=>(w&&(g(),window.addEventListener("resize",g),window.addEventListener("scroll",g),document.addEventListener("mousedown",k)),()=>{window.removeEventListener("resize",g),window.removeEventListener("scroll",g),document.removeEventListener("mousedown",k)}),[w,g]);const k=_=>{v.current&&!v.current.contains(_.target)&&!m.current.contains(_.target)&&p()},E=r?y.cloneElement(r,{ref:m,onClick:b,"aria-expanded":w}):n.jsx("button",{ref:m,className:"wc-popover-trigger",onClick:b,"aria-expanded":w,children:s});return n.jsxs("div",{className:`wc-popover-container ${i}`.trim(),children:[E,w&&Be.createPortal(n.jsx("div",{ref:v,className:`wc-popover-content wc-popover-content--${a}`.trim(),role:"dialog",children:l}),document.body)]})}function ra({plans:e=[],columns:t=3,className:s=""}){const r={gridTemplateColumns:`repeat(${t}, minmax(0,1fr))`};return n.jsx("div",{className:`pricing-grid ${s}`.trim(),style:r,children:e.map(a=>{var c;return n.jsxs("div",{className:`plan-card${a.popular?" popular":""}`,children:[n.jsx("h3",{className:"plan-name",children:a.name}),n.jsx("p",{className:"plan-price",children:a.price}),n.jsx("ul",{className:"plan-features",children:(c=a.features)==null?void 0:c.map(l=>n.jsx("li",{children:l},l))}),n.jsx("button",{className:"plan-btn",children:a.button||"选择"})]},a.name)})})}const os=({value:e=0,label:t="",showPercent:s=!1,color:r="primary",size:a="md",animated:c=!1,className:l="",...i})=>{const u=["primary","success","warning","error","purple","orange","cyan","pink"].includes(r)?r:"primary",o=Math.max(0,Math.min(100,e)),m=["wc-progress",`wc-progress--${a}`],v=["wc-progress__bar",`wc-progress__bar--${u}`,c&&"wc-progress__bar--animated"].filter(Boolean).join(" "),w={width:`${o}%`};return n.jsxs("div",{className:`wc-progress-wrapper ${l}`,...i,children:[(t||s)&&n.jsxs("div",{className:"wc-progress-header",children:[t&&n.jsx("label",{className:"wc-progress-label",children:t}),s&&n.jsxs("span",{className:"wc-progress-percent",children:[Math.round(o),"%"]})]}),n.jsx("div",{className:m.join(" "),children:n.jsx("div",{className:v,style:w})})]})};os.displayName="Progress";const us=y.createContext(null);function ds({value:e,onChange:t,name:s,disabled:r=!1,label:a="",row:c=!1,required:l=!1,error:i="",helperText:f="",size:u="md",color:o="primary",children:m,className:v=""}){const[w,h]=y.useState(e),p=e!==void 0,b=p?e:w,g=y.useCallback(_=>{r||(p||h(_),t==null||t(_))},[r,p,t]),k=["wc-radio-group",v].filter(Boolean).join(" "),E=["wc-radio-group-content",c?"flex flex-wrap gap-4":"space-y-2"].filter(Boolean).join(" ");return n.jsx(us.Provider,{value:{value:b,updateValue:g,name:s,disabled:r,size:u,color:o},children:n.jsxs("div",{className:k,children:[a&&n.jsxs("label",{className:"wc-radio-group-label",children:[a,l&&n.jsx("span",{className:"text-error-500",children:"*"})]}),n.jsx("div",{className:E,children:m}),(i||f)&&n.jsx("div",{className:"mt-2",children:i?n.jsx("p",{className:"text-sm text-error-500",children:i}):n.jsx("p",{className:"text-sm text-neutral-500",children:f})})]})})}function fs({value:e,checked:t,onChange:s,label:r,name:a,disabled:c=!1,color:l="primary",size:i="md",className:f="",children:u,...o}){const m=y.useContext(us),v=m?m.value===e:t!==void 0?t:void 0,w=m?m.name:a,h=m&&m.disabled||c,p=i||m&&m.size||"md",b=l||m&&m.color||"primary",[g,k]=y.useState(!1),E=["wc-radio",`wc-radio--${p}`,h&&"wc-radio--disabled",g&&"wc-radio--focused",f].filter(Boolean).join(" "),_=["wc-radio__button",`wc-radio__button--${b}`,`wc-radio__button--${p}`,v&&"wc-radio__button--checked"].filter(Boolean).join(" "),x=()=>{h||(m?m.updateValue(e):s==null||s(e))},$=u||r;return n.jsxs("label",{className:E,children:[n.jsx("input",{type:"radio",className:"wc-radio__input",name:w,value:e,checked:v,disabled:h,onChange:x,onFocus:()=>k(!0),onBlur:()=>k(!1),...o}),n.jsx("span",{className:_,children:v&&n.jsx("span",{className:"radio-dot"})}),$&&n.jsx("span",{className:"radio-label",children:$})]})}fs.displayName="Radio",ds.displayName="RadioGroup";const aa=({value:e=0,max:t=5,readOnly:s=!1,onChange:r=()=>{},className:a="",style:c={},...l})=>{const[i,f]=y.useState(0),[u,o]=y.useState(e);y.useEffect(()=>o(e),[e]),y.useEffect(()=>{if(document.getElementById("wc-rating-style"))return;const h=document.createElement("style");h.id="wc-rating-style",h.innerHTML=`
6
+ <%s key={someKey} {...props} />`,o,p,m,p),L[p+o]=!0)}if(p=null,i!==void 0&&(r(i),p=``+i),s(n)&&(r(n.key),p=``+n.key),`key`in n)for(var h in i={},n)h!==`key`&&(i[h]=n[h]);else i=n;return p&&c(i,typeof e==`function`?e.displayName||e.name||`Unknown`:e),u(e,p,i,a(),l,d)}function f(e){p(e)?e._store&&(e._store.validated=1):typeof e==`object`&&e&&e.$$typeof===E&&(e._payload.status===`fulfilled`?p(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function p(e){return typeof e==`object`&&!!e&&e.$$typeof===h}var m=require(`react`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),b=Symbol.for(`react.consumer`),x=Symbol.for(`react.context`),S=Symbol.for(`react.forward_ref`),C=Symbol.for(`react.suspense`),w=Symbol.for(`react.suspense_list`),T=Symbol.for(`react.memo`),E=Symbol.for(`react.lazy`),D=Symbol.for(`react.activity`),O=Symbol.for(`react.client.reference`),k=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=Object.prototype.hasOwnProperty,j=Array.isArray,M=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(e){return e()}};var N,P={},F=m.react_stack_bottom_frame.bind(m,o)(),I=M(i(o)),L={};e.Fragment=_,e.jsx=function(e,t,n){var r=1e4>k.recentlyCreatedOwnerStacks++;return d(e,t,n,!1,r?Error(`react-stack-top-frame`):F,r?M(i(e)):I)},e.jsxs=function(e,t,n){var r=1e4>k.recentlyCreatedOwnerStacks++;return d(e,t,n,!0,r?Error(`react-stack-top-frame`):F,r?M(i(e)):I)}})()})),y=l(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=_():t.exports=v()}))(),b=({items:e=[],multiple:n=!1,variant:r=`default`,onToggle:i,className:a=``,style:o={},"aria-label":s,...c})=>{let[l,u]=(0,t.useState)([]),d=h(r,a),f=e=>{let t=g(l,e,n);u(t),i?.(e,t.includes(e))},p=e=>l.includes(e);return(0,y.jsx)(`div`,{className:d,style:o,role:`region`,"aria-label":s||`Accordion`,...c,children:e.map((e,t)=>(0,y.jsxs)(`div`,{className:`wc-accordion-item`,children:[(0,y.jsxs)(`button`,{className:`wc-accordion-header ${p(t)?`wc-accordion-header--active`:``}`,onClick:()=>f(t),type:`button`,children:[(0,y.jsx)(`span`,{className:`wc-accordion-title`,children:e.title}),(0,y.jsx)(`span`,{className:`wc-accordion-icon ${p(t)?`wc-accordion-icon--rotated`:``}`,children:(0,y.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:(0,y.jsx)(`polyline`,{points:`6,9 12,15 18,9`})})})]}),(0,y.jsx)(`div`,{className:`wc-accordion-content ${p(t)?`wc-accordion-content--open`:``}`,style:{display:p(t)?void 0:`none`},children:(0,y.jsx)(`div`,{className:`wc-accordion-content-inner`,children:e.content})})]},t))})};b.displayName=`Accordion`;var x={success:`✓`,info:`ⓘ`,warning:`⚠`,error:`✕`};function S(e){return x[e]||x.info}function C(e,t){return[`wc-alert`,`wc-alert--${e}`,`wc-alert--${t}`]}function w({type:e=`info`,variant:n=`standard`,title:r=``,closable:i=!1,showIcon:a=!0,className:o=``,children:s,onClose:c=()=>{}}){let[l,u]=(0,t.useState)(!0);if(!l)return null;let d=()=>{u(!1),c()},f=C(e,n),p=S(e);return(0,y.jsxs)(`div`,{className:[...f,o].filter(Boolean).join(` `),role:`alert`,children:[a&&(0,y.jsx)(`div`,{className:`wc-alert-icon`,children:(0,y.jsx)(`span`,{children:p})}),(0,y.jsxs)(`div`,{className:`wc-alert-content`,children:[r&&(0,y.jsx)(`div`,{className:`wc-alert-title`,children:r}),(0,y.jsx)(`div`,{className:`wc-alert-message`,children:s})]}),i&&(0,y.jsx)(`button`,{type:`button`,className:`wc-alert-close`,"aria-label":`关闭`,onClick:d,children:`×`})]})}var T=({children:e,position:t=`fixed`,color:n=`default`,elevation:r=4,variant:i=`elevation`,className:a=``,style:o={},...s})=>(0,y.jsx)(`div`,{className:`wc-appbar wc-appbar--${t} wc-appbar--${n} wc-appbar--elevation-${r} wc-appbar--${i} ${a}`,style:o,...s,children:e}),E=({value:e=null,onChange:n,options:r=[],placeholder:i=`Type to search...`,label:a=``,helperText:o=``,error:s=!1,errorMessage:c=``,required:l=!1,disabled:u=!1,readonly:d=!1,multiple:f=!1,freeSolo:p=!1,clearable:m=!0,fullWidth:h=!1,size:g=`md`,variant:_=`outlined`,minSearchLength:v=0,noOptionsText:b=`No options found`,name:x=``,id:S=``,className:C=``,style:w={},onFocus:T,onBlur:E,onInputChange:D,filterOptions:O,renderOption:k,renderInput:A,getOptionLabel:j,getOptionValue:M,...N})=>{let[P,F]=(0,t.useState)(!1),[I,L]=(0,t.useState)(``),[R,z]=(0,t.useState)(-1),B=(0,t.useRef)(null),V=(0,t.useRef)(null),H=e=>e?typeof e==`object`?e.label||e.value||``:String(e):``,U=e=>e?typeof e==`object`?e.value===void 0?e:e.value:e:null,W=j||H,G=M||U;(0,t.useEffect)(()=>{!f&&e?L(W(e)):e||L(``)},[e,f]),(0,t.useEffect)(()=>{let e=e=>{B.current&&!B.current.contains(e.target)&&F(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]);let K=O?O(r,I):((e,t)=>!t||t.length<v?e:e.filter(e=>W(e).toLowerCase().includes(t.toLowerCase())))(r,I),q=t=>{let n=G(t);return f&&Array.isArray(e)?e.some(e=>G(e)===n):G(e)===n},J=()=>{let e=[`wc-autocomplete`];return h&&e.push(`wc-autocomplete--full-width`),e.concat(C).filter(Boolean).join(` `)},Y=()=>{let e=[`wc-autocomplete__label`];return e.push(`wc-autocomplete__label--${g}`),s&&e.push(`wc-autocomplete__label--error`),e.join(` `)},ee=()=>{let e=[`wc-autocomplete__container`];return e.push(`wc-autocomplete__container--${_}`),e.push(`wc-autocomplete__container--${g}`),u&&e.push(`wc-autocomplete__container--disabled`),s&&e.push(`wc-autocomplete__container--error`),P&&e.push(`wc-autocomplete__container--open`),e.join(` `)},te=(e,t)=>{let n=[`wc-autocomplete__option`];return q(e)&&n.push(`wc-autocomplete__option--selected`),t===R&&n.push(`wc-autocomplete__option--highlighted`),e.disabled&&n.push(`wc-autocomplete__option--disabled`),n.join(` `)},ne=e=>{F(!0),T?.(e)},re=e=>{setTimeout(()=>{F(!1),E?.(e)},200)},ie=e=>{let t=e.target.value;L(t),F(!0),z(-1),D?.(t),p&&n?.({target:{name:x,value:t}})},X=e=>{e.stopPropagation(),L(``),F(!1),z(-1),n?.({target:{name:x,value:f?[]:null}})},ae=t=>{if(t.disabled)return;let r=G(t),i;if(f){let n=Array.isArray(e)?[...e]:[],a=n.findIndex(e=>G(e)===r);a>-1?n.splice(a,1):n.push(t),i=n,L(``)}else i=t,L(W(t)),F(!1);z(-1),n?.({target:{name:x,value:i}})},oe=e=>{if(!P&&(e.key===`ArrowDown`||e.key===`ArrowUp`)){F(!0),e.preventDefault();return}if(!(!P||K.length===0))switch(e.key){case`ArrowDown`:e.preventDefault(),z(e=>Math.min(e+1,K.length-1));break;case`ArrowUp`:e.preventDefault(),z(e=>Math.max(e-1,0));break;case`Enter`:e.preventDefault(),R>=0&&R<K.length&&ae(K[R]);break;case`Escape`:F(!1),z(-1),V.current?.blur();break;default:break}},se=S||x||`autocomplete-${Math.random().toString(36).substr(2,9)}`;return(0,y.jsxs)(`div`,{className:J(),ref:B,style:w,children:[a&&(0,y.jsxs)(`label`,{htmlFor:se,className:Y(),children:[a,l&&(0,y.jsx)(`span`,{className:`wc-autocomplete__required`,children:`*`})]}),(0,y.jsxs)(`div`,{className:ee(),children:[A?A({id:se,value:I,onChange:ie,onFocus:ne,onBlur:re,onKeyDown:oe,placeholder:i,disabled:u,readonly:d,ref:V}):(0,y.jsx)(`input`,{id:se,ref:V,type:`text`,className:`wc-autocomplete__input`,placeholder:i,value:I,onChange:ie,onFocus:ne,onBlur:re,onKeyDown:oe,disabled:u,readOnly:d,autoComplete:`off`}),(0,y.jsxs)(`div`,{className:`wc-autocomplete__indicators`,children:[m&&I&&(0,y.jsx)(`button`,{type:`button`,className:`wc-autocomplete__clear`,onClick:X,tabIndex:-1,children:(0,y.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:[(0,y.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,y.jsx)(`line`,{x1:`15`,y1:`9`,x2:`9`,y2:`15`}),(0,y.jsx)(`line`,{x1:`9`,y1:`9`,x2:`15`,y2:`15`})]})}),(0,y.jsx)(`div`,{className:`wc-autocomplete__arrow${P&&K.length>0?` wc-autocomplete__arrow--open`:``}`,children:(0,y.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:(0,y.jsx)(`polyline`,{points:`6,9 12,15 18,9`})})})]})]}),P&&I.length>=v&&(0,y.jsx)(`div`,{className:`wc-autocomplete__dropdown`,children:K.length===0?(0,y.jsx)(`div`,{className:`wc-autocomplete__no-options`,children:b}):(0,y.jsx)(`div`,{className:`wc-autocomplete__options`,children:K.map((e,t)=>(0,y.jsxs)(`div`,{className:te(e,t),onClick:()=>ae(e),onMouseEnter:()=>z(t),children:[k?k(e,{selected:q(e)}):(0,y.jsx)(`span`,{className:`wc-autocomplete__option-text`,children:W(e)}),q(e)&&(0,y.jsx)(`svg`,{className:`wc-autocomplete__option-check`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:(0,y.jsx)(`polyline`,{points:`20,6 9,17 4,12`})})]},G(e)||t))})}),(s||o)&&(0,y.jsx)(`div`,{children:s?(0,y.jsx)(`p`,{className:`wc-autocomplete__error`,children:c||s}):(0,y.jsx)(`p`,{className:`wc-autocomplete__helper`,children:o})})]})};E.displayName=`Autocomplete`;function D({size:e,variant:t,color:n,src:r,imgError:i}){let a=[`wc-avatar`];return typeof e==`string`&&a.push(`wc-avatar--${e}`),a.push(`wc-avatar--${t}`),(!r||i)&&a.push(`wc-avatar--${n}`),a}function O(e){let t={};return typeof e==`number`&&(t.width=`${e}px`,t.height=`${e}px`,t.fontSize=`${e*.4}px`),t}function k(e){if(!e)return``;let t=e.trim(),n=t.charAt(0);if(/[\u4e00-\u9fa5]/.test(n))return n;let r=t.split(/\s+/).filter(Boolean);return r.length===1?r[0].charAt(0).toUpperCase():(r[0].charAt(0)+r[1].charAt(0)).toUpperCase()}function A(e){e(!0)}function j(e){e(!1)}var M=({src:e=``,alt:n=``,size:r=`md`,variant:i=`circular`,color:a=`default`,children:o=``,className:s=``,...c})=>{let[l,u]=(0,t.useState)(!1),d=D({size:r,variant:i,color:a,src:e,imgError:l}).concat(s).filter(Boolean).join(` `),f=O(r),p=k(o),m=()=>A(u),h=()=>j(u);return(0,y.jsx)(`div`,{className:d,style:f,...c,children:e&&!l?(0,y.jsx)(`img`,{src:e,alt:n,role:`img`,onError:m,onLoad:h}):o?(0,y.jsx)(`span`,{className:`wc-avatar-text`,children:p}):null})};M.displayName=`Avatar`;var N=[`primary`,`secondary`,`success`,`warning`,`error`,`purple`,`orange`,`cyan`,`pink`];function P(e){return N.includes(e)}function F(e){return P(e)?e:`primary`}function I({variant:e,size:t,dot:n,className:r}){let i=[`wc-badge`,`wc-badge--${F(e)}`];return n?i.push(`wc-badge--dot-${t}`):i.push(`wc-badge--${t}`),r&&i.push(r),i.filter(Boolean).join(` `)}var L=({children:e,variant:t=`primary`,size:n=`md`,dot:r=!1,className:i=``,...a})=>(0,y.jsx)(`span`,{className:I({variant:t,size:n,dot:r,className:i}),...a,children:!r&&e});L.displayName=`Badge`;var R={success:`✓`,info:`📢`,warning:`⚠`,error:`✕`};function z(e,t,n){let r=[`wc-banner`,`wc-banner--${e}`,`wc-banner--${t}`];return n&&r.push(`wc-banner--sticky`),r.join(` `)}function B(e){return R[e]||R.info}function V(e){return{zIndex:e}}function H(e,t){e(!1),t&&t()}function U(e){e&&e()}function W({type:e=`info`,position:n=`top`,title:r=``,message:i=``,closable:a=!0,showIcon:o=!0,showDefaultAction:s=!1,actionText:c=`立即行动`,sticky:l=!0,zIndex:u=1e3,onClose:d,onAction:f,children:p}){let[m,h]=(0,t.useState)(!0);if(!m)return null;let g=z(e,n,l),_=V(u),v=B(e),b=()=>{H(h,d)},x=()=>{U(f)},S=p&&t.default.Children.count(p)>0;return(0,y.jsx)(`div`,{className:g,style:_,children:(0,y.jsxs)(`div`,{className:`wc-banner-content`,children:[o&&(0,y.jsx)(`div`,{className:`wc-banner-icon`,children:v}),(0,y.jsxs)(`div`,{className:`wc-banner-text`,children:[r&&(0,y.jsx)(`div`,{className:`wc-banner-title`,children:r}),(0,y.jsx)(`div`,{className:`wc-banner-message`,children:i})]}),(S||s)&&(0,y.jsx)(`div`,{className:`wc-banner-actions`,children:S?p:(0,y.jsx)(`button`,{onClick:x,className:`wc-banner-action-btn`,children:c})}),a&&(0,y.jsx)(`button`,{onClick:b,className:`wc-banner-close`,"aria-label":`关闭`,children:`×`})]})})}function G(e=``,t=`default`,n=!0,r=!0,i=`medium`,a=`default`){let o=[`wc-blockquote`];return t&&t!==`default`&&t!==`card`&&o.push(`wc-blockquote--${t}`),n&&o.push(`wc-blockquote--no-border`),r&&o.push(`wc-blockquote--interactive`),i&&i!==`medium`&&o.push(`wc-blockquote--${i}`),a&&a!==`default`&&o.push(`wc-blockquote--${a}`),e&&o.push(e),o.filter(Boolean).join(` `)}function K(e=``,t=`filled`,n=`default`,r=`medium`,i=!0,a=!0){let o=[`wc-card`];return t&&t!==`filled`&&o.push(`wc-card--${t}`),n&&n!==`default`&&o.push(`wc-card--${n}`),r&&r!==`medium`&&o.push(`wc-card--${r}`),i&&o.push(`wc-card--interactive`),a&&o.push(`wc-card--no-border`),e&&o.push(e),o.filter(Boolean).join(` `)}var q=({children:e,title:t=``,variant:n=`filled`,color:r=`default`,size:i=`medium`,interactive:a=!0,noBorder:o=!0,className:s=``,header:c=null,footer:l=null,style:u={},onClick:d,onMouseEnter:f,onMouseLeave:p,...m})=>{let h=K(s,n,r,i,a,o);return(0,y.jsxs)(`div`,{className:h,style:u,onClick:e=>{a&&d&&d(e)},onMouseEnter:f,onMouseLeave:p,role:d?`button`:void 0,tabIndex:d?0:void 0,...m,children:[c&&(0,y.jsx)(`div`,{className:`wc-card-header`,children:c}),t&&(0,y.jsx)(`div`,{className:`wc-card-header`,children:(0,y.jsx)(`h3`,{className:`wc-card__title`,children:t})}),(0,y.jsx)(`div`,{className:`wc-card-content`,children:e}),l&&(0,y.jsx)(`div`,{className:`wc-card-footer`,children:l})]})};q.displayName=`Card`;function J({cite:e=``,children:t,className:n=``,variant:r=`default`,noBorder:i=!0,interactive:a=!0,size:o=`medium`,color:s=`default`,...c}){return r===`card`?(0,y.jsxs)(q,{variant:`filled`,color:s,size:o,interactive:a,noBorder:i,className:n,...c,children:[(0,y.jsx)(`p`,{className:`quote-text`,children:t}),e&&(0,y.jsxs)(`footer`,{className:`quote-cite`,children:[`— `,e]})]}):(0,y.jsxs)(`blockquote`,{className:G(n,r,i,a,o,s),...c,children:[(0,y.jsx)(`p`,{className:`quote-text`,children:t}),e&&(0,y.jsxs)(`footer`,{className:`quote-cite`,children:[`— `,e]})]})}var Y={0:`0`,1:`0.25rem`,2:`0.5rem`,3:`0.75rem`,4:`1rem`,5:`1.25rem`,6:`1.5rem`,8:`2rem`,10:`2.5rem`,12:`3rem`,16:`4rem`,20:`5rem`,24:`6rem`},ee={flex:`flex`,block:`block`,inline:`inline`,"inline-block":`inline-block`,none:`hidden`,grid:`grid`},te={row:`flex-row`,column:`flex-col`,"row-reverse":`flex-row-reverse`,"column-reverse":`flex-col-reverse`},ne={"flex-start":`justify-start`,center:`justify-center`,"flex-end":`justify-end`,"space-between":`justify-between`,"space-around":`justify-around`,"space-evenly":`justify-evenly`},re={"flex-start":`items-start`,center:`items-center`,"flex-end":`items-end`,stretch:`items-stretch`,baseline:`items-baseline`},ie={wrap:`flex-wrap`,nowrap:`flex-nowrap`,"wrap-reverse":`flex-wrap-reverse`};function X(e){return typeof e==`number`?`${e}px`:e}function ae(e){let t=[];if(e.display&&ee[e.display]&&t.push(ee[e.display]),e.flexDirection&&te[e.flexDirection]&&t.push(te[e.flexDirection]),e.justifyContent&&ne[e.justifyContent]&&t.push(ne[e.justifyContent]),e.alignItems&&re[e.alignItems]&&t.push(re[e.alignItems]),e.flexWrap&&ie[e.flexWrap]&&t.push(ie[e.flexWrap]),e.gap!==void 0){let n=e.gap.toString();[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`8`,`10`,`12`,`16`,`20`,`24`].includes(n)&&t.push(`gap-${n}`)}return t}function oe(e){let t={};if(e.p!==void 0&&(t.padding=Y[e.p]||X(e.p)),e.pt!==void 0&&(t.paddingTop=Y[e.pt]||X(e.pt)),e.pr!==void 0&&(t.paddingRight=Y[e.pr]||X(e.pr)),e.pb!==void 0&&(t.paddingBottom=Y[e.pb]||X(e.pb)),e.pl!==void 0&&(t.paddingLeft=Y[e.pl]||X(e.pl)),e.px!==void 0){let n=Y[e.px]||X(e.px);t.paddingLeft=n,t.paddingRight=n}if(e.py!==void 0){let n=Y[e.py]||X(e.py);t.paddingTop=n,t.paddingBottom=n}if(e.m!==void 0&&(t.margin=Y[e.m]||X(e.m)),e.mt!==void 0&&(t.marginTop=Y[e.mt]||X(e.mt)),e.mr!==void 0&&(t.marginRight=Y[e.mr]||X(e.mr)),e.mb!==void 0&&(t.marginBottom=Y[e.mb]||X(e.mb)),e.ml!==void 0&&(t.marginLeft=Y[e.ml]||X(e.ml)),e.mx!==void 0){let n=Y[e.mx]||X(e.mx);t.marginLeft=n,t.marginRight=n}if(e.my!==void 0){let n=Y[e.my]||X(e.my);t.marginTop=n,t.marginBottom=n}return e.display&&(t.display=e.display),e.flexDirection&&(t.flexDirection=e.flexDirection),e.justifyContent&&(t.justifyContent=e.justifyContent),e.alignItems&&(t.alignItems=e.alignItems),e.flexWrap&&(t.flexWrap=e.flexWrap),e.gap!==void 0&&(t.gap=X(e.gap)),e.bgcolor&&(t.backgroundColor=e.bgcolor),e.color&&(t.color=e.color),e.border&&(t.border=e.border),e.borderRadius!==void 0&&(t.borderRadius=typeof e.borderRadius==`number`?`${e.borderRadius}px`:e.borderRadius),e.width!==void 0&&(t.width=X(e.width)),e.height!==void 0&&(t.height=X(e.height)),e.minWidth!==void 0&&(t.minWidth=X(e.minWidth)),e.minHeight!==void 0&&(t.minHeight=X(e.minHeight)),e.maxWidth!==void 0&&(t.maxWidth=X(e.maxWidth)),e.maxHeight!==void 0&&(t.maxHeight=X(e.maxHeight)),t}function se({component:e=`div`,children:t,className:n=``,p:r,pt:i,pr:a,pb:o,pl:s,px:c,py:l,m:u,mt:d,mr:f,mb:p,ml:m,mx:h,my:g,display:_,flexDirection:v,justifyContent:b,alignItems:x,flexWrap:S,gap:C,bgcolor:w,color:T,border:E,borderRadius:D,width:O,height:k,minWidth:A,minHeight:j,maxWidth:M,maxHeight:N,style:P={},...F}){return(0,y.jsx)(e,{className:ae({display:_,flexDirection:v,justifyContent:b,alignItems:x,flexWrap:S,gap:C}).concat(n).filter(Boolean).join(` `),style:{...oe({p:r,pt:i,pr:a,pb:o,pl:s,px:c,py:l,m:u,mt:d,mr:f,mb:p,ml:m,mx:h,my:g,display:_,flexDirection:v,justifyContent:b,alignItems:x,flexWrap:S,gap:C,bgcolor:w,color:T,border:E,borderRadius:D,width:O,height:k,minWidth:A,minHeight:j,maxWidth:M,maxHeight:N}),...P},...F,children:t})}function ce(e,t,n,r){let i=[...e];if(t&&i.length&&i[0].label!==`首页`&&i.unshift({label:`首页`,icon:n,href:`/`}),r>0&&i.length>r){let e=Math.max(1,r-2);i=[...i.slice(0,e),{label:`...`,disabled:!0,isEllipsis:!0},...i.slice(-1)]}return i}function le(e){return`wc-breadcrumb wc-breadcrumb--${e}`}function ue(e,t){let n=[`wc-breadcrumb-item`];return e===t-1&&n.push(`wc-breadcrumb-item--current`),n.join(` `)}function de(e){let t=[`wc-breadcrumb-link`];return e&&t.push(`wc-breadcrumb-link--disabled`),t.join(` `)}function fe(e,t,n,r,i){return t.disabled||t.isEllipsis||n===r-1?(e.preventDefault(),!1):(i&&i(e,t,n),!0)}function pe(e,t,n,r){return e!==t-1&&!n&&!r}function me({items:e=[],separator:n=`/`,variant:r=`default`,showHome:i=!1,homeIcon:a=`🏠`,maxItems:o=0,onItemClick:s}){let c=t.default.useMemo(()=>ce(e,i,a,o),[e,i,a,o]),l=(e,t,n)=>{fe(e,t,n,c.length,s)};return(0,y.jsx)(`nav`,{className:le(r),"aria-label":`面包屑导航`,role:`navigation`,children:(0,y.jsx)(`ol`,{className:`wc-breadcrumb-list`,children:c.map((e,t)=>(0,y.jsxs)(`li`,{className:ue(t,c.length),children:[pe(t,c.length,e.disabled,e.isEllipsis)?e.href?(0,y.jsxs)(`a`,{href:e.href,className:de(e.disabled),onClick:n=>l(n,e,t),children:[e.icon&&(0,y.jsx)(`span`,{className:`wc-breadcrumb-icon`,dangerouslySetInnerHTML:{__html:e.icon}}),e.label]}):(0,y.jsxs)(`button`,{type:`button`,onClick:n=>l(n,e,t),className:de(e.disabled),children:[e.icon&&(0,y.jsx)(`span`,{className:`wc-breadcrumb-icon`,dangerouslySetInnerHTML:{__html:e.icon}}),e.label]}):(0,y.jsxs)(`span`,{className:de(!0),"aria-current":`page`,children:[e.icon&&(0,y.jsx)(`span`,{className:`wc-breadcrumb-icon`,dangerouslySetInnerHTML:{__html:e.icon}}),e.label]}),t<c.length-1&&(0,y.jsx)(`span`,{className:`wc-breadcrumb-separator`,children:n})]},t))})})}var he=[`primary`,`secondary`,`filled`,`outlined`,`text`,`success`,`warning`,`error`,`info`,`purple`,`orange`,`cyan`,`pink`];function ge(e){return he.includes(e)}function _e(e){return ge(e)?e:`primary`}function ve(e){let{variant:t,size:n,disabled:r,loading:i,fullWidth:a,uppercase:o,rounded:s,buttonStyle:c=`filled`}=e,l=[`wc-btn`];return l.push(`wc-btn--style-${c}`),l.push(`wc-btn--${_e(t)}`),l.push(`wc-btn--${n}`),(r||i)&&l.push(`wc-btn--disabled`),i&&l.push(`wc-btn--loading`),a&&l.push(`wc-btn--full-width`),o&&l.push(`wc-btn--uppercase`),s===!1||s===`none`?l.push(`wc-btn--rounded-none`):typeof s==`string`?l.push(`wc-btn--rounded-${s}`):l.push(`wc-btn--rounded`),l}function ye({event:e,disabled:t,loading:n,href:r,target:i,onClick:a}){!t&&!n&&(r&&window.open(r,i),a?.(e))}var be=({children:e,variant:n=`primary`,buttonStyle:r=`filled`,size:i=`md`,disabled:a=!1,loading:o=!1,fullWidth:s=!1,type:c=`button`,href:l=null,target:u=`_self`,startIcon:d=null,endIcon:f=null,rounded:p=!0,uppercase:m=!1,ripple:h=!0,onClick:g,onMouseOver:_,onMouseOut:v,onFocus:b,onBlur:x,className:S=``,style:C={},...w})=>{let[T,E]=(0,t.useState)(!1),[D,O]=(0,t.useState)(!1),k=ve({variant:n,buttonStyle:r,size:i,disabled:a,loading:o,fullWidth:s,uppercase:m,rounded:p}).concat(S).filter(Boolean).join(` `),A={...C},j=e=>{ye({event:e,disabled:a,loading:o,href:l,target:u,onClick:g})},M=e=>{E(!0),_?.(e)},N=e=>{E(!1),v?.(e)},P=e=>{O(!0),b?.(e)},F=e=>{O(!1),x?.(e)},I=()=>(0,y.jsx)(`span`,{className:`wc-btn__loading`,children:(0,y.jsxs)(`svg`,{className:`animate-spin h-4 w-4`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,y.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,y.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z`})]})});return(0,y.jsxs)(`button`,{className:k,disabled:a||o,type:c,style:A,onClick:j,onMouseOver:M,onMouseOut:N,onFocus:P,onBlur:F,...w,children:[o&&(0,y.jsx)(I,{}),d&&!o&&(0,y.jsx)(`span`,{className:`wc-btn__start-icon`,children:d}),(0,y.jsx)(`span`,{className:`wc-btn__content ${o?`opacity-0`:``}`,children:e}),f&&!o&&(0,y.jsx)(`span`,{className:`wc-btn__end-icon`,children:f})]})};be.displayName=`Button`;var xe=({children:e,disableSpacing:t=!1,disablePadding:n=!1,justifyContent:r=`flex-start`,className:i=``,...a})=>(0,y.jsx)(`div`,{className:[`wc-card-actions`,`wc-flex`,`wc-items-center`,!n&&`wc-padding-2`,!t&&`wc-gap-2`,{"flex-start":`wc-justify-start`,center:`wc-justify-center`,"flex-end":`wc-justify-end`,"space-between":`wc-justify-between`,"space-around":`wc-justify-around`}[r],i].filter(Boolean).join(` `),...a,children:e});xe.displayName=`CardActions`;var Se=({children:e,disablePadding:t=!1,padding:n=`normal`,className:r=``,...i})=>(0,y.jsx)(`div`,{className:[`wc-card-content`,!t&&{none:``,dense:`wc-padding-dense`,normal:`wc-padding-normal`,comfortable:`wc-padding-comfortable`}[n],r].filter(Boolean).join(` `),...i,children:e});Se.displayName=`CardContent`;var Ce=[`primary`,`secondary`,`success`,`warning`,`error`,`info`],we=[`sm`,`md`,`lg`],Te=({checked:e=!1,onChange:n,indeterminate:r=!1,disabled:i=!1,required:a=!1,size:o=`md`,color:s=`primary`,label:c=``,labelPlacement:l=`end`,value:u=!0,name:d,className:f=``,...p})=>{let m=(0,t.useId)(),[h,g]=(0,t.useState)(!1),_=Ce.includes(s)?s:`primary`,v=we.includes(o)?o:`md`,b=[`wc-checkbox`,`wc-checkbox--${v}`,(e||r)&&(r?`wc-checkbox--indeterminate`:`wc-checkbox--checked`),i&&`wc-checkbox--disabled`,h&&`wc-checkbox--focused`,l===`start`?`wc-checkbox--label-start`:`wc-checkbox--label-end`,f].filter(Boolean).join(` `),x=[`wc-checkbox__checkmark`,`wc-checkbox__checkmark--${_}`,`wc-checkbox__checkmark--${v}`,(e||r)&&`wc-checkbox__checkmark--checked`,r&&`wc-checkbox__checkmark--indeterminate`].filter(Boolean).join(` `),S=e=>{if(i)return;let t=e.target.checked;n?.({target:{name:d,value:u,checked:t},preventDefault:()=>{},stopPropagation:()=>{}})},C=r?(0,y.jsx)(`div`,{className:`indeterminate-icon`}):e?(0,y.jsx)(`svg`,{className:`checkmark-icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`3`,children:(0,y.jsx)(`polyline`,{points:`20,6 9,17 4,12`})}):null,w=c?(0,y.jsx)(`span`,{className:`checkbox-label`,children:c}):null;return(0,y.jsxs)(`label`,{className:b,htmlFor:m,children:[l===`start`&&w,(0,y.jsx)(`input`,{id:m,type:`checkbox`,className:`wc-checkbox__input`,checked:e,disabled:i,required:a,value:u,name:d,"aria-checked":r?`mixed`:e,"aria-disabled":i,"aria-required":a,onChange:S,onFocus:()=>g(!0),onBlur:()=>g(!1),ref:e=>{e&&(e.indeterminate=r)},...p}),(0,y.jsx)(`span`,{className:x,children:C}),l===`end`&&w]})};Te.displayName=`Checkbox`;function Ee(e){let{size:t=`md`,variant:n=`filled`,color:r=`default`,clickable:i=!1,disabled:a=!1,className:o=``}=e,s=[`wc-chip`];return s.push(`wc-chip--${t}`),s.push(`wc-chip--${n}`),s.push(`wc-chip--${r}`),i&&!a&&s.push(`wc-chip--clickable`),a&&s.push(`wc-chip--disabled`),o&&s.push(o),s.filter(Boolean).join(` `)}function De(e,t,n,r){t&&!n&&r&&r(e)}function Oe(e,t,n){e.stopPropagation(),!t&&n&&n(e)}function ke(){return`M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z`}function Ae(){return(0,y.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 20 20`,fill:`currentColor`,className:`w-4 h-4`,children:(0,y.jsx)(`path`,{fillRule:`evenodd`,d:ke(),clipRule:`evenodd`})})}function je({label:e=``,avatar:t=``,deletable:n=!1,disabled:r=!1,clickable:i=!1,variant:a=`filled`,size:o=`md`,color:s=`default`,deleteIcon:c=null,onClick:l,onDelete:u,children:d}){let f=Ee({size:o,variant:a,color:s,clickable:i,disabled:r});return(0,y.jsxs)(`div`,{className:f,onClick:e=>{De(e,i,r,l)},children:[d&&d.avatar||t?(0,y.jsx)(`div`,{className:`wc-chip-avatar`,children:d&&d.avatar?d.avatar:(0,y.jsx)(`img`,{src:t,alt:``,className:`w-full h-full object-cover rounded-full`})}):null,(0,y.jsx)(`span`,{className:`wc-chip-label`,children:d?.label||e}),n&&(0,y.jsx)(`button`,{type:`button`,onClick:e=>{Oe(e,r,u)},className:`wc-chip-delete`,"aria-label":`删除`,children:c||Ae()})]})}function Me(e,t){let n=typeof e==`string`?parseInt(e,10):e,r=n/2,i=(n-t)/2;return{sizeNumber:n,center:r,radius:i,circumference:2*Math.PI*i}}function Ne(e,t,n){return e===`determinate`?n-t/100*n:0}function Pe(e){let{color:t=`primary`,variant:n=`indeterminate`,overlay:r=!1,centered:i=!1,inline:a=!1,className:o=``}=e,s=[`wc-circular-progress`,`inline-flex`,`relative`,`items-center`,`justify-center`];return s.push(`wc-circular-progress--${t}`),n===`indeterminate`&&s.push(`wc-circular-progress--indeterminate`),r&&s.push(`wc-circular-progress--overlay`),i&&s.push(`wc-circular-progress--centered`),a&&s.push(`wc-circular-progress--inline`),o&&s.push(o),s.filter(Boolean)}function Fe(e){let t=[`wc-circular-progress-circle`];return e===`indeterminate`&&t.push(`wc-circular-progress-circle--indeterminate`),t.filter(Boolean)}function Ie(e){return Math.round(e)}function Le(e){let{value:t=0,variant:n}=e,r={role:`progressbar`,"aria-valuemin":0,"aria-valuemax":100};return n===`determinate`&&(r[`aria-valuenow`]=t),r}function Re({value:e=0,size:t=40,thickness:n=3.6,variant:r=`indeterminate`,color:i=`primary`,showValue:a=!1,overlay:o=!1,centered:s=!1,inline:c=!1,className:l=``,...u}){let{sizeNumber:d,center:f,radius:p,circumference:m}=Me(t,n),h=Ne(r,e,m),g=Pe({color:i,variant:r,overlay:o,centered:s,inline:c,className:l}).join(` `),_=Fe(r).join(` `);return(0,y.jsxs)(`div`,{className:g,...Le({value:e,variant:r}),...u,children:[(0,y.jsxs)(`svg`,{width:d,height:d,viewBox:`0 0 ${d} ${d}`,className:`wc-circular-progress-svg`,children:[(0,y.jsx)(`circle`,{cx:f,cy:f,r:p,strokeWidth:n,stroke:`currentColor`,fill:`none`,className:`wc-circular-progress-bg`}),(0,y.jsx)(`circle`,{cx:f,cy:f,r:p,strokeWidth:n,stroke:`currentColor`,fill:`none`,strokeDasharray:m,strokeDashoffset:h,className:_})]}),a&&(0,y.jsxs)(`div`,{className:`wc-circular-progress-value`,children:[Ie(e),`%`]})]})}function ze(e){let{size:t=`md`,shape:n=`circle`,disabled:r=!1,className:i=``}=e,a=[`wc-color-picker`];return a.push(`wc-color-picker--${t}`),a.push(`wc-color-picker--${n}`),r&&a.push(`wc-color-picker--disabled`),i&&a.push(i),a.filter(Boolean)}function Be(e,t,n){!t&&n&&n(e.target.value)}function Ve(e){return{backgroundColor:e}}function He({value:e=`#ffffff`,onChange:t,size:n=`md`,shape:r=`circle`,disabled:i=!1,className:a=``}){let o=e??``,s=ze({size:n,shape:r,disabled:i,className:a}).join(` `),c=Ve(o);return(0,y.jsxs)(`label`,{className:s,children:[(0,y.jsx)(`input`,{type:`color`,value:o,onChange:e=>{Be(e,i,t)},disabled:i,className:`wc-color-picker__input`}),(0,y.jsx)(`span`,{className:`wc-color-picker__preview`,style:c})]})}var Ue={xs:`max-w-xs`,sm:`max-w-sm`,md:`max-w-md`,lg:`max-w-4xl`,xl:`max-w-6xl`,"2xl":`max-w-7xl`};function We(e){let{maxWidth:t=`lg`,fluid:n=!1,fixed:r=!1,className:i=``}=e,a=[`mx-auto px-4 sm:px-6 lg:px-8`];return n||r?a.push(`w-full`):t&&Ue[t]&&a.push(Ue[t]),i&&a.push(i),a.filter(Boolean)}function Ge({maxWidth:e=`lg`,fluid:t=!1,fixed:n=!1,className:r=``,children:i}){return(0,y.jsx)(`div`,{className:We({maxWidth:e,fluid:t,fixed:n,className:r}).join(` `),children:i})}function Ke(e){let{variant:t=`default`,size:n=`md`,copied:r=!1,copyError:i=!1,className:a=``}=e,o=[`wc-copy`];return o.push(`wc-copy--${t}`),o.push(`wc-copy--${n}`),r&&o.push(`wc-copy--copied`),i&&o.push(`wc-copy--error`),a&&o.push(a),o.filter(Boolean)}function qe(e,t){return t?`❌`:e?`✓`:`📋`}function Je(e,t,n,r){return t?`错误`:e?r:n}function Ye(e,t,n,r){return t?r:e?n:``}async function Xe(e){try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0;{let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.left=`-999999px`,t.style.top=`-999999px`,document.body.appendChild(t),t.focus(),t.select();let n=document.execCommand(`copy`);return document.body.removeChild(t),n}}catch(e){return console.warn(`复制失败:`,e),!1}}async function Ze(e,t,n,r,i,a,o,s){await Xe(e)?(r(!0),i(!1),t(e)):(r(!1),i(!0),n(Error(`复制失败`))),o&&a&&(a(!0),setTimeout(()=>a(!1),1500)),setTimeout(()=>{r(!1),i(!1)},s)}function Qe(e,t){let n=`wc-copy-tooltip`;return e&&(n+=` wc-copy-tooltip--success`),t&&(n+=` wc-copy-tooltip--error`),n}function $e({text:e,variant:n=`default`,size:r=`md`,showLabel:i=!0,showTooltip:a=!0,copyLabel:o=`复制`,copiedLabel:s=`已复制`,tooltipSuccess:c=`复制成功!`,tooltipError:l=`复制失败`,resetDelay:u=2e3,onCopy:d=()=>{},onError:f=()=>{},className:p=``,children:m,icon:h}){let[g,_]=(0,t.useState)(!1),[v,b]=(0,t.useState)(!1),[x,S]=(0,t.useState)(!1),C=Ke({variant:n,size:r,copied:g,copyError:v,className:p}).join(` `),w=qe(g,v),T=Je(g,v,o,s),E=Ye(g,v,c,l),D=Qe(g,v);return(0,y.jsxs)(`div`,{className:C,onClick:async()=>{await Ze(e,d,f,_,b,S,a,u)},children:[m??(0,y.jsx)(`span`,{className:`wc-copy-text`,children:e}),(0,y.jsxs)(`div`,{className:`wc-copy-action`,children:[h?(0,y.jsx)(h,{className:`wc-copy-icon`}):(0,y.jsx)(`span`,{className:`wc-copy-icon`,dangerouslySetInnerHTML:{__html:w}}),i&&(0,y.jsx)(`span`,{className:`wc-copy-label`,children:T})]}),a&&x&&(0,y.jsx)(`div`,{className:D,children:E})]})}function et(e,t=`YYYY-MM-DD`){if(!e||!(e instanceof Date))return``;let n=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,`0`),i=String(e.getDate()).padStart(2,`0`);return t.replace(`YYYY`,n).replace(`MM`,r).replace(`DD`,i)}function tt(e){if(!e)return!1;let t=new Date;return e.toDateString()===t.toDateString()}function nt(e,t){return!e||!t?!1:e.toDateString()===t.toDateString()}function rt(e){let t=e.getFullYear(),n=e.getMonth(),r=new Date(t,n,1),i=new Date(t,n+1,0),a=r.getDay(),o=i.getDate(),s=[],c=new Date(t,n-1,0);for(let e=a-1;e>=0;e--)s.push({day:c.getDate()-e,month:`prev`,date:new Date(t,n-1,c.getDate()-e)});for(let e=1;e<=o;e++)s.push({day:e,month:`current`,date:new Date(t,n,e)});let l=42-s.length;for(let e=1;e<=l;e++)s.push({day:e,month:`next`,date:new Date(t,n+1,e)});return s}function it(e=`md`,t=`default`,n=!1,r=!1,i=!1){let a=[`wc-datepicker-wrapper`,`wc-datepicker-wrapper--${e}`,`wc-datepicker-wrapper--${t}`];return n&&a.push(`wc-datepicker-wrapper--disabled`),r&&a.push(`wc-datepicker-wrapper--focused`),i&&a.push(`wc-datepicker-wrapper--open`),a.join(` `)}function at(e,t){let n=[`wc-datepicker-day`];return e.month===`prev`&&n.push(`wc-datepicker-day--prev`),e.month===`next`&&n.push(`wc-datepicker-day--next`),e.month===`current`&&n.push(`wc-datepicker-day--current`),t&&nt(e.date,t)&&n.push(`wc-datepicker-day--selected`),tt(e.date)&&n.push(`wc-datepicker-day--today`),n.join(` `)}function ot({value:e=null,onChange:n=()=>{},placeholder:r=`请选择日期`,disabled:i=!1,size:a=`md`,variant:o=`default`,format:s=`YYYY-MM-DD`,showToday:c=!0,minDate:l=null,maxDate:u=null,className:d=``,...f}){let p=(0,t.useRef)(null),[m,h]=(0,t.useState)(!1),[g,_]=(0,t.useState)(()=>e?new Date(e):new Date),[v,b]=(0,t.useState)(e?new Date(e):null);(0,t.useEffect)(()=>{b(e?new Date(e):null)},[e]),(0,t.useEffect)(()=>{let e=e=>{p.current&&!p.current.contains(e.target)&&h(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[]);let x=v?et(v,s):``,S=()=>{i||h(e=>!e)},C=e=>{_(t=>{let n=new Date(t);return n.setMonth(n.getMonth()+e),n})},w=e=>{if(D(e))return;let t=new Date(e.date);b(t),n(t),h(!1)},T=()=>{let e=new Date;b(e),n(e),h(!1)},E=()=>{b(null),n(null),h(!1)},D=e=>{let{date:t}=e;return!!(l&&t<(l instanceof Date?l:new Date(l))||u&&t>(u instanceof Date?u:new Date(u)))},O=rt(g),k=[`日`,`一`,`二`,`三`,`四`,`五`,`六`],A=`${g.getFullYear()}年${g.getMonth()+1}月`,j=[it(a,o,i,!1,m),d].filter(Boolean).join(` `);return(0,y.jsxs)(`div`,{className:`wc-datepicker`,ref:p,...f,children:[(0,y.jsxs)(`div`,{className:j,onClick:S,children:[(0,y.jsx)(`input`,{type:`text`,className:`wc-datepicker-input`,value:x,placeholder:r,disabled:i,readOnly:!0}),(0,y.jsx)(`span`,{className:`wc-datepicker-icon`,children:`📅`})]}),m&&(0,y.jsxs)(`div`,{className:`wc-datepicker-dropdown`,style:{zIndex:1e3},children:[(0,y.jsxs)(`div`,{className:`wc-datepicker-header`,children:[(0,y.jsx)(`button`,{type:`button`,className:`wc-datepicker-nav`,onClick:()=>C(-1),children:`‹`}),(0,y.jsx)(`span`,{className:`wc-datepicker-title`,children:A}),(0,y.jsx)(`button`,{type:`button`,className:`wc-datepicker-nav`,onClick:()=>C(1),children:`›`})]}),(0,y.jsx)(`div`,{className:`wc-datepicker-weekdays`,children:k.map(e=>(0,y.jsx)(`div`,{className:`wc-datepicker-weekday`,children:e},e))}),(0,y.jsx)(`div`,{className:`wc-datepicker-days`,children:O.map(e=>(0,y.jsx)(`button`,{type:`button`,className:at(e,v),disabled:D(e),onClick:()=>w(e),children:e.day},`${e.month}-${e.day}`))}),c&&(0,y.jsxs)(`div`,{className:`wc-datepicker-footer`,children:[(0,y.jsx)(`button`,{type:`button`,className:`wc-datepicker-today`,onClick:T,children:`今天`}),(0,y.jsx)(`button`,{type:`button`,className:`wc-datepicker-clear`,onClick:E,children:`清除`})]})]})]})}var st=({variant:e=`circular`,size:n=`md`,color:r=`primary`,disabled:i=!1,label:a=``,icon:o=``,children:s,onClick:c,onFocus:l,onBlur:u,className:d=``,style:f={},...p})=>{let[m,h]=(0,t.useState)(!1),g=[`circular`,`extended`],_=[`sm`,`md`,`lg`],v=[`primary`,`secondary`,`inherit`];g.includes(e)||console.warn(`Invalid variant "${e}" for Fab component. Valid variants are: ${g.join(`, `)}`),_.includes(n)||console.warn(`Invalid size "${n}" for Fab component. Valid sizes are: ${_.join(`, `)}`),v.includes(r)||console.warn(`Invalid color "${r}" for Fab component. Valid colors are: ${v.join(`, `)}`);let b=[`wc-fab`,`wc-fab--${e}`,`wc-fab--${n}`,`wc-fab--${r}`,i&&`wc-fab--disabled`,m&&`wc-fab--focused`,d].filter(Boolean).join(` `);return(0,y.jsxs)(`button`,{className:b,disabled:i,onClick:e=>{!i&&c&&c(e)},onFocus:e=>{h(!0),l?.(e)},onBlur:e=>{h(!1),u?.(e)},style:f,...p,children:[(o||s)&&(0,y.jsx)(`span`,{className:`fab-icon`,children:o?(0,y.jsx)(`span`,{dangerouslySetInnerHTML:{__html:o}}):s}),e===`extended`&&a&&(0,y.jsx)(`span`,{className:`fab-label`,children:a})]})};st.displayName=`Fab`;var ct=({item:e,showAvatar:t=!0,variant:n=`timeline`,color:r=`var(--wc-primary-500)`,dotSize:i=12,lineWidth:a=2,onItemClick:o})=>{let s=Array.isArray(e.children)&&e.children.length,c=typeof i==`number`?`${i}px`:i,l=typeof a==`number`?`${a}px`:a,u={"--feed-color":r,"--feed-dot-size":c,"--feed-line-width":l};return(0,y.jsxs)(`li`,{className:`wc-feed-item ${n} ${s?`has-children`:``}`,style:u,onClick:()=>o&&o(e),children:[t&&e.avatar&&(0,y.jsx)(`div`,{className:`wc-feed-avatar`,children:(0,y.jsx)(`img`,{src:e.avatar,alt:`avatar`})}),(0,y.jsxs)(`div`,{className:`wc-feed-content`,children:[(0,y.jsxs)(`div`,{className:`wc-feed-header`,children:[(0,y.jsx)(`strong`,{className:`wc-feed-author`,children:e.author}),(0,y.jsx)(`span`,{className:`wc-feed-time`,children:e.time})]}),(0,y.jsx)(`p`,{className:`wc-feed-text`,children:e.text}),s&&(0,y.jsx)(`ul`,{className:`wc-feed-children`,children:e.children.map(e=>(0,y.jsx)(ct,{item:e,showAvatar:t,variant:n,color:r,dotSize:i,lineWidth:a,onItemClick:o},e.id||e.time))})]})]})},lt=({items:e=[],variant:t=`timeline`,showAvatar:n=!0,color:r=`var(--wc-primary-500)`,dotSize:i=12,lineWidth:a=2,onItemClick:o,className:s=``})=>{let c=typeof a==`number`?`${a}px`:a,l={"--feed-color":r,"--feed-line-width":c};return(0,y.jsx)(`ul`,{className:`wc-feed-list ${t} ${s}`,style:l,children:e.map(e=>(0,y.jsx)(ct,{item:e,variant:t,showAvatar:n,color:r,dotSize:i,lineWidth:a,onItemClick:o},e.id||e.time))})};lt.displayName=`Feed`;var ut=({align:e,size:t,background:n,reverse:r,vertical:i,clickable:a,disabled:o,className:s,isDarkMode:c})=>[`wc-feature-card`,a&&`wc-feature-card--clickable`,o&&`wc-feature-card--disabled`,r&&`wc-feature-card--reverse`,i&&`wc-feature-card--vertical`,`wc-feature-card--${t}`,`wc-feature-card--${n}`,`wc-feature-card--${e}`,s,c&&`dark`].filter(Boolean);function dt(e,t){return[`wc-feature-icon`,`wc-feature-icon--${e}`,t&&`dark`].filter(Boolean)}function ft(e,t){return[`wc-feature-content`,`wc-feature-content--${e}`,t&&`dark`].filter(Boolean)}function pt(e,t){return[`wc-feature-title`,`wc-feature-title--${e}`,t&&`dark`].filter(Boolean)}var mt=(e,t)=>[`wc-feature-description`,`wc-feature-description--${e}`,t&&`dark`].filter(Boolean);function ht(e,t,n){!t&&n&&n(e)}function gt(e,t){e.stopPropagation(),t&&t(e)}function _t(e){return e}var vt=({title:e=`Awesome Feature`,description:t=`Feature description goes here.`,icon:n=``,iconSize:r=48,size:i=`md`,align:a=`left`,background:o=`default`,bgColor:s=``,reverse:c=!1,vertical:l=!1,ctaLabel:u=``,ctaHref:d=`#`,onClick:f,onCtaClick:p,children:m,className:h=``,style:g={},isDarkMode:_=!1})=>{let v=ut({align:a,size:i,background:o,reverse:c,vertical:l,clickable:!!f,disabled:!1,className:h}).join(` `),b=dt(r).join(` `),x=ft(a).join(` `),S=pt(i).join(` `),C=mt(i).join(` `),w={...s?{background:s}:{},...g};return(0,y.jsxs)(`div`,{className:`${v} ${_?`dark`:``}`,style:w,onClick:e=>ht(e,!1,f),children:[n&&(0,y.jsx)(`div`,{className:b,children:typeof n==`string`?(0,y.jsx)(`span`,{className:`wc-feature-icon__inner`,dangerouslySetInnerHTML:{__html:n}}):_t(n)}),(0,y.jsxs)(`div`,{className:x,children:[(0,y.jsx)(`h3`,{className:S,children:e}),(0,y.jsx)(`p`,{className:C,children:m||t}),u&&(0,y.jsx)(`a`,{href:d,className:`wc-feature-cta`,onClick:e=>gt(e,p),children:u})]})]})};vt.displayName=`Feature`;var yt=({multiple:e=!1,variant:n=`block`,accept:r=``,label:i=`选择文件`,onChange:a,onInvalid:o,className:s=``,style:c={}})=>{let l=(0,t.useRef)(null),u=e=>{if(!r)return!0;let t=r.split(`,`).map(e=>e.trim()),n=[...e].filter(e=>!t.some(t=>t.startsWith(`.`)?e.name.endsWith(t):e.type===t));return n.length?(o&&o(n),!1):!0},d=e=>{let t=e.target.files;u(t)&&a&&a(t)},f=e=>{e.preventDefault();let t=e.dataTransfer.files;u(t)&&a&&a(t)},p=()=>{l.current?.click()},m=()=>{switch(n){case`button`:return(0,y.jsx)(`span`,{className:`wc-file-button`,children:i});case`icon`:return(0,y.jsx)(`span`,{className:`wc-file-icon`,children:`⬆️`});default:return(0,y.jsx)(`strong`,{className:`wc-file-input-content__title`,children:i})}};return(0,y.jsxs)(`label`,{className:`wc-file-input-wrapper variant-${n} ${s}`,onDragOver:e=>e.preventDefault(),onDrop:f,onClick:n===`block`?void 0:p,children:[(0,y.jsx)(`input`,{ref:l,type:`file`,multiple:e,accept:r,style:{display:`none`},onChange:d}),n===`block`?(0,y.jsx)(`div`,{className:`wc-file-input-content`,children:m()}):m()]})};yt.displayName=`FileInput`;var bt=(0,t.createContext)(null),xt=({disabled:e=!1,error:n=!1,required:r=!1,variant:i=`outlined`,size:a=`md`,fullWidth:o=!1,margin:s=`normal`,className:c=``,style:l={},children:u,...d})=>{let f=(0,t.useMemo)(()=>({disabled:e,error:n,required:r,variant:i,size:a}),[e,n,r,i,a]),p=[`form-control`,o&&`form-control--full-width`,s===`dense`&&`form-control--margin-dense`,s===`normal`&&`form-control--margin-normal`,e&&`form-control--disabled`,n&&`form-control--error`,c].filter(Boolean).join(` `);return(0,y.jsx)(bt.Provider,{value:f,children:(0,y.jsx)(`div`,{className:p,style:l,...d,children:u})})};xt.displayName=`FormControl`;var St=({label:e,labelPlacement:t=`end`,disabled:n=!1,required:r=!1,checked:i,value:a,className:o=``,style:s={},onChange:c,children:l,...u})=>{let d=e=>{n||c?.(e)},f=[`form-control-label`,t===`start`&&`form-control-label--placement-start`,t===`end`&&`form-control-label--placement-end`,t===`top`&&`form-control-label--placement-top`,t===`bottom`&&`form-control-label--placement-bottom`,n&&`form-control-label--disabled`,o].filter(Boolean).join(` `),p=[`form-control-label__text`,n&&`form-control-label__text--disabled`].filter(Boolean).join(` `);return(0,y.jsxs)(`label`,{className:f,onClick:d,style:s,...u,children:[t===`start`&&(0,y.jsxs)(`span`,{className:p,children:[e,r&&(0,y.jsx)(`span`,{className:`form-control-label__required`,children:`*`})]}),(0,y.jsx)(`span`,{className:`form-control-label__control`,children:l}),t!==`start`&&(0,y.jsxs)(`span`,{className:p,children:[e,r&&(0,y.jsx)(`span`,{className:`form-control-label__required`,children:`*`})]})]})};St.displayName=`FormControlLabel`;var Ct=({row:e=!1,spacing:t=`normal`,className:n=``,style:r={},children:i,...a})=>(0,y.jsx)(`div`,{className:[`form-group`,e&&`form-group--row`,t===`compact`&&`form-group--spacing-compact`,t===`comfortable`&&`form-group--spacing-comfortable`,n].filter(Boolean).join(` `),style:r,...a,children:i});Ct.displayName=`FormGroup`;var wt=({disabled:e=!1,error:n=!1,filled:r=!1,focused:i=!1,margin:a=`normal`,required:o=!1,variant:s=`outlined`,id:c,size:l=`md`,className:u=``,style:d={},children:f,...p})=>{let m=(0,t.useContext)(bt)||{},h=n||m.error,g=e||m.disabled;return(0,y.jsx)(`p`,{id:c,className:[`form-helper-text`,l===`sm`&&`form-helper-text--size-sm`,l===`lg`&&`form-helper-text--size-lg`,a===`dense`&&`form-helper-text--margin-dense`,a===`normal`&&`form-helper-text--margin-normal`,h&&`form-helper-text--error`,g&&`form-helper-text--disabled`,i&&`form-helper-text--focused`,u].filter(Boolean).join(` `),style:d,...p,children:f})};wt.displayName=`FormHelperText`;var Tt=({container:e=!1,item:t=!1,xs:n,sm:r,md:i,lg:a,xl:o,spacing:s=0,direction:c=`row`,justifyContent:l=`flex-start`,alignItems:u=`stretch`,className:d=``,style:f={},children:p,...m})=>{let h=[];if(e&&(h.push(`flex`,`flex-wrap`),h.push({row:`flex-row`,column:`flex-col`,"row-reverse":`flex-row-reverse`,"column-reverse":`flex-col-reverse`}[c]),h.push({"flex-start":`justify-start`,center:`justify-center`,"flex-end":`justify-end`,"space-between":`justify-between`,"space-around":`justify-around`,"space-evenly":`justify-evenly`}[l]),h.push({"flex-start":`items-start`,center:`items-center`,"flex-end":`items-end`,stretch:`items-stretch`,baseline:`items-baseline`}[u]),s>0)){let e=s.toString();[`1`,`2`,`3`,`4`,`5`,`6`,`8`,`10`,`12`].includes(e)?h.push(`gap-${e}`):h.push(`gap-${Math.floor(s/4)}`)}return t&&(h.push(`flex-shrink-0`),Object.entries({xs:``,sm:`sm:`,md:`md:`,lg:`lg:`,xl:`xl:`}).forEach(([e,t])=>{let s={xs:n,sm:r,md:i,lg:a,xl:o}[e];if(s!==void 0)if(s===`auto`)h.push(`${t}flex-auto`);else if(s===!0)h.push(`${t}flex-1`);else{let e=Math.round(s/12*100);h.push(`${t}w-${e===100?`full`:e===50?`1/2`:e===25?`1/4`:e===75?`3/4`:`[${e}%]`}`)}})),(0,y.jsx)(`div`,{className:[...h,d].filter(Boolean).join(` `),style:f,...m,children:p})};Tt.displayName=`Grid`;var Et=({triggerText:e=`Hover me`,cardData:n={},variant:r=`default`,size:i=`md`,cardSize:a=`md`,position:o=`top`,delay:s=300,hideDelay:c=100,showArrow:l=!0,disabled:u=!1,onShow:d,onHide:f,onAction:p,className:m=``,style:h={},children:g,card:_,...v})=>{let[b,x]=(0,t.useState)(!1),S=(0,t.useRef)(null),C=(0,t.useRef)(null),w=(0,t.useRef)(null),T=(0,t.useRef)(`hover-card-${Math.random().toString(36).substr(2,9)}`),E=()=>{clearTimeout(S.current),clearTimeout(C.current)},D=()=>{u||(E(),S.current=setTimeout(()=>{x(!0),d?.()},s))},O=()=>{u||(E(),C.current=setTimeout(()=>{x(!1),f?.()},c))};(0,t.useEffect)(()=>()=>E(),[]);let k=e=>{p?.(e),e?.onClick?.()},A=[`hover-card-container`,`hover-card-${r}`,`hover-card-size-${i}`,u&&`hover-card-disabled`,m].filter(Boolean).join(` `),j=[`hover-card-popup`,`hover-card-position-${o}`,`hover-card-card-size-${a}`].join(` `);return(0,y.jsxs)(`div`,{className:A,onMouseEnter:D,onMouseLeave:O,onTouchStart:D,onTouchEnd:O,style:h,...v,children:[(0,y.jsx)(`span`,{className:`hover-card-trigger`,children:g||e}),b&&(0,y.jsxs)(`div`,{ref:w,className:j,style:{zIndex:1e3},role:`tooltip`,"aria-describedby":T.current,children:[l&&(0,y.jsx)(`div`,{className:`hover-card-arrow hover-card-arrow-${o}`}),(0,y.jsx)(`div`,{className:`hover-card-content`,children:_?typeof _==`function`?_(n):_:(0,y.jsxs)(y.Fragment,{children:[n.image&&(0,y.jsx)(`div`,{className:`hover-card-image`,children:(0,y.jsx)(`img`,{src:n.image,alt:n.imageAlt||n.title})}),(0,y.jsxs)(`div`,{className:`hover-card-body`,children:[n.title&&(0,y.jsx)(`h3`,{className:`hover-card-title`,children:n.title}),n.description&&(0,y.jsx)(`p`,{className:`hover-card-description`,children:n.description}),n.meta?.length&&(0,y.jsx)(`div`,{className:`hover-card-meta`,children:n.meta.map((e,t)=>(0,y.jsx)(`span`,{className:`hover-card-meta-item`,children:e},t))}),n.actions?.length&&(0,y.jsx)(`div`,{className:`hover-card-actions`,children:n.actions.map((e,t)=>(0,y.jsx)(`button`,{className:`hover-card-action-btn`,onClick:()=>k(e),children:e.label},t))})]})]})})]})]})};Et.displayName=`HoverCard`;var Dt=l((e=>{var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e&&=e.$$typeof,e){case c:case d:case h:case m:case s:return e;default:return t}}case r:return t}}}function x(e){return b(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=h,e.Memo=m,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return x(e)||b(e)===l},e.isConcurrentMode=x,e.isContextConsumer=function(e){return b(e)===c},e.isContextProvider=function(e){return b(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return b(e)===d},e.isFragment=function(e){return b(e)===i},e.isLazy=function(e){return b(e)===h},e.isMemo=function(e){return b(e)===m},e.isPortal=function(e){return b(e)===r},e.isProfiler=function(e){return b(e)===o},e.isStrictMode=function(e){return b(e)===a},e.isSuspense=function(e){return b(e)===f},e.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},e.typeOf=b})),Ot=l((e=>{process.env.NODE_ENV!==`production`&&(function(){"use strict";var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)}function x(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:var p=e.type;switch(p){case l:case u:case i:case o:case a:case f:return p;default:var g=p&&p.$$typeof;switch(g){case c:case d:case h:case m:case s:return g;default:return t}}case r:return t}}}var S=l,C=u,w=c,T=s,E=n,D=d,O=i,k=h,A=m,j=r,M=o,N=a,P=f,F=!1;function I(e){return F||(F=!0,console.warn(`The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.`)),L(e)||x(e)===l}function L(e){return x(e)===u}function R(e){return x(e)===c}function z(e){return x(e)===s}function B(e){return typeof e==`object`&&!!e&&e.$$typeof===n}function V(e){return x(e)===d}function H(e){return x(e)===i}function U(e){return x(e)===h}function W(e){return x(e)===m}function G(e){return x(e)===r}function K(e){return x(e)===o}function q(e){return x(e)===a}function J(e){return x(e)===f}e.AsyncMode=S,e.ConcurrentMode=C,e.ContextConsumer=w,e.ContextProvider=T,e.Element=E,e.ForwardRef=D,e.Fragment=O,e.Lazy=k,e.Memo=A,e.Portal=j,e.Profiler=M,e.StrictMode=N,e.Suspense=P,e.isAsyncMode=I,e.isConcurrentMode=L,e.isContextConsumer=R,e.isContextProvider=z,e.isElement=B,e.isForwardRef=V,e.isFragment=H,e.isLazy=U,e.isMemo=W,e.isPortal=G,e.isProfiler=K,e.isStrictMode=q,e.isSuspense=J,e.isValidElementType=b,e.typeOf=x})()})),kt=l(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=Dt():t.exports=Ot()})),At=l(((e,t)=>{var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(e==null)throw TypeError(`Object.assign cannot be called with null or undefined`);return Object(e)}function o(){try{if(!Object.assign)return!1;var e=new String(`abc`);if(e[5]=`de`,Object.getOwnPropertyNames(e)[0]===`5`)return!1;for(var t={},n=0;n<10;n++)t[`_`+String.fromCharCode(n)]=n;if(Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(``)!==`0123456789`)return!1;var r={};return`abcdefghijklmnopqrst`.split(``).forEach(function(e){r[e]=e}),Object.keys(Object.assign({},r)).join(``)===`abcdefghijklmnopqrst`}catch{return!1}}t.exports=o()?Object.assign:function(e,t){for(var o,s=a(e),c,l=1;l<arguments.length;l++){for(var u in o=Object(arguments[l]),o)r.call(o,u)&&(s[u]=o[u]);if(n){c=n(o);for(var d=0;d<c.length;d++)i.call(o,c[d])&&(s[c[d]]=o[c[d]])}}return s}})),jt=l(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),Mt=l(((e,t)=>{t.exports=Function.call.bind(Object.prototype.hasOwnProperty)})),Nt=l(((e,t)=>{var n=function(){};if(process.env.NODE_ENV!==`production`){var r=jt(),i={},a=Mt();n=function(e){var t=`Warning: `+e;typeof console<`u`&&console.error(t);try{throw Error(t)}catch{}}}function o(e,t,o,s,c){if(process.env.NODE_ENV!==`production`){for(var l in e)if(a(e,l)){var u;try{if(typeof e[l]!=`function`){var d=Error((s||`React class`)+`: `+o+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name=`Invariant Violation`,d}u=e[l](t,l,s,o,null,r)}catch(e){u=e}if(u&&!(u instanceof Error)&&n((s||`React class`)+`: type specification of `+o+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+`. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).`),u instanceof Error&&!(u.message in i)){i[u.message]=!0;var f=c?c():``;n(`Failed `+o+` type: `+u.message+(f??``))}}}}o.resetWarningCache=function(){process.env.NODE_ENV!==`production`&&(i={})},t.exports=o})),Pt=l(((e,t)=>{var n=kt(),r=At(),i=jt(),a=Mt(),o=Nt(),s=function(){};process.env.NODE_ENV!==`production`&&(s=function(e){var t=`Warning: `+e;typeof console<`u`&&console.error(t);try{throw Error(t)}catch{}});function c(){return null}t.exports=function(e,t){var l=typeof Symbol==`function`&&Symbol.iterator,u=`@@iterator`;function d(e){var t=e&&(l&&e[l]||e[u]);if(typeof t==`function`)return t}var f=`<<anonymous>>`,p={array:_(`array`),bigint:_(`bigint`),bool:_(`boolean`),func:_(`function`),number:_(`number`),object:_(`object`),string:_(`string`),symbol:_(`symbol`),any:v(),arrayOf:y,element:b(),elementType:x(),instanceOf:S,node:E(),objectOf:w,oneOf:C,oneOfType:T,shape:O,exact:k};function m(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}function h(e,t){this.message=e,this.data=t&&typeof t==`object`?t:{},this.stack=``}h.prototype=Error.prototype;function g(e){if(process.env.NODE_ENV!==`production`)var n={},r=0;function a(a,o,c,l,u,d,p){if(l||=f,d||=c,p!==i){if(t){var m=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name=`Invariant Violation`,m}else if(process.env.NODE_ENV!==`production`&&typeof console<`u`){var g=l+`:`+c;!n[g]&&r<3&&(s("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+l+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[g]=!0,r++)}}return o[c]==null?a?o[c]===null?new h(`The `+u+" `"+d+"` is marked as required "+("in `"+l+"`, but its value is `null`.")):new h(`The `+u+" `"+d+"` is marked as required in "+("`"+l+"`, but its value is `undefined`.")):null:e(o,c,l,u,d)}var o=a.bind(null,!1);return o.isRequired=a.bind(null,!0),o}function _(e){function t(t,n,r,i,a,o){var s=t[n];if(M(s)!==e){var c=N(s);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+c+"` supplied to `"+r+"`, expected ")+("`"+e+"`."),{expectedType:e})}return null}return g(t)}function v(){return g(c)}function y(e){function t(t,n,r,a,o){if(typeof e!=`function`)return new h("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s)){var c=M(s);return new h(`Invalid `+a+" `"+o+"` of type "+("`"+c+"` supplied to `"+r+"`, expected an array."))}for(var l=0;l<s.length;l++){var u=e(s,l,r,a,o+`[`+l+`]`,i);if(u instanceof Error)return u}return null}return g(t)}function b(){function t(t,n,r,i,a){var o=t[n];if(!e(o)){var s=M(o);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected a single ReactElement."))}return null}return g(t)}function x(){function e(e,t,r,i,a){var o=e[t];if(!n.isValidElementType(o)){var s=M(o);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected a single ReactElement type."))}return null}return g(e)}function S(e){function t(t,n,r,i,a){if(!(t[n]instanceof e)){var o=e.name||f,s=F(t[n]);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected ")+("instance of `"+o+"`."))}return null}return g(t)}function C(e){if(!Array.isArray(e))return process.env.NODE_ENV!==`production`&&(arguments.length>1?s(`Invalid arguments supplied to oneOf, expected an array, got `+arguments.length+` arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).`):s(`Invalid argument supplied to oneOf, expected an array.`)),c;function t(t,n,r,i,a){for(var o=t[n],s=0;s<e.length;s++)if(m(o,e[s]))return null;var c=JSON.stringify(e,function(e,t){return N(t)===`symbol`?String(t):t});return new h(`Invalid `+i+" `"+a+"` of value `"+String(o)+"` "+("supplied to `"+r+"`, expected one of "+c+`.`))}return g(t)}function w(e){function t(t,n,r,o,s){if(typeof e!=`function`)return new h("Property `"+s+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var c=t[n],l=M(c);if(l!==`object`)return new h(`Invalid `+o+" `"+s+"` of type "+("`"+l+"` supplied to `"+r+"`, expected an object."));for(var u in c)if(a(c,u)){var d=e(c,u,r,o,s+`.`+u,i);if(d instanceof Error)return d}return null}return g(t)}function T(e){if(!Array.isArray(e))return process.env.NODE_ENV!==`production`&&s(`Invalid argument supplied to oneOfType, expected an instance of array.`),c;for(var t=0;t<e.length;t++){var n=e[t];if(typeof n!=`function`)return s(`Invalid argument supplied to oneOfType. Expected an array of check functions, but received `+P(n)+` at index `+t+`.`),c}function r(t,n,r,o,s){for(var c=[],l=0;l<e.length;l++){var u=e[l],d=u(t,n,r,o,s,i);if(d==null)return null;d.data&&a(d.data,`expectedType`)&&c.push(d.data.expectedType)}var f=c.length>0?`, expected one of type [`+c.join(`, `)+`]`:``;return new h(`Invalid `+o+" `"+s+"` supplied to "+("`"+r+"`"+f+`.`))}return g(r)}function E(){function e(e,t,n,r,i){return A(e[t])?null:new h(`Invalid `+r+" `"+i+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return g(e)}function D(e,t,n,r,i){return new h((e||`React class`)+`: `+t+" type `"+n+`.`+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function O(e){function t(t,n,r,a,o){var s=t[n],c=M(s);if(c!==`object`)return new h(`Invalid `+a+" `"+o+"` of type `"+c+"` "+("supplied to `"+r+"`, expected `object`."));for(var l in e){var u=e[l];if(typeof u!=`function`)return D(r,a,o,l,N(u));var d=u(s,l,r,a,o+`.`+l,i);if(d)return d}return null}return g(t)}function k(e){function t(t,n,o,s,c){var l=t[n],u=M(l);if(u!==`object`)return new h(`Invalid `+s+" `"+c+"` of type `"+u+"` "+("supplied to `"+o+"`, expected `object`."));for(var d in r({},t[n],e)){var f=e[d];if(a(e,d)&&typeof f!=`function`)return D(o,s,c,d,N(f));if(!f)return new h(`Invalid `+s+" `"+c+"` key `"+d+"` supplied to `"+o+`\`.
7
+ Bad object: `+JSON.stringify(t[n],null,` `)+`
8
+ Valid keys: `+JSON.stringify(Object.keys(e),null,` `));var p=f(l,d,o,s,c+`.`+d,i);if(p)return p}return null}return g(t)}function A(t){switch(typeof t){case`number`:case`string`:case`undefined`:return!0;case`boolean`:return!t;case`object`:if(Array.isArray(t))return t.every(A);if(t===null||e(t))return!0;var n=d(t);if(n){var r=n.call(t),i;if(n!==t.entries){for(;!(i=r.next()).done;)if(!A(i.value))return!1}else for(;!(i=r.next()).done;){var a=i.value;if(a&&!A(a[1]))return!1}}else return!1;return!0;default:return!1}}function j(e,t){return e===`symbol`?!0:t?t[`@@toStringTag`]===`Symbol`||typeof Symbol==`function`&&t instanceof Symbol:!1}function M(e){var t=typeof e;return Array.isArray(e)?`array`:e instanceof RegExp?`object`:j(t,e)?`symbol`:t}function N(e){if(e==null)return``+e;var t=M(e);if(t===`object`){if(e instanceof Date)return`date`;if(e instanceof RegExp)return`regexp`}return t}function P(e){var t=N(e);switch(t){case`array`:case`object`:return`an `+t;case`boolean`:case`date`:case`regexp`:return`a `+t;default:return t}}function F(e){return!e.constructor||!e.constructor.name?f:e.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p}})),Ft=l(((e,t)=>{var n=jt();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),Z=d(l(((e,t)=>{if(process.env.NODE_ENV!==`production`){var n=kt();t.exports=Pt()(n.isElement,!0)}else t.exports=Ft()()}))(),1),Q=({className:e,style:t})=>(0,y.jsx)(`span`,{className:e,style:t}),It={lucide:`@zeturn/watercolor-icons-lucide-react`,heroicons:`@zeturn/watercolor-icons-heroicons-react`,tabler:`@zeturn/watercolor-icons-tabler-react`,phosphor:`@zeturn/watercolor-icons-phosphor-react`,feather:`@zeturn/watercolor-icons-feather`},$=e=>{let t=It[e];return t?import(t):Promise.resolve(null)},Lt=(e,n)=>(0,t.lazy)(()=>e().then(e=>({default:n(e||{})})).catch(e=>(console.warn(`[Icon] 动态导入失败,已回退到占位符图标。`,e),{default:Q}))),Rt=(e,t,n)=>{switch(e){case`lucide`:return Lt(()=>$(`lucide`),e=>e.getIcon?.(t)||Q);case`heroicons`:return Lt(()=>$(`heroicons`),e=>e.getIcon?.(t,n)||Q);case`tabler`:return Lt(()=>$(`tabler`),e=>e.getIcon?.(t)||Q);case`phosphor`:return Lt(()=>$(`phosphor`),e=>e.getIcon?.(t)||Q);default:return null}},zt=e=>typeof e==`number`?e:{xs:16,sm:20,md:24,lg:32,xl:48}[e]||parseInt(e)||24,Bt=({library:e=`lucide`,name:n=``,html:r=``,size:i=24,color:a=`currentColor`,strokeWidth:o=2,variant:s=`outline`,className:c=``,children:l,...u})=>{let d=(0,t.useMemo)(()=>{if(!n)return null;try{return Rt(e,n,s)}catch{return console.warn(`Icon "${n}" not found in library "${e}"`),null}},[e,n,s]),f=(0,t.useMemo)(()=>e===`feather`&&n?(0,t.lazy)(async()=>{try{let e=zt(i),{getFeatherSvg:t}=await $(`feather`)||{},r=await t(n,{width:e,height:e,strokeWidth:Number(o)});return{default:({className:e,style:t})=>(0,y.jsx)(`span`,{className:e,style:t,dangerouslySetInnerHTML:{__html:r}})}}catch{return console.warn(`Feather icon "${n}" not found`),{default:()=>(0,y.jsx)(`span`,{})}}}):null,[e,n,i,o]),p=(0,t.useMemo)(()=>e===`html`&&r?r:``,[e,r]),m=(0,t.useMemo)(()=>{let e={};if(a&&a!==`currentColor`&&(e.color=a),i){let t=zt(i);e.width=`${t}px`,e.height=`${t}px`}return e},[a,i]),h=(0,t.useMemo)(()=>{let t={size:zt(i),color:a,...u};return e===`lucide`&&(t.strokeWidth=o),e===`tabler`&&(t.stroke=o),t},[e,i,a,o,u]),g=`wc-icon ${c}`.trim();return f?(0,y.jsx)(t.Suspense,{fallback:(0,y.jsx)(`span`,{className:g,style:m}),children:(0,y.jsx)(f,{className:g,style:m})}):d?(0,y.jsx)(t.Suspense,{fallback:(0,y.jsx)(`span`,{className:g,style:m}),children:(0,y.jsx)(d,{className:g,style:m,...h})}):p?(0,y.jsx)(`span`,{className:g,style:m,dangerouslySetInnerHTML:{__html:p}}):(0,y.jsx)(`span`,{className:g,style:m,children:l})};Bt.propTypes={library:Z.default.oneOf([`lucide`,`heroicons`,`tabler`,`phosphor`,`feather`,`html`]),name:Z.default.string,html:Z.default.string,size:Z.default.oneOfType([Z.default.string,Z.default.number]),color:Z.default.string,strokeWidth:Z.default.oneOfType([Z.default.string,Z.default.number]),variant:Z.default.oneOf([`outline`,`solid`,`mini`]),className:Z.default.string,children:Z.default.node};var Vt=({color:e=`default`,size:n=`md`,edge:r=!1,disabled:i=!1,icon:a=``,children:o,onClick:s,onFocus:c,onBlur:l,className:u=``,style:d={},...f})=>{let[p,m]=(0,t.useState)(!1),h=[`default`,`primary`,`secondary`,`error`,`warning`,`info`,`success`],g=[`sm`,`md`,`lg`],_=[!1,`start`,`end`];h.includes(e)||console.warn(`Invalid color "${e}" for IconButton component. Valid colors are: ${h.join(`, `)}`),g.includes(n)||console.warn(`Invalid size "${n}" for IconButton component. Valid sizes are: ${g.join(`, `)}`),_.includes(r)||console.warn(`Invalid edge "${r}" for IconButton component. Valid edges are: ${_.join(`, `)}`);let v=[`wc-icon-button`,`wc-icon-button--${e}`,`wc-icon-button--${n}`,r&&`wc-icon-button--edge-${r}`,i&&`wc-icon-button--disabled`,p&&`wc-icon-button--focused`,u].filter(Boolean).join(` `);return(0,y.jsx)(`button`,{className:v,disabled:i,onClick:e=>{!i&&s&&s(e)},onFocus:e=>{m(!0),c?.(e)},onBlur:e=>{m(!1),l?.(e)},style:d,...f,children:(0,y.jsx)(`span`,{className:`icon-button-icon`,children:a?(0,y.jsx)(`span`,{dangerouslySetInnerHTML:{__html:a}}):o})})};Vt.displayName=`IconButton`;var Ht=({images:e=[],title:n=``,layout:r=`grid`,size:i=`md`,columns:a=3,gap:o=16,showInfo:s=!0,showCount:c=!0,showDownload:l=!1,showPagination:u=!1,itemsPerPage:d=12,lazyLoad:f=!0,loading:p=!1,className:m=``,style:h={},onSelect:g,onDownload:_,onLightboxOpen:v,onLightboxClose:b,...x})=>{let[S,C]=(0,t.useState)(-1),[w,T]=(0,t.useState)(1),E=u?Math.ceil(e.length/d):1,D={sm:`75%`,md:`66.67%`,lg:`56.25%`,xl:`50%`},O=u?e.slice((w-1)*d,w*d):e,k=t=>{let n=u?(w-1)*d+t:t;C(n);let r=e[n];g?.({index:n,image:r}),v?.({index:n,image:r})},A=e=>{_?.(e);let t=document.createElement(`a`);t.href=e.src,t.download=e.title||`image`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},j=()=>{C(-1),b?.()},M=()=>C(e=>e>0?e-1:e),N=()=>C(t=>t<e.length-1?t+1:t);return(0,t.useEffect)(()=>{let e=e=>{e.key===`Escape`&&j(),S!==-1&&(e.key===`ArrowLeft`&&M(),e.key===`ArrowRight`&&N())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[S]),(0,y.jsxs)(`div`,{className:[`image-gallery`,`gallery-layout-${r}`,`gallery-size-${i}`,p&&`gallery-loading`,m].filter(Boolean).join(` `),style:h,...x,children:[(n||c)&&(0,y.jsxs)(`div`,{className:`gallery-header`,children:[n&&(0,y.jsx)(`h2`,{className:`gallery-title`,children:n}),c&&(0,y.jsxs)(`div`,{className:`gallery-count`,children:[e.length,` 张图片`]})]}),(0,y.jsx)(`div`,{className:`gallery-grid`,style:r===`grid`?{gridTemplateColumns:`repeat(${a},1fr)`,gap:o}:r===`masonry`?{columnCount:a,columnGap:o}:{gap:o},children:O.map((e,t)=>(0,y.jsxs)(`div`,{className:`gallery-item`,onClick:()=>k(t),tabIndex:0,role:`button`,"aria-label":`查看图片 ${t+1}`,children:[(0,y.jsxs)(`div`,{className:`gallery-image-container`,style:{paddingBottom:D[i]},children:[(0,y.jsx)(`img`,{src:e.thumbnail||e.src,alt:e.alt||e.title,className:`gallery-image`,loading:f?`lazy`:`eager`}),(0,y.jsx)(`div`,{className:`gallery-overlay`,children:(0,y.jsxs)(`div`,{className:`gallery-overlay-content`,children:[(0,y.jsx)(`button`,{className:`gallery-action-btn gallery-view-btn`,"aria-label":`在灯箱中查看图片 ${t+1}`,onClick:e=>{e.stopPropagation(),k(t)},children:`👁️`}),l&&(0,y.jsx)(`button`,{className:`gallery-action-btn gallery-download-btn`,"aria-label":`下载图片 ${t+1}`,onClick:t=>{t.stopPropagation(),A(e)},children:`📥`})]})})]}),s&&(e.title||e.description)&&(0,y.jsxs)(`div`,{className:`gallery-info`,children:[e.title&&(0,y.jsx)(`div`,{className:`gallery-info-title`,children:e.title}),e.description&&(0,y.jsx)(`div`,{className:`gallery-info-description`,children:e.description})]})]},e.id||t))}),u&&E>1&&(0,y.jsxs)(`div`,{className:`gallery-pagination`,children:[(0,y.jsx)(`button`,{className:`gallery-page-btn`,disabled:w===1,onClick:()=>T(e=>e-1),children:`上一页`}),(0,y.jsxs)(`span`,{className:`gallery-page-info`,children:[`第 `,w,` 页,共 `,E,` 页`]}),(0,y.jsx)(`button`,{className:`gallery-page-btn`,disabled:w===E,onClick:()=>T(e=>e+1),children:`下一页`})]}),S!==-1&&(0,y.jsx)(`div`,{className:`gallery-lightbox`,onClick:j,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`lightbox-title`,children:(0,y.jsxs)(`div`,{className:`gallery-lightbox-content`,onClick:e=>e.stopPropagation(),children:[(0,y.jsx)(`button`,{className:`gallery-lightbox-close`,onClick:j,children:`✕`}),(0,y.jsx)(`div`,{className:`gallery-lightbox-image-container`,children:(0,y.jsx)(`img`,{src:e[S].src,alt:e[S].alt,className:`gallery-lightbox-image`})}),(e[S].title||e[S].description)&&(0,y.jsxs)(`div`,{className:`gallery-lightbox-info`,children:[e[S].title&&(0,y.jsx)(`h3`,{id:`lightbox-title`,className:`gallery-lightbox-title`,children:e[S].title}),e[S].description&&(0,y.jsx)(`p`,{className:`gallery-lightbox-description`,children:e[S].description})]}),(0,y.jsxs)(`div`,{className:`gallery-lightbox-navigation`,children:[(0,y.jsx)(`button`,{className:`gallery-lightbox-nav gallery-lightbox-prev`,disabled:S===0,"aria-label":`上一张图片`,onClick:M,children:`‹`}),(0,y.jsxs)(`span`,{className:`gallery-lightbox-counter`,children:[S+1,` / `,e.length]}),(0,y.jsx)(`button`,{className:`gallery-lightbox-nav gallery-lightbox-next`,disabled:S===e.length-1,"aria-label":`下一张图片`,onClick:N,children:`›`})]}),l&&(0,y.jsx)(`button`,{className:`gallery-action-btn gallery-download-btn`,onClick:()=>A(e[S]),children:`下载`})]})})]})};Ht.displayName=`ImageGallery`;var Ut=({value:e=``,onChange:n,type:r=`text`,placeholder:i=``,disabled:a=!1,readonly:o=!1,required:s=!1,autoFocus:c=!1,maxLength:l,minLength:u,size:d=`md`,variant:f=`filled`,color:p=`primary`,error:m=!1,helperText:h=``,label:g=``,startAdornment:_=null,endAdornment:v=null,fullWidth:b=!1,multiline:x=!1,rows:S=4,autoComplete:C=`off`,name:w=``,id:T=``,className:E=``,style:D={},onFocus:O,onBlur:k,onKeyDown:A,onKeyUp:j,onKeyPress:M,...N})=>{let[P,F]=(0,t.useState)(!1),[I,L]=(0,t.useState)(!!e),R=(0,t.useRef)(null),z=(0,t.useId)(),B=T||z;return(0,t.useEffect)(()=>{L(!!e)},[e]),(0,t.useEffect)(()=>{c&&R.current&&R.current.focus()},[c]),(0,y.jsxs)(`div`,{className:`wc-input-container`,children:[g&&(0,y.jsxs)(`label`,{htmlFor:B,className:`wc-input-label ${P||I?`wc-input-label--active`:``} ${m?`wc-input-label--error`:``}`,children:[g,s&&(0,y.jsx)(`span`,{className:`wc-input-label__required`,children:`*`})]}),(0,y.jsxs)(`div`,{className:`wc-input-wrapper`,children:[_&&(0,y.jsx)(`div`,{className:`wc-input-adornment wc-input-adornment--start`,children:_}),(0,y.jsx)(x?`textarea`:`input`,{ref:R,className:(()=>{let e=[`wc-input`];return e.push(`wc-input--${d}`),e.push(`wc-input--${f}`),m&&e.push(`wc-input--error`),a&&e.push(`wc-input--disabled`),o&&e.push(`wc-input--readonly`),P&&e.push(`wc-input--focused`),I&&e.push(`wc-input--has-value`),b&&e.push(`wc-input--full-width`),_&&e.push(`wc-input--has-start-adornment`),v&&e.push(`wc-input--has-end-adornment`),e.concat(E).filter(Boolean).join(` `)})(),style:{...D},type:x?void 0:r,value:e,onChange:e=>{let t=e.target.value;L(!!t),n?.(e)},onFocus:e=>{F(!0),O?.(e)},onBlur:e=>{F(!1),k?.(e)},onKeyDown:A,onKeyUp:j,onKeyPress:M,placeholder:i,disabled:a,readOnly:o,required:s,maxLength:l,minLength:u,rows:x?S:void 0,autoComplete:C,name:w,id:B,...N}),v&&(0,y.jsx)(`div`,{className:`wc-input-adornment wc-input-adornment--end`,children:v})]}),(h||m)&&(0,y.jsx)(`div`,{className:`wc-input-helper-text ${m?`wc-input-helper-text--error`:``}`,children:m||h})]})};Ut.displayName=`Input`;var Wt=e=>{let{dense:t=!1,disablePadding:n=!1,variant:r,className:i=``}=e,a=[`list`];return t&&a.push(`list--dense`),n&&a.push(`list--no-padding`),r&&a.push(`list--${r}`),i&&a.push(i),a},Gt=e=>{let{button:t=!1,disabled:n=!1,divider:r=!1,dense:i=!1,selected:a=!1,disableGutters:o=!1,draggable:s=!1,multiselect:c=!1,className:l=``}=e,u=[`list-item`];return t&&u.push(`list-item--button`),n&&u.push(`list-item--disabled`),r&&u.push(`list-item--divider`),i&&u.push(`list-item--dense`),a&&u.push(`list-item--selected`),o&&u.push(`list-item--no-gutters`),s&&u.push(`list-item--draggable`),c&&u.push(`list-item--multiselect`),l&&u.push(l),u},Kt=e=>{let{position:t=`start`,className:n=``}=e,r=[`list-item-icon`];return t&&r.push(`list-item-icon--${t}`),n&&r.push(n),r},qt=e=>{let{inset:t=!1,className:n=``}=e,r=[`list-item-text`];return t&&r.push(`list-item-text--inset`),n&&r.push(n),r},Jt=(0,t.createContext)({dense:!1}),Yt=({children:e,dense:t=!1,disablePadding:n=!1,nav:r=!1,subheader:i=``,className:a=``,...o})=>{let s=Wt({dense:t,disablePadding:n,className:a}).join(` `);return(0,y.jsx)(Jt.Provider,{value:{dense:t},children:(0,y.jsx)(`div`,{role:r?`navigation`:`list`,className:s,...o,children:e})})},Xt=({children:e,button:n=!1,disabled:r=!1,divider:i=!1,selected:a=!1,disableGutters:o=!1,multiselect:s=!1,component:c,className:l=``,...u})=>{let{dense:d}=(0,t.useContext)(Jt)||{dense:!1},f=Gt({button:n,disabled:r,divider:i,dense:d,selected:a,disableGutters:o,multiselect:s,className:l}).join(` `);return(0,y.jsx)(c||(n?`button`:`div`),{role:`listitem`,className:f,disabled:n&&r,...u,children:e})},Zt=({children:e,position:t=`start`,className:n=``,...r})=>(0,y.jsx)(`span`,{className:Kt({position:t,className:n}).join(` `),...r,children:e}),Qt=({primary:e=``,secondary:t=``,inset:n=!1,className:r=``,...i})=>(0,y.jsxs)(`div`,{className:qt({inset:n,className:r}).join(` `),...i,children:[e&&(0,y.jsx)(`p`,{className:`list-item-text-primary`,children:e}),t&&(0,y.jsx)(`p`,{className:`list-item-text-secondary`,children:t})]}),$t=({size:e,variant:t,disabled:n,className:r})=>{let i=[`wc-menu`,`wc-menu--${e}`,`wc-menu--${t}`];return n&&i.push(`wc-menu--disabled`),r&&i.push(r),i},en=(e,t)=>[`wc-menu__menu`,`wc-menu__menu--${e}`,t],tn=({disabled:e})=>[`wc-menu__button`,e?`wc-menu__button--disabled`:``],nn=e=>{let t=[`wc-menu__item`];return e.divider&&t.push(`wc-menu__divider`),e.disabled&&t.push(`wc-menu__item--disabled`),t},rn=e=>[`wc-menu__arrow`,e?`wc-menu__arrow--open`:``],an=(e,t,n,r,i)=>{t||(n(!e),e?i&&i():r&&r())},on=(e,t,n,r,i)=>{e.disabled||e.divider||(n&&n(e,t),r(!1),i&&i())},sn=e=>{let t=t=>{e(t)};return{add:()=>document.addEventListener(`click`,t),remove:()=>document.removeEventListener(`click`,t)}},cn=({items:e=[],triggerText:n=`选择选项`,placement:r=`bottom-start`,size:i=`md`,variant:a=`default`,disabled:o=!1,trigger:s=`click`,illustration:c=``,illustrationAlt:l=`示意图`,cardTitle:u=``,cardDescription:d=``,onSelect:f,onOpen:p,onClose:m,children:h,triggerContent:g,menuContent:_,className:v=``,...b})=>{let[x,S]=(0,t.useState)(!1),C=(0,t.useRef)(null),w=(0,t.useRef)(null),T=$t({size:i,variant:a,disabled:o,className:v}).join(` `),E=en(r,a===`card`?`wc-menu__menu--card`:``).join(` `),D=tn({disabled:o}).join(` `),O=rn(x).join(` `),k=a===`card`?{minWidth:`320px`,maxWidth:`450px`}:{minWidth:`120px`},A=()=>{an(x,o,S,p,m)},j=(e,t)=>{on(e,t,f,S,m)},M=sn(e=>{C.current&&!C.current.contains(e.target)&&(S(!1),m&&m())});return(0,t.useEffect)(()=>(x?M.add():M.remove(),()=>M.remove()),[x]),(0,y.jsxs)(`div`,{className:T,ref:C,...b,style:{backgroundColor:`var(--wc-bg-surface)`,color:`var(--wc-text-primary)`},children:[(0,y.jsx)(`div`,{className:`wc-menu__trigger`,onClick:A,ref:w,children:g||h||(0,y.jsxs)(`button`,{className:D,children:[n,(0,y.jsx)(`span`,{className:O,children:(0,y.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:(0,y.jsx)(`polyline`,{points:`6,9 12,15 18,9`})})})]})}),x&&(0,y.jsx)(`div`,{className:E,style:k,children:_||(a===`card`?(0,y.jsxs)(`div`,{className:`wc-menu__card`,children:[(0,y.jsxs)(`div`,{className:`wc-menu__card-illustration`,children:[c?(0,y.jsx)(`img`,{src:c,alt:l,className:`wc-menu__illustration-image`}):(0,y.jsx)(`div`,{className:`wc-menu__illustration-placeholder`,children:(0,y.jsx)(`span`,{children:`🎨`})}),(u||d)&&(0,y.jsxs)(`div`,{className:`wc-menu__card-info`,children:[u&&(0,y.jsx)(`h4`,{className:`wc-menu__card-title`,children:u}),d&&(0,y.jsx)(`p`,{className:`wc-menu__card-description`,children:d})]})]}),(0,y.jsx)(`div`,{className:`wc-menu__card-list`,children:e.map((e,t)=>e.divider?(0,y.jsx)(`div`,{className:`wc-menu__divider`},e.key||t):(0,y.jsxs)(`div`,{className:nn(e).join(` `),onClick:()=>j(e,t),children:[e.icon&&(0,y.jsx)(`span`,{className:`wc-menu__icon`,children:e.icon}),(0,y.jsx)(`span`,{className:`wc-menu__label`,children:e.label})]},e.key||t))})]}):e.map((e,t)=>e.divider?(0,y.jsx)(`div`,{className:`wc-menu__divider`},e.key||t):(0,y.jsxs)(`div`,{className:nn(e).join(` `),onClick:()=>j(e,t),children:[e.icon&&(0,y.jsx)(`span`,{className:`wc-menu__icon`,children:e.icon}),(0,y.jsx)(`span`,{className:`wc-menu__label`,children:e.label})]},e.key||t)))})]})};cn.displayName=`Menu`;function ln({size:e=`md`,fullWidth:t=!1,fullScreen:n=!1,scroll:r=`paper`,position:i=`center`,className:a=``}={}){let o=[`wc-modal`];return e&&!n&&o.push(`wc-modal--${e}`),n&&o.push(`wc-modal--fullscreen`),t&&!n&&o.push(`wc-modal--full-width`),r===`body`?o.push(`wc-modal--scroll-body`):o.push(`wc-modal--scroll-paper`),i&&i!==`center`&&o.push(`wc-modal--${i}`),a&&o.push(a),o.filter(Boolean).join(` `)}function un({centered:e=!0,position:t=`center`}={}){let n=[`wc-modal-overlay`];return(e||t===`center`)&&n.push(`wc-modal-overlay--centered`),t&&t!==`center`&&n.push(`wc-modal-overlay--${t}`),n.join(` `)}function dn(e,t,n=0){e(!1),t&&(n>0?setTimeout(()=>{t()},n):t())}function fn(e,t,n){e.key===`Escape`&&t&&n()}function pn(e){if(e){let t=e.querySelectorAll(`button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])`);t.length>0?t[0].focus():e.focus()}}function mn(e){if(!e)return()=>{};let t=e.querySelectorAll(`button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])`),n=t[0],r=t[t.length-1],i=e=>{e.key===`Tab`&&(e.shiftKey?document.activeElement===n&&(e.preventDefault(),r?.focus()):document.activeElement===r&&(e.preventDefault(),n?.focus()))};return e.addEventListener(`keydown`,i),()=>{e.removeEventListener(`keydown`,i)}}var hn=({visible:e=!1,open:r=!1,title:i=``,size:a=`md`,maxWidth:o=null,closable:s=!0,showCloseButton:c=!0,maskClosable:l=!0,closeOnOverlay:u=!0,disableBackdropClick:d=!1,disableEscapeKeyDown:f=!1,centered:p=!0,fullWidth:m=!1,fullScreen:h=!1,position:g=`center`,scroll:_=`paper`,lockScroll:v=!0,zIndex:b=1e3,showOverlay:x=!0,className:S=``,onClose:C,children:w,header:T,footer:E,...D})=>{let[O,k]=(0,t.useState)(e||r),A=(0,t.useRef)(null),j=(0,t.useRef)(null),M=(0,t.useRef)(null),N=e||r;(0,t.useEffect)(()=>{k(N)},[N]);let P=ln({size:o||a,fullWidth:m,fullScreen:h,scroll:_,position:g,className:S}),F=un({centered:g===`center`||p,position:g}),I=()=>{dn(k,C)},L=()=>{(l||u)&&!d&&I()},R=e=>{fn(e,s&&!f,I)};if((0,t.useEffect)(()=>{if(O)return j.current=document.activeElement,setTimeout(()=>{A.current&&(pn(A.current),M.current=mn(A.current))},100),document.addEventListener(`keydown`,R),v&&(document.body.style.overflow=`hidden`),()=>{document.removeEventListener(`keydown`,R),M.current&&=(M.current(),null),j.current&&j.current.focus&&j.current.focus(),v&&(document.body.style.overflow=``)}},[O,s,f,v]),!O)return null;let z=s&&c!==!1;return(0,n.createPortal)((0,y.jsxs)(`div`,{className:F,style:{zIndex:b},onClick:L,"data-testid":`modal-overlay`,children:[x&&(0,y.jsx)(`div`,{className:`wc-modal__overlay`}),(0,y.jsxs)(`div`,{ref:A,className:P,onClick:e=>e.stopPropagation(),role:`dialog`,"aria-modal":`true`,"aria-labelledby":i?`modal-title`:void 0,tabIndex:-1,...D,children:[z&&(0,y.jsx)(be,{variant:`text`,size:`sm`,className:`wc-modal__close`,onClick:I,"aria-label":`关闭`,children:`×`}),(i||T)&&(0,y.jsx)(`div`,{className:`wc-modal__header`,children:T||i&&(0,y.jsx)(`h3`,{id:`modal-title`,className:`wc-modal__title`,children:i})}),(0,y.jsx)(`div`,{className:`wc-modal__body`,children:w}),E&&(0,y.jsx)(`div`,{className:`wc-modal__footer`,children:E})]})]}),document.body)};hn.displayName=`Modal`;var gn=({active:e=!0,duration:n=3e3,from:r=0,to:i,locale:a=``,precision:o=0,showSeparator:s=!1,prefix:c=``,suffix:l=``,separator:u=``,formatter:d=null,easing:f=`linear`,onFinish:p,className:m=``,style:h={},...g})=>{let[_,v]=(0,t.useState)(r),[b,x]=(0,t.useState)(!1),S=(0,t.useRef)(null),C=(0,t.useRef)(null),w=t=>{S.current===null&&(S.current=t);let a=Math.min((t-S.current)/n,1);v(r+(i-r)*a),a<1&&e?C.current=requestAnimationFrame(w):(v(i),x(!1),p?.())},T=()=>{E(),S.current=null,e?(x(!0),C.current=requestAnimationFrame(w)):(v(i),x(!1))},E=()=>{C.current&&=(cancelAnimationFrame(C.current),null)};(0,t.useEffect)(()=>(T(),E),[e,r,i,n]);let D=e=>{if(d)return d(e);let t=e.toFixed(o),n=t;if(s||u)if(u){let e=t.split(`.`);e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,u),n=e.join(`.`)}else n=Number(t).toLocaleString(a||void 0,{minimumFractionDigits:o,maximumFractionDigits:o});return`${c}${n}${l}`};return(0,y.jsx)(`span`,{className:[`wc-number-animation`,b?`wc-number-animation--playing`:``,f&&[`ease-in`,`ease-out`,`ease-in-out`].includes(f)?`wc-number-animation--${f}`:``,m].filter(Boolean).join(` `),style:h,...g,children:D(_)})};function _n({value:e=1,onChange:n,total:r,pageSize:i=10,siblingCount:a=1,boundaryCount:o=1,size:s=`md`,className:c=``,...l}){let[u,d]=(0,t.useState)(e);(0,t.useEffect)(()=>{d(e)},[e]);let f=(0,t.useMemo)(()=>Math.max(1,Math.ceil(r/i)),[r,i]),p=(e,t)=>{let n=[];for(let r=e;r<=t;r++)n.push(r);return n},m=(0,t.useMemo)(()=>{if(f<=a*2+3+o*2)return p(1,f).map(e=>({key:e,num:e}));let e=Math.max(u-a,o+2),t=Math.min(u+a,f-o-1),n=e>o+2,r=t<f-o-1,i=[];for(let e=1;e<=o;e++)i.push({key:`b`+e,num:e});n&&i.push({key:`l-ellipsis`,ellipsis:!0});for(let n=e;n<=t;n++)i.push({key:`m`+n,num:n});r&&i.push({key:`r-ellipsis`,ellipsis:!0});for(let e=f-o+1;e<=f;e++)i.push({key:`e`+e,num:e});return i},[u,f,a,o]),h=(0,t.useCallback)(e=>{e<1||e>f||e===u||(d(e),n?.(e))},[u,f,n]);return f<=1?null:(0,y.jsxs)(`nav`,{className:[`pagination`,`wc-pagination`,s===`md`?``:`wc-pagination--${s}`,c].filter(Boolean).join(` `),"aria-label":`分页导航`,...l,children:[(0,y.jsx)(`button`,{className:`page-btn wc-page-btn wc-page-btn--prev wc-page-btn--nav`,disabled:u===1,onClick:()=>h(u-1),"aria-label":`上一页`,children:`‹`}),m.map(e=>e.ellipsis?(0,y.jsx)(`span`,{className:`page-ellipsis`,children:`…`},e.key):(0,y.jsx)(`button`,{className:`page-btn wc-page-btn${e.num===u?` active wc-page-btn--active`:``}`,onClick:()=>h(e.num),children:e.num},e.key)),(0,y.jsx)(`button`,{className:`page-btn wc-page-btn wc-page-btn--next wc-page-btn--nav`,disabled:u===f,onClick:()=>h(u+1),"aria-label":`下一页`,children:`›`})]})}var vn={ELEVATION:`elevation`,OUTLINED:`outlined`},yn={SQUARE:`square`,ROUNDED_SM:`rounded-sm`,ROUNDED_LG:`rounded-lg`,ROUNDED_XL:`rounded-xl`,ROUNDED_2XL:`rounded-2xl`,ROUNDED_FULL:`rounded-full`},bn={SM:`sm`,MD:`md`,LG:`lg`,XL:`xl`},xn={DEFAULT:`default`,PRIMARY:`primary`,SUCCESS:`success`,WARNING:`warning`,ERROR:`error`,INFO:`info`};function Sn(e={}){let{variant:t=vn.ELEVATION,elevation:n=1,square:r=!1,shape:i=null,size:a=null,color:o=xn.DEFAULT,hoverable:s=!1,clickable:c=!1,gradient:l=!1,frosted:u=!1,textured:d=!1,className:f=``}=e,p=[`wc-paper`];if(t===vn.OUTLINED)p.push(`wc-paper--outlined`);else{p.push(`wc-paper--elevation`);let e=Math.max(0,Math.min(24,Math.floor(Number(n)||0)));p.push(`wc-paper--elevation-${e}`)}return r?p.push(`wc-paper--square`):i&&yn[i.toUpperCase()]&&p.push(`wc-paper--${i}`),a&&bn[a.toUpperCase()]&&p.push(`wc-paper--${a}`),o!==xn.DEFAULT&&xn[o.toUpperCase()]&&p.push(`wc-paper--${o}`),s&&p.push(`wc-paper--hoverable`),c&&p.push(`wc-paper--clickable`),l&&p.push(`wc-paper--gradient`),u&&p.push(`wc-paper--frosted`),d&&p.push(`wc-paper--textured`),f&&p.push(f),p.join(` `)}function Cn({variant:e=`elevation`,elevation:t=1,square:n=!1,hoverable:r=!1,clickable:i=!1,color:a=`default`,size:o=null,className:s=``,children:c,onClick:l,onMouseEnter:u,onMouseLeave:d,...f}){let p=Sn({variant:e,elevation:Math.max(0,Math.min(24,Math.floor(Number(t)||0))),square:n,hoverable:r,clickable:i,color:a,size:o,className:s});return(0,y.jsx)(`div`,{className:p,onClick:e=>{i&&l&&l(e)},onMouseEnter:u,onMouseLeave:d,style:{cursor:i?`pointer`:`default`,...f.style},...f,children:c})}function wn({open:e,onOpenChange:r,triggerText:i=`打开弹窗`,trigger:a,placement:o=`bottom`,offset:s=8,children:c,className:l=``}){let[u,d]=(0,t.useState)(!1),f=e!=null,p=(0,t.useRef)(null),m=(0,t.useRef)(null),h=f?e:u,g=e=>{f||d(e),r?.(e)},_=()=>g(!1),v=()=>{g(!h)},b=(0,t.useCallback)(()=>{let e=p.current,t=m.current;if(!e||!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=0,a=0;switch(o){case`top`:i=n.top-r.height-s,a=n.left+(n.width-r.width)/2;break;case`bottom`:i=n.bottom+s,a=n.left+(n.width-r.width)/2;break;case`left`:i=n.top+(n.height-r.height)/2,a=n.left-r.width-s;break;case`right`:i=n.top+(n.height-r.height)/2,a=n.right+s;break;default:break}t.style.top=`${i+window.scrollY}px`,t.style.left=`${a+window.scrollX}px`},[o,s]);(0,t.useEffect)(()=>{},[f,e]),(0,t.useEffect)(()=>(h&&(b(),window.addEventListener(`resize`,b),window.addEventListener(`scroll`,b),document.addEventListener(`mousedown`,x)),()=>{window.removeEventListener(`resize`,b),window.removeEventListener(`scroll`,b),document.removeEventListener(`mousedown`,x)}),[h,b]);let x=e=>{m.current&&!m.current.contains(e.target)&&!p.current.contains(e.target)&&_()},S=a?t.default.cloneElement(a,{ref:p,onClick:v,"aria-expanded":h}):(0,y.jsx)(`button`,{ref:p,className:`wc-popover-trigger`,onClick:v,"aria-expanded":h,children:i});return(0,y.jsxs)(`div`,{className:`wc-popover-container ${l}`.trim(),children:[S,h&&n.default.createPortal((0,y.jsx)(`div`,{ref:m,className:`wc-popover-content wc-popover-content--${o}`.trim(),role:`dialog`,children:c}),document.body)]})}function Tn({plans:e=[],columns:t=3,className:n=``}){let r={gridTemplateColumns:`repeat(${t}, minmax(0,1fr))`};return(0,y.jsx)(`div`,{className:`pricing-grid ${n}`.trim(),style:r,children:e.map(e=>(0,y.jsxs)(`div`,{className:`plan-card${e.popular?` popular`:``}`,children:[(0,y.jsx)(`h3`,{className:`plan-name`,children:e.name}),(0,y.jsx)(`p`,{className:`plan-price`,children:e.price}),(0,y.jsx)(`ul`,{className:`plan-features`,children:e.features?.map(e=>(0,y.jsx)(`li`,{children:e},e))}),(0,y.jsx)(`button`,{className:`plan-btn`,children:e.button||`选择`})]},e.name))})}var En=({value:e=0,label:t=``,showPercent:n=!1,color:r=`primary`,size:i=`md`,animated:a=!1,className:o=``,...s})=>{let c=[`primary`,`success`,`warning`,`error`,`purple`,`orange`,`cyan`,`pink`].includes(r)?r:`primary`,l=Math.max(0,Math.min(100,e)),u=[`wc-progress`,`wc-progress--${i}`],d=[`wc-progress__bar`,`wc-progress__bar--${c}`,a&&`wc-progress__bar--animated`].filter(Boolean).join(` `),f={width:`${l}%`};return(0,y.jsxs)(`div`,{className:`wc-progress-wrapper ${o}`,...s,children:[(t||n)&&(0,y.jsxs)(`div`,{className:`wc-progress-header`,children:[t&&(0,y.jsx)(`label`,{className:`wc-progress-label`,children:t}),n&&(0,y.jsxs)(`span`,{className:`wc-progress-percent`,children:[Math.round(l),`%`]})]}),(0,y.jsx)(`div`,{className:u.join(` `),children:(0,y.jsx)(`div`,{className:d,style:f})})]})};En.displayName=`Progress`;var Dn=(0,t.createContext)(null);function On({value:e,onChange:n,name:r,disabled:i=!1,label:a=``,row:o=!1,required:s=!1,error:c=``,helperText:l=``,size:u=`md`,color:d=`primary`,children:f,className:p=``}){let[m,h]=(0,t.useState)(e),g=e!==void 0,_=g?e:m,v=(0,t.useCallback)(e=>{i||(g||h(e),n?.(e))},[i,g,n]),b=[`wc-radio-group`,p].filter(Boolean).join(` `),x=[`wc-radio-group-content`,o?`flex flex-wrap gap-4`:`space-y-2`].filter(Boolean).join(` `);return(0,y.jsx)(Dn.Provider,{value:{value:_,updateValue:v,name:r,disabled:i,size:u,color:d},children:(0,y.jsxs)(`div`,{className:b,children:[a&&(0,y.jsxs)(`label`,{className:`wc-radio-group-label`,children:[a,s&&(0,y.jsx)(`span`,{className:`text-error-500`,children:`*`})]}),(0,y.jsx)(`div`,{className:x,children:f}),(c||l)&&(0,y.jsx)(`div`,{className:`mt-2`,children:c?(0,y.jsx)(`p`,{className:`text-sm text-error-500`,children:c}):(0,y.jsx)(`p`,{className:`text-sm text-neutral-500`,children:l})})]})})}function kn({value:e,checked:n,onChange:r,label:i,name:a,disabled:o=!1,color:s=`primary`,size:c=`md`,className:l=``,children:u,...d}){let f=(0,t.useContext)(Dn),p=f?f.value===e:n===void 0?void 0:n,m=f?f.name:a,h=f&&f.disabled||o,g=c||f&&f.size||`md`,_=s||f&&f.color||`primary`,[v,b]=(0,t.useState)(!1),x=[`wc-radio`,`wc-radio--${g}`,h&&`wc-radio--disabled`,v&&`wc-radio--focused`,l].filter(Boolean).join(` `),S=[`wc-radio__button`,`wc-radio__button--${_}`,`wc-radio__button--${g}`,p&&`wc-radio__button--checked`].filter(Boolean).join(` `),C=()=>{h||(f?f.updateValue(e):r?.(e))},w=u||i;return(0,y.jsxs)(`label`,{className:x,children:[(0,y.jsx)(`input`,{type:`radio`,className:`wc-radio__input`,name:m,value:e,checked:p,disabled:h,onChange:C,onFocus:()=>b(!0),onBlur:()=>b(!1),...d}),(0,y.jsx)(`span`,{className:S,children:p&&(0,y.jsx)(`span`,{className:`radio-dot`})}),w&&(0,y.jsx)(`span`,{className:`radio-label`,children:w})]})}kn.displayName=`Radio`,On.displayName=`RadioGroup`;var An=({value:e=0,max:n=5,readOnly:r=!1,onChange:i=()=>{},className:a=``,style:o={},...s})=>{let[c,l]=(0,t.useState)(0),[u,d]=(0,t.useState)(e);(0,t.useEffect)(()=>d(e),[e]),(0,t.useEffect)(()=>{if(document.getElementById(`wc-rating-style`))return;let e=document.createElement(`style`);e.id=`wc-rating-style`,e.innerHTML=`
50
9
  .wc-rating{display:inline-flex;gap:4px;}
51
10
  .wc-rating-item{background:none;border:none;cursor:pointer;font-size:1.5rem;line-height:1;padding:0;color:var(--wc-neutral-300);transition:color 0.2s ease;}
52
11
  .wc-rating-item.active{color:var(--wc-warning-500);}
@@ -54,7 +13,7 @@ Valid keys: `+JSON.stringify(Object.keys(N),null," "));var S=se(Y,L,q,Z,H+"."+L
54
13
  .wc-rating-item:disabled{cursor:default;}
55
14
  .dark .wc-rating-item{color:var(--wc-neutral-500);}
56
15
  .dark .wc-rating-item.active{color:var(--wc-warning-400);}
57
- `,document.head.appendChild(h)},[]);const m=h=>{if(s)return;const p=h===u?0:h;o(p),r(p)},v=h=>{s||f(h)},w=[];for(let h=1;h<=t;h++){const p=h<=i||h<=u;w.push(n.jsx("button",{type:"button",className:`wc-rating-item ${p?"active":""}`,onMouseEnter:()=>v(h),onMouseLeave:()=>v(0),onClick:()=>m(h),disabled:s,"aria-checked":h===u,role:"radio",children:p?"★":"☆"},h))}return n.jsx("div",{className:`wc-rating ${a}`,role:"radiogroup","aria-label":"评分组件",style:c,...l,children:w})},ms=({value:e="",onChange:t,options:s=[],placeholder:r="Select an option",label:a="",helperText:c="",error:l=!1,errorMessage:i="",required:f=!1,disabled:u=!1,multiple:o=!1,clearable:m=!1,fullWidth:v=!1,size:w="md",variant:h="filled",color:p="primary",maxHeight:b=200,name:g="",id:k="",className:E="",style:_={},onFocus:x,onBlur:$,onSearch:z,renderOption:R,renderValue:G,...F})=>{const[V,Q]=y.useState(!1),[K,O]=y.useState(!1),D=y.useRef(null),C=y.useRef(null);y.useEffect(()=>{const j=L=>{D.current&&!D.current.contains(L.target)&&(Q(!1),O(!1))};return document.addEventListener("mousedown",j),()=>{document.removeEventListener("mousedown",j)}},[]);const M=o?s.filter(j=>e.includes(j.value)):s.find(j=>j.value===e),ee=()=>{const j={..._};return h==="outlined"?j.borderColor=l?"var(--wc-error-500)":`var(--wc-${p}-500)`:h==="filled"&&(j.backgroundColor="var(--wc-neutral-50)"),j},te=()=>{u||(Q(!V),O(!V))},N=j=>{if(j.disabled)return;let L;if(o){const se=Array.isArray(e)?e:[];se.includes(j.value)?L=se.filter(S=>S!==j.value):L=[...se,j.value]}else L=j.value,Q(!1),O(!1);t==null||t({target:{name:g,value:L}})},P=j=>{j.stopPropagation();const L=o?[]:"";t==null||t({target:{name:g,value:L}})},U=j=>{O(!0),x==null||x(j)},W=j=>{setTimeout(()=>{var L;(L=D.current)!=null&&L.contains(document.activeElement)||(O(!1),$==null||$(j))},100)},q=()=>o&&Array.isArray(M)?M.length===0?n.jsx("span",{className:"wc-select__placeholder",children:r}):n.jsx("div",{className:"wc-select__chips",children:M.map(j=>n.jsx("span",{className:"wc-select__chip",children:G?G(j):j.label||j.value},j.value))}):M?G?G(M):M.label||M.value:n.jsx("span",{className:"wc-select__placeholder",children:r}),Z=()=>{const j=["wc-select__label"];return j.push(`wc-select__label--${w}`),l&&j.push("wc-select__label--error"),(K||M)&&j.push("wc-select__label--active"),j.join(" ")},H=()=>{const j=["wc-select__container"];return j.push(`wc-select__container--${h}`),j.push(`wc-select__container--${w}`),u&&j.push("wc-select__container--disabled"),l&&j.push("wc-select__container--error"),K&&j.push("wc-select__container--focused"),V&&j.push("wc-select__container--open"),j.join(" ")},Y=(j,L)=>{const se=["wc-select__option"];return L&&se.push("wc-select__option--selected"),j.disabled&&se.push("wc-select__option--disabled"),se.join(" ")},J=k||g||`select-${Math.random().toString(36).substr(2,9)}`;return n.jsxs("div",{className:"wc-select",ref:D,children:[a&&n.jsxs("label",{htmlFor:J,className:Z(),children:[a,f&&n.jsx("span",{className:"wc-select__required",children:"*"})]}),n.jsxs("div",{className:H(),children:[n.jsxs("div",{className:"wc-select__control",style:ee(),onClick:te,onFocus:U,onBlur:W,tabIndex:u?-1:0,role:"combobox","aria-expanded":V,"aria-haspopup":"listbox","aria-labelledby":a?`${J}-label`:void 0,children:[n.jsx("div",{className:"wc-select__value",children:q()}),n.jsxs("div",{className:"wc-select__indicators",children:[m&&(M||o&&(e==null?void 0:e.length)>0)&&n.jsx("button",{type:"button",className:"wc-select__clear",onClick:P,tabIndex:-1,children:"×"}),n.jsx("div",{className:`wc-select__arrow${V?" wc-select__arrow--open":""}`,children:"▼"})]})]}),V&&n.jsx("div",{className:"wc-select__dropdown",style:{maxHeight:b},ref:C,children:n.jsx("div",{className:"wc-select__options",role:"listbox",children:s.length===0?n.jsx("div",{className:"wc-select__no-options",children:"没有可选项"}):s.map((j,L)=>{const se=o?Array.isArray(e)&&e.includes(j.value):e===j.value;return n.jsxs("div",{className:Y(j,se),onClick:()=>N(j),role:"option","aria-selected":se,children:[n.jsx("span",{className:"wc-select__option-text",children:R?R(j):j.label||j.value}),se&&n.jsx("svg",{className:"wc-select__option-check",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:n.jsx("polyline",{points:"20,6 9,17 4,12"})})]},j.value||L)})})})]}),(l||c)&&n.jsx("div",{children:l?n.jsx("p",{className:"wc-select__error",children:i||l}):n.jsx("p",{className:"wc-select__helper",children:c})})]})};ms.displayName="Select";const ps={text:"wc-skeleton--text",rectangular:"wc-skeleton--rectangular",rounded:"wc-skeleton--rounded",circular:"wc-skeleton--circular"},ca=({animation:e="pulse",component:t="div",height:s,width:r,variant:a="text",style:c={},className:l="",...i})=>{const f=y.useMemo(()=>{const o=["wc-skeleton",ps[a]||ps.text];return e==="pulse"&&o.push("wc-skeleton--pulse"),e==="wave"&&o.push("wc-skeleton--wave"),o.join(" ")},[e,a]);y.useEffect(()=>{if(!document.getElementById("wc-skeleton-style")){const o=document.createElement("style");o.id="wc-skeleton-style",o.innerHTML=`
16
+ `,document.head.appendChild(e)},[]);let f=e=>{if(r)return;let t=e===u?0:e;d(t),i(t)},p=e=>{r||l(e)},m=[];for(let e=1;e<=n;e++){let t=e<=c||e<=u;m.push((0,y.jsx)(`button`,{type:`button`,className:`wc-rating-item ${t?`active`:``}`,onMouseEnter:()=>p(e),onMouseLeave:()=>p(0),onClick:()=>f(e),disabled:r,"aria-checked":e===u,role:`radio`,children:t?`★`:`☆`},e))}return(0,y.jsx)(`div`,{className:`wc-rating ${a}`,role:`radiogroup`,"aria-label":`评分组件`,style:o,...s,children:m})},jn=({value:e=``,onChange:n,options:r=[],placeholder:i=`Select an option`,label:a=``,helperText:o=``,error:s=!1,errorMessage:c=``,required:l=!1,disabled:u=!1,multiple:d=!1,clearable:f=!1,fullWidth:p=!1,size:m=`md`,variant:h=`filled`,color:g=`primary`,maxHeight:_=200,name:v=``,id:b=``,className:x=``,style:S={},onFocus:C,onBlur:w,onSearch:T,renderOption:E,renderValue:D,...O})=>{let[k,A]=(0,t.useState)(!1),[j,M]=(0,t.useState)(!1),N=(0,t.useRef)(null),P=(0,t.useRef)(null);(0,t.useEffect)(()=>{let e=e=>{N.current&&!N.current.contains(e.target)&&(A(!1),M(!1))};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]);let F=d?r.filter(t=>e.includes(t.value)):r.find(t=>t.value===e),I=()=>{let e={...S};return h===`outlined`?e.borderColor=s?`var(--wc-error-500)`:`var(--wc-${g}-500)`:h===`filled`&&(e.backgroundColor=`var(--wc-neutral-50)`),e},L=()=>{u||(A(!k),M(!k))},R=t=>{if(t.disabled)return;let r;if(d){let n=Array.isArray(e)?e:[];r=n.includes(t.value)?n.filter(e=>e!==t.value):[...n,t.value]}else r=t.value,A(!1),M(!1);n?.({target:{name:v,value:r}})},z=e=>{e.stopPropagation(),n?.({target:{name:v,value:d?[]:``}})},B=e=>{M(!0),C?.(e)},V=e=>{setTimeout(()=>{N.current?.contains(document.activeElement)||(M(!1),w?.(e))},100)},H=()=>d&&Array.isArray(F)?F.length===0?(0,y.jsx)(`span`,{className:`wc-select__placeholder`,children:i}):(0,y.jsx)(`div`,{className:`wc-select__chips`,children:F.map(e=>(0,y.jsx)(`span`,{className:`wc-select__chip`,children:D?D(e):e.label||e.value},e.value))}):F?D?D(F):F.label||F.value:(0,y.jsx)(`span`,{className:`wc-select__placeholder`,children:i}),U=()=>{let e=[`wc-select__label`];return e.push(`wc-select__label--${m}`),s&&e.push(`wc-select__label--error`),(j||F)&&e.push(`wc-select__label--active`),e.join(` `)},W=()=>{let e=[`wc-select__container`];return e.push(`wc-select__container--${h}`),e.push(`wc-select__container--${m}`),u&&e.push(`wc-select__container--disabled`),s&&e.push(`wc-select__container--error`),j&&e.push(`wc-select__container--focused`),k&&e.push(`wc-select__container--open`),e.join(` `)},G=(e,t)=>{let n=[`wc-select__option`];return t&&n.push(`wc-select__option--selected`),e.disabled&&n.push(`wc-select__option--disabled`),n.join(` `)},K=b||v||`select-${Math.random().toString(36).substr(2,9)}`;return(0,y.jsxs)(`div`,{className:`wc-select`,ref:N,children:[a&&(0,y.jsxs)(`label`,{htmlFor:K,className:U(),children:[a,l&&(0,y.jsx)(`span`,{className:`wc-select__required`,children:`*`})]}),(0,y.jsxs)(`div`,{className:W(),children:[(0,y.jsxs)(`div`,{className:`wc-select__control`,style:I(),onClick:L,onFocus:B,onBlur:V,tabIndex:u?-1:0,role:`combobox`,"aria-expanded":k,"aria-haspopup":`listbox`,"aria-labelledby":a?`${K}-label`:void 0,children:[(0,y.jsx)(`div`,{className:`wc-select__value`,children:H()}),(0,y.jsxs)(`div`,{className:`wc-select__indicators`,children:[f&&(F||d&&e?.length>0)&&(0,y.jsx)(`button`,{type:`button`,className:`wc-select__clear`,onClick:z,tabIndex:-1,children:`×`}),(0,y.jsx)(`div`,{className:`wc-select__arrow${k?` wc-select__arrow--open`:``}`,children:`▼`})]})]}),k&&(0,y.jsx)(`div`,{className:`wc-select__dropdown`,style:{maxHeight:_},ref:P,children:(0,y.jsx)(`div`,{className:`wc-select__options`,role:`listbox`,children:r.length===0?(0,y.jsx)(`div`,{className:`wc-select__no-options`,children:`没有可选项`}):r.map((t,n)=>{let r=d?Array.isArray(e)&&e.includes(t.value):e===t.value;return(0,y.jsxs)(`div`,{className:G(t,r),onClick:()=>R(t),role:`option`,"aria-selected":r,children:[(0,y.jsx)(`span`,{className:`wc-select__option-text`,children:E?E(t):t.label||t.value}),r&&(0,y.jsx)(`svg`,{className:`wc-select__option-check`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:(0,y.jsx)(`polyline`,{points:`20,6 9,17 4,12`})})]},t.value||n)})})})]}),(s||o)&&(0,y.jsx)(`div`,{children:s?(0,y.jsx)(`p`,{className:`wc-select__error`,children:c||s}):(0,y.jsx)(`p`,{className:`wc-select__helper`,children:o})})]})};jn.displayName=`Select`;var Mn={text:`wc-skeleton--text`,rectangular:`wc-skeleton--rectangular`,rounded:`wc-skeleton--rounded`,circular:`wc-skeleton--circular`},Nn=({animation:e=`pulse`,component:n=`div`,height:r,width:i,variant:a=`text`,style:o={},className:s=``,...c})=>{let l=(0,t.useMemo)(()=>{let t=[`wc-skeleton`,Mn[a]||Mn.text];return e===`pulse`&&t.push(`wc-skeleton--pulse`),e===`wave`&&t.push(`wc-skeleton--wave`),t.join(` `)},[e,a]);(0,t.useEffect)(()=>{if(!document.getElementById(`wc-skeleton-style`)){let e=document.createElement(`style`);e.id=`wc-skeleton-style`,e.innerHTML=`
58
17
  .wc-skeleton{background-color:var(--wc-neutral-200);display:block;position:relative;overflow:hidden;}
59
18
  .wc-skeleton--text{border-radius:4px;}
60
19
  .wc-skeleton--rectangular{border-radius:4px;}
@@ -65,14 +24,14 @@ Valid keys: `+JSON.stringify(Object.keys(N),null," "));var S=se(Y,L,q,Z,H+"."+L
65
24
  .wc-skeleton--wave::after{content:'';position:absolute;top:0;right:0;bottom:0;left:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,0.4),transparent);animation:wc-skeleton-wave 1.6s linear infinite;}
66
25
  @keyframes wc-skeleton-wave{0%{transform:translateX(-100%);}50%{transform:translateX(100%);}100%{transform:translateX(100%);}}
67
26
  .dark .wc-skeleton{background-color:var(--wc-neutral-700);}
68
- `,document.head.appendChild(o)}},[]);const u={...c};return r!==void 0&&(u.width=typeof r=="number"?`${r}px`:r),s!==void 0&&(u.height=typeof s=="number"?`${s}px`:s),!r&&!s&&(a==="circular"?(u.width="40px",u.height="40px"):a==="text"?(u.width="100%",u.height="16px"):(u.width="100%",u.height="128px")),n.jsx(t,{className:`${f} ${l}`,style:u,role:"status","aria-live":"polite",...i})},la=({value:e,defaultValue:t=0,min:s=0,max:r=100,step:a=1,disabled:c=!1,label:l="",valueLabelDisplay:i="off",onChange:f=()=>{},className:u="",style:o={},...m})=>{const[v,w]=y.useState(e!==void 0?e:t);y.useEffect(()=>{e!==void 0&&w(e)},[e]);const h=g=>{const k=Number(g.target.value);e===void 0&&w(k),f(k)};y.useEffect(()=>{if(document.getElementById("wc-slider-style"))return;const g=document.createElement("style");g.id="wc-slider-style",g.innerHTML=`
27
+ `,document.head.appendChild(e)}},[]);let u={...o};return i!==void 0&&(u.width=typeof i==`number`?`${i}px`:i),r!==void 0&&(u.height=typeof r==`number`?`${r}px`:r),!i&&!r&&(a===`circular`?(u.width=`40px`,u.height=`40px`):a===`text`?(u.width=`100%`,u.height=`16px`):(u.width=`100%`,u.height=`128px`)),(0,y.jsx)(n,{className:`${l} ${s}`,style:u,role:`status`,"aria-live":`polite`,...c})},Pn=({value:e,defaultValue:n=0,min:r=0,max:i=100,step:a=1,disabled:o=!1,label:s=``,valueLabelDisplay:c=`off`,onChange:l=()=>{},className:u=``,style:d={},...f})=>{let[p,m]=(0,t.useState)(e===void 0?n:e);(0,t.useEffect)(()=>{e!==void 0&&m(e)},[e]);let h=t=>{let n=Number(t.target.value);e===void 0&&m(n),l(n)};(0,t.useEffect)(()=>{if(document.getElementById(`wc-slider-style`))return;let e=document.createElement(`style`);e.id=`wc-slider-style`,e.innerHTML=`
69
28
  .wc-slider{display:flex;flex-direction:column;gap:8px;width:100%;}
70
29
  .wc-slider__label{font-size:0.875rem;font-weight:500;color:var(--wc-neutral-700);}
71
30
  .wc-slider__input{appearance:none;width:100%;height:4px;background:var(--wc-neutral-300);border-radius:2px;outline:none;cursor:pointer;}
72
31
  .wc-slider__input::-webkit-slider-thumb{appearance:none;width:20px;height:20px;border-radius:50%;background:var(--wc-primary-500);border:2px solid var(--wc-neutral-0);cursor:pointer;}
73
32
  .wc-slider__input::-moz-range-thumb{width:20px;height:20px;border-radius:50%;background:var(--wc-primary-500);border:2px solid var(--wc-neutral-0);cursor:pointer;}
74
33
  .wc-slider__value{font-size:0.875rem;text-align:center;color:var(--wc-neutral-700);}
75
- `,document.head.appendChild(g)},[]);const p=y.useMemo(()=>(v-s)/(r-s)*100,[v,s,r]),b={background:`linear-gradient(to right, var(--wc-primary-500) 0%, var(--wc-primary-500) ${p}%, var(--wc-neutral-300) ${p}%, var(--wc-neutral-300) 100%)`};return n.jsxs("div",{className:`wc-slider ${u}`,style:o,...m,children:[l&&n.jsx("div",{className:"wc-slider__label",children:l}),n.jsx("input",{type:"range",className:"wc-slider__input",min:s,max:r,step:a,value:v,onChange:h,disabled:c,style:b,"aria-valuemin":s,"aria-valuemax":r,"aria-valuenow":v,role:"slider"}),i!=="off"&&n.jsx("div",{className:"wc-slider__value",children:v})]})},ia=({open:e=!1,onClose:t=()=>{},placement:s="right",width:r=400,children:a,header:c,footer:l})=>(y.useEffect(()=>{if(!e)return;const i=f=>{f.key==="Escape"&&t()};return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[e,t]),typeof document>"u"?null:Be.createPortal(e?n.jsxs("div",{className:"slideover-wrapper",role:"dialog","aria-modal":"true",children:[n.jsx("div",{className:"slideover-overlay",onClick:t}),n.jsxs("div",{className:`slideover-panel slideover-${s}`,style:{width:typeof r=="number"?`${r}px`:r},children:[c&&n.jsx("header",{className:"slideover-header",children:c}),n.jsx("div",{className:"slideover-body",children:a}),l&&n.jsx("footer",{className:"slideover-footer",children:l}),n.jsx("button",{className:"slideover-close",onClick:t,"aria-label":"关闭",children:"✕"})]}),n.jsx("style",{children:`
34
+ `,document.head.appendChild(e)},[]);let g=(0,t.useMemo)(()=>(p-r)/(i-r)*100,[p,r,i]),_={background:`linear-gradient(to right, var(--wc-primary-500) 0%, var(--wc-primary-500) ${g}%, var(--wc-neutral-300) ${g}%, var(--wc-neutral-300) 100%)`};return(0,y.jsxs)(`div`,{className:`wc-slider ${u}`,style:d,...f,children:[s&&(0,y.jsx)(`div`,{className:`wc-slider__label`,children:s}),(0,y.jsx)(`input`,{type:`range`,className:`wc-slider__input`,min:r,max:i,step:a,value:p,onChange:h,disabled:o,style:_,"aria-valuemin":r,"aria-valuemax":i,"aria-valuenow":p,role:`slider`}),c!==`off`&&(0,y.jsx)(`div`,{className:`wc-slider__value`,children:p})]})},Fn=({open:e=!1,onClose:r=()=>{},placement:i=`right`,width:a=400,children:o,header:s,footer:c})=>((0,t.useEffect)(()=>{if(!e)return;let t=e=>{e.key===`Escape`&&r()};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e,r]),typeof document>`u`?null:(0,n.createPortal)(e?(0,y.jsxs)(`div`,{className:`slideover-wrapper`,role:`dialog`,"aria-modal":`true`,children:[(0,y.jsx)(`div`,{className:`slideover-overlay`,onClick:r}),(0,y.jsxs)(`div`,{className:`slideover-panel slideover-${i}`,style:{width:typeof a==`number`?`${a}px`:a},children:[s&&(0,y.jsx)(`header`,{className:`slideover-header`,children:s}),(0,y.jsx)(`div`,{className:`slideover-body`,children:o}),c&&(0,y.jsx)(`footer`,{className:`slideover-footer`,children:c}),(0,y.jsx)(`button`,{className:`slideover-close`,onClick:r,"aria-label":`关闭`,children:`✕`})]}),(0,y.jsx)(`style`,{children:`
76
35
  .slideover-wrapper{position:fixed;inset:0;z-index:3000;display:flex;}
77
36
  .slideover-overlay{flex:1 1 auto;background:rgba(0,0,0,0.4);backdrop-filter:blur(2px);}
78
37
  .slideover-panel{position:relative;background:var(--wc-neutral-0);max-height:100vh;overflow-y:auto;display:flex;flex-direction:column;}
@@ -81,5 +40,5 @@ Valid keys: `+JSON.stringify(Object.keys(N),null," "));var S=se(Y,L,q,Z,H+"."+L
81
40
  .slideover-header,.slideover-footer{padding:16px;border-bottom:1px solid var(--wc-neutral-200);}
82
41
  .slideover-footer{border-top:1px solid var(--wc-neutral-200);border-bottom:none;}
83
42
  .slideover-body{padding:16px;flex:1 1 auto;}
84
- .slideover-enter{opacity:0;transform:translateX(${s==="right"?"100%":"-100%"});}
85
- `})]}):null,document.body)),oa={success:"✓",info:"ℹ",warning:"⚠",error:"✕"};function ua({open:e=!1,modelValue:t=void 0,message:s="",title:r="",severity:a="info",variant:c="filled",autoHideDuration:l=6e3,anchorOrigin:i={vertical:"bottom",horizontal:"left"},action:f="",closable:u=!0,showIcon:o=!0,showProgress:m=!1,onClose:v=()=>{},onUpdateModelValue:w,onAction:h=()=>{},children:p}){const b=t!==void 0,[g,k]=y.useState(b?t:e),[E,_]=y.useState(100);y.useEffect(()=>{const D=b?t:e;k(D),D&&_(100)},[e,t]),y.useEffect(()=>{if(!g||l<=0)return;const D=Date.now(),C=setTimeout(()=>{x()},l);if(m){const M=setInterval(()=>{const ee=Date.now()-D,te=Math.max(0,100-ee/l*100);_(te),te<=0&&clearInterval(M)},50);return()=>{clearTimeout(C),clearInterval(M)}}return()=>clearTimeout(C)},[g,l,m]);const x=()=>{b?w==null||w(!1):k(!1),v()},$=()=>{h()};if(!g)return null;const z=["wc-snackbar",`wc-snackbar--${c}`,`wc-snackbar--${a}`],R={position:"fixed",zIndex:1400},{vertical:G,horizontal:F}=i;G==="top"?R.top="20px":R.bottom="20px",F==="left"?R.left="20px":F==="right"?R.right="20px":(R.left="50%",R.transform="translateX(-50%)");const O=n.jsxs("div",{className:z.join(" "),style:R,role:"alert","aria-live":"assertive","aria-atomic":"true",children:[o&&n.jsx("div",{className:"wc-snackbar__icon",children:oa[a]}),n.jsxs("div",{className:"wc-snackbar__content",children:[r&&n.jsx("div",{className:"wc-snackbar__title",children:r}),p||n.jsx("div",{className:"wc-snackbar__message",children:s})]}),(f||(p==null?void 0:p.action))&&n.jsx("div",{className:"wc-snackbar__actions",children:(p==null?void 0:p.action)||n.jsx("button",{type:"button",className:"wc-snackbar__action",onClick:$,children:f})}),u&&n.jsx("button",{type:"button",className:"wc-snackbar__close","aria-label":"关闭",onClick:x,children:"×"}),m&&l>0&&n.jsx("div",{className:"wc-snackbar__progress",children:n.jsx("div",{className:"wc-snackbar__progress-bar",style:{width:`${E}%`}})})]});return Be.createPortal(O,document.body)}const da=["default","success","error","warning","info","pending","processing","cancelled"],fa=["auto","pulse","spin","bounce","blink","shake","breathe","ripple","glow"],hs={default:{text:"默认",color:"#9ca3af",darkColor:"#6b7280"},success:{text:"成功",color:"#10b981",darkColor:"#059669"},error:{text:"失败",color:"#ef4444",darkColor:"#dc2626"},warning:{text:"警告",color:"#f59e0b",darkColor:"#d97706"},info:{text:"信息",color:"#3b82f6",darkColor:"#2563eb"},pending:{text:"等待中",color:"#8b5cf6",darkColor:"#7c3aed"},processing:{text:"进行中",color:"#06b6d4",darkColor:"#0891b2"},cancelled:{text:"已取消",color:"#64748b",darkColor:"#475569"}};function ma(e){return da.includes(e)}function pa(e){return ma(e)?e:"default"}function ha({status:e,size:t,showText:s,animated:r,animationType:a="auto",className:c}){const l=pa(e),i=["wc-status",`wc-status--${l}`,`wc-status--${t}`];if(s&&i.push("wc-status--with-text"),r){const f=va(l,a);i.push("wc-status--animated",`wc-status--${f}`)}return c&&i.push(c),i.filter(Boolean).join(" ")}function wa(e){var t;return((t=hs[e])==null?void 0:t.text)||hs.default.text}function va(e,t="auto"){return t!=="auto"&&fa.includes(t)?t:{processing:"spin",pending:"pulse",success:"bounce",error:"shake",warning:"blink",info:"ripple",cancelled:"breathe",default:"glow"}[e]||"pulse"}const ws=({status:e="default",size:t="md",showText:s=!1,animated:r=!1,animationType:a="auto",className:c="",...l})=>{const i=ha({status:e,size:t,showText:s,animated:r,animationType:a,className:c}),f=wa(e);return n.jsx("span",{className:i,title:f,...l,children:s&&n.jsx("span",{className:"wc-status__text",children:f})})};ws.displayName="Status";const vs=({checked:e=!1,onChange:t,label:s="",description:r="",disabled:a=!1,required:c=!1,color:l="primary",size:i="md",className:f="",...u})=>{const o=y.useId(),v=["primary","success","warning","error","purple","orange","cyan","pink"].includes(l)?l:"primary",h=["sm","md","lg"].includes(i)?i:"md",p=["wc-switch",`wc-switch--${v}`,h!=="md"&&`wc-switch--${h}`,a&&"wc-switch--disabled",f].filter(Boolean).join(" "),b=g=>{a||!t||t(g.target.checked)};return n.jsxs("div",{className:"wc-switch-wrapper",children:[s&&n.jsxs("label",{id:o,className:"wc-switch__label",children:[s,c&&n.jsx("span",{className:"wc-switch__required",children:"*"})]}),n.jsxs("div",{className:"wc-switch__container",children:[n.jsxs("label",{className:p,"aria-disabled":a,children:[n.jsx("input",{type:"checkbox",className:"wc-switch__input",checked:e,disabled:a,"aria-labelledby":o,role:"switch",onChange:b,...u}),n.jsx("span",{className:"wc-switch__track",children:n.jsx("span",{className:"wc-switch__thumb"})})]}),r&&n.jsx("span",{className:"wc-switch__description",children:r})]})]})};vs.displayName="Switch";const Le=y.createContext({size:"md",dense:!1,hover:!1,striped:!1}),ys=({size:e="md",stickyHeader:t=!1,dense:s=!1,hover:r=!1,striped:a=!1,children:c,className:l="",...i})=>n.jsx("div",{className:`wc-table-container${t?" wc-table-container--sticky":""} ${l}`,...i,children:n.jsx("table",{className:`wc-table wc-table--${e}${r?" wc-table--hover":""}${a?" wc-table--striped":""}${s?" wc-table--dense":""}`,children:n.jsx(Le.Provider,{value:{size:e,dense:s,hover:r,striped:a,stickyHeader:t},children:c})})});ys.displayName="Table";const at=({children:e,className:t="",...s})=>{const{stickyHeader:r}=y.useContext(Le);return n.jsx("thead",{className:`wc-table-head${r?" wc-table-head--sticky":""} ${t}`,...s,children:e})};at.displayName="TableHead";const ct=({children:e,className:t="",...s})=>n.jsx("tbody",{className:`wc-table-body ${t}`,...s,children:e});ct.displayName="TableBody";const lt=({hover:e,selected:t=!1,clickable:s=!1,children:r,className:a="",onClick:c,...l})=>{const i=y.useContext(Le),u=["wc-table-row",(e!==void 0?e:i.hover)||s?"wc-table-row--hover":"",t?"wc-table-row--selected":"",s?"wc-table-row--clickable":"",a].filter(Boolean).join(" ");return n.jsx("tr",{className:u,onClick:s?c:void 0,...l,children:r})};lt.displayName="TableRow";const it=({component:e="td",align:t="inherit",padding:s="normal",size:r,sortDirection:a=!1,variant:c="body",scope:l,children:i,className:f="",...u})=>{const o=y.useContext(Le),m=r||(o.dense?"small":"medium"),v=["wc-table-cell",`wc-table-cell--${c}`,`wc-table-cell--${m}`,`wc-table-cell--padding-${s}`,t!=="inherit"?`wc-table-cell--align-${t}`:"",a?"wc-table-cell--sortable":"",a?`wc-table-cell--sort-${a}`:"",f].filter(Boolean).join(" ");return n.jsx(e,{className:v,scope:e==="th"||c==="head"?l:void 0,...u,children:i})};it.displayName="TableCell";const ya=Object.assign(ys,{Head:at,Body:ct,Row:lt,Cell:it}),bs=({tabs:e=[],activeIndex:t,onChange:s,variant:r="default",children:a,className:c="",...l})=>{const[i,f]=y.useState(t||0),u=t!==void 0,o=u?t:i;y.useEffect(()=>{u&&f(t)},[t,u]);const m=["wc-tabs",r==="pills"&&"wc-tabs--pills",r==="underline"&&"wc-tabs--underline",(r==="default"||!["pills","underline"].includes(r))&&"wc-tabs--default",c].filter(Boolean).join(" "),v=(p,b)=>{const g=["wc-tab"];return o===p&&g.push("wc-tab--active"),b&&g.push("opacity-50 cursor-not-allowed"),g.join(" ")},w=(p,b)=>{b.disabled||(u||f(p),s&&s(p,b))},h=e[o];return n.jsxs("div",{className:"wc-tabs-wrapper",...l,children:[n.jsx("div",{className:m,children:e.map((p,b)=>n.jsx("button",{className:v(b,p.disabled),onClick:()=>w(b,p),disabled:p.disabled,type:"button",children:p.title},p.key||b))}),n.jsx("div",{className:"wc-tab-content mt-6",children:typeof a=="function"?a({activeTab:h,activeIndex:o}):a})]})};bs.displayName="Tabs";const gs=({value:e="",onChange:t,type:s="text",label:r="",placeholder:a="",helperText:c="",error:l="",required:i=!1,disabled:f=!1,readonly:u=!1,autoFocus:o=!1,fullWidth:m=!1,multiline:v=!1,rows:w=4,maxRows:h,minRows:p,variant:b="filled",size:g="md",color:k="primary",startAdornment:E=null,endAdornment:_=null,maxLength:x,minLength:$,pattern:z,autoComplete:R="off",name:G="",id:F="",className:V="",style:Q={},onFocus:K,onBlur:O,onKeyDown:D,onKeyUp:C,onKeyPress:M,...ee})=>{const[te,N]=y.useState(!1),[P,U]=y.useState(!!e);y.useEffect(()=>{U(!!e)},[e]);const W=S=>{const pe=S.target.value;U(!!pe),t==null||t(S)},q=S=>{N(!0),K==null||K(S)},Z=S=>{N(!1),O==null||O(S)},H=()=>{const S=["wc-textfield"];return m&&S.push("wc-textfield--full-width"),v&&S.push("wc-textfield--multiline"),V&&S.push(V),S.filter(Boolean).join(" ")},Y=()=>{const S=["wc-textfield__container"];return S.push(`wc-textfield__container--${b}`),S.push(`wc-textfield__container--${g}`),l&&S.push("wc-textfield__container--error"),f&&S.push("wc-textfield__container--disabled"),te&&S.push("wc-textfield__container--focused"),P&&S.push("wc-textfield__container--has-value"),S.filter(Boolean).join(" ")},J=()=>{const S=["wc-textfield__label"];return S.push(`wc-textfield__label--${g}`),l&&S.push("wc-textfield__label--error"),te&&S.push("wc-textfield__label--focused"),S.filter(Boolean).join(" ")},j=v?"textarea":"input",L=F||G||`textfield-${Math.random().toString(36).substr(2,9)}`,se=!!l;return n.jsxs("div",{className:H(),style:Q,children:[r&&n.jsxs("label",{htmlFor:L,className:J(),children:[r,i&&n.jsx("span",{className:"wc-textfield__required",children:"*"})]}),n.jsxs("div",{className:Y(),children:[E&&n.jsx("div",{className:"wc-textfield__adornment wc-textfield__adornment--start",children:E}),n.jsx(j,{className:v?"wc-textfield__input wc-textfield__textarea":"wc-textfield__input",id:L,type:v?void 0:s,value:e,onChange:W,onFocus:q,onBlur:Z,onKeyDown:D,onKeyUp:C,onKeyPress:M,placeholder:a,disabled:f,readOnly:u,required:i,autoFocus:o,maxLength:x,minLength:$,pattern:z,rows:v?w:void 0,autoComplete:R,name:G,...ee}),(_||se)&&n.jsxs("div",{className:"wc-textfield__adornment wc-textfield__adornment--end",children:[se&&n.jsx("svg",{className:"wc-textfield__error-icon",fill:"currentColor",viewBox:"0 0 20 20",children:n.jsx("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 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})}),_]})]}),(c||se)&&n.jsx("div",{className:`wc-textfield__helper-text ${se?"wc-textfield__helper-text--error":""}`,children:se?l:c})]})};gs.displayName="TextField";const ba=(e,t,s="")=>{const a=["flex items-center w-full"];return e==="dense"?a.push("min-h-12 py-2"):a.push("min-h-16 py-3"),t||a.push("px-4 sm:px-6 lg:px-8"),s&&a.push(s),a.join(" ")},ga=({children:e,variant:t="regular",disableGutters:s=!1,className:r="",style:a={},...c})=>{const l=ba(t,s,r);return n.jsx("div",{className:l,style:a,...c,children:e})},xs={top:"wc-tooltip--top",bottom:"wc-tooltip--bottom",left:"wc-tooltip--left",right:"wc-tooltip--right"},xa=["top","bottom","left","right"];function ja(e){return xa.includes(e)}function _a(e){return xs[e]||xs.top}function Na({text:e,placement:t="top",children:s,className:r=""}){ja(t)||console.warn(`Invalid tooltip placement: ${t}. Using 'top' as default.`);const[a,c]=y.useState(!1),[l,i]=y.useState(!1),f=_a(t),u=()=>{c(!0),i(!0)},o=()=>{c(!1),setTimeout(()=>i(!1),150)};return n.jsxs("span",{className:`wc-tooltip-wrapper relative inline-block ${r}`,onMouseEnter:u,onMouseLeave:o,children:[s,(a||l)&&n.jsx("div",{className:`wc-tooltip absolute z-50 px-2 py-1 rounded text-xs whitespace-nowrap ${f} ${a?"tooltip-fade-enter-to":"tooltip-fade-leave-to"}`,children:e})]})}const Ca={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",caption:"span",overline:"span",button:"span"},ka={h1:"text-6xl font-light tracking-tight",h2:"text-5xl font-light tracking-tight",h3:"text-4xl font-normal",h4:"text-3xl font-normal",h5:"text-2xl font-normal",h6:"text-xl font-medium",subtitle1:"text-base font-normal",subtitle2:"text-sm font-medium",body1:"text-base font-normal",body2:"text-sm font-normal",caption:"text-xs font-normal",overline:"text-xs font-medium uppercase tracking-wide",button:"text-sm font-medium uppercase tracking-wide"},Sa={inherit:"text-inherit",primary:"text-primary-600 dark:text-primary-400",secondary:"text-neutral-600 dark:text-neutral-400",success:"text-success-600 dark:text-success-400",warning:"text-warning-600 dark:text-warning-400",error:"text-error-600 dark:text-error-400",textPrimary:"text-neutral-900 dark:text-neutral-100",textSecondary:"text-neutral-600 dark:text-neutral-400",textDisabled:"text-neutral-400 dark:text-neutral-600"},Ea={left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"},Ta={h1:"1.2",h2:"1.2",h3:"1.3",h4:"1.3",h5:"1.4",h6:"1.4",subtitle1:"1.5",subtitle2:"1.5",body1:"1.6",body2:"1.6",caption:"1.4",overline:"1.4",button:"1.4"};function $a(e,t){return t||Ca[e]||"p"}function Ia(e,t,s,r,a,c=""){return[ka[e],Sa[t],s!=="inherit"?Ea[s]:null,r?"mb-4":null,a?"truncate":null,c].filter(Boolean).join(" ")}const js=({variant:e="body1",component:t,color:s="inherit",align:r="inherit",gutterBottom:a=!1,noWrap:c=!1,children:l,className:i="",style:f={},...u})=>{const o=$a(e,t),m=Ia(e,s,r,a,c,i),v={lineHeight:Ta[e],...f};return n.jsx(o,{className:m,style:v,...u,children:l})};js.displayName="Typography";class Pa{constructor(t,s={}){this.text=t,this.speed=s.speed||100,this.pause=s.pause||1500,this.loop=s.loop||!1,this.erase=s.erase||!1,this.index=0,this.direction=1,this.timer=null,this.onUpdate=s.onUpdate||(()=>{})}step(){this.direction===1?this.index<this.text.length?(this.index+=1,this.onUpdate(this.text.slice(0,this.index))):this.loop?this.erase?this.direction=-1:(this.stop(),setTimeout(()=>{this.index=0,this.onUpdate(""),this.start()},this.pause)):this.stop():this.index>0?(this.index-=1,this.onUpdate(this.text.slice(0,this.index))):this.direction=1}start(){this.stop(),this.timer=setInterval(()=>this.step(),this.speed)}stop(){this.timer&&(clearInterval(this.timer),this.timer=null)}reset(){this.stop(),this.index=0,this.direction=1,this.onUpdate("")}updateText(t){this.text=t,this.reset(),this.start()}}const _s=({text:e="Hello, Watercolor UI!",speed:t=100,pause:s=1500,loop:r=!1,erase:a=!1,showCursor:c=!0,className:l="",style:i={},...f})=>{const[u,o]=y.useState(""),m=y.useRef(null);return y.useEffect(()=>(m.current=new Pa(e,{speed:t,pause:s,loop:r,erase:a,onUpdate:o}),m.current.start(),()=>{m.current&&m.current.stop()}),[e,t,s,r,a]),n.jsxs("span",{className:`typing-wrapper ${l}`,style:i,...f,children:[n.jsx("span",{className:"typing-text",children:u}),c&&n.jsx("span",{className:"typing-cursor"})]})};_s.displayName="TypingText";const Ns=({length:e=6,value:t="",onChange:s,onComplete:r,autoFocus:a=!1,className:c="",...l})=>{const i=y.useRef([]);y.useEffect(()=>{typeof t=="string"&&t.split("").forEach((h,p)=>{i.current[p]&&(i.current[p].value=h)})},[t]),y.useEffect(()=>{a&&i.current[0]&&i.current[0].focus()},[a]);const f=h=>{const p=i.current[h];p&&p.focus()},u=()=>i.current.map(h=>h?h.value:"").join(""),o=h=>p=>{const b=p.target.value.replace(/[^0-9a-zA-Z]/g,"");p.target.value=b.toUpperCase();const g=u();s==null||s(g),b&&h<e-1&&f(h+1),g.length===e&&(r==null||r(g))},m=h=>p=>{p.key==="Backspace"&&!p.target.value&&h>0&&(p.preventDefault(),f(h-1))},v=h=>{h.target.select()},w=h=>{var b;h.preventDefault();const p=(((b=h.clipboardData)==null?void 0:b.getData("text"))||"").trim().slice(0,e);p&&(p.split("").forEach((g,k)=>{i.current[k]&&(i.current[k].value=g)}),s==null||s(p),p.length===e&&(r==null||r(p)))};return n.jsx("div",{className:["wc-input-code",c].filter(Boolean).join(" "),onPaste:w,...l,children:Array.from({length:e}).map((h,p)=>n.jsx("input",{ref:b=>i.current[p]=b,id:`wc-input-code-${p}`,name:`wc-input-code-${p}`,className:"wc-input-code__box",type:"text",maxLength:1,autoComplete:"one-time-code",inputMode:"numeric",onInput:o(p),onKeyDown:m(p),onFocus:v},p))})};Ns.displayName="VerificationCodeInput";function Cs(e){const t=Math.floor(e/60),s=Math.floor(e%60).toString().padStart(2,"0");return`${t}:${s}`}function Oa(e,t){const s=e.currentTarget.getBoundingClientRect();return(e.clientX-s.left)/s.width*t}function Ma(e){var t,s;e&&(document.fullscreenElement?(s=document.exitFullscreen)==null||s.call(document):(t=e.requestFullscreen)==null||t.call(e))}const ks=({src:e,autoplay:t=!1,loop:s=!1,className:r="",style:a={},...c})=>{const l=y.useRef(null),[i,f]=y.useState(!1),[u,o]=y.useState(0),[m,v]=y.useState(.7),[w,h]=y.useState(!1),[p,b]=y.useState(0),[g,k]=y.useState(0),E=Cs(g),_=Cs(p),x=()=>{const F=l.current;F&&(F.paused?F.play():F.pause())},$=()=>{const F=l.current;F&&(b(F.duration||0),k(F.currentTime),o(F.duration?F.currentTime/F.duration*100:0),f(!F.paused))},z=F=>{const V=l.current;V&&(V.currentTime=Oa(F,p))},R=()=>{h(F=>{const V=!F;return l.current&&(l.current.muted=V),V})},G=()=>{var F;Ma((F=l.current)==null?void 0:F.parentElement)};return y.useEffect(()=>{l.current&&(l.current.volume=m)},[m]),y.useEffect(()=>{const F=l.current;F&&(F.muted=w,F.loop=s,t&&F.play())},[t,s,w]),n.jsxs("div",{className:`video-wrapper ${r}`,style:a,...c,children:[n.jsx("video",{ref:l,className:"video-el",src:e,onTimeUpdate:$,onEnded:()=>f(!1)}),n.jsxs("div",{className:"controls",children:[n.jsx("button",{className:"ctrl-btn",onClick:x,children:i?"❚❚":"▶️"}),n.jsx("div",{className:"progress",onClick:z,children:n.jsx("div",{className:"progress-bar",style:{width:`${u}%`}})}),n.jsxs("span",{className:"time",children:[E," / ",_]}),n.jsx("button",{className:"ctrl-btn",onClick:R,children:w?"🔇":"🔊"}),n.jsx("input",{className:"volume",type:"range",min:"0",max:"1",step:"0.05",value:m,onChange:F=>v(Number(F.target.value))}),n.jsx("button",{className:"ctrl-btn",onClick:G,children:"⛶"})]})]})};ks.displayName="VideoPlayer";const Aa={content:"",cross:!1,debug:!1,fontSize:14,fontFamily:"sans-serif",fontStyle:"normal",fontVariant:"",fontWeight:400,fontColor:"var(--wc-neutral-500, rgba(128,128,128,.3))",fullscreen:!1,globalRotate:0,lineHeight:14,height:64,width:200,image:void 0,imageHeight:void 0,imageWidth:void 0,imageOpacity:1,rotate:0,selectable:!0,textAlign:"center",xGap:48,yGap:48,xOffset:0,yOffset:0,zIndex:10};function Da(e){if(typeof e=="string"&&e.startsWith("var(")){const t=e.match(/--[^, )]+/);if(t)return getComputedStyle(document.documentElement).getPropertyValue(t[0]).trim()||e}return e}function Ba(e){const t=document.createElement("canvas"),s=t.getContext("2d");let r=e.width,a=e.height;if(!e.image&&e.content){s.font=`${e.fontStyle} ${e.fontVariant} ${e.fontWeight} ${e.fontSize}px ${e.fontFamily}`;const f=e.content.split(/\n/),u=Math.max(...f.map(m=>s.measureText(m).width)),o=e.lineHeight*f.length;r=Math.max(r,Math.ceil(u)),a=Math.max(a,Math.ceil(o))}if(r+=e.xGap,a+=e.yGap,t.width=r,t.height=a,e.image)return new Promise(f=>{const u=new Image;u.crossOrigin="anonymous",u.onload=()=>{t.width=(e.imageWidth||u.width)+e.xGap,t.height=(e.imageHeight||u.height)+e.yGap,s.clearRect(0,0,t.width,t.height),s.globalAlpha=e.imageOpacity,s.translate(t.width/2,t.height/2),s.rotate(e.rotate*Math.PI/180);const o=e.imageWidth||u.width,m=e.imageHeight||u.height;s.drawImage(u,-o/2,-m/2,o,m),f(t.toDataURL())},u.src=e.image});const c=(e.content||"").split(/\n/);s.textAlign=e.textAlign||"center",s.textBaseline="middle";const l=e.fontColor.startsWith("var(")?Da(e.fontColor):e.fontColor;s.fillStyle=l,s.font=`${e.fontStyle} ${e.fontVariant} ${e.fontWeight} ${e.fontSize}px ${e.fontFamily}`,s.translate(r/2,a/2),s.rotate(e.rotate*Math.PI/180);const i=-(c.length-1)*e.lineHeight/2;return c.forEach((f,u)=>{const o=i+u*e.lineHeight;s.fillText(f,0,o)}),Promise.resolve(t.toDataURL())}function Fa(e,t){const s={position:e.fullscreen?"fixed":"absolute",top:0,left:0,width:e.fullscreen?"100vw":"100%",height:e.fullscreen?"100vh":"100%",pointerEvents:e.selectable?"none":"auto",backgroundImage:`url(${t})`,backgroundRepeat:"repeat",backgroundPosition:`${e.xOffset}px ${e.yOffset}px`,zIndex:e.zIndex,transform:`rotate(${e.globalRotate}deg)`,mixBlendMode:"multiply"};return e.debug&&(s.outline="1px dashed red"),e.cross||(s.overflow="hidden"),s}const Ss=e=>{const t={...Aa,...e},[s,r]=y.useState(""),a=!!t.content||!!t.image,c=y.useMemo(()=>{const{children:i,...f}=t;return JSON.stringify(f)},[t]);y.useEffect(()=>{if(!a)return;let i=!0;return Ba(t).then(f=>{i&&r(f)}),()=>{i=!1}},[c,a]);const l=y.useMemo(()=>a?Fa(t,s):{},[s,a,t]);return a?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"wc-watermark",style:l}),t.children]}):t.children||null};Ss.displayName="Watermark";function Pe(e){const t=document.documentElement;e.primary&&Object.entries(e.primary).forEach(([s,r])=>{t.style.setProperty(`--wc-primary-${s}`,r)}),e.secondary&&Object.entries(e.secondary).forEach(([s,r])=>{t.style.setProperty(`--wc-secondary-${s}`,r)}),e.neutral&&Object.entries(e.neutral).forEach(([s,r])=>{t.style.setProperty(`--wc-neutral-${s}`,r)}),e.success&&Object.entries(e.success).forEach(([s,r])=>{t.style.setProperty(`--wc-success-${s}`,r)}),e.warning&&Object.entries(e.warning).forEach(([s,r])=>{t.style.setProperty(`--wc-warning-${s}`,r)}),e.error&&Object.entries(e.error).forEach(([s,r])=>{t.style.setProperty(`--wc-error-${s}`,r)}),e.info&&Object.entries(e.info).forEach(([s,r])=>{t.style.setProperty(`--wc-info-${s}`,r)}),e.danger&&Object.entries(e.danger).forEach(([s,r])=>{t.style.setProperty(`--wc-danger-${s}`,r)}),e.purple&&Object.entries(e.purple).forEach(([s,r])=>{t.style.setProperty(`--wc-purple-${s}`,r)}),e.pink&&Object.entries(e.pink).forEach(([s,r])=>{t.style.setProperty(`--wc-pink-${s}`,r)}),e.teal&&Object.entries(e.teal).forEach(([s,r])=>{t.style.setProperty(`--wc-teal-${s}`,r)}),e.indigo&&Object.entries(e.indigo).forEach(([s,r])=>{t.style.setProperty(`--wc-indigo-${s}`,r)}),e.fonts&&Ve(e.fonts),e.radius&&Object.entries(e.radius).forEach(([s,r])=>{const a=`--wc-radius-${s}`;t.style.setProperty(a,r)})}function Ra(e){console.warn("applyCSSTheme is deprecated. Use loadThemeConfig() for file-based themes.")}function Ve(e){const t=document.documentElement,s=[];e.chinese&&s.push(`"${e.chinese}"`),e.english&&s.push(`"${e.english}"`);const r=e.fallback||'-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"';s.push(r);const a=s.join(", ");t.style.setProperty("--wc-font-family",a),t.style.setProperty("--wc-font-chinese",e.chinese||""),t.style.setProperty("--wc-font-english",e.english||""),document.body.style.fontFamily=a}function ot(e){const t=document.documentElement;e?t.classList.add("dark"):t.classList.remove("dark")}function La(){return document.documentElement.classList.contains("dark")}const ke={default:{primary:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},secondary:{50:"#f3f4ff",100:"#e5e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"}}};function Va(e){if(console.warn("applyTheme is deprecated. Use loadThemeConfig() for file-based themes."),e==="default"){const t=ke[e];Pe({primary:t.primary,secondary:t.secondary})}else console.warn(`Theme "${e}" is no longer supported. Please use theme.config.json file.`)}const Es={system:{english:"system-ui",chinese:"system-ui",fallback:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'},chinese:{chinese:"PingFang SC",english:"SF Pro Display",fallback:'"PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif'},modern:{english:"Inter",chinese:"Noto Sans SC",fallback:'"Inter", "Noto Sans SC", sans-serif'},elegant:{english:"Poppins",chinese:"Source Han Sans",fallback:'"Poppins", "Source Han Sans", "Noto Sans CJK SC", sans-serif'},readable:{english:"IBM Plex Sans",chinese:"IBM Plex Sans SC",fallback:'"IBM Plex Sans", "IBM Plex Sans SC", sans-serif'},apple:{english:"SF Pro Display",chinese:"PingFang SC",fallback:'"SF Pro Display", "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif'},google:{english:"Roboto",chinese:"Noto Sans SC",fallback:'"Roboto", "Noto Sans SC", sans-serif'}};function Wa(e){Ve(Es[e])}function Ya(){const e=document.documentElement;return{chinese:e.style.getPropertyValue("--wc-font-chinese")||void 0,english:e.style.getPropertyValue("--wc-font-english")||void 0,fallback:e.style.getPropertyValue("--wc-font-family")||void 0}}async function Ts(e="/theme.config.json"){if(!(typeof window>"u"||typeof fetch>"u"))try{const t=await fetch(e,{cache:"no-store"});if(!t.ok){console.info("[Watercolor UI] theme.config.json not found, using default theme");return}const s=await t.json();Pe(s),s.fonts&&Ve(s.fonts),console.info("[Watercolor UI] Theme loaded from theme.config.json")}catch(t){console.warn("[Watercolor UI] 无法加载自定义 theme.config.json:",t),console.info("[Watercolor UI] Using default theme")}}typeof window<"u"&&Ts();function Ua(e="default",t=!1){const s=typeof window<"u"&&typeof document<"u";let r=null,a=null;if(s)try{r=localStorage.getItem("wc-color"),a=localStorage.getItem("wc-scheme")}catch{}let c=r||e,l=a?a==="dark":t;if(s){const u=ke[c]??ke.default;Pe({primary:u.primary,secondary:u.secondary}),ot(l)}return{get color(){return c},get dark(){return l},setColor:u=>{if(u!==c&&(c=u,s)){const o=ke[u]??ke.default;Pe({primary:o.primary,secondary:o.secondary});try{localStorage.setItem("wc-color",u)}catch{}}},toggleDark:()=>{if(l=!l,s){ot(l);try{localStorage.setItem("wc-scheme",l?"dark":"light")}catch{}}}}}const $s=y.createContext(void 0),Oe=Ua(),qa=({children:e})=>{const[t,s]=y.useState(Oe.color),[r,a]=y.useState(Oe.dark),c=i=>{Oe.setColor(i),s(i)},l=()=>{Oe.toggleDark(),a(Oe.dark)};return n.jsx($s.Provider,{value:{color:t,setColor:c,dark:r,toggleDark:l},children:e})};function Ha(){const e=y.useContext($s);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}I.Accordion=wt,I.Alert=Xs,I.AppBar=Js,I.Autocomplete=yt,I.Avatar=bt,I.Badge=gt,I.Banner=mn,I.Blockquote=wn,I.Box=bn,I.Breadcrumb=Cn,I.Button=Ge,I.Card=He,I.CardActions=St,I.CardContent=Et,I.Checkbox=Tt,I.Chip=Fn,I.CircularProgress=qn,I.ColorPicker=Kn,I.Container=Jn,I.Copy=ar,I.DatePicker=fr,I.Fab=It,I.Feature=Mt,I.Feed=Ot,I.FileInput=At,I.FormControl=Bt,I.FormControlLabel=Ft,I.FormGroup=Rt,I.FormHelperText=Lt,I.Grid=Vt,I.HoverCard=Wt,I.Icon=es,I.IconButton=ts,I.ImageGallery=ss,I.Input=ns,I.List=Mr,I.ListItem=Ar,I.ListItemIcon=Dr,I.ListItemText=Br,I.Menu=cs,I.Modal=ls,I.NumberAnimation=Jr,I.Pagination=Qr,I.Paper=sa,I.Popover=na,I.PricingTable=ra,I.Progress=os,I.Radio=fs,I.RadioGroup=ds,I.Rating=aa,I.Select=ms,I.Skeleton=ca,I.SlideOver=ia,I.Slider=la,I.Snackbar=ua,I.Status=ws,I.Switch=vs,I.Table=ya,I.TableBody=ct,I.TableCell=it,I.TableHead=at,I.TableRow=lt,I.Tabs=bs,I.TextField=gs,I.ThemeProvider=qa,I.Toolbar=ga,I.Tooltip=Na,I.TypingText=_s,I.Typography=js,I.VerificationCodeInput=Ns,I.VideoPlayer=ks,I.Watermark=Ss,I.applyCSSTheme=Ra,I.applyFontTheme=Wa,I.applyTheme=Va,I.fontThemes=Es,I.getCurrentFonts=Ya,I.isDarkMode=La,I.loadThemeConfig=Ts,I.setFonts=Ve,I.setTheme=Pe,I.themes=ke,I.toggleDarkMode=ot,I.useTheme=Ha,Object.defineProperty(I,Symbol.toStringTag,{value:"Module"})});
43
+ .slideover-enter{opacity:0;transform:translateX(${i===`right`?`100%`:`-100%`});}
44
+ `})]}):null,document.body)),In={success:`✓`,info:`ℹ`,warning:`⚠`,error:`✕`};function Ln({open:e=!1,modelValue:r=void 0,message:i=``,title:a=``,severity:o=`info`,variant:s=`filled`,autoHideDuration:c=6e3,anchorOrigin:l={vertical:`bottom`,horizontal:`left`},action:u=``,closable:d=!0,showIcon:f=!0,showProgress:p=!1,onClose:m=()=>{},onUpdateModelValue:h,onAction:g=()=>{},children:_}){let v=r!==void 0,[b,x]=(0,t.useState)(v?r:e),[S,C]=(0,t.useState)(100);(0,t.useEffect)(()=>{let t=v?r:e;x(t),t&&C(100)},[e,r]),(0,t.useEffect)(()=>{if(!b||c<=0)return;let e=Date.now(),t=setTimeout(()=>{w()},c);if(p){let n=setInterval(()=>{let t=Date.now()-e,r=Math.max(0,100-t/c*100);C(r),r<=0&&clearInterval(n)},50);return()=>{clearTimeout(t),clearInterval(n)}}return()=>clearTimeout(t)},[b,c,p]);let w=()=>{v?h?.(!1):x(!1),m()},T=()=>{g()};if(!b)return null;let E=[`wc-snackbar`,`wc-snackbar--${s}`,`wc-snackbar--${o}`],D={position:`fixed`,zIndex:1400},{vertical:O,horizontal:k}=l;return O===`top`?D.top=`20px`:D.bottom=`20px`,k===`left`?D.left=`20px`:k===`right`?D.right=`20px`:(D.left=`50%`,D.transform=`translateX(-50%)`),(0,n.createPortal)((0,y.jsxs)(`div`,{className:E.join(` `),style:D,role:`alert`,"aria-live":`assertive`,"aria-atomic":`true`,children:[f&&(0,y.jsx)(`div`,{className:`wc-snackbar__icon`,children:In[o]}),(0,y.jsxs)(`div`,{className:`wc-snackbar__content`,children:[a&&(0,y.jsx)(`div`,{className:`wc-snackbar__title`,children:a}),_||(0,y.jsx)(`div`,{className:`wc-snackbar__message`,children:i})]}),(u||_?.action)&&(0,y.jsx)(`div`,{className:`wc-snackbar__actions`,children:_?.action||(0,y.jsx)(`button`,{type:`button`,className:`wc-snackbar__action`,onClick:T,children:u})}),d&&(0,y.jsx)(`button`,{type:`button`,className:`wc-snackbar__close`,"aria-label":`关闭`,onClick:w,children:`×`}),p&&c>0&&(0,y.jsx)(`div`,{className:`wc-snackbar__progress`,children:(0,y.jsx)(`div`,{className:`wc-snackbar__progress-bar`,style:{width:`${S}%`}})})]}),document.body)}var Rn=[`default`,`success`,`error`,`warning`,`info`,`pending`,`processing`,`cancelled`],zn=[`auto`,`pulse`,`spin`,`bounce`,`blink`,`shake`,`breathe`,`ripple`,`glow`],Bn={default:{text:`默认`,color:`#9ca3af`,darkColor:`#6b7280`},success:{text:`成功`,color:`#10b981`,darkColor:`#059669`},error:{text:`失败`,color:`#ef4444`,darkColor:`#dc2626`},warning:{text:`警告`,color:`#f59e0b`,darkColor:`#d97706`},info:{text:`信息`,color:`#3b82f6`,darkColor:`#2563eb`},pending:{text:`等待中`,color:`#8b5cf6`,darkColor:`#7c3aed`},processing:{text:`进行中`,color:`#06b6d4`,darkColor:`#0891b2`},cancelled:{text:`已取消`,color:`#64748b`,darkColor:`#475569`}};function Vn(e){return Rn.includes(e)}function Hn(e){return Vn(e)?e:`default`}function Un({status:e,size:t,showText:n,animated:r,animationType:i=`auto`,className:a}){let o=Hn(e),s=[`wc-status`,`wc-status--${o}`,`wc-status--${t}`];if(n&&s.push(`wc-status--with-text`),r){let e=Gn(o,i);s.push(`wc-status--animated`,`wc-status--${e}`)}return a&&s.push(a),s.filter(Boolean).join(` `)}function Wn(e){return Bn[e]?.text||Bn.default.text}function Gn(e,t=`auto`){return t!==`auto`&&zn.includes(t)?t:{processing:`spin`,pending:`pulse`,success:`bounce`,error:`shake`,warning:`blink`,info:`ripple`,cancelled:`breathe`,default:`glow`}[e]||`pulse`}var Kn=({status:e=`default`,size:t=`md`,showText:n=!1,animated:r=!1,animationType:i=`auto`,className:a=``,...o})=>{let s=Un({status:e,size:t,showText:n,animated:r,animationType:i,className:a}),c=Wn(e);return(0,y.jsx)(`span`,{className:s,title:c,...o,children:n&&(0,y.jsx)(`span`,{className:`wc-status__text`,children:c})})};Kn.displayName=`Status`;var qn=({checked:e=!1,onChange:n,label:r=``,description:i=``,disabled:a=!1,required:o=!1,color:s=`primary`,size:c=`md`,className:l=``,...u})=>{let d=(0,t.useId)(),f=[`primary`,`success`,`warning`,`error`,`purple`,`orange`,`cyan`,`pink`].includes(s)?s:`primary`,p=[`sm`,`md`,`lg`].includes(c)?c:`md`,m=[`wc-switch`,`wc-switch--${f}`,p!==`md`&&`wc-switch--${p}`,a&&`wc-switch--disabled`,l].filter(Boolean).join(` `),h=e=>{a||!n||n(e.target.checked)};return(0,y.jsxs)(`div`,{className:`wc-switch-wrapper`,children:[r&&(0,y.jsxs)(`label`,{id:d,className:`wc-switch__label`,children:[r,o&&(0,y.jsx)(`span`,{className:`wc-switch__required`,children:`*`})]}),(0,y.jsxs)(`div`,{className:`wc-switch__container`,children:[(0,y.jsxs)(`label`,{className:m,"aria-disabled":a,children:[(0,y.jsx)(`input`,{type:`checkbox`,className:`wc-switch__input`,checked:e,disabled:a,"aria-labelledby":d,role:`switch`,onChange:h,...u}),(0,y.jsx)(`span`,{className:`wc-switch__track`,children:(0,y.jsx)(`span`,{className:`wc-switch__thumb`})})]}),i&&(0,y.jsx)(`span`,{className:`wc-switch__description`,children:i})]})]})};qn.displayName=`Switch`;var Jn=(0,t.createContext)({size:`md`,dense:!1,hover:!1,striped:!1}),Yn=({size:e=`md`,stickyHeader:t=!1,dense:n=!1,hover:r=!1,striped:i=!1,children:a,className:o=``,...s})=>(0,y.jsx)(`div`,{className:`wc-table-container${t?` wc-table-container--sticky`:``} ${o}`,...s,children:(0,y.jsx)(`table`,{className:`wc-table wc-table--${e}${r?` wc-table--hover`:``}${i?` wc-table--striped`:``}${n?` wc-table--dense`:``}`,children:(0,y.jsx)(Jn.Provider,{value:{size:e,dense:n,hover:r,striped:i,stickyHeader:t},children:a})})});Yn.displayName=`Table`;var Xn=({children:e,className:n=``,...r})=>{let{stickyHeader:i}=(0,t.useContext)(Jn);return(0,y.jsx)(`thead`,{className:`wc-table-head${i?` wc-table-head--sticky`:``} ${n}`,...r,children:e})};Xn.displayName=`TableHead`;var Zn=({children:e,className:t=``,...n})=>(0,y.jsx)(`tbody`,{className:`wc-table-body ${t}`,...n,children:e});Zn.displayName=`TableBody`;var Qn=({hover:e,selected:n=!1,clickable:r=!1,children:i,className:a=``,onClick:o,...s})=>{let c=(0,t.useContext)(Jn);return(0,y.jsx)(`tr`,{className:[`wc-table-row`,(e===void 0?c.hover:e)||r?`wc-table-row--hover`:``,n?`wc-table-row--selected`:``,r?`wc-table-row--clickable`:``,a].filter(Boolean).join(` `),onClick:r?o:void 0,...s,children:i})};Qn.displayName=`TableRow`;var $n=({component:e=`td`,align:n=`inherit`,padding:r=`normal`,size:i,sortDirection:a=!1,variant:o=`body`,scope:s,children:c,className:l=``,...u})=>{let d=(0,t.useContext)(Jn),f=i||(d.dense?`small`:`medium`);return(0,y.jsx)(e,{className:[`wc-table-cell`,`wc-table-cell--${o}`,`wc-table-cell--${f}`,`wc-table-cell--padding-${r}`,n===`inherit`?``:`wc-table-cell--align-${n}`,a?`wc-table-cell--sortable`:``,a?`wc-table-cell--sort-${a}`:``,l].filter(Boolean).join(` `),scope:e===`th`||o===`head`?s:void 0,...u,children:c})};$n.displayName=`TableCell`;var er=Object.assign(Yn,{Head:Xn,Body:Zn,Row:Qn,Cell:$n}),tr=({tabs:e=[],activeIndex:n,onChange:r,variant:i=`default`,children:a,className:o=``,...s})=>{let[c,l]=(0,t.useState)(n||0),u=n!==void 0,d=u?n:c;(0,t.useEffect)(()=>{u&&l(n)},[n,u]);let f=[`wc-tabs`,i===`pills`&&`wc-tabs--pills`,i===`underline`&&`wc-tabs--underline`,(i===`default`||![`pills`,`underline`].includes(i))&&`wc-tabs--default`,o].filter(Boolean).join(` `),p=(e,t)=>{let n=[`wc-tab`];return d===e&&n.push(`wc-tab--active`),t&&n.push(`opacity-50 cursor-not-allowed`),n.join(` `)},m=(e,t)=>{t.disabled||(u||l(e),r&&r(e,t))},h=e[d];return(0,y.jsxs)(`div`,{className:`wc-tabs-wrapper`,...s,children:[(0,y.jsx)(`div`,{className:f,children:e.map((e,t)=>(0,y.jsx)(`button`,{className:p(t,e.disabled),onClick:()=>m(t,e),disabled:e.disabled,type:`button`,children:e.title},e.key||t))}),(0,y.jsx)(`div`,{className:`wc-tab-content mt-6`,children:typeof a==`function`?a({activeTab:h,activeIndex:d}):a})]})};tr.displayName=`Tabs`;var nr=({value:e=``,onChange:n,type:r=`text`,label:i=``,placeholder:a=``,helperText:o=``,error:s=``,required:c=!1,disabled:l=!1,readonly:u=!1,autoFocus:d=!1,fullWidth:f=!1,multiline:p=!1,rows:m=4,maxRows:h,minRows:g,variant:_=`filled`,size:v=`md`,color:b=`primary`,startAdornment:x=null,endAdornment:S=null,maxLength:C,minLength:w,pattern:T,autoComplete:E=`off`,name:D=``,id:O=``,className:k=``,style:A={},onFocus:j,onBlur:M,onKeyDown:N,onKeyUp:P,onKeyPress:F,...I})=>{let[L,R]=(0,t.useState)(!1),[z,B]=(0,t.useState)(!!e);(0,t.useEffect)(()=>{B(!!e)},[e]);let V=e=>{let t=e.target.value;B(!!t),n?.(e)},H=e=>{R(!0),j?.(e)},U=e=>{R(!1),M?.(e)},W=()=>{let e=[`wc-textfield`];return f&&e.push(`wc-textfield--full-width`),p&&e.push(`wc-textfield--multiline`),k&&e.push(k),e.filter(Boolean).join(` `)},G=()=>{let e=[`wc-textfield__container`];return e.push(`wc-textfield__container--${_}`),e.push(`wc-textfield__container--${v}`),s&&e.push(`wc-textfield__container--error`),l&&e.push(`wc-textfield__container--disabled`),L&&e.push(`wc-textfield__container--focused`),z&&e.push(`wc-textfield__container--has-value`),e.filter(Boolean).join(` `)},K=()=>{let e=[`wc-textfield__label`];return e.push(`wc-textfield__label--${v}`),s&&e.push(`wc-textfield__label--error`),L&&e.push(`wc-textfield__label--focused`),e.filter(Boolean).join(` `)},q=p?`textarea`:`input`,J=O||D||`textfield-${Math.random().toString(36).substr(2,9)}`,Y=!!s;return(0,y.jsxs)(`div`,{className:W(),style:A,children:[i&&(0,y.jsxs)(`label`,{htmlFor:J,className:K(),children:[i,c&&(0,y.jsx)(`span`,{className:`wc-textfield__required`,children:`*`})]}),(0,y.jsxs)(`div`,{className:G(),children:[x&&(0,y.jsx)(`div`,{className:`wc-textfield__adornment wc-textfield__adornment--start`,children:x}),(0,y.jsx)(q,{className:p?`wc-textfield__input wc-textfield__textarea`:`wc-textfield__input`,id:J,type:p?void 0:r,value:e,onChange:V,onFocus:H,onBlur:U,onKeyDown:N,onKeyUp:P,onKeyPress:F,placeholder:a,disabled:l,readOnly:u,required:c,autoFocus:d,maxLength:C,minLength:w,pattern:T,rows:p?m:void 0,autoComplete:E,name:D,...I}),(S||Y)&&(0,y.jsxs)(`div`,{className:`wc-textfield__adornment wc-textfield__adornment--end`,children:[Y&&(0,y.jsx)(`svg`,{className:`wc-textfield__error-icon`,fill:`currentColor`,viewBox:`0 0 20 20`,children:(0,y.jsx)(`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 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z`,clipRule:`evenodd`})}),S]})]}),(o||Y)&&(0,y.jsx)(`div`,{className:`wc-textfield__helper-text ${Y?`wc-textfield__helper-text--error`:``}`,children:Y?s:o})]})};nr.displayName=`TextField`;var rr=(e,t,n=``)=>{let r=[`flex items-center w-full`];return e===`dense`?r.push(`min-h-12 py-2`):r.push(`min-h-16 py-3`),t||r.push(`px-4 sm:px-6 lg:px-8`),n&&r.push(n),r.join(` `)},ir=({children:e,variant:t=`regular`,disableGutters:n=!1,className:r=``,style:i={},...a})=>(0,y.jsx)(`div`,{className:rr(t,n,r),style:i,...a,children:e}),ar={top:`wc-tooltip--top`,bottom:`wc-tooltip--bottom`,left:`wc-tooltip--left`,right:`wc-tooltip--right`},or=[`top`,`bottom`,`left`,`right`];function sr(e){return or.includes(e)}function cr(e){return ar[e]||ar.top}function lr({text:e,placement:n=`top`,children:r,className:i=``}){sr(n)||console.warn(`Invalid tooltip placement: ${n}. Using 'top' as default.`);let[a,o]=(0,t.useState)(!1),[s,c]=(0,t.useState)(!1),l=cr(n);return(0,y.jsxs)(`span`,{className:`wc-tooltip-wrapper relative inline-block ${i}`,onMouseEnter:()=>{o(!0),c(!0)},onMouseLeave:()=>{o(!1),setTimeout(()=>c(!1),150)},children:[r,(a||s)&&(0,y.jsx)(`div`,{className:`wc-tooltip absolute z-50 px-2 py-1 rounded text-xs whitespace-nowrap ${l} ${a?`tooltip-fade-enter-to`:`tooltip-fade-leave-to`}`,children:e})]})}var ur={h1:`h1`,h2:`h2`,h3:`h3`,h4:`h4`,h5:`h5`,h6:`h6`,subtitle1:`h6`,subtitle2:`h6`,body1:`p`,body2:`p`,caption:`span`,overline:`span`,button:`span`},dr={h1:`text-6xl font-light tracking-tight`,h2:`text-5xl font-light tracking-tight`,h3:`text-4xl font-normal`,h4:`text-3xl font-normal`,h5:`text-2xl font-normal`,h6:`text-xl font-medium`,subtitle1:`text-base font-normal`,subtitle2:`text-sm font-medium`,body1:`text-base font-normal`,body2:`text-sm font-normal`,caption:`text-xs font-normal`,overline:`text-xs font-medium uppercase tracking-wide`,button:`text-sm font-medium uppercase tracking-wide`},fr={inherit:`text-inherit`,primary:`text-primary-600 dark:text-primary-400`,secondary:`text-neutral-600 dark:text-neutral-400`,success:`text-success-600 dark:text-success-400`,warning:`text-warning-600 dark:text-warning-400`,error:`text-error-600 dark:text-error-400`,textPrimary:`text-neutral-900 dark:text-neutral-100`,textSecondary:`text-neutral-600 dark:text-neutral-400`,textDisabled:`text-neutral-400 dark:text-neutral-600`},pr={left:`text-left`,center:`text-center`,right:`text-right`,justify:`text-justify`},mr={h1:`1.2`,h2:`1.2`,h3:`1.3`,h4:`1.3`,h5:`1.4`,h6:`1.4`,subtitle1:`1.5`,subtitle2:`1.5`,body1:`1.6`,body2:`1.6`,caption:`1.4`,overline:`1.4`,button:`1.4`};function hr(e,t){return t||ur[e]||`p`}function gr(e,t,n,r,i,a=``){return[dr[e],fr[t],n===`inherit`?null:pr[n],r?`mb-4`:null,i?`truncate`:null,a].filter(Boolean).join(` `)}var _r=({variant:e=`body1`,component:t,color:n=`inherit`,align:r=`inherit`,gutterBottom:i=!1,noWrap:a=!1,children:o,className:s=``,style:c={},...l})=>(0,y.jsx)(hr(e,t),{className:gr(e,n,r,i,a,s),style:{lineHeight:mr[e],...c},...l,children:o});_r.displayName=`Typography`;var vr=class{constructor(e,t={}){this.text=e,this.speed=t.speed||100,this.pause=t.pause||1500,this.loop=t.loop||!1,this.erase=t.erase||!1,this.index=0,this.direction=1,this.timer=null,this.onUpdate=t.onUpdate||(()=>{})}step(){this.direction===1?this.index<this.text.length?(this.index+=1,this.onUpdate(this.text.slice(0,this.index))):this.loop?this.erase?this.direction=-1:(this.stop(),setTimeout(()=>{this.index=0,this.onUpdate(``),this.start()},this.pause)):this.stop():this.index>0?(--this.index,this.onUpdate(this.text.slice(0,this.index))):this.direction=1}start(){this.stop(),this.timer=setInterval(()=>this.step(),this.speed)}stop(){this.timer&&=(clearInterval(this.timer),null)}reset(){this.stop(),this.index=0,this.direction=1,this.onUpdate(``)}updateText(e){this.text=e,this.reset(),this.start()}},yr=({text:e=`Hello, Watercolor UI!`,speed:n=100,pause:r=1500,loop:i=!1,erase:a=!1,showCursor:o=!0,className:s=``,style:c={},...l})=>{let[u,d]=(0,t.useState)(``),f=(0,t.useRef)(null);return(0,t.useEffect)(()=>(f.current=new vr(e,{speed:n,pause:r,loop:i,erase:a,onUpdate:d}),f.current.start(),()=>{f.current&&f.current.stop()}),[e,n,r,i,a]),(0,y.jsxs)(`span`,{className:`typing-wrapper ${s}`,style:c,...l,children:[(0,y.jsx)(`span`,{className:`typing-text`,children:u}),o&&(0,y.jsx)(`span`,{className:`typing-cursor`})]})};yr.displayName=`TypingText`;var br=({length:e=6,value:n=``,onChange:r,onComplete:i,autoFocus:a=!1,className:o=``,...s})=>{let c=(0,t.useRef)([]);(0,t.useEffect)(()=>{typeof n==`string`&&n.split(``).forEach((e,t)=>{c.current[t]&&(c.current[t].value=e)})},[n]),(0,t.useEffect)(()=>{a&&c.current[0]&&c.current[0].focus()},[a]);let l=e=>{let t=c.current[e];t&&t.focus()},u=()=>c.current.map(e=>e?e.value:``).join(``),d=t=>n=>{let a=n.target.value.replace(/[^0-9a-zA-Z]/g,``);n.target.value=a.toUpperCase();let o=u();r?.(o),a&&t<e-1&&l(t+1),o.length===e&&i?.(o)},f=e=>t=>{t.key===`Backspace`&&!t.target.value&&e>0&&(t.preventDefault(),l(e-1))},p=e=>{e.target.select()};return(0,y.jsx)(`div`,{className:[`wc-input-code`,o].filter(Boolean).join(` `),onPaste:t=>{t.preventDefault();let n=(t.clipboardData?.getData(`text`)||``).trim().slice(0,e);n&&(n.split(``).forEach((e,t)=>{c.current[t]&&(c.current[t].value=e)}),r?.(n),n.length===e&&i?.(n))},...s,children:Array.from({length:e}).map((e,t)=>(0,y.jsx)(`input`,{ref:e=>c.current[t]=e,id:`wc-input-code-${t}`,name:`wc-input-code-${t}`,className:`wc-input-code__box`,type:`text`,maxLength:1,autoComplete:`one-time-code`,inputMode:`numeric`,onInput:d(t),onKeyDown:f(t),onFocus:p},t))})};br.displayName=`VerificationCodeInput`;function xr(e){return`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,`0`)}`}function Sr(e,t){let n=e.currentTarget.getBoundingClientRect();return(e.clientX-n.left)/n.width*t}function Cr(e){e&&(document.fullscreenElement?document.exitFullscreen?.():e.requestFullscreen?.())}var wr=({src:e,autoplay:n=!1,loop:r=!1,className:i=``,style:a={},...o})=>{let s=(0,t.useRef)(null),[c,l]=(0,t.useState)(!1),[u,d]=(0,t.useState)(0),[f,p]=(0,t.useState)(.7),[m,h]=(0,t.useState)(!1),[g,_]=(0,t.useState)(0),[v,b]=(0,t.useState)(0),x=xr(v),S=xr(g),C=()=>{let e=s.current;e&&(e.paused?e.play():e.pause())},w=()=>{let e=s.current;e&&(_(e.duration||0),b(e.currentTime),d(e.duration?e.currentTime/e.duration*100:0),l(!e.paused))},T=e=>{let t=s.current;t&&(t.currentTime=Sr(e,g))},E=()=>{h(e=>{let t=!e;return s.current&&(s.current.muted=t),t})},D=()=>{Cr(s.current?.parentElement)};return(0,t.useEffect)(()=>{s.current&&(s.current.volume=f)},[f]),(0,t.useEffect)(()=>{let e=s.current;e&&(e.muted=m,e.loop=r,n&&e.play())},[n,r,m]),(0,y.jsxs)(`div`,{className:`video-wrapper ${i}`,style:a,...o,children:[(0,y.jsx)(`video`,{ref:s,className:`video-el`,src:e,onTimeUpdate:w,onEnded:()=>l(!1)}),(0,y.jsxs)(`div`,{className:`controls`,children:[(0,y.jsx)(`button`,{className:`ctrl-btn`,onClick:C,children:c?`❚❚`:`▶️`}),(0,y.jsx)(`div`,{className:`progress`,onClick:T,children:(0,y.jsx)(`div`,{className:`progress-bar`,style:{width:`${u}%`}})}),(0,y.jsxs)(`span`,{className:`time`,children:[x,` / `,S]}),(0,y.jsx)(`button`,{className:`ctrl-btn`,onClick:E,children:m?`🔇`:`🔊`}),(0,y.jsx)(`input`,{className:`volume`,type:`range`,min:`0`,max:`1`,step:`0.05`,value:f,onChange:e=>p(Number(e.target.value))}),(0,y.jsx)(`button`,{className:`ctrl-btn`,onClick:D,children:`⛶`})]})]})};wr.displayName=`VideoPlayer`;var Tr={content:``,cross:!1,debug:!1,fontSize:14,fontFamily:`sans-serif`,fontStyle:`normal`,fontVariant:``,fontWeight:400,fontColor:`var(--wc-neutral-500, rgba(128,128,128,.3))`,fullscreen:!1,globalRotate:0,lineHeight:14,height:64,width:200,image:void 0,imageHeight:void 0,imageWidth:void 0,imageOpacity:1,rotate:0,selectable:!0,textAlign:`center`,xGap:48,yGap:48,xOffset:0,yOffset:0,zIndex:10};function Er(e){if(typeof e==`string`&&e.startsWith(`var(`)){let t=e.match(/--[^, )]+/);if(t)return getComputedStyle(document.documentElement).getPropertyValue(t[0]).trim()||e}return e}function Dr(e){let t=document.createElement(`canvas`),n=t.getContext(`2d`),r=e.width,i=e.height;if(!e.image&&e.content){n.font=`${e.fontStyle} ${e.fontVariant} ${e.fontWeight} ${e.fontSize}px ${e.fontFamily}`;let t=e.content.split(/\n/),a=Math.max(...t.map(e=>n.measureText(e).width)),o=e.lineHeight*t.length;r=Math.max(r,Math.ceil(a)),i=Math.max(i,Math.ceil(o))}if(r+=e.xGap,i+=e.yGap,t.width=r,t.height=i,e.image)return new Promise(r=>{let i=new Image;i.crossOrigin=`anonymous`,i.onload=()=>{t.width=(e.imageWidth||i.width)+e.xGap,t.height=(e.imageHeight||i.height)+e.yGap,n.clearRect(0,0,t.width,t.height),n.globalAlpha=e.imageOpacity,n.translate(t.width/2,t.height/2),n.rotate(e.rotate*Math.PI/180);let a=e.imageWidth||i.width,o=e.imageHeight||i.height;n.drawImage(i,-a/2,-o/2,a,o),r(t.toDataURL())},i.src=e.image});let a=(e.content||``).split(/\n/);n.textAlign=e.textAlign||`center`,n.textBaseline=`middle`,n.fillStyle=e.fontColor.startsWith(`var(`)?Er(e.fontColor):e.fontColor,n.font=`${e.fontStyle} ${e.fontVariant} ${e.fontWeight} ${e.fontSize}px ${e.fontFamily}`,n.translate(r/2,i/2),n.rotate(e.rotate*Math.PI/180);let o=-(a.length-1)*e.lineHeight/2;return a.forEach((t,r)=>{let i=o+r*e.lineHeight;n.fillText(t,0,i)}),Promise.resolve(t.toDataURL())}function Or(e,t){let n={position:e.fullscreen?`fixed`:`absolute`,top:0,left:0,width:e.fullscreen?`100vw`:`100%`,height:e.fullscreen?`100vh`:`100%`,pointerEvents:e.selectable?`none`:`auto`,backgroundImage:`url(${t})`,backgroundRepeat:`repeat`,backgroundPosition:`${e.xOffset}px ${e.yOffset}px`,zIndex:e.zIndex,transform:`rotate(${e.globalRotate}deg)`,mixBlendMode:`multiply`};return e.debug&&(n.outline=`1px dashed red`),e.cross||(n.overflow=`hidden`),n}var kr=e=>{let n={...Tr,...e},[r,i]=(0,t.useState)(``),a=!!n.content||!!n.image;(0,t.useEffect)(()=>{if(!a)return;let e=!0;return Dr(n).then(t=>{e&&i(t)}),()=>{e=!1}},[(0,t.useMemo)(()=>{let{children:e,...t}=n;return JSON.stringify(t)},[n]),a]);let o=(0,t.useMemo)(()=>a?Or(n,r):{},[r,a,n]);return a?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`div`,{className:`wc-watermark`,style:o}),n.children]}):n.children||null};kr.displayName=`Watermark`;function Ar(e){let t=document.documentElement;e.primary&&Object.entries(e.primary).forEach(([e,n])=>{t.style.setProperty(`--wc-primary-${e}`,n)}),e.secondary&&Object.entries(e.secondary).forEach(([e,n])=>{t.style.setProperty(`--wc-secondary-${e}`,n)}),e.neutral&&Object.entries(e.neutral).forEach(([e,n])=>{t.style.setProperty(`--wc-neutral-${e}`,n)}),e.success&&Object.entries(e.success).forEach(([e,n])=>{t.style.setProperty(`--wc-success-${e}`,n)}),e.warning&&Object.entries(e.warning).forEach(([e,n])=>{t.style.setProperty(`--wc-warning-${e}`,n)}),e.error&&Object.entries(e.error).forEach(([e,n])=>{t.style.setProperty(`--wc-error-${e}`,n)}),e.info&&Object.entries(e.info).forEach(([e,n])=>{t.style.setProperty(`--wc-info-${e}`,n)}),e.danger&&Object.entries(e.danger).forEach(([e,n])=>{t.style.setProperty(`--wc-danger-${e}`,n)}),e.purple&&Object.entries(e.purple).forEach(([e,n])=>{t.style.setProperty(`--wc-purple-${e}`,n)}),e.pink&&Object.entries(e.pink).forEach(([e,n])=>{t.style.setProperty(`--wc-pink-${e}`,n)}),e.teal&&Object.entries(e.teal).forEach(([e,n])=>{t.style.setProperty(`--wc-teal-${e}`,n)}),e.indigo&&Object.entries(e.indigo).forEach(([e,n])=>{t.style.setProperty(`--wc-indigo-${e}`,n)}),e.fonts&&Mr(e.fonts),e.radius&&Object.entries(e.radius).forEach(([e,n])=>{let r=`--wc-radius-${e}`;t.style.setProperty(r,n)})}function jr(e){console.warn(`applyCSSTheme is deprecated. Use loadThemeConfig() for file-based themes.`)}function Mr(e){let t=document.documentElement,n=[];e.chinese&&n.push(`"${e.chinese}"`),e.english&&n.push(`"${e.english}"`);let r=e.fallback||`-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"`;n.push(r);let i=n.join(`, `);t.style.setProperty(`--wc-font-family`,i),t.style.setProperty(`--wc-font-chinese`,e.chinese||``),t.style.setProperty(`--wc-font-english`,e.english||``),document.body.style.fontFamily=i}function Nr(e){let t=document.documentElement;e?t.classList.add(`dark`):t.classList.remove(`dark`)}function Pr(){return document.documentElement.classList.contains(`dark`)}var Fr={default:{primary:{50:`#eff6ff`,100:`#dbeafe`,200:`#bfdbfe`,300:`#93c5fd`,400:`#60a5fa`,500:`#3b82f6`,600:`#2563eb`,700:`#1d4ed8`,800:`#1e40af`,900:`#1e3a8a`},secondary:{50:`#f3f4ff`,100:`#e5e7ff`,200:`#c7d2fe`,300:`#a5b4fc`,400:`#818cf8`,500:`#6366f1`,600:`#4f46e5`,700:`#4338ca`,800:`#3730a3`,900:`#312e81`}}};function Ir(e){if(console.warn(`applyTheme is deprecated. Use loadThemeConfig() for file-based themes.`),e===`default`){let t=Fr[e];Ar({primary:t.primary,secondary:t.secondary})}else console.warn(`Theme "${e}" is no longer supported. Please use theme.config.json file.`)}var Lr={system:{english:`system-ui`,chinese:`system-ui`,fallback:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif`},chinese:{chinese:`PingFang SC`,english:`SF Pro Display`,fallback:`"PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif`},modern:{english:`Inter`,chinese:`Noto Sans SC`,fallback:`"Inter", "Noto Sans SC", sans-serif`},elegant:{english:`Poppins`,chinese:`Source Han Sans`,fallback:`"Poppins", "Source Han Sans", "Noto Sans CJK SC", sans-serif`},readable:{english:`IBM Plex Sans`,chinese:`IBM Plex Sans SC`,fallback:`"IBM Plex Sans", "IBM Plex Sans SC", sans-serif`},apple:{english:`SF Pro Display`,chinese:`PingFang SC`,fallback:`"SF Pro Display", "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif`},google:{english:`Roboto`,chinese:`Noto Sans SC`,fallback:`"Roboto", "Noto Sans SC", sans-serif`}};function Rr(e){Mr(Lr[e])}function zr(){let e=document.documentElement;return{chinese:e.style.getPropertyValue(`--wc-font-chinese`)||void 0,english:e.style.getPropertyValue(`--wc-font-english`)||void 0,fallback:e.style.getPropertyValue(`--wc-font-family`)||void 0}}async function Br(e=`/theme.config.json`){if(!(typeof window>`u`||typeof fetch>`u`))try{let t=await fetch(e,{cache:`no-store`});if(!t.ok){console.info(`[Watercolor UI] theme.config.json not found, using default theme`);return}let n=await t.json();Ar(n),n.fonts&&Mr(n.fonts),console.info(`[Watercolor UI] Theme loaded from theme.config.json`)}catch(e){console.warn(`[Watercolor UI] 无法加载自定义 theme.config.json:`,e),console.info(`[Watercolor UI] Using default theme`)}}typeof window<`u`&&Br();function Vr(){return Fr.default}function Hr(e=`default`,t=!1){let n=typeof window<`u`&&typeof document<`u`,r=null,i=null;if(n)try{r=localStorage.getItem(`wc-color`),i=localStorage.getItem(`wc-scheme`)}catch{}let a=r||e,o=i?i===`dark`:t;if(n){let e=Vr();Ar({primary:e.primary,secondary:e.secondary}),Nr(o)}return{get color(){return a},get dark(){return o},setColor:e=>{if(e!==a&&(a=e,n)){let t=Vr();Ar({primary:t.primary,secondary:t.secondary});try{localStorage.setItem(`wc-color`,e)}catch{}}},toggleDark:()=>{if(o=!o,n){Nr(o);try{localStorage.setItem(`wc-scheme`,o?`dark`:`light`)}catch{}}}}}var Ur=(0,t.createContext)(void 0),Wr=Hr(),Gr=({children:e})=>{let[n,r]=(0,t.useState)(Wr.color),[i,a]=(0,t.useState)(Wr.dark);return(0,y.jsx)(Ur.Provider,{value:{color:n,setColor:e=>{Wr.setColor(e),r(e)},dark:i,toggleDark:()=>{Wr.toggleDark(),a(Wr.dark)}},children:e})};function Kr(){let e=(0,t.useContext)(Ur);if(!e)throw Error(`useTheme must be used within ThemeProvider`);return e}e.Accordion=b,e.Alert=w,e.AppBar=T,e.Autocomplete=E,e.Avatar=M,e.Badge=L,e.Banner=W,e.Blockquote=J,e.Box=se,e.Breadcrumb=me,e.Button=be,e.Card=q,e.CardActions=xe,e.CardContent=Se,e.Checkbox=Te,e.Chip=je,e.CircularProgress=Re,e.ColorPicker=He,e.Container=Ge,e.Copy=$e,e.DatePicker=ot,e.Fab=st,e.Feature=vt,e.Feed=lt,e.FileInput=yt,e.FormControl=xt,e.FormControlLabel=St,e.FormGroup=Ct,e.FormHelperText=wt,e.Grid=Tt,e.HoverCard=Et,e.Icon=Bt,e.IconButton=Vt,e.ImageGallery=Ht,e.Input=Ut,e.List=Yt,e.ListItem=Xt,e.ListItemIcon=Zt,e.ListItemText=Qt,e.Menu=cn,e.Modal=hn,e.NumberAnimation=gn,e.Pagination=_n,e.Paper=Cn,e.Popover=wn,e.PricingTable=Tn,e.Progress=En,e.Radio=kn,e.RadioGroup=On,e.Rating=An,e.Select=jn,e.Skeleton=Nn,e.SlideOver=Fn,e.Slider=Pn,e.Snackbar=Ln,e.Status=Kn,e.Switch=qn,e.Table=er,e.TableBody=Zn,e.TableCell=$n,e.TableHead=Xn,e.TableRow=Qn,e.Tabs=tr,e.TextField=nr,e.ThemeProvider=Gr,e.Toolbar=ir,e.Tooltip=lr,e.TypingText=yr,e.Typography=_r,e.VerificationCodeInput=br,e.VideoPlayer=wr,e.Watermark=kr,e.applyCSSTheme=jr,e.applyFontTheme=Rr,e.applyTheme=Ir,e.fontThemes=Lr,e.getCurrentFonts=zr,e.isDarkMode=Pr,e.loadThemeConfig=Br,e.setFonts=Mr,e.setTheme=Ar,e.themes=Fr,e.toggleDarkMode=Nr,e.useTheme=Kr});