371 lines
495 KiB
JavaScript
371 lines
495 KiB
JavaScript
|
|
var Tg=Object.defineProperty;var Mg=(e,t,n)=>t in e?Tg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var _u=(e,t,n)=>Mg(e,typeof t!="symbol"?t+"":t,n);function Lg(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const u in r)if(u!=="default"&&!(u in e)){const o=Object.getOwnPropertyDescriptor(r,u);o&&Object.defineProperty(e,u,o.get?o:{enumerable:!0,get:()=>r[u]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))r(u);new MutationObserver(u=>{for(const o of u)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(u){const o={};return u.integrity&&(o.integrity=u.integrity),u.referrerPolicy&&(o.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?o.credentials="include":u.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(u){if(u.ep)return;u.ep=!0;const o=n(u);fetch(u.href,o)}})();var wt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jf={exports:{}},il={},ep={exports:{}},Q={};/**
|
|||
|
|
* @license React
|
|||
|
|
* react.production.min.js
|
|||
|
|
*
|
|||
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the MIT license found in the
|
|||
|
|
* LICENSE file in the root directory of this source tree.
|
|||
|
|
*/var wo=Symbol.for("react.element"),Ig=Symbol.for("react.portal"),Og=Symbol.for("react.fragment"),$g=Symbol.for("react.strict_mode"),Bg=Symbol.for("react.profiler"),Ug=Symbol.for("react.provider"),Hg=Symbol.for("react.context"),Vg=Symbol.for("react.forward_ref"),Wg=Symbol.for("react.suspense"),qg=Symbol.for("react.memo"),Kg=Symbol.for("react.lazy"),_d=Symbol.iterator;function Gg(e){return e===null||typeof e!="object"?null:(e=_d&&e[_d]||e["@@iterator"],typeof e=="function"?e:null)}var tp={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},np=Object.assign,rp={};function ou(e,t,n){this.props=e,this.context=t,this.refs=rp,this.updater=n||tp}ou.prototype.isReactComponent={};ou.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ou.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function up(){}up.prototype=ou.prototype;function Ga(e,t,n){this.props=e,this.context=t,this.refs=rp,this.updater=n||tp}var Za=Ga.prototype=new up;Za.constructor=Ga;np(Za,ou.prototype);Za.isPureReactComponent=!0;var Ed=Array.isArray,op=Object.prototype.hasOwnProperty,Qa={current:null},ip={key:!0,ref:!0,__self:!0,__source:!0};function lp(e,t,n){var r,u={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)op.call(t,r)&&!ip.hasOwnProperty(r)&&(u[r]=t[r]);var l=arguments.length-2;if(l===1)u.children=n;else if(1<l){for(var s=Array(l),a=0;a<l;a++)s[a]=arguments[a+2];u.children=s}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)u[r]===void 0&&(u[r]=l[r]);return{$$typeof:wo,type:e,key:o,ref:i,props:u,_owner:Qa.current}}function Zg(e,t){return{$$typeof:wo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ya(e){return typeof e=="object"&&e!==null&&e.$$typeof===wo}function Qg(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Sd=/\/+/g;function Il(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Qg(""+e.key):t.toString(36)}function ii(e,t,n,r,u){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case wo:case Ig:i=!0}}if(i)return i=e,u=u(i),e=r===""?"."+Il(i,0):r,Ed(u)?(n="",e!=null&&(n=e.replace(Sd,"$&/")+"/"),ii(u,t,n,"",function(a){return a})):u!=null&&(Ya(u)&&(u=Zg(u,n+(!u.key||i&&i.key===u.key?"":(""+u.key).replace(Sd,"$&/")+"/")+e)),t.push(u)),1;if(i=0,r=r===""?".":r+":",Ed(e))for(var l=0;l<e.length;l++){o=e[l];var s=r+Il(o,l);i+=ii(o,t,n,s,u)}else if(s=Gg(e),typeof s=="function")for(e=s.call(e),l=0;!(o=e.next()).done;)o=o.value,s=r+Il(o,l++),i+=ii(o,t,n,s,u);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function Po(e,t,n){if(e==null)return e;var r=[],u=0;return ii(e,r,"","",function(o){return t.call(n,o,u++)}),r}function Yg(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ke={current:null},li={transition:null},Xg={ReactCurrentDispatcher:Ke,ReactCurrentBatchConfig:li,ReactCurrentOwner:Qa};function sp(){throw Error("act(...) is not supported in production builds of React.")}Q.Children={map:Po,forEach:function(e,t,n){Po(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Po(e,function(){t++}),t},toArray:function(e){return Po(e,function(t){return t})||[]},only:function(e){if(!Ya(e))throw Error("React.Children.only expected to receive a sing
|
|||
|
|
* @license React
|
|||
|
|
* react-jsx-runtime.production.min.js
|
|||
|
|
*
|
|||
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the MIT license found in the
|
|||
|
|
* LICENSE file in the root directory of this source tree.
|
|||
|
|
*/var Jg=g,e2=Symbol.for("react.element"),t2=Symbol.for("react.fragment"),n2=Object.prototype.hasOwnProperty,r2=Jg.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u2={key:!0,ref:!0,__self:!0,__source:!0};function cp(e,t,n){var r,u={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)n2.call(t,r)&&!u2.hasOwnProperty(r)&&(u[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)u[r]===void 0&&(u[r]=t[r]);return{$$typeof:e2,type:e,key:o,ref:i,props:u,_owner:r2.current}}il.Fragment=t2;il.jsx=cp;il.jsxs=cp;Jf.exports=il;var c=Jf.exports,Ps={},dp={exports:{}},pt={},fp={exports:{}},pp={};/**
|
|||
|
|
* @license React
|
|||
|
|
* scheduler.production.min.js
|
|||
|
|
*
|
|||
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the MIT license found in the
|
|||
|
|
* LICENSE file in the root directory of this source tree.
|
|||
|
|
*/(function(e){function t(N,P){var j=N.length;N.push(P);e:for(;0<j;){var L=j-1>>>1,V=N[L];if(0<u(V,P))N[L]=P,N[j]=V,j=L;else break e}}function n(N){return N.length===0?null:N[0]}function r(N){if(N.length===0)return null;var P=N[0],j=N.pop();if(j!==P){N[0]=j;e:for(var L=0,V=N.length,$e=V>>>1;L<$e;){var ee=2*(L+1)-1,ye=N[ee],he=ee+1,H=N[he];if(0>u(ye,j))he<V&&0>u(H,ye)?(N[L]=H,N[he]=j,L=he):(N[L]=ye,N[ee]=j,L=ee);else if(he<V&&0>u(H,j))N[L]=H,N[he]=j,L=he;else break e}}return P}function u(N,P){var j=N.sortIndex-P.sortIndex;return j!==0?j:N.id-P.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,l=i.now();e.unstable_now=function(){return i.now()-l}}var s=[],a=[],d=1,p=null,m=3,y=!1,v=!1,b=!1,C=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(N){for(var P=n(a);P!==null;){if(P.callback===null)r(a);else if(P.startTime<=N)r(a),P.sortIndex=P.expirationTime,t(s,P);else break;P=n(a)}}function w(N){if(b=!1,h(N),!v)if(n(s)!==null)v=!0,B(k);else{var P=n(a);P!==null&&$(w,P.startTime-N)}}function k(N,P){v=!1,b&&(b=!1,x(E),E=-1),y=!0;var j=m;try{for(h(P),p=n(s);p!==null&&(!(p.expirationTime>P)||N&&!z());){var L=p.callback;if(typeof L=="function"){p.callback=null,m=p.priorityLevel;var V=L(p.expirationTime<=P);P=e.unstable_now(),typeof V=="function"?p.callback=V:p===n(s)&&r(s),h(P)}else r(s);p=n(s)}if(p!==null)var $e=!0;else{var ee=n(a);ee!==null&&$(w,ee.startTime-P),$e=!1}return $e}finally{p=null,m=j,y=!1}}var _=!1,S=null,E=-1,A=5,D=-1;function z(){return!(e.unstable_now()-D<A)}function M(){if(S!==null){var N=e.unstable_now();D=N;var P=!0;try{P=S(!0,N)}finally{P?U():(_=!1,S=null)}}else _=!1}var U;if(typeof f=="function")U=function(){f(M)};else if(typeof MessageChannel<"u"){var T=new MessageChannel,I=T.port2;T.port1.onmessage=M,U=function(){I.postMessage(null)}}else U=function(){C(M,0)};function B(N){S=N,_||(_=!0,U())}function $(N,P){E=C(function(){N(e.unstable_now())},P)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(N){N.callback=null},e.unstable_continueExecution=function(){v||y||(v=!0,B(k))},e.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<N?Math.floor(1e3/N):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(s)},e.unstable_next=function(N){switch(m){case 1:case 2:case 3:var P=3;break;default:P=m}var j=m;m=P;try{return N()}finally{m=j}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(N,P){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var j=m;m=N;try{return P()}finally{m=j}},e.unstable_scheduleCallback=function(N,P,j){var L=e.unstable_now();switch(typeof j=="object"&&j!==null?(j=j.delay,j=typeof j=="number"&&0<j?L+j:L):j=L,N){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=j+V,N={id:d++,callback:P,priorityLevel:N,startTime:j,expirationTime:V,sortIndex:-1},j>L?(N.sortIndex=j,t(a,N),n(s)===null&&N===n(a)&&(b?(x(E),E=-1):b=!0,$(w,j-L))):(N.sortIndex=V,t(s,N),v||y||(v=!0,B(k))),N},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(N){var P=m;return function(){var j=m;m=P;try{return N.apply(this,arguments)}finally{m=j}}}})(pp);fp.exports=pp;var o2=fp.exports;/**
|
|||
|
|
* @license React
|
|||
|
|
* react-dom.production.min.js
|
|||
|
|
*
|
|||
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the MIT license found in the
|
|||
|
|
* LICENSE file in the root directory of this source tree.
|
|||
|
|
*/var i2=g,dt=o2;function R(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var hp=new Set,Yu={};function yr(e,t){Zr(e,t),Zr(e+"Capture",t)}function Zr(e,t){for(Yu[e]=t,e=0;e<t.length;e++)hp.add(t[e])}var pn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ts=Object.prototype.hasOwnProperty,l2=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ad={},Nd={};function s2(e){return Ts.call(Nd,e)?!0:Ts.call(Ad,e)?!1:l2.test(e)?Nd[e]=!0:(Ad[e]=!0,!1)}function a2(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function c2(e,t,n,r){if(t===null||typeof t>"u"||a2(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ge(e,t,n,r,u,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=u,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var Ie={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ie[e]=new Ge(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ie[t]=new Ge(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ie[e]=new Ge(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ie[e]=new Ge(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ie[e]=new Ge(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ie[e]=new Ge(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ie[e]=new Ge(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ie[e]=new Ge(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ie[e]=new Ge(e,5,!1,e.toLowerCase(),null,!1,!1)});var Xa=/[\-:]([a-z])/g;function Ja(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-
|
|||
|
|
`+Ol+e}var $l=!1;function Bl(e,t){if(!e||$l)return"";$l=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(a){var r=a}Reflect.construct(e,[],t)}else{try{t.call()}catch(a){r=a}e.call(t.prototype)}else{try{throw Error()}catch(a){r=a}e()}}catch(a){if(a&&r&&typeof a.stack=="string"){for(var u=a.stack.split(`
|
|||
|
|
`),o=r.stack.split(`
|
|||
|
|
`),i=u.length-1,l=o.length-1;1<=i&&0<=l&&u[i]!==o[l];)l--;for(;1<=i&&0<=l;i--,l--)if(u[i]!==o[l]){if(i!==1||l!==1)do if(i--,l--,0>l||u[i]!==o[l]){var s=`
|
|||
|
|
`+u[i].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}while(1<=i&&0<=l);break}}}finally{$l=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Lu(e):""}function d2(e){switch(e.tag){case 5:return Lu(e.type);case 16:return Lu("Lazy");case 13:return Lu("Suspense");case 19:return Lu("SuspenseList");case 0:case 2:case 15:return e=Bl(e.type,!1),e;case 11:return e=Bl(e.type.render,!1),e;case 1:return e=Bl(e.type,!0),e;default:return""}}function Os(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Nr:return"Fragment";case Ar:return"Portal";case Ms:return"Profiler";case tc:return"StrictMode";case Ls:return"Suspense";case Is:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case gp:return(e.displayName||"Context")+".Consumer";case mp:return(e._context.displayName||"Context")+".Provider";case nc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case rc:return t=e.displayName||null,t!==null?t:Os(e.type)||"Memo";case Nn:t=e._payload,e=e._init;try{return Os(e(t))}catch{}}return null}function f2(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Os(t);case 8:return t===tc?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Wn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function vp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function p2(e){var t=vp(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var u=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Mo(e){e._valueTracker||(e._valueTracker=p2(e))}function yp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=vp(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function _i(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function $s(e,t){var n=t.checked;return xe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function jd(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Wn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function bp(e,t){t=t.checked,t!=null&&ec(e,"checked",t,!1)}function Bs(e,t){bp(e,t);var n=Wn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Us(e,t.type,n):t.hasOwnProperty("defaultValue")&&Us(e,t.type,Wn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Fd(e,t,n){if(t.hasOwnProperty("val
|
|||
|
|
`).replace(Cx,"")}function Vo(e,t,n){if(t=e0(t),e0(e)!==t&&n)throw Error(R(425))}function zi(){}var na=null,ra=null;function ua(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var oa=typeof setTimeout=="function"?setTimeout:void 0,_x=typeof clearTimeout=="function"?clearTimeout:void 0,t0=typeof Promise=="function"?Promise:void 0,Ex=typeof queueMicrotask=="function"?queueMicrotask:typeof t0<"u"?function(e){return t0.resolve(null).then(e).catch(Sx)}:oa;function Sx(e){setTimeout(function(){throw e})}function es(e,t){var n=t,r=0;do{var u=n.nextSibling;if(e.removeChild(n),u&&u.nodeType===8)if(n=u.data,n==="/$"){if(r===0){e.removeChild(u),no(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=u}while(n);no(t)}function $n(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function n0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var lu=Math.random().toString(36).slice(2),qt="__reactFiber$"+lu,lo="__reactProps$"+lu,hn="__reactContainer$"+lu,ia="__reactEvents$"+lu,Ax="__reactListeners$"+lu,Nx="__reactHandles$"+lu;function ur(e){var t=e[qt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[hn]||n[qt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=n0(e);e!==null;){if(n=e[qt])return n;e=n0(e)}return t}e=n,n=e.parentNode}return null}function _o(e){return e=e[qt]||e[hn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function zr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(R(33))}function dl(e){return e[lo]||null}var la=[],Rr=-1;function Yn(e){return{current:e}}function de(e){0>Rr||(e.current=la[Rr],la[Rr]=null,Rr--)}function le(e,t){Rr++,la[Rr]=e.current,e.current=t}var qn={},Ve=Yn(qn),Je=Yn(!1),ar=qn;function Qr(e,t){var n=e.type.contextTypes;if(!n)return qn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var u={},o;for(o in n)u[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=u),u}function et(e){return e=e.childContextTypes,e!=null}function Ri(){de(Je),de(Ve)}function r0(e,t,n){if(Ve.current!==qn)throw Error(R(168));le(Ve,t),le(Je,n)}function sh(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var u in r)if(!(u in t))throw Error(R(108,f2(e)||"Unknown",u));return xe({},n,r)}function Pi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||qn,ar=Ve.current,le(Ve,e),le(Je,Je.current),!0}function u0(e,t,n){var r=e.stateNode;if(!r)throw Error(R(169));n?(e=sh(e,t,ar),r.__reactInternalMemoizedMergedChildContext=e,de(Je),de(Ve),le(Ve,e)):de(Je),le(Je,n)}var an=null,fl=!1,ts=!1;function ah(e){an===null?an=[e]:an.push(e)}function Dx(e){fl=!0,ah(e)}function Xn(){if(!ts&&an!==null){ts=!0;var e=0,t=oe;try{var n=an;for(oe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}an=null,fl=!1}catch(u){throw an!==null&&(an=an.slice(e+1)),Pp(oc,Xn),u}finally{oe=t,ts=!1}}return null}var Pr=[],Tr=0,Ti=null,Mi=0,xt=[],vt=0,cr=null,cn=1,dn="";function nr(e,t){Pr[Tr++]=Mi,Pr[Tr++]=Ti,Ti=e,Mi=t}function ch(e,t,n){xt[vt++]=cn,xt[vt++]=dn,xt[vt++]=cr,cr=e;var r=cn;e=dn;var u=32-Rt(r)-1;r&=~(1<<u),n+=1;var o=32-Rt(t)+u;if(30<o){var i=u-u%5;o=(r&(1<<i)-1).toString(32),r>>=i,u-=i,cn=1<<32-Rt(t)+u|n<<u|r,dn=o+e}else cn=1<<o|n<<u|r,dn=e}function hc(e){e.return!==null&&(nr(e,1),ch(e,1,0))}function mc(e){for(;e===Ti;)Ti=Pr[--Tr],Pr[Tr]=null,Mi=Pr[--Tr],Pr[Tr]=null;for(;e===cr;)cr=xt[--vt],xt[vt]=null,dn=xt[--vt],xt[vt]=null,cn=xt[--vt],xt[vt]=null}var at=null,st=null,fe=!1,jt=null;function dh(e,t){var n=yt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletio
|
|||
|
|
Error generating stack: `+o.message+`
|
|||
|
|
`+o.stack}return{value:e,source:t,stack:u,digest:null}}function is(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function pa(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Ix=typeof WeakMap=="function"?WeakMap:Map;function Ih(e,t,n){n=fn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Vi||(Vi=!0,Ca=r),pa(e,t)},n}function Oh(e,t,n){n=fn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var u=t.value;n.payload=function(){return r(u)},n.callback=function(){pa(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){pa(e,t),typeof r!="function"&&(Un===null?Un=new Set([this]):Un.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function h0(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ix;var u=new Set;r.set(t,u)}else u=r.get(t),u===void 0&&(u=new Set,r.set(t,u));u.has(n)||(u.add(n),e=Xx.bind(null,e,t,n),t.then(e,e))}function m0(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function g0(e,t,n,r,u){return e.mode&1?(e.flags|=65536,e.lanes=u,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=fn(-1,1),t.tag=2,Bn(n,t,1))),n.lanes|=1),e)}var Ox=bn.ReactCurrentOwner,Ye=!1;function We(e,t,n,r){t.child=e===null?hh(t,null,n,r):Xr(t,e.child,n,r)}function x0(e,t,n,r,u){n=n.render;var o=t.ref;return Hr(t,u),r=Sc(e,t,n,r,o,u),n=Ac(),e!==null&&!Ye?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~u,gn(e,t,u)):(fe&&n&&hc(t),t.flags|=1,We(e,t,r,u),t.child)}function v0(e,t,n,r,u){if(e===null){var o=n.type;return typeof o=="function"&&!Lc(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,$h(e,t,o,r,u)):(e=xi(n.type,null,r,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&u)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:uo,n(i,r)&&e.ref===t.ref)return gn(e,t,u)}return t.flags|=1,e=Vn(o,r),e.ref=t.ref,e.return=t,t.child=e}function $h(e,t,n,r,u){if(e!==null){var o=e.memoizedProps;if(uo(o,r)&&e.ref===t.ref)if(Ye=!1,t.pendingProps=r=o,(e.lanes&u)!==0)e.flags&131072&&(Ye=!0);else return t.lanes=e.lanes,gn(e,t,u)}return ha(e,t,n,r,u)}function Bh(e,t,n){var r=t.pendingProps,u=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},le(Ir,ot),ot|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,le(Ir,ot),ot|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,le(Ir,ot),ot|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,le(Ir,ot),ot|=r;return We(e,t,u,n),t.child}function Uh(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ha(e,t,n,r,u){var o=et(n)?ar:Ve.current;return o=Qr(t,o),Hr(t,u),n=Sc(e,t,n,r,o,u),r=Ac(),e!==null&&!Ye?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~u,gn(e,t,u)):(fe&&r&&hc(t),t.flags|=1,We(e,t,n,u),t.child)}function y0(e,t,n,r,u){if(et(n)){var o=!0;Pi(t)}else o=!1;if(Hr(t,u),t.stateNode===null)hi(e,t),Lh(t,n,r),fa(t,n,r,u),r=!0;else if(e===null){var i=t.stateNode,l=t.memoizedProps;i.props=l;var s=i.context,a=n.contextType;typeof a=="object"&&a!==null?a=kt(a):(a=et(n)?ar:Ve.current,a=Qr(t,a));var d=n.getDerivedStateFromProps,p=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";p||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==r||s!==a)&&p0(t,i,r,a),Dn=!1;var m=t.memoizedState;i.state=m,Oi(t,r,i,u),s=t.memoizedState,l!==r||m!==s||Je.current||Dn?(typeof d=="function"&&(da(t,n,d,r),s=t.memoizedState),(l=Dn||f0(t,n,l,r,m,s,a))?(p||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.
|
|||
|
|
* react-router v7.15.0
|
|||
|
|
*
|
|||
|
|
* Copyright (c) Remix Software Inc.
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the MIT license found in the
|
|||
|
|
* LICENSE.md file in the root directory of this source tree.
|
|||
|
|
*
|
|||
|
|
* @license MIT
|
|||
|
|
*/var R0="popstate";function P0(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function cv(e={}){function t(r,u){var a;let o=(a=u.state)==null?void 0:a.masked,{pathname:i,search:l,hash:s}=o||r.location;return Aa("",{pathname:i,search:l,hash:s},u.state&&u.state.usr||null,u.state&&u.state.key||"default",o?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,u){return typeof u=="string"?u:mo(u)}return fv(t,n,null,e)}function pe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Lt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function dv(){return Math.random().toString(36).substring(2,10)}function T0(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Aa(e,t,n=null,r,u){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?au(t):t,state:n,key:t&&t.key||r||dv(),mask:u}}function mo({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function au(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function fv(e,t,n,r={}){let{window:u=document.defaultView,v5Compat:o=!1}=r,i=u.history,l="POP",s=null,a=d();a==null&&(a=0,i.replaceState({...i.state,idx:a},""));function d(){return(i.state||{idx:null}).idx}function p(){l="POP";let C=d(),x=C==null?null:C-a;a=C,s&&s({action:l,location:b.location,delta:x})}function m(C,x){l="PUSH";let f=P0(C)?C:Aa(b.location,C,x);a=d()+1;let h=T0(f,a),w=b.createHref(f.mask||f);try{i.pushState(h,"",w)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;u.location.assign(w)}o&&s&&s({action:l,location:b.location,delta:1})}function y(C,x){l="REPLACE";let f=P0(C)?C:Aa(b.location,C,x);a=d();let h=T0(f,a),w=b.createHref(f.mask||f);i.replaceState(h,"",w),o&&s&&s({action:l,location:b.location,delta:0})}function v(C){return pv(C)}let b={get action(){return l},get location(){return e(u,i)},listen(C){if(s)throw new Error("A history only accepts one active listener");return u.addEventListener(R0,p),s=C,()=>{u.removeEventListener(R0,p),s=null}},createHref(C){return t(u,C)},createURL:v,encodeLocation(C){let x=v(C);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:m,replace:y,go(C){return i.go(C)}};return b}function pv(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),pe(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:mo(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function f1(e,t,n="/"){return hv(e,t,n,!1)}function hv(e,t,n,r,u){let o=typeof t=="string"?au(t):t,i=xn(o.pathname||"/",n);if(i==null)return null;let l=mv(e),s=null,a=Av(i);for(let d=0;s==null&&d<l.length;++d)s=Ev(l[d],a,r);return s}function mv(e){let t=p1(e);return gv(t),t}function p1(e,t=[],n=[],r="",u=!1){let o=(i,l,s=u,a)=>{let d={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};if(d.relativePath.startsWith("/")){if(!d.relativePath.startsWith(r)&&s)return;pe(d.relativePath.startsWith(r),`Absolute route path "${d.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(r.length)}let p=Tt([r,d.relativePath]),m=n.concat(d);i.children&&i.children.length>0&&(pe(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),p1(i.children,t,m,p,s)),!(i.path==null&&!i.index)&&t.push({path:p,score:Cv(p,i.index),routesMeta:m})};return e.forEach((i,l)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))o(i,l);else for(let a of h1(i.path))o(i,l,!0,a)}),t}function h1(e){let t=e.split("/");i
|
|||
|
|
|
|||
|
|
Please change the parent <Route path="${x}"> to <Route path="${x==="/"?"*":`${x}/*`}">.`)}let d=Et(),p;if(t){let x=typeof t=="string"?au(t):t;pe(s==="/"||((C=x.pathname)==null?void 0:C.startsWith(s)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${x.pathname}" was given in the \`location\` prop.`),p=x}else p=d;let m=p.pathname||"/",y=m;if(s!=="/"){let x=s.replace(/^\//,"").split("/");y="/"+m.replace(/^\//,"").split("/").slice(x.length).join("/")}let v=n&&n.state.matches.length?n.state.matches.map(x=>Object.assign(x,{route:n.manifest[x.route.id]||x.route})):f1(e,{pathname:y});Lt(a||v!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),Lt(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let b=Xv(v&&v.map(x=>Object.assign({},x,{params:Object.assign({},i,x.params),pathname:Tt([s,r.encodeLocation?r.encodeLocation(x.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?s:Tt([s,r.encodeLocation?r.encodeLocation(x.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:x.pathnameBase])})),u,n);return t&&b?g.createElement(So.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...p},navigationType:"POP"}},b):b}function Gv(){let e=ry(),t=Tv(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",u={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=g.createElement(g.Fragment,null,g.createElement("p",null,"💿 Hey developer 👋"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:o},"ErrorBoundary")," or"," ",g.createElement("code",{style:o},"errorElement")," prop on your route.")),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),n?g.createElement("pre",{style:u},n):null,i)}var Zv=g.createElement(Gv,null),S1=class extends g.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=Vv(e.digest);n&&(e=n)}let t=e!==void 0?g.createElement(Bt.Provider,{value:this.props.routeContext},g.createElement(Hc.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?g.createElement(Qv,{error:e},t):t}};S1.contextType=y1;var ds=new WeakMap;function Qv({children:e,error:t}){let{basename:n}=g.useContext(mt);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=Hv(t.digest);if(r){let u=ds.get(t);if(u)throw u;let o=x1(r.location,n);if(g1&&!ds.get(t))if(o.isExternal||r.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const i=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:r.replace}));throw ds.
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const By=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),R1=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/var Uy={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const Hy=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:u="",children:o,iconNode:i,...l},s)=>g.createElement("svg",{ref:s,...Uy,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:R1("lucide",u),...l},[...i.map(([a,d])=>g.createElement(a,d)),...Array.isArray(o)?o:[o]]));/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const Z=(e,t)=>{const n=g.forwardRef(({className:r,...u},o)=>g.createElement(Hy,{ref:o,iconNode:t,className:R1(`lucide-${By(e)}`,r),...u}));return n.displayName=`${e}`,n};/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const Vy=Z("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const Wy=Z("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const qy=Z("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const Ky=Z("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const $0=Z("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const ps=Z("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const P1=Z("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const T1=Z("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const M1=Z("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const Qc=Z("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const Gy=Z("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const Zy=Z("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const Qy=Z("CircleStop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const Yy=Z("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const Xy=Z("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const Da=Z("Film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const ja=Z("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const hr=Z("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const Jy=Z("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const Fa=Z("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const Qi=Z("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const eb=Z("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const B0=Z("Pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const L1=Z("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const U0=Z("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const tb=Z("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const Yc=Z("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const nb=Z("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const za=Z("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const rb=Z("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const ub=Z("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const H0=Z("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const ob=Z("TestTubeDiagonal",[["path",{d:"M21 7 6.82 21.18a2.83 2.83 0 0 1-3.99-.01a2.83 2.83 0 0 1 0-4L17 3",key:"1ub6xw"}],["path",{d:"m16 2 6 6",key:"1gw87d"}],["path",{d:"M12 16H4",key:"1cjfip"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const No=Z("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const ib=Z("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const lb=Z("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const sb=Z("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
|
|||
|
|
* @license lucide-react v0.460.0 - ISC
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the ISC license.
|
|||
|
|
* See the LICENSE file in the root directory of this source tree.
|
|||
|
|
*/const pu=Z("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function I1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var u=e.length;for(t=0;t<u;t++)e[t]&&(n=I1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function O1(){for(var e,t,n=0,r="",u=arguments.length;n<u;n++)(e=arguments[n])&&(t=I1(e))&&(r&&(r+=" "),r+=t);return r}const Xc="-",ab=e=>{const t=db(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const l=i.split(Xc);return l[0]===""&&l.length!==1&&l.shift(),$1(l,t)||cb(i)},getConflictingClassGroupIds:(i,l)=>{const s=n[i]||[];return l&&r[i]?[...s,...r[i]]:s}}},$1=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),u=r?$1(e.slice(1),r):void 0;if(u)return u;if(t.validators.length===0)return;const o=e.join(Xc);return(i=t.validators.find(({validator:l})=>l(o)))==null?void 0:i.classGroupId},V0=/^\[(.+)\]$/,cb=e=>{if(V0.test(e)){const t=V0.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},db=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return pb(Object.entries(e.classGroups),n).forEach(([o,i])=>{Ra(i,r,o,t)}),r},Ra=(e,t,n,r)=>{e.forEach(u=>{if(typeof u=="string"){const o=u===""?t:W0(t,u);o.classGroupId=n;return}if(typeof u=="function"){if(fb(u)){Ra(u(r),t,n,r);return}t.validators.push({validator:u,classGroupId:n});return}Object.entries(u).forEach(([o,i])=>{Ra(i,W0(t,o),n,r)})})},W0=(e,t)=>{let n=e;return t.split(Xc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},fb=e=>e.isThemeGetter,pb=(e,t)=>t?e.map(([n,r])=>{const u=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,l])=>[t+i,l])):o);return[n,u]}):e,hb=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const u=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let i=n.get(o);if(i!==void 0)return i;if((i=r.get(o))!==void 0)return u(o,i),i},set(o,i){n.has(o)?n.set(o,i):u(o,i)}}},B1="!",mb=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,u=t[0],o=t.length,i=l=>{const s=[];let a=0,d=0,p;for(let C=0;C<l.length;C++){let x=l[C];if(a===0){if(x===u&&(r||l.slice(C,C+o)===t)){s.push(l.slice(d,C)),d=C+o;continue}if(x==="/"){p=C;continue}}x==="["?a++:x==="]"&&a--}const m=s.length===0?l:l.substring(d),y=m.startsWith(B1),v=y?m.substring(1):m,b=p&&p>d?p-d:void 0;return{modifiers:s,hasImportantModifier:y,baseClassName:v,maybePostfixModifierPosition:b}};return n?l=>n({className:l,parseClassName:i}):i},gb=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},xb=e=>({cache:hb(e.cacheSize),parseClassName:mb(e),...ab(e)}),vb=/\s+/,yb=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:u}=t,o=[],i=e.trim().split(vb);let l="";for(let s=i.length-1;s>=0;s-=1){const a=i[s],{modifiers:d,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:y}=n(a);let v=!!y,b=r(v?m.substring(0,y):m);if(!b){if(!v){l=a+(l.length>0?" "+l:l);continue}if(b=r(m),!b){l=a+(l.length>0?" "+l:l);continue}v=!1}const C=gb(d).join(":"),x=p?C+B1:C,f=x+b;if(o.includes(f))continue;o.push(f);const h=u(b,v);for(let w=0;w<h.length;++w){const k=h[w];o.push(x+k)}l=a+(l.length>0?" "+l:l)}return l};function bb(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=U1(t))&&(r&&(r+=" "),r+=n);return r}const U1=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=U1(e[r]))&&(n&&(n+=" "),n+=t);return n};function wb(e,...t){let n,r,u,o=i;function i(s){const a=t.reduce((d,p)=>p(d),e());return n=xb(a),r=n.cache.get,u=n.cache.set,o=l,l(s)}function l(s){const a=r(s);if(a)return a;const d=yb(s,n);return u(s,d),d}return function(){return o(bb.apply(null,arguments))}}const ae=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},H1=/^\[(?:([a-z-]+):)?(.+)\]$/i,kb=/^\
|
|||
|
|
${t?"bg-white ring-1 ring-indigo-200/60 shadow-sm shadow-indigo-100/30":"hover:bg-white hover:shadow-sm hover:shadow-zinc-200/40"}`,children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[e.pinned?c.jsx(B0,{size:10,className:"text-indigo-400 flex-shrink-0"}):null,c.jsx("span",{className:`text-[13px] truncate flex-1 leading-snug ${t?"text-indigo-700 font-medium":"text-zinc-600"}`,children:e.title}),c.jsxs("div",{className:"opacity-0 group-hover:opacity-100 flex gap-0.5 transition-opacity duration-150 flex-shrink-0",children:[c.jsx("button",{onClick:r,className:`p-0.5 rounded-md transition-colors ${e.pinned?"text-indigo-400":"text-zinc-300 hover:text-zinc-500 hover:bg-zinc-100"}`,title:e.pinned?"取消置顶":"置顶",children:c.jsx(B0,{size:12})}),c.jsx("button",{onClick:u,className:"p-0.5 rounded-md text-zinc-300 hover:text-red-500 hover:bg-red-50 transition-colors",title:"删除",children:c.jsx(No,{size:12})})]})]}),c.jsx("span",{className:"text-[10px] text-zinc-300 mt-0.5 block",children:o(e.updated_at)})]})}const Yb={success:Zy,error:Gy,info:Jy},Xb={success:"text-green-600 bg-green-50 border-green-200",error:"text-red-600 bg-red-50 border-red-200",info:"text-zinc-600 bg-zinc-50 border-zinc-200"};function Jb({toasts:e,dismiss:t}){return c.jsx("div",{className:"fixed bottom-6 right-6 z-[100] flex flex-col gap-2 pointer-events-none",children:e.map(n=>c.jsx(e3,{item:n,dismiss:t},n.id))})}function e3({item:e,dismiss:t}){const n=Yb[e.type],r=g.useRef(null);return g.useEffect(()=>{var u;(u=r.current)==null||u.animate([{opacity:0,transform:"translateY(8px)"},{opacity:1,transform:"translateY(0)"}],{duration:200,fill:"forwards"})},[]),c.jsxs("div",{ref:r,className:Xe("pointer-events-auto flex items-center gap-2 px-3.5 py-2.5 rounded-lg border shadow-lg text-sm",Xb[e.type]),children:[c.jsx(n,{size:15,className:"flex-shrink-0"}),c.jsx("span",{className:"flex-1",children:e.message}),c.jsx("button",{onClick:()=>t(e.id),className:"opacity-60 hover:opacity-100 ml-1",children:c.jsx(pu,{size:13})})]})}function t3({children:e}){const{pathname:t}=Et(),n=fu(),r=t.startsWith("/chat"),{toasts:u,dismiss:o}=Jc();return g.useEffect(()=>{const i=l=>{l.key==="Escape"&&(l.target instanceof HTMLInputElement||l.target instanceof HTMLTextAreaElement||l.target instanceof HTMLSelectElement||t.startsWith("/accounts/")&&t!=="/accounts"&&n("/accounts"))};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[t,n]),c.jsxs("div",{className:"h-screen flex bg-white text-zinc-900 overflow-hidden",children:[c.jsx(Ub,{}),r&&c.jsx(Qb,{}),c.jsx("main",{className:"flex-1 flex flex-col min-w-0 bg-gradient-to-br from-zinc-50/50 to-white",children:e}),c.jsx(Jb,{toasts:u,dismiss:o})]})}class n3{constructor(){_u(this,"ws",null);_u(this,"handlers",new Map);_u(this,"reconnectTimer",null);_u(this,"intentionallyClosed",!1)}connect(){this.intentionallyClosed=!1;const n=`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}/ws`;this.ws=new WebSocket(n),this.ws.onopen=()=>{this.emit("connected",{})},this.ws.onmessage=r=>{try{const{type:u,data:o}=JSON.parse(r.data);this.emit(u,o)}catch{}},this.ws.onclose=()=>{this.intentionallyClosed||(this.reconnectTimer=setTimeout(()=>this.connect(),3e3))}}on(t,n){this.handlers.has(t)||this.handlers.set(t,[]),this.handlers.get(t).push(n)}off(t,n){const r=this.handlers.get(t);if(r){const u=r.indexOf(n);u!==-1&&r.splice(u,1)}}send(t,n={}){var r;((r=this.ws)==null?void 0:r.readyState)===WebSocket.OPEN&&this.ws.send(JSON.stringify({type:t,...n}))}stop(){this.send("stop")}emit(t,n){(this.handlers.get(t)||[]).forEach(r=>r(n))}disconnect(){var t;this.intentionallyClosed=!0,this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectTimer=null,(t=this.ws)==null||t.close(),this.ws=null}}const ue=new n3;function r3(e){const[t,n]=g.useState([]),[r,u]=g.useState(!1),[o,i]=g.useState(!1),[l,s]=g.useState(null),[a,d]=g.useState(null),p=g.useRef(null),m=g.useRef(null);g.useEffect(()=>{const x=()=>u(!0),f=T=>{n(T.messages||[])},h=T=>{n(I=>[...I,T])},w=T=>{T.status==="thinking"
|
|||
|
|
`," "],c3=["{","}","|","\\","^","`"].concat(a3),d3=["'"].concat(c3),Y0=["%","/","?",";","#"].concat(d3),X0=["/","?","#"],f3=255,J0=/^[+a-z0-9A-Z_-]{0,63}$/,p3=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,ef={javascript:!0,"javascript:":!0},tf={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function td(e,t){if(e&&e instanceof Yi)return e;const n=new Yi;return n.parse(e,t),n}Yi.prototype.parse=function(e,t){let n,r,u,o=e;if(o=o.trim(),!t&&e.split("#").length===1){const a=s3.exec(o);if(a)return this.pathname=a[1],a[2]&&(this.search=a[2]),this}let i=i3.exec(o);if(i&&(i=i[0],n=i.toLowerCase(),this.protocol=i,o=o.substr(i.length)),(t||i||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(u=o.substr(0,2)==="//",u&&!(i&&ef[i])&&(o=o.substr(2),this.slashes=!0)),!ef[i]&&(u||i&&!tf[i])){let a=-1;for(let v=0;v<X0.length;v++)r=o.indexOf(X0[v]),r!==-1&&(a===-1||r<a)&&(a=r);let d,p;a===-1?p=o.lastIndexOf("@"):p=o.lastIndexOf("@",a),p!==-1&&(d=o.slice(0,p),o=o.slice(p+1),this.auth=d),a=-1;for(let v=0;v<Y0.length;v++)r=o.indexOf(Y0[v]),r!==-1&&(a===-1||r<a)&&(a=r);a===-1&&(a=o.length),o[a-1]===":"&&a--;const m=o.slice(0,a);o=o.slice(a),this.parseHost(m),this.hostname=this.hostname||"";const y=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!y){const v=this.hostname.split(/\./);for(let b=0,C=v.length;b<C;b++){const x=v[b];if(x&&!x.match(J0)){let f="";for(let h=0,w=x.length;h<w;h++)x.charCodeAt(h)>127?f+="x":f+=x[h];if(!f.match(J0)){const h=v.slice(0,b),w=v.slice(b+1),k=x.match(p3);k&&(h.push(k[1]),w.unshift(k[2])),w.length&&(o=w.join(".")+o),this.hostname=h.join(".");break}}}}this.hostname.length>f3&&(this.hostname=""),y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const l=o.indexOf("#");l!==-1&&(this.hash=o.substr(l),o=o.slice(0,l));const s=o.indexOf("?");return s!==-1&&(this.search=o.substr(s),o=o.slice(0,s)),o&&(this.pathname=o),tf[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Yi.prototype.parseHost=function(e){let t=l3.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const h3=Object.freeze(Object.defineProperty({__proto__:null,decode:nu,encode:Do,format:ed,parse:td},Symbol.toStringTag,{value:"Module"})),Z1=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Q1=/[\0-\x1F\x7F-\x9F]/,m3=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,nd=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uD
|
|||
|
|
`};nn.fence=function(e,t,n,r,u){const o=e[t],i=o.info?ru(o.info).trim():"";let l="",s="";if(i){const d=i.split(/(\s+)/g);l=d[0],s=d.slice(2).join("")}let a;if(n.highlight?a=n.highlight(o.content,l,s)||Kn(o.content):a=Kn(o.content),a.indexOf("<pre")===0)return a+`
|
|||
|
|
`;if(i){const d=o.attrIndex("class"),p=o.attrs?o.attrs.slice():[];d<0?p.push(["class",n.langPrefix+l]):(p[d]=p[d].slice(),p[d][1]+=" "+n.langPrefix+l);const m={attrs:p};return`<pre><code${u.renderAttrs(m)}>${a}</code></pre>
|
|||
|
|
`}return`<pre><code${u.renderAttrs(o)}>${a}</code></pre>
|
|||
|
|
`};nn.image=function(e,t,n,r,u){const o=e[t];return o.attrs[o.attrIndex("alt")][1]=u.renderInlineAsText(o.children,n,r),u.renderToken(e,t,n)};nn.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
|
|||
|
|
`:`<br>
|
|||
|
|
`};nn.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
|
|||
|
|
`:`<br>
|
|||
|
|
`:`
|
|||
|
|
`};nn.text=function(e,t){return Kn(e[t].content)};nn.html_block=function(e,t){return e[t].content};nn.html_inline=function(e,t){return e[t].content};function mu(){this.rules=El({},nn)}mu.prototype.renderAttrs=function(t){let n,r,u;if(!t.attrs)return"";for(u="",n=0,r=t.attrs.length;n<r;n++)u+=" "+Kn(t.attrs[n][0])+'="'+Kn(t.attrs[n][1])+'"';return u};mu.prototype.renderToken=function(t,n,r){const u=t[n];let o="";if(u.hidden)return"";u.block&&u.nesting!==-1&&n&&t[n-1].hidden&&(o+=`
|
|||
|
|
`),o+=(u.nesting===-1?"</":"<")+u.tag,o+=this.renderAttrs(u),u.nesting===0&&r.xhtmlOut&&(o+=" /");let i=!1;if(u.block&&(i=!0,u.nesting===1&&n+1<t.length)){const l=t[n+1];(l.type==="inline"||l.hidden||l.nesting===-1&&l.tag===u.tag)&&(i=!1)}return o+=i?`>
|
|||
|
|
`:">",o};mu.prototype.renderInline=function(e,t,n){let r="";const u=this.rules;for(let o=0,i=e.length;o<i;o++){const l=e[o].type;typeof u[l]<"u"?r+=u[l](e,o,t,n,this):r+=this.renderToken(e,o,t)}return r};mu.prototype.renderInlineAsText=function(e,t,n){let r="";for(let u=0,o=e.length;u<o;u++)switch(e[u].type){case"text":r+=e[u].content;break;case"image":r+=this.renderInlineAsText(e[u].children,t,n);break;case"html_inline":case"html_block":r+=e[u].content;break;case"softbreak":case"hardbreak":r+=`
|
|||
|
|
`;break}return r};mu.prototype.render=function(e,t,n){let r="";const u=this.rules;for(let o=0,i=e.length;o<i;o++){const l=e[o].type;l==="inline"?r+=this.renderInline(e[o].children,t,n):typeof u[l]<"u"?r+=u[l](e,o,t,n,this):r+=this.renderToken(e,o,t,n)}return r};function nt(){this.__rules__=[],this.__cache__=null}nt.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};nt.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(r){t.indexOf(r)<0&&t.push(r)})}),e.__cache__={},t.forEach(function(n){e.__cache__[n]=[],e.__rules__.forEach(function(r){r.enabled&&(n&&r.alt.indexOf(n)<0||e.__cache__[n].push(r.fn))})})};nt.prototype.at=function(e,t,n){const r=this.__find__(e),u=n||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=u.alt||[],this.__cache__=null};nt.prototype.before=function(e,t,n,r){const u=this.__find__(e),o=r||{};if(u===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(u,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null};nt.prototype.after=function(e,t,n,r){const u=this.__find__(e),o=r||{};if(u===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(u+1,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null};nt.prototype.push=function(e,t,n){const r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null};nt.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(r){const u=this.__find__(r);if(u<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[u].enabled=!0,n.push(r)},this),this.__cache__=null,n};nt.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(e,t)};nt.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(r){const u=this.__find__(r);if(u<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[u].enabled=!1,n.push(r)},this),this.__cache__=null,n};nt.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function Ut(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}Ut.prototype.attrIndex=function(t){if(!this.attrs)return-1;const n=this.attrs;for(let r=0,u=n.length;r<u;r++)if(n[r][0]===t)return r;return-1};Ut.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};Ut.prototype.attrSet=function(t,n){const r=this.attrIndex(t),u=[t,n];r<0?this.attrPush(u):this.attrs[r]=u};Ut.prototype.attrGet=function(t){const n=this.attrIndex(t);let r=null;return n>=0&&(r=this.attrs[n][1]),r};Ut.prototype.attrJoin=function(t,n){const r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};function rm(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}rm.prototype.Token=Ut;const Z3=/\r\n?|\n/g,Q3=/\0/g;function Y3(e){let t;t=e.src.replace(Z3,`
|
|||
|
|
`),t=t.replace(Q3,"<22>"),e.src=t}function X3(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function J3(e){const t=e.tokens;for(let n=0,r=t.length;n<r;n++){const u=t[n];u.type==="inline"&&e.md.inline.parse(u.content,e.md,e.env,u.children)}}function e6(e){return/^<a[>\s]/i.test(e)}function t6(e){return/^<\/a\s*>/i.test(e)}function n6(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n<r;n++){if(t[n].type!=="inline"||!e.md.linkify.pretest(t[n].content))continue;let u=t[n].children,o=0;for(let i=u.length-1;i>=0;i--){const l=u[i];if(l.type==="link_close"){for(i--;u[i].level!==l.level&&u[i].type!=="link_open";)i--;continue}if(l.type==="html_inline"&&(e6(l.content)&&o>0&&o--,t6(l.content)&&o++),!(o>0)&&l.type==="text"&&e.md.linkify.test(l.content)){const s=l.content;let a=e.md.linkify.match(s);const d=[];let p=l.level,m=0;a.length>0&&a[0].index===0&&i>0&&u[i-1].type==="text_special"&&(a=a.slice(1));for(let y=0;y<a.length;y++){const v=a[y].url,b=e.md.normalizeLink(v);if(!e.md.validateLink(b))continue;let C=a[y].text;a[y].schema?a[y].schema==="mailto:"&&!/^mailto:/i.test(C)?C=e.md.normalizeLinkText("mailto:"+C).replace(/^mailto:/,""):C=e.md.normalizeLinkText(C):C=e.md.normalizeLinkText("http://"+C).replace(/^http:\/\//,"");const x=a[y].index;if(x>m){const k=new e.Token("text","",0);k.content=s.slice(m,x),k.level=p,d.push(k)}const f=new e.Token("link_open","a",1);f.attrs=[["href",b]],f.level=p++,f.markup="linkify",f.info="auto",d.push(f);const h=new e.Token("text","",0);h.content=C,h.level=p,d.push(h);const w=new e.Token("link_close","a",-1);w.level=--p,w.markup="linkify",w.info="auto",d.push(w),m=a[y].lastIndex}if(m<s.length){const y=new e.Token("text","",0);y.content=s.slice(m),y.level=p,d.push(y)}t[n].children=u=tm(u,i,d)}}}}const um=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,r6=/\((c|tm|r)\)/i,u6=/\((c|tm|r)\)/ig,o6={c:"©",r:"®",tm:"™"};function i6(e,t){return o6[t.toLowerCase()]}function l6(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(u6,i6)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function s6(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&um.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function a6(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(r6.test(e.tokens[t].content)&&l6(e.tokens[t].children),um.test(e.tokens[t].content)&&s6(e.tokens[t].children))}const c6=/['"]/,nf=/['"]/g,rf="’";function Xo(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function d6(e,t){let n;const r=[];for(let u=0;u<e.length;u++){const o=e[u],i=e[u].level;for(n=r.length-1;n>=0&&!(r[n].level<=i);n--);if(r.length=n+1,o.type!=="text")continue;let l=o.content,s=0,a=l.length;e:for(;s<a;){nf.lastIndex=s;const d=nf.exec(l);if(!d)break;let p=!0,m=!0;s=d.index+1;const y=d[0]==="'";let v=32;if(d.index-1>=0)v=l.charCodeAt(d.index-1);else for(n=u-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){v=e[n].content.charCodeAt(e[n].content.length-1);break}let b=32;if(s<a)b=l.charCodeAt(s);else for(n=u+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){b=e[n].content.charCodeAt(0);break}const C=vo(v)||xo(String.fromCharCode(v)),x=vo(b)||xo(String.fromCharCode(b)),f=go(v),h=go(b);if(h?p=!1:x&&(f||C||(p=!1)),f?m=!1:C&&(h||x||(m=!1)),b===34&&d[0]==='"'&&v>=48&&v<=57&&(m=p=!1),p&&m&&(p=C,m=x),!p&&!m){y&&(o.content=Xo(o.content,d.index,rf));continue}if(m)for(n=r.length-1;n>=0;n--){let w=r[n];if(r[n].level<i)break;if(w.single===y&&r[n].level===i){w=r[n];let k,_;y?(k=t.md.optio
|
|||
|
|
`,o.map=[t,e.line],!0}function x6(e,t,n,r){let u=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||u+3>o)return!1;const i=e.src.charCodeAt(u);if(i!==126&&i!==96)return!1;let l=u;u=e.skipChars(u,i);let s=u-l;if(s<3)return!1;const a=e.src.slice(l,u),d=e.src.slice(u,o);if(i===96&&d.indexOf(String.fromCharCode(i))>=0)return!1;if(r)return!0;let p=t,m=!1;for(;p++,!(p>=n||(u=l=e.bMarks[p]+e.tShift[p],o=e.eMarks[p],u<o&&e.sCount[p]<e.blkIndent));)if(e.src.charCodeAt(u)===i&&!(e.sCount[p]-e.blkIndent>=4)&&(u=e.skipChars(u,i),!(u-l<s)&&(u=e.skipSpaces(u),!(u<o)))){m=!0;break}s=e.sCount[t],e.line=p+(m?1:0);const y=e.push("fence","code",0);return y.info=d,y.content=e.getLines(t+1,p,s,!0),y.markup=a,y.map=[t,e.line],!0}function v6(e,t,n,r){let u=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];const i=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(u)!==62)return!1;if(r)return!0;const l=[],s=[],a=[],d=[],p=e.md.block.ruler.getRules("blockquote"),m=e.parentType;e.parentType="blockquote";let y=!1,v;for(v=t;v<n;v++){const h=e.sCount[v]<e.blkIndent;if(u=e.bMarks[v]+e.tShift[v],o=e.eMarks[v],u>=o)break;if(e.src.charCodeAt(u++)===62&&!h){let k=e.sCount[v]+1,_,S;e.src.charCodeAt(u)===32?(u++,k++,S=!1,_=!0):e.src.charCodeAt(u)===9?(_=!0,(e.bsCount[v]+k)%4===3?(u++,k++,S=!1):S=!0):_=!1;let E=k;for(l.push(e.bMarks[v]),e.bMarks[v]=u;u<o;){const A=e.src.charCodeAt(u);if(se(A))A===9?E+=4-(E+e.bsCount[v]+(S?1:0))%4:E++;else break;u++}y=u>=o,s.push(e.bsCount[v]),e.bsCount[v]=e.sCount[v]+1+(_?1:0),a.push(e.sCount[v]),e.sCount[v]=E-k,d.push(e.tShift[v]),e.tShift[v]=u-e.bMarks[v];continue}if(y)break;let w=!1;for(let k=0,_=p.length;k<_;k++)if(p[k](e,v,n,!0)){w=!0;break}if(w){e.lineMax=v,e.blkIndent!==0&&(l.push(e.bMarks[v]),s.push(e.bsCount[v]),d.push(e.tShift[v]),a.push(e.sCount[v]),e.sCount[v]-=e.blkIndent);break}l.push(e.bMarks[v]),s.push(e.bsCount[v]),d.push(e.tShift[v]),a.push(e.sCount[v]),e.sCount[v]=-1}const b=e.blkIndent;e.blkIndent=0;const C=e.push("blockquote_open","blockquote",1);C.markup=">";const x=[t,0];C.map=x,e.md.block.tokenize(e,t,v);const f=e.push("blockquote_close","blockquote",-1);f.markup=">",e.lineMax=i,e.parentType=m,x[1]=e.line;for(let h=0;h<d.length;h++)e.bMarks[h+t]=l[h],e.tShift[h+t]=d[h],e.sCount[h+t]=a[h],e.bsCount[h+t]=s[h];return e.blkIndent=b,!0}function y6(e,t,n,r){const u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.bMarks[t]+e.tShift[t];const i=e.src.charCodeAt(o++);if(i!==42&&i!==45&&i!==95)return!1;let l=1;for(;o<u;){const a=e.src.charCodeAt(o++);if(a!==i&&!se(a))return!1;a===i&&l++}if(l<3)return!1;if(r)return!0;e.line=t+1;const s=e.push("hr","hr",0);return s.map=[t,e.line],s.markup=Array(l+1).join(String.fromCharCode(i)),!0}function of(e,t){const n=e.eMarks[t];let r=e.bMarks[t]+e.tShift[t];const u=e.src.charCodeAt(r++);if(u!==42&&u!==45&&u!==43)return-1;if(r<n){const o=e.src.charCodeAt(r);if(!se(o))return-1}return r}function lf(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];let u=n;if(u+1>=r)return-1;let o=e.src.charCodeAt(u++);if(o<48||o>57)return-1;for(;;){if(u>=r)return-1;if(o=e.src.charCodeAt(u++),o>=48&&o<=57){if(u-n>=10)return-1;continue}if(o===41||o===46)break;return-1}return u<r&&(o=e.src.charCodeAt(u),!se(o))?-1:u}function b6(e,t){const n=e.level+2;for(let r=t+2,u=e.tokens.length-2;r<u;r++)e.tokens[r].level===n&&e.tokens[r].type==="paragraph_open"&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}function w6(e,t,n,r){let u,o,i,l,s=t,a=!0;if(e.sCount[s]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[s]-e.listIndent>=4&&e.sCount[s]<e.blkIndent)return!1;let d=!1;r&&e.parentType==="paragraph"&&e.sCount[s]>=e.blkIndent&&(d=!0);let p,m,y;if((y=lf(e,s))>=0){if(p=!0,i=e.bMarks[s]+e.tShift[s],m=Number(e.src.slice(i,y-1)),d&&m!==1)return!1}else if((y=of(e,s))>=0)p=!1;else return!1;if(d&&e.skipSpaces(y)>=e.eMarks[s])return!1;if(r)return!0;const v=e.src.charCodeAt(y-1),b=e.tokens.length;p?(l=e.push("ordered_list_open","ol",1),m!==1&&(l.attrs=[["start",m]])):l=e.push("bullet_list_open","ul",1);const C=[s,0];l.map=C,l.markup=String.fromCharCode(v);let x=!1;const f=e.md.block.ruler.ge
|
|||
|
|
bg-white rounded-3xl border transition-all duration-300 relative
|
|||
|
|
${d?"border-zinc-400 shadow-xl shadow-zinc-200/60":t?"border-zinc-100 opacity-50":"border-zinc-200/80 shadow-lg shadow-zinc-100/50 focus-within:border-zinc-300 focus-within:shadow-xl focus-within:shadow-zinc-200/40"}
|
|||
|
|
`,children:[d&&c.jsx("div",{className:"absolute inset-0 rounded-3xl bg-zinc-50/80 backdrop-blur-sm z-10 flex items-center justify-center pointer-events-none",children:c.jsx("span",{className:"text-sm text-zinc-400 font-medium",children:"松开以添加图片"})}),s.length>0&&c.jsx("div",{className:"flex flex-wrap gap-2.5 px-5 pt-4",children:s.map((E,A)=>c.jsxs("div",{className:"relative group/att",children:[c.jsx("img",{src:E.preview,alt:"",className:"w-20 h-20 object-cover rounded-2xl shadow-sm"}),c.jsx("button",{onClick:()=>w(A),className:"absolute -top-2 -right-2 w-5 h-5 bg-zinc-900 text-white rounded-full flex items-center justify-center opacity-0 group-hover/att:opacity-100 transition-all duration-200 scale-75 group-hover/att:scale-100",children:c.jsx(pu,{size:10,strokeWidth:3})})]},A))}),c.jsxs("div",{className:"flex items-end gap-1 px-3 py-3",children:[c.jsx("button",{onClick:()=>{var E;return(E=m.current)==null?void 0:E.click()},disabled:t,className:"flex-shrink-0 w-10 h-10 rounded-2xl flex items-center justify-center text-zinc-300 hover:text-zinc-500 hover:bg-zinc-50 active:scale-95 transition-all duration-200 disabled:opacity-40",children:c.jsx(eb,{size:20,strokeWidth:1.8})}),c.jsx("input",{ref:m,type:"file",accept:"image/*",multiple:!0,onChange:C,className:"hidden"}),c.jsx("textarea",{ref:y,value:n,onChange:E=>r(E.target.value),onKeyDown:_,rows:1,placeholder:t?"等待回复中...":"输入消息...",className:"flex-1 bg-transparent text-[15px] resize-none outline-none placeholder:text-zinc-300 text-zinc-800 min-h-[40px] max-h-[140px] py-2 leading-relaxed",disabled:t,style:{height:"auto"},onInput:E=>{const A=E.currentTarget;A.style.height="auto",A.style.height=Math.min(A.scrollHeight,140)+"px"}}),c.jsx("button",{onClick:k,disabled:!S,className:`
|
|||
|
|
flex-shrink-0 w-10 h-10 rounded-2xl flex items-center justify-center transition-all duration-200
|
|||
|
|
${S?"bg-zinc-900 text-white hover:bg-zinc-800 active:scale-90":"bg-zinc-100 text-zinc-300"}
|
|||
|
|
`,children:c.jsx(Ky,{size:18,strokeWidth:2.5})})]})]})})]})}function Zw({phase:e,progress:t,currentItem:n,totalItems:r,status:u}){const o={images:"生成图片",upload:"上传素材",videos:"生成视频",tts:"配音",assemble:"成片组装"};return c.jsxs("div",{className:"bg-gradient-to-br from-zinc-900 to-zinc-800 border border-zinc-700/50 rounded-xl p-3.5 my-2 shadow-lg shadow-zinc-900/20",children:[c.jsxs("div",{className:"flex items-center justify-between mb-2",children:[c.jsxs("span",{className:"text-xs text-zinc-400 font-medium",children:[o[e]||e,n&&r?` (${n}/${r})`:""]}),c.jsxs("span",{className:"text-xs font-mono text-zinc-500",children:[t,"%"]})]}),c.jsx("div",{className:"w-full h-1.5 bg-zinc-700/50 rounded-full overflow-hidden",children:c.jsx("div",{className:Xe("h-full rounded-full transition-all duration-700 ease-out",t<100?"bg-gradient-to-r from-blue-500 to-indigo-400":"bg-gradient-to-r from-emerald-500 to-green-400"),style:{width:`${t}%`}})}),u&&c.jsx("p",{className:"text-xs text-zinc-500 mt-1.5",children:u})]})}const mf=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,gf=O1,Qw=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return gf(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:u,defaultVariants:o}=t,i=Object.keys(u).map(a=>{const d=n==null?void 0:n[a],p=o==null?void 0:o[a];if(d===null)return null;const m=mf(d)||mf(p);return u[a][m]}),l=n&&Object.entries(n).reduce((a,d)=>{let[p,m]=d;return m===void 0||(a[p]=m),a},{}),s=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((a,d)=>{let{class:p,className:m,...y}=d;return Object.entries(y).every(v=>{let[b,C]=v;return Array.isArray(C)?C.includes({...o,...l}[b]):{...o,...l}[b]===C})?[...a,p,m]:a},[]);return gf(e,i,s,n==null?void 0:n.class,n==null?void 0:n.className)},Yw=Qw("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),It=g.forwardRef(({className:e,variant:t,size:n,...r},u)=>c.jsx("button",{className:Xe(Yw({variant:t,size:n,className:e})),ref:u,...r}));It.displayName="Button";function xf(e,[t,n]){return Math.min(n,Math.max(t,e))}function Ee(e,t,{checkForDefaultPrevented:n=!0}={}){return function(u){if(e==null||e(u),n===!1||!u.defaultPrevented)return t==null?void 0:t(u)}}function sd(e,t=[]){let n=[];function r(o,i){const l=g.createContext(i),s=n.length;n=[...n,i];const a=p=>{var x;const{scope:m,children:y,...v}=p,b=((x=m==null?void 0:m[e])==null?void 0:x[s])||l,C=g.useMemo(()=>v,Object.values(v));return c.jsx(b.Provider,{value:C,children:y})};a.displayName=o+"Provider";function d(p,m){var b;const y=((b=m==null?void 0:m[e])==null?void 0:b[s])||l,v=g.useContext(y);if(v)return v;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${o}\``)}return[a,d]}const u=()=>{const o=n.map(i=>g.createContext(i));return function(l){const s=(l==null?void 0:l[e])||o;return g.useMemo(()=>({[`__scope${e}`]:{...l,[e]:s}}),[l,s])}};return u.scopeName=e,[r,Xw(u,...t)]}function Xw(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(o){const i=r.reduce((l,{useScope:s,scopeName:a})=>{const p=s(o)[`__scope${a}`];return{...l,...p}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function
|
|||
|
|
.`.concat(n5,` {
|
|||
|
|
overflow: hidden `).concat(r,`;
|
|||
|
|
padding-right: `).concat(l,"px ").concat(r,`;
|
|||
|
|
}
|
|||
|
|
body[`).concat(Gr,`] {
|
|||
|
|
overflow: hidden `).concat(r,`;
|
|||
|
|
overscroll-behavior: contain;
|
|||
|
|
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|||
|
|
padding-left: `.concat(u,`px;
|
|||
|
|
padding-top: `).concat(o,`px;
|
|||
|
|
padding-right: `).concat(i,`px;
|
|||
|
|
margin-left:0;
|
|||
|
|
margin-top:0;
|
|||
|
|
margin-right: `).concat(l,"px ").concat(r,`;
|
|||
|
|
`),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.`).concat(wi,` {
|
|||
|
|
right: `).concat(l,"px ").concat(r,`;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.`).concat(ki,` {
|
|||
|
|
margin-right: `).concat(l,"px ").concat(r,`;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.`).concat(wi," .").concat(wi,` {
|
|||
|
|
right: 0 `).concat(r,`;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.`).concat(ki," .").concat(ki,` {
|
|||
|
|
margin-right: 0 `).concat(r,`;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
body[`).concat(Gr,`] {
|
|||
|
|
`).concat(r5,": ").concat(l,`px;
|
|||
|
|
}
|
|||
|
|
`)},Of=function(){var e=parseInt(document.body.getAttribute(Gr)||"0",10);return isFinite(e)?e:0},k5=function(){g.useEffect(function(){return document.body.setAttribute(Gr,(Of()+1).toString()),function(){var e=Of()-1;e<=0?document.body.removeAttribute(Gr):document.body.setAttribute(Gr,e.toString())}},[])},C5=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,u=r===void 0?"margin":r;k5();var o=g.useMemo(function(){return y5(u)},[u]);return g.createElement(b5,{styles:w5(o,!t,u,n?"":"!important")})},Ua=!1;if(typeof window<"u")try{var ri=Object.defineProperty({},"passive",{get:function(){return Ua=!0,!0}});window.addEventListener("test",ri,ri),window.removeEventListener("test",ri,ri)}catch{Ua=!1}var Er=Ua?{passive:!1}:!1,_5=function(e){return e.tagName==="TEXTAREA"},tg=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!_5(e)&&n[t]==="visible")},E5=function(e){return tg(e,"overflowY")},S5=function(e){return tg(e,"overflowX")},$f=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var u=ng(e,r);if(u){var o=rg(e,r),i=o[1],l=o[2];if(i>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},A5=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},N5=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ng=function(e,t){return e==="v"?E5(t):S5(t)},rg=function(e,t){return e==="v"?A5(t):N5(t)},D5=function(e,t){return e==="h"&&t==="rtl"?-1:1},j5=function(e,t,n,r,u){var o=D5(e,window.getComputedStyle(t).direction),i=o*r,l=n.target,s=t.contains(l),a=!1,d=i>0,p=0,m=0;do{if(!l)break;var y=rg(e,l),v=y[0],b=y[1],C=y[2],x=b-C-o*v;(v||x)&&ng(e,l)&&(p+=x,m+=v);var f=l.parentNode;l=f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE?f.host:f}while(!s&&l!==document.body||s&&(t.contains(l)||t===l));return(d&&Math.abs(p)<1||!d&&Math.abs(m)<1)&&(a=!0),a},ui=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Bf=function(e){return[e.deltaX,e.deltaY]},Uf=function(e){return e&&"current"in e?e.current:e},F5=function(e,t){return e[0]===t[0]&&e[1]===t[1]},z5=function(e){return`
|
|||
|
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|||
|
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|||
|
|
`)},R5=0,Sr=[];function P5(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),u=g.useState(R5++)[0],o=g.useState(eg)[0],i=g.useRef(e);g.useEffect(function(){i.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(u));var b=t5([e.lockRef.current],(e.shards||[]).map(Uf),!0).filter(Boolean);return b.forEach(function(C){return C.classList.add("allow-interactivity-".concat(u))}),function(){document.body.classList.remove("block-interactivity-".concat(u)),b.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(u))})}}},[e.inert,e.lockRef.current,e.shards]);var l=g.useCallback(function(b,C){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!i.current.allowPinchZoom;var x=ui(b),f=n.current,h="deltaX"in b?b.deltaX:f[0]-x[0],w="deltaY"in b?b.deltaY:f[1]-x[1],k,_=b.target,S=Math.abs(h)>Math.abs(w)?"h":"v";if("touches"in b&&S==="h"&&_.type==="range")return!1;var E=window.getSelection(),A=E&&E.anchorNode,D=A?A===_||A.contains(_):!1;if(D)return!1;var z=$f(S,_);if(!z)return!0;if(z?k=S:(k=S==="v"?"h":"v",z=$f(S,_)),!z)return!1;if(!r.current&&"changedTouches"in b&&(h||w)&&(r.current=k),!k)return!0;var M=r.current||k;return j5(M,C,b,M==="h"?h:w)},[]),s=g.useCallback(function(b){var C=b;if(!(!Sr.length||Sr[Sr.length-1]!==o)){var x="deltaY"in C?Bf(C):ui(C),f=t.current.filter(function(k){return k.name===C.type&&(k.target===C.target||C.target===k.shadowParent)&&F5(k.delta,x)})[0];if(f&&f.should){C.cancelable&&C.preventDefault();return}if(!f){var h=(i.current.shards||[]).map(Uf).filter(Boolean).filter(function(k){return k.contains(C.target)}),w=h.length>0?l(C,h[0]):!i.current.noIsolation;w&&C.cancelable&&C.preventDefault()}}},[]),a=g.useCallback(function(b,C,x,f){var h={name:b,delta:C,target:x,should:f,shadowParent:T5(x)};t.current.push(h),setTimeout(function(){t.current=t.current.filter(function(w){return w!==h})},1)},[]),d=g.useCallback(function(b){n.current=ui(b),r.current=void 0},[]),p=g.useCallback(function(b){a(b.type,Bf(b),b.target,l(b,e.lockRef.current))},[]),m=g.useCallback(function(b){a(b.type,ui(b),b.target,l(b,e.lockRef.current))},[]);g.useEffect(function(){return Sr.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",s,Er),document.addEventListener("touchmove",s,Er),document.addEventListener("touchstart",d,Er),function(){Sr=Sr.filter(function(b){return b!==o}),document.removeEventListener("wheel",s,Er),document.removeEventListener("touchmove",s,Er),document.removeEventListener("touchstart",d,Er)}},[]);var y=e.removeScrollBar,v=e.inert;return g.createElement(g.Fragment,null,v?g.createElement(o,{styles:z5(u)}):null,y?g.createElement(C5,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function T5(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const M5=c5(Jm,P5);var ug=g.forwardRef(function(e,t){return g.createElement(Rl,Kt({},e,{ref:t,sideCar:M5}))});ug.classNames=Rl.classNames;var L5=[" ","Enter","ArrowUp","ArrowDown"],I5=[" ","Enter"],xr="Select",[Pl,Tl,O5]=u4(xr),[vu]=sd(xr,[O5,Om]),Ml=Om(),[$5,Jn]=vu(xr),[B5,U5]=vu(xr),og=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:u,onOpenChange:o,value:i,defaultValue:l,onValueChange:s,dir:a,name:d,autoComplete:p,disabled:m,required:y,form:v}=e,b=Ml(t),[C,x]=g.useState(null),[f,h]=g.useState(null),[w,k]=g.useState(!1),_=i4(a),[S,E]=Lf({prop:r,defaultProp:u??!1,onChange:o,caller:xr}),[A,D]=Lf({prop:i,defaultProp:l,onChange:s,caller:xr}),z=g.useRef(null),M=C?v||!!C.closest("form"):!0,[U,T]=g.useState(new Set),I=Array.from(U).map(B=>B.props.value).join(";");return c.jsx($k,{...b,children:c.jsxs($5,{required:y,scope:t,trigger:C,onTriggerChange:x,valueNode:f,onValueNodeChange:h,valueNodeHasChildren:w,onValueNodeHasChildrenChange:k,contentId:ad(),value:A,onValueChange:D,open:S,onOpenChange:E,dir:_,triggerPointerDownPosRef:z,disabled:m,children:[c.jsx(Pl.Provider,{scope:t,children:c.jsx(B5,{scope:e.__scopeSelect,onNativeOptionAdd:g.useCallback(B=>{T($=>new Set($).add(B))},[])
|
|||
|
|
|
|||
|
|
${j}`,h(null)),e?d(j,L):$(j)},[d,f,e]),P=g.useCallback(()=>{p()},[p]);if(!e){const j=u.slice(0,5);return c.jsx("div",{className:"flex-1 flex flex-col items-center justify-center bg-gradient-to-b from-white to-zinc-50/30",children:c.jsxs("div",{className:"w-full max-w-xl px-4",children:[c.jsxs("div",{className:"text-center mb-6",children:[c.jsx("div",{className:"w-14 h-14 rounded-2xl bg-gradient-to-br from-indigo-50 to-violet-50 flex items-center justify-center mx-auto mb-4 shadow-sm",children:c.jsx(Qi,{size:24,className:"text-indigo-400",strokeWidth:1.5})}),c.jsx("h2",{className:"text-lg font-semibold text-zinc-800",children:"开始新对话"}),c.jsx("p",{className:"text-sm text-zinc-400 mt-1",children:"输入消息开始创作,对话将自动创建"})]}),c.jsx(hf,{onSend:N,disabled:l||E.current}),C.length>0&&c.jsxs("div",{className:"flex items-center gap-2 mt-3 justify-center",children:[c.jsx("span",{className:"text-xs text-zinc-400",children:"当前账号:"}),c.jsxs(Yt,{value:r||"",onValueChange:L=>Pa.getState().setSelectedAccountId(L==="none"?null:L),children:[c.jsx(Ft,{className:"h-7 w-auto min-w-[100px] text-xs px-2.5 border-zinc-100 hover:border-zinc-200",children:c.jsx(Xt,{placeholder:"不指定"})}),c.jsxs(zt,{children:[c.jsx(J,{value:"none",children:"不指定"}),C.map(L=>c.jsx(J,{value:L.id,children:L.name},L.id))]})]})]}),j.length>0&&c.jsxs("div",{className:"mt-8 border-t border-zinc-100 pt-4",children:[c.jsx("p",{className:"text-[10px] text-zinc-400 uppercase tracking-wider mb-2",children:"最近对话"}),j.map(L=>c.jsxs("button",{onClick:()=>t(`/chat/${L.id}`),className:"w-full flex items-center gap-2 px-3 py-2 rounded-xl text-left hover:bg-zinc-50/80 transition-colors group",children:[c.jsx(Qi,{size:13,className:"text-zinc-300 flex-shrink-0"}),c.jsx("span",{className:"text-sm text-zinc-600 truncate flex-1 group-hover:text-zinc-800",children:L.title}),c.jsx("span",{className:"text-[10px] text-zinc-300 flex-shrink-0",children:new Date(L.updated_at).toLocaleDateString("zh-CN",{month:"short",day:"numeric"})})]},L.id))]})]})})}return c.jsxs("div",{className:"flex-1 flex flex-col bg-white h-full",children:[c.jsxs("div",{className:"px-4 py-2 border-b border-zinc-100 flex items-center justify-between flex-shrink-0",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:`w-2 h-2 rounded-full ${i?"bg-emerald-400 shadow-sm shadow-emerald-200":"bg-red-400 animate-pulse"}`}),c.jsx("span",{className:"text-xs text-zinc-400",children:i?"在线":"连接中"})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[v&&c.jsxs(It,{size:"sm",variant:"outline",className:"h-7 text-xs rounded-lg",onClick:z,children:[c.jsx(Yc,{size:12,className:"mr-1"}),"断点续跑"]}),l&&c.jsxs(It,{size:"sm",variant:"outline",className:"h-7 text-xs text-red-500 border-red-200 hover:bg-red-50 rounded-lg",onClick:P,children:[c.jsx(Qy,{size:12,className:"mr-1"}),"停止"]})]})]}),c.jsx("div",{className:"flex-1 overflow-hidden relative",children:c.jsxs("div",{className:"h-full flex flex-col",children:[c.jsxs("div",{ref:A,className:"flex-1 overflow-y-auto px-4 py-4",children:[o.map((j,L)=>j.role!=="tool"&&c.jsx(Kw,{message:j,isLast:L===o.length-1,isThinking:l,onRegenerate:j.role==="assistant"?U:void 0,onContinue:j.role==="assistant"?T:void 0,onQuote:I,onDelete:B},j.id)),a&&c.jsx(Zw,{phase:a.phase,progress:a.progress,currentItem:a.currentItem,totalItems:a.totalItems,status:a.status}),l&&!a&&c.jsxs("div",{className:"flex items-center gap-2 text-zinc-400 text-sm py-2",children:[c.jsx(Fa,{size:14,className:"animate-spin text-indigo-400"}),s||"思考中..."]})]}),_&&c.jsx("button",{onClick:()=>{var j;(j=A.current)==null||j.scrollTo({top:A.current.scrollHeight,behavior:"smooth"}),D.current=!1,S(!1)},className:"absolute bottom-4 left-1/2 -translate-x-1/2 w-9 h-9 rounded-full bg-white border border-zinc-200 shadow-lg shadow-zinc-200/60 flex items-center justify-center text-zinc-400 hover:text-zinc-700 hover:border-zinc-300 hover:shadow-xl transition-all",children:c.jsx(Vy,{size:16})}),f&&c.jsxs("div",{className
|
|||
|
|
${t?"bg-indigo-50/80 ring-1 ring-indigo-200 shadow-sm shadow-indigo-100/50":"bg-white border border-zinc-100 hover:border-zinc-200 hover:shadow-lg hover:shadow-zinc-100/80 hover:-translate-y-0.5"}`,children:[c.jsxs("div",{className:"flex items-start justify-between mb-2",children:[c.jsx("h3",{className:"font-semibold text-sm text-zinc-800 truncate flex-1 mr-2",children:e.name}),c.jsx("span",{className:`text-[10px] font-mono px-2 py-0.5 rounded-full ${t?"bg-indigo-100 text-indigo-600":"bg-zinc-100 text-zinc-500"}`,children:r})]}),e.description&&c.jsx("p",{className:"text-xs text-zinc-400 line-clamp-2 mb-3 leading-relaxed",children:e.description}),c.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[c.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] px-2 py-0.5 rounded-full bg-blue-50/80 text-blue-600",children:[c.jsx(hr,{size:10}),Vf[e.imageModel]||e.imageModel]}),c.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] px-2 py-0.5 rounded-full bg-violet-50/80 text-violet-600",children:[c.jsx(sb,{size:10}),Vf[e.videoModel]||e.videoModel]}),e.ttsVoice&&c.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded-full bg-emerald-50/80 text-emerald-600",children:"TTS"})]})]})}function g8({account:e,onSave:t}){const[n,r]=g.useState({name:e.name||"",description:e.description||"",pipeline:e.pipeline||"image-video",defaultFormat:e.defaultFormat||"9:16",imageModel:e.imageModel||"gemini",videoModel:e.videoModel||"veo3-fast",batchSize:e.batchSize||30,ttsVoice:e.ttsVoice||"",ttsInstruction:e.ttsInstruction||""}),[u,o]=g.useState(!1),i=(s,a)=>{r(d=>({...d,[s]:a})),o(!1)},l=()=>{t(n),o(!0),setTimeout(()=>o(!1),2e3)};return c.jsxs("div",{className:"max-w-lg space-y-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"text-xs font-medium text-zinc-500",children:"名称"}),c.jsx(_e,{value:n.name,onChange:s=>i("name",s.target.value),className:"mt-1 bg-zinc-50 border-zinc-200"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-xs font-medium text-zinc-500",children:"描述"}),c.jsx(_e,{value:n.description,onChange:s=>i("description",s.target.value),placeholder:"账号描述...",className:"mt-1 bg-zinc-50 border-zinc-200"})]}),c.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[c.jsxs("div",{children:[c.jsx("label",{className:"text-xs font-medium text-zinc-500",children:"画幅"}),c.jsxs(Yt,{value:n.defaultFormat,onValueChange:s=>i("defaultFormat",s),children:[c.jsx(Ft,{className:"mt-1 w-full h-10 text-sm bg-zinc-50 border-zinc-200",children:c.jsx(Xt,{})}),c.jsxs(zt,{children:[c.jsx(J,{value:"9:16",children:"9:16 竖屏"}),c.jsx(J,{value:"16:9",children:"16:9 横屏"}),c.jsx(J,{value:"1:1",children:"1:1 方形"}),c.jsx(J,{value:"4:3",children:"4:3"})]})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-xs font-medium text-zinc-500",children:"生图模型"}),c.jsxs(Yt,{value:n.imageModel,onValueChange:s=>i("imageModel",s),children:[c.jsx(Ft,{className:"mt-1 w-full h-10 text-sm bg-zinc-50 border-zinc-200",children:c.jsx(Xt,{})}),c.jsxs(zt,{children:[c.jsx(J,{value:"gemini",children:"Gemini"}),c.jsx(J,{value:"mj",children:"Midjourney"}),c.jsx(J,{value:"gpt",children:"GPT Image"}),c.jsx(J,{value:"kling",children:"Kling"})]})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-xs font-medium text-zinc-500",children:"视频模型"}),c.jsxs(Yt,{value:n.videoModel,onValueChange:s=>i("videoModel",s),children:[c.jsx(Ft,{className:"mt-1 w-full h-10 text-sm bg-zinc-50 border-zinc-200",children:c.jsx(Xt,{})}),c.jsxs(zt,{children:[c.jsx(J,{value:"veo3-fast",children:"Veo3 Fast"}),c.jsx(J,{value:"veo3-fast-frames",children:"Veo3 Frames"}),c.jsx(J,{value:"kling",children:"Kling"}),c.jsx(J,{value:"grok",children:"Grok"})]})]})]})]}),c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsxs("div",{children:[c.jsx("label",{className:"text-xs font-medium text-zinc-500",children:"Pipeline"}),c.jsxs(Yt,{value:n.pipeline,onValueChange:s=>i("pipeline",s),children:[c.jsx(Ft,{className:"mt-1 w-full h-10 text-sm bg-zinc-50 border-zinc-200",children:c.jsx(Xt,{})
|
|||
|
|
/**
|
|||
|
|
* Reset the text fill color so that placeholder is visible
|
|||
|
|
*/
|
|||
|
|
.`.concat(Ci,`:empty {
|
|||
|
|
-webkit-text-fill-color: inherit !important;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* Hack to apply on some CSS on IE10 and IE11
|
|||
|
|
*/
|
|||
|
|
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
|
|||
|
|
/**
|
|||
|
|
* IE doesn't support '-webkit-text-fill-color'
|
|||
|
|
* So we use 'color: transparent' to make the text transparent on IE
|
|||
|
|
* Unlike other browsers, it doesn't affect caret color in IE
|
|||
|
|
*/
|
|||
|
|
.`).concat(Ci,` {
|
|||
|
|
color: transparent !important;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.`).concat(Ci,`::selection {
|
|||
|
|
background-color: #accef7 !important;
|
|||
|
|
color: transparent !important;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
`),S8=gt.forwardRef(function(t,n){var r=t.autoFocus,u=t.disabled,o=t.form,i=t.highlight,l=t.ignoreTabKey,s=l===void 0?!1:l,a=t.insertSpaces,d=a===void 0?!0:a,p=t.maxLength,m=t.minLength,y=t.name,v=t.onBlur,b=t.onClick,C=t.onFocus,x=t.onKeyDown,f=t.onKeyUp,h=t.onValueChange,w=t.padding,k=w===void 0?0:w,_=t.placeholder,S=t.preClassName,E=t.readOnly,A=t.required,D=t.style,z=t.tabSize,M=z===void 0?2:z,U=t.textareaClassName,T=t.textareaId,I=t.value,B=b8(t,["autoFocus","disabled","form","highlight","ignoreTabKey","insertSpaces","maxLength","minLength","name","onBlur","onClick","onFocus","onKeyDown","onKeyUp","onValueChange","padding","placeholder","preClassName","readOnly","required","style","tabSize","textareaClassName","textareaId","value"]),$=gt.useRef({stack:[],offset:-1}),N=gt.useRef(null),P=gt.useState(!0),j=P[0],L=P[1],V={paddingTop:typeof k=="object"?k.top:k,paddingRight:typeof k=="object"?k.right:k,paddingBottom:typeof k=="object"?k.bottom:k,paddingLeft:typeof k=="object"?k.left:k},$e=i(I),ee=function(F,G){return F.substring(0,G).split(`
|
|||
|
|
`)},ye=gt.useCallback(function(F,G){var W,q,ie;G===void 0&&(G=!1);var Te=$.current,Ze=Te.stack,yu=Te.offset;if(Ze.length&&yu>-1){$.current.stack=Ze.slice(0,yu+1);var bu=$.current.stack.length;if(bu>Zf){var wr=bu-Zf;$.current.stack=Ze.slice(wr,bu),$.current.offset=Math.max($.current.offset-wr,0)}}var Ht=Date.now();if(G){var kn=$.current.stack[$.current.offset];if(kn&&Ht-kn.timestamp<C8){var wu=/[^a-z0-9]([a-z0-9]+)$/i,ut=(W=ee(kn.value,kn.selectionStart).pop())===null||W===void 0?void 0:W.match(wu),ku=(q=ee(F.value,F.selectionStart).pop())===null||q===void 0?void 0:q.match(wu);if(ut!=null&&ut[1]&&(!((ie=ku==null?void 0:ku[1])===null||ie===void 0)&&ie.startsWith(ut[1]))){$.current.stack[$.current.offset]=Fe(Fe({},F),{timestamp:Ht});return}}}$.current.stack.push(Fe(Fe({},F),{timestamp:Ht})),$.current.offset++},[]),he=gt.useCallback(function(){var F=N.current;if(F){var G=F.value,W=F.selectionStart,q=F.selectionEnd;ye({value:G,selectionStart:W,selectionEnd:q})}},[ye]),H=function(F){var G=N.current;G&&(G.value=F.value,G.selectionStart=F.selectionStart,G.selectionEnd=F.selectionEnd,h==null||h(F.value))},Y=function(F){var G=N.current,W=$.current.stack[$.current.offset];W&&G&&($.current.stack[$.current.offset]=Fe(Fe({},W),{selectionStart:G.selectionStart,selectionEnd:G.selectionEnd})),ye(F),H(F)},be=function(){var F=$.current,G=F.stack,W=F.offset,q=G[W-1];q&&(H(q),$.current.offset=Math.max(W-1,0))},ne=function(){var F=$.current,G=F.stack,W=F.offset,q=G[W+1];q&&(H(q),$.current.offset=Math.min(W+1,G.length-1))},X=function(F){if(!(x&&(x(F),F.defaultPrevented))){F.key==="Escape"&&F.currentTarget.blur();var G=F.currentTarget,W=G.value,q=G.selectionStart,ie=G.selectionEnd,Te=(d?" ":" ").repeat(M);if(F.key==="Tab"&&!s&&j)if(F.preventDefault(),F.shiftKey){var Ze=ee(W,q),yu=Ze.length-1,bu=ee(W,ie).length-1,wr=W.split(`
|
|||
|
|
`).map(function(Cu,wd){return wd>=yu&&wd<=bu&&Cu.startsWith(Te)?Cu.substring(Te.length):Cu}).join(`
|
|||
|
|
`);if(W!==wr){var Ht=Ze[yu];Y({value:wr,selectionStart:Ht!=null&&Ht.startsWith(Te)?q-Te.length:q,selectionEnd:ie-(W.length-wr.length)})}}else if(q!==ie){var Ze=ee(W,q),kn=Ze.length-1,wu=ee(W,ie).length-1,Ht=Ze[kn];Y({value:W.split(`
|
|||
|
|
`).map(function(kd,Cd){return Cd>=kn&&Cd<=wu?Te+kd:kd}).join(`
|
|||
|
|
`),selectionStart:Ht&&/\S/.test(Ht)?q+Te.length:q,selectionEnd:ie+Te.length*(wu-kn+1)})}else{var ut=q+Te.length;Y({value:W.substring(0,q)+Te+W.substring(ie),selectionStart:ut,selectionEnd:ut})}else if(F.key==="Backspace"){var ku=q!==ie,Pg=W.substring(0,q);if(Pg.endsWith(Te)&&!ku){F.preventDefault();var ut=q-Te.length;Y({value:W.substring(0,q-Te.length)+W.substring(ie),selectionStart:ut,selectionEnd:ut})}}else if(F.key==="Enter"){if(q===ie){var Ll=ee(W,q).pop(),Ro=Ll==null?void 0:Ll.match(/^\s+/);if(Ro!=null&&Ro[0]){F.preventDefault();var bd=`
|
|||
|
|
`+Ro[0],ut=q+bd.length;Y({value:W.substring(0,q)+bd+W.substring(ie),selectionStart:ut,selectionEnd:ut})}}}else if(F.keyCode===Wf||F.keyCode===qf||F.keyCode===Kf||F.keyCode===Gf){var on=void 0;F.keyCode===Wf&&F.shiftKey?on=["(",")"]:F.keyCode===qf?F.shiftKey?on=["{","}"]:on=["[","]"]:F.keyCode===Kf?F.shiftKey?on=['"','"']:on=["'","'"]:F.keyCode===Gf&&!F.shiftKey&&(on=["`","`"]),q!==ie&&on&&(F.preventDefault(),Y({value:W.substring(0,q)+on[0]+W.substring(q,ie)+on[1]+W.substring(ie),selectionStart:q,selectionEnd:ie+2}))}else(Rs?F.metaKey&&F.keyCode===oi:F.ctrlKey&&F.keyCode===oi)&&!F.shiftKey&&!F.altKey?(F.preventDefault(),be()):(Rs?F.metaKey&&F.keyCode===oi&&F.shiftKey:_8?F.ctrlKey&&F.keyCode===w8:F.ctrlKey&&F.keyCode===oi&&F.shiftKey)&&!F.altKey?(F.preventDefault(),ne()):F.keyCode===k8&&F.ctrlKey&&(!Rs||F.shiftKey)&&(F.preventDefault(),L(function(Cu){return!Cu}))}},re=function(F){var G=F.currentTarget,W=G.value,q=G.selectionStart,ie=G.selectionEnd;ye({value:W,selectionStart:q,selectionEnd:ie},!0),h(W)};return gt.useEffect(function(){he()},[he]),gt.useImperativeHandle(n,function(){return{get session(){return{history:$.current}},set session(F){$.current=F.history}}},[]),gt.createElement("div",Fe({},B,{style:Fe(Fe({},Mu.container),D)}),gt.createElement("pre",Fe({className:S,"aria-hidden":"true",style:Fe(Fe(Fe({},Mu.editor),Mu.highlight),V)},typeof $e=="string"?{dangerouslySetInnerHTML:{__html:$e+"<br />"}}:{children:$e})),gt.createElement("textarea",{ref:function(F){return N.current=F},style:Fe(Fe(Fe({},Mu.editor),Mu.textarea),V),className:Ci+(U?" ".concat(U):""),id:T,value:I,onChange:re,onKeyDown:X,onClick:b,onKeyUp:f,onFocus:C,onBlur:v,disabled:u,form:o,maxLength:p,minLength:m,name:y,placeholder:_,readOnly:E,required:A,autoFocus:r,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"data-gramm":!1}),gt.createElement("style",{dangerouslySetInnerHTML:{__html:E8}}))}),Mu={container:{position:"relative",textAlign:"left",boxSizing:"border-box",padding:0,overflow:"hidden"},textarea:{position:"absolute",top:0,left:0,height:"100%",width:"100%",resize:"none",color:"inherit",overflow:"hidden",MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",WebkitTextFillColor:"transparent"},highlight:{position:"relative",pointerEvents:"none"},editor:{margin:0,border:0,background:"none",boxSizing:"inherit",display:"inherit",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontVariantLigatures:"inherit",fontWeight:"inherit",letterSpacing:"inherit",lineHeight:"inherit",tabSize:"inherit",textIndent:"inherit",textRendering:"inherit",textTransform:"inherit",whiteSpace:"pre-wrap",wordBreak:"keep-all",overflowWrap:"break-word"}},A8=zg.default=S8,Rg={exports:{}};(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
|||
|
|
* Prism: Lightweight, robust, elegant syntax highlighting
|
|||
|
|
*
|
|||
|
|
* @license MIT <https://opensource.org/licenses/MIT>
|
|||
|
|
* @author Lea Verou <https://lea.verou.me>
|
|||
|
|
* @namespace
|
|||
|
|
* @public
|
|||
|
|
*/var n=function(r){var u=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,i={},l={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function f(h){return h instanceof s?new s(h.type,f(h.content),h.alias):Array.isArray(h)?h.map(f):h.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(f){return Object.prototype.toString.call(f).slice(8,-1)},objId:function(f){return f.__id||Object.defineProperty(f,"__id",{value:++o}),f.__id},clone:function f(h,w){w=w||{};var k,_;switch(l.util.type(h)){case"Object":if(_=l.util.objId(h),w[_])return w[_];k={},w[_]=k;for(var S in h)h.hasOwnProperty(S)&&(k[S]=f(h[S],w));return k;case"Array":return _=l.util.objId(h),w[_]?w[_]:(k=[],w[_]=k,h.forEach(function(E,A){k[A]=f(E,w)}),k);default:return h}},getLanguage:function(f){for(;f;){var h=u.exec(f.className);if(h)return h[1].toLowerCase();f=f.parentElement}return"none"},setLanguage:function(f,h){f.className=f.className.replace(RegExp(u,"gi"),""),f.classList.add("language-"+h)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(k){var f=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(k.stack)||[])[1];if(f){var h=document.getElementsByTagName("script");for(var w in h)if(h[w].src==f)return h[w]}return null}},isActive:function(f,h,w){for(var k="no-"+h;f;){var _=f.classList;if(_.contains(h))return!0;if(_.contains(k))return!1;f=f.parentElement}return!!w}},languages:{plain:i,plaintext:i,text:i,txt:i,extend:function(f,h){var w=l.util.clone(l.languages[f]);for(var k in h)w[k]=h[k];return w},insertBefore:function(f,h,w,k){k=k||l.languages;var _=k[f],S={};for(var E in _)if(_.hasOwnProperty(E)){if(E==h)for(var A in w)w.hasOwnProperty(A)&&(S[A]=w[A]);w.hasOwnProperty(E)||(S[E]=_[E])}var D=k[f];return k[f]=S,l.languages.DFS(l.languages,function(z,M){M===D&&z!=f&&(this[z]=S)}),S},DFS:function f(h,w,k,_){_=_||{};var S=l.util.objId;for(var E in h)if(h.hasOwnProperty(E)){w.call(h,E,h[E],k||E);var A=h[E],D=l.util.type(A);D==="Object"&&!_[S(A)]?(_[S(A)]=!0,f(A,w,null,_)):D==="Array"&&!_[S(A)]&&(_[S(A)]=!0,f(A,w,E,_))}}},plugins:{},highlightAll:function(f,h){l.highlightAllUnder(document,f,h)},highlightAllUnder:function(f,h,w){var k={callback:w,container:f,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};l.hooks.run("before-highlightall",k),k.elements=Array.prototype.slice.apply(k.container.querySelectorAll(k.selector)),l.hooks.run("before-all-elements-highlight",k);for(var _=0,S;S=k.elements[_++];)l.highlightElement(S,h===!0,k.callback)},highlightElement:function(f,h,w){var k=l.util.getLanguage(f),_=l.languages[k];l.util.setLanguage(f,k);var S=f.parentElement;S&&S.nodeName.toLowerCase()==="pre"&&l.util.setLanguage(S,k);var E=f.textContent,A={element:f,language:k,grammar:_,code:E};function D(M){A.highlightedCode=M,l.hooks.run("before-insert",A),A.element.innerHTML=A.highlightedCode,l.hooks.run("after-highlight",A),l.hooks.run("complete",A),w&&w.call(A.element)}if(l.hooks.run("before-sanity-check",A),S=A.element.parentElement,S&&S.nodeName.toLowerCase()==="pre"&&!S.hasAttribute("tabindex")&&S.setAttribute("tabindex","0"),!A.code){l.hooks.run("complete",A),w&&w.call(A.element);return}if(l.hooks.run("before-highlight",A),!A.grammar){D(l.util.encode(A.code));return}if(h&&r.Worker){var z=new Worker(l.filename);z.onmessage=function(M){D(M.data)},z.postMessage(JSON.stringify({language:A.language,code:A.code,immediateClose:!0}))}else D(l.highlight(A.code,A.grammar,A.language))},highlight:function(f,h,w){var k={code:f,grammar:h,language:w};if(l.hooks.run("before-tokenize",k),!k.grammar)throw new Error('The language "'+k.language+'" has no grammar.');return k.tokens=l.tokenize(k.code,k.grammar),l.hooks.run("after-tokenize",k),s.stringify(l.util.encode(k.tokens),k.language)},tokenize:function(f,h){var w=h.rest;if(w){for(var k in w)h[k]=w[k];delete h.rest}var _=new p;return m(_,_.head,f),d(f,_,h,_.head,0
|
|||
|
|
`),C.hasAttribute("data-start")||C.setAttribute("data-start",String(A+1))}x.textContent=_,n.highlightElement(x)},function(_){C.setAttribute(l,d),x.textContent=_})}}),n.plugins.fileHighlight={highlight:function(C){for(var x=(C||document).querySelectorAll(p),f=0,h;h=x[f++];)n.highlightElement(h)}};var v=!1;n.fileHighlight=function(){v||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),v=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(Rg);var Qf=Rg.exports;(function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(d){return d=d.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+d+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,u=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+u+o+"(?:"+u+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+u+o+")(?:"+u+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+u+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+u+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(func
|
|||
|
|
${u===i?"border-indigo-600 text-indigo-600":"border-transparent text-zinc-500 hover:text-zinc-700"}`,children:l},i))}),c.jsxs("div",{className:"flex-1 overflow-auto p-6",children:[u==="basic"&&c.jsx(g8,{account:e,onSave:t}),u==="prompts"&&c.jsx(z8,{accountId:e.id}),u==="capcut"&&c.jsx(P8,{account:e,onSave:t}),u==="references"&&c.jsx(T8,{account:e,onSave:t})]})]})}function I8(){return c.jsxs("div",{className:"rounded-xl p-4 border border-zinc-100 bg-white",children:[c.jsxs("div",{className:"flex items-start justify-between mb-2",children:[c.jsx("div",{className:"skeleton h-4 w-24"}),c.jsx("div",{className:"skeleton h-4 w-10 rounded-full"})]}),c.jsx("div",{className:"skeleton h-3 w-full mb-2"}),c.jsx("div",{className:"skeleton h-3 w-2/3 mb-3"}),c.jsxs("div",{className:"flex gap-1.5",children:[c.jsx("div",{className:"skeleton h-4 w-14 rounded-full"}),c.jsx("div",{className:"skeleton h-4 w-12 rounded-full"})]})]})}function Yf(){const{accountId:e}=_1(),t=fu(),{accounts:n,loading:r,create:u,update:o,remove:i}=yd(),[l,s]=g.useState(""),a=e&&n.find(m=>m.id===e)||null,d=n.filter(m=>{if(!l)return!0;const y=l.toLowerCase();return m.name.toLowerCase().includes(y)||(m.description||"").toLowerCase().includes(y)}),p=async()=>{const m=`新账号 ${n.length+1}`,y=await u({name:m,pipeline:"image-video",defaultFormat:"9:16",imageModel:"gemini",videoModel:"veo3-fast"});y!=null&&y.id&&t(`/accounts/${y.id}`)};return a?c.jsx(L8,{account:a,onSave:m=>o(a.id,m),onDelete:()=>i(a.id).then(()=>t("/accounts")),onBack:()=>t("/accounts")}):c.jsxs("div",{className:"flex flex-col h-full",children:[c.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-zinc-100 bg-white flex-shrink-0",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("h1",{className:"text-base font-semibold text-zinc-800",children:"账号管理"}),c.jsxs("div",{className:"relative",children:[c.jsx(za,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-zinc-300"}),c.jsx(_e,{value:l,onChange:m=>s(m.target.value),placeholder:"搜索账号...",className:"pl-8 h-8 w-48 text-xs bg-zinc-50/80 border-zinc-100 focus:bg-white"})]})]}),c.jsxs("button",{onClick:p,className:"inline-flex items-center gap-1.5 px-3.5 py-1.5 text-xs font-medium text-white bg-indigo-600 rounded-lg hover:bg-indigo-700 transition-colors shadow-sm shadow-indigo-200/50",children:[c.jsx(U0,{size:14}),"新建账号"]})]}),c.jsx("div",{className:"flex-1 overflow-auto p-6",children:r?c.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:Array.from({length:6}).map((m,y)=>c.jsx(I8,{},y))}):d.length>0?c.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:d.map(m=>c.jsx(m8,{account:m,isSelected:m.id===e,onClick:()=>t(`/accounts/${m.id}`)},m.id))}):c.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-zinc-300",children:[c.jsx("div",{className:"w-16 h-16 rounded-2xl bg-zinc-50 flex items-center justify-center mb-4",children:c.jsx(za,{size:24,strokeWidth:1.5,className:"text-zinc-300"})}),l?c.jsxs(c.Fragment,{children:[c.jsxs("p",{className:"text-sm text-zinc-400",children:["没有匹配「",l,"」的账号"]}),c.jsx("button",{onClick:()=>s(""),className:"mt-2 text-xs text-indigo-500 hover:text-indigo-600",children:"清除搜索"})]}):c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"text-sm text-zinc-400",children:"还没有创建任何账号"}),c.jsxs("button",{onClick:p,className:"mt-3 inline-flex items-center gap-1.5 px-4 py-2 text-xs font-medium text-white bg-indigo-600 rounded-lg hover:bg-indigo-700 transition-colors shadow-sm shadow-indigo-200/50",children:[c.jsx(U0,{size:14}),"创建第一个账号"]})]})]})})]})}function O8(e){const[t,n]=g.useState([]),[r,u]=g.useState(!0),o=g.useCallback(()=>{u(!0),ke.listAssets(e).then(n).finally(()=>u(!1))},[e==null?void 0:e.accountId,e==null?void 0:e.type]);return g.useEffect(()=>{o()},[o]),{assets:t,loading:r,refresh:o,remove:l=>ke.deleteAsset(l).then(o)}}function $8({title:e,subtitle:
|
|||
|
|
${n===k?"bg-white text-indigo-600 shadow-sm":"text-zinc-400 hover:text-zinc-600"}`,children:[c.jsx(S,{size:13}),_,c.jsx("span",{className:`text-[10px] px-1.5 rounded-full ${n===k?"bg-indigo-50 text-indigo-500":"bg-zinc-100 text-zinc-400"}`,children:E})]},k))}),c.jsxs(Yt,{value:e||"all",onValueChange:k=>t(k==="all"?"":k),children:[c.jsx(Ft,{className:"h-8 w-auto min-w-[100px] text-xs border-zinc-100 bg-zinc-50/80 hover:border-zinc-200",children:c.jsx(Xt,{placeholder:"全部账号"})}),c.jsxs(zt,{children:[c.jsx(J,{value:"all",children:"全部账号"}),s.map(k=>c.jsx(J,{value:k.id,children:k.name},k.id))]})]}),c.jsx("div",{className:"flex-1"}),c.jsxs(It,{size:"sm",variant:"outline",className:"h-8 text-xs rounded-lg",onClick:C,children:[c.jsx(Yc,{size:12,className:"mr-1"}),"扫描"]})]}),c.jsx("div",{className:"flex-1 overflow-auto p-4",children:d?c.jsx("div",{children:Array.from({length:3}).map((k,_)=>c.jsx(U8,{},_))}):h.length===0?c.jsxs("div",{className:"flex flex-col items-center justify-center mt-16 text-zinc-300",children:[c.jsx("div",{className:"w-16 h-16 rounded-2xl bg-zinc-50 flex items-center justify-center mb-4",children:c.jsx(ja,{size:24,strokeWidth:1.5,className:"text-zinc-300"})}),c.jsx("p",{className:"text-sm text-zinc-400",children:n==="all"?"暂无资产":`暂无${n==="image"?"图片":"视频"}`}),c.jsx("p",{className:"text-xs mt-1 text-zinc-300",children:"点击「扫描」从 output 目录导入"})]}):h.map(([k,_])=>c.jsx($8,{title:x(k),subtitle:f(k),assets:_,onPreview:l,onDelete:p},k))}),i&&c.jsx(B8,{asset:i,allAssets:m,onClose:()=>l(null),onNavigate:l})]})}const V8=[{title:"CapCut / 剪映",fields:[{key:"jianyingDraftPath",label:"剪映草稿路径",placeholder:"C:/Users/.../com.lveditor.draft"},{key:"capcutMateDir",label:"CapCut Mate 目录",placeholder:"C:/Users/.../capcut-mate"},{key:"capcutMateApiBase",label:"CapCut Mate API",placeholder:"http://localhost:30000"}]},{title:"Gemini 生图",fields:[{key:"geminiApiBaseUrl",label:"API Base URL",placeholder:"https://generativelanguage.googleapis.com"},{key:"geminiApiKey",label:"API Key",type:"password"},{key:"geminiModel",label:"模型",placeholder:"gemini-3.1-flash-image-preview"}]},{title:"Midjourney",fields:[{key:"mjApiBaseUrl",label:"API Base URL"},{key:"mjApiKey",label:"API Key",type:"password"}]},{title:"Veo 视频生成",fields:[{key:"veoApiBaseUrl",label:"API Base URL"},{key:"veoApiKey",label:"API Key",type:"password"},{key:"veoModel",label:"模型",placeholder:"veo3-fast-frames"},{key:"veoEnhancePrompt",label:"增强提示词",type:"toggle"},{key:"veoEnableUpsample",label:"启用 Upsample",type:"toggle"}]},{title:"Grok 视频生成",fields:[{key:"grokApiBaseUrl",label:"API Base URL"},{key:"grokApiKey",label:"API Key",type:"password"},{key:"grokModel",label:"模型",placeholder:"grok-video-3"}]},{title:"GPT Image",fields:[{key:"gptImageApiBaseUrl",label:"API Base URL"},{key:"gptImageApiKey",label:"API Key",type:"password"},{key:"gptImageModel",label:"模型",placeholder:"gpt-image-2"}]},{title:"Kling 可灵",fields:[{key:"kelingApiBaseUrl",label:"API Base URL",placeholder:"https://api-beijing.klingai.com"},{key:"kelingApiKey",label:"API Key",type:"password"},{key:"kelingSecretAccessKey",label:"Secret Key",type:"password"},{key:"kelingModel",label:"模型",placeholder:"kling-v2-5-turbo"}]},{title:"OSS 存储",fields:[{key:"ossRegion",label:"Region",placeholder:"oss-cn-hangzhou"},{key:"ossAccessKeyId",label:"Access Key ID"},{key:"ossAccessKeySecret",label:"Access Key Secret",type:"password"},{key:"ossBucket",label:"Bucket",placeholder:"my-bucket"},{key:"ossFolder",label:"目录前缀",placeholder:"tmp/"},{key:"ossExpires",label:"链接有效期(秒)",placeholder:"31536000"}]},{title:"TTS 语音合成",fields:[{key:"ttsApiBaseUrl",label:"API Base URL",placeholder:"https://dashscope.aliyuncs.com/api/v1"},{key:"ttsApiKey",label:"API Key",type:"password"},{key:"ttsModel",label:"模型",placeholder:"cosyvoice-v3.5-plus"},{key:"ttsVoice",label:"音色 ID",placeholder:"cosyvoice-v3.5-plus-bailian-xxx"},{key:"ttsLanguage",label:"语言",pla
|
|||
|
|
${e==="agent"?"border-indigo-600 text-indigo-600":"border-transparent text-zinc-500 hover:text-zinc-700"}`,children:"Agent 配置"}),c.jsx("button",{onClick:()=>t("skills"),className:`px-4 py-2.5 text-sm font-medium transition-colors border-b-2 -mb-px
|
|||
|
|
${e==="skills"?"border-indigo-600 text-indigo-600":"border-transparent text-zinc-500 hover:text-zinc-700"}`,children:"工具配置"})]}),c.jsx("div",{className:"flex-1 overflow-auto",children:c.jsxs("div",{className:"max-w-2xl mx-auto p-6 space-y-6",children:[e==="agent"?c.jsxs(c.Fragment,{children:[c.jsxs("section",{className:"space-y-4",children:[c.jsx("h3",{className:"text-sm font-medium text-zinc-500 uppercase tracking-wide",children:"API 配置"}),c.jsxs("div",{className:"space-y-3 bg-white rounded-lg border border-zinc-200 p-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"text-xs font-medium text-zinc-500",children:"协议"}),c.jsx("div",{className:"mt-1 flex gap-2",children:["anthropic","openai"].map(f=>c.jsx("button",{onClick:()=>v("protocol",f),className:`flex-1 py-2 rounded-md text-sm font-medium transition-colors border ${d.protocol===f?"bg-indigo-50 border-indigo-300 text-indigo-700":"bg-zinc-50 border-zinc-200 text-zinc-500 hover:bg-zinc-100"}`,children:f==="anthropic"?"Anthropic":"OpenAI"},f))}),c.jsx("p",{className:"text-[10px] text-zinc-400 mt-1",children:d.protocol==="anthropic"?"Anthropic 兼容协议(支持 Claude、GLM、DeepSeek 代理等)":"OpenAI 兼容协议(支持 GPT、DeepSeek、Qwen、Ollama 等)"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-xs font-medium text-zinc-500",children:"模型"}),c.jsx(_e,{value:d.model,onChange:f=>v("model",f.target.value),placeholder:d.protocol==="anthropic"?"claude-sonnet-4-6 或 GLM-5.1":"gpt-4o 或 deepseek-chat",className:"mt-1 bg-zinc-50 border-zinc-200"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-xs font-medium text-zinc-500",children:"Base URL"}),c.jsx(_e,{value:d.baseUrl,onChange:f=>v("baseUrl",f.target.value),placeholder:d.protocol==="anthropic"?"https://api.anthropic.com":"https://api.openai.com/v1",className:"mt-1 bg-zinc-50 border-zinc-200 font-mono text-xs"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-xs font-medium text-zinc-500",children:"Auth Token"}),c.jsx(_e,{value:d.authToken,onChange:f=>v("authToken",f.target.value),type:"password",placeholder:"sk-...",className:"mt-1 bg-zinc-50 border-zinc-200 font-mono text-xs"})]}),c.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[c.jsxs(It,{size:"sm",variant:"outline",className:"text-xs",disabled:i,onClick:async()=>{l(!0),a(null);try{await C();const h=await(await fetch("/api/configs/test-connection",{method:"POST"})).json();a(h)}catch(f){a({ok:!1,error:f.message})}l(!1)},children:[i?c.jsx(Fa,{size:12,className:"mr-1 animate-spin"}):c.jsx(ob,{size:12,className:"mr-1"}),i?"测试中...":"测试连接"]}),s&&c.jsx("span",{className:`text-xs ${s.ok?"text-green-600":"text-red-500"}`,children:s.ok?`连接成功 ${(x=s.models)!=null&&x.length?`(${s.models.join(", ")})`:""}`:s.error})]})]})]}),c.jsxs("section",{className:"space-y-4",children:[c.jsx("h3",{className:"text-sm font-medium text-zinc-500 uppercase tracking-wide",children:"默认参数"}),c.jsx("div",{className:"space-y-3 bg-white rounded-lg border border-zinc-200 p-4",children:c.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[c.jsxs("div",{children:[c.jsx("label",{className:"text-xs font-medium text-zinc-500",children:"生图模型"}),c.jsxs(Yt,{value:d.defaultImageModel||"none",onValueChange:f=>v("defaultImageModel",f==="none"?"":f),children:[c.jsx(Ft,{className:"mt-1 w-full h-10 text-sm bg-zinc-50 border-zinc-200",children:c.jsx(Xt,{placeholder:"未设置"})}),c.jsxs(zt,{children:[c.jsx(J,{value:"none",children:"未设置"}),c.jsx(J,{value:"gemini",children:"Gemini"}),c.jsx(J,{value:"mj",children:"Midjourney"}),c.jsx(J,{value:"gpt",children:"GPT Image"}),c.jsx(J,{value:"kling",children:"Kling"})]})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-xs font-medium text-zinc-500",children:"视频模型"}),c.jsxs(Yt,{value:d.defaultVideoModel||"none",onValueChange:f=>v("defaultVideoModel",f==="none"?"":f),children:[c.jsx(Ft,{className:"mt-1 w-full h-10 text-sm bg-zinc-50 border-zinc-200",children:c.jsx(Xt,{placeholder:"未设置"})}),c.jsxs(
|