@akairos/typeset-studio 0.2.5 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/README.md +16 -2
  2. package/dist/assets/index-JCv_QmUn.css +1 -0
  3. package/dist/assets/index-X9ezH_RG.js +317 -0
  4. package/dist/index.html +2 -2
  5. package/dist/lib/adapter.js +1 -1
  6. package/dist/lib/{canvas-renderer-cxnar75n.js → canvas-renderer-4jg80agt.js} +1 -1
  7. package/dist/lib/{index-zdhqg5f0.js → index-bf1zs3mv.js} +291 -54
  8. package/dist/lib/{index-t9w3p2p9.js → index-hegsbxc0.js} +71 -3
  9. package/dist/lib/{index-h2580xma.js → index-p8ttqbs6.js} +3 -3
  10. package/dist/lib/index.js +3 -3
  11. package/dist/lib/{render-xxd348m1.js → render-3043w6s6.js} +2 -2
  12. package/package.json +3 -3
  13. package/src/adapter.ts +1 -1
  14. package/src/core/canvas-draw.ts +53 -43
  15. package/src/core/canvas-presets.ts +37 -0
  16. package/src/core/canvas-renderer.test.ts +56 -0
  17. package/src/core/canvas-style.ts +149 -0
  18. package/src/core/engine.ts +2 -0
  19. package/src/core/types.ts +30 -3
  20. package/src/index.ts +4 -0
  21. package/src/server/index.ts +1 -1
  22. package/src/server/routes/slots.test.ts +22 -0
  23. package/src/server/routes/templates.ts +15 -0
  24. package/src/web/App.tsx +27 -7
  25. package/src/web/components/CanvasStyleInspector.tsx +95 -0
  26. package/src/web/components/Header.tsx +24 -9
  27. package/src/web/components/ParamsInspector.tsx +6 -1
  28. package/src/web/components/SaveTemplateModal.tsx +106 -0
  29. package/src/web/components/TemplateDrawer.tsx +323 -0
  30. package/src/web/hooks/useTypeset.ts +3 -1
  31. package/dist/assets/index-3Ko1UCBU.css +0 -1
  32. package/dist/assets/index-De-aHsvp.js +0 -317
  33. package/src/web/components/TemplateModal.tsx +0 -393
@@ -1,317 +0,0 @@
1
- (function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))r(d);new MutationObserver(d=>{for(const h of d)if(h.type==="childList")for(const b of h.addedNodes)b.tagName==="LINK"&&b.rel==="modulepreload"&&r(b)}).observe(document,{childList:!0,subtree:!0});function o(d){const h={};return d.integrity&&(h.integrity=d.integrity),d.referrerPolicy&&(h.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?h.credentials="include":d.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function r(d){if(d.ep)return;d.ep=!0;const h=o(d);fetch(d.href,h)}})();function z1(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var ao={exports:{}},Bi={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var i1;function O2(){if(i1)return Bi;i1=1;var u=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function o(r,d,h){var b=null;if(h!==void 0&&(b=""+h),d.key!==void 0&&(b=""+d.key),"key"in d){h={};for(var v in d)v!=="key"&&(h[v]=d[v])}else h=d;return d=h.ref,{$$typeof:u,type:r,key:b,ref:d!==void 0?d:null,props:h}}return Bi.Fragment=c,Bi.jsx=o,Bi.jsxs=o,Bi}var u1;function j2(){return u1||(u1=1,ao.exports=O2()),ao.exports}var f=j2(),io={exports:{}},be={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var c1;function z2(){if(c1)return be;c1=1;var u=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),b=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),N=Symbol.for("react.view_transition"),C=Symbol.iterator;function V(S){return S===null||typeof S!="object"?null:(S=C&&S[C]||S["@@iterator"],typeof S=="function"?S:null)}var W={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},L=Object.assign,U={};function te(S,H,q){this.props=S,this.context=H,this.refs=U,this.updater=q||W}te.prototype.isReactComponent={},te.prototype.setState=function(S,H){if(typeof S!="object"&&typeof S!="function"&&S!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,S,H,"setState")},te.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function le(){}le.prototype=te.prototype;function oe(S,H,q){this.props=S,this.context=H,this.refs=U,this.updater=q||W}var ce=oe.prototype=new le;ce.constructor=oe,L(ce,te.prototype),ce.isPureReactComponent=!0;var Z=Array.isArray;function ee(){}var G={H:null,A:null,T:null,S:null},A=Object.prototype.hasOwnProperty;function X(S,H,q){var I=q.ref;return{$$typeof:u,type:S,key:H,ref:I!==void 0?I:null,props:q}}function D(S,H){return X(S.type,H,S.props)}function $(S){return typeof S=="object"&&S!==null&&S.$$typeof===u}function Y(S){var H={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(q){return H[q]})}var ae=/\/+/g;function j(S,H){return typeof S=="object"&&S!==null&&S.key!=null?Y(""+S.key):H.toString(36)}function B(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(ee,ee):(S.status="pending",S.then(function(H){S.status==="pending"&&(S.status="fulfilled",S.value=H)},function(H){S.status==="pending"&&(S.status="rejected",S.reason=H)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function k(S,H,q,I,ge){var ve=typeof S;(ve==="undefined"||ve==="boolean")&&(S=null);var Ee=!1;if(S===null)Ee=!0;else switch(ve){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(S.$$typeof){case u:case c:Ee=!0;break;case p:return Ee=S._init,k(Ee(S._payload),H,q,I,ge)}}if(Ee)return ge=ge(S),Ee=I===""?"."+j(S,0):I,Z(ge)?(q="",Ee!=null&&(q=Ee.replace(ae,"$&/")+"/"),k(ge,H,q,"",function(Oe){return Oe})):ge!=null&&($(ge)&&(ge=D(ge,q+(ge.key==null||S&&S.key===ge.key?"":(""+ge.key).replace(ae,"$&/")+"/")+Ee)),H.push(ge)),1;Ee=0;var xe=I===""?".":I+":";if(Z(S))for(var se=0;se<S.length;se++)I=S[se],ve=xe+j(I,se),Ee+=k(I,H,q,ve,ge);else if(se=V(S),typeof se=="function")for(S=se.call(S),se=0;!(I=S.next()).done;)I=I.value,ve=xe+j(I,se++),Ee+=k(I,H,q,ve,ge);else if(ve==="object"){if(typeof S.then=="function")return k(B(S),H,q,I,ge);throw H=String(S),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function O(S,H,q){if(S==null)return S;var I=[],ge=0;return k(S,I,"","",function(ve){return H.call(q,ve,ge++)}),I}function Q(S){if(S._status===-1){var H=S._result,q=H();q.then(function(I){(S._status===0||S._status===-1)&&(S._status=1,S._result=I,q.status===void 0&&(q.status="fulfilled",q.value=I))},function(I){(S._status===0||S._status===-1)&&(S._status=2,S._result=I,q.status===void 0&&(q.status="rejected",q.reason=I))}),S._status===-1&&(S._status=0,S._result=q)}if(S._status===1)return S._result.default;throw S._result}var P=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S=="object"&&S!==null&&typeof S.message=="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)};function re(S){var H=G.T,q={};q.types=H!==null?H.types:null,G.T=q;try{var I=S(),ge=G.S;ge!==null&&ge(q,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(ee,P)}catch(ve){P(ve)}finally{H!==null&&q.types!==null&&(H.types=q.types),G.T=H}}function ne(S){var H=G.T;if(H!==null){var q=H.types;q===null?H.types=[S]:q.indexOf(S)===-1&&q.push(S)}else re(ne.bind(null,S))}var ie={map:O,forEach:function(S,H,q){O(S,function(){H.apply(this,arguments)},q)},count:function(S){var H=0;return O(S,function(){H++}),H},toArray:function(S){return O(S,function(H){return H})||[]},only:function(S){if(!$(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return be.Activity=g,be.Children=ie,be.Component=te,be.Fragment=o,be.Profiler=d,be.PureComponent=oe,be.StrictMode=r,be.Suspense=y,be.ViewTransition=N,be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,be.__COMPILER_RUNTIME={__proto__:null,c:function(S){return G.H.useMemoCache(S)}},be.addTransitionType=ne,be.cache=function(S){return function(){return S.apply(null,arguments)}},be.cacheSignal=function(){return null},be.cloneElement=function(S,H,q){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var I=L({},S.props),ge=S.key;if(H!=null)for(ve in H.key!==void 0&&(ge=""+H.key),H)!A.call(H,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&H.ref===void 0||(I[ve]=H[ve]);var ve=arguments.length-2;if(ve===1)I.children=q;else if(1<ve){for(var Ee=Array(ve),xe=0;xe<ve;xe++)Ee[xe]=arguments[xe+2];I.children=Ee}return X(S.type,ge,I)},be.createContext=function(S){return S={$$typeof:b,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:h,_context:S},S},be.createElement=function(S,H,q){var I,ge={},ve=null;if(H!=null)for(I in H.key!==void 0&&(ve=""+H.key),H)A.call(H,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(ge[I]=H[I]);var Ee=arguments.length-2;if(Ee===1)ge.children=q;else if(1<Ee){for(var xe=Array(Ee),se=0;se<Ee;se++)xe[se]=arguments[se+2];ge.children=xe}if(S&&S.defaultProps)for(I in Ee=S.defaultProps,Ee)ge[I]===void 0&&(ge[I]=Ee[I]);return X(S,ve,ge)},be.createRef=function(){return{current:null}},be.forwardRef=function(S){return{$$typeof:v,render:S}},be.isValidElement=$,be.lazy=function(S){return{$$typeof:p,_payload:{_status:-1,_result:S},_init:Q}},be.memo=function(S,H){return{$$typeof:m,type:S,compare:H===void 0?null:H}},be.startTransition=re,be.unstable_useCacheRefresh=function(){return G.H.useCacheRefresh()},be.use=function(S){return G.H.use(S)},be.useActionState=function(S,H,q){return G.H.useActionState(S,H,q)},be.useCallback=function(S,H){return G.H.useCallback(S,H)},be.useContext=function(S){return G.H.useContext(S)},be.useDebugValue=function(){},be.useDeferredValue=function(S,H){return G.H.useDeferredValue(S,H)},be.useEffect=function(S,H){return G.H.useEffect(S,H)},be.useEffectEvent=function(S){return G.H.useEffectEvent(S)},be.useId=function(){return G.H.useId()},be.useImperativeHandle=function(S,H,q){return G.H.useImperativeHandle(S,H,q)},be.useInsertionEffect=function(S,H){return G.H.useInsertionEffect(S,H)},be.useLayoutEffect=function(S,H){return G.H.useLayoutEffect(S,H)},be.useMemo=function(S,H){return G.H.useMemo(S,H)},be.useOptimistic=function(S,H){return G.H.useOptimistic(S,H)},be.useReducer=function(S,H,q){return G.H.useReducer(S,H,q)},be.useRef=function(S){return G.H.useRef(S)},be.useState=function(S){return G.H.useState(S)},be.useSyncExternalStore=function(S,H,q){return G.H.useSyncExternalStore(S,H,q)},be.useTransition=function(){return G.H.useTransition()},be.version="19.3.0",be}var r1;function ko(){return r1||(r1=1,io.exports=z2()),io.exports}var me=ko();const _2=z1(me);var uo={exports:{}},Oi={},co={exports:{}},ro={};/**
18
- * @license React
19
- * scheduler.production.js
20
- *
21
- * Copyright (c) Meta Platforms, Inc. and affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */var s1;function R2(){return s1||(s1=1,(function(u){function c(B,k){var O=B.length;B.push(k);e:for(;0<O;){var Q=O-1>>>1,P=B[Q];if(0<d(P,k))B[Q]=k,B[O]=P,O=Q;else break e}}function o(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var k=B[0],O=B.pop();if(O!==k){B[0]=O;e:for(var Q=0,P=B.length,re=P>>>1;Q<re;){var ne=2*(Q+1)-1,ie=B[ne],S=ne+1,H=B[S];if(0>d(ie,O))S<P&&0>d(H,ie)?(B[Q]=H,B[S]=O,Q=S):(B[Q]=ie,B[ne]=O,Q=ne);else if(S<P&&0>d(H,O))B[Q]=H,B[S]=O,Q=S;else break e}}return k}function d(B,k){var O=B.sortIndex-k.sortIndex;return O!==0?O:B.id-k.id}if(u.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;u.unstable_now=function(){return h.now()}}else{var b=Date,v=b.now();u.unstable_now=function(){return b.now()-v}}var y=[],m=[],p=1,g=null,N=3,C=!1,V=!1,W=!1,L=!1,U=typeof setTimeout=="function"?setTimeout:null,te=typeof clearTimeout=="function"?clearTimeout:null,le=typeof setImmediate<"u"?setImmediate:null;function oe(B){for(var k=o(m);k!==null;){if(k.callback===null)r(m);else if(k.startTime<=B)r(m),k.sortIndex=k.expirationTime,c(y,k);else break;k=o(m)}}function ce(B){if(W=!1,oe(B),!V)if(o(y)!==null)V=!0,Z||(Z=!0,$());else{var k=o(m);k!==null&&j(ce,k.startTime-B)}}var Z=!1,ee=-1,G=5,A=-1;function X(){return L?!0:!(u.unstable_now()-A<G)}function D(){if(L=!1,Z){var B=u.unstable_now();A=B;var k=!0;try{e:{V=!1,W&&(W=!1,te(ee),ee=-1),C=!0;var O=N;try{t:{for(oe(B),g=o(y);g!==null&&!(g.expirationTime>B&&X());){var Q=g.callback;if(typeof Q=="function"){g.callback=null,N=g.priorityLevel;var P=Q(g.expirationTime<=B);if(B=u.unstable_now(),typeof P=="function"){g.callback=P,oe(B),k=!0;break t}g===o(y)&&r(y),oe(B)}else r(y);g=o(y)}if(g!==null)k=!0;else{var re=o(m);re!==null&&j(ce,re.startTime-B),k=!1}}break e}finally{g=null,N=O,C=!1}k=void 0}}finally{k?$():Z=!1}}}var $;if(typeof le=="function")$=function(){le(D)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,ae=Y.port2;Y.port1.onmessage=D,$=function(){ae.postMessage(null)}}else $=function(){U(D,0)};function j(B,k){ee=U(function(){B(u.unstable_now())},k)}u.unstable_IdlePriority=5,u.unstable_ImmediatePriority=1,u.unstable_LowPriority=4,u.unstable_NormalPriority=3,u.unstable_Profiling=null,u.unstable_UserBlockingPriority=2,u.unstable_cancelCallback=function(B){B.callback=null},u.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<B?Math.floor(1e3/B):5},u.unstable_getCurrentPriorityLevel=function(){return N},u.unstable_next=function(B){switch(N){case 1:case 2:case 3:var k=3;break;default:k=N}var O=N;N=k;try{return B()}finally{N=O}},u.unstable_requestPaint=function(){L=!0},u.unstable_runWithPriority=function(B,k){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var O=N;N=B;try{return k()}finally{N=O}},u.unstable_scheduleCallback=function(B,k,O){var Q=u.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0<O?Q+O:Q):O=Q,B){case 1:var P=-1;break;case 2:P=250;break;case 5:P=1073741823;break;case 4:P=1e4;break;default:P=5e3}return P=O+P,B={id:p++,callback:k,priorityLevel:B,startTime:O,expirationTime:P,sortIndex:-1},O>Q?(B.sortIndex=O,c(m,B),o(y)===null&&B===o(m)&&(W?(te(ee),ee=-1):W=!0,j(ce,O-Q))):(B.sortIndex=P,c(y,B),V||C||(V=!0,Z||(Z=!0,$()))),B},u.unstable_shouldYield=X,u.unstable_wrapCallback=function(B){var k=N;return function(){var O=N;N=k;try{return B.apply(this,arguments)}finally{N=O}}}})(ro)),ro}var o1;function L2(){return o1||(o1=1,co.exports=R2()),co.exports}var so={exports:{}},dt={};/**
26
- * @license React
27
- * react-dom.production.js
28
- *
29
- * Copyright (c) Meta Platforms, Inc. and affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var f1;function H2(){if(f1)return dt;f1=1;var u=ko();function c(p){var g="https://react.dev/errors/"+p;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var N=2;N<arguments.length;N++)g+="&args[]="+encodeURIComponent(arguments[N])}return"Minified React error #"+p+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var r={d:{f:o,r:function(){throw Error(c(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},d=Symbol.for("react.portal"),h=Symbol.for("react.recoverable"),b=Symbol.for("react.optimistic_key");function v(p,g,N){var C=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:C==null?null:C===b?b:""+C,children:p,containerInfo:g,implementation:N}}var y=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(p,g){if(p==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return dt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,dt.browser=function(p){return{$$typeof:h,_reason:p}},dt.createPortal=function(p,g){var N=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(c(299));return v(p,g,null,N)},dt.flushSync=function(p){var g=y.T,N=r.p;try{if(y.T=null,r.p=2,p)return p()}finally{y.T=g,r.p=N,r.d.f()}},dt.preconnect=function(p,g){typeof p=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,r.d.C(p,g))},dt.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},dt.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var N=g.as,C=m(N,g.crossOrigin),V=typeof g.integrity=="string"?g.integrity:void 0,W=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;N==="style"?r.d.S(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:C,integrity:V,fetchPriority:W}):N==="script"&&r.d.X(p,{crossOrigin:C,integrity:V,fetchPriority:W,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},dt.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var N=m(g.as,g.crossOrigin);r.d.M(p,{crossOrigin:N,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0})}}else g==null&&r.d.M(p)},dt.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var N=g.as,C=m(N,g.crossOrigin);r.d.L(p,N,{crossOrigin:C,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},dt.preloadModule=function(p,g){if(typeof p=="string")if(g){var N=m(g.as,g.crossOrigin);r.d.m(p,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:N,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0})}else r.d.m(p)},dt.requestFormReset=function(p){r.d.r(p)},dt.unstable_batchedUpdates=function(p,g){return p(g)},dt.useFormState=function(p,g,N){return y.H.useFormState(p,g,N)},dt.useFormStatus=function(){return y.H.useHostTransitionStatus()},dt.version="19.3.0",dt}var d1;function U2(){if(d1)return so.exports;d1=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(c){console.error(c)}}return u(),so.exports=H2(),so.exports}/**
34
- * @license React
35
- * react-dom-client.production.js
36
- *
37
- * Copyright (c) Meta Platforms, Inc. and affiliates.
38
- *
39
- * This source code is licensed under the MIT license found in the
40
- * LICENSE file in the root directory of this source tree.
41
- */var x1;function q2(){if(x1)return Oi;x1=1;var u=L2(),c=ko(),o=U2();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}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."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(e){for(var t=e,l=t;l&&!l.alternate;)t=l,(t.flags&4098)!==0&&(e=t.return),l=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function b(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function v(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(h(e)!==e)throw Error(r(188))}function m(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(r(188));return t!==e?null:e}for(var l=e,n=t;;){var a=l.return;if(a===null)break;var i=a.alternate;if(i===null){if(n=a.return,n!==null){l=n;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===l)return y(a),e;if(i===n)return y(a),t;i=i.sibling}throw Error(r(188))}if(l.return!==n.return)l=a,n=i;else{for(var s=!1,x=a.child;x;){if(x===l){s=!0,l=a,n=i;break}if(x===n){s=!0,n=a,l=i;break}x=x.sibling}if(!s){for(x=i.child;x;){if(x===l){s=!0,l=i,n=a;break}if(x===n){s=!0,n=i,l=a;break}x=x.sibling}if(!s)throw Error(r(189))}}if(l.alternate!==n)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}function g(e,t,l,n,a,i){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&l(e,n,a,i)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&g(e.child,t,l,n,a,i))return!0;e=e.sibling}return!1}function N(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function C(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),!(e.tag===3||e.tag===5||e.tag===27));)e=e.return;return t}function V(e){var t=[null,null],l=N(e);return l===null||W(t,e,l.child,{foundSelf:!1}),t}function W(e,t,l,n){for(;l!==null;){if(l===t)n.foundSelf=!0;else if(l.tag===5||l.tag===27||l.tag===6){if(n.foundSelf)return e[1]=l,!0;e[0]=l}else if((l.tag!==22||l.memoizedState===null)&&W(e,t,l.child,n))return!0;l=l.sibling}return!1}function L(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(r(559))}}var U=null,te=null;function le(e,t,l){return e===l?!0:e===t?(U=e,!0):!1}function oe(e,t,l){return e===l?(te=e,!1):e===t?(te!==null&&(U=e),!0):!1}function ce(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function Z(e,t,l){for(var n=0,a=e;a;a=l(a))n++;a=0;for(var i=t;i;i=l(i))a++;for(;0<n-a;)e=l(e),n--;for(;0<a-n;)t=l(t),a--;for(;n--;){if(e===t||t!==null&&e===t.alternate)return e;e=l(e),t=l(t)}return null}var ee=Object.assign,G=Symbol.for("react.element"),A=Symbol.for("react.transitional.element"),X=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),$=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),ae=Symbol.for("react.consumer"),j=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),re=Symbol.for("react.activity"),ne=Symbol.for("react.legacy_hidden"),ie=Symbol.for("react.memo_cache_sentinel"),S=Symbol.for("react.view_transition"),H=Symbol.for("react.recoverable"),q=Symbol.iterator;function I(e){return e===null||typeof e!="object"?null:(e=q&&e[q]||e["@@iterator"],typeof e=="function"?e:null)}var ge=Symbol.for("react.client.reference");function ve(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ge?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case D:return"Fragment";case Y:return"Profiler";case $:return"StrictMode";case k:return"Suspense";case O:return"SuspenseList";case re:return"Activity";case S:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case X:return"Portal";case j:return e.displayName||"Context";case ae:return(e._context.displayName||"Context")+".Consumer";case B:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Q:return t=e.displayName||null,t!==null?t:ve(e.type)||"Memo";case P:t=e._payload,e=e._init;try{return ve(e(t))}catch{}}return null}var Ee=Array.isArray,xe=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Oe={pending:!1,data:null,method:null,action:null},xt=[],Qe=-1;function Ge(e){return{current:e}}function Ve(e){0>Qe||(e.current=xt[Qe],xt[Qe]=null,Qe--)}function we(e,t){Qe++,xt[Qe]=e.current,e.current=t}var it=Ge(null),rn=Ge(null),el=Ge(null),Rn=Ge(null);function Tl(e,t){switch(we(el,t),we(rn,e),we(it,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?hx(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=hx(t),e=mx(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Ve(it),we(it,e)}function wl(){Ve(it),Ve(rn),Ve(el)}function zi(e){var t=e.memoizedState;t!==null&&(ka._currentValue=t.memoizedState,we(Rn,e)),t=it.current;var l=mx(t,e.type);t!==l&&(we(rn,e),we(it,l))}function Vt(e){rn.current===e&&(Ve(it),Ve(rn)),Rn.current===e&&(Ve(Rn),ka._currentValue=Oe)}var Dl,Ln;function _t(e){if(Dl===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);Dl=t&&t[1]||"",Ln=-1<l.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+Dl+e+Ln}var sn=!1;function Hn(e,t){if(!e||sn)return"";sn=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var J=function(){throw Error()};if(Object.defineProperty(J.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(J,[])}catch(ue){var F=ue}Reflect.construct(e,[],J)}else{try{J.call()}catch(ue){F=ue}J=!1;try{var _=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),J=!0,new e}finally{J&&(_!==void 0?Object.defineProperty(e.prototype,"props",_):delete e.prototype.props)}}}else{try{throw Error()}catch(ue){F=ue}(J=e())&&typeof J.catch=="function"&&J.catch(function(){})}}catch(ue){if(ue&&F&&typeof ue.stack=="string")return[ue.stack,F.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=n.DetermineComponentFrameRoot(),s=i[0],x=i[1];if(s&&x){var E=s.split(`
44
- `),w=x.split(`
45
- `);for(a=n=0;n<E.length&&!E[n].includes("DetermineComponentFrameRoot");)n++;for(;a<w.length&&!w[a].includes("DetermineComponentFrameRoot");)a++;if(n===E.length||a===w.length)for(n=E.length-1,a=w.length-1;1<=n&&0<=a&&E[n]!==w[a];)a--;for(;1<=n&&0<=a;n--,a--)if(E[n]!==w[a]){if(n!==1||a!==1)do if(n--,a--,0>a||E[n]!==w[a]){var R=`
46
- `+E[n].replace(" at new "," at ");return e.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",e.displayName)),R}while(1<=n&&0<=a);break}}}finally{sn=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?_t(l):""}function _i(e,t){switch(e.tag){case 26:case 27:case 5:return _t(e.type);case 16:return _t("Lazy");case 13:return e.child!==t&&t!==null?_t("Suspense Fallback"):_t("Suspense");case 19:return _t("SuspenseList");case 0:case 15:return Hn(e.type,!1);case 11:return Hn(e.type.render,!1);case 1:return Hn(e.type,!0);case 31:return _t("Activity");case 30:return _t("ViewTransition");default:return""}}function Ri(e){try{var t="",l=null;do t+=_i(e,l),l=e,e=e.return;while(e);return t}catch(n){return`
47
- Error generating stack: `+n.message+`
48
- `+n.stack}}var La=Object.prototype.hasOwnProperty,Un=u.unstable_scheduleCallback,wc=u.unstable_cancelCallback,Lh=u.unstable_shouldYield,Hh=u.unstable_requestPaint,Ct=u.unstable_now,Uh=u.unstable_getCurrentPriorityLevel,_o=u.unstable_ImmediatePriority,Ro=u.unstable_UserBlockingPriority,Li=u.unstable_NormalPriority,qh=u.unstable_LowPriority,Lo=u.unstable_IdlePriority,Gh=u.log,Yh=u.unstable_setDisableYieldValue,Ha=null,Mt=null;function Bl(e){if(typeof Gh=="function"&&Yh(e),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode(Ha,e)}catch{}}var kt=Math.clz32?Math.clz32:Vh,Xh=Math.log,Qh=Math.LN2;function Vh(e){return e>>>=0,e===0?32:31-(Xh(e)/Qh|0)|0}var Hi=256,Ui=262144,qi=4194304;function on(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Gi(e,t,l){var n=e.pendingLanes;if(n===0)return 0;var a=0,i=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var x=n&134217727;return x!==0?(n=x&~i,n!==0?a=on(n):(s&=x,s!==0?a=on(s):l||(l=x&~e,l!==0&&(a=on(l))))):(x=n&~i,x!==0?a=on(x):s!==0?a=on(s):l||(l=n&~e,l!==0&&(a=on(l)))),a===0?0:t!==0&&t!==a&&(t&i)===0&&(i=a&-a,l=t&-t,i>=l||i===32&&(l&4194048)!==0)?t:a}function Ua(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ho(e,t){(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var n=31-kt(l),a=1<<n;t|=e[n],l&=~a}return t}function Zh(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Uo(){var e=qi;return qi<<=1,(qi&62914560)===0&&(qi=4194304),e}function Dc(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function qa(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Kh(e,t,l,n,a,i){var s=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var x=e.entanglements,E=e.expirationTimes,w=e.hiddenUpdates;for(l=s&~l;0<l;){var R=31-kt(l),J=1<<R;x[R]=0,E[R]=-1;var F=w[R];if(F!==null)for(w[R]=null,R=0;R<F.length;R++){var _=F[R];_!==null&&(_.lane&=-536870913)}l&=~J}n!==0&&qo(e,n,0),i!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=i&~(s&~t))}function qo(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-kt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|l&261930}function Go(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var n=31-kt(l),a=1<<n;a&t|e[n]&t&&(e[n]|=t),l&=~a}}function Yo(e,t){var l=t&-t;return l=(l&42)!==0?1:Bc(l),(l&(e.suspendedLanes|t))!==0?0:l}function Bc(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Oc(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Xo(){var e=se.p;return e!==0?e:(e=window.event,e===void 0?32:$x(e.type))}function Qo(e,t){var l=se.p;try{return se.p=e,t()}finally{se.p=l}}var xl=Math.random().toString(36).slice(2),ut="__reactFiber$"+xl,bt="__reactProps$"+xl,qn="__reactContainer$"+xl,Vo="__reactEvents$"+xl,Jh="__reactListeners$"+xl,Ih="__reactHandles$"+xl,Zo="__reactResources$"+xl,Ga="__reactMarker$"+xl,Yi="__reactLoad$"+xl;function Xi(e){delete e[ut],delete e[bt],delete e[Jh],delete e[Ih]}function fn(e){var t;if(t=e[ut])return t;for(var l=e.parentNode;l;){if(t=l[qn]||l[ut]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=Bx(e);e!==null;){if(l=e[ut])return l;e=Bx(e)}return t}e=l,l=e.parentNode}return null}function Gn(e){if(e=e[ut]||e[qn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ya(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function Yn(e){var t=e[Zo];return t||(t=e[Zo]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function tt(e){e[Ga]=!0}function Ko(e){e[Yi]=void 0}var Jo=new Set,Io={};function dn(e,t){Xn(e,t),Xn(e+"Capture",t)}function Xn(e,t){for(Io[e]=t,e=0;e<t.length;e++)Jo.add(t[e])}var Wh=RegExp("^[: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]*$"),Wo={},$o={};function $h(e){return La.call($o,e)?!0:La.call(Wo,e)?!1:Wh.test(e)?$o[e]=!0:(Wo[e]=!0,!1)}var De=!1;function Po(){var e=De;return De=!1,e}function Qi(e,t,l){if($h(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,l)}}function Vi(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,l)}}function hl(e,t,l,n){if(n===null)e.removeAttribute(l);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,n)}}function Ft(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ef(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ph(e,t,l){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var a=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(s){l=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(s){l=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function jc(e){if(!e._valueTracker){var t=ef(e)?"checked":"value";e._valueTracker=Ph(e,t,""+e[t])}}function tf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),n="";return e&&(n=ef(e)?e.checked?"true":"false":e.value),e=n,e!==l?(t.setValue(e),!0):!1}var em=/[\n"\\]/g;function Rt(e){return e.replace(em,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function zc(e,t,l,n,a,i,s,x){e.name="",s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.type=s:e.removeAttribute("type"),t!=null?s==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ft(t)):e.value!==""+Ft(t)&&(e.value=""+Ft(t)):s!=="submit"&&s!=="reset"||e.removeAttribute("value"),t!=null?s==="number"&&e.value==t?_c(e,Ft(e.value)):_c(e,Ft(t)):l!=null?_c(e,Ft(l)):n!=null&&e.removeAttribute("value"),a==null&&i!=null&&(e.defaultChecked=!!i),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+Ft(x):e.removeAttribute("name")}function lf(e,t,l,n,a,i,s,x){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||l!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){jc(e);return}l=l!=null?""+Ft(l):"",t=t!=null?""+Ft(t):l,x||t===e.value||(e.value=t),e.defaultValue=t}n=n??a,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=x?e.checked:!!n,e.defaultChecked=!!n,s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.name=s),jc(e)}function _c(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function Qn(e,t,l,n){if(e=e.options,t){t={};for(var a=0;a<l.length;a++)t["$"+l[a]]=!0;for(l=0;l<e.length;l++)a=t.hasOwnProperty("$"+e[l].value),e[l].selected!==a&&(e[l].selected=a),a&&n&&(e[l].defaultSelected=!0)}else{for(l=""+Ft(l),t=null,a=0;a<e.length;a++){if(e[a].value===l){e[a].selected=!0,n&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function nf(e,t,l){if(t!=null&&(t=""+Ft(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Ft(l):""}function af(e,t,l,n){if(t==null){if(n!=null){if(l!=null)throw Error(r(92));if(Ee(n)){if(1<n.length)throw Error(r(93));n=n[0]}l=n}l==null&&(l=""),t=l}l=Ft(t),e.defaultValue=l,n=e.textContent,n===l&&n!==""&&n!==null&&(e.value=n),jc(e)}function Vn(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var tm=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function uf(e,t,l){var n=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,l):typeof l!="number"||l===0||tm.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function cf(e,t,l){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,l!=null){for(var n in l)!l.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="",De=!0);for(var a in t)n=t[a],t.hasOwnProperty(a)&&l[a]!==n&&(uf(e,a,n),De=!0)}else for(var i in t)t.hasOwnProperty(i)&&uf(e,i,t[i])}function Rc(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var lm=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),nm=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Zi(e){return nm.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function tl(){}var Lc=null;function Hc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Zn=null,Kn=null;function rf(e){var t=Gn(e);if(t&&(e=t.stateNode)){var l=e[bt]||null;e:switch(e=t.stateNode,t.type){case"input":if(zc(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Rt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var n=l[t];if(n!==e&&n.form===e.form){var a=n[bt]||null;if(!a)throw Error(r(90));zc(n,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<l.length;t++)n=l[t],n.form===e.form&&tf(n)}break e;case"textarea":nf(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Qn(e,!!l.multiple,t,!1)}}}var Uc=!1;function sf(e,t,l){if(Uc)return e(t,l);Uc=!0;try{var n=e(t);return n}finally{if(Uc=!1,(Zn!==null||Kn!==null)&&(Zu(),Zn&&(t=Zn,e=Kn,Kn=Zn=null,rf(t),e)))for(t=0;t<e.length;t++)rf(e[t])}}function Xa(e,t){var l=e.stateNode;if(l===null)return null;var n=l[bt]||null;if(n===null)return null;l=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(r(231,t,typeof l));return l}var ml=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),qc=!1;if(ml)try{var Qa={};Object.defineProperty(Qa,"passive",{get:function(){qc=!0}}),window.addEventListener("test",Qa,Qa),window.removeEventListener("test",Qa,Qa)}catch{qc=!1}var Ol=null,Gc=null,Ki=null;function of(){if(Ki)return Ki;var e,t=Gc,l=t.length,n,a="value"in Ol?Ol.value:Ol.textContent,i=a.length;for(e=0;e<l&&t[e]===a[e];e++);var s=l-e;for(n=1;n<=s&&t[l-n]===a[i-n];n++);return Ki=a.slice(e,1<n?1-n:void 0)}function Ji(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ii(){return!0}function ff(){return!1}function mt(e){function t(l,n,a,i,s){this._reactName=l,this._targetInst=a,this.type=n,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(l=e[x],this[x]=l?l(i):i[x]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Ii:ff,this.isPropagationStopped=ff,this}return ee(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Ii)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Ii)},persist:function(){},isPersistent:Ii}),t}var jl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wi=mt(jl),Va=ee({},jl,{view:0,detail:0}),am=mt(Va),Yc,Xc,Za,$i=ee({},Va,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Vc,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Za&&(Za&&e.type==="mousemove"?(Yc=e.screenX-Za.screenX,Xc=e.screenY-Za.screenY):Xc=Yc=0,Za=e),Yc)},movementY:function(e){return"movementY"in e?e.movementY:Xc}}),df=mt($i),im=ee({},$i,{dataTransfer:0}),um=mt(im),cm=ee({},Va,{relatedTarget:0}),Qc=mt(cm),rm=ee({},jl,{animationName:0,elapsedTime:0,pseudoElement:0}),sm=mt(rm),om=ee({},jl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),fm=mt(om),dm=ee({},jl,{data:0}),xf=mt(dm),xm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hm={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},mm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gm(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=mm[e])?!!t[e]:!1}function Vc(){return gm}var pm=ee({},Va,{key:function(e){if(e.key){var t=xm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ji(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?hm[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Vc,charCode:function(e){return e.type==="keypress"?Ji(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ji(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),vm=mt(pm),bm=ee({},$i,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hf=mt(bm),ym=ee({},jl,{submitter:0}),Nm=mt(ym),Sm=ee({},Va,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Vc}),Em=mt(Sm),Am=ee({},jl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Cm=mt(Am),Mm=ee({},$i,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),km=mt(Mm),Fm=ee({},jl,{newState:0,oldState:0,source:0}),Tm=mt(Fm),wm=[9,13,27,32],Zc=ml&&"CompositionEvent"in window,Ka=null;ml&&"documentMode"in document&&(Ka=document.documentMode);var Dm=ml&&"TextEvent"in window&&!Ka,mf=ml&&(!Zc||Ka&&8<Ka&&11>=Ka),gf=" ",pf=!1;function vf(e,t){switch(e){case"keyup":return wm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Jn=!1;function Bm(e,t){switch(e){case"compositionend":return bf(t);case"keypress":return t.which!==32?null:(pf=!0,gf);case"textInput":return e=t.data,e===gf&&pf?null:e;default:return null}}function Om(e,t){if(Jn)return e==="compositionend"||!Zc&&vf(e,t)?(e=of(),Ki=Gc=Ol=null,Jn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return mf&&t.locale!=="ko"?null:t.data;default:return null}}var jm={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function yf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!jm[e.type]:t==="textarea"}function Nf(e,t,l,n){Zn?Kn?Kn.push(n):Kn=[n]:Zn=n,t=Pu(t,"onChange"),0<t.length&&(l=new Wi("onChange","change",null,l,n),e.push({event:l,listeners:t}))}var Ja=null,Ia=null;function zm(e){rx(e,0)}function Pi(e){var t=Ya(e);if(tf(t))return e}function Sf(e,t){if(e==="change")return t}var Ef=!1;if(ml){var Kc;if(ml){var Jc="oninput"in document;if(!Jc){var Af=document.createElement("div");Af.setAttribute("oninput","return;"),Jc=typeof Af.oninput=="function"}Kc=Jc}else Kc=!1;Ef=Kc&&(!document.documentMode||9<document.documentMode)}function Cf(){Ja&&(Ja.detachEvent("onpropertychange",Mf),Ia=Ja=null)}function Mf(e){if(e.propertyName==="value"&&Pi(Ia)){var t=[];Nf(t,Ia,e,Hc(e)),sf(zm,t)}}function _m(e,t,l){e==="focusin"?(Cf(),Ja=t,Ia=l,Ja.attachEvent("onpropertychange",Mf)):e==="focusout"&&Cf()}function Rm(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Pi(Ia)}function Lm(e,t){if(e==="click")return Pi(t)}function Hm(e,t){if(e==="input"||e==="change")return Pi(t)}function Um(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tt=typeof Object.is=="function"?Object.is:Um;function Wa(e,t){if(Tt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),n=Object.keys(t);if(l.length!==n.length)return!1;for(n=0;n<l.length;n++){var a=l[n];if(!La.call(t,a)||!Tt(e[a],t[a]))return!1}return!0}function Ic(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 kf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ff(e,t){var l=kf(e);e=0;for(var n;l;){if(l.nodeType===3){if(n=e+l.textContent.length,e<=t&&n>=t)return{node:l,offset:t-e};e=n}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=kf(l)}}function Tf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Tf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function wf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ic(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Ic(e.document)}return t}function Wc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var qm=ml&&"documentMode"in document&&11>=document.documentMode,In=null,$c=null,$a=null,Pc=!1;function Df(e,t,l){var n=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Pc||In==null||In!==Ic(n)||(n=In,"selectionStart"in n&&Wc(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),$a&&Wa($a,n)||($a=n,n=Pu($c,"onSelect"),0<n.length&&(t=new Wi("onSelect","select",null,t,l),e.push({event:t,listeners:n}),t.target=In)))}function xn(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Wn={animationend:xn("Animation","AnimationEnd"),animationiteration:xn("Animation","AnimationIteration"),animationstart:xn("Animation","AnimationStart"),transitionrun:xn("Transition","TransitionRun"),transitionstart:xn("Transition","TransitionStart"),transitioncancel:xn("Transition","TransitionCancel"),transitionend:xn("Transition","TransitionEnd")},er={},Bf={};ml&&(Bf=document.createElement("div").style,"AnimationEvent"in window||(delete Wn.animationend.animation,delete Wn.animationiteration.animation,delete Wn.animationstart.animation),"TransitionEvent"in window||delete Wn.transitionend.transition);function hn(e){if(er[e])return er[e];if(!Wn[e])return e;var t=Wn[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Bf)return er[e]=t[l];return e}var Of=hn("animationend"),jf=hn("animationiteration"),zf=hn("animationstart"),Gm=hn("transitionrun"),Ym=hn("transitionstart"),Xm=hn("transitioncancel"),_f=hn("transitionend"),Rf=new Map,tr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");tr.push("scrollEnd");function Zt(e,t){Rf.set(e,t),dn(t,[e])}var Qm=0;function gl(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=Wt.identifierPrefix;var l=Qm++;return e="_"+e+"t_"+l.toString(32)+"_",t.autoName=e}function Lf(e){if(e==null||typeof e=="string")return e;var t=null,l=pa;if(l!==null)for(var n=0;n<l.length;n++){var a=e[l[n]];if(a!=null){if(a==="none")return"none";t=t==null?a:t+(" "+a)}}return t??e.default}function pl(e,t){return e=Lf(e),t=Lf(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var eu=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Lt=[],$n=0,lr=0;function tu(){for(var e=$n,t=lr=$n=0;t<e;){var l=Lt[t];Lt[t++]=null;var n=Lt[t];Lt[t++]=null;var a=Lt[t];Lt[t++]=null;var i=Lt[t];if(Lt[t++]=null,n!==null&&a!==null){var s=n.pending;s===null?a.next=a:(a.next=s.next,s.next=a),n.pending=a}i!==0&&Hf(l,a,i)}}function lu(e,t,l,n){Lt[$n++]=e,Lt[$n++]=t,Lt[$n++]=l,Lt[$n++]=n,lr|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function nr(e,t,l,n){return lu(e,t,l,n),nu(e)}function mn(e,t){return lu(e,null,null,t),nu(e)}function Hf(e,t,l){e.lanes|=l;var n=e.alternate;n!==null&&(n.lanes|=l);for(var a=!1,i=e.return;i!==null;)i.childLanes|=l,n=i.alternate,n!==null&&(n.childLanes|=l),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(a=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,a&&t!==null&&(a=31-kt(l),e=i.hiddenUpdates,n=e[a],n===null?e[a]=[t]:n.push(t),t.lane=l|536870912),i):null}function nu(e){if(50<yi)throw yi=0,Vu=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Pn={};function Vm(e,t,l,n){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yt(e,t,l,n){return new Vm(e,t,l,n)}function ar(e){return e=e.prototype,!(!e||!e.isReactComponent)}function vl(e,t){var l=e.alternate;return l===null?(l=yt(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&1206910976,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Uf(e,t){e.flags&=1206910978;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function au(e,t,l,n,a,i){var s=0;if(n=e,typeof n=="function")ar(n)&&(s=1);else if(typeof n=="string")s=y2(e,l,it.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(n){case re:return e=yt(31,l,t,a),e.elementType=re,e.lanes=i,e;case D:return gn(l.children,a,i,t);case $:s=8,a|=24;break;case Y:return e=yt(12,l,t,a|2),e.elementType=Y,e.lanes=i,e;case k:return e=yt(13,l,t,a),e.elementType=k,e.lanes=i,e;case O:return e=yt(19,l,t,a),e.elementType=O,e.lanes=i,e;case ne:case S:return e=a|32,e=yt(30,l,t,e),e.elementType=S,e.lanes=i,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case j:s=10;break e;case ae:s=9;break e;case B:s=11;break e;case Q:s=14;break e;case P:s=16,n=null;break e}s=29,l=Error(r(130,e===null?"null":typeof e,"")),n=null}return t=yt(s,l,t,a),t.elementType=e,t.type=n,t.lanes=i,t}function gn(e,t,l,n){return e=yt(7,e,n,t),e.lanes=l,e}function ir(e,t,l){return e=yt(6,e,null,t),e.lanes=l,e}function qf(e){var t=yt(18,null,null,0);return t.stateNode=e,t}function ur(e,t,l){return t=yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Gf=new WeakMap;function Ht(e,t){if(typeof e=="object"&&e!==null){var l=Gf.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Ri(t)},Gf.set(e,t),t)}return{value:e,source:t,stack:Ri(t)}}var ea=[],ta=0,iu=null,Pa=0,Ut=[],qt=0,zl=null,ll=1,nl="";function bl(e,t){ea[ta++]=Pa,ea[ta++]=iu,iu=e,Pa=t}function Yf(e,t,l){Ut[qt++]=ll,Ut[qt++]=nl,Ut[qt++]=zl,zl=e;var n=ll;e=nl;var a=32-kt(n)-1;n&=~(1<<a),l+=1;var i=32-kt(t)+a;if(30<i){var s=a-a%5;i=(n&(1<<s)-1).toString(32),n>>=s,a-=s,ll=1<<32-kt(t)+a|l<<a|n,nl=i+e}else ll=1<<i|l<<a|n,nl=e}function uu(e){e.return!==null&&(bl(e,1),Yf(e,1,0))}function cr(e){for(;e===iu;)iu=ea[--ta],ea[ta]=null,Pa=ea[--ta],ea[ta]=null;for(;e===zl;)zl=Ut[--qt],Ut[qt]=null,nl=Ut[--qt],Ut[qt]=null,ll=Ut[--qt],Ut[qt]=null}function Xf(e,t){Ut[qt++]=ll,Ut[qt++]=nl,Ut[qt++]=zl,ll=t.id,nl=t.overflow,zl=e}var lt=null,Ue=null,Se=!1,_l=null,Gt=!1,rr=Error(r(519));function Rl(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ei(Ht(t,e)),rr}function Qf(e){var t=e.stateNode,l=e.type,n=e.memoizedProps;switch(t[ut]=e,t[bt]=n,l){case"dialog":Me("cancel",t),Me("close",t);break;case"iframe":case"object":case"embed":Me("load",t);break;case"video":case"audio":for(l=0;l<Si.length;l++)Me(Si[l],t);break;case"source":Me("error",t);break;case"img":case"image":case"link":Me("error",t),Me("load",t);break;case"details":Me("toggle",t);break;case"input":Me("invalid",t),lf(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":Me("invalid",t);break;case"textarea":Me("invalid",t),af(t,n.value,n.defaultValue,n.children)}l=n.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||n.suppressHydrationWarning===!0||dx(t.textContent,l)?(n.popover!=null&&(Me("beforetoggle",t),Me("toggle",t)),n.onScroll!=null&&Me("scroll",t),n.onScrollEnd!=null&&Me("scrollend",t),n.onClick!=null&&(t.onclick=tl),t=!0):t=!1,t||Rl(e,!0)}function cu(e){for(lt=e.return;lt;)switch(lt.tag){case 5:case 31:case 13:Gt=!1;return;case 27:case 3:Gt=!0;return;default:lt=lt.return}}function la(e){if(e!==lt)return!1;if(!Se)return cu(e),Se=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Ls(e.type,e.memoizedProps)),l=!l),l&&Ue&&Rl(e),cu(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ue=Dx(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ue=Dx(e)}else t===27?(t=Ue,Pl(e.type)?(e=Zs,Zs=null,Ue=e):Ue=t):Ue=lt?Xt(e.stateNode.nextSibling):null;return!0}function pn(){Ue=lt=null,Se=!1}function sr(){var e=_l;return e!==null&&(Et===null?Et=e:Et.push.apply(Et,e),_l=null),e}function ei(e){_l===null?_l=[e]:_l.push(e)}var or=Ge(null),vn=null,yl=null;function Ll(e,t,l){we(or,t._currentValue),t._currentValue=l}function Nl(e){e._currentValue=or.current,Ve(or)}function ru(e,t,l){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===l)break;e=e.return}}function fr(e,t,l,n){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var i=a.dependencies;if(i!==null){var s=a.child;i=i.firstContext;e:for(;i!==null;){var x=i;i=a;for(var E=0;E<t.length;E++)if(x.context===t[E]){i.lanes|=l,x=i.alternate,x!==null&&(x.lanes|=l),ru(i.return,l,e),n||(s=null);break e}i=x.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(r(341));s.lanes|=l,i=s.alternate,i!==null&&(i.lanes|=l),ru(s,l,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=l,s=a.alternate,s!==null&&(s.lanes|=l),ru(a.return,l,e),s=a.child,s=s!==null?s.sibling:null):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function bn(e,t,l,n){e=null;for(var a=t,i=!1;a!==null;){if(!i){if((a.flags&524288)!==0)i=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(r(387));if(s=s.memoizedProps,s!==null){var x=a.type;Tt(a.pendingProps.value,s.value)||(e!==null?e.push(x):e=[x])}}else if(a===Rn.current){if(s=a.alternate,s===null)throw Error(r(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(ka):e=[ka])}a=a.return}return e!==null&&fr(t,e,l,n),t.flags|=262144,e!==null}function su(e){for(e=e.firstContext;e!==null;){if(!Tt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function yn(e){vn=e,yl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ct(e){return Vf(vn,e)}function ou(e,t){return vn===null&&yn(e),Vf(e,t)}function Vf(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},yl===null){if(e===null)throw Error(r(308));yl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else yl=yl.next=t;return l}var Zm=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},Km=u.unstable_scheduleCallback,Jm=u.unstable_NormalPriority,Ie={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function dr(){return{controller:new Zm,data:new Map,refCount:0}}function ti(e){e.refCount--,e.refCount===0&&Km(Jm,function(){e.controller.abort()})}function Zf(e,t){if((e.pendingLanes&4194048)!==0){var l=e.transitionTypes;for(l===null&&(l=e.transitionTypes=[]),e=0;e<t.length;e++){var n=t[e];l.indexOf(n)===-1&&l.push(n)}}}var li=null;function Im(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var ni=null,xr=0,Nn=0,na=null;function Wm(e,t){if(ni===null){var l=ni=[];xr=0,Nn=Ts(),na={status:"pending",value:void 0,then:function(n){l.push(n)}}}return xr++,t.then(Kf,Kf),t}function Kf(){if(--xr===0&&(li=null,ni!==null)){na!==null&&(na.status="fulfilled");var e=ni;ni=null,Nn=0,na=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function $m(e,t){var l=[],n={status:"pending",value:null,reason:null,then:function(a){l.push(a)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var a=0;a<l.length;a++)(0,l[a])(t)},function(a){for(n.status="rejected",n.reason=a,a=0;a<l.length;a++)(0,l[a])(void 0)}),n}var Jf=xe.S;xe.S=function(e,t){if(qd=Ct(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Wm(e,t),li!==null)for(var l=Na;l!==null;)Zf(l,li),l=l.next;if(l=e.types,l!==null){for(var n=Na;n!==null;)Zf(n,l),n=n.next;if(Nn!==0){n=li,n===null&&(n=li=[]);for(var a=0;a<l.length;a++){var i=l[a];n.indexOf(i)===-1&&n.push(i)}}}Jf!==null&&Jf(e,t)};var Sn=Ge(null);function hr(){var e=Sn.current;return e!==null?e:He.pooledCache}function fu(e,t){t===null?we(Sn,Sn.current):we(Sn,t.pool)}function If(){var e=hr();return e===null?null:{parent:Ie._currentValue,pool:e}}var aa=Error(r(460)),mr=Error(r(474)),du=Error(r(542)),xu={then:function(){}};function Wf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function $f(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(tl,tl),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,e0(e),e===void 0&&!("reason"in t)?Error(r(600)):e;default:if(typeof t.status=="string")t.then(tl,tl);else{if(e=He,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=n}},function(n){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,e0(e),e}throw An=t,aa}}function En(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(An=l,aa):l}}var An=null;function Pf(){if(An===null)throw Error(r(459));var e=An;return An=null,e}function e0(e){if(e===aa||e===du)throw Error(r(483))}var ia=null,ai=0;function hu(e){var t=ai;return ai+=1,ia===null&&(ia=[]),$f(ia,e,t)}function Hl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function mu(e,t){throw t.$$typeof===G?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function t0(e){function t(T,M){if(e){var z=T.deletions;z===null?(T.deletions=[M],T.flags|=16):z.push(M)}}function l(T,M){if(!e)return null;for(;M!==null;)t(T,M),M=M.sibling;return null}function n(T){for(var M=new Map;T!==null;)T.key===null?M.set(T.index,T):M.set(T.key,T),T=T.sibling;return M}function a(T,M){return T=vl(T,M),T.index=0,T.sibling=null,T}function i(T,M,z){return T.index=z,e?(z=T.alternate,z!==null?(z=z.index,z<M?(T.flags|=2,M):z):(T.flags|=134217730,M)):(T.flags|=1048576,M)}function s(T){return e&&T.alternate===null&&(T.flags|=134217730),T}function x(T,M,z,K){return M===null||M.tag!==6?(M=ir(z,T.mode,K),M.return=T,M):(M=a(M,z),M.return=T,M)}function E(T,M,z,K){var fe=z.type;return fe===D?(T=R(T,M,z.props.children,K,z.key),Hl(T,z),T):M!==null&&(M.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===P&&En(fe)===M.type)?(M=a(M,z.props),Hl(M,z),M.return=T,M):(M=au(z.type,z.key,z.props,null,T.mode,K),Hl(M,z),M.return=T,M)}function w(T,M,z,K){return M===null||M.tag!==4||M.stateNode.containerInfo!==z.containerInfo||M.stateNode.implementation!==z.implementation?(M=ur(z,T.mode,K),M.return=T,M):(M=a(M,z.children||[]),M.return=T,M)}function R(T,M,z,K,fe){return M===null||M.tag!==7?(M=gn(z,T.mode,K,fe),M.return=T,M):(M=a(M,z),M.return=T,M)}function J(T,M,z){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=ir(""+M,T.mode,z),M.return=T,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case A:return z=au(M.type,M.key,M.props,null,T.mode,z),Hl(z,M),z.return=T,z;case X:return M=ur(M,T.mode,z),M.return=T,M;case P:return M=En(M),J(T,M,z)}if(Ee(M)||I(M))return M=gn(M,T.mode,z,null),M.return=T,M;if(typeof M.then=="function")return J(T,hu(M),z);if(M.$$typeof===j)return J(T,ou(T,M),z);mu(T,M)}return null}function F(T,M,z,K){var fe=M!==null?M.key:null;if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return fe!==null?null:x(T,M,""+z,K);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case A:return z.key===fe?E(T,M,z,K):null;case X:return z.key===fe?w(T,M,z,K):null;case P:return z=En(z),F(T,M,z,K)}if(Ee(z)||I(z))return fe!==null?null:R(T,M,z,K,null);if(typeof z.then=="function")return F(T,M,hu(z),K);if(z.$$typeof===j)return F(T,M,ou(T,z),K);mu(T,z)}return null}function _(T,M,z,K,fe){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return T=T.get(z)||null,x(M,T,""+K,fe);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case A:return T=T.get(K.key===null?z:K.key)||null,E(M,T,K,fe);case X:return T=T.get(K.key===null?z:K.key)||null,w(M,T,K,fe);case P:return K=En(K),_(T,M,z,K,fe)}if(Ee(K)||I(K))return T=T.get(z)||null,R(M,T,K,fe,null);if(typeof K.then=="function")return _(T,M,z,hu(K),fe);if(K.$$typeof===j)return _(T,M,z,ou(M,K),fe);mu(M,K)}return null}function ue(T,M,z,K){for(var fe=null,Fe=null,he=M,pe=M=0,Pe=null;he!==null&&pe<z.length;pe++){he.index>pe?(Pe=he,he=null):Pe=he.sibling;var Te=F(T,he,z[pe],K);if(Te===null){he===null&&(he=Pe);break}e&&he&&Te.alternate===null&&t(T,he),M=i(Te,M,pe),Fe===null?fe=Te:Fe.sibling=Te,Fe=Te,he=Pe}if(pe===z.length)return l(T,he),Se&&bl(T,pe),fe;if(he===null){for(;pe<z.length;pe++)he=J(T,z[pe],K),he!==null&&(M=i(he,M,pe),Fe===null?fe=he:Fe.sibling=he,Fe=he);return Se&&bl(T,pe),fe}for(he=n(he);pe<z.length;pe++)Pe=_(he,T,pe,z[pe],K),Pe!==null&&(e&&(Te=Pe.alternate,Te!==null&&he.delete(Te.key===null?pe:Te.key)),M=i(Pe,M,pe),Fe===null?fe=Pe:Fe.sibling=Pe,Fe=Pe);return e&&he.forEach(function(an){return t(T,an)}),Se&&bl(T,pe),fe}function de(T,M,z,K){if(z==null)throw Error(r(151));for(var fe=null,Fe=null,he=M,pe=M=0,Pe=null,Te=z.next();he!==null&&!Te.done;pe++,Te=z.next()){he.index>pe?(Pe=he,he=null):Pe=he.sibling;var an=F(T,he,Te.value,K);if(an===null){he===null&&(he=Pe);break}e&&he&&an.alternate===null&&t(T,he),M=i(an,M,pe),Fe===null?fe=an:Fe.sibling=an,Fe=an,he=Pe}if(Te.done)return l(T,he),Se&&bl(T,pe),fe;if(he===null){for(;!Te.done;pe++,Te=z.next())Te=J(T,Te.value,K),Te!==null&&(M=i(Te,M,pe),Fe===null?fe=Te:Fe.sibling=Te,Fe=Te);return Se&&bl(T,pe),fe}for(he=n(he);!Te.done;pe++,Te=z.next())Te=_(he,T,pe,Te.value,K),Te!==null&&(e&&(Pe=Te.alternate,Pe!==null&&he.delete(Pe.key===null?pe:Pe.key)),M=i(Te,M,pe),Fe===null?fe=Te:Fe.sibling=Te,Fe=Te);return e&&he.forEach(function(B2){return t(T,B2)}),Se&&bl(T,pe),fe}function Ne(T,M,z,K){if(typeof z=="object"&&z!==null&&z.type===D&&z.key===null&&z.props.ref===void 0&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case A:e:{for(var fe=z.key;M!==null;){if(M.key===fe){if(fe=z.type,fe===D){if(M.tag===7){l(T,M.sibling),K=a(M,z.props.children),Hl(K,z),K.return=T,T=K;break e}}else if(M.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===P&&En(fe)===M.type){l(T,M.sibling),K=a(M,z.props),Hl(K,z),K.return=T,T=K;break e}l(T,M);break}else t(T,M);M=M.sibling}z.type===D?(K=gn(z.props.children,T.mode,K,z.key),Hl(K,z),K.return=T,T=K):(K=au(z.type,z.key,z.props,null,T.mode,K),Hl(K,z),K.return=T,T=K)}return s(T);case X:e:{for(fe=z.key;M!==null;){if(M.key===fe)if(M.tag===4&&M.stateNode.containerInfo===z.containerInfo&&M.stateNode.implementation===z.implementation){l(T,M.sibling),K=a(M,z.children||[]),K.return=T,T=K;break e}else{l(T,M);break}else t(T,M);M=M.sibling}K=ur(z,T.mode,K),K.return=T,T=K}return s(T);case P:return z=En(z),Ne(T,M,z,K)}if(Ee(z))return ue(T,M,z,K);if(I(z)){if(fe=I(z),typeof fe!="function")throw Error(r(150));return z=fe.call(z),de(T,M,z,K)}if(typeof z.then=="function")return Ne(T,M,hu(z),K);if(z.$$typeof===j)return Ne(T,M,ou(T,z),K);mu(T,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,M!==null&&M.tag===6?(l(T,M.sibling),K=a(M,z),K.return=T,T=K):(l(T,M),K=ir(z,T.mode,K),K.return=T,T=K),s(T)):l(T,M)}return function(T,M,z,K){try{ai=0;var fe=Ne(T,M,z,K);return ia=null,fe}catch(he){if(he===aa||he===du)throw he;var Fe=yt(29,he,null,T.mode);return Fe.lanes=K,Fe.return=T,Fe}finally{}}}var Cn=t0(!0),l0=t0(!1),Ul=!1;function gr(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function pr(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ql(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Gl(e,t,l){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Be&2)!==0){var a=n.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),n.pending=t,t=nu(e),Hf(e,null,l),t}return lu(e,n,t,l),nu(e)}function ii(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,Go(e,l)}}function vr(e,t){var l=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,l===n)){var a=null,i=null;if(l=l.firstBaseUpdate,l!==null){do{var s={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};i===null?a=i=s:i=i.next=s,l=l.next}while(l!==null);i===null?a=i=t:i=i.next=t}else a=i=t;l={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:n.shared,callbacks:n.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var br=!1;function ui(){if(br){var e=na;if(e!==null)throw e}}function ci(e,t,l,n){br=!1;var a=e.updateQueue;Ul=!1;var i=a.firstBaseUpdate,s=a.lastBaseUpdate,x=a.shared.pending;if(x!==null){a.shared.pending=null;var E=x,w=E.next;E.next=null,s===null?i=w:s.next=w,s=E;var R=e.alternate;R!==null&&(R=R.updateQueue,x=R.lastBaseUpdate,x!==s&&(x===null?R.firstBaseUpdate=w:x.next=w,R.lastBaseUpdate=E))}if(i!==null){var J=a.baseState;s=0,R=w=E=null,x=i;do{var F=x.lane&-536870913,_=F!==x.lane;if(_?(ke&F)===F:(n&F)===F){F!==0&&F===Nn&&(br=!0),R!==null&&(R=R.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var ue=e,de=x;F=t;var Ne=l;switch(de.tag){case 1:if(ue=de.payload,typeof ue=="function"){J=ue.call(Ne,J,F);break e}J=ue;break e;case 3:ue.flags=ue.flags&-65537|128;case 0:if(ue=de.payload,F=typeof ue=="function"?ue.call(Ne,J,F):ue,F==null)break e;J=ee({},J,F);break e;case 2:Ul=!0}}F=x.callback,F!==null&&(e.flags|=64,_&&(e.flags|=8192),_=a.callbacks,_===null?a.callbacks=[F]:_.push(F))}else _={lane:F,tag:x.tag,payload:x.payload,callback:x.callback,next:null},R===null?(w=R=_,E=J):R=R.next=_,s|=F;if(x=x.next,x===null){if(x=a.shared.pending,x===null)break;_=x,x=_.next,_.next=null,a.lastBaseUpdate=_,a.shared.pending=null}}while(!0);R===null&&(E=J),a.baseState=E,a.firstBaseUpdate=w,a.lastBaseUpdate=R,i===null&&(a.shared.lanes=0),Jl|=s,e.lanes=s,e.memoizedState=J}}function n0(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function a0(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)n0(l[e],t)}var Yl=Ge(null),gu=Ge(0);function i0(e,t){e=Ml,we(gu,e),we(Yl,t),Ml=e|t.baseLanes}function yr(){we(gu,Ml),we(Yl,Yl.current)}function Nr(){Ml=gu.current,Ve(Yl),Ve(gu)}var rt=Ge(null),ht=null;function Xl(e){var t=e.alternate;we(st,st.current&1),we(rt,e),ht===null&&(t===null||Yl.current!==null||t.memoizedState!==null)&&(ht=e)}function Sr(e){we(st,st.current),we(rt,e),ht===null&&(ht=e)}function u0(e){e.tag===22?(we(st,st.current),we(rt,e),ht===null&&(ht=e)):Ql()}function Ql(){we(st,st.current),we(rt,rt.current)}function wt(e){Ve(rt),ht===e&&(ht=null),Ve(st)}var st=Ge(0);function ri(e,t){we(rt,rt.current),we(st,t)}function Er(e){Ve(st),Ve(rt),ht===e&&(ht=null)}function pu(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Qs(l)||Vs(l)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Sl=0,ye=null,Le=null,We=null,vu=!1,ua=!1,Mn=!1,bu=0,si=0,ca=null,Pm=0;function Ze(){throw Error(r(321))}function Ar(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!Tt(e[l],t[l]))return!1;return!0}function Cr(e,t,l,n,a,i){return Sl=i,ye=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,xe.H=e===null||e.memoizedState===null?Y0:X0,Mn=!1,i=l(n,a),Mn=!1,ua&&(i=r0(t,l,n,a)),c0(e),i}function c0(e){xe.H=Mu;var t=Le!==null&&Le.next!==null;if(Sl=0,We=Le=ye=null,vu=!1,si=0,ca=null,t)throw Error(r(300));e===null||$e||(e=e.dependencies,e!==null&&su(e)&&($e=!0))}function r0(e,t,l,n){ye=e;var a=0;do{if(ua&&(ca=null),si=0,ua=!1,25<=a)throw Error(r(301));if(a+=1,We=Le=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}xe.H=cg,i=t(l,n)}while(ua);return i}function eg(){var e=xe.H,t=e.useState()[0];return t=typeof t.then=="function"?oi(t):t,e=e.useState()[0],(Le!==null?Le.memoizedState:null)!==e&&(ye.flags|=1024),t}function Mr(){var e=bu!==0;return bu=0,e}function kr(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Fr(e){if(vu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}vu=!1}Sl=0,We=Le=ye=null,ua=!1,si=bu=0,ca=null}function gt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return We===null?ye.memoizedState=We=e:We=We.next=e,We}function Je(){if(Le===null){var e=ye.alternate;e=e!==null?e.memoizedState:null}else e=Le.next;var t=We===null?ye.memoizedState:We.next;if(t!==null)We=t,Le=e;else{if(e===null)throw ye.alternate===null?Error(r(467)):Error(r(310));Le=e,e={memoizedState:Le.memoizedState,baseState:Le.baseState,baseQueue:Le.baseQueue,queue:Le.queue,next:null},We===null?ye.memoizedState=We=e:We=We.next=e}return We}function yu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function oi(e){var t=si;return si+=1,ca===null&&(ca=[]),e=$f(ca,e,t),t=ye,(We===null?t.memoizedState:We.next)===null&&(t=t.alternate,xe.H=t===null||t.memoizedState===null?Y0:X0),e}function Nu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return oi(e);if(e.$$typeof===H)return;if(e.$$typeof===j)return ct(e)}throw Error(r(438,String(e)))}function Tr(e){var t=null,l=ye.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var n=ye.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=yu(),ye.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),n=0;n<e;n++)l[n]=ie;return t.index++,l}function El(e,t){return typeof t=="function"?t(e):t}function Su(e){var t=Je();return wr(t,Le,e)}function wr(e,t,l){var n=e.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=l;var a=e.baseQueue,i=n.pending;if(i!==null){if(a!==null){var s=a.next;a.next=i.next,i.next=s}t.baseQueue=a=i,n.pending=null}if(i=e.baseState,a===null)e.memoizedState=i;else{t=a.next;var x=s=null,E=null,w=t,R=!1;do{var J=w.lane&-536870913;if(J!==w.lane?(ke&J)===J:(Sl&J)===J){var F=w.revertLane;if(F===0)E!==null&&(E=E.next={lane:0,revertLane:0,gesture:null,action:w.action,hasEagerState:w.hasEagerState,eagerState:w.eagerState,next:null}),J===Nn&&(R=!0);else if((Sl&F)===F){w=w.next,F===Nn&&(R=!0);continue}else J={lane:0,revertLane:w.revertLane,gesture:null,action:w.action,hasEagerState:w.hasEagerState,eagerState:w.eagerState,next:null},E===null?(x=E=J,s=i):E=E.next=J,ye.lanes|=F,Jl|=F;J=w.action,Mn&&l(i,J),i=w.hasEagerState?w.eagerState:l(i,J)}else F={lane:J,revertLane:w.revertLane,gesture:w.gesture,action:w.action,hasEagerState:w.hasEagerState,eagerState:w.eagerState,next:null},E===null?(x=E=F,s=i):E=E.next=F,ye.lanes|=J,Jl|=J;w=w.next}while(w!==null&&w!==t);if(E===null?s=i:E.next=x,!Tt(i,e.memoizedState)&&($e=!0,R&&(l=na,l!==null)))throw l;e.memoizedState=i,e.baseState=s,e.baseQueue=E,n.lastRenderedState=i}return a===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Dr(e){var t=Je(),l=t.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var n=l.dispatch,a=l.pending,i=t.memoizedState;if(a!==null){l.pending=null;var s=a=a.next;do i=e(i,s.action),s=s.next;while(s!==a);Tt(i,t.memoizedState)||($e=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),l.lastRenderedState=i}return[i,n]}function s0(e,t,l){var n=ye,a=Je(),i=Se;if(i){if(l===void 0)throw Error(r(407));l=l()}else l=t();var s=!Tt((Le||a).memoizedState,l);if(s&&(a.memoizedState=l,$e=!0),a=a.queue,jr(d0.bind(null,n,a,e),[e]),e=a.getSnapshot!==t||s||We!==null&&(We.memoizedState.tag&1)!==0,ra(e?9:8,{destroy:void 0},f0.bind(null,n,a,l,t),null),e){if(n.flags|=2048,He===null)throw Error(r(349));i||(Sl&127)!==0||o0(n,t,l)}return l}function o0(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=ye.updateQueue,t===null?(t=yu(),ye.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function f0(e,t,l,n){t.value=l,t.getSnapshot=n,x0(t)&&h0(e)}function d0(e,t,l){return l(function(){x0(t)&&h0(e)})}function x0(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Tt(e,l)}catch{return!0}}function h0(e){var t=mn(e,2);t!==null&&At(t,e,2)}function Br(e){var t=gt();if(typeof e=="function"){var l=e;if(e=l(),Mn){Bl(!0);try{l()}finally{Bl(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:El,lastRenderedState:e},t}function m0(e,t,l,n){return e.baseState=l,wr(e,Le,typeof n=="function"?n:El)}function tg(e,t,l,n,a){if(Cu(e))throw Error(r(485));if(e=t.action,e!==null){var i={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(s){i.listeners.push(s)}};xe.T!==null?l(!0):i.isTransition=!1,n(i),l=t.pending,l===null?(i.next=t.pending=i,g0(t,i)):(i.next=l.next,t.pending=l.next=i)}}function g0(e,t){var l=t.action,n=t.payload,a=e.state;if(t.isTransition){var i=xe.T,s={};s.types=i!==null?i.types:null,xe.T=s;try{var x=l(a,n),E=xe.S;E!==null&&E(s,x),p0(e,t,x)}catch(w){Or(e,t,w)}finally{i!==null&&s.types!==null&&(i.types=s.types),xe.T=i}}else try{i=l(a,n),p0(e,t,i)}catch(w){Or(e,t,w)}}function p0(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(n){v0(e,t,n)},function(n){return Or(e,t,n)}):v0(e,t,l)}function v0(e,t,l){t.status="fulfilled",t.value=l,b0(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,g0(e,l)))}function Or(e,t,l){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=l,b0(t),t=t.next;while(t!==n)}e.action=null}function b0(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function y0(e,t){return t}function N0(e,t){if(Se){var l=He.formState;if(l!==null){e:{var n=ye;if(Se){if(Ue){t:{for(var a=Ue,i=Gt;a.nodeType!==8;){if(!i){a=null;break t}if(a=Xt(a.nextSibling),a===null){a=null;break t}}i=a.data,a=i==="F!"||i==="F"?a:null}if(a){Ue=Xt(a.nextSibling),n=a.data==="F!";break e}}Rl(n)}n=!1}n&&(t=l[0])}}return l=gt(),l.memoizedState=l.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:y0,lastRenderedState:t},l.queue=n,l=U0.bind(null,ye,n),n.dispatch=l,n=Br(!1),i=Hr.bind(null,ye,!1,n.queue),n=gt(),a={state:t,dispatch:null,action:e,pending:null},n.queue=a,l=tg.bind(null,ye,a,i,l),a.dispatch=l,n.memoizedState=e,[t,l,!1]}function S0(e){var t=Je();return E0(t,Le,e)}function E0(e,t,l){if(t=wr(e,t,y0)[0],e=Su(El)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=oi(t)}catch(s){throw s===aa?du:s}else n=t;t=Je();var a=t.queue,i=a.dispatch;return l!==t.memoizedState&&(ye.flags|=2048,ra(9,{destroy:void 0},lg.bind(null,a,l),null)),[n,i,e]}function lg(e,t){e.action=t}function A0(e){var t=Je(),l=Le;if(l!==null)return E0(t,l,e);Je(),t=t.memoizedState,l=Je();var n=l.queue.dispatch;return l.memoizedState=e,[t,n,!1]}function ra(e,t,l,n){return e={tag:e,create:l,deps:n,inst:t,next:null},t=ye.updateQueue,t===null&&(t=yu(),ye.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(n=l.next,l.next=e,e.next=n,t.lastEffect=e),e}function C0(){return Je().memoizedState}function Eu(e,t,l,n){var a=gt();ye.flags|=e,a.memoizedState=ra(1|t,{destroy:void 0},l,n===void 0?null:n)}function Au(e,t,l,n){var a=Je();n=n===void 0?null:n;var i=a.memoizedState.inst;Le!==null&&n!==null&&Ar(n,Le.memoizedState.deps)?a.memoizedState=ra(t,i,l,n):(ye.flags|=e,a.memoizedState=ra(1|t,i,l,n))}function M0(e,t){Eu(8390656,8,e,t)}function jr(e,t){Au(2048,8,e,t)}function ng(e){ye.flags|=4;var t=ye.updateQueue;if(t===null)t=yu(),ye.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function k0(e){var t=Je().memoizedState;return ng({ref:t,nextImpl:e}),function(){if((Be&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function F0(e,t){return Au(4,2,e,t)}function T0(e,t){return Au(4,4,e,t)}function w0(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function D0(e,t,l){l=l!=null?l.concat([e]):null,Au(4,4,w0.bind(null,t,e),l)}function zr(){}function B0(e,t){var l=Je();t=t===void 0?null:t;var n=l.memoizedState;return t!==null&&Ar(t,n[1])?n[0]:(l.memoizedState=[e,t],e)}function O0(e,t){var l=Je();t=t===void 0?null:t;var n=l.memoizedState;if(t!==null&&Ar(t,n[1]))return n[0];if(n=e(),Mn){Bl(!0);try{e()}finally{Bl(!1)}}return l.memoizedState=[n,t],n}function _r(e,t,l){return l===void 0||(Sl&1073741824)!==0&&(ke&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Yd(),ye.lanes|=e,Jl|=e,l)}function j0(e,t,l,n){return Tt(l,t)?l:Yl.current!==null?(e=_r(e,l,n),Tt(e,t)||($e=!0),e):(Sl&106)===0||(Sl&1073741824)!==0&&(ke&261930)===0?($e=!0,e.memoizedState=l):(e=Yd(),ye.lanes|=e,Jl|=e,t)}function z0(e,t,l,n,a){var i=se.p;se.p=i!==0&&8>i?i:8;var s=xe.T,x={};x.types=s!==null?s.types:null,xe.T=x,Hr(e,!1,t,l);try{var E=a(),w=xe.S;if(w!==null&&w(x,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var R=$m(E,n);fi(e,t,R,jt(e))}else fi(e,t,n,jt(e))}catch(J){fi(e,t,{then:function(){},status:"rejected",reason:J},jt())}finally{se.p=i,s!==null&&x.types!==null&&(s.types=x.types),xe.T=s}}function ag(){}function Rr(e,t,l,n){if(e.tag!==5)throw Error(r(476));var a=_0(e).queue;z0(e,a,t,Oe,l===null?ag:function(){return R0(e),l(n)})}function _0(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Oe,baseState:Oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:El,lastRenderedState:Oe},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:El,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function R0(e){var t=_0(e);t.next===null&&(t=e.alternate.memoizedState),fi(e,t.next.queue,{},jt())}function Lr(){return ct(ka)}function L0(){return Je().memoizedState}function H0(){return Je().memoizedState}function ig(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=jt();e=ql(l);var n=Gl(t,e,l);n!==null&&(At(n,t,l),ii(n,t,l)),t={cache:dr()},e.payload=t;return}t=t.return}}function ug(e,t,l){var n=jt();l={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Cu(e)?q0(t,l):(l=nr(e,t,l,n),l!==null&&(At(l,e,n),G0(l,t,n)))}function U0(e,t,l){var n=jt();fi(e,t,l,n)}function fi(e,t,l,n){var a={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Cu(e))q0(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,x=i(s,l);if(a.hasEagerState=!0,a.eagerState=x,Tt(x,s))return lu(e,t,a,0),He===null&&tu(),!1}catch{}finally{}if(l=nr(e,t,a,n),l!==null)return At(l,e,n),G0(l,t,n),!0}return!1}function Hr(e,t,l,n){if(n={lane:2,revertLane:Ts(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Cu(e)){if(t)throw Error(r(479))}else t=nr(e,l,n,2),t!==null&&At(t,e,2)}function Cu(e){var t=e.alternate;return e===ye||t!==null&&t===ye}function q0(e,t){ua=vu=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function G0(e,t,l){if((l&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,Go(e,l)}}var Mu={readContext:ct,use:Nu,useCallback:Ze,useContext:Ze,useEffect:Ze,useImperativeHandle:Ze,useLayoutEffect:Ze,useInsertionEffect:Ze,useMemo:Ze,useReducer:Ze,useRef:Ze,useState:Ze,useDebugValue:Ze,useDeferredValue:Ze,useTransition:Ze,useSyncExternalStore:Ze,useId:Ze,useHostTransitionStatus:Ze,useFormState:Ze,useActionState:Ze,useOptimistic:Ze,useMemoCache:Ze,useCacheRefresh:Ze,useEffectEvent:Ze},Y0={readContext:ct,use:Nu,useCallback:function(e,t){return gt().memoizedState=[e,t===void 0?null:t],e},useContext:ct,useEffect:M0,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Eu(4194308,4,w0.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Eu(4194308,4,e,t)},useInsertionEffect:function(e,t){Eu(4,2,e,t)},useMemo:function(e,t){var l=gt();t=t===void 0?null:t;var n=e();if(Mn){Bl(!0);try{e()}finally{Bl(!1)}}return l.memoizedState=[n,t],n},useReducer:function(e,t,l){var n=gt();if(l!==void 0){var a=l(t);if(Mn){Bl(!0);try{l(t)}finally{Bl(!1)}}}else a=t;return n.memoizedState=n.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},n.queue=e,e=e.dispatch=ug.bind(null,ye,e),[n.memoizedState,e]},useRef:function(e){var t=gt();return e={current:e},t.memoizedState=e},useState:function(e){e=Br(e);var t=e.queue,l=U0.bind(null,ye,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:zr,useDeferredValue:function(e,t){var l=gt();return _r(l,e,t)},useTransition:function(){var e=Br(!1);return e=z0.bind(null,ye,e.queue,!0,!1),gt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var n=ye,a=gt();if(Se){if(l===void 0)throw Error(r(407));l=l()}else{if(l=t(),He===null)throw Error(r(349));(ke&127)!==0||o0(n,t,l)}a.memoizedState=l;var i={value:l,getSnapshot:t};return a.queue=i,M0(d0.bind(null,n,i,e),[e]),n.flags|=2048,ra(9,{destroy:void 0},f0.bind(null,n,i,l,t),null),l},useId:function(){var e=gt(),t=He.identifierPrefix;if(Se){var l=nl,n=ll;l=(n&~(1<<32-kt(n)-1)).toString(32)+l,t="_"+t+"R_"+l,l=bu++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=Pm++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Lr,useFormState:N0,useActionState:N0,useOptimistic:function(e){var t=gt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Hr.bind(null,ye,!0,l),l.dispatch=t,[e,t]},useMemoCache:Tr,useCacheRefresh:function(){return gt().memoizedState=ig.bind(null,ye)},useEffectEvent:function(e){var t=gt(),l={impl:e};return t.memoizedState=l,function(){if((Be&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},X0={readContext:ct,use:Nu,useCallback:B0,useContext:ct,useEffect:jr,useImperativeHandle:D0,useInsertionEffect:F0,useLayoutEffect:T0,useMemo:O0,useReducer:Su,useRef:C0,useState:function(){return Su(El)},useDebugValue:zr,useDeferredValue:function(e,t){var l=Je();return j0(l,Le.memoizedState,e,t)},useTransition:function(){var e=Su(El)[0],t=Je().memoizedState;return[typeof e=="boolean"?e:oi(e),t]},useSyncExternalStore:s0,useId:L0,useHostTransitionStatus:Lr,useFormState:S0,useActionState:S0,useOptimistic:function(e,t){var l=Je();return m0(l,Le,e,t)},useMemoCache:Tr,useCacheRefresh:H0,useEffectEvent:k0},cg={readContext:ct,use:Nu,useCallback:B0,useContext:ct,useEffect:jr,useImperativeHandle:D0,useInsertionEffect:F0,useLayoutEffect:T0,useMemo:O0,useReducer:Dr,useRef:C0,useState:function(){return Dr(El)},useDebugValue:zr,useDeferredValue:function(e,t){var l=Je();return Le===null?_r(l,e,t):j0(l,Le.memoizedState,e,t)},useTransition:function(){var e=Dr(El)[0],t=Je().memoizedState;return[typeof e=="boolean"?e:oi(e),t]},useSyncExternalStore:s0,useId:L0,useHostTransitionStatus:Lr,useFormState:A0,useActionState:A0,useOptimistic:function(e,t){var l=Je();return Le!==null?m0(l,Le,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Tr,useCacheRefresh:H0,useEffectEvent:k0};function Ur(e,t,l,n){t=e.memoizedState,l=l(n,t),l=l==null?t:ee({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var qr={enqueueSetState:function(e,t,l){e=e._reactInternals;var n=jt(),a=ql(n);a.payload=t,l!=null&&(a.callback=l),t=Gl(e,a,n),t!==null&&(At(t,e,n),ii(t,e,n))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var n=jt(),a=ql(n);a.tag=1,a.payload=t,l!=null&&(a.callback=l),t=Gl(e,a,n),t!==null&&(At(t,e,n),ii(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=jt(),n=ql(l);n.tag=2,t!=null&&(n.callback=t),t=Gl(e,n,l),t!==null&&(At(t,e,l),ii(t,e,l))}};function Q0(e,t,l,n,a,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,s):t.prototype&&t.prototype.isPureReactComponent?!Wa(l,n)||!Wa(a,i):!0}function V0(e,t,l,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,n),t.state!==e&&qr.enqueueReplaceState(t,t.state,null)}function kn(e,t){var l=t;if("ref"in t){l={};for(var n in t)n!=="ref"&&(l[n]=t[n])}if(e=e.defaultProps){l===t&&(l=ee({},l));for(var a in e)l[a]===void 0&&(l[a]=e[a])}return l}function Z0(e){eu(e)}function K0(e){console.error(e)}function J0(e){eu(e)}function ku(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function I0(e,t,l){try{var n=e.onCaughtError;n(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function Gr(e,t,l){return l=ql(l),l.tag=3,l.payload={element:null},l.callback=function(){ku(e,t)},l}function W0(e){return e=ql(e),e.tag=3,e}function $0(e,t,l,n){var a=l.type.getDerivedStateFromError;if(typeof a=="function"){var i=n.value;e.payload=function(){return a(i)},e.callback=function(){I0(t,l,n)}}var s=l.stateNode;s!==null&&typeof s.componentDidCatch=="function"&&(e.callback=function(){I0(t,l,n),typeof a!="function"&&(Il===null?Il=new Set([this]):Il.add(this));var x=n.stack;this.componentDidCatch(n.value,{componentStack:x!==null?x:""})})}function rg(e,t,l,n,a){if(l.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=l.alternate,t!==null&&bn(t,l,a,!0),l=rt.current,l!==null){switch(l.tag){case 31:case 13:case 19:return ht===null?Ku():l.alternate===null&&Ke===0&&(Ke=3),l.flags&=-257,l.flags|=65536,l.lanes=a,n===xu?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([n]):t.add(n),Ms(e,n,a)),!1;case 22:return l.flags|=65536,n===xu?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([n]):l.add(n)),Ms(e,n,a)),!1}throw Error(r(435,l.tag))}return Ms(e,n,a),Ku(),!1}if(Se)return t=rt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=a,n!==rr&&(e=Error(r(422),{cause:n}),ei(Ht(e,l)))):(n!==rr&&(t=Error(r(423),{cause:n}),ei(Ht(t,l))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,n=Ht(n,l),a=Gr(e.stateNode,n,a),vr(e,a),Ke!==4&&(Ke=2)),!1;var i=Error(r(520),{cause:n});if(i=Ht(i,l),bi===null?bi=[i]:bi.push(i),Ke!==4&&(Ke=2),t===null)return!0;n=Ht(n,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=a&-a,l.lanes|=e,e=Gr(l.stateNode,n,e),vr(l,e),!1;case 1:if(t=l.type,i=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Il===null||!Il.has(i))))return l.flags|=65536,a&=-a,l.lanes|=a,a=W0(a),$0(a,e,l,n),vr(l,a),!1;break;case 22:if(l.memoizedState!==null)return l.flags|=65536,!1}l=l.return}while(l!==null);return!1}var Yr=Error(r(461)),$e=!1;function et(e,t,l,n){t.child=e===null?l0(t,null,l,n):Cn(t,e.child,l,n)}function P0(e,t,l,n,a){l=l.render;var i=t.ref;if("ref"in n){var s={};for(var x in n)x!=="ref"&&(s[x]=n[x])}else s=n;return yn(t),n=Cr(e,t,l,s,i,a),x=Mr(),e!==null&&!$e?(kr(e,t,a),Al(e,t,a)):(Se&&x&&uu(t),t.flags|=1,et(e,t,n,a),t.child)}function ed(e,t,l,n,a){if(e===null){var i=l.type;return typeof i=="function"&&!ar(i)&&i.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=i,td(e,t,i,n,a)):(e=au(l.type,null,n,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Wr(e,a)){var s=i.memoizedProps;if(l=l.compare,l=l!==null?l:Wa,l(s,n)&&e.ref===t.ref)return Al(e,t,a)}return t.flags|=1,e=vl(i,n),e.ref=t.ref,e.return=t,t.child=e}function td(e,t,l,n,a){if(e!==null){var i=e.memoizedProps;if(Wa(i,n)&&e.ref===t.ref)if($e=!1,t.pendingProps=n=i,Wr(e,a))(e.flags&131072)!==0&&($e=!0);else return t.lanes=e.lanes,Al(e,t,a)}return Xr(e,t,l,n,a)}function ld(e,t,l,n){var a=n.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|l:l,e!==null){for(n=t.child=e.child,a=0;n!==null;)a=a|n.lanes|n.childLanes,n=n.sibling;n=a&~i}else n=0,t.child=null;return nd(e,t,i,l,n)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&fu(t,i!==null?i.cachePool:null),i!==null?i0(t,i):yr(),u0(t);else return n=t.lanes=536870912,nd(e,t,i!==null?i.baseLanes|l:l,l,n)}else i!==null?(fu(t,i.cachePool),i0(t,i),Ql(),t.memoizedState=null):(e!==null&&fu(t,null),yr(),Ql());return et(e,t,a,l),t.child}function di(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function nd(e,t,l,n,a){var i=hr();return i=i===null?null:{parent:Ie._currentValue,pool:i},t.memoizedState={baseLanes:l,cachePool:i},e!==null&&fu(t,null),yr(),u0(t),e!==null&&bn(e,t,n,!0),t.childLanes=a,null}function Fu(e,t){return t=Tu({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function ad(e,t,l){return Cn(t,e.child,null,l),e=Fu(t,t.pendingProps),e.flags|=2,wt(t),t.memoizedState=null,e}function sg(e,t,l){var n=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Se){if(n.mode==="hidden")return e=Fu(t,n),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},di(null,e);if(Sr(t),(e=Ue)?(e=wx(e,Gt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:zl!==null?{id:ll,overflow:nl}:null,retryLane:536870912,hydrationErrors:null},l=qf(e),l.return=t,t.child=l,lt=t,Ue=null)):e=null,e===null)throw Rl(t);return t.lanes=536870912,null}return Fu(t,n)}var i=e.memoizedState;if(i!==null){var s=i.dehydrated;if(Sr(t),a)if(t.flags&256)t.flags&=-257,t=ad(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if($e||bn(e,t,l,!1),a=(l&e.childLanes)!==0,$e||a){if(Yl.current===null){if(n=He,n!==null&&(s=Yo(n,l),s!==0&&s!==i.retryLane))throw i.retryLane=s,mn(e,s),At(n,e,s),Yr;Ku()}t=ad(e,t,l)}else e=i.treeContext,Ue=Xt(s.nextSibling),lt=t,Se=!0,_l=null,Gt=!1,e!==null&&Xf(t,e),t=Fu(t,n),t.flags|=134221824;return t}return e=vl(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function sa(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function Xr(e,t,l,n,a){return yn(t),l=Cr(e,t,l,n,void 0,a),n=Mr(),e!==null&&!$e?(kr(e,t,a),Al(e,t,a)):(Se&&n&&uu(t),t.flags|=1,et(e,t,l,a),t.child)}function id(e,t,l,n,a,i){return yn(t),t.updateQueue=null,l=r0(t,n,l,a),c0(e),n=Mr(),e!==null&&!$e?(kr(e,t,i),Al(e,t,i)):(Se&&n&&uu(t),t.flags|=1,et(e,t,l,i),t.child)}function ud(e,t,l,n,a){if(yn(t),t.stateNode===null){var i=Pn,s=l.contextType;typeof s=="object"&&s!==null&&(i=ct(s)),i=new l(n,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=qr,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=n,i.state=t.memoizedState,i.refs={},gr(t),s=l.contextType,i.context=typeof s=="object"&&s!==null?ct(s):Pn,i.state=t.memoizedState,s=l.getDerivedStateFromProps,typeof s=="function"&&(Ur(t,l,s,n),i.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(s=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),s!==i.state&&qr.enqueueReplaceState(i,i.state,null),ci(t,n,i,a),ui(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){i=t.stateNode;var x=t.memoizedProps,E=kn(l,x);i.props=E;var w=i.context,R=l.contextType;s=Pn,typeof R=="object"&&R!==null&&(s=ct(R));var J=l.getDerivedStateFromProps;R=typeof J=="function"||typeof i.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,R||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(x||w!==s)&&V0(t,i,n,s),Ul=!1;var F=t.memoizedState;i.state=F,ci(t,n,i,a),ui(),w=t.memoizedState,x||F!==w||Ul?(typeof J=="function"&&(Ur(t,l,J,n),w=t.memoizedState),(E=Ul||Q0(t,l,E,n,F,w,s))?(R||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=w),i.props=n,i.state=w,i.context=s,n=E):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{i=t.stateNode,pr(e,t),s=t.memoizedProps,R=kn(l,s),i.props=R,J=t.pendingProps,F=i.context,w=l.contextType,E=Pn,typeof w=="object"&&w!==null&&(E=ct(w)),x=l.getDerivedStateFromProps,(w=typeof x=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==J||F!==E)&&V0(t,i,n,E),Ul=!1,F=t.memoizedState,i.state=F,ci(t,n,i,a),ui();var _=t.memoizedState;s!==J||F!==_||Ul||e!==null&&e.dependencies!==null&&su(e.dependencies)?(typeof x=="function"&&(Ur(t,l,x,n),_=t.memoizedState),(R=Ul||Q0(t,l,R,n,F,_,E)||e!==null&&e.dependencies!==null&&su(e.dependencies))?(w||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(n,_,E),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(n,_,E)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&F===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&F===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=_),i.props=n,i.state=_,i.context=E,n=R):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&F===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&F===e.memoizedState||(t.flags|=1024),n=!1)}return i=n,sa(e,t),n=(t.flags&128)!==0,i||n?(i=t.stateNode,l=n&&typeof l.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&n?(t.child=Cn(t,e.child,null,a),t.child=Cn(t,null,l,a)):et(e,t,l,a),t.memoizedState=i.state,e=t.child):e=Al(e,t,a),e}function cd(e,t,l,n){return pn(),t.flags|=256,et(e,t,l,n),t.child}var Qr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Vr(e){return{baseLanes:e,cachePool:If()}}function Zr(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Ot),e}function rd(e,t,l){var n=t.pendingProps,a=!1,i=(t.flags&128)!==0,s;if((s=i)||(s=e!==null&&e.memoizedState===null?!1:(st.current&2)!==0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!==0,t.flags&=-33,e===null){if(Se){if(a?Xl(t):Ql(),(e=Ue)?(e=wx(e,Gt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:zl!==null?{id:ll,overflow:nl}:null,retryLane:536870912,hydrationErrors:null},l=qf(e),l.return=t,t.child=l,lt=t,Ue=null)):e=null,e===null)throw Rl(t);return Vs(e)?t.lanes=32:t.lanes=536870912,null}return i=n.children,n=n.fallback,a?(Ql(),a=t.mode,i=Tu({mode:"hidden",children:i},a),n=gn(n,a,l,null),i.return=t,n.return=t,i.sibling=n,t.child=i,n=t.child,n.memoizedState=Vr(l),n.childLanes=Zr(e,s,l),t.memoizedState=Qr,di(null,n)):(Xl(t),Kr(t,i))}var x=e.memoizedState;if(x!==null){var E=x.dehydrated;if(E!==null)return og(e,t,i,s,n,E,x,l)}return a?(Ql(),a=n.fallback,i=t.mode,x=e.child,E=x.sibling,n=vl(x,{mode:"hidden",children:n.children}),n.subtreeFlags=x.subtreeFlags&1206910976,E!==null?a=vl(E,a):(a=gn(a,i,l,null),a.flags|=2),a.return=t,n.return=t,n.sibling=a,t.child=n,di(null,n),n=t.child,a=e.child.memoizedState,a===null?a=Vr(l):(i=a.cachePool,i!==null?(x=Ie._currentValue,i=i.parent!==x?{parent:x,pool:x}:i):i=If(),a={baseLanes:a.baseLanes|l,cachePool:i}),n.memoizedState=a,n.childLanes=Zr(e,s,l),t.memoizedState=Qr,di(e.child,n)):(Xl(t),l=e.child,e=l.sibling,l=vl(l,{mode:"visible",children:n.children}),l.return=t,l.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=l,t.memoizedState=null,l)}function Kr(e,t){return t=Tu({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Tu(e,t){return e=yt(22,e,null,t),e.lanes=0,e}function wu(e,t,l){return Cn(t,e.child,null,l),e=Kr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function og(e,t,l,n,a,i,s,x){if(l)return t.flags&256?(Xl(t),t.flags&=-257,wu(e,t,x)):t.memoizedState!==null?(Ql(),t.child=e.child,t.flags|=128,null):(Ql(),i=a.fallback,s=t.mode,a=Tu({mode:"visible",children:a.children},s),i=gn(i,s,x,null),i.flags|=2,a.return=t,i.return=t,a.sibling=i,t.child=a,Cn(t,e.child,null,x),a=t.child,a.memoizedState=Vr(x),a.childLanes=Zr(e,n,x),t.memoizedState=Qr,di(null,a));if(Xl(t),Vs(i)){if(n=i.nextSibling&&i.nextSibling.dataset,n)var E=n.dgst;return n=E,n!==""&&(a=Error(r(419)),a.stack="",a.digest=n,ei({value:a,source:null,stack:null})),wu(e,t,x)}if($e||bn(e,t,x,!1),n=(x&e.childLanes)!==0,$e||n){if(Yl.current!==null)return wu(e,t,x);if(n=He,n!==null&&(a=Yo(n,x),a!==0&&a!==s.retryLane))throw s.retryLane=a,mn(e,a),At(n,e,a),Yr;return Qs(i)||Ku(),wu(e,t,x)}return Qs(i)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,Ue=Xt(i.nextSibling),lt=t,Se=!0,_l=null,Gt=!1,e!==null&&Xf(t,e),t=Kr(t,a.children),t.flags|=134221824,t)}function sd(e,t,l){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),ru(e.return,t,l)}function od(e){for(var t=null;e!==null;){var l=e.alternate;l!==null&&pu(l)===null&&(t=e),e=e.sibling}return t}function Du(e,t,l,n,a,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:l,tailMode:a,treeForkCount:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=n,s.tail=l,s.tailMode=a,s.treeForkCount=i)}function Jr(e){var t=e.child;for(e.child=null;t!==null;){var l=t.sibling;t.sibling=e.child,e.child=t,t=l}}function Ir(e,t,l){var n=t.pendingProps,a=n.revealOrder,i=n.tail;n=n.children;var s=st.current;if(t.flags&128)return ri(t,s),null;var x=(s&2)!==0;if(x?(s=s&1|2,t.flags|=128):s&=1,ri(t,s),a==="backwards"&&e!==null?(Jr(e),et(e,t,n,l),Jr(e)):et(e,t,n,l),n=Se?Pa:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&sd(e,l,t);else if(e.tag===19)sd(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(a){case"backwards":l=od(t.child),l===null?(a=t.child,t.child=null):(a=l.sibling,l.sibling=null,Jr(t)),Du(t,!0,a,null,i,n);break;case"unstable_legacy-backwards":for(l=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&pu(e)===null){t.child=a;break}e=a.sibling,a.sibling=l,l=a,a=e}Du(t,!0,l,null,i,n);break;case"together":Du(t,!1,null,null,void 0,n);break;case"independent":t.memoizedState=null;break;default:l=od(t.child),l===null?(a=t.child,t.child=null):(a=l.sibling,l.sibling=null),Du(t,!1,a,l,i,n)}return t.child}function fd(e,t,l){var n=t.pendingProps;return Ll(t,t.type,n.value),et(e,t,n.children,l),t.child}function Al(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Jl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(bn(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,l=vl(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=vl(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Wr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&su(e)))}function fg(e,t,l){switch(t.tag){case 3:Tl(t,t.stateNode.containerInfo),Ll(t,Ie,e.memoizedState.cache),pn();break;case 27:case 5:zi(t);break;case 4:Tl(t,t.stateNode.containerInfo);break;case 10:Ll(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Sr(t),null;break;case 13:var n=t.memoizedState;if(n!==null){if(n.dehydrated!==null)return Xl(t),t.flags|=128,null;n=bn(e,t,l,!1);var a=t.child.childLanes;return n||(l&a)!==0?rd(e,t,l):(Xl(t),e=Al(e,t,l),e!==null?e.sibling:null)}Xl(t);break;case 19:if(t.flags&128)return Ir(e,t,l);if(a=(e.flags&128)!==0,n=(l&t.childLanes)!==0,n||(bn(e,t,l,!1),n=(l&t.childLanes)!==0),a){if(n)return Ir(e,t,l);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),ri(t,st.current),n)break;return null;case 22:return t.lanes=0,ld(e,t,l,t.pendingProps);case 24:Ll(t,Ie,e.memoizedState.cache)}return Al(e,t,l)}function dd(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)$e=!0;else{if(!Wr(e,l)&&(t.flags&128)===0)return $e=!1,fg(e,t,l);$e=(e.flags&131072)!==0}else $e=!1,Se&&(t.flags&1048576)!==0&&Yf(t,Pa,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=En(t.elementType),t.type=e,typeof e=="function")ar(e)?(n=kn(e,n),t.tag=1,t=ud(null,t,e,n,l)):(t.tag=0,t=Xr(null,t,e,n,l));else{if(e!=null){var a=e.$$typeof;if(a===B){t.tag=11,t=P0(null,t,e,n,l);break e}else if(a===Q){t.tag=14,t=ed(null,t,e,n,l);break e}else if(a===j){t.tag=10,t.type=e,t=fd(null,t,l);break e}}throw t=ve(e)||e,Error(r(306,t,""))}}return t;case 0:return Xr(e,t,t.type,t.pendingProps,l);case 1:return n=t.type,a=kn(n,t.pendingProps),ud(e,t,n,a,l);case 3:e:{if(Tl(t,t.stateNode.containerInfo),e===null)throw Error(r(387));n=t.pendingProps;var i=t.memoizedState;a=i.element,pr(e,t),ci(t,n,null,l);var s=t.memoizedState;if(n=s.cache,Ll(t,Ie,n),n!==i.cache&&fr(t,[Ie],l,!0),ui(),n=s.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=cd(e,t,n,l);break e}else if(n!==a){a=Ht(Error(r(424)),t),ei(a),t=cd(e,t,n,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ue=Xt(e.firstChild),lt=t,Se=!0,_l=null,Gt=!0,l=l0(t,null,n,l),t.child=l;l;)l.flags=l.flags&-3|134221824,l=l.sibling}else{if(pn(),n===a){t=Al(e,t,l);break e}et(e,t,n,l)}t=t.child}return t;case 26:return sa(e,t),e===null?(l=Rx(t.type,null,t.pendingProps,null))?t.memoizedState=l:Se||(t.stateNode=gx(t.type,t.pendingProps,el.current,t)):t.memoizedState=Rx(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return zi(t),e===null&&Se&&(n=t.stateNode=Ox(t.type,t.pendingProps,el.current),lt=t,Gt=!0,a=Ue,Pl(t.type)?(Zs=a,Ue=Xt(n.firstChild)):Ue=a),et(e,t,t.pendingProps.children,l),sa(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Se&&((a=n=Ue)&&(n=i2(n,t.type,t.pendingProps,Gt),n!==null?(t.stateNode=n,lt=t,Ue=Xt(n.firstChild),Gt=!1,a=!0):a=!1),a||Rl(t)),zi(t),a=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,n=i.children,Ls(a,i)?n=null:s!==null&&Ls(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Cr(e,t,eg,null,null,l),ka._currentValue=a),sa(e,t),et(e,t,n,l),t.child;case 6:return e===null&&Se&&((e=l=Ue)&&(l=u2(l,t.pendingProps,Gt),l!==null?(t.stateNode=l,lt=t,Ue=null,e=!0):e=!1),e||Rl(t)),null;case 13:return rd(e,t,l);case 4:return Tl(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Cn(t,null,n,l):et(e,t,n,l),t.child;case 11:return P0(e,t,t.type,t.pendingProps,l);case 7:return n=t.pendingProps,sa(e,t),et(e,t,n,l),t.child;case 8:return et(e,t,t.pendingProps.children,l),t.child;case 12:return et(e,t,t.pendingProps.children,l),t.child;case 10:return fd(e,t,l);case 9:return a=t.type._context,n=t.pendingProps.children,yn(t),a=ct(a),n=n(a),t.flags|=1,et(e,t,n,l),t.child;case 14:return ed(e,t,t.type,t.pendingProps,l);case 15:return td(e,t,t.type,t.pendingProps,l);case 19:return Ir(e,t,l);case 31:return sg(e,t,l);case 22:return ld(e,t,l,t.pendingProps);case 24:return yn(t),n=ct(Ie),e===null?(a=hr(),a===null&&(a=He,i=dr(),a.pooledCache=i,i.refCount++,i!==null&&(a.pooledCacheLanes|=l),a=i),t.memoizedState={parent:n,cache:a},gr(t),Ll(t,Ie,a)):((e.lanes&l)!==0&&(pr(e,t),ci(t,null,null,l),ui()),a=e.memoizedState,i=t.memoizedState,a.parent!==n?(a={parent:n,cache:n},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ll(t,Ie,n)):(n=i.cache,Ll(t,Ie,n),n!==a.cache&&fr(t,[Ie],l,!0))),et(e,t,t.pendingProps.children,l),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),n=t.pendingProps,n.name!=null&&n.name!=="auto"?t.flags|=e===null?18882560:18874368:Se&&uu(t),e!==null&&e.memoizedProps.name!==n.name?t.flags|=4194816:sa(e,t),et(e,t,n.children,l),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function Cl(e){e.flags|=4}function $r(e,t,l,n,a){var i;if((i=(e.mode&32)!==0)&&(i=l===null?qx(t,n):qx(t,n)&&(n.src!==l.src||n.srcSet!==l.srcSet)),i){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(Zd())e.flags|=8192;else throw An=xu,mr}else e.flags&=-16777217}function xd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Gx(t))if(Zd())e.flags|=8192;else throw An=xu,mr}function Bu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Uo():536870912,e.lanes|=t,ha|=t)}function xi(e,t){if(!Se)switch(e.tailMode){case"visible":break;case"collapsed":for(var l=e.tail,n=null;l!==null;)l.alternate!==null&&(n=l),l=l.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null;break;default:for(t=e.tail,l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null}}function qe(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,n=0;if(t)for(var a=e.child;a!==null;)l|=a.lanes|a.childLanes,n|=a.subtreeFlags&1206910976,n|=a.flags&1206910976,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)l|=a.lanes|a.childLanes,n|=a.subtreeFlags,n|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=n,e.childLanes=l,t}function dg(e,t,l){var n=t.pendingProps;switch(cr(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qe(t),null;case 1:return qe(t),null;case 3:return l=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Nl(Ie),wl(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(la(t)?Cl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,sr())),qe(t),null;case 26:var a=t.type,i=t.memoizedState;return e===null?(Cl(t),i!==null?(qe(t),xd(t,i)):(qe(t),$r(t,a,null,n,l))):i?i!==e.memoizedState?(Cl(t),qe(t),xd(t,i)):(qe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&Cl(t),qe(t),$r(t,a,e,n,l)),null;case 27:if(Vt(t),l=el.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Cl(t);else{if(!n){if(t.stateNode===null)throw Error(r(166));return qe(t),t.subtreeFlags&=-33554433,null}e=it.current,la(t)?Qf(t):(e=Ox(a,n,l),t.stateNode=e,Cl(t))}return qe(t),t.subtreeFlags&=-33554433,null;case 5:if(Vt(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Cl(t);else{if(!n){if(t.stateNode===null)throw Error(r(166));return qe(t),t.subtreeFlags&=-33554433,null}if(i=it.current,la(t))Qf(t);else{var s=Ai(el.current);switch(i){case 1:i=s.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:i=s.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":i=s.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":i=s.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":i=s.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof n.is=="string"?s.createElement("select",{is:n.is}):s.createElement("select"),n.multiple?i.multiple=!0:n.size&&(i.size=n.size);break;default:i=typeof n.is=="string"?s.createElement(a,{is:n.is}):s.createElement(a)}}i[ut]=t,i[bt]=n;e:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)i.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=i;e:switch(ft(i,a,n),a){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&Cl(t)}}return qe(t),t.subtreeFlags&=-33554433,$r(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Cl(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(r(166));if(e=el.current,la(t)){if(e=t.stateNode,l=t.memoizedProps,n=null,a=lt,a!==null)switch(a.tag){case 27:case 5:n=a.memoizedProps}e[ut]=t,e=!!(e.nodeValue===l||n!==null&&n.suppressHydrationWarning===!0||dx(e.nodeValue,l)),e||Rl(t,!0)}else e=Ai(e).createTextNode(n),e[ut]=t,t.stateNode=e}return qe(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(n=la(t),l!==null){if(e===null){if(!n)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[ut]=t}else pn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),e=!1}else l=sr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(wt(t),t):(wt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return qe(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=la(t),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(r(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));a[ut]=t}else pn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),a=!1}else a=sr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(wt(t),t):(wt(t),null)}return wt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=n!==null,e=e!==null&&e.memoizedState!==null,l&&(n=t.child,a=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(a=n.alternate.memoizedState.cachePool.pool),i=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),i!==a&&(n.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Bu(t,t.updateQueue),qe(t),null);case 4:return wl(),e===null&&Os(t.stateNode.containerInfo),t.flags|=67108864,qe(t),null;case 10:return Nl(t.type),qe(t),null;case 19:if(Er(t),n=t.memoizedState,n===null)return qe(t),null;if(a=(t.flags&128)!==0,i=n.rendering,i===null)if(a)xi(n,!1);else{if(Ke!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=pu(e),i!==null){for(t.flags|=128,xi(n,!1),e=i.updateQueue,t.updateQueue=e,Bu(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Uf(l,e),l=l.sibling;return ri(t,st.current&1|2),Se&&bl(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&Ct()>Xu&&(t.flags|=128,a=!0,xi(n,!1),t.lanes=4194304)}else{if(!a)if(e=pu(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Bu(t,e),xi(n,!0),n.tail===null&&n.tailMode!=="collapsed"&&n.tailMode!=="visible"&&!i.alternate&&!Se)return qe(t),null}else 2*Ct()-n.renderingStartTime>Xu&&l!==536870912&&(t.flags|=128,a=!0,xi(n,!1),t.lanes=4194304);n.isBackwards?(i.sibling=t.child,t.child=i):(e=n.last,e!==null?e.sibling=i:t.child=i,n.last=i)}if(n.tail!==null){e=n.tail;e:{for(l=e;l!==null;){if(l.alternate!==null){l=!1;break e}l=l.sibling}l=!0}return n.rendering=e,n.tail=e.sibling,n.renderingStartTime=Ct(),e.sibling=null,i=st.current,i=a?i&1|2:i&1,n.tailMode==="visible"||n.tailMode==="collapsed"||!l||Se?ri(t,i):(l=i,we(rt,t),we(st,l),ht===null&&(ht=t)),Se&&bl(t,n.treeForkCount),e}return qe(t),null;case 22:case 23:return wt(t),Nr(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(l&536870912)!==0&&(t.flags&128)===0&&(qe(t),t.subtreeFlags&6&&(t.flags|=8192)):qe(t),l=t.updateQueue,l!==null&&Bu(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==l&&(t.flags|=2048),e!==null&&Ve(Sn),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Nl(Ie),qe(t),null;case 25:return null;case 30:return t.flags|=33554432,qe(t),null}throw Error(r(156,t.tag))}function xg(e,t){switch(cr(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Nl(Ie),wl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Vt(t),null;case 31:if(t.memoizedState!==null){if(wt(t),t.alternate===null)throw Error(r(340));pn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(wt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));pn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Er(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return wl(),null;case 10:return Nl(t.type),null;case 22:case 23:return wt(t),Nr(),e!==null&&Ve(Sn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Nl(Ie),null;case 25:return null;default:return null}}function hd(e,t){switch(cr(t),t.tag){case 3:Nl(Ie),wl();break;case 26:case 27:case 5:Vt(t);break;case 4:wl();break;case 31:t.memoizedState!==null&&wt(t);break;case 13:wt(t);break;case 19:Er(t);break;case 10:Nl(t.type);break;case 22:case 23:wt(t),Nr(),e!==null&&Ve(Sn);break;case 24:Nl(Ie)}}function hi(e,t){try{var l=t.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var a=n.next;l=a;do{if((l.tag&e)===e){n=void 0;var i=l.create,s=l.inst;n=i(),s.destroy=n}l=l.next}while(l!==a)}}catch(x){_e(t,t.return,x)}}function Vl(e,t,l){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var i=a.next;n=i;do{if((n.tag&e)===e){var s=n.inst,x=s.destroy;if(x!==void 0){s.destroy=void 0,a=t;var E=l,w=x;try{w()}catch(R){_e(a,E,R)}}}n=n.next}while(n!==i)}}catch(R){_e(t,t.return,R)}}function md(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{a0(t,l)}catch(n){_e(e,e.return,n)}}}function gd(e,t,l){l.props=kn(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(n){_e(e,t,n)}}function al(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:var a=e.stateNode,i=gl(e.memoizedProps,a);(a.ref===null||a.ref.name!==i)&&(a.ref=Ex(i)),n=a.ref;break;case 7:if(e.stateNode===null){var s=new zt(e);g(e.child,!1,n2,s,void 0,void 0),e.stateNode=s}n=e.stateNode;break;default:n=e.stateNode}typeof l=="function"?e.refCleanup=l(n):l.current=n}}catch(x){_e(e,t,x)}}function ot(e,t){var l=e.ref,n=e.refCleanup;if(l!==null)if(typeof n=="function")try{n()}catch(a){_e(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(a){_e(e,t,a)}else l.current=null}function Ou(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var l=0;l<t.length;l++)Tx(e.stateNode,t[l])}function pd(e){for(var t=e.return;t!==null&&(es(t)&&Tx(e.stateNode,t.stateNode),!Pr(t));)t=t.return}function mi(e){for(var t=e.return;t!==null&&(es(t)&&a2(e.stateNode,t.stateNode),!Pr(t));)t=t.return}function Pr(e){return e.tag===5||e.tag===3||e.tag===27}function es(e){return e&&e.tag===7&&e.stateNode!==null}function ts(e){var t=e.type,l=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break e;case"img":l.src?n.src=l.src:l.srcSet&&(n.srcset=l.srcSet)}}catch(a){_e(e,e.return,a)}}function ls(e,t,l){try{var n=e.stateNode;Hg(n,e.type,l,t),n[bt]=t}catch(a){_e(e,e.return,a)}}function vd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Pl(e.type)||e.tag===4}function ns(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||vd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Pl(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function as(e,t,l,n){var a=e.tag;if(a===5||a===6)a=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(a,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(a),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=tl)),Ou(e,n),De=!0;else if(a!==4&&(a===27&&(Ou(e,n),n=null,Pl(e.type)&&(l=e.stateNode,t=null)),e=e.child,e!==null))for(as(e,t,l,n),e=e.sibling;e!==null;)as(e,t,l,n),e=e.sibling}function ju(e,t,l,n){var a=e.tag;if(a===5||a===6)a=e.stateNode,t?l.insertBefore(a,t):l.appendChild(a),Ou(e,n),De=!0;else if(a!==4&&(a===27&&(Ou(e,n),n=null,Pl(e.type)&&(l=e.stateNode)),e=e.child,e!==null))for(ju(e,t,l,n),e=e.sibling;e!==null;)ju(e,t,l,n),e=e.sibling}function bd(e){var t=e.stateNode,l=e.memoizedProps;try{for(var n=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);ft(t,n,l),t[ut]=e,t[bt]=l}catch(i){_e(e,e.return,i)}}var zu=!1,Dt=null;function yd(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(zu=!0)}var il=null;function Nd(){var e=il;return il=null,e}var Nt=0;function oa(e,t,l,n,a){return Nt=0,Sd(e.child,t,l,n,a)}function Sd(e,t,l,n,a){for(var i=!1;e!==null;){if(e.tag===5){var s=e.stateNode;if(n!==null){var x=qs(s);n.push(x),x.view&&(i=!0)}else i||qs(s).view&&(i=!0);zu=!0,Nx(s,Nt===0?t:t+"_"+Nt,l),Nt++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&a||Sd(e.child,t,l,n,a)&&(i=!0));e=e.sibling}return i}function ul(e,t){for(;e!==null;)e.tag===5?Sx(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||ul(e.child,t)),e=e.sibling}function _u(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(_u(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(r(544));var l=t.name;t=pl(t.default,t.share),t!=="none"&&(oa(e,l,t,null,!1)||ul(e.child,!1))}e=e.sibling}}function is(e,t){if(e.tag===30){var l=e.stateNode,n=e.memoizedProps,a=gl(n,l),i=pl(n.default,l.paired?n.share:n.enter);i!=="none"?oa(e,a,i,null,!1)?(_u(e),l.paired||t||va(e,n.onEnter)):ul(e.child,!1):_u(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)is(e,t),e=e.sibling;else _u(e)}function us(e){if(Dt!==null&&Dt.size!==0){var t=Dt;if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var l=e.memoizedProps,n=l.name;if(n!=null&&n!=="auto"){var a=t.get(n);if(a!==void 0){var i=pl(l.default,l.share);if(i!=="none"&&(oa(e,n,i,null,!1)?(i=e.stateNode,a.paired=i,i.paired=a,va(e,l.onShare)):ul(e.child,!1)),t.delete(n),t.size===0)break}}}us(e)}e=e.sibling}}}function cs(e){if(e.tag===30){var t=e.memoizedProps,l=gl(t,e.stateNode),n=Dt!==null?Dt.get(l):void 0,a=pl(t.default,n!==void 0?t.share:t.exit);a!=="none"&&(oa(e,l,a,null,!1)?n!==void 0?(a=e.stateNode,n.paired=a,a.paired=n,Dt.delete(l),va(e,t.onShare)):va(e,t.onExit):ul(e.child,!1)),Dt!==null&&us(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)cs(e),e=e.sibling;else Dt!==null&&us(e)}function Ed(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,l=gl(t,e.stateNode);t=pl(t.default,t.update),e.flags&=-5,t!=="none"&&oa(e,l,t,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&Ed(e);e=e.sibling}}function rs(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var t=e.stateNode;t.paired!==null&&(t.paired=null,ul(e.child,!1))}rs(e)}e=e.sibling}}function Ru(e){if(e.tag===30)e.stateNode.paired=null,ul(e.child,!1),rs(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Ru(e),e=e.sibling;else rs(e)}function Ad(e){for(e=e.child;e!==null;)e.tag===30?ul(e.child,!1):(e.subtreeFlags&33554432)!==0&&Ad(e),e=e.sibling}function ss(e,t,l,n,a,i,s){for(var x=!1;t!==null;){if(t.tag===5){var E=t.stateNode;if(i!==null&&Nt<i.length){var w=i[Nt],R=qs(E);(w.view||R.view)&&(x=!0);var J;if(J=(e.flags&4)===0)if(R.clip)J=!0;else{J=w.rect;var F=R.rect;J=J.y!==F.y||J.x!==F.x||J.height!==F.height||J.width!==F.width}J&&(e.flags|=4),R.abs?R=!w.abs:(w=w.rect,R=R.rect,R=w.height!==R.height||w.width!==R.width),R&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&Nx(E,Nt===0?l:l+"_"+Nt,a),x&&(e.flags&4)!==0||(il===null&&(il=[]),il.push(E,Nt===0?n:n+"_"+Nt,t.memoizedProps)),Nt++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&s?e.flags|=t.flags&32:ss(e,t.child,l,n,a,i,s)&&(x=!0));t=t.sibling}return x}function Cd(e,t){for(e=e.child;e!==null;){if(e.tag===30){var l=e.memoizedProps,n=e.stateNode,a=gl(l,n),i=pl(l.default,l.update),s;s=e.memoizedState,e.memoizedState=null,n=e;var x=e.child;Nt=0,a=ss(n,x,a,a,i,s,!1),(e.flags&4)!==0&&a&&va(e,l.onUpdate)}else(e.subtreeFlags&33554432)!==0&&Cd(e);e=e.sibling}}var nt=!1,je=!1,cl=!1,os=!1,Md=typeof WeakSet=="function"?WeakSet:Set,at=null,rl=!1,gi=!1,Lu=!1,fs=!1;function hg(e,t,l){if(e=e.containerInfo,_s=Fa,e=wf(e),Wc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var i=a.anchorOffset,s=a.focusNode;a=a.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var x=0,E=-1,w=-1,R=0,J=0,F=e,_=null;t:for(;;){for(var ue;F!==n||i!==0&&F.nodeType!==3||(E=x+i),F!==s||a!==0&&F.nodeType!==3||(w=x+a),F.nodeType===3&&(x+=F.nodeValue.length),(ue=F.firstChild)!==null;)_=F,F=ue;for(;;){if(F===e)break t;if(_===n&&++R===i&&(E=x),_===s&&++J===a&&(w=x),(ue=F.nextSibling)!==null)break;F=_,_=F.parentNode}F=ue}n=E===-1||w===-1?null:{start:E,end:w}}else n=null}n=n||{start:0,end:0}}else n=null;for(Rs={focusedElem:e,selectionRange:n},Fa=!1,l=(l&335544064)===l,at=t,t=l?9270:1024;at!==null;){if(e=at,l&&(n=e.deletions,n!==null))for(i=0;i<n.length;i++)l&&cs(n[i]);if(e.alternate===null&&(e.flags&2)!==0)l&&yd(e),Hu(l);else{if(e.tag===22){if(n=e.alternate,e.memoizedState!==null){n!==null&&n.memoizedState===null&&l&&cs(n),Hu(l);continue}else if(n!==null&&n.memoizedState!==null){l&&yd(e),Hu(l);continue}}n=e.child,(e.subtreeFlags&t)!==0&&n!==null?(n.return=e,at=n):(l&&Ed(e),Hu(l))}}Dt=null}function Hu(e){for(;at!==null;){var t=at,l=e,n=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if((a&1024)!==0&&n!==null){l=void 0,a=n.memoizedProps,n=n.memoizedState;var i=t.stateNode;try{var s=kn(t.type,a);l=i.getSnapshotBeforeUpdate(s,n),i.__reactInternalSnapshotBeforeUpdate=l}catch(x){_e(t,t.return,x)}}break;case 3:if((a&1024)!==0){if(n=t.stateNode.containerInfo,l=n.nodeType,l===9)Xs(n);else if(l===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Xs(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:l&&n!==null&&(l=gl(n.memoizedProps,n.stateNode),a=t.memoizedProps,a=pl(a.default,a.update),a!=="none"&&oa(n,l,a,n.memoizedState=[],!0));break;default:if((a&1024)!==0)throw Error(r(163))}if(n=t.sibling,n!==null){n.return=t.return,at=n;break}at=t.return}}function kd(e,t,l){var n=l.flags;switch(l.tag){case 0:case 11:case 15:sl(e,l),n&4&&hi(5,l);break;case 1:if(sl(e,l),n&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(s){_e(l,l.return,s)}else{var a=kn(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(s){_e(l,l.return,s)}}n&64&&md(l),n&512&&al(l,l.return);break;case 3:if(sl(e,l),n&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{a0(e,t)}catch(s){_e(l,l.return,s)}}break;case 27:t===null&&n&4&&bd(l);case 26:case 5:sl(e,l),t===null&&n&4&&ts(l),n&512&&al(l,l.return);break;case 12:sl(e,l);break;case 31:sl(e,l),n&4&&Dd(e,l);break;case 13:sl(e,l),n&4&&Bd(e,l),n&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Mg.bind(null,l),c2(e,l))));break;case 22:if(n=l.memoizedState!==null||nt,!n){var i=t!==null&&t.memoizedState!==null||je;t=nt,a=je,nt=n,(je=i)&&!a?(n=2,(l.subtreeFlags&8772)!==0&&(n|=1),It(e,l,n)):sl(e,l),nt=t,je=a}break;case 30:sl(e,l),n&512&&al(l,l.return);break;case 7:n&512&&al(l,l.return);default:sl(e,l)}}function ds(e,t){for(e=e.child;e!==null;)Fd(e,t),e=e.sibling}function Fd(e,t){switch(e.tag){case 5:case 26:try{var l=e.stateNode;if(t){var n=l.style;typeof n.setProperty=="function"?n.setProperty("display","none","important"):n.display="none"}else{var a=e.stateNode,i=e.memoizedProps.style,s=i!=null&&i.hasOwnProperty("display")?i.display:null;a.style.display=s==null||typeof s=="boolean"?"":(""+s).trim()}}catch(E){_e(e,e.return,E)}xs(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,De=!0}catch(E){_e(e,e.return,E)}break;case 18:try{var x=e.stateNode;t?yx(x,!0):yx(e.stateNode,!1)}catch(E){_e(e,e.return,E)}break;case 22:case 23:e.memoizedState===null&&ds(e,t);break;default:ds(e,t)}}function xs(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var l=e,n=t;switch(l.tag){case 4:Fd(l,n);break e;case 22:l.memoizedState===null&&xs(l,n);break e;default:xs(l,n)}}e=e.sibling}}function Td(e){var t=e.alternate;t!==null&&(e.alternate=null,Td(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Xi(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ye=null,St=!1;function Kt(e,t,l){for(l=l.child;l!==null;)wd(e,t,l),l=l.sibling}function wd(e,t,l){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(Ha,l)}catch{}switch(l.tag){case 26:je||ot(l,t),Kt(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&!je&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:je||ot(l,t),mi(l);var n=Ye,a=St;Pl(l.type)&&(Ye=l.stateNode,St=!1),Kt(e,t,l),jx(l.stateNode,l.type,l.memoizedProps),Ye=n,St=a;break;case 5:je||ot(l,t),mi(l);case 6:if(l.tag===6&&mi(l),n=Ye,a=St,Ye=null,Kt(e,t,l),Ye=n,St=a,Ye!==null)if(St)try{(Ye.nodeType===9?Ye.body:Ye.nodeName==="HTML"?Ye.ownerDocument.body:Ye).removeChild(l.stateNode),De=!0}catch(i){_e(l,t,i)}else try{Ye.removeChild(l.stateNode),De=!0}catch(i){_e(l,t,i)}break;case 18:Ye!==null&&(St?(e=Ye,bx(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Ta(e)):bx(Ye,l.stateNode));break;case 4:n=Ye,a=St,Ye=l.stateNode.containerInfo,St=!0,Kt(e,t,l),Ye=n,St=a;break;case 0:case 11:case 14:case 15:Vl(2,l,t),je||Vl(4,l,t),Kt(e,t,l);break;case 1:je||(ot(l,t),n=l.stateNode,typeof n.componentWillUnmount=="function"&&gd(l,t,n)),Kt(e,t,l);break;case 21:Kt(e,t,l);break;case 22:je=(n=je)||l.memoizedState!==null,Kt(e,t,l),je=n;break;case 30:ot(l,t),Kt(e,t,l);break;case 7:je||ot(l,t),Kt(e,t,l);break;default:Kt(e,t,l)}}function Dd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ta(e)}catch(l){_e(t,t.return,l)}}}function Bd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ta(e)}catch(l){_e(t,t.return,l)}}function mg(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Md),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Md),t;default:throw Error(r(435,e.tag))}}function Uu(e,t){var l=mg(e);t.forEach(function(n){if(!l.has(n)){l.add(n);var a=kg.bind(null,e,n);n.then(a,a)}})}function pt(e,t,l){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var i=n[a],s=e,x=t,E=x;e:for(;E!==null;){switch(E.tag){case 27:if(Pl(E.type)){Ye=E.stateNode,St=!1;break e}break;case 5:Ye=E.stateNode,St=!1;break e;case 3:case 4:Ye=E.stateNode.containerInfo,St=!0;break e}E=E.return}if(Ye===null)throw Error(r(160));wd(s,x,i),Ye=null,St=!1,s=i.alternate,s!==null&&(s.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Od(t,e,l),t=t.sibling}var Jt=null;function Od(e,t,l){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(n=e.updateQueue,n=n!==null?n.events:null,n!==null))for(var i=0;i<n.length;i++){var s=n[i];s.ref.impl=s.nextImpl}pt(t,e,l),vt(e),a&4&&(Vl(3,e,e.return),hi(3,e),Vl(5,e,e.return));break;case 1:pt(t,e,l),vt(e),a&512&&(je||n===null||ot(n,n.return)),a&64&&nt&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?t:l.concat(t))));break;case 26:if(i=Jt,pt(t,e,l),vt(e),a&512&&(je||n===null||ot(n,n.return)),a&4)if(a=n!==null?n.memoizedState:null,l=e.memoizedState,n===null)if(l===null)if(e.stateNode===null)if(nt)e.stateNode=gx(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,l=e.memoizedProps,a=i.ownerDocument||i;t:switch(t){case"title":n=a.getElementsByTagName("title")[0],(!n||n[Ga]||n[ut]||n.namespaceURI==="http://www.w3.org/2000/svg"||n.hasAttribute("itemprop"))&&(n=a.createElement(t),a.head.insertBefore(n,a.querySelector("head > title"))),ft(n,t,l),n[ut]=e,tt(n),t=n;break e;case"link":if(i=Ux("link","href",a).get(t+(l.href||""))){for(s=0;s<i.length;s++)if(n=i[s],n.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&n.getAttribute("rel")===(l.rel==null?null:l.rel)&&n.getAttribute("title")===(l.title==null?null:l.title)&&n.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){i.splice(s,1);break t}}n=a.createElement(t),ft(n,t,l),a.head.appendChild(n);break;case"meta":if(i=Ux("meta","content",a).get(t+(l.content||""))){for(s=0;s<i.length;s++)if(n=i[s],n.getAttribute("content")===(l.content==null?null:""+l.content)&&n.getAttribute("name")===(l.name==null?null:l.name)&&n.getAttribute("property")===(l.property==null?null:l.property)&&n.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&n.getAttribute("charset")===(l.charSet==null?null:l.charSet)){i.splice(s,1);break t}}n=a.createElement(t),ft(n,t,l),a.head.appendChild(n);break;default:throw Error(r(468,t))}n[ut]=e,tt(n),t=n}e.stateNode=t}else nt||Ws(i,e.type,e.stateNode);else e.stateNode=Hx(i,l,e.memoizedProps);else a!==l?(a===null?(t=n.stateNode,t===null||je||t.parentNode.removeChild(t)):a.count--,l===null?nt||Ws(i,e.type,e.stateNode):Hx(i,l,e.memoizedProps)):l===null&&e.stateNode!==null&&ls(e,e.memoizedProps,n.memoizedProps);break;case 27:pt(t,e,l),vt(e),a&512&&(je||n===null||ot(n,n.return)),n!==null&&a&4&&ls(e,e.memoizedProps,n.memoizedProps);break;case 5:if(i=cl,cl=!1,pt(t,e,l),cl=i,vt(e),a&512&&(je||n===null||ot(n,n.return)),e.flags&32){t=e.stateNode;try{Vn(t,""),De=!0}catch(R){_e(e,e.return,R)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,ls(e,t,n!==null?n.memoizedProps:t)),a&1024&&(os=!0);break;case 6:if(pt(t,e,l),vt(e),a&4){if(e.stateNode===null)throw Error(r(162));t=e.memoizedProps,l=e.stateNode;try{l.nodeValue=t,De=!0}catch(R){_e(e,e.return,R)}}break;case 3:if(De=!1,tc=null,i=Jt,Jt=Ci(t.containerInfo),pt(t,e,l),Jt=i,vt(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Ta(t.containerInfo)}catch(R){_e(e,e.return,R)}os&&(os=!1,jd(e)),De=!1;break;case 4:a=cl,cl=nt,n=Po(),i=Jt,Jt=Ci(e.stateNode.containerInfo),pt(t,e,l),vt(e),Jt=i,De&&gi&&(Lu=!0),De=n,cl=a;break;case 12:pt(t,e,l),vt(e);break;case 31:pt(t,e,l),vt(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Uu(e,t)));break;case 13:pt(t,e,l),vt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Yu=Ct()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Uu(e,t)));break;case 22:i=e.memoizedState!==null,s=n!==null&&n.memoizedState!==null;var x=nt,E=je,w=cl;nt=x||i,cl=w||i,je=E||s,pt(t,e,l),je=E,cl=w,nt=x,vt(e),a&8192&&(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,!i||n===null||s||nt||je||(t=s||je,l=nt,n=je,nt=i||nt,je=t,Zl(e,2),nt=l,je=n),!i&&cl||ds(e,i)),a&4&&(t=e.updateQueue,t!==null&&(l=t.retryQueue,l!==null&&(t.retryQueue=null,Uu(e,l))));break;case 19:pt(t,e,l),vt(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Uu(e,t)));break;case 30:a&512&&(je||n===null||ot(n,n.return)),a=Po(),i=gi,s=(l&335544064)===l,x=e.memoizedProps,gi=s&&pl(x.default,x.update)!=="none",pt(t,e,l),vt(e),s&&n!==null&&De&&(e.flags|=4),gi=i,De=a;break;case 21:break;case 7:a&512&&(je||n===null||ot(n,n.return)),n&&n.stateNode!==null&&(n.stateNode._fragmentFiber=e);default:pt(t,e,l),vt(e)}}function vt(e){var t=e.flags;if(t&2){try{for(var l,n=e.return;n!==null;){if(vd(n)){l=n;break}n=n.return}n=null;for(var a=e.return;a!==null;){if(es(a)){var i=a.stateNode;n===null?n=[i]:n.push(i)}if(Pr(a))break;a=a.return}var s=n;if(l==null)throw Error(r(160));switch(l.tag){case 27:var x=l.stateNode,E=ns(e);ju(e,E,x,s);break;case 5:var w=l.stateNode;l.flags&32&&(Vn(w,""),l.flags&=-33);var R=ns(e);ju(e,R,w,s);break;case 3:case 4:var J=l.stateNode.containerInfo,F=ns(e);as(e,F,J,s);break;default:throw Error(r(161))}}catch(_){_e(e,e.return,_)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function jd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;jd(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Fa=!0,t.reset(),Fa=!1),e=e.sibling}}function fa(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)zd(t,e),t=t.sibling;else Cd(t)}function zd(e,t){var l=e.alternate;if(l===null)is(e,!1);else switch(e.tag){case 3:if(fs=rl=!1,Nd(),fa(t,e),!rl&&!Lu){if(e=il,e!==null)for(var n=0;n<e.length;n+=3){l=e[n];var a=e[n+1];Sx(l,e[n+2]),l=l.ownerDocument.documentElement,l!==null&&l.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+a+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),fs=!0}il=null;break;case 5:fa(t,e);break;case 4:n=rl,rl=!1,fa(t,e),rl&&(Lu=!0),rl=n;break;case 22:e.memoizedState===null&&(l.memoizedState!==null?is(e,!1):fa(t,e));break;case 30:n=rl,a=Nd(),rl=!1,fa(t,e),rl&&(e.flags|=4);var i=e.memoizedProps,s=e.stateNode;t=gl(i,s),s=gl(l.memoizedProps,s);var x=pl(i.default,i.update);x==="none"?t=!1:(i=l.memoizedState,l.memoizedState=null,l=e.child,Nt=0,t=ss(e,l,t,s,x,i,!0),Nt!==(i===null?0:i.length)&&(e.flags|=32)),(e.flags&4)!==0&&t?(va(e,e.memoizedProps.onUpdate),il=a):a!==null&&(a.push.apply(a,il),il=a),rl=(e.flags&32)!==0?!0:n;break;default:fa(t,e)}}function sl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)kd(e,t.alternate,t),t=t.sibling}function Zl(e,t){for(e=e.child;e!==null;){var l=e,n=t;switch(l.tag){case 0:case 11:case 14:case 15:Vl(4,l,l.return),Zl(l,n);break;case 1:ot(l,l.return);var a=l.stateNode;typeof a.componentWillUnmount=="function"&&gd(l,l.return,a),Zl(l,n);break;case 27:(n&2)!==0&&jx(l.stateNode,l.type,l.memoizedProps);case 5:ot(l,l.return),l.tag!==5&&l.tag!==27||mi(l),Zl(l,n);break;case 6:mi(l);break;case 26:ot(l,l.return),a=l.stateNode,l.memoizedState!==null||a===null||je||a.parentNode.removeChild(a),Zl(l,n);break;case 22:l.memoizedState===null&&Zl(l,n);break;case 30:ot(l,l.return),Zl(l,n);break;case 7:ot(l,l.return);default:Zl(l,n)}e=e.sibling}}function It(e,t,l){for(l=(t.subtreeFlags&8772)!==0?l:l&-2,t=t.child;t!==null;){var n=t.alternate,a=e,i=t,s=i.flags,x=(l&1)!==0;switch(i.tag){case 0:case 11:case 15:It(a,i,l),hi(4,i);break;case 1:if(It(a,i,l),n=i,a=n.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(R){_e(n,n.return,R)}if(n=i,a=n.updateQueue,a!==null){var E=n.stateNode;try{var w=a.shared.hiddenCallbacks;if(w!==null)for(a.shared.hiddenCallbacks=null,a=0;a<w.length;a++)n0(w[a],E)}catch(R){_e(n,n.return,R)}}x&&s&64&&md(i),al(i,i.return);break;case 27:(l&2)!==0&&bd(i);case 5:i.tag!==5&&i.tag!==27||pd(i),It(a,i,l),x&&n===null&&s&4&&ts(i),al(i,i.return);break;case 6:pd(i);break;case 26:E=i.stateNode,i.memoizedState!==null||E===null||nt||Ws(Ci(E.ownerDocument),i.type,E),It(a,i,l),x&&n===null&&s&4&&ts(i),al(i,i.return);break;case 12:It(a,i,l);break;case 31:It(a,i,l),x&&s&4&&Dd(a,i);break;case 13:It(a,i,l),x&&s&4&&Bd(a,i);break;case 22:i.memoizedState===null&&It(a,i,l),al(i,i.return);break;case 30:It(a,i,l),al(i,i.return);break;case 7:al(i,i.return);default:It(a,i,l)}t=t.sibling}}function hs(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&ti(l))}function ms(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ti(e))}function Yt(e,t,l,n){var a=(l&335544064)===l;if(t.subtreeFlags&(a?10262:10256))for(t=t.child;t!==null;)_d(e,t,l,n),t=t.sibling;else a&&Ad(t)}function _d(e,t,l,n){var a=(l&335544064)===l;a&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Ru(t);var i=t.flags;switch(t.tag){case 0:case 11:case 15:Yt(e,t,l,n),i&2048&&hi(9,t);break;case 1:Yt(e,t,l,n);break;case 3:Yt(e,t,l,n),a&&fs&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),i&2048&&(i=null,t.alternate!==null&&(i=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==i&&(t.refCount++,i!=null&&ti(i)));break;case 12:if(i&2048){Yt(e,t,l,n),i=t.stateNode;try{var s=t.memoizedProps,x=s.id,E=s.onPostCommit;typeof E=="function"&&E(x,t.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(w){_e(t,t.return,w)}}else Yt(e,t,l,n);break;case 31:Yt(e,t,l,n);break;case 13:Yt(e,t,l,n);break;case 23:break;case 22:s=t.stateNode,x=t.alternate,t.memoizedState!==null?(a&&x!==null&&x.memoizedState===null&&Ru(x),s._visibility&2?Yt(e,t,l,n):pi(e,t)):(a&&x!==null&&x.memoizedState!==null&&Ru(t),s._visibility&2?Yt(e,t,l,n):(s._visibility|=2,da(e,t,l,n,(t.subtreeFlags&10256)!==0||!1))),i&2048&&hs(x,t);break;case 24:Yt(e,t,l,n),i&2048&&ms(t.alternate,t);break;case 30:a&&(i=t.alternate,i!==null&&(ul(i.child,!0),ul(t.child,!0))),Yt(e,t,l,n);break;default:Yt(e,t,l,n)}}function da(e,t,l,n,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,s=t,x=l,E=n,w=s.flags;switch(s.tag){case 0:case 11:case 15:da(i,s,x,E,a),hi(8,s);break;case 23:break;case 22:var R=s.stateNode;s.memoizedState!==null?R._visibility&2?da(i,s,x,E,a):pi(i,s):(R._visibility|=2,da(i,s,x,E,a)),a&&w&2048&&hs(s.alternate,s);break;case 24:da(i,s,x,E,a),a&&w&2048&&ms(s.alternate,s);break;default:da(i,s,x,E,a)}t=t.sibling}}function pi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,n=t,a=n.flags;switch(n.tag){case 22:pi(l,n),a&2048&&hs(n.alternate,n);break;case 24:pi(l,n),a&2048&&ms(n.alternate,n);break;default:pi(l,n)}t=t.sibling}}var Fn=8192;function Tn(e,t,l){if(e.subtreeFlags&Fn)for(e=e.child;e!==null;)Rd(e,t,l),e=e.sibling}function Rd(e,t,l){switch(e.tag){case 26:Tn(e,t,l),e.flags&Fn&&(e.memoizedState!==null?N2(l,Jt,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&Xx(l,e)));break;case 5:Tn(e,t,l),e.flags&Fn&&(e=e.stateNode,(t&335544128)===t&&Xx(l,e));break;case 3:case 4:var n=Jt;Jt=Ci(e.stateNode.containerInfo),Tn(e,t,l),Jt=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Fn,Fn=16777216,Tn(e,t,l),Fn=n):Tn(e,t,l));break;case 30:if((e.flags&Fn)!==0&&(n=e.memoizedProps.name,n!=null&&n!=="auto")){var a=e.stateNode;a.paired=null,Dt===null&&(Dt=new Map),Dt.set(n,a)}Tn(e,t,l);break;default:Tn(e,t,l)}}function Ld(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function vi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var n=t[l];at=n,Ud(n,e)}Ld(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Hd(e),e=e.sibling}function Hd(e){switch(e.tag){case 0:case 11:case 15:vi(e),e.flags&2048&&Vl(9,e,e.return);break;case 3:vi(e);break;case 12:vi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,qu(e)):vi(e);break;default:vi(e)}}function qu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var n=t[l];at=n,Ud(n,e)}Ld(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Vl(8,t,t.return),qu(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,qu(t));break;default:qu(t)}e=e.sibling}}function Ud(e,t){for(;at!==null;){var l=at;switch(l.tag){case 0:case 11:case 15:Vl(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var n=l.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:ti(l.memoizedState.cache)}if(n=l.child,n!==null)n.return=l,at=n;else e:for(l=e;at!==null;){n=at;var a=n.sibling,i=n.return;if(Td(n),n===l){at=null;break e}if(a!==null){a.return=i,at=a;break e}at=i}}}var gg={getCacheForType:function(e){var t=ct(Ie),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return ct(Ie).controller.signal}},pg=typeof WeakMap=="function"?WeakMap:Map,Be=0,He=null,Ce=null,ke=0,ze=0,Bt=null,Kl=!1,xa=!1,gs=!1,Ml=0,Ke=0,Jl=0,wn=0,Gu=0,Ot=0,ha=0,bi=null,Et=null,ps=!1,Yu=0,qd=0,Xu=1/0,Qu=null,Il=null,Xe=0,Wt=null,Dn=null,ol=0,vs=0,bs=null,Gd=null,ma=null,ga=null,pa=null,yi=0,Vu=null;function jt(){return(Be&2)!==0&&ke!==0?ke&-ke:xe.T!==null?Ts():Xo()}function Yd(){if(Ot===0)if((ke&536870912)===0||Se){var e=Ui;Ui<<=1,(Ui&3932160)===0&&(Ui=262144),Ot=e}else Ot=536870912;return e=rt.current,e!==null&&(e.flags|=32),Ot}function va(e,t){if(t!=null){var l=e.stateNode,n=l.ref;n===null&&(n=l.ref=Ex(gl(e.memoizedProps,l))),ga===null&&(ga=[]),ga.push(t.bind(null,n))}}function At(e,t,l){(e===He&&(ze===2||ze===9)||e.cancelPendingCommit!==null)&&(ba(e,0),Wl(e,ke,Ot,!1)),qa(e,l),((Be&2)===0||e!==He)&&(e===He&&((Be&2)===0&&(wn|=l),Ke===4&&Wl(e,ke,Ot,!1)),fl(e))}function Xd(e,t,l){if((Be&6)!==0)throw Error(r(327));var n=!l&&(t&127)===0&&(t&e.expiredLanes)===0||Ua(e,t),a=n?yg(e,t):Ns(e,t,!0),i=n;do{if(a===0){xa&&!n&&Wl(e,t,0,!1);break}else{if(l=e.current.alternate,i&&!vg(l)){a=Ns(e,t,!1),i=!1;continue}if(a===2){if(i=t,e.errorRecoveryDisabledLanes&i)var s=0;else s=e.pendingLanes&-536870913,s=s!==0?s:s&536870912?536870912:0;if(s!==0){t=s;e:{var x=e;a=bi;var E=x.current.memoizedState.isDehydrated;if(E&&(ba(x,s).flags|=256),s=Ns(x,s,!1),s!==2&&s!==6){if(gs&&!E){x.errorRecoveryDisabledLanes|=i,wn|=i,a=4;break e}i=Et,Et=a,i!==null&&(Et===null?Et=i:Et.push.apply(Et,i))}a=s}if(i=!1,a!==2)continue}}if(a===1){ba(e,0),Wl(e,t,0,!0);break}e:{switch(n=e,i=a,i){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Wl(n,t,Ot,!Kl);break e;case 2:Et=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(a=Yu+300-Ct(),10<a)){if(Wl(n,t,Ot,!Kl),Gi(n,0,!0)!==0)break e;ol=t,n.timeoutHandle=Us(Qd.bind(null,n,l,Et,Qu,ps,t,Ot,wn,ha,Kl,i,"Throttled",-0,0),a);break e}Qd(n,l,Et,Qu,ps,t,Ot,wn,ha,Kl,i,null,-0,0)}}break}while(!0);fl(e)}function Qd(e,t,l,n,a,i,s,x,E,w,R,J,F,_){e.timeoutHandle=-1;var ue=t.subtreeFlags,de=(i&335544064)===i;if(J=null,(de||ue&8192||(ue&16785408)===16785408)&&(J={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:tl},Dt=null,Rd(t,i,J),de&&(ue=J,de=e.containerInfo,de=(de.nodeType===9?de:de.ownerDocument).__reactViewTransition,de!=null&&(ue.count++,ue.waitingForViewTransition=!0,ue=Fi.bind(ue),de.finished.then(ue,ue))),ue=(i&62914560)===i?Yu-Ct():(i&4194048)===i?qd-Ct():0,ue=S2(J,ue),ue!==null)){ol=i,e.cancelPendingCommit=ue(Pd.bind(null,e,t,i,l,n,a,s,x,E,w,R,J,null,F,_)),Wl(e,i,s,!w);return}Pd(e,t,i,l,n,a,s,x,E,w,R,J)}function vg(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var n=0;n<l.length;n++){var a=l[n],i=a.getSnapshot;a=a.value;try{if(!Tt(i(),a))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Wl(e,t,l,n){t=Ho(e,t),t&=~Gu,t&=~wn,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var a=t;0<a;){var i=31-kt(a),s=1<<i;n[i]=-1,a&=~s}l!==0&&qo(e,l,t)}function Zu(){return(Be&6)===0?(Ni(0),!1):!0}function ys(){if(Ce!==null){if(ze===0)var e=Ce.return;else e=Ce,yl=vn=null,Fr(e),ia=null,ai=0,e=Ce;for(;e!==null;)hd(e.alternate,e),e=e.return;Ce=null}}function ba(e,t){var l=e.timeoutHandle;return l!==-1&&(e.timeoutHandle=-1,Gg(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),ol=0,ys(),He=e,Ce=l=vl(e.current,null),ke=t,ze=0,Bt=null,Kl=!1,xa=Ua(e,t),gs=!1,ha=Ot=Gu=wn=Jl=Ke=0,Et=bi=null,ps=!1,Ml=Ho(e,t),tu(),l}function Vd(e,t){ye=null,xe.H=Mu,t===aa||t===du?(t=Pf(),ze=3):t===mr?(t=Pf(),ze=4):ze=t===Yr?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Bt=t,Ce===null&&(Ke=1,ku(e,Ht(t,e.current)))}function Zd(){var e=rt.current;return e===null?!0:(ke&4194048)===ke?ht===null:(ke&62914560)===ke||(ke&536870912)!==0?e===ht:!1}function Kd(){var e=xe.H;return xe.H=Mu,e===null?Mu:e}function Jd(){var e=xe.A;return xe.A=gg,e}function Ku(){Ke=4,Kl||(ke&4194048)!==ke&&rt.current!==null||(xa=!0),(Jl&134217727)===0&&(wn&134217727)===0||He===null||Wl(He,ke,Ot,!1)}function Ns(e,t,l){var n=Be;Be|=2;var a=Kd(),i=Jd();(He!==e||ke!==t)&&(Qu=null,ba(e,t)),t=!1;var s=Ke;e:do try{if(ze!==0&&Ce!==null){var x=Ce,E=Bt;switch(ze){case 8:ys(),s=6;break e;case 3:case 2:case 9:case 6:rt.current===null&&(t=!0);var w=ze;if(ze=0,Bt=null,ya(e,x,E,w),l&&xa){s=0;break e}break;default:w=ze,ze=0,Bt=null,ya(e,x,E,w)}}bg(),s=Ke;break}catch(R){Vd(e,R)}while(!0);return t&&e.shellSuspendCounter++,yl=vn=null,Be=n,xe.H=a,xe.A=i,Ce===null&&(He=null,ke=0,tu()),s}function bg(){for(;Ce!==null;)Id(Ce)}function yg(e,t){var l=Be;Be|=2;var n=Kd(),a=Jd();He!==e||ke!==t?(Qu=null,Xu=Ct()+500,ba(e,t)):xa=Ua(e,t);e:do try{if(ze!==0&&Ce!==null){t=Ce;var i=Bt;t:switch(ze){case 1:ze=0,Bt=null,ya(e,t,i,1);break;case 2:case 9:if(Wf(i)){ze=0,Bt=null,Wd(t);break}t=function(){ze!==2&&ze!==9||He!==e||(ze=7),fl(e)},i.then(t,t);break e;case 3:ze=7;break e;case 4:ze=5;break e;case 7:Wf(i)?(ze=0,Bt=null,Wd(t)):(ze=0,Bt=null,ya(e,t,i,7));break;case 5:var s=null;switch(Ce.tag){case 26:s=Ce.memoizedState;case 5:case 27:var x=Ce;if(s?Gx(s):x.stateNode.complete){ze=0,Bt=null;var E=x.sibling;if(E!==null)Ce=E;else{var w=x.return;w!==null?(Ce=w,Ju(w)):Ce=null}break t}}ze=0,Bt=null,ya(e,t,i,5);break;case 6:ze=0,Bt=null,ya(e,t,i,6);break;case 8:ys(),Ke=6;break e;default:throw Error(r(462))}}Ng();break}catch(R){Vd(e,R)}while(!0);return yl=vn=null,xe.H=n,xe.A=a,Be=l,Ce!==null?0:(He=null,ke=0,tu(),Ke)}function Ng(){for(;Ce!==null&&!Lh();)Id(Ce)}function Id(e){var t=dd(e.alternate,e,Ml);e.memoizedProps=e.pendingProps,t===null?Ju(e):Ce=t}function Wd(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=id(l,t,t.pendingProps,t.type,void 0,ke);break;case 11:t=id(l,t,t.pendingProps,t.type.render,t.ref,ke);break;case 5:Fr(t);var n=t;n===lt&&(Se?(cu(n),n.tag===5&&n.stateNode!=null&&(Ue=n.stateNode)):(cu(n),Se=!0));default:hd(l,t),t=Ce=Uf(t,Ml),t=dd(l,t,Ml)}e.memoizedProps=e.pendingProps,t===null?Ju(e):Ce=t}function ya(e,t,l,n){yl=vn=null,Fr(t),ia=null,ai=0;var a=t.return;try{if(rg(e,a,t,l,ke)){Ke=1,ku(e,Ht(l,e.current)),Ce=null;return}}catch(i){if(a!==null)throw Ce=a,i;Ke=1,ku(e,Ht(l,e.current)),Ce=null;return}t.flags&32768?(Se||n===1?e=!0:xa||(ke&536870912)!==0?e=!1:(Kl=e=!0,(n===2||n===9||n===3||n===6)&&(n=rt.current,n!==null&&n.tag===13&&(n.flags|=16384))),$d(t,e)):Ju(t)}function Ju(e){var t=e;do{if((t.flags&32768)!==0){$d(t,Kl);return}e=t.return;var l=dg(t.alternate,t,Ml);if(l!==null){Ce=l;return}if(t=t.sibling,t!==null){Ce=t;return}Ce=t=e}while(t!==null);Ke===0&&(Ke=5)}function $d(e,t){do{var l=xg(e.alternate,e);if(l!==null){l.flags&=32767,Ce=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){Ce=e;return}Ce=e=l}while(e!==null);Ke=6,Ce=null}function Pd(e,t,l,n,a,i,s,x,E,w,R,J){e.cancelPendingCommit=null;do Iu();while(Xe!==0);if((Be&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));e===He&&(Ce=He=null,ke=0),Dn=t,Wt=e,ol=l,bs=a,Gd=n,Sg(e,t,l,s,x,E,J)}}function Sg(e,t,l,n,a,i,s){var x=t.lanes|t.childLanes;if(vs=x,x|=lr,Kh(e,l,x,n,a,i),ga=null,(l&335544064)===l?(pa=Im(e),n=10262):(pa=null,n=10256),(t.subtreeFlags&n)!==0||(t.flags&n)!==0?(e.callbackNode=null,e.callbackPriority=0,Fg(Li,function(){return Cs(),null})):(e.callbackNode=null,e.callbackPriority=0),zu=!1,n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=xe.T,xe.T=null,a=se.p,se.p=2,i=Be,Be|=4;try{hg(e,t,l)}finally{Be=i,se.p=a,xe.T=n}}Xe=1,zu?ma=Kg(s,e.containerInfo,pa,Ss,Es,Ag,As,Cs,Eg):(Ss(),Es(),As())}function Eg(e){if(Xe!==0){var t=Wt.onRecoverableError;t(e,{componentStack:null})}}function Ag(){Xe===3&&(Xe=0,zd(Dn,Wt),Xe=4)}function Ss(){if(Xe===1){Xe=0;var e=Wt,t=Dn,l=ol,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=xe.T,xe.T=null;var a=se.p;se.p=2;var i=Be;Be|=4;try{gi=Lu=!1,Od(t,e,l),l=Rs;var s=wf(e.containerInfo),x=l.focusedElem,E=l.selectionRange;if(s!==x&&x&&x.ownerDocument&&Tf(x.ownerDocument.documentElement,x)){if(E!==null&&Wc(x)){var w=E.start,R=E.end;if(R===void 0&&(R=w),"selectionStart"in x)x.selectionStart=w,x.selectionEnd=Math.min(R,x.value.length);else{var J=x.ownerDocument||document,F=J&&J.defaultView||window;if(F.getSelection){var _=F.getSelection(),ue=x.textContent.length,de=Math.min(E.start,ue),Ne=E.end===void 0?de:Math.min(E.end,ue);!_.extend&&de>Ne&&(s=Ne,Ne=de,de=s);var T=Ff(x,de),M=Ff(x,Ne);if(T&&M&&(_.rangeCount!==1||_.anchorNode!==T.node||_.anchorOffset!==T.offset||_.focusNode!==M.node||_.focusOffset!==M.offset)){var z=J.createRange();z.setStart(T.node,T.offset),_.removeAllRanges(),de>Ne?(_.addRange(z),_.extend(M.node,M.offset)):(z.setEnd(M.node,M.offset),_.addRange(z))}}}}for(J=[],_=x;_=_.parentNode;)_.nodeType===1&&J.push({element:_,left:_.scrollLeft,top:_.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<J.length;x++){var K=J[x];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}Fa=!!_s,Rs=_s=null}finally{Be=i,se.p=a,xe.T=n}}e.current=t,Xe=2}}function Es(){if(Xe===2){Xe=0;var e=Wt,t=Dn,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=xe.T,xe.T=null;var n=se.p;se.p=2;var a=Be;Be|=4;try{kd(e,t.alternate,t)}finally{Be=a,se.p=n,xe.T=l}}Xe=3}}function As(){if(Xe===4||Xe===3){Xe=0;var e=ma;ma=null,Hh();var t=Wt,l=Dn,n=ol,a=Gd,i=(n&335544064)===n?10262:10256;if((l.subtreeFlags&i)!==0||(l.flags&i)!==0?Xe=5:(Xe=0,Dn=Wt=null,ex(t,t.pendingLanes)),i=t.pendingLanes,i===0&&(Il=null),Oc(n),l=l.stateNode,Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(Ha,l,void 0,(l.current.flags&128)===128)}catch{}if(a!==null){l=xe.T,i=se.p,se.p=2,xe.T=null;try{for(var s=t.onRecoverableError,x=0;x<a.length;x++){var E=a[x];s(E.value,{componentStack:E.stack})}}finally{xe.T=l,se.p=i}}if(a=ga,s=pa,pa=null,a!==null&&(ga=null,s===null&&(s=[]),e!==null))for(E=0;E<a.length;E++)l=(0,a[E])(s),l!==void 0&&e.finished.finally(l);(ol&3)!==0&&Iu(),fl(t),i=t.pendingLanes,(n&261930)!==0&&(i&42)!==0?t===Vu?yi++:(yi=0,Vu=t):(yi=0,Vu=null),Ni(0)}}function ex(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ti(t)))}function Iu(){return ma!==null&&(ma.skipTransition(),ma=null),Ss(),Es(),As(),Cs()}function Cs(){if(Xe!==5)return!1;var e=Wt,t=vs;vs=0;var l=Oc(ol),n=xe.T,a=se.p;try{se.p=32>l?32:l,xe.T=null,l=bs,bs=null;var i=Wt,s=ol;if(Xe=0,Dn=Wt=null,ol=0,(Be&6)!==0)throw Error(r(331));var x=Be;if(Be|=4,Hd(i.current),_d(i,i.current,s,l),Be=x,Ni(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(Ha,i)}catch{}return!0}finally{se.p=a,xe.T=n,ex(e,t)}}function tx(e,t,l){t=Ht(l,t),t=Gr(e.stateNode,t,2),e=Gl(e,t,2),e!==null&&(qa(e,2),fl(e))}function _e(e,t,l){if(e.tag===3)tx(e,e,l);else for(;t!==null;){if(t.tag===3){tx(t,e,l);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Il===null||!Il.has(n))){e=Ht(l,e),l=W0(2),n=Gl(t,l,2),n!==null&&($0(l,n,t,e),qa(n,2),fl(n));break}}t=t.return}}function Ms(e,t,l){var n=e.pingCache;if(n===null){n=e.pingCache=new pg;var a=new Set;n.set(t,a)}else a=n.get(t),a===void 0&&(a=new Set,n.set(t,a));a.has(l)||(gs=!0,a.add(l),e=Cg.bind(null,e,t,l),t.then(e,e))}function Cg(e,t,l){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,He===e&&(ke&l)===l&&((Ke===4||Ke===3&&(ke&62914560)===ke&&300>Ct()-Yu)&&(Be&2)===0?ba(e,0):Gu|=l,ha===ke&&(ha=0)),fl(e)}function lx(e,t){t===0&&(t=Uo()),e=mn(e,t),e!==null&&(qa(e,t),fl(e))}function Mg(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),lx(e,l)}function kg(e,t){var l=0;switch(e.tag){case 31:case 13:var n=e.stateNode,a=e.memoizedState;a!==null&&(l=a.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(r(314))}n!==null&&n.delete(t),lx(e,l)}function Fg(e,t){return Un(e,t)}var Na=null,Sa=null,ks=!1,Wu=!1,Fs=!1,$l=0;function fl(e){e!==Sa&&e.next===null&&(Sa===null?Na=Sa=e:Sa=Sa.next=e),Wu=!0,ks||(ks=!0,wg())}function Ni(e,t){if(!Fs&&Wu){Fs=!0;do for(var l=!1,n=Na;n!==null;){if(e!==0){var a=n.pendingLanes;if(a===0)var i=0;else{var s=n.suspendedLanes,x=n.pingedLanes;i=(1<<31-kt(42|e)+1)-1,i&=a&~(s&~x),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,ux(n,i))}else i=ke,i=Gi(n,n===He?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(i&3)===0||Ua(n,i)||(l=!0,ux(n,i));n=n.next}while(l);Fs=!1}}function Tg(){nx()}function nx(){Wu=ks=!1;var e=0;$l!==0&&qg()&&(e=$l);for(var t=Ct(),l=null,n=Na;n!==null;){var a=n.next,i=ax(n,t);i===0?(n.next=null,l===null?Na=a:l.next=a,a===null&&(Sa=l)):(l=n,(e!==0||(i&3)!==0)&&(Wu=!0)),n=a}Xe!==0&&Xe!==5||Ni(e),$l!==0&&($l=0)}function ax(e,t){for(var l=e.suspendedLanes,n=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var s=31-kt(i),x=1<<s,E=a[s];E===-1?((x&l)===0||(x&n)!==0)&&(a[s]=Zh(x,t)):E<=t&&(e.expiredLanes|=x),i&=~x}if(t=He,l=ke,l=Gi(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,l===0||e===t&&(ze===2||ze===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&wc(n),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Ua(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(n!==null&&wc(n),Oc(l)){case 2:case 8:l=Ro;break;case 32:l=Li;break;case 268435456:l=Lo;break;default:l=Li}return n=ix.bind(null,e),l=Un(l,n),e.callbackPriority=t,e.callbackNode=l,t}return n!==null&&n!==null&&wc(n),e.callbackPriority=2,e.callbackNode=null,2}function ix(e,t){if(Xe!==0&&Xe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Iu()&&e.callbackNode!==l)return null;var n=ke;return n=Gi(e,e===He?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Xd(e,n,t),ax(e,Ct()),e.callbackNode!=null&&e.callbackNode===l?ix.bind(null,e):null)}function ux(e,t){if(Iu())return null;Xd(e,t,!0)}function wg(){Yg(function(){(Be&6)!==0?Un(_o,Tg):nx()})}function Ts(){if($l===0){var e=Nn;e===0&&(e=Hi,Hi<<=1,(Hi&261888)===0&&(Hi=256)),$l=e}return $l}function cx(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Zi(e)}function Dg(e,t,l,n,a){if(t==="submit"&&l&&l.stateNode===a){var i=cx((a[bt]||null).action),s=n.submitter;s&&(t=(t=s[bt]||null)?cx(t.formAction):s.getAttribute("formAction"),t!==null&&(i=t,s=null));var x=new Wi("action","action",null,n,a);e.push({event:x,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if($l!==0){var E=new FormData(a,s);Rr(l,{pending:!0,data:E,method:a.method,action:i},null,E)}}else typeof i=="function"&&(x.preventDefault(),E=new FormData(a,s),Rr(l,{pending:!0,data:E,method:a.method,action:i},i,E))},currentTarget:a}]})}}for(var ws=0;ws<tr.length;ws++){var Ds=tr[ws],Bg=Ds.toLowerCase(),Og=Ds[0].toUpperCase()+Ds.slice(1);Zt(Bg,"on"+Og)}Zt(Of,"onAnimationEnd"),Zt(jf,"onAnimationIteration"),Zt(zf,"onAnimationStart"),Zt("dblclick","onDoubleClick"),Zt("focusin","onFocus"),Zt("focusout","onBlur"),Zt(Gm,"onTransitionRun"),Zt(Ym,"onTransitionStart"),Zt(Xm,"onTransitionCancel"),Zt(_f,"onTransitionEnd"),Xn("onMouseEnter",["mouseout","mouseover"]),Xn("onMouseLeave",["mouseout","mouseover"]),Xn("onPointerEnter",["pointerout","pointerover"]),Xn("onPointerLeave",["pointerout","pointerover"]),dn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),dn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),dn("onBeforeInput",["compositionend","keypress","textInput","paste"]),dn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),dn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),dn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Si="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),jg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Si));function rx(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var n=e[l],a=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var s=n.length-1;0<=s;s--){var x=n[s],E=x.instance,w=x.currentTarget;if(x=x.listener,E!==i&&a.isPropagationStopped())break e;i=x,a.currentTarget=w;try{i(a)}catch(R){eu(R)}a.currentTarget=null,i=E}else for(s=0;s<n.length;s++){if(x=n[s],E=x.instance,w=x.currentTarget,x=x.listener,E!==i&&a.isPropagationStopped())break e;i=x,a.currentTarget=w;try{i(a)}catch(R){eu(R)}a.currentTarget=null,i=E}}}}function Me(e,t){var l=t[Vo];l===void 0&&(l=t[Vo]=new Set);var n=e+"__bubble";l.has(n)||(sx(t,e,2,!1),l.add(n))}function Bs(e,t,l){var n=0;t&&(n|=4),sx(l,e,n,t)}var $u="_reactListening"+Math.random().toString(36).slice(2);function Os(e){if(!e[$u]){e[$u]=!0,Jo.forEach(function(l){l!=="selectionchange"&&(jg.has(l)||Bs(l,!1,e),Bs(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[$u]||(t[$u]=!0,Bs("selectionchange",!1,t))}}function sx(e,t,l,n){switch($x(t)){case 2:var a=M2;break;case 8:a=k2;break;default:a=Ps}l=a.bind(null,t,l,e),a=void 0,!qc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),n?a!==void 0?e.addEventListener(t,l,{capture:!0,passive:a}):e.addEventListener(t,l,!0):a!==void 0?e.addEventListener(t,l,{passive:a}):e.addEventListener(t,l,!1)}function js(e,t,l,n,a){var i=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var s=n.tag;if(s===3||s===4){var x=n.stateNode.containerInfo;if(x===a)break;if(s===4)for(s=n.return;s!==null;){var E=s.tag;if((E===3||E===4)&&s.stateNode.containerInfo===a)return;s=s.return}for(;x!==null;){if(s=fn(x),s===null)return;if(E=s.tag,E===5||E===6||E===26||E===27){n=i=s;continue e}x=x.parentNode}}n=n.return}sf(function(){var w=i,R=Hc(l),J=[];e:{var F=Rf.get(e);if(F!==void 0){var _=Wi,ue=e;switch(e){case"keypress":if(Ji(l)===0)break e;case"keydown":case"keyup":_=vm;break;case"focusin":ue="focus",_=Qc;break;case"focusout":ue="blur",_=Qc;break;case"beforeblur":case"afterblur":_=Qc;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":_=df;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":_=um;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":_=Em;break;case Of:case jf:case zf:_=sm;break;case _f:_=Cm;break;case"scroll":case"scrollend":_=am;break;case"wheel":_=km;break;case"copy":case"cut":case"paste":_=fm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":_=hf;break;case"submit":_=Nm;break;case"toggle":case"beforetoggle":_=Tm}var de=(t&4)!==0,Ne=!de&&(e==="scroll"||e==="scrollend"),T=de?F!==null?F+"Capture":null:F;de=[];for(var M=w,z;M!==null;){var K=M;if(z=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||z===null||T===null||(K=Xa(M,T),K!=null&&de.push(Ei(M,K,z))),Ne)break;M=M.return}0<de.length&&(F=new _(F,ue,null,l,R),J.push({event:F,listeners:de}))}}if((t&7)===0){e:{if(_=e==="mouseover"||e==="pointerover",F=e==="mouseout"||e==="pointerout",_&&l!==Lc&&(ue=l.relatedTarget||l.fromElement)&&(fn(ue)||ue[qn]))break e;(F||_)&&(ue=R.window===R?R:(_=R.ownerDocument)?_.defaultView||_.parentWindow:window,F?(_=l.relatedTarget||l.toElement,F=w,_=_?fn(_):null,_!==null&&(Ne=h(_),de=_.tag,_!==Ne||de!==5&&de!==27&&de!==6)&&(_=null)):(F=null,_=w),F!==_&&(de=df,K="onMouseLeave",T="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(de=hf,K="onPointerLeave",T="onPointerEnter",M="pointer"),Ne=F==null?ue:Ya(F),z=_==null?ue:Ya(_),ue=new de(K,M+"leave",F,l,R),ue.target=Ne,ue.relatedTarget=z,K=null,fn(R)===w&&(de=new de(T,M+"enter",_,l,R),de.target=z,de.relatedTarget=Ne,K=de),Ne=K,de=F&&_?Z(F,_,zg):null,F!==null&&ox(J,ue,F,de,!1),_!==null&&Ne!==null&&ox(J,Ne,_,de,!0)))}e:{if(F=w?Ya(w):window,_=F.nodeName&&F.nodeName.toLowerCase(),_==="select"||_==="input"&&F.type==="file")var fe=Sf;else if(yf(F))if(Ef)fe=Hm;else{fe=Rm;var Fe=_m}else _=F.nodeName,!_||_.toLowerCase()!=="input"||F.type!=="checkbox"&&F.type!=="radio"?w&&Rc(w.elementType)&&(fe=Sf):fe=Lm;if(fe&&(fe=fe(e,w))){Nf(J,fe,l,R);break e}Fe&&Fe(e,F,w)}switch(Fe=w?Ya(w):window,e){case"focusin":(yf(Fe)||Fe.contentEditable==="true")&&(In=Fe,$c=w,$a=null);break;case"focusout":$a=$c=In=null;break;case"mousedown":Pc=!0;break;case"contextmenu":case"mouseup":case"dragend":Pc=!1,Df(J,l,R);break;case"selectionchange":if(qm)break;case"keydown":case"keyup":Df(J,l,R)}var he;if(Zc)e:{switch(e){case"compositionstart":var pe="onCompositionStart";break e;case"compositionend":pe="onCompositionEnd";break e;case"compositionupdate":pe="onCompositionUpdate";break e}pe=void 0}else Jn?vf(e,l)&&(pe="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(pe="onCompositionStart");pe&&(mf&&l.locale!=="ko"&&(Jn||pe!=="onCompositionStart"?pe==="onCompositionEnd"&&Jn&&(he=of()):(Ol=R,Gc="value"in Ol?Ol.value:Ol.textContent,Jn=!0)),Fe=Pu(w,pe),0<Fe.length&&(pe=new xf(pe,e,null,l,R),J.push({event:pe,listeners:Fe}),he?pe.data=he:(he=bf(l),he!==null&&(pe.data=he)))),(he=Dm?Bm(e,l):Om(e,l))&&(pe=Pu(w,"onBeforeInput"),0<pe.length&&(Fe=new xf("onBeforeInput","beforeinput",null,l,R),J.push({event:Fe,listeners:pe}),Fe.data=he)),Dg(J,e,w,l,R)}rx(J,t)})}function Ei(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Pu(e,t){for(var l=t+"Capture",n=[];e!==null;){var a=e,i=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||i===null||(a=Xa(e,l),a!=null&&n.unshift(Ei(e,a,i)),a=Xa(e,t),a!=null&&n.push(Ei(e,a,i))),e.tag===3)return n;e=e.return}return[]}function zg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ox(e,t,l,n,a){for(var i=t._reactName,s=[];l!==null&&l!==n;){var x=l,E=x.alternate,w=x.stateNode;if(x=x.tag,E!==null&&E===n)break;x!==5&&x!==26&&x!==27||w===null||(E=w,a?(w=Xa(l,i),w!=null&&s.unshift(Ei(l,w,E))):a||(w=Xa(l,i),w!=null&&s.push(Ei(l,w,E)))),l=l.return}s.length!==0&&e.push({event:t,listeners:s})}var _g=/\r\n?/g,Rg=/\u0000|\uFFFD/g;function fx(e){return(typeof e=="string"?e:""+e).replace(_g,`
49
- `).replace(Rg,"")}function dx(e,t){return t=fx(t),fx(e)===t}function Re(e,t,l,n,a,i){switch(l){case"children":if(typeof n=="string")t==="body"||t==="textarea"&&n===""||Vn(e,n);else if(typeof n=="number"||typeof n=="bigint")t!=="body"&&Vn(e,""+n);else return;break;case"className":Vi(e,"class",n);break;case"tabIndex":Vi(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Vi(e,l,n);break;case"style":cf(e,n,i);return;case"data":if(t!=="object"){Vi(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(l);break}n=Zi(n),e.setAttribute(l,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(l==="formAction"?(t!=="input"&&Re(e,t,"name",a.name,a,null),Re(e,t,"formEncType",a.formEncType,a,null),Re(e,t,"formMethod",a.formMethod,a,null),Re(e,t,"formTarget",a.formTarget,a,null)):(Re(e,t,"encType",a.encType,a,null),Re(e,t,"method",a.method,a,null),Re(e,t,"target",a.target,a,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(l);break}n=Zi(n),e.setAttribute(l,n);break;case"onClick":n!=null&&(e.onclick=tl);return;case"onScroll":n!=null&&Me("scroll",e);return;case"onScrollEnd":n!=null&&Me("scrollend",e);return;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(r(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(r(60));i?.__html!==l&&(e.innerHTML=l)}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}l=Zi(n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,n):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":n===!0?e.setAttribute(l,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,n):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(l,n):e.removeAttribute(l);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(l):e.setAttribute(l,n);break;case"popover":Me("beforetoggle",e),Me("toggle",e),Qi(e,"popover",n);break;case"xlinkActuate":hl(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":hl(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":hl(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":hl(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":hl(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":hl(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":hl(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":hl(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":hl(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Qi(e,"is",n);break;case"innerText":case"textContent":return;default:if(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")l=lm.get(l)||l,Qi(e,l,n);else return}De=!0}function zs(e,t,l,n,a,i){switch(l){case"style":cf(e,n,i);return;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(r(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(r(60));i?.__html!==l&&(e.innerHTML=l)}}break;case"children":if(typeof n=="string")Vn(e,n);else if(typeof n=="number"||typeof n=="bigint")Vn(e,""+n);else return;break;case"onScroll":n!=null&&Me("scroll",e);return;case"onScrollEnd":n!=null&&Me("scrollend",e);return;case"onClick":n!=null&&(e.onclick=tl);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Io.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(a=l.endsWith("Capture"),i=l.slice(2,a?l.length-7:void 0),t=e[bt]||null,t=t!=null?t[l]:null,typeof t=="function"&&e.removeEventListener(i,t,a),typeof n=="function")){typeof t!="function"&&t!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(i,n,a);break e}De=!0,l in e?e[l]=n:n===!0?e.setAttribute(l,""):Qi(e,l,n)}return}De=!0}function ft(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Me("error",e),Me("load",e);var n=!1,a=!1,i;for(i in l)if(l.hasOwnProperty(i)){var s=l[i];if(s!=null)switch(i){case"src":n=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Re(e,t,i,s,l,null)}}a&&Re(e,t,"srcSet",l.srcSet,l,null),n&&Re(e,t,"src",l.src,l,null);return;case"input":Me("invalid",e);var x=i=s=a=null,E=null,w=null;for(n in l)if(l.hasOwnProperty(n)){var R=l[n];if(R!=null)switch(n){case"name":a=R;break;case"type":s=R;break;case"checked":E=R;break;case"defaultChecked":w=R;break;case"value":i=R;break;case"defaultValue":x=R;break;case"children":case"dangerouslySetInnerHTML":if(R!=null)throw Error(r(137,t));break;default:Re(e,t,n,R,l,null)}}lf(e,i,x,E,w,s,a,!1);return;case"select":Me("invalid",e),n=s=i=null;for(a in l)if(l.hasOwnProperty(a)&&(x=l[a],x!=null))switch(a){case"value":i=x;break;case"defaultValue":s=x;break;case"multiple":n=x;default:Re(e,t,a,x,l,null)}t=i,l=s,e.multiple=!!n,t!=null?Qn(e,!!n,t,!1):l!=null&&Qn(e,!!n,l,!0);return;case"textarea":Me("invalid",e),i=a=n=null;for(s in l)if(l.hasOwnProperty(s)&&(x=l[s],x!=null))switch(s){case"value":n=x;break;case"defaultValue":a=x;break;case"children":i=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:Re(e,t,s,x,l,null)}af(e,n,a,i);return;case"option":for(E in l)if(l.hasOwnProperty(E)&&(n=l[E],n!=null))switch(E){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:Re(e,t,E,n,l,null)}return;case"dialog":Me("beforetoggle",e),Me("toggle",e),Me("cancel",e),Me("close",e);break;case"iframe":case"object":Me("load",e);break;case"video":case"audio":for(n=0;n<Si.length;n++)Me(Si[n],e);break;case"image":Me("error",e),Me("load",e);break;case"details":Me("toggle",e);break;case"embed":case"source":case"link":Me("error",e),Me("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(w in l)if(l.hasOwnProperty(w)&&(n=l[w],n!=null))switch(w){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Re(e,t,w,n,l,null)}return;default:if(Rc(t)){for(R in l)l.hasOwnProperty(R)&&(n=l[R],n!==void 0&&zs(e,t,R,n,l,void 0));return}}for(x in l)l.hasOwnProperty(x)&&(n=l[x],n!=null&&Re(e,t,x,n,l,null))}var Lg={};function Hg(e,t,l,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,i=null,s=null,x=null,E=null,w=null,R=null;for(_ in l){var J=l[_];if(l.hasOwnProperty(_)&&J!=null)switch(_){case"checked":break;case"value":break;case"defaultValue":E=J;default:n.hasOwnProperty(_)||Re(e,t,_,null,n,J)}}for(var F in n){var _=n[F];if(J=l[F],n.hasOwnProperty(F)&&(_!=null||J!=null))switch(F){case"type":_!==J&&(De=!0),i=_;break;case"name":_!==J&&(De=!0),a=_;break;case"checked":_!==J&&(De=!0),w=_;break;case"defaultChecked":_!==J&&(De=!0),R=_;break;case"value":_!==J&&(De=!0),s=_;break;case"defaultValue":_!==J&&(De=!0),x=_;break;case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(r(137,t));break;default:_!==J&&Re(e,t,F,_,n,J)}}zc(e,s,x,E,w,R,i,a);return;case"select":_=s=x=F=null;for(i in l)if(E=l[i],l.hasOwnProperty(i)&&E!=null)switch(i){case"value":break;case"multiple":_=E;default:n.hasOwnProperty(i)||Re(e,t,i,null,n,E)}for(a in n)if(i=n[a],E=l[a],n.hasOwnProperty(a)&&(i!=null||E!=null))switch(a){case"value":i!==E&&(De=!0),F=i;break;case"defaultValue":i!==E&&(De=!0),x=i;break;case"multiple":i!==E&&(De=!0),s=i;default:i!==E&&Re(e,t,a,i,n,E)}t=x,l=s,n=_,F!=null?Qn(e,!!l,F,!1):!!n!=!!l&&(t!=null?Qn(e,!!l,t,!0):Qn(e,!!l,l?[]:"",!1));return;case"textarea":_=F=null;for(x in l)if(a=l[x],l.hasOwnProperty(x)&&a!=null&&!n.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:Re(e,t,x,null,n,a)}for(s in n)if(a=n[s],i=l[s],n.hasOwnProperty(s)&&(a!=null||i!=null))switch(s){case"value":a!==i&&(De=!0),F=a;break;case"defaultValue":a!==i&&(De=!0),_=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(r(91));break;default:a!==i&&Re(e,t,s,a,n,i)}nf(e,F,_);return;case"option":for(var ue in l)if(F=l[ue],l.hasOwnProperty(ue)&&F!=null&&!n.hasOwnProperty(ue))switch(ue){case"selected":e.selected=!1;break;default:Re(e,t,ue,null,n,F)}for(E in n)if(F=n[E],_=l[E],n.hasOwnProperty(E)&&F!==_&&(F!=null||_!=null))switch(E){case"selected":F!==_&&(De=!0),e.selected=F&&typeof F!="function"&&typeof F!="symbol";break;default:Re(e,t,E,F,n,_)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var de in l)F=l[de],l.hasOwnProperty(de)&&F!=null&&!n.hasOwnProperty(de)&&Re(e,t,de,null,n,F);for(w in n)if(F=n[w],_=l[w],n.hasOwnProperty(w)&&F!==_&&(F!=null||_!=null))switch(w){case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(r(137,t));break;default:Re(e,t,w,F,n,_)}return;default:if(Rc(t)){for(var Ne in l)F=l[Ne],l.hasOwnProperty(Ne)&&F!==void 0&&!n.hasOwnProperty(Ne)&&zs(e,t,Ne,void 0,n,F);for(R in n)F=n[R],_=l[R],!n.hasOwnProperty(R)||F===_||F===void 0&&_===void 0||zs(e,t,R,F,n,_);return}}for(var T in l)F=l[T],l.hasOwnProperty(T)&&F!=null&&!n.hasOwnProperty(T)&&Re(e,t,T,null,n,F);for(J in n)F=n[J],_=l[J],!n.hasOwnProperty(J)||F===_||F==null&&_==null||Re(e,t,J,F,n,_)}function xx(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ug(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),n=0;n<l.length;n++){var a=l[n],i=a.transferSize,s=a.initiatorType,x=a.duration;if(i&&x&&xx(s)){for(s=0,x=a.responseEnd,n+=1;n<l.length;n++){var E=l[n],w=E.startTime;if(w>x)break;var R=E.transferSize,J=E.initiatorType;R&&xx(J)&&(E=E.responseEnd,s+=R*(E<x?1:(x-w)/(E-w)))}if(--n,t+=8*(i+s)/(a.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var _s=null,Rs=null;function Ai(e){return e.nodeType===9?e:e.ownerDocument}function hx(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function mx(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function gx(e,t,l,n){return l=Ai(l).createElement(e),l[ut]=n,l[bt]=t,ft(l,e,t),tt(l),l}function Ls(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Hs=null;function qg(){var e=window.event;return e&&e.type==="popstate"?e===Hs?!1:(Hs=e,!0):(Hs=null,!1)}var Us=typeof setTimeout=="function"?setTimeout:void 0,Gg=typeof clearTimeout=="function"?clearTimeout:void 0,px=typeof Promise=="function"?Promise:void 0,vx=typeof requestAnimationFrame=="function"?requestAnimationFrame:Us,Yg=typeof queueMicrotask=="function"?queueMicrotask:typeof px<"u"?function(e){return px.resolve(null).then(e).catch(Xg)}:Us;function Xg(e){setTimeout(function(){throw e})}function Pl(e){return e==="head"}function bx(e,t){var l=t,n=0;do{var a=l.nextSibling;if(e.removeChild(l),a&&a.nodeType===8)if(l=a.data,l==="/$"||l==="/&"){if(n===0){e.removeChild(a),Ta(t);return}n--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")n++;else if(l==="html")Ks(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Ks(l);for(var i=l.firstChild;i;){var s=i.nextSibling,x=i.nodeName;i[Ga]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=s}}else l==="body"&&Ks(e.ownerDocument.body);l=a}while(l);Ta(t)}function yx(e,t){var l=e;e=0;do{var n=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),n&&n.nodeType===8)if(l=n.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=n}while(l)}function Nx(e,t,l){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,l!=null&&(e.style.viewTransitionClass=l),l=getComputedStyle(e),l.display==="inline"){if(t=e.getClientRects(),t.length===1)var n=1;else for(var a=n=0;a<t.length;a++){var i=t[a];0<i.width&&0<i.height&&n++}n===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+l.paddingTop,e.marginBottom="-"+l.paddingBottom)}}function Sx(e,t){e=e.style,t=t.style;var l=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=l==null||typeof l=="boolean"?"":(""+l).trim(),l=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=l==null||typeof l=="boolean"?"":(""+l).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(l=t.display,e.display=l==null||typeof l=="boolean"?"":l,l=t.margin,l!=null?e.margin=l:(l=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=l==null||typeof l=="boolean"?"":l,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function Qg(e,t,l){return l=l.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=l.innerHeight&&e.left<=l.innerWidth}}function qs(e){var t=e.getBoundingClientRect(),l=getComputedStyle(e);return Qg(t,l,e)}function Vg(e){return e.documentElement.clientHeight}function Zg(e){this.addEventListener("load",e),this.addEventListener("error",e)}function Kg(e,t,l,n,a,i,s,x,E){var w=t.nodeType===9?t:t.ownerDocument;try{var R=w.startViewTransition({update:function(){var F=w.defaultView,_=F.navigation&&F.navigation.transition,ue=w.fonts.status;n();var de=[];if(ue==="loaded"&&(Vg(w),w.fonts.status==="loading"&&de.push(w.fonts.ready)),ue=de.length,e!==null)for(var Ne=e.suspenseyImages,T=0,M=0;M<Ne.length;M++){var z=Ne[M];if(!z.complete){var K=z.getBoundingClientRect();if(0<K.bottom&&0<K.right&&K.top<F.innerHeight&&K.left<F.innerWidth){if(T+=Yx(z),T>lc){de.length=ue;break}z=new Promise(Zg.bind(z)),de.push(z)}}}if(0<de.length)return F=Promise.race([Promise.all(de),new Promise(function(fe){return setTimeout(fe,500)})]).then(a,a),(_?Promise.allSettled([_.finished,F]):F).then(i,i);if(a(),_)return _.finished.then(i,i);i()},types:l});w.__reactViewTransition=R;var J=[];return R.ready.then(function(){for(var F=w.documentElement.getAnimations({subtree:!0}),_=0;_<F.length;_++){var ue=F[_],de=ue.effect,Ne=de.pseudoElement;if(Ne!=null&&Ne.startsWith("::view-transition")){J.push(ue),ue=de.getKeyframes();for(var T=Ne=void 0,M=!0,z=0;z<ue.length;z++){var K=ue[z],fe=K.width;if(Ne===void 0)Ne=fe;else if(Ne!==fe){M=!1;break}if(fe=K.height,T===void 0)T=fe;else if(T!==fe){M=!1;break}delete K.width,delete K.height,K.transform==="none"&&delete K.transform}M&&Ne!==void 0&&T!==void 0&&(de.setKeyframes(ue),M=getComputedStyle(de.target,de.pseudoElement),M.width!==Ne||M.height!==T)&&(M=ue[0],M.width=Ne,M.height=T,M=ue[ue.length-1],M.width=Ne,M.height=T,de.setKeyframes(ue))}}s()},function(F){w.__reactViewTransition===R&&(w.__reactViewTransition=null);try{if(typeof F=="object"&&F!==null)switch(F.name){case"InvalidStateError":(F.message==="View transition was skipped because document visibility state is hidden."||F.message==="Skipping view transition because document visibility state has become hidden."||F.message==="Skipping view transition because viewport size changed."||F.message==="Transition was aborted because of invalid state")&&(F=null)}F!==null&&E(F)}finally{n(),a(),s()}}),R.finished.finally(function(){for(var F=0;F<J.length;F++)J[F].cancel();w.__reactViewTransition===R&&(w.__reactViewTransition=null),x()}),R}catch{return n(),a(),s(),null}}function Bn(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}Bn.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:ee({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Bn.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,l=e.getAnimations({subtree:!0}),n=[],a=0;a<l.length;a++){var i=l[a].effect;i!==null&&i.target===e&&i.pseudoElement===t&&n.push(l[a])}return n},Bn.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Ex(e){return{name:e,group:new Bn("group",e),imagePair:new Bn("image-pair",e),old:new Bn("old",e),new:new Bn("new",e)}}function zt(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}zt.prototype.addEventListener=function(e,t,l){var n=null,a=null;if(!(l!=null&&typeof l!="boolean"&&(n=l.signal||null,n!==null&&n.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var i=this._eventListeners;if(Cx(i,e,t,l)===-1){var s=this,x=t;l!=null&&typeof l!="boolean"&&l.once===!0&&(x=function(E){s.removeEventListener(e,t,l),typeof t=="function"?t.call(this,E):t.handleEvent(E)}),n!==null&&(a=s.removeEventListener.bind(s,e,t,l),n.addEventListener("abort",a,{once:!0}),a=n.removeEventListener.bind(n,"abort",a)),n=Ea(l),i.push({type:e,listener:t,optionsOrUseCapture:l,attachedListener:x,cleanup:a}),g(this._fragmentFiber.child,!1,Jg,e,x,n)}this._eventListeners=i}};function Jg(e,t,l,n){return L(e).addEventListener(t,l,n),!1}zt.prototype.removeEventListener=function(e,t,l){var n=this._eventListeners;if(n!==null&&(t=Cx(n,e,t,l),t!==-1)){var a=n[t];l=a.attachedListener;var i=a.cleanup;a=Ea(a.optionsOrUseCapture),g(this._fragmentFiber.child,!1,Ig,e,l,a),n.splice(t,1),i!==null&&i()}};function Ig(e,t,l,n){return L(e).removeEventListener(t,l,n),!1}function Ea(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Ax(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function Cx(e,t,l,n){if(e.length===0)return-1;n=Ax(n);for(var a=0;a<e.length;a++){var i=e[a];if(i.type===t&&i.listener===l&&Ax(i.optionsOrUseCapture)===n)return a}return-1}zt.prototype.dispatchEvent=function(e){var t=N(this._fragmentFiber);if(t===null)return!0;t=L(t);var l=this._eventListeners;if(l!==null&&0<l.length||!e.bubbles){var n=t.nodeType===9?t.createComment(""):document.createTextNode("");if(l)for(var a=0;a<l.length;a++){var i=l[a];n.addEventListener(i.type,i.attachedListener,Ea(i.optionsOrUseCapture))}if(t.appendChild(n),e=n.dispatchEvent(e),l)for(a=0;a<l.length;a++)i=l[a],n.removeEventListener(i.type,i.attachedListener,Ea(i.optionsOrUseCapture));return t.removeChild(n),e}return t.dispatchEvent(e)},zt.prototype.focus=function(e){g(this._fragmentFiber.child,!0,Mx,e,void 0,void 0)};function Mx(e,t){return e.tag===6?!1:(e=L(e),r2(e,t))}zt.prototype.focusLast=function(e){var t=[];g(this._fragmentFiber.child,!0,Gs,t,void 0,void 0);for(var l=t.length-1;0<=l&&!Mx(t[l],e);l--);};function Gs(e,t){return t.push(e),!1}zt.prototype.blur=function(){var e=N(this._fragmentFiber);e!==null&&(e=L(e),e=Ai(e).activeElement,e!==null&&g(this._fragmentFiber.child,!1,Wg,e,void 0,void 0))};function Wg(e,t){return e.tag===6?!1:(e=L(e),e===t||e.contains(t)?(t.blur(),!0):!1)}zt.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),g(this._fragmentFiber.child,!1,$g,e,void 0,void 0)};function $g(e,t){return e.tag===6||(e=L(e),t.observe(e)),!1}zt.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),g(this._fragmentFiber.child,!1,Pg,e,void 0,void 0);for(var l=t=0;l<$t.length;l++){var n=$t[l];n.fragmentInstance===this&&n.observer===e?e.unobserve(n.instance):$t[t++]=n}$t.length=t}};function Pg(e,t){return e.tag===6||(e=L(e),t.unobserve(e)),!1}var $t=[],Ys=!1;function e2(e,t,l){$t.push({fragmentInstance:e,observer:t,instance:l}),Ys||(Ys=!0,s2(function(){Ys=!1;var n=$t;$t=[];for(var a=0;a<n.length;a++){var i=n[a];i.observer.unobserve(i.instance)}}))}zt.prototype.getClientRects=function(){var e=[];return g(this._fragmentFiber.child,!1,t2,e,void 0,void 0),e};function t2(e,t){if(e.tag===6){e=e.stateNode;var l=e.ownerDocument.createRange();l.selectNodeContents(e),t.push.apply(t,l.getClientRects())}else e=L(e),t.push.apply(t,e.getClientRects());return!1}zt.prototype.getRootNode=function(e){var t=N(this._fragmentFiber);return t===null?this:L(t).getRootNode(e)},zt.prototype.compareDocumentPosition=function(e){var t=N(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var l=[];g(this._fragmentFiber.child,!1,Gs,l,void 0,void 0);var n=L(t);if(l.length===0){if(l=n,C(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(l=t)}t=this._fragmentFiber;var a=n=l.compareDocumentPosition(e);return l===e?a=Node.DOCUMENT_POSITION_CONTAINS:n&Node.DOCUMENT_POSITION_CONTAINED_BY&&(l=V(t)[1],l===null?a=Node.DOCUMENT_POSITION_PRECEDING:(e=L(l).compareDocumentPosition(e),a=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),a|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=L(l[0]),a=L(l[l.length-1]);var i=C(this._fragmentFiber)?t.parentElement:n;if(i==null)return Node.DOCUMENT_POSITION_DISCONNECTED;n=i.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,i=i.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINED_BY;var s=t.compareDocumentPosition(e),x=a.compareDocumentPosition(e),E=s&Node.DOCUMENT_POSITION_CONTAINED_BY||x&Node.DOCUMENT_POSITION_CONTAINED_BY;return x=n&&i&&s&Node.DOCUMENT_POSITION_FOLLOWING&&x&Node.DOCUMENT_POSITION_PRECEDING,t=n&&t===e||i&&a===e||E||x?Node.DOCUMENT_POSITION_CONTAINED_BY:!n&&t===e||!i&&a===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:s,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||l2(t,this._fragmentFiber,l[0],l[l.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function l2(e,t,l,n,a){var i=fn(a);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(l=!!i)e:{for(;i!==null;){if(i.tag===7&&(i===t||i.alternate===t)){l=!0;break e}i=i.return}l=!1}return l}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(i===null)return i=a.ownerDocument,a===i||a===i.documentElement||a===i.body;e:{for(i=t,t=N(t);i!==null;){if(!(i.tag!==5&&i.tag!==3&&i.tag!==27||i!==t&&i.alternate!==t)){i=!0;break e}i=i.return}i=!1}return i}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!i)&&!(t=i===l)&&(t=Z(l,i,ce),t===null?t=!1:(g(t,!0,le,i,l),i=U,U=null,t=i!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!i)&&!(t=i===n)&&(t=Z(n,i,ce),t===null?t=!1:(g(t,!0,oe,i,n),i=U,te=U=null,t=i!==null)),t):!1}function kx(e,t){var l=e.ownerDocument.createRange();l.selectNodeContents(e),e=l.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}zt.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(r(566));var t=[];g(this._fragmentFiber.child,!1,Gs,t,void 0,void 0);var l=e!==!1;if(t.length===0){var n=V(this._fragmentFiber);if(n=l?n[1]||n[0]||N(this._fragmentFiber):n[0]||n[1],n===null)return;if(n.tag===6){e=L(n),kx(e,l);return}if(n=L(n),n.nodeType!==9){if(n.nodeType===11){l="host"in n?n.host:null,l!==null&&l.scrollIntoView(e);return}n.scrollIntoView(e)}}for(n=l?t.length-1:0;n!==(l?-1:t.length);){var a=t[n];a.tag===6?(a=L(a),kx(a,l)):L(a).scrollIntoView(e),n+=l?-1:1}};function n2(e,t){return e=L(e),Fx(e,t),!1}function Fx(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function Tx(e,t){var l=t._eventListeners;if(l!==null)for(var n=0;n<l.length;n++){var a=l[n];e.addEventListener(a.type,a.attachedListener,Ea(a.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(i){for(var s=0,x=0;x<$t.length;x++){var E=$t[x];(E.fragmentInstance!==t||E.observer!==i||E.instance!==e)&&($t[s++]=E)}$t.length=s,i.observe(e)}),Fx(e,t))}function a2(e,t){var l=t._eventListeners;if(l!==null)for(var n=0;n<l.length;n++){var a=l[n];e.removeEventListener(a.type,a.attachedListener,Ea(a.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(i){typeof i.rootMargin=="string"?e2(t,i,e):i.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function Xs(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Xs(l),Xi(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function i2(e,t,l,n){for(;e.nodeType===1;){var a=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[Ga])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=Xt(e.nextSibling),e===null)break}return null}function u2(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Xt(e.nextSibling),e===null))return null;return e}function wx(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Xt(e.nextSibling),e===null))return null;return e}function Qs(e){return e.data==="$?"||e.data==="$~"}function Vs(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function c2(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var n=function(){t(),l.removeEventListener("DOMContentLoaded",n)};l.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function Xt(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==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Zs=null;function Dx(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return Xt(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function Bx(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function r2(e,t){function l(){n=!0}if(e.ownerDocument.activeElement===e)return!0;var n=!1;try{e.ownerDocument.addEventListener("focus",l,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",l,!0)}return n}function s2(e){vx(function(){vx(function(t){return e(t)})})}function Ox(e,t,l){switch(t=Ai(l),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function jx(e,t,l){for(var n in l){var a=l[n];l.hasOwnProperty(n)&&a!=null&&Re(e,t,n,null,Lg,a)}l.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===tl&&(e.onclick=null),Xi(e)}function Ks(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Xi(e)}var Qt=new Map,zx=new Set;function Ci(e){if(typeof e.getRootNode=="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var kl=se.d;se.d={f:o2,r:f2,D:d2,C:x2,L:h2,m:m2,X:p2,S:g2,M:v2};function o2(){var e=kl.f(),t=Zu();return e||t}function f2(e){var t=Gn(e);t!==null&&t.tag===5&&t.type==="form"?R0(t):kl.r(e)}var Aa=typeof document>"u"?null:document;function _x(e,t,l){var n=Aa;if(n&&typeof t=="string"&&t){var a=Rt(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof l=="string"&&(a+='[crossorigin="'+l+'"]'),zx.has(a)||(zx.add(a),e={rel:e,crossOrigin:l,href:t},n.querySelector(a)===null&&(t=n.createElement("link"),ft(t,"link",e),tt(t),n.head.appendChild(t)))}}function d2(e){kl.D(e),_x("dns-prefetch",e,null)}function x2(e,t){kl.C(e,t),_x("preconnect",e,t)}function h2(e,t,l){kl.L(e,t,l);var n=Aa;if(n&&e&&t){var a='link[rel="preload"][as="'+Rt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(a+='[imagesrcset="'+Rt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(a+='[imagesizes="'+Rt(l.imageSizes)+'"]')):a+='[href="'+Rt(e)+'"]';var i=a;switch(t){case"style":i=Ca(e);break;case"script":i=Ma(e)}if(!(Qt.has(i)||(e=ee({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Qt.set(i,e),n.querySelector(a)!==null||t==="style"&&n.querySelector(Mi(i))||t==="script"&&n.querySelector(ki(i))))){var s=n.createElement("link");ft(s,"link",e),t==="style"&&(s[Yi]=!0,s.onload=s.onerror=function(){Ko(s)}),tt(s),n.head.appendChild(s)}}}function m2(e,t){kl.m(e,t);var l=Aa;if(l&&e){var n=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+Rt(n)+'"][href="'+Rt(e)+'"]',i=a;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Ma(e)}if(!Qt.has(i)&&(e=ee({rel:"modulepreload",href:e},t),Qt.set(i,e),l.querySelector(a)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(ki(i)))return}n=l.createElement("link"),ft(n,"link",e),tt(n),l.head.appendChild(n)}}}function g2(e,t,l){kl.S(e,t,l);var n=Aa;if(n&&e){var a=Yn(n).hoistableStyles,i=Ca(e);t=t||"default";var s=a.get(i);if(!s){var x={loading:0,preload:null};if(s=n.querySelector(Mi(i)))x.loading=5;else{e=ee({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Qt.get(i))&&Js(e,l);var E=s=n.createElement("link");tt(E),ft(E,"link",e),E._p=new Promise(function(w,R){E.onload=w,E.onerror=R}),E.addEventListener("load",function(){x.loading|=1}),E.addEventListener("error",function(){x.loading|=2}),x.loading|=4,ec(s,t,n)}s={type:"stylesheet",instance:s,count:1,state:x},a.set(i,s)}}}function p2(e,t){kl.X(e,t);var l=Aa;if(l&&e){var n=Yn(l).hoistableScripts,a=Ma(e),i=n.get(a);i||(i=l.querySelector(ki(a)),i||(e=ee({src:e,async:!0},t),(t=Qt.get(a))&&Is(e,t),i=l.createElement("script"),tt(i),ft(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(a,i))}}function v2(e,t){kl.M(e,t);var l=Aa;if(l&&e){var n=Yn(l).hoistableScripts,a=Ma(e),i=n.get(a);i||(i=l.querySelector(ki(a)),i||(e=ee({src:e,async:!0,type:"module"},t),(t=Qt.get(a))&&Is(e,t),i=l.createElement("script"),tt(i),ft(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(a,i))}}function Rx(e,t,l,n){var a=(a=el.current)?Ci(a):null;if(!a)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(l=Ca(l.href),t=Yn(a).hoistableStyles,n=t.get(l),n||(n={type:"style",instance:null,count:0,state:null},t.set(l,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Ca(l.href);var i=Yn(a).hoistableStyles,s=i.get(e);if(s||(a=a.ownerDocument||a,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,s),(i=a.querySelector(Mi(e)))?i._p||(s.instance=i,s.state.loading=5):(i=Qt.get(e),i||(i={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Qt.set(e,i)),b2(a,e,i,s.state))),t&&n===null)throw Error(r(528,""));return s}if(t&&n!==null)throw Error(r(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(l=Ma(l),t=Yn(a).hoistableScripts,n=t.get(l),n||(n={type:"script",instance:null,count:0,state:null},t.set(l,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Ca(e){return'href="'+Rt(e)+'"'}function Mi(e){return'link[rel="stylesheet"]['+e+"]"}function Lx(e){return ee({},e,{"data-precedence":e.precedence,precedence:null})}function b2(e,t,l,n){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[Yi]!==!0){n.loading=1;return}}else t=e.createElement("link"),t[Yi]=!0,t.onload=t.onerror=Ko.bind(null,t),ft(t,"link",l),tt(t),e.head.appendChild(t);n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2})}function Ma(e){return'[src="'+Rt(e)+'"]'}function ki(e){return"script[async]"+e}function Hx(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Rt(l.href)+'"]');if(n)return t.instance=n,tt(n),n;var a=ee({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),tt(n),ft(n,"style",a),ec(n,l.precedence,e),t.instance=n;case"stylesheet":a=Ca(l.href);var i=e.querySelector(Mi(a));if(i)return t.state.loading|=4,t.instance=i,tt(i),i;n=Lx(l),(a=Qt.get(a))&&Js(n,a),i=(e.ownerDocument||e).createElement("link"),tt(i);var s=i;return s._p=new Promise(function(x,E){s.onload=x,s.onerror=E}),ft(i,"link",n),t.state.loading|=4,ec(i,l.precedence,e),t.instance=i;case"script":return i=Ma(l.src),(a=e.querySelector(ki(i)))?(t.instance=a,tt(a),a):(n=l,(a=Qt.get(i))&&(n=ee({},l),Is(n,a)),e=e.ownerDocument||e,a=e.createElement("script"),tt(a),ft(a,"link",n),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,ec(n,l.precedence,e));return t.instance}function ec(e,t,l){for(var n=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=n.length?n[n.length-1]:null,i=a,s=0;s<n.length;s++){var x=n[s];if(x.dataset.precedence===t)i=x;else if(i!==a)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Js(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Is(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var tc=null;function Ux(e,t,l){if(tc===null){var n=new Map,a=tc=new Map;a.set(l,n)}else a=tc,n=a.get(l),n||(n=new Map,a.set(l,n));if(n.has(e))return n;for(n.set(e,null),l=l.getElementsByTagName(e),a=0;a<l.length;a++){var i=l[a];if(!(i[Ga]||i[ut]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var s=i.getAttribute(t)||"";s=e+s;var x=n.get(s);x?x.push(i):n.set(s,[i])}}return n}function Ws(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function y2(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function qx(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function Gx(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Yx(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function Xx(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=Yx(t),e.suspenseyImages.push(t)),e=E2.bind(e),t.decode().then(e,e))}function N2(e,t,l,n){if(l.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var a=Ca(n.href),i=t.querySelector(Mi(a));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Fi.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=i,tt(i);return}i=t.ownerDocument||t,n=Lx(n),(a=Qt.get(a))&&Js(n,a),i=i.createElement("link"),tt(i);var s=i;s._p=new Promise(function(x,E){s.onload=x,s.onerror=E}),ft(i,"link",n),l.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Fi.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var lc=0;function S2(e,t){return e.stylesheets&&e.count===0&&ac(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var n=setTimeout(function(){if(e.stylesheets&&ac(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&lc===0&&(lc=62500*Ug());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ac(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>lc?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(a)}}:null}function Qx(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ac(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function Fi(){this.count--,Qx(this)}function E2(){this.imgCount--,Qx(this)}var nc=null;function ac(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,nc=new Map,t.forEach(A2,e),nc=null,Fi.call(e))}function A2(e,t){if(!(t.state.loading&4)){var l=nc.get(e);if(l)var n=l.get(null);else{l=new Map,nc.set(e,l);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<a.length;i++){var s=a[i];(s.nodeName==="LINK"||s.getAttribute("media")!=="not all")&&(l.set(s.dataset.precedence,s),n=s)}n&&l.set(null,n)}a=t.instance,s=a.getAttribute("data-precedence"),i=l.get(s)||n,i===n&&l.set(null,a),l.set(s,a),this.count++,n=Fi.bind(this),a.addEventListener("load",n),a.addEventListener("error",n),i?i.parentNode.insertBefore(a,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var ka={$$typeof:j,Provider:null,Consumer:null,_currentValue:Oe,_currentValue2:Oe,_threadCount:0};function C2(e,t,l,n,a,i,s,x,E){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Dc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Dc(0),this.hiddenUpdates=Dc(null),this.identifierPrefix=n,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.transitionTypes=null,this.incompleteTransitions=new Map}function Vx(e,t,l,n,a,i,s,x,E,w,R,J){return e=new C2(e,t,l,s,E,w,R,J,x),t=1,i===!0&&(t|=24),i=yt(3,null,null,t),e.current=i,i.stateNode=e,t=dr(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:n,isDehydrated:l,cache:t},gr(i),e}function Zx(e){return e?(e=Pn,e):Pn}function Kx(e,t,l,n,a,i){a=Zx(a),n.context===null?n.context=a:n.pendingContext=a,n=ql(t),n.payload={element:l},i=i===void 0?null:i,i!==null&&(n.callback=i),l=Gl(e,n,t),l!==null&&(At(l,e,t),ii(l,e,t))}function Jx(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function $s(e,t){Jx(e,t),(e=e.alternate)&&Jx(e,t)}function Ix(e){if(e.tag===13||e.tag===31){var t=mn(e,67108864);t!==null&&At(t,e,67108864),$s(e,67108864)}}function Wx(e){if(e.tag===13||e.tag===31){var t=jt();t=Bc(t);var l=mn(e,t);l!==null&&At(l,e,t),$s(e,t)}}var Fa=!0;function M2(e,t,l,n){var a=xe.T;xe.T=null;var i=se.p;try{se.p=2,Ps(e,t,l,n)}finally{se.p=i,xe.T=a}}function k2(e,t,l,n){var a=xe.T;xe.T=null;var i=se.p;try{se.p=8,Ps(e,t,l,n)}finally{se.p=i,xe.T=a}}function Ps(e,t,l,n){if(Fa){var a=eo(n);if(a===null)js(e,t,n,ic,l),Px(e,n);else if(T2(a,e,t,l,n))n.stopPropagation();else if(Px(e,n),t&4&&-1<F2.indexOf(e)){for(;a!==null;){var i=Gn(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var s=on(i.pendingLanes);if(s!==0){var x=i;for(x.pendingLanes|=2,x.entangledLanes|=2;s;){var E=1<<31-kt(s);x.entanglements[1]|=E,s&=~E}fl(i),(Be&6)===0&&(Xu=Ct()+500,Ni(0))}}break;case 31:case 13:x=mn(i,2),x!==null&&At(x,i,2),Zu(),$s(i,2)}if(i=eo(n),i===null&&js(e,t,n,ic,l),i===a)break;a=i}a!==null&&n.stopPropagation()}else js(e,t,n,null,l)}}function eo(e){return e=Hc(e),to(e)}var ic=null;function to(e){if(ic=null,e=fn(e),e!==null){var t=h(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=b(t),e!==null)return e;e=null}else if(l===31){if(e=v(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ic=e,null}function $x(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Uh()){case _o:return 2;case Ro:return 8;case Li:case qh:return 32;case Lo:return 268435456;default:return 32}default:return 32}}var lo=!1,en=null,tn=null,ln=null,Ti=new Map,wi=new Map,nn=[],F2="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Px(e,t){switch(e){case"focusin":case"focusout":en=null;break;case"dragenter":case"dragleave":tn=null;break;case"mouseover":case"mouseout":ln=null;break;case"pointerover":case"pointerout":Ti.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":wi.delete(t.pointerId)}}function Di(e,t,l,n,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:l,eventSystemFlags:n,nativeEvent:i,targetContainers:[a]},t!==null&&(t=Gn(t),t!==null&&Ix(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function T2(e,t,l,n,a){switch(t){case"focusin":return en=Di(en,e,t,l,n,a),!0;case"dragenter":return tn=Di(tn,e,t,l,n,a),!0;case"mouseover":return ln=Di(ln,e,t,l,n,a),!0;case"pointerover":var i=a.pointerId;return Ti.set(i,Di(Ti.get(i)||null,e,t,l,n,a)),!0;case"gotpointercapture":return i=a.pointerId,wi.set(i,Di(wi.get(i)||null,e,t,l,n,a)),!0}return!1}function e1(e){var t=fn(e.target);if(t!==null){var l=h(t);if(l!==null){if(t=l.tag,t===13){if(t=b(l),t!==null){e.blockedOn=t,Qo(e.priority,function(){Wx(l)});return}}else if(t===31){if(t=v(l),t!==null){e.blockedOn=t,Qo(e.priority,function(){Wx(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function uc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=eo(e.nativeEvent);if(l===null){l=e.nativeEvent;var n=new l.constructor(l.type,l);Lc=n,l.target.dispatchEvent(n),Lc=null}else return t=Gn(l),t!==null&&Ix(t),e.blockedOn=l,!1;t.shift()}return!0}function t1(e,t,l){uc(e)&&l.delete(t)}function w2(){lo=!1,en!==null&&uc(en)&&(en=null),tn!==null&&uc(tn)&&(tn=null),ln!==null&&uc(ln)&&(ln=null),Ti.forEach(t1),wi.forEach(t1)}function cc(e,t){e.blockedOn===t&&(e.blockedOn=null,lo||(lo=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,w2)))}var rc=null;function l1(e){rc!==e&&(rc=e,u.unstable_scheduleCallback(u.unstable_NormalPriority,function(){rc===e&&(rc=null);for(var t=0;t<e.length;t+=3){var l=e[t],n=e[t+1],a=e[t+2];if(typeof n!="function"){if(to(n||l)===null)continue;break}var i=Gn(l);i!==null&&(e.splice(t,3),t-=3,Rr(i,{pending:!0,data:a,method:l.method,action:n},n,a))}}))}function Ta(e){function t(E){return cc(E,e)}en!==null&&cc(en,e),tn!==null&&cc(tn,e),ln!==null&&cc(ln,e),Ti.forEach(t),wi.forEach(t);for(var l=0;l<nn.length;l++){var n=nn[l];n.blockedOn===e&&(n.blockedOn=null)}for(;0<nn.length&&(l=nn[0],l.blockedOn===null);)e1(l),l.blockedOn===null&&nn.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(n=0;n<l.length;n+=3){var a=l[n],i=l[n+1],s=a[bt]||null;if(typeof i=="function")s||l1(l);else if(s){var x=null;if(i&&i.hasAttribute("formAction")){if(a=i,s=i[bt]||null)x=s.formAction;else if(to(a)!==null)continue}else x=s.action;typeof x=="function"?l[n+1]=x:(l.splice(n,3),n-=3),l1(l)}}}function n1(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(s){return a=s})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),n||setTimeout(l,20)}function l(){if(!n&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),a!==null&&(a(),a=null)}}}function no(e){this._internalRoot=e}sc.prototype.render=no.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var l=t.current,n=jt();Kx(l,n,e,t,null,null)},sc.prototype.unmount=no.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Kx(e.current,2,null,e,null,null),Zu(),t[qn]=null}};function sc(e){this._internalRoot=e}sc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xo();e={blockedOn:null,target:e,priority:t};for(var l=0;l<nn.length&&t!==0&&t<nn[l].priority;l++);nn.splice(l,0,e),l===0&&e1(e)}};var a1=c.version;if(a1!=="19.3.0")throw Error(r(527,a1,"19.3.0"));se.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=m(t),e=e!==null?p(e):null,e=e===null?null:e.stateNode,e};var D2={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:xe,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var oc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!oc.isDisabled&&oc.supportsFiber)try{Ha=oc.inject(D2),Mt=oc}catch{}}return Oi.createRoot=function(e,t){if(!d(e))throw Error(r(299));var l=!1,n="",a=Z0,i=K0,s=J0;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Vx(e,1,!1,null,null,l,n,null,a,i,s,n1),e[qn]=t.current,Os(e),new no(t)},Oi.hydrateRoot=function(e,t,l){if(!d(e))throw Error(r(299));var n=!1,a="",i=Z0,s=K0,x=J0,E=null;return l!=null&&(l.unstable_strictMode===!0&&(n=!0),l.identifierPrefix!==void 0&&(a=l.identifierPrefix),l.onUncaughtError!==void 0&&(i=l.onUncaughtError),l.onCaughtError!==void 0&&(s=l.onCaughtError),l.onRecoverableError!==void 0&&(x=l.onRecoverableError),l.formState!==void 0&&(E=l.formState)),t=Vx(e,1,!0,t,l??null,n,a,E,i,s,x,n1),t.context=Zx(null),l=t.current,n=jt(),n=Bc(n),a=ql(n),a.callback=null,Gl(l,a,n),l=n,t.current.lanes=l,qa(t,l),fl(t),e[qn]=t.current,Os(e),new sc(t)},Oi.version="19.3.0",Oi}var h1;function G2(){if(h1)return uo.exports;h1=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(c){console.error(c)}}return u(),uo.exports=q2(),uo.exports}var Y2=G2();const X2=z1(Y2);/**
50
- * @license lucide-react v1.55.0 - ISC
51
- *
52
- * This source code is licensed under the ISC license.
53
- * See the LICENSE file in the root directory of this source tree.
54
- */const Q2=u=>u?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
55
- * @license lucide-react v1.55.0 - ISC
56
- *
57
- * This source code is licensed under the ISC license.
58
- * See the LICENSE file in the root directory of this source tree.
59
- */function V2(u,c,o=[]){if(c==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:Q2(u),size:24,node:c,...o.length>0?{aliases:o}:{}}}/**
60
- * @license lucide-react v1.55.0 - ISC
61
- *
62
- * This source code is licensed under the ISC license.
63
- * See the LICENSE file in the root directory of this source tree.
64
- */const Z2=u=>{let c="",o=!1;for(const r of u){if(r==="-"||r==="_"||r<=" "){o=c.length>0;continue}c.length===0?c+=r.toLowerCase():c+=o?r.toUpperCase():r,o=!1}return c};/**
65
- * @license lucide-react v1.55.0 - ISC
66
- *
67
- * This source code is licensed under the ISC license.
68
- * See the LICENSE file in the root directory of this source tree.
69
- */const K2=u=>{const c=Z2(u);return c.charAt(0).toUpperCase()+c.slice(1)};/**
70
- * @license lucide-react v1.55.0 - ISC
71
- *
72
- * This source code is licensed under the ISC license.
73
- * See the LICENSE file in the root directory of this source tree.
74
- */const vo=(...u)=>u.filter((c,o,r)=>!!c&&c.trim()!==""&&r.indexOf(c)===o).join(" ").trim();/**
75
- * @license lucide-react v1.55.0 - ISC
76
- *
77
- * This source code is licensed under the ISC license.
78
- * See the LICENSE file in the root directory of this source tree.
79
- */const On={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
80
- * @license lucide-react v1.55.0 - ISC
81
- *
82
- * This source code is licensed under the ISC license.
83
- * See the LICENSE file in the root directory of this source tree.
84
- */function oo(u){return u!=null}function J2(u,c={}){const o=c.attributeNames??{},r=N=>o[N]??N,d=u.size??u.width??On.width,h=u.size??u.height??On.height,b=u.aliases?.filter(N=>typeof N=="string"&&N.trim()!=="").map(N=>`lucide-${N}`)??[],v=[...u.name?[`lucide-${u.name}`]:[],...b],y=c.className?.split(" ").filter(Boolean)??[],m=c.includeDefaultClasses===!1?vo(...y):vo("lucide",...v,...y),p=c.absoluteStrokeWidth?Number(c.strokeWidth??On["stroke-width"])*Number(u.size??u.width??On.width)/Number(c.size??c.width??On.width):c.strokeWidth??On["stroke-width"];return["svg",{...Object.entries(On).reduce((N,[C,V])=>(N[r(C)]=V,N),{}),..."color"in c&&c.color&&{[r("stroke")]:c.color},..."size"in c&&oo(c.size)&&{[r("width")]:c.size,[r("height")]:c.size},..."width"in c&&oo(c.width)&&{[r("width")]:c.width},..."height"in c&&oo(c.height)&&{[r("height")]:c.height},[r("stroke-width")]:p,...m&&{[r("class")]:m},[r("viewBox")]:`0 0 ${d} ${h}`,...c.hasA11yProp===!1?{[r("aria-hidden")]:"true"}:{},..."attributes"in c&&c.attributes},u.node.map(N=>{const[C,V,W]=N,L=c.nonScalingStroke?{[r("vector-effect")]:"non-scaling-stroke",...V}:V;return W?[C,L,W]:[C,L]})]}/**
85
- * @license lucide-react v1.55.0 - ISC
86
- *
87
- * This source code is licensed under the ISC license.
88
- * See the LICENSE file in the root directory of this source tree.
89
- */function I2(u,c={}){return J2(u,{...c,attributeNames:{...c.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}/**
90
- * @license lucide-react v1.55.0 - ISC
91
- *
92
- * This source code is licensed under the ISC license.
93
- * See the LICENSE file in the root directory of this source tree.
94
- */const W2=u=>{for(const c in u)if(c.startsWith("aria-")||c==="role"||c==="title")return!0;return!1},$2=me.createContext({}),P2=()=>me.useContext($2),ep=me.forwardRef(({color:u,size:c,width:o,height:r,strokeWidth:d,absoluteStrokeWidth:h,nonScalingStroke:b,className:v="",children:y,iconNode:m=[],icon:p={node:m,aliases:[],size:24},...g},N)=>{const{size:C=24,strokeWidth:V=2,absoluteStrokeWidth:W=!1,nonScalingStroke:L=!1,color:U="currentColor",className:te=""}=P2()??{},le=!!y||W2(g),[oe,ce,Z=[]]=I2(p,{color:u??U,width:o??c??C,height:r??c??C,strokeWidth:d??V,absoluteStrokeWidth:h??W,nonScalingStroke:b??L,className:vo(te,v),hasA11yProp:le,attributes:g});return me.createElement(oe,{ref:N,...ce},[...Z.map(([ee,G])=>me.createElement(ee,G)),...Array.isArray(y)?y:[y]])});/**
95
- * @license lucide-react v1.55.0 - ISC
96
- *
97
- * This source code is licensed under the ISC license.
98
- * See the LICENSE file in the root directory of this source tree.
99
- */function Ae(u,c=[],o=[]){const r=typeof u=="string"?V2(u,c,o):u,d=me.forwardRef(({className:h,...b},v)=>me.createElement(ep,{ref:v,icon:r,className:h,...b}));return r.name&&(d.displayName=K2(r.name)),d}/**
100
- * @license lucide-react v1.55.0 - ISC
101
- *
102
- * This source code is licensed under the ISC license.
103
- * See the LICENSE file in the root directory of this source tree.
104
- */const _1={name:"arrow-down",size:24,node:[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]};_1.node;const tp=Ae(_1);/**
105
- * @license lucide-react v1.55.0 - ISC
106
- *
107
- * This source code is licensed under the ISC license.
108
- * See the LICENSE file in the root directory of this source tree.
109
- */const R1={name:"arrow-up-down",size:24,node:[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]};R1.node;const lp=Ae(R1);/**
110
- * @license lucide-react v1.55.0 - ISC
111
- *
112
- * This source code is licensed under the ISC license.
113
- * See the LICENSE file in the root directory of this source tree.
114
- */const L1={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};L1.node;const np=Ae(L1);/**
115
- * @license lucide-react v1.55.0 - ISC
116
- *
117
- * This source code is licensed under the ISC license.
118
- * See the LICENSE file in the root directory of this source tree.
119
- */const H1={name:"bookmark",size:24,node:[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]]};H1.node;const ap=Ae(H1);/**
120
- * @license lucide-react v1.55.0 - ISC
121
- *
122
- * This source code is licensed under the ISC license.
123
- * See the LICENSE file in the root directory of this source tree.
124
- */const U1={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};U1.node;const q1=Ae(U1);/**
125
- * @license lucide-react v1.55.0 - ISC
126
- *
127
- * This source code is licensed under the ISC license.
128
- * See the LICENSE file in the root directory of this source tree.
129
- */const G1={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};G1.node;const ip=Ae(G1);/**
130
- * @license lucide-react v1.55.0 - ISC
131
- *
132
- * This source code is licensed under the ISC license.
133
- * See the LICENSE file in the root directory of this source tree.
134
- */const Y1={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};Y1.node;const up=Ae(Y1);/**
135
- * @license lucide-react v1.55.0 - ISC
136
- *
137
- * This source code is licensed under the ISC license.
138
- * See the LICENSE file in the root directory of this source tree.
139
- */const X1={name:"folder-open",size:24,node:[["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"}]]};X1.node;const cp=Ae(X1);/**
140
- * @license lucide-react v1.55.0 - ISC
141
- *
142
- * This source code is licensed under the ISC license.
143
- * See the LICENSE file in the root directory of this source tree.
144
- */const Q1={name:"folder-plus",size:24,node:[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};Q1.node;const rp=Ae(Q1);/**
145
- * @license lucide-react v1.55.0 - ISC
146
- *
147
- * This source code is licensed under the ISC license.
148
- * See the LICENSE file in the root directory of this source tree.
149
- */const V1={name:"heading-2",size:24,node:[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}]]};V1.node;const sp=Ae(V1);/**
150
- * @license lucide-react v1.55.0 - ISC
151
- *
152
- * This source code is licensed under the ISC license.
153
- * See the LICENSE file in the root directory of this source tree.
154
- */const Z1={name:"heading-1",size:24,node:[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"m17 12 3-2v8",key:"1hhhft"}]]};Z1.node;const op=Ae(Z1);/**
155
- * @license lucide-react v1.55.0 - ISC
156
- *
157
- * This source code is licensed under the ISC license.
158
- * See the LICENSE file in the root directory of this source tree.
159
- */const K1={name:"highlighter",size:24,node:[["path",{d:"m9 11-6 6v3h9l3-3",key:"1a3l36"}],["path",{d:"m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4",key:"14a9rk"}]]};K1.node;const fp=Ae(K1);/**
160
- * @license lucide-react v1.55.0 - ISC
161
- *
162
- * This source code is licensed under the ISC license.
163
- * See the LICENSE file in the root directory of this source tree.
164
- */const J1={name:"image",size:24,node:[["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"}]]};J1.node;const dp=Ae(J1);/**
165
- * @license lucide-react v1.55.0 - ISC
166
- *
167
- * This source code is licensed under the ISC license.
168
- * See the LICENSE file in the root directory of this source tree.
169
- */const I1={name:"key",size:24,node:[["path",{d:"m2 21 9.6-9.6",key:"9l79m3"}],["path",{d:"m7.5 15.5 2.3 2.3a1 1 0 0 1 0 1.4l-2.1 2.1a1 1 0 0 1-1.4 0L4 19",key:"fw8biw"}],["circle",{cx:"15.5",cy:"7.5",r:"5.5",key:"4wxmhb"}]]};I1.node;const W1=Ae(I1);/**
170
- * @license lucide-react v1.55.0 - ISC
171
- *
172
- * This source code is licensed under the ISC license.
173
- * See the LICENSE file in the root directory of this source tree.
174
- */const $1={name:"layers",size:24,node:[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],aliases:["layers-3"]};$1.node;const xp=Ae($1);/**
175
- * @license lucide-react v1.55.0 - ISC
176
- *
177
- * This source code is licensed under the ISC license.
178
- * See the LICENSE file in the root directory of this source tree.
179
- */const P1={name:"layout-grid",size:24,node:[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]};P1.node;const hp=Ae(P1);/**
180
- * @license lucide-react v1.55.0 - ISC
181
- *
182
- * This source code is licensed under the ISC license.
183
- * See the LICENSE file in the root directory of this source tree.
184
- */const eh={name:"maximize-2",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]};eh.node;const mp=Ae(eh);/**
185
- * @license lucide-react v1.55.0 - ISC
186
- *
187
- * This source code is licensed under the ISC license.
188
- * See the LICENSE file in the root directory of this source tree.
189
- */const th={name:"moon",size:24,node:[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]};th.node;const gp=Ae(th);/**
190
- * @license lucide-react v1.55.0 - ISC
191
- *
192
- * This source code is licensed under the ISC license.
193
- * See the LICENSE file in the root directory of this source tree.
194
- */const lh={name:"palette",size:24,node:[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]]};lh.node;const pp=Ae(lh);/**
195
- * @license lucide-react v1.55.0 - ISC
196
- *
197
- * This source code is licensed under the ISC license.
198
- * See the LICENSE file in the root directory of this source tree.
199
- */const nh={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};nh.node;const vp=Ae(nh);/**
200
- * @license lucide-react v1.55.0 - ISC
201
- *
202
- * This source code is licensed under the ISC license.
203
- * See the LICENSE file in the root directory of this source tree.
204
- */const ah={name:"refresh-cw",size:24,node:[["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"}]]};ah.node;const ih=Ae(ah);/**
205
- * @license lucide-react v1.55.0 - ISC
206
- *
207
- * This source code is licensed under the ISC license.
208
- * See the LICENSE file in the root directory of this source tree.
209
- */const uh={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};uh.node;const bp=Ae(uh);/**
210
- * @license lucide-react v1.55.0 - ISC
211
- *
212
- * This source code is licensed under the ISC license.
213
- * See the LICENSE file in the root directory of this source tree.
214
- */const ch={name:"rows-2",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 12h18",key:"1i2n21"}]],aliases:["rows"]};ch.node;const yp=Ae(ch);/**
215
- * @license lucide-react v1.55.0 - ISC
216
- *
217
- * This source code is licensed under the ISC license.
218
- * See the LICENSE file in the root directory of this source tree.
219
- */const rh={name:"shield-check",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]};rh.node;const Np=Ae(rh);/**
220
- * @license lucide-react v1.55.0 - ISC
221
- *
222
- * This source code is licensed under the ISC license.
223
- * See the LICENSE file in the root directory of this source tree.
224
- */const sh={name:"shield",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]};sh.node;const Sp=Ae(sh);/**
225
- * @license lucide-react v1.55.0 - ISC
226
- *
227
- * This source code is licensed under the ISC license.
228
- * See the LICENSE file in the root directory of this source tree.
229
- */const oh={name:"sliders-vertical",size:24,node:[["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M12 21v-9",key:"17s77i"}],["path",{d:"M12 8V3",key:"13r4qs"}],["path",{d:"M17 16h4",key:"h1uq16"}],["path",{d:"M19 12V3",key:"o1uvq1"}],["path",{d:"M19 21v-5",key:"qua636"}],["path",{d:"M3 14h4",key:"bcjad9"}],["path",{d:"M5 10V3",key:"cb8scm"}],["path",{d:"M5 21v-7",key:"1w1uti"}]],aliases:["sliders"]};oh.node;const Ep=Ae(oh);/**
230
- * @license lucide-react v1.55.0 - ISC
231
- *
232
- * This source code is licensed under the ISC license.
233
- * See the LICENSE file in the root directory of this source tree.
234
- */const fh={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};fh.node;const bo=Ae(fh);/**
235
- * @license lucide-react v1.55.0 - ISC
236
- *
237
- * This source code is licensed under the ISC license.
238
- * See the LICENSE file in the root directory of this source tree.
239
- */const dh={name:"star",size:24,node:[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]};dh.node;const fo=Ae(dh);/**
240
- * @license lucide-react v1.55.0 - ISC
241
- *
242
- * This source code is licensed under the ISC license.
243
- * See the LICENSE file in the root directory of this source tree.
244
- */const xh={name:"sun",size:24,node:[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]};xh.node;const Ap=Ae(xh);/**
245
- * @license lucide-react v1.55.0 - ISC
246
- *
247
- * This source code is licensed under the ISC license.
248
- * See the LICENSE file in the root directory of this source tree.
249
- */const hh={name:"text-align-end",size:24,node:[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 19H7",key:"4cu937"}]],aliases:["align-right"]};hh.node;const Cp=Ae(hh);/**
250
- * @license lucide-react v1.55.0 - ISC
251
- *
252
- * This source code is licensed under the ISC license.
253
- * See the LICENSE file in the root directory of this source tree.
254
- */const mh={name:"text-align-center",size:24,node:[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 19H5",key:"vjpgq2"}]],aliases:["align-center"]};mh.node;const Mp=Ae(mh);/**
255
- * @license lucide-react v1.55.0 - ISC
256
- *
257
- * This source code is licensed under the ISC license.
258
- * See the LICENSE file in the root directory of this source tree.
259
- */const gh={name:"text-align-start",size:24,node:[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],aliases:["text","align-left"]};gh.node;const kp=Ae(gh);/**
260
- * @license lucide-react v1.55.0 - ISC
261
- *
262
- * This source code is licensed under the ISC license.
263
- * See the LICENSE file in the root directory of this source tree.
264
- */const ph={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};ph.node;const vh=Ae(ph);/**
265
- * @license lucide-react v1.55.0 - ISC
266
- *
267
- * This source code is licensed under the ISC license.
268
- * See the LICENSE file in the root directory of this source tree.
269
- */const bh={name:"type",size:24,node:[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]]};bh.node;const Fp=Ae(bh);/**
270
- * @license lucide-react v1.55.0 - ISC
271
- *
272
- * This source code is licensed under the ISC license.
273
- * See the LICENSE file in the root directory of this source tree.
274
- */const yh={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};yh.node;const Tp=Ae(yh);/**
275
- * @license lucide-react v1.55.0 - ISC
276
- *
277
- * This source code is licensed under the ISC license.
278
- * See the LICENSE file in the root directory of this source tree.
279
- */const Nh={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};Nh.node;const Sh=Ae(Nh);/**
280
- * @license lucide-react v1.55.0 - ISC
281
- *
282
- * This source code is licensed under the ISC license.
283
- * See the LICENSE file in the root directory of this source tree.
284
- */const Eh={name:"zoom-in",size:24,node:[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]};Eh.node;const Ah=Ae(Eh);/**
285
- * @license lucide-react v1.55.0 - ISC
286
- *
287
- * This source code is licensed under the ISC license.
288
- * See the LICENSE file in the root directory of this source tree.
289
- */const Ch={name:"zoom-out",size:24,node:[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]};Ch.node;const wp=Ae(Ch),Dp=({isOpen:u,onClose:c,currentKey:o,onSaveKey:r,isVerified:d})=>{const[h,b]=me.useState(o),[v,y]=me.useState(null);if(!u)return null;const m=()=>{r(h.trim()),y("密钥已更新并保存至本地存储"),setTimeout(()=>{c()},800)};return f.jsx("div",{className:"fixed inset-0 z-50 bg-black/50 dark:bg-black/70 backdrop-blur-sm flex items-center justify-center p-4",children:f.jsxs("div",{className:"bg-white dark:bg-[#0f0f0f] border border-[#eaeaea] dark:border-[#262626] rounded-xl w-full max-w-md flex flex-col shadow-2xl overflow-hidden animate-in fade-in zoom-in-95 duration-150 transition-colors",children:[f.jsxs("div",{className:"flex items-center justify-between px-5 py-3.5 border-b border-[#eaeaea] dark:border-[#222222]",children:[f.jsxs("div",{className:"flex items-center gap-2 font-semibold text-sm text-[#171717] dark:text-white",children:[f.jsx(W1,{className:"w-4 h-4 text-amber-500 dark:text-amber-400"}),f.jsx("span",{children:"超管密钥授权"})]}),f.jsx("button",{onClick:c,className:"text-[#888888] hover:text-black dark:hover:text-white p-1 rounded-md hover:bg-[#f5f5f5] dark:hover:bg-[#1a1a1a]",children:f.jsx(Sh,{className:"w-4 h-4"})})]}),f.jsxs("div",{className:"p-5 flex flex-col gap-4",children:[f.jsxs("div",{className:"text-xs text-[#666666] dark:text-[#888888] leading-relaxed",children:["服务端默认通过 ",f.jsx("code",{className:"text-black dark:text-[#ededed] font-mono font-semibold",children:"TYPESET_ADMIN_KEY"})," 保护模板持久化、图片上传和无头出图 API。请填入服务启动时控制台打印的管理员密钥。"]}),f.jsxs("div",{className:"flex flex-col gap-1.5",children:[f.jsx("label",{className:"text-[11px] font-mono text-[#888888] dark:text-[#666666]",children:"X-Admin-Key"}),f.jsx("input",{type:"password",value:h,onChange:p=>b(p.target.value),placeholder:"tsk_...",className:"bg-[#fafafa] dark:bg-[#0a0a0a] border border-[#d4d4d4] dark:border-[#2a2a2a] rounded-lg px-3 py-2 text-xs font-mono text-black dark:text-white focus:outline-none focus:border-black dark:focus:border-[#444444]"})]}),v?f.jsxs("div",{className:"text-xs text-emerald-700 dark:text-emerald-400 bg-emerald-50 dark:bg-emerald-500/10 border border-emerald-200 dark:border-emerald-500/20 px-3 py-2 rounded-lg flex items-center gap-2 font-medium",children:[f.jsx(q1,{className:"w-3.5 h-3.5"}),f.jsx("span",{children:v})]}):d?f.jsxs("div",{className:"text-xs text-emerald-700 dark:text-emerald-400 bg-emerald-50 dark:bg-emerald-500/10 border border-emerald-200 dark:border-emerald-500/20 px-3 py-2 rounded-lg flex items-center gap-2 font-medium",children:[f.jsx(Np,{className:"w-3.5 h-3.5"}),f.jsx("span",{children:"密钥已通过验证,拥有超管权限"})]}):f.jsx("div",{className:"text-xs text-amber-700 dark:text-amber-400 bg-amber-50 dark:bg-amber-500/10 border border-amber-200 dark:border-amber-500/20 px-3 py-2 rounded-lg",children:"当前密钥未验证或已失效,请检查后端 .env 配置"}),f.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[f.jsx("button",{onClick:c,className:"px-3 py-1.5 rounded-lg border border-[#eaeaea] dark:border-[#262626] text-xs text-[#666666] dark:text-[#888888] hover:text-black dark:hover:text-white hover:bg-[#f5f5f5] dark:hover:bg-[#161616]",children:"取消"}),f.jsx("button",{onClick:m,className:"px-4 py-1.5 bg-black text-white hover:bg-[#262626] dark:bg-white dark:text-black dark:hover:bg-[#eaeaea] text-xs font-semibold rounded-lg transition-all btn-vercel",children:"保存并授权"})]})]})]})})},m1={"wechat-cover-2.35":{id:"wechat-cover-2.35",name:"微信文章封面",ratio:2.35,width:2350,height:1e3,description:"微信公众号官方推荐大图封面 (2.35:1),适合主标题视觉张力、副标题与装饰图层",defaultSafeArea:{top:120,right:140,bottom:120,left:140}},"longform-3-4":{id:"longform-3-4",name:"通用长图文",ratio:3/4,width:1080,height:1440,description:"3:4 手机端阅读长文/图文卡片,支持多页分页、矩形图片绕排、目标填充率优化",defaultSafeArea:{top:96,right:88,bottom:96,left:88}},"wide-16-9":{id:"wide-16-9",name:"通用宽屏",ratio:16/9,width:1920,height:1080,description:"16:9 横版宽屏,适合推特/X 动态配图、技术博客 Banner、视频封面与分栏排版",defaultSafeArea:{top:100,right:120,bottom:100,left:120}},"square-1-1":{id:"square-1-1",name:"通用正方形",ratio:1,width:1200,height:1200,description:"1:1 正方形卡片,适合金句名言卡、公众号次条、小红书方图与社交媒体方版海报",defaultSafeArea:{top:100,right:100,bottom:100,left:100}}};function Fl(u){return m1[u]??m1["longform-3-4"]}function jn(u,c,o=20){const r=Math.max(100,u.width-c.left-c.right),d=Math.max(100,u.height-c.top-c.bottom-o);return{stageWidth:r,stageHeight:d,stageX:c.left,stageY:c.top}}function Bp(u,c=!1){const r=((u||"").split(",")[0]||"").replace(/["'\\]/g,"").trim();return r.includes("Noto Sans")?c?'"Hiragino Sans GB", sans-serif':'"Noto Sans SC", "PingFang SC", sans-serif':r.includes("PingFang")?c?'"Hiragino Sans GB", sans-serif':'"PingFang SC", "Noto Sans SC", sans-serif':r.includes("Noto Serif")?c?'"Songti SC", serif':'"Noto Serif SC", "Songti SC", serif':r.includes("Songti")||r==="STSong"?c?'"Songti SC", serif':'"Songti SC", "Noto Serif SC", serif':r.includes("Kai")||r.includes("WenKai")?c?'"STKaiti", "Kaiti SC", "Songti SC", serif':'"LXGW WenKai GB Screen", "LXGW WenKai Screen", "Kaiti SC", "STKaiti", serif':r.includes("Yuan")?c?'"STYuanti", "Yuanti SC", "Hiragino Sans GB", sans-serif':'"Yuanti SC", "STYuanti", "PingFang SC", sans-serif':r.includes("Inter")?c?'Inter, "Hiragino Sans GB", sans-serif':'Inter, "PingFang SC", sans-serif':r.includes("Georgia")?'Georgia, "Songti SC", serif':r.toLowerCase().includes("serif")||r.includes("Song")?`"${r}", "Songti SC", serif`:c?`"${r}", "Hiragino Sans GB", "PingFang SC", sans-serif`:`"${r}", "PingFang SC", sans-serif`}function wa(u,c=!1){if(!u)return'16px "PingFang SC", sans-serif';const o=u.match(/^(.*?)([\d.]+(?:px|pt|em|rem))\s+(.+)$/);if(!o)return u;const r=o[1],d=o[2],h=o[3];return`${r}${d} ${Bp(h,c)}`}async function Op(u,c){const{page:o,spec:r,config:d,totalPageCount:h=1,getImage:b,isServer:v=!1}=c,{algorithm:y,theme:m,chrome:p}=d;u.save(),u.fillStyle=m.bgColor,u.fillRect(0,0,r.width,r.height),u.restore();const g=d.coverTheme,N=async G=>{if(!G)return;const A=await b(G.src);if(!A)throw new Error("Failed to load cover theme image");const X=G.fit==="contain"?Math.min(r.width/A.width,r.height/A.height):Math.max(r.width/A.width,r.height/A.height),D=G.fit==="fill"?r.width:A.width*X,$=G.fit==="fill"?r.height:A.height*X;u.save(),u.globalAlpha=G.opacity,u.drawImage(A,(r.width-D)*G.position.x/100,(r.height-$)*G.position.y/100,D,$),u.restore()};if(g){const G=g.background.fill;if(u.save(),G.type==="solid")u.fillStyle=G.color;else{let D;if(G.type==="linear"){const $=G.angle*Math.PI/180,Y=Math.cos($)*r.width/2,ae=Math.sin($)*r.height/2;D=u.createLinearGradient(r.width/2-Y,r.height/2-ae,r.width/2+Y,r.height/2+ae)}else{const $=r.width*G.position.x/100,Y=r.height*G.position.y/100;D=u.createRadialGradient($,Y,0,$,Y,Math.hypot(r.width,r.height))}for(const $ of G.stops)D.addColorStop($.offset/100,$.color);u.fillStyle=D}u.fillRect(0,0,r.width,r.height),u.restore(),await N(g.background.image),g.background.overlay&&(u.save(),u.fillStyle=g.background.overlay.color,u.globalAlpha=g.background.overlay.opacity,u.fillRect(0,0,r.width,r.height),u.restore());const A=g.decoration;u.save(),u.strokeStyle=u.fillStyle=A.color,u.globalAlpha=A.opacity;const X=Math.max(8,A.size);if(u.beginPath(),["lines","grid","dots"].includes(A.pattern)){for(let D=0;D<r.width;D+=X)if(A.pattern==="grid"&&(u.moveTo(D,0),u.lineTo(D,r.height)),A.pattern==="dots")for(let $=0;$<r.height;$+=X)u.moveTo(D+2,$),u.arc(D,$,2,0,Math.PI*2);if(A.pattern!=="dots")for(let D=0;D<r.height;D+=X)u.moveTo(0,D),u.lineTo(r.width,D)}else if(A.pattern==="rings")for(let D=X;D<Math.hypot(r.width,r.height);D+=X)u.moveTo(r.width/2+D,r.height/2),u.arc(r.width/2,r.height/2,D,0,Math.PI*2);else if(A.pattern==="burst")for(let D=0;D<Math.PI*2;D+=Math.PI/Math.max(8,Math.round(X/3)))u.moveTo(r.width/2,r.height/2),u.lineTo(r.width/2+Math.cos(D)*r.width,r.height/2+Math.sin(D)*r.height);A.pattern==="dots"?u.fill():u.stroke(),u.restore(),await N(A.image)}const{stageX:C,stageY:V}=jn(r,y.safeArea,y.contentBottomGap),W=d.aspectRatio==="wechat-cover-2.35",L=p?.showHeader??!W,U=(p?.showWatermark??!W)&&!!d.watermarkText?.trim(),te=(p?.showPageNumber??(!W&&h>1))&&h>1;if(L&&(U||te)){const G=Math.max(24,Math.floor(y.safeArea.top*.45));if(U&&(u.save(),u.font=wa("600 14px PingFang SC",v),u.fillStyle=m.watermarkColor,u.globalAlpha=.45,u.textBaseline="middle",u.textAlign="left",u.fillText(d.watermarkText.toUpperCase(),y.safeArea.left,G),u.restore()),te){u.save();const A=`P.${String(o.pageNumber).padStart(2,"0")}`;u.font='500 12px "SF Mono", Monaco, Menlo, Consolas, monospace',u.textBaseline="middle",u.textAlign="left";const D=u.measureText(A).width+16,$=24,Y=r.width-y.safeArea.right-D,ae=G-$/2;u.strokeStyle=m.textColor,u.globalAlpha=.4,u.lineWidth=1,u.beginPath(),u.roundRect(Y,ae,D,$,12),u.stroke(),u.fillStyle=m.textColor,u.fillText(A,Y+8,G),u.restore()}}const le=[...o.images||[]].sort((G,A)=>{const X=G.zIndex??(G.isAbsolute?20:5),D=A.zIndex??(A.isAbsolute?20:5);return X-D}),oe=async G=>{for(const A of G){let X;try{X=await b(A.src)}catch(O){throw A.templateAssetKey?new Error(`模板素材 ${A.templateAssetKey} 加载失败:${O instanceof Error?O.message:String(O)}`):O}if(!X&&A.templateAssetKey)throw new Error(`模板素材 ${A.templateAssetKey} 加载失败:图片不存在或无法读取`);const D=C+A.x,$=V+A.y,Y=D+A.width/2,ae=$+A.height/2;u.save(),u.translate(Y,ae),A.rotate&&u.rotate(A.rotate*Math.PI/180),u.globalAlpha=A.opacity??1;const j=A.width,B=A.height,k=Math.min(A.borderRadius??12,j/2,B/2);if(u.beginPath(),u.roundRect(-j/2,-B/2,j,B,k),u.clip(),X?u.drawImage(X,-j/2,-B/2,j,B):(u.fillStyle=m.cardBg||"#222222",u.fillRect(-j/2,-B/2,j,B)),u.restore(),A.caption?.trim()){u.save();const O=Math.max(14,Math.round(y.baseFontSize*.45));u.font=wa(`400 ${O}px PingFang SC`,v),u.fillStyle=m.captionColor,u.textBaseline="top",u.textAlign="center",u.fillText(A.caption,Y,$+B+12),u.restore()}}};await oe(le.filter(G=>(G.zIndex??(G.isAbsolute?20:5))<10));for(const G of o.lines){const A=C+G.x,X=V+G.y;if(G.className==="body-quote"){u.save(),u.fillStyle=m.accentColor,u.globalAlpha=.85,u.beginPath();const $=Math.max(1,G.lineHeight-8);typeof u.roundRect=="function"?u.roundRect(C,X+4,3.5,$,2):u.rect(C,X+4,3.5,$),u.fill(),u.restore()}if(G.bullet&&G.bulletX!==void 0){if(u.save(),u.fillStyle=m.accentColor,G.bullet==="•"){const $=Math.max(3,Math.round(y.baseFontSize*.08)),Y=C+G.bulletX+8,ae=X+Math.round(G.lineHeight*.42);u.beginPath(),u.arc(Y,ae,$,0,Math.PI*2),u.fill()}else u.font=wa(G.font,v),u.textBaseline="top",u.textAlign="left",u.fillText(G.bullet,C+G.bulletX,X);u.restore()}let D=A;for(const $ of G.fragments){const Y=$.font||G.font,ae=wa(Y,v);u.font=ae,u.textBaseline="top",u.textAlign="left",$.highlight?u.fillStyle=m.accentColor:G.className.includes("heading")?u.fillStyle=m.headingColor||m.textColor:G.className.includes("quote")?u.fillStyle=m.quoteColor||m.textColor:u.fillStyle=m.textColor,u.letterSpacing=`${$.letterSpacing||0}px`,u.fillText($.text,D,X);const j=$.letterSpacing?$.occupiedWidth:u.measureText($.text).width;D+=j+($.gapBefore||0)}}await oe(le.filter(G=>(G.zIndex??(G.isAbsolute?20:5))>=10)),u.letterSpacing="0px";const ce=p?.showFooter??!W,Z=p?.showFooterDivider??(!W&&!!d.footerText?.trim()),ee=(p?.showFooterText??!W)&&!!d.footerText?.trim();if(ce){const G=r.height-Math.max(24,Math.floor(y.safeArea.bottom*.45));if(Z&&(u.save(),u.strokeStyle=m.borderSubtle||"#e5e5e5",u.lineWidth=1,u.beginPath(),u.moveTo(y.safeArea.left,G-14),u.lineTo(r.width-y.safeArea.right,G-14),u.stroke(),u.restore()),p?.showFillRatio&&(u.save(),u.font=wa("500 13px PingFang SC",v),u.fillStyle=m.captionColor,u.textBaseline="middle",u.textAlign="right",u.fillText(`填充率 ${Math.round(o.fillRatio*100)}%`,r.width-y.safeArea.right,G),u.restore()),ee){u.save();const A=g?.typography.footer;u.font=wa(A?`${A.fontWeight} ${A.fontSize}px "${A.fontFamily}"`:"500 13px PingFang SC",v),u.letterSpacing=`${A?.letterSpacing||0}px`,u.fillStyle=m.watermarkColor||m.captionColor,u.globalAlpha=.6,u.textBaseline="middle",u.textAlign="left",u.fillText(d.footerText,y.safeArea.left,G),u.restore()}}}const jp=({page:u,spec:c,config:o,totalPageCount:r,zoom:d})=>{const h=me.useRef(null),[b,v]=me.useState(null);return me.useEffect(()=>{const y=h.current;if(!y)return;const m=y.getContext("2d");if(!m)return;y.dataset.renderState="loading",v(null);let p=!1;const g=new AbortController,N=V=>V?new Promise(W=>{const L=new Image;let U;const te=oe=>{g.signal.removeEventListener("abort",le),L.onload=L.onerror=null,U&&(U.onload=U.onerror=null),W(oe)},le=()=>te(null);if(g.signal.aborted){te(null);return}g.signal.addEventListener("abort",le,{once:!0}),L.crossOrigin="anonymous",L.onload=()=>te(L),L.onerror=()=>{U=new Image,U.onload=()=>te(U),U.onerror=()=>te(null),U.src=V},L.src=V}):Promise.resolve(null);return(async()=>{const V=document.createElement("canvas");V.width=c.width,V.height=c.height;const W=V.getContext("2d");W&&(await Op(W,{page:u,spec:c,config:o,totalPageCount:r,getImage:N,isServer:!1}),p||(m.clearRect(0,0,c.width,c.height),m.drawImage(V,0,0),y.dataset.renderState="ready"))})().catch(V=>{p||(y.dataset.renderState="error",m.clearRect(0,0,c.width,c.height),v(V instanceof Error?V.message:"画布绘制失败"))}),()=>{p=!0,g.abort()}},[u,c,o,r]),f.jsxs(f.Fragment,{children:[f.jsx("canvas",{id:`typeset-page-${u.pageNumber}`,ref:h,width:c.width,height:c.height,className:"typeset-page absolute top-0 left-0 border border-[#e0e0e0] dark:border-[#222222] shadow-sm select-none",style:{width:c.width*d,height:c.height*d,backgroundColor:o.theme.bgColor}}),b&&f.jsx("div",{role:"alert",className:"absolute inset-0 flex items-center justify-center bg-white/90 p-4 text-sm text-red-600",children:b})]})},zp=({result:u,zoom:c,viewportRef:o,onAutoFit:r,isAutoFit:d,viewMode:h="grid",onToggleViewMode:b,onFocusPage:v})=>{const{pages:y,canvasSpec:m,config:p}=u;return f.jsxs("main",{ref:o,className:"flex-1 min-w-0 overflow-auto bg-[#f5f5f5] dark:bg-[#050505] bg-grid flex flex-col p-6 select-none relative transition-colors",children:[f.jsxs("div",{className:"sticky top-0 z-20 self-center mb-6 px-3.5 py-1.5 rounded-full bg-white/90 dark:bg-[#111111]/90 backdrop-blur border border-[#eaeaea] dark:border-[#222222] text-[11px] font-mono text-[#666666] dark:text-[#888888] flex items-center gap-2.5 shadow-sm",children:[f.jsx("span",{className:"text-[#171717] dark:text-white font-semibold",children:m.name}),f.jsx("span",{children:"•"}),f.jsxs("span",{children:[m.width," × ",m.height,"px"]}),f.jsx("span",{children:"•"}),f.jsxs("span",{className:"text-black dark:text-white font-medium",children:[y.length," 张图片"]}),y.length>1&&b&&f.jsxs(f.Fragment,{children:[f.jsx("span",{children:"•"}),f.jsxs("div",{className:"flex items-center bg-[#eaeaea] dark:bg-[#1a1a1a] rounded-md p-0.5 border border-[#dfdfdf] dark:border-[#262626]",children:[f.jsxs("button",{onClick:()=>b("grid"),className:`flex items-center gap-1 px-2 py-0.5 rounded text-[10px] font-medium transition-all ${h==="grid"?"bg-white dark:bg-[#2b2b2b] text-black dark:text-white shadow-xs font-semibold":"text-[#666666] dark:text-[#888888] hover:text-black dark:hover:text-white"}`,title:"多图瀑布流平铺全览",children:[f.jsx(hp,{className:"w-3 h-3"}),f.jsx("span",{children:"多图平铺"})]}),f.jsxs("button",{onClick:()=>b("stack"),className:`flex items-center gap-1 px-2 py-0.5 rounded text-[10px] font-medium transition-all ${h==="stack"?"bg-white dark:bg-[#2b2b2b] text-black dark:text-white shadow-xs font-semibold":"text-[#666666] dark:text-[#888888] hover:text-black dark:hover:text-white"}`,title:"单列纵向逐页滚动",children:[f.jsx(yp,{className:"w-3 h-3"}),f.jsx("span",{children:"纵向单列"})]})]})]}),r&&f.jsxs(f.Fragment,{children:[f.jsx("span",{children:"•"}),f.jsx("button",{onClick:r,className:`hover:text-black dark:hover:text-white transition-colors underline underline-offset-2 ${d?"text-emerald-600 dark:text-emerald-400 font-semibold":""}`,title:y.length>1?"缩放至视口内完整排列多张图片":"自适应画布比例",children:d?y.length>1?"已平铺适配":"已自适应":y.length>1?"平铺适配":"自适应"})]})]}),f.jsx("div",{className:"min-w-fit w-full flex-1 flex flex-col items-center justify-start pb-32",children:f.jsx("div",{className:`flex items-start justify-center gap-7 transition-all duration-300 ${h==="grid"?"flex-wrap max-w-full":"flex-col items-center"}`,children:y.map(g=>f.jsxs("div",{className:"flex flex-col items-center",children:[y.length>1&&f.jsxs("div",{className:"mb-2 px-2.5 py-1 rounded-md bg-white/90 dark:bg-[#181818]/90 border border-[#eaeaea] dark:border-[#262626] text-[11px] font-mono text-[#666666] dark:text-[#888888] shadow-xs flex items-center justify-between transition-colors",style:{width:m.width*c},children:[f.jsxs("div",{className:"flex items-center gap-1.5 truncate",children:[f.jsxs("span",{className:"font-semibold text-[#171717] dark:text-white",children:["第 ",g.pageNumber," / ",y.length," 页"]}),f.jsx("span",{children:"•"}),f.jsx("span",{className:"truncate",children:m.name})]}),v&&f.jsxs("button",{onClick:N=>{N.stopPropagation(),v(g.pageNumber)},className:"shrink-0 text-[10px] px-1.5 py-0.5 rounded bg-[#f5f5f5] dark:bg-[#242424] hover:bg-[#eaeaea] dark:hover:bg-[#333333] text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 font-medium transition-colors flex items-center gap-1 cursor-pointer",title:"放大聚焦此页",children:[f.jsx(Ah,{className:"w-2.5 h-2.5"}),f.jsx("span",{children:"聚焦单图"})]})]}),f.jsx("div",{onDoubleClick:()=>v?.(g.pageNumber),className:"relative shrink-0 shadow-xl dark:shadow-2xl rounded-sm transition-shadow hover:shadow-2xl cursor-pointer",title:y.length>1?"双击放大聚焦此页":void 0,style:{width:m.width*c,height:m.height*c},children:f.jsx(jp,{page:g,spec:m,config:p,totalPageCount:y.length,zoom:c})})]},g.pageNumber))})})]})},_p=({markdown:u,onMarkdownChange:c,images:o,onAddImage:r,onToggleBackground:d,onResetImageLayout:h,backgroundImageIds:b,onUpdateImage:v,onRemoveImage:y,onMoveImage:m,pageCount:p=1,highlightWords:g,onHighlightWordsChange:N,adminKey:C})=>{const[V,W]=me.useState("text"),[L,U]=me.useState(""),te=me.useRef(null),[le,oe]=me.useState(!1),ce=A=>{c(u?`${u}
290
-
291
- ${A}`:A)},Z=async A=>{const X=A.target.files?.[0];if(!X)return;const D=Y=>r({src:Y,alt:X.name,caption:"",x:40,y:400,width:440,height:300,captionHeight:36,layoutPreset:"auto"}),$=()=>{const Y=new FileReader;Y.onload=()=>{typeof Y.result=="string"&&D(Y.result)},Y.readAsDataURL(X)};oe(!0);try{const Y=new FormData;Y.append("file",X);const j=await(await fetch("/api/upload",{method:"POST",headers:C?{"x-admin-key":C}:{},body:Y})).json();j.ok&&j.url?D(j.url):$()}catch{$()}finally{oe(!1),te.current&&(te.current.value="")}},ee=()=>{L.trim()&&(g.includes(L.trim())||N([...g,L.trim()]),U(""))},G=A=>{N(g.filter(X=>X!==A))};return f.jsxs("aside",{className:"w-80 border-r border-[#eaeaea] dark:border-[#222222] bg-white dark:bg-[#0a0a0a] flex flex-col shrink-0 select-none transition-colors",children:[f.jsxs("div",{className:"flex border-b border-[#eaeaea] dark:border-[#222222] bg-[#f9f9f9] dark:bg-[#050505] p-1 gap-1",children:[f.jsxs("button",{onClick:()=>W("text"),className:`flex-1 flex items-center justify-center gap-1.5 py-1.5 text-xs rounded font-medium transition-all ${V==="text"?"bg-white dark:bg-[#1f1f1f] text-black dark:text-white shadow-sm font-semibold":"text-[#666666] dark:text-[#888888] hover:text-black dark:hover:text-[#cccccc]"}`,children:[f.jsx(up,{className:"w-3.5 h-3.5"}),f.jsx("span",{children:"正文"})]}),f.jsxs("button",{onClick:()=>W("images"),className:`flex-1 flex items-center justify-center gap-1.5 py-1.5 text-xs rounded font-medium transition-all ${V==="images"?"bg-white dark:bg-[#1f1f1f] text-black dark:text-white shadow-sm font-semibold":"text-[#666666] dark:text-[#888888] hover:text-black dark:hover:text-[#cccccc]"}`,children:[f.jsx(dp,{className:"w-3.5 h-3.5"}),f.jsxs("span",{children:["配图 (",o.length,")"]})]}),f.jsxs("button",{onClick:()=>W("highlights"),className:`flex-1 flex items-center justify-center gap-1.5 py-1.5 text-xs rounded font-medium transition-all ${V==="highlights"?"bg-white dark:bg-[#1f1f1f] text-black dark:text-white shadow-sm font-semibold":"text-[#666666] dark:text-[#888888] hover:text-black dark:hover:text-[#cccccc]"}`,children:[f.jsx(fp,{className:"w-3.5 h-3.5"}),f.jsx("span",{children:"重点词"})]})]}),V==="text"&&f.jsxs("div",{className:"flex-1 flex flex-col p-3 gap-2 overflow-hidden",children:[f.jsxs("div",{className:"flex items-center gap-1 pb-1 flex-wrap border-b border-[#f0f0f0] dark:border-[#1c1c1c]",children:[f.jsxs("button",{onClick:()=>ce("# 标题"),className:"px-2 py-1 bg-[#f5f5f5] dark:bg-[#141414] hover:bg-[#eaeaea] dark:hover:bg-[#202020] text-[#555555] dark:text-[#aaaaaa] hover:text-black dark:hover:text-white rounded text-[11px] font-mono flex items-center gap-1 transition-colors",title:"插入主标题",children:[f.jsx(op,{className:"w-3 h-3"}),f.jsx("span",{children:"H1"})]}),f.jsxs("button",{onClick:()=>ce("## 二级标题"),className:"px-2 py-1 bg-[#f5f5f5] dark:bg-[#141414] hover:bg-[#eaeaea] dark:hover:bg-[#202020] text-[#555555] dark:text-[#aaaaaa] hover:text-black dark:hover:text-white rounded text-[11px] font-mono flex items-center gap-1 transition-colors",title:"插入副标题",children:[f.jsx(sp,{className:"w-3 h-3"}),f.jsx("span",{children:"H2"})]}),f.jsx("button",{onClick:()=>ce("> 引用格言名句..."),className:"px-2 py-1 bg-[#f5f5f5] dark:bg-[#141414] hover:bg-[#eaeaea] dark:hover:bg-[#202020] text-[#555555] dark:text-[#aaaaaa] hover:text-black dark:hover:text-white rounded text-[11px] font-mono transition-colors",title:"插入引用块",children:"Quote"}),f.jsxs("button",{onClick:()=>ce("【第二页】"),className:"px-2 py-1 bg-blue-500/10 hover:bg-blue-500/20 text-blue-600 dark:text-blue-400 rounded text-[11px] font-mono flex items-center gap-1 transition-colors",title:"显式分页标记",children:[f.jsx(xp,{className:"w-3 h-3"}),f.jsx("span",{children:"分页面"})]})]}),f.jsx("textarea",{value:u,onChange:A=>c(A.target.value),placeholder:"在此输入 Markdown 内容,纯算法即时排版...",className:"flex-1 w-full bg-[#fafafa] dark:bg-[#0d0d0d] border border-[#eaeaea] dark:border-[#222222] rounded-lg p-3 text-xs font-mono text-[#171717] dark:text-[#ededed] placeholder-[#999999] dark:placeholder-[#444444] resize-none focus:outline-none focus:border-black dark:focus:border-[#444444] transition-all leading-relaxed"}),f.jsxs("div",{className:"flex items-center justify-between text-[11px] text-[#888888] dark:text-[#555555] font-mono px-1",children:[f.jsxs("span",{children:["字符数: ",u.length]}),f.jsxs("span",{children:["行数: ",u.split(`
292
- `).length]})]})]}),V==="images"&&f.jsxs("div",{className:"flex-1 flex flex-col p-3 gap-3 overflow-y-auto",children:[f.jsxs("div",{className:"flex gap-2",children:[f.jsx("input",{type:"file",ref:te,onChange:Z,accept:"image/*",className:"hidden"}),f.jsxs("button",{onClick:()=>te.current?.click(),disabled:le,className:"flex-1 flex items-center justify-center gap-2 py-2.5 rounded-lg border border-dashed border-[#d4d4d4] dark:border-[#333333] hover:border-black dark:hover:border-[#555555] bg-[#fafafa] dark:bg-[#0f0f0f] hover:bg-[#f5f5f5] dark:hover:bg-[#141414] text-xs text-[#555555] dark:text-[#cccccc] hover:text-black dark:hover:text-white transition-all",children:[f.jsx(Tp,{className:"w-3.5 h-3.5"}),f.jsx("span",{children:le?"正在上传...":"上传配图素材"})]}),f.jsx("button",{onClick:()=>r({src:"https://images.unsplash.com/photo-1579783900882-c0d3dad7b119?w=800&auto=format&fit=crop&q=80",alt:"艺术插画",caption:"示例艺术配图",x:36,y:400,width:440,height:300,captionHeight:36,layoutPreset:"auto"}),className:"px-3 py-2.5 rounded-lg border border-[#eaeaea] dark:border-[#222222] bg-[#fafafa] dark:bg-[#0f0f0f] hover:bg-[#f5f5f5] dark:hover:bg-[#141414] text-[#666666] dark:text-[#888888] hover:text-black dark:hover:text-white transition-all",title:"插入在线示例图",children:f.jsx(vp,{className:"w-3.5 h-3.5"})})]}),f.jsx("div",{className:"flex flex-col gap-2.5",children:o.length===0?f.jsx("div",{className:"text-center py-8 text-xs text-[#888888] dark:text-[#555555]",children:"暂无配图素材,点击上方按钮上传或插入"}):o.map((A,X)=>f.jsxs("div",{className:"bg-[#fafafa] dark:bg-[#0f0f0f] border border-[#eaeaea] dark:border-[#222222] rounded-lg p-2.5 flex flex-col gap-2",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("img",{src:A.src,alt:A.alt,className:"w-12 h-12 object-cover rounded bg-[#eeeeee] dark:bg-[#1a1a1a] border border-[#e5e5e5] dark:border-[#262626] shrink-0"}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[f.jsxs("span",{className:"text-[10px] px-1 rounded bg-[#eaeaea] dark:bg-[#262626] font-mono text-[#555555] dark:text-[#aaaaaa] font-semibold shrink-0",children:["#",X+1]}),f.jsx("span",{className:"text-xs font-medium text-[#171717] dark:text-white truncate max-w-[120px]",children:A.caption||A.alt||`配图 #${X+1}`}),f.jsxs("span",{className:"text-[10px] px-1.5 py-0.2 rounded bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 border border-emerald-500/20 font-medium shrink-0",children:["第 ",A.pageIndex||1," 页"]})]}),f.jsxs("div",{className:"text-[10px] text-[#888888] dark:text-[#666666] font-mono mt-0.5",children:[A.width," × ",A.height,"px · X: ",A.x??0,", Y: ",A.y??0]})]}),f.jsxs("div",{className:"flex items-center gap-0.5",children:[f.jsx("button",{onClick:()=>m?.(A.id,"up"),disabled:X===0,className:"p-1 text-[#888888] hover:text-black dark:hover:text-white disabled:opacity-20 rounded hover:bg-[#eeeeee] dark:hover:bg-[#1f1f1f]",title:"上移顺序 (调整在同一页中的先后次序)",children:f.jsx(np,{className:"w-3.5 h-3.5"})}),f.jsx("button",{onClick:()=>m?.(A.id,"down"),disabled:X===o.length-1,className:"p-1 text-[#888888] hover:text-black dark:hover:text-white disabled:opacity-20 rounded hover:bg-[#eeeeee] dark:hover:bg-[#1f1f1f]",title:"下移顺序 (调整在同一页中的先后次序)",children:f.jsx(tp,{className:"w-3.5 h-3.5"})}),f.jsx("button",{onClick:()=>y(A.id),className:"p-1 text-[#888888] hover:text-red-500 rounded hover:bg-[#eeeeee] dark:hover:bg-[#1f1f1f]",title:"删除该图",children:f.jsx(vh,{className:"w-3.5 h-3.5"})})]})]}),f.jsxs("div",{className:"flex bg-[#eeeeee] dark:bg-[#1a1a1a] p-0.5 rounded text-[11px] font-medium pt-1 border-t border-[#eeeeee] dark:border-[#1a1a1a]",children:[f.jsx("button",{onClick:()=>v(A.id,{isAbsolute:!1}),className:`flex-1 py-1 rounded transition-all text-center ${A.isAbsolute?"text-[#666666] dark:text-[#888888] hover:text-black dark:hover:text-white":"bg-white dark:bg-[#262626] text-black dark:text-white shadow-sm font-semibold"}`,children:"绕排避让 (Flow)"}),f.jsx("button",{onClick:()=>v(A.id,{isAbsolute:!0,layoutPreset:"custom",zIndex:A.zIndex??15,rotate:A.rotate??0,opacity:A.opacity??1}),className:`flex-1 py-1 rounded transition-all text-center ${A.isAbsolute?"bg-white dark:bg-[#262626] text-black dark:text-white shadow-sm font-semibold":"text-[#666666] dark:text-[#888888] hover:text-black dark:hover:text-white"}`,children:"自由图层 (Absolute)"})]}),f.jsxs("div",{className:"flex flex-col gap-2 text-[11px]",children:[f.jsxs("label",{className:"flex items-center gap-2",children:[f.jsx("input",{type:"checkbox",checked:A.templateAssetKey!==void 0,onChange:D=>v(A.id,{templateAssetKey:D.target.checked?`asset_${A.id.replace(/[^a-zA-Z0-9_-]/g,"_")}`:void 0,repeatEveryPage:!1})}),"固定模板素材"]}),A.templateAssetKey!==void 0&&f.jsxs(f.Fragment,{children:[f.jsxs("label",{className:"flex flex-col gap-1",children:["素材标识",f.jsx("input",{"aria-label":"素材标识",value:A.templateAssetKey,onChange:D=>v(A.id,{templateAssetKey:D.target.value}),className:"w-full bg-white dark:bg-[#181818] border border-[#d4d4d4] dark:border-[#262626] rounded px-1.5 py-1"})]}),o.some(D=>D.id!==A.id&&D.templateAssetKey===A.templateAssetKey)&&f.jsx("span",{role:"alert",className:"text-red-600",children:"素材标识不能重复"}),f.jsxs("label",{className:"flex items-center gap-2",children:[f.jsx("input",{type:"checkbox",disabled:!A.isAbsolute,checked:!!(A.isAbsolute&&A.repeatEveryPage),onChange:D=>v(A.id,{repeatEveryPage:D.target.checked})}),"每页重复"]}),!A.isAbsolute&&f.jsx("span",{className:"text-[#888888]",children:"每页重复仅支持自由图层,避免阻塞文字排版。"}),f.jsx("span",{className:"text-[#888888]",children:"默认保留此图,仅按素材标识明确替换。"})]}),A.isAbsolute&&f.jsxs("label",{className:"flex items-center gap-2",children:[f.jsx("input",{type:"checkbox",checked:b.includes(A.id),onChange:D=>d(A.id,D.target.checked)}),"设为整页背景"]}),f.jsx("button",{type:"button",onClick:()=>h(A.id),title:"恢复上传或应用模板时的尺寸、位置和图层设置",className:"rounded border border-[#d4d4d4] dark:border-[#333333] px-2 py-1.5 hover:bg-[#eeeeee] dark:hover:bg-[#222222]",children:"重置布局"})]}),A.isAbsolute?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"text-[10px] text-blue-600 dark:text-blue-400 bg-blue-500/10 p-1.5 rounded flex items-center gap-1 font-medium",children:[f.jsx(bo,{className:"w-3 h-3 shrink-0"}),f.jsx("span",{children:"自由定位图层:脱离文本流,不触发障碍物绕排"})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[11px]",children:[f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] block mb-1",children:"所属页面"}),f.jsx("select",{value:A.pageIndex||1,onChange:D=>v(A.id,{pageIndex:parseInt(D.target.value,10)||1}),className:"w-full bg-white dark:bg-[#181818] border border-[#d4d4d4] dark:border-[#262626] rounded px-1.5 py-1 text-black dark:text-white text-[11px] focus:outline-none",children:Array.from({length:Math.max(p,2)},(D,$)=>$+1).map(D=>f.jsxs("option",{value:D,children:["第 ",D," 页 ",D===1?"(首页/封面)":""]},D))})]}),f.jsxs("div",{children:[f.jsxs("div",{className:"flex justify-between text-[#666666] mb-1",children:[f.jsx("span",{children:"层级 (Z-Index)"}),f.jsx("span",{className:"font-mono text-black dark:text-white font-semibold",children:A.zIndex??15})]}),f.jsx("div",{className:"flex gap-1",children:[{label:"底",val:0,title:"底层背景"},{label:"文字",val:10,title:"正文同层"},{label:"顶",val:20,title:"置顶贴纸"}].map(D=>f.jsx("button",{onClick:()=>v(A.id,{zIndex:D.val}),title:D.title,className:`flex-1 py-0.5 text-[10px] rounded border ${(A.zIndex??15)===D.val?"bg-black dark:bg-white text-white dark:text-black border-transparent font-bold":"border-[#d4d4d4] dark:border-[#262626] text-[#666666] dark:text-[#888888]"}`,children:D.label},D.val))})]})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[11px]",children:[f.jsxs("div",{children:[f.jsxs("div",{className:"flex justify-between text-[#666666] mb-1",children:[f.jsxs("span",{className:"flex items-center gap-0.5",children:[f.jsx(bp,{className:"w-2.5 h-2.5"})," 旋转角度"]}),f.jsxs("span",{className:"font-mono text-black dark:text-white font-semibold",children:[A.rotate??0,"°"]})]}),f.jsx("input",{type:"range",min:"-45",max:"45",step:"1",value:A.rotate??0,onChange:D=>v(A.id,{rotate:parseInt(D.target.value,10)}),className:"w-full h-1.5 bg-[#e5e5e5] dark:bg-[#222222] rounded cursor-pointer mt-1"})]}),f.jsxs("div",{children:[f.jsxs("div",{className:"flex justify-between text-[#666666] mb-1",children:[f.jsx("span",{children:"不透明度"}),f.jsxs("span",{className:"font-mono text-black dark:text-white font-semibold",children:[Math.round((A.opacity??1)*100),"%"]})]}),f.jsx("input",{type:"range",min:"0.1",max:"1",step:"0.05",value:A.opacity??1,onChange:D=>v(A.id,{opacity:parseFloat(D.target.value)}),className:"w-full h-1.5 bg-[#e5e5e5] dark:bg-[#222222] rounded cursor-pointer mt-1"})]})]}),f.jsxs("div",{className:"text-[11px]",children:[f.jsx("span",{className:"text-[#666666] block mb-1",children:"圆角半径 (px)"}),f.jsx("input",{type:"number",min:"0",step:"4",value:A.borderRadius??12,onChange:D=>v(A.id,{borderRadius:parseInt(D.target.value,10)||0}),className:"w-full bg-white dark:bg-[#181818] border border-[#d4d4d4] dark:border-[#262626] rounded px-1.5 py-1 text-black dark:text-white text-[11px] font-mono focus:outline-none"})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[11px]",children:[f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] block mb-1",children:"横向 X"}),f.jsx("input",{type:"number",step:"10",value:A.x??0,onChange:D=>v(A.id,{x:parseInt(D.target.value,10)||0}),className:"w-full bg-white dark:bg-[#181818] border border-[#d4d4d4] dark:border-[#262626] rounded px-1.5 py-1 text-black dark:text-white text-[11px] font-mono focus:outline-none"})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] block mb-1",children:"纵向 Y"}),f.jsx("input",{type:"number",step:"10",value:A.y??0,onChange:D=>v(A.id,{y:parseInt(D.target.value,10)||0}),className:"w-full bg-white dark:bg-[#181818] border border-[#d4d4d4] dark:border-[#262626] rounded px-1.5 py-1 text-black dark:text-white text-[11px] font-mono focus:outline-none"})]})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[11px]",children:[f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] block mb-1",children:"宽度 (W)"}),f.jsx("input",{type:"number",step:"10",value:A.width??420,onChange:D=>v(A.id,{width:Math.max(20,parseInt(D.target.value,10)||20)}),className:"w-full bg-white dark:bg-[#181818] border border-[#d4d4d4] dark:border-[#262626] rounded px-1.5 py-1 text-black dark:text-white text-[11px] font-mono focus:outline-none"})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] block mb-1",children:"高度 (H)"}),f.jsx("input",{type:"number",step:"10",value:A.height??280,onChange:D=>v(A.id,{height:Math.max(20,parseInt(D.target.value,10)||20)}),className:"w-full bg-white dark:bg-[#181818] border border-[#d4d4d4] dark:border-[#262626] rounded px-1.5 py-1 text-black dark:text-white text-[11px] font-mono focus:outline-none"})]})]})]}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[11px]",children:[f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] block mb-1",children:"排版预设"}),f.jsxs("select",{value:A.layoutPreset||"auto",onChange:D=>v(A.id,{layoutPreset:D.target.value}),className:"w-full bg-white dark:bg-[#181818] border border-[#d4d4d4] dark:border-[#262626] rounded px-1.5 py-1 text-black dark:text-white text-[11px] focus:outline-none",children:[f.jsx("option",{value:"auto",children:"自适应 (Auto)"}),f.jsx("option",{value:"mid-left",children:"居左浮动 (Left)"}),f.jsx("option",{value:"mid-right",children:"居右浮动 (Right)"}),f.jsx("option",{value:"center",children:"居中横幅 (Center)"}),f.jsx("option",{value:"staggered",children:"交错排版 (Staggered)"}),f.jsx("option",{value:"corner-soft",children:"角落软着陆 (Corner)"}),f.jsx("option",{value:"fill",children:"底部填满 (Fill)"}),f.jsx("option",{value:"custom",children:"自定义坐标 (Custom)"})]})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] block mb-1",children:"所属页面"}),f.jsx("select",{value:A.pageIndex||1,onChange:D=>v(A.id,{pageIndex:parseInt(D.target.value,10)||1}),className:"w-full bg-white dark:bg-[#181818] border border-[#d4d4d4] dark:border-[#262626] rounded px-1.5 py-1 text-black dark:text-white text-[11px] focus:outline-none",children:Array.from({length:Math.max(p,2)},(D,$)=>$+1).map(D=>f.jsxs("option",{value:D,children:["第 ",D," 页 ",D===1?"(首页/封面)":""]},D))})]})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[11px]",children:[f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] block mb-1",children:"宽度 (W)"}),f.jsx("input",{type:"number",min:"50",step:"10",value:A.width??420,onChange:D=>v(A.id,{width:Math.max(50,parseInt(D.target.value,10)||50)}),className:"w-full bg-white dark:bg-[#181818] border border-[#d4d4d4] dark:border-[#262626] rounded px-1.5 py-1 text-black dark:text-white text-[11px] font-mono focus:outline-none"})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] block mb-1",children:"高度 (H)"}),f.jsx("input",{type:"number",min:"50",step:"10",value:A.height??280,onChange:D=>v(A.id,{height:Math.max(50,parseInt(D.target.value,10)||50)}),className:"w-full bg-white dark:bg-[#181818] border border-[#d4d4d4] dark:border-[#262626] rounded px-1.5 py-1 text-black dark:text-white text-[11px] font-mono focus:outline-none"})]})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[11px]",children:[f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] block mb-1",children:"纵向位置 Y"}),f.jsx("input",{type:"number",step:"20",value:A.y??300,onChange:D=>v(A.id,{y:parseInt(D.target.value,10)||0,layoutPreset:"custom"}),className:"w-full bg-white dark:bg-[#181818] border border-[#d4d4d4] dark:border-[#262626] rounded px-1.5 py-1 text-black dark:text-white text-[11px] font-mono focus:outline-none"})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] block mb-1",children:"横向坐标 X"}),f.jsx("input",{type:"number",step:"10",value:A.x??16,onChange:D=>v(A.id,{x:parseInt(D.target.value,10)||0,layoutPreset:"custom"}),className:"w-full bg-white dark:bg-[#181818] border border-[#d4d4d4] dark:border-[#262626] rounded px-1.5 py-1 text-black dark:text-white text-[11px] font-mono focus:outline-none"})]})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] text-[11px] block mb-1",children:"图片说明 (Caption)"}),f.jsx("input",{type:"text",placeholder:"下方说明文字...",value:A.caption||"",onChange:D=>v(A.id,{caption:D.target.value}),className:"w-full bg-white dark:bg-[#181818] border border-[#d4d4d4] dark:border-[#262626] rounded px-2 py-1 text-black dark:text-white text-[11px] focus:outline-none"})]})]})]},A.id))})]}),V==="highlights"&&f.jsxs("div",{className:"flex-1 flex flex-col p-3 gap-3 overflow-y-auto",children:[f.jsx("div",{className:"text-xs text-[#666666] dark:text-[#888888] leading-relaxed",children:"在正文中出现的高亮词,将被算法自动匹配并渲染为品牌强调色。"}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("input",{type:"text",placeholder:"新增高亮关键词...",value:L,onChange:A=>U(A.target.value),onKeyDown:A=>A.key==="Enter"&&ee(),className:"flex-1 bg-white dark:bg-[#0d0d0d] border border-[#d4d4d4] dark:border-[#222222] rounded-lg px-2.5 py-1.5 text-xs text-black dark:text-white placeholder-[#888888] dark:placeholder-[#555555] focus:outline-none focus:border-black dark:focus:border-[#444444]"}),f.jsx("button",{onClick:ee,className:"px-3 py-1.5 bg-black dark:bg-[#1f1f1f] hover:bg-[#262626] text-white rounded-lg text-xs font-medium",children:"添加"})]}),f.jsx("div",{className:"flex flex-wrap gap-1.5 mt-1",children:g.map(A=>f.jsxs("span",{className:"flex items-center gap-1 px-2.5 py-1 rounded-md bg-[#f0fdf4] dark:bg-[#161616] border border-[#bbf7d0] dark:border-[#262626] text-xs text-emerald-700 dark:text-emerald-400 font-medium",children:[f.jsx(bo,{className:"w-3 h-3"}),f.jsx("span",{children:A}),f.jsx("button",{onClick:()=>G(A),className:"hover:text-red-500 ml-1",children:"×"})]},A))})]})]})},Rp=[{id:"wechat-cover-2.35",label:"微信封面",ratioTag:"2.35:1"},{id:"longform-3-4",label:"通用长图文",ratioTag:"3:4"},{id:"wide-16-9",label:"通用宽屏",ratioTag:"16:9"},{id:"square-1-1",label:"通用正方形",ratioTag:"1:1"}],Lp=({currentRatio:u,onSelectRatio:c,zoom:o,onZoomChange:r,onAutoFit:d,isAutoFit:h,onOpenTemplates:b,onOpenAuth:v,onExport:y,isExporting:m,isAuthed:p,pageCount:g,themeMode:N,onToggleThemeMode:C})=>f.jsxs("header",{className:"h-14 border-b border-[#eaeaea] dark:border-[#222222] bg-white/80 dark:bg-[#000000]/80 backdrop-blur-md px-4 flex items-center justify-between select-none z-30 shrink-0 transition-colors",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsxs("div",{className:"flex items-center gap-2 font-semibold text-[#171717] dark:text-white tracking-tight text-sm",children:[f.jsx("span",{className:"flex items-center justify-center w-6 h-6 rounded bg-black dark:bg-white text-white dark:text-black font-black text-xs shadow-sm",children:"▲"}),f.jsx("span",{children:"Typeset Studio"})]}),f.jsx("span",{className:"text-xs text-[#888888] dark:text-[#555555] font-mono hidden md:inline",children:"v0.2.5"}),f.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-[#f5f5f5] dark:bg-[#111111] border border-[#e5e5e5] dark:border-[#222222] text-[11px] text-emerald-600 dark:text-[#00e676]",children:[f.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 dark:bg-[#00e676] animate-pulse"}),f.jsx("span",{className:"font-mono",children:"Ready"})]})]}),f.jsx("div",{className:"flex items-center bg-[#f5f5f5] dark:bg-[#0a0a0a] border border-[#eaeaea] dark:border-[#222222] rounded-lg p-0.5 shadow-inner",children:Rp.map(V=>{const W=u===V.id;return f.jsxs("button",{onClick:()=>c(V.id),className:`flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium transition-all ${W?"bg-white dark:bg-[#1f1f1f] text-black dark:text-white shadow-sm font-semibold":"text-[#666666] dark:text-[#888888] hover:text-[#171717] dark:hover:text-[#cccccc] hover:bg-[#eaeaea] dark:hover:bg-[#141414]"}`,children:[f.jsx("span",{children:V.label}),f.jsx("span",{className:`text-[10px] font-mono px-1 py-0.2 rounded ${W?"bg-[#eaeaea] dark:bg-[#333333] text-black dark:text-white font-semibold":"bg-[#e5e5e5] dark:bg-[#181818] text-[#777777] dark:text-[#666666]"}`,children:V.ratioTag})]},V.id)})}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsxs("div",{className:"flex items-center bg-[#f5f5f5] dark:bg-[#0a0a0a] border border-[#eaeaea] dark:border-[#222222] rounded-lg p-0.5 text-xs text-[#666666] dark:text-[#888888]",children:[f.jsx("button",{onClick:()=>r(Math.max(.2,Number((o-.05).toFixed(2)))),className:"p-1 hover:text-black dark:hover:text-white rounded hover:bg-[#e8e8e8] dark:hover:bg-[#1f1f1f]",title:"缩小",children:f.jsx(wp,{className:"w-3.5 h-3.5"})}),f.jsxs("span",{onDoubleClick:d,className:"w-11 text-center font-mono text-[11px] text-[#333333] dark:text-[#cccccc] cursor-pointer hover:underline select-none",title:"双击恢复自适应",children:[Math.round(o*100),"%"]}),f.jsx("button",{onClick:()=>r(Math.min(1.5,Number((o+.05).toFixed(2)))),className:"p-1 hover:text-black dark:hover:text-white rounded hover:bg-[#e8e8e8] dark:hover:bg-[#1f1f1f]",title:"放大",children:f.jsx(Ah,{className:"w-3.5 h-3.5"})}),d&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"w-[1px] h-3 bg-[#e0e0e0] dark:bg-[#262626] mx-0.5"}),f.jsxs("button",{onClick:d,className:`flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] transition-all ${h?"bg-white dark:bg-[#1f1f1f] text-black dark:text-white shadow-xs font-semibold":"hover:text-black dark:hover:text-white hover:bg-[#e8e8e8] dark:hover:bg-[#1f1f1f]"}`,title:g>1?"缩放至视口内完整排列多张图片(瀑布流平铺)":"自适应画布大小",children:[f.jsx(mp,{className:"w-3 h-3"}),f.jsx("span",{children:g>1?"多图平铺":"自适应"})]})]})]}),f.jsx("button",{onClick:C,className:"p-2 rounded-lg border border-[#eaeaea] dark:border-[#222222] bg-white dark:bg-[#0a0a0a] hover:bg-[#f5f5f5] dark:hover:bg-[#161616] text-[#444444] dark:text-[#cccccc] transition-all btn-vercel",title:N==="light"?"切换至深色模式":"切换至浅色模式",children:N==="light"?f.jsx(gp,{className:"w-3.5 h-3.5 text-[#555555]"}):f.jsx(Ap,{className:"w-3.5 h-3.5 text-amber-400"})}),f.jsxs("button",{onClick:b,className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg border border-[#eaeaea] dark:border-[#222222] bg-white dark:bg-[#0a0a0a] hover:bg-[#f5f5f5] dark:hover:bg-[#161616] text-xs text-[#333333] dark:text-[#cccccc] hover:text-black dark:hover:text-white transition-all btn-vercel",children:[f.jsx(cp,{className:"w-3.5 h-3.5 text-[#777777] dark:text-[#888888]"}),f.jsx("span",{children:"模板库"})]}),f.jsxs("button",{onClick:y,disabled:m,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-black text-white hover:bg-[#262626] dark:bg-white dark:text-black dark:hover:bg-[#eaeaea] text-xs font-semibold transition-all btn-vercel shadow-sm disabled:opacity-50",children:[m?f.jsx(ih,{className:"w-3.5 h-3.5 animate-spin"}):f.jsx(ip,{className:"w-3.5 h-3.5"}),f.jsx("span",{children:m?"导出中...":"导出图片"}),g>1&&f.jsxs("span",{className:"text-[10px] bg-white/20 dark:bg-black text-white px-1.5 py-0.2 rounded font-mono",children:[g,"P"]})]}),f.jsx("button",{onClick:v,className:`p-1.5 rounded-lg border transition-all btn-vercel ${p?"border-[#eaeaea] dark:border-[#222222] bg-white dark:bg-[#0a0a0a] text-[#777777] dark:text-[#888888] hover:text-black dark:hover:text-white hover:bg-[#f5f5f5] dark:hover:bg-[#161616]":"border-amber-500/50 bg-amber-500/10 text-amber-600 dark:text-amber-400"}`,title:p?"超管密钥已就绪":"配置超管密钥",children:f.jsx(W1,{className:"w-3.5 h-3.5"})})]})]});function Hp(){const[u,c]=me.useState([]),[o,r]=me.useState(!1),d=me.useCallback(async(h=!1)=>{try{r(!0);const b=await fetch(`/api/fonts${h?"?refresh=1":""}`);if(!b.ok)return;const v=await b.json();if(!v.ok||!Array.isArray(v.fonts))return;c(v.fonts);let y=!1;if(typeof window<"u"&&"FontFace"in window&&document.fonts)for(const m of v.fonts)try{let p=!1;const g=[];if(document.fonts.forEach(N=>{(N.family===m.family||N.family===`"${m.family}"`)&&(p=!0,g.push(N))}),h&&(g.forEach(N=>document.fonts.delete(N)),p=!1),!p){const C=await new FontFace(m.family,`url(${m.url}${h?`?v=${Date.now()}`:""})`).load();document.fonts.add(C),y=!0}}catch(p){console.warn(`[useLocalFonts] Failed to load web font ${m.family}:`,p)}y&&window.dispatchEvent(new Event("typeset-fonts-loaded"))}catch(b){console.warn("[useLocalFonts] Failed to fetch local fonts:",b)}finally{r(!1)}},[]);return me.useEffect(()=>{d()},[d]),{fonts:u,loading:o,refreshFonts:()=>d(!0)}}const g1=[{label:"苹方 / 极简黑体 (默认清爽)",value:"PingFang SC"},{label:"思源黑体 (现代极简·粗黑)",value:"Noto Sans SC"},{label:"典雅宋体 (经典报刊·书卷)",value:"Songti SC"},{label:"思源宋体 (高阶报刊·典雅)",value:"Noto Serif SC"},{label:"人文楷体 (温润随笔·手写)",value:"Kaiti SC"},{label:"柔和圆体 (亲和灵动·现代)",value:"Yuanti SC"},{label:"Inter / 国际西文无衬线",value:"Inter"},{label:"Georgia / 文艺西文衬线",value:"Georgia"}],Up=({config:u,onUpdateAlgorithm:c,onUpdateTheme:o,onUpdateTypography:r,onUpdateSafeArea:d,onUpdateBranding:h,onUpdateChrome:b})=>{const{algorithm:v,theme:y,typography:m}=u,{fonts:p,loading:g,refreshFonts:N}=Hp();return f.jsxs("aside",{className:"w-80 border-l border-[#eaeaea] dark:border-[#222222] bg-white dark:bg-[#0a0a0a] flex flex-col shrink-0 select-none overflow-y-auto transition-colors",children:[f.jsxs("div",{className:"p-3.5 border-b border-[#f0f0f0] dark:border-[#1c1c1c]",children:[f.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-[#171717] dark:text-white mb-3",children:[f.jsx(lp,{className:"w-3.5 h-3.5 text-blue-500 dark:text-blue-400"}),f.jsx("span",{children:"文字对齐与空间居中"})]}),f.jsxs("div",{className:"flex flex-col gap-3 text-xs",children:[f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] dark:text-[#888888] text-[11px] block mb-1.5 font-medium",children:"垂直排版对齐 (封面必备)"}),f.jsx("div",{className:"grid grid-cols-3 gap-1 bg-[#f5f5f5] dark:bg-[#141414] p-1 rounded-lg border border-[#e5e5e5] dark:border-[#262626]",children:[{id:"top",label:"顶端对齐"},{id:"center",label:"垂直居中"},{id:"bottom",label:"底端对齐"}].map(C=>f.jsx("button",{onClick:()=>c({verticalAlign:C.id}),className:`py-1 text-[11px] rounded transition-all font-medium ${(v.verticalAlign||"top")===C.id?"bg-white dark:bg-[#262626] text-black dark:text-white shadow-sm font-semibold":"text-[#666666] dark:text-[#888888] hover:text-black dark:hover:text-white"}`,children:C.label},C.id))})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] dark:text-[#888888] text-[11px] block mb-1.5 font-medium",children:"水平排版对齐"}),f.jsxs("div",{className:"grid grid-cols-3 gap-1 bg-[#f5f5f5] dark:bg-[#141414] p-1 rounded-lg border border-[#e5e5e5] dark:border-[#262626]",children:[f.jsxs("button",{onClick:()=>c({textAlign:"left"}),className:`py-1 flex items-center justify-center gap-1 text-[11px] rounded transition-all font-medium ${(v.textAlign||"left")==="left"?"bg-white dark:bg-[#262626] text-black dark:text-white shadow-sm font-semibold":"text-[#666666] dark:text-[#888888] hover:text-black dark:hover:text-white"}`,children:[f.jsx(kp,{className:"w-3 h-3"}),f.jsx("span",{children:"居左"})]}),f.jsxs("button",{onClick:()=>c({textAlign:"center"}),className:`py-1 flex items-center justify-center gap-1 text-[11px] rounded transition-all font-medium ${v.textAlign==="center"?"bg-white dark:bg-[#262626] text-black dark:text-white shadow-sm font-semibold":"text-[#666666] dark:text-[#888888] hover:text-black dark:hover:text-white"}`,children:[f.jsx(Mp,{className:"w-3 h-3"}),f.jsx("span",{children:"居中"})]}),f.jsxs("button",{onClick:()=>c({textAlign:"right"}),className:`py-1 flex items-center justify-center gap-1 text-[11px] rounded transition-all font-medium ${v.textAlign==="right"?"bg-white dark:bg-[#262626] text-black dark:text-white shadow-sm font-semibold":"text-[#666666] dark:text-[#888888] hover:text-black dark:hover:text-white"}`,children:[f.jsx(Cp,{className:"w-3 h-3"}),f.jsx("span",{children:"居右"})]})]})]})]})]}),f.jsxs("div",{className:"p-3.5 border-b border-[#f0f0f0] dark:border-[#1c1c1c]",children:[f.jsxs("div",{className:"flex items-center justify-between text-xs font-semibold text-[#171717] dark:text-white mb-3",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(Fp,{className:"w-3.5 h-3.5 text-indigo-500 dark:text-indigo-400"}),f.jsx("span",{children:"字体与排版字阶"})]}),f.jsx("button",{onClick:()=>N(),disabled:g,title:"重新扫描 public/fonts 目录",className:"p-1 text-[#888888] hover:text-black dark:hover:text-white rounded hover:bg-[#eaeaea] dark:hover:bg-[#222222] transition-colors",children:f.jsx(ih,{className:`w-3 h-3 ${g?"animate-spin text-blue-500":""}`})})]}),f.jsxs("div",{className:"flex flex-col gap-3 text-xs",children:[f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] dark:text-[#888888] text-[11px] block mb-1",children:"标题字体 (Heading Font)"}),f.jsxs("select",{value:m.headingFont,onChange:C=>r({headingFont:C.target.value}),className:"w-full bg-[#fafafa] dark:bg-[#141414] border border-[#d4d4d4] dark:border-[#262626] rounded-md px-2 py-1.5 text-black dark:text-white text-xs focus:outline-none",children:[p.length>0&&f.jsx("optgroup",{label:"✨ 项目本地字体 (public/fonts)",children:p.map(C=>f.jsx("option",{value:C.family,children:C.label},`head-local-${C.family}`))}),f.jsx("optgroup",{label:"🌐 系统 / 云端预设",children:g1.map(C=>f.jsx("option",{value:C.value,children:C.label},`head-preset-${C.value}`))})]})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-[#666666] dark:text-[#888888] text-[11px] block mb-1",children:"正文字体 (Body Font)"}),f.jsxs("select",{value:m.bodyFont,onChange:C=>r({bodyFont:C.target.value}),className:"w-full bg-[#fafafa] dark:bg-[#141414] border border-[#d4d4d4] dark:border-[#262626] rounded-md px-2 py-1.5 text-black dark:text-white text-xs focus:outline-none",children:[p.length>0&&f.jsx("optgroup",{label:"✨ 项目本地字体 (public/fonts)",children:p.map(C=>f.jsx("option",{value:C.family,children:C.label},`body-local-${C.family}`))}),f.jsx("optgroup",{label:"🌐 系统 / 云端预设",children:g1.map(C=>f.jsx("option",{value:C.value,children:C.label},`body-preset-${C.value}`))})]})]}),p.length===0?f.jsx("div",{className:"text-[10px] text-[#888888] dark:text-[#666666] flex items-center justify-between pt-1 border-t border-[#f5f5f5] dark:border-[#1a1a1a]",children:f.jsxs("span",{children:["💡 将 .ttf / .otf 放入 ",f.jsx("code",{children:"public/fonts/"})," 即可识别"]})}):f.jsx("div",{className:"text-[10px] text-emerald-600 dark:text-emerald-400 flex items-center justify-between pt-1 border-t border-[#f5f5f5] dark:border-[#1a1a1a]",children:f.jsxs("span",{children:["✨ 已加载 ",p.length," 个项目本地字体"]})})]})]}),f.jsxs("div",{className:"p-3.5 border-b border-[#f0f0f0] dark:border-[#1c1c1c]",children:[f.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-[#171717] dark:text-white mb-3",children:[f.jsx(Ep,{className:"w-3.5 h-3.5 text-blue-500 dark:text-blue-400"}),f.jsx("span",{children:"字号与比例参数"})]}),f.jsxs("div",{className:"flex flex-col gap-3.5 text-xs",children:[f.jsxs("div",{children:[f.jsxs("div",{className:"flex justify-between text-[#666666] dark:text-[#888888] mb-1 font-mono text-[11px]",children:[f.jsx("span",{children:"基准字号 (Base Size)"}),f.jsxs("span",{className:"text-[#171717] dark:text-white font-semibold",children:[v.baseFontSize,"px"]})]}),f.jsx("input",{type:"range",min:"24",max:"96",step:"1",value:v.baseFontSize,onChange:C=>c({baseFontSize:parseInt(C.target.value,10)}),className:"w-full h-1.5 bg-[#e5e5e5] dark:bg-[#222222] rounded-lg cursor-pointer"})]}),f.jsxs("div",{children:[f.jsxs("div",{className:"flex justify-between text-[#666666] dark:text-[#888888] mb-1 font-mono text-[11px]",children:[f.jsx("span",{children:"比例字阶系数 (大标题倍率)"}),f.jsxs("span",{className:"text-[#171717] dark:text-white font-semibold",children:[v.scaleRatio.toFixed(2),"x"]})]}),f.jsx("input",{type:"range",min:"1.15",max:"1.6",step:"0.01",value:v.scaleRatio,onChange:C=>c({scaleRatio:parseFloat(C.target.value)}),className:"w-full h-1.5 bg-[#e5e5e5] dark:bg-[#222222] rounded-lg cursor-pointer"})]}),f.jsxs("div",{children:[f.jsxs("div",{className:"flex justify-between text-[#666666] dark:text-[#888888] mb-1 font-mono text-[11px]",children:[f.jsx("span",{children:"行高舒展倍率"}),f.jsx("span",{className:"text-[#171717] dark:text-white font-semibold",children:v.lineHeightMultiplier.toFixed(2)})]}),f.jsx("input",{type:"range",min:"1.2",max:"1.8",step:"0.02",value:v.lineHeightMultiplier,onChange:C=>c({lineHeightMultiplier:parseFloat(C.target.value)}),className:"w-full h-1.5 bg-[#e5e5e5] dark:bg-[#222222] rounded-lg cursor-pointer"})]}),f.jsxs("div",{children:[f.jsxs("div",{className:"flex justify-between text-[#666666] dark:text-[#888888] mb-1 font-mono text-[11px]",children:[f.jsx("span",{children:"配图避让间隙 (Gap)"}),f.jsxs("span",{className:"text-[#171717] dark:text-white font-semibold",children:[v.obstacleGap,"px"]})]}),f.jsx("input",{type:"range",min:"12",max:"48",step:"2",value:v.obstacleGap,onChange:C=>c({obstacleGap:parseInt(C.target.value,10)}),className:"w-full h-1.5 bg-[#e5e5e5] dark:bg-[#222222] rounded-lg cursor-pointer"})]})]})]}),f.jsxs("div",{className:"p-3.5 border-b border-[#f0f0f0] dark:border-[#1c1c1c]",children:[f.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-[#171717] dark:text-white mb-3",children:[f.jsx(Sp,{className:"w-3.5 h-3.5 text-emerald-600 dark:text-emerald-400"}),f.jsx("span",{children:"版心安全边距"})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[11px] font-mono",children:[f.jsxs("div",{children:[f.jsx("span",{className:"text-[#777777] dark:text-[#666666] block mb-1",children:"上边距 (Top)"}),f.jsx("input",{type:"number",value:v.safeArea.top,onChange:C=>d({top:parseInt(C.target.value,10)||0}),className:"w-full bg-[#fafafa] dark:bg-[#141414] border border-[#d4d4d4] dark:border-[#262626] rounded px-2 py-1 text-black dark:text-white"})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-[#777777] dark:text-[#666666] block mb-1",children:"下边距 (Bottom)"}),f.jsx("input",{type:"number",value:v.safeArea.bottom,onChange:C=>d({bottom:parseInt(C.target.value,10)||0}),className:"w-full bg-[#fafafa] dark:bg-[#141414] border border-[#d4d4d4] dark:border-[#262626] rounded px-2 py-1 text-black dark:text-white"})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-[#777777] dark:text-[#666666] block mb-1",children:"左边距 (Left)"}),f.jsx("input",{type:"number",value:v.safeArea.left,onChange:C=>d({left:parseInt(C.target.value,10)||0}),className:"w-full bg-[#fafafa] dark:bg-[#141414] border border-[#d4d4d4] dark:border-[#262626] rounded px-2 py-1 text-black dark:text-white"})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-[#777777] dark:text-[#666666] block mb-1",children:"右边距 (Right)"}),f.jsx("input",{type:"number",value:v.safeArea.right,onChange:C=>d({right:parseInt(C.target.value,10)||0}),className:"w-full bg-[#fafafa] dark:bg-[#141414] border border-[#d4d4d4] dark:border-[#262626] rounded px-2 py-1 text-black dark:text-white"})]})]})]}),f.jsxs("div",{className:"p-3.5 border-b border-[#f0f0f0] dark:border-[#1c1c1c]",children:[f.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-[#171717] dark:text-white mb-3",children:[f.jsx(pp,{className:"w-3.5 h-3.5 text-purple-600 dark:text-purple-400"}),f.jsx("span",{children:"视觉色彩主题"})]}),f.jsxs("div",{className:"flex flex-col gap-2.5 text-xs",children:[f.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[f.jsx("button",{onClick:()=>o({bgColor:"#ffffff",textColor:"#171717",headingColor:"#171717",accentColor:"#059669",quoteColor:"#525252",cardBg:"#f5f5f5"}),className:"w-6 h-6 rounded-full bg-[#ffffff] border-2 border-emerald-500 shadow-sm hover:scale-105 transition-all",title:"素白雅致 (推荐)"}),f.jsx("button",{onClick:()=>o({bgColor:"#f9fcfa",textColor:"#22201d",headingColor:"#0f2e22",accentColor:"#1d4f39",quoteColor:"#474038",cardBg:"#ffffff"}),className:"w-6 h-6 rounded-full bg-[#f9fcfa] border border-[#ccc] shadow-sm hover:scale-105 transition-all",title:"纸白浅草"}),f.jsx("button",{onClick:()=>o({bgColor:"#0a0a0a",textColor:"#ededed",headingColor:"#ffffff",accentColor:"#00e676",quoteColor:"#a0a0a0",cardBg:"#121212"}),className:"w-6 h-6 rounded-full bg-[#0a0a0a] border border-[#444] shadow-sm hover:scale-105 transition-all",title:"深邃暗夜"}),f.jsx("button",{onClick:()=>o({bgColor:"#09090b",textColor:"#fafafa",headingColor:"#ffffff",accentColor:"#3b82f6",quoteColor:"#a1a1aa",cardBg:"#18181b"}),className:"w-6 h-6 rounded-full bg-[#09090b] border border-blue-500 shadow-sm hover:scale-105 transition-all",title:"数码蓝暗黑"})]}),f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"text-[#666666] dark:text-[#888888] font-medium",children:"标题颜色 (Heading)"}),f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx("input",{type:"color",value:y.headingColor||y.textColor,onChange:C=>o({headingColor:C.target.value}),className:"w-6 h-6 rounded cursor-pointer bg-transparent border-0"}),f.jsx("span",{className:"font-mono text-[11px] text-[#444444] dark:text-[#cccccc]",children:y.headingColor||y.textColor})]})]}),f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"text-[#666666] dark:text-[#888888]",children:"正文字色 (Text)"}),f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx("input",{type:"color",value:y.textColor,onChange:C=>o({textColor:C.target.value}),className:"w-6 h-6 rounded cursor-pointer bg-transparent border-0"}),f.jsx("span",{className:"font-mono text-[11px] text-[#444444] dark:text-[#cccccc]",children:y.textColor})]})]}),f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"text-[#666666] dark:text-[#888888]",children:"重点强调色 (Accent)"}),f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx("input",{type:"color",value:y.accentColor,onChange:C=>o({accentColor:C.target.value}),className:"w-6 h-6 rounded cursor-pointer bg-transparent border-0"}),f.jsx("span",{className:"font-mono text-[11px] text-[#444444] dark:text-[#cccccc]",children:y.accentColor})]})]}),f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"text-[#666666] dark:text-[#888888]",children:"背景底色 (Canvas)"}),f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx("input",{type:"color",value:y.bgColor,onChange:C=>o({bgColor:C.target.value}),className:"w-6 h-6 rounded cursor-pointer bg-transparent border-0"}),f.jsx("span",{className:"font-mono text-[11px] text-[#444444] dark:text-[#cccccc]",children:y.bgColor})]})]})]})]}),f.jsxs("div",{className:"p-3.5",children:[f.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-[#171717] dark:text-white mb-3",children:[f.jsx(ap,{className:"w-3.5 h-3.5 text-amber-500 dark:text-amber-400"}),f.jsx("span",{children:"页眉页脚与版式装饰 (Chrome)"})]}),f.jsxs("div",{className:"flex flex-col gap-3 text-xs",children:[f.jsxs("div",{className:"bg-[#f9f9f9] dark:bg-[#141414] p-2.5 rounded-lg border border-[#eaeaea] dark:border-[#222222] flex flex-col gap-2",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"font-semibold text-[#333333] dark:text-[#cccccc] text-[11px]",children:"顶部栏 (Header)"}),f.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:u.chrome?.showHeader??!!u.watermarkText?.trim(),onChange:C=>b({showHeader:C.target.checked}),className:"rounded text-emerald-500 accent-emerald-500 cursor-pointer"}),f.jsx("span",{className:"text-[10px] text-[#666666] dark:text-[#888888]",children:"启用"})]})]}),(u.chrome?.showHeader??!!u.watermarkText?.trim())&&f.jsxs("div",{className:"flex flex-col gap-2 pl-2 border-l-2 border-[#e0e0e0] dark:border-[#2a2a2a] mt-1",children:[f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between mb-1",children:[f.jsx("span",{className:"text-[#777777] dark:text-[#888888] text-[10px]",children:"水印 / 品牌标识"}),f.jsxs("label",{className:"flex items-center gap-1 text-[10px] text-[#666666] dark:text-[#888888] cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:u.chrome?.showWatermark??!0,onChange:C=>b({showWatermark:C.target.checked}),className:"rounded accent-emerald-500 cursor-pointer"}),f.jsx("span",{children:"显示"})]})]}),f.jsx("input",{type:"text",value:u.watermarkText,onChange:C=>h(u.footerText,C.target.value),placeholder:"作者水印/标识文本...",className:"w-full bg-white dark:bg-[#0a0a0a] border border-[#d4d4d4] dark:border-[#262626] rounded px-2 py-1 text-black dark:text-white text-[11px]"})]}),f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"text-[#777777] dark:text-[#888888] text-[10px]",children:"页码角标 (P.01)"}),f.jsxs("label",{className:"flex items-center gap-1 text-[10px] text-[#666666] dark:text-[#888888] cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:u.chrome?.showPageNumber??u.aspectRatio==="longform-3-4",onChange:C=>b({showPageNumber:C.target.checked}),className:"rounded accent-emerald-500 cursor-pointer"}),f.jsx("span",{children:"显示"})]})]})]})]}),f.jsxs("div",{className:"bg-[#f9f9f9] dark:bg-[#141414] p-2.5 rounded-lg border border-[#eaeaea] dark:border-[#222222] flex flex-col gap-2",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"font-semibold text-[#333333] dark:text-[#cccccc] text-[11px]",children:"底部栏 (Footer)"}),f.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:u.chrome?.showFooter??!!u.footerText?.trim(),onChange:C=>b({showFooter:C.target.checked}),className:"rounded text-emerald-500 accent-emerald-500 cursor-pointer"}),f.jsx("span",{className:"text-[10px] text-[#666666] dark:text-[#888888]",children:"启用"})]})]}),(u.chrome?.showFooter??!!u.footerText?.trim())&&f.jsxs("div",{className:"flex flex-col gap-2 pl-2 border-l-2 border-[#e0e0e0] dark:border-[#2a2a2a] mt-1",children:[f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between mb-1",children:[f.jsx("span",{className:"text-[#777777] dark:text-[#888888] text-[10px]",children:"页脚署名 / 版权"}),f.jsxs("label",{className:"flex items-center gap-1 text-[10px] text-[#666666] dark:text-[#888888] cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:u.chrome?.showFooterText??!0,onChange:C=>b({showFooterText:C.target.checked}),className:"rounded accent-emerald-500 cursor-pointer"}),f.jsx("span",{children:"显示"})]})]}),f.jsx("input",{type:"text",value:u.footerText,onChange:C=>h(C.target.value,u.watermarkText),placeholder:"页脚版权/署名...",className:"w-full bg-white dark:bg-[#0a0a0a] border border-[#d4d4d4] dark:border-[#262626] rounded px-2 py-1 text-black dark:text-white text-[11px]"})]}),f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"text-[#777777] dark:text-[#888888] text-[10px]",children:"顶部分割细线"}),f.jsxs("label",{className:"flex items-center gap-1 text-[10px] text-[#666666] dark:text-[#888888] cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:u.chrome?.showFooterDivider??!!u.footerText?.trim(),onChange:C=>b({showFooterDivider:C.target.checked}),className:"rounded accent-emerald-500 cursor-pointer"}),f.jsx("span",{children:"显示"})]})]}),f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"text-[#777777] dark:text-[#888888] text-[10px]",children:"算法填充率提示"}),f.jsxs("label",{className:"flex items-center gap-1 text-[10px] text-[#666666] dark:text-[#888888] cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:u.chrome?.showFillRatio??!1,onChange:C=>b({showFillRatio:C.target.checked}),className:"rounded accent-emerald-500 cursor-pointer"}),f.jsx("span",{children:"显示"})]})]})]})]})]})]})]})};function Ac(u=[]){if(!Array.isArray(u))throw new RangeError("模板图片必须是数组");const c=new Set;for(const o of u){if(!o||typeof o!="object")throw new RangeError("无效的模板图片");if(o.templateAssetKey===void 0)continue;const r=o.templateAssetKey;if(o.repeatEveryPage!==void 0&&typeof o.repeatEveryPage!="boolean")throw new RangeError(`素材 ${r} 的每页重复开关必须是布尔值`);if(typeof r!="string"||!/^[a-zA-Z0-9_-]+$/.test(r))throw new RangeError("素材标识只能包含字母、数字、下划线和短横线");if(o.repeatEveryPage&&!o.isAbsolute)throw new RangeError(`素材 ${r} 的每页重复仅支持自由定位模式`);if(c.has(r))throw new RangeError(`重复的模板素材标识:${r}`);c.add(r)}}function qp(u,c=[],o={}){if(Ac(c),!o||typeof o!="object"||Array.isArray(o))throw new RangeError("素材替换必须是标识到图片地址的映射");const r=c.filter(v=>v.templateAssetKey);for(const[v,y]of Object.entries(o)){if(!r.some(m=>m.templateAssetKey===v))throw new RangeError(`未知模板素材:${v}`);if(typeof y!="string"||!y.trim())throw new RangeError(`素材 ${v} 的替换图片不能为空`)}const d=u.filter(v=>!v.templateAssetKey),h=c.filter(v=>!v.templateAssetKey);return[...d.length===0?h.map(v=>({...v,id:`img_${crypto.randomUUID()}`})):d.map((v,y)=>{const m=h[y];return m?{...v,layoutPreset:m.layoutPreset??v.layoutPreset,isAbsolute:m.isAbsolute??v.isAbsolute,x:m.x??v.x,y:m.y??v.y,width:m.width??v.width,height:m.height??v.height,rotate:m.rotate??v.rotate,opacity:m.opacity??v.opacity,zIndex:m.zIndex??v.zIndex,borderRadius:m.borderRadius??v.borderRadius,captionHeight:m.captionHeight??v.captionHeight,pageIndex:m.pageIndex??v.pageIndex}:v}),...r.map(v=>({...v,src:Object.hasOwn(o,v.templateAssetKey)?o[v.templateAssetKey]:v.src}))]}const Gp=({isOpen:u,onClose:c,currentConfig:o,onApplyTemplate:r,adminKey:d})=>{const[h,b]=me.useState([]),[v,y]=me.useState({}),[m,p]=me.useState("default"),[g,N]=me.useState("all"),[C,V]=me.useState(!1),[W,L]=me.useState(""),[U,te]=me.useState(()=>o.aspectRatio==="wechat-cover-2.35"?"article_cover":"newspic_content"),[le,oe]=me.useState(!1),[ce,Z]=me.useState(null),ee=async(Y=m)=>{try{const ae=await fetch(`/api/templates/slots?account=${encodeURIComponent(Y)}`,{headers:{"x-admin-key":d}}),j=await ae.json();if(!ae.ok||!j.ok)throw new Error(j.message||j.error||"获取槽位失败");j.ok&&j.slots&&y(j.slots)}catch(ae){Z(ae instanceof Error?ae.message:"模板请求失败")}},G=async(Y,ae)=>{try{const j=await fetch("/api/templates/slots",{method:"POST",headers:{"Content-Type":"application/json",...d?{"x-admin-key":d}:{}},body:JSON.stringify({slot:Y,templateId:ae,account:m})}),B=await j.json();if(!j.ok||!B.ok)throw new Error(B.message||B.error||"设置默认模板失败");B.ok&&await ee(m)}catch(j){Z(j instanceof Error?j.message:"模板请求失败")}},A=async()=>{V(!0),Z(null);try{const Y=await fetch("/api/templates",{headers:d?{"x-admin-key":d}:{}}),ae=await Y.json();Y.ok&&ae.ok&&Array.isArray(ae.templates)?b(ae.templates):Z(ae.message||"获取模板失败,请检查密钥")}catch{Z("连接后端服务失败")}finally{V(!1)}};me.useEffect(()=>{u&&(A(),ee(m),L(o.name?`${o.name} 副本`:"我的自定义模板"),te(o.aspectRatio==="wechat-cover-2.35"?"article_cover":"newspic_content"))},[u,m,d]);const X=async()=>{if(W.trim()){oe(!0);try{Ac(o.images);const Y={...o,id:void 0,name:W.trim(),slot:U!=="none"?U:void 0},ae=await fetch("/api/templates",{method:"POST",headers:{"Content-Type":"application/json",...d?{"x-admin-key":d}:{}},body:JSON.stringify(Y)}),j=await ae.json();ae.ok&&j.ok?(await A(),await ee(m)):Z(j.message||j.error||"保存模板失败")}catch(Y){Z(Y instanceof Error?Y.message:"保存模板请求异常")}finally{oe(!1)}}},D=async Y=>{try{const ae=await fetch(`/api/templates/${encodeURIComponent(Y)}`,{method:"DELETE",headers:d?{"x-admin-key":d}:{}}),j=await ae.json();if(!ae.ok||!j.ok)throw new Error(j.message||j.error||"删除模板失败");b(B=>B.filter(k=>k.id!==Y)),await ee(m)}catch(ae){Z(ae instanceof Error?ae.message:"模板请求失败")}};if(!u)return null;const $=h.filter(Y=>g==="all"?!0:Y.slot===g);return f.jsx("div",{className:"fixed inset-0 z-50 bg-black/50 dark:bg-black/70 backdrop-blur-sm flex items-center justify-center p-4",children:f.jsxs("div",{className:"bg-white dark:bg-[#0f0f0f] border border-[#eaeaea] dark:border-[#262626] rounded-xl w-full max-w-xl flex flex-col shadow-2xl overflow-hidden animate-in fade-in zoom-in-95 duration-150 transition-colors",children:[f.jsxs("div",{className:"flex items-center justify-between px-5 py-3.5 border-b border-[#eaeaea] dark:border-[#222222]",children:[f.jsxs("div",{className:"flex items-center gap-2 font-semibold text-sm text-[#171717] dark:text-white",children:[f.jsx(bo,{className:"w-4 h-4 text-emerald-500 dark:text-emerald-400"}),f.jsx("span",{children:"排版模板中心"})]}),f.jsx("button",{onClick:c,className:"text-[#888888] hover:text-black dark:hover:text-white p-1 rounded-md hover:bg-[#f5f5f5] dark:hover:bg-[#1a1a1a]",children:f.jsx(Sh,{className:"w-4 h-4"})})]}),f.jsxs("div",{className:"p-5 flex flex-col gap-4 max-h-[75vh] overflow-y-auto",children:[f.jsxs("div",{className:"bg-[#f9f9f9] dark:bg-[#141414] border border-[#eaeaea] dark:border-[#222222] rounded-lg p-3 flex flex-col gap-2.5",children:[f.jsx("span",{className:"text-xs text-[#666666] dark:text-[#888888] font-medium",children:"将当前参数另存为模板"}),f.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[f.jsx("input",{type:"text",value:W,onChange:Y=>L(Y.target.value),placeholder:"模板名称...",className:"flex-1 bg-white dark:bg-[#0a0a0a] border border-[#d4d4d4] dark:border-[#2a2a2a] rounded px-3 py-1.5 text-xs text-black dark:text-white focus:outline-none focus:border-black dark:focus:border-[#444444]"}),f.jsxs("select",{value:U,onChange:Y=>te(Y.target.value),className:"bg-white dark:bg-[#0a0a0a] border border-[#d4d4d4] dark:border-[#2a2a2a] rounded px-2 py-1.5 text-xs text-black dark:text-white focus:outline-none focus:border-black dark:focus:border-[#444444]",children:[f.jsx("option",{value:"article_cover",children:"槽位: 文章封面 (2.35:1)"}),f.jsx("option",{value:"newspic_cover",children:"槽位: 贴图封面 (3:4)"}),f.jsx("option",{value:"newspic_content",children:"槽位: 贴图内容 (3:4)"}),f.jsx("option",{value:"none",children:"槽位: 通用模板"})]}),f.jsxs("button",{onClick:X,disabled:le,className:"flex items-center justify-center gap-1.5 px-3 py-1.5 bg-black text-white hover:bg-[#262626] dark:bg-white dark:text-black dark:hover:bg-[#eaeaea] text-xs font-semibold rounded transition-all btn-vercel disabled:opacity-50 shrink-0",children:[f.jsx(rp,{className:"w-3.5 h-3.5"}),f.jsx("span",{children:le?"保存中...":"保存模板"})]})]})]}),ce&&f.jsx("div",{className:"text-xs text-amber-600 dark:text-amber-400 bg-amber-500/10 border border-amber-500/20 px-3 py-2 rounded-lg",children:ce}),f.jsxs("div",{className:"flex flex-col gap-2 pt-1 border-t border-[#eaeaea] dark:border-[#222222]",children:[f.jsx("div",{className:"flex items-center justify-between text-xs",children:f.jsxs("div",{className:"flex items-center gap-1.5 font-medium text-[#666666] dark:text-[#888888]",children:[f.jsx("span",{children:"默认槽位配置账号:"}),f.jsxs("select",{value:m,onChange:Y=>p(Y.target.value),className:"bg-white dark:bg-[#141414] border border-[#d4d4d4] dark:border-[#2a2a2a] rounded px-2 py-0.5 text-xs text-black dark:text-white focus:outline-none font-mono",children:[f.jsx("option",{value:"default",children:"default (主账号)"}),f.jsx("option",{value:"ancientone",children:"ancientone"})]})]})}),f.jsxs("div",{className:"flex items-center gap-1.5 text-xs overflow-x-auto pb-1",children:[f.jsx("button",{onClick:()=>N("all"),className:`px-2.5 py-1 rounded text-xs transition-colors font-medium ${g==="all"?"bg-black text-white dark:bg-white dark:text-black":"text-[#666666] dark:text-[#888888] hover:bg-[#f5f5f5] dark:hover:bg-[#1c1c1c]"}`,children:"全部"}),f.jsx("button",{onClick:()=>N("article_cover"),className:`px-2.5 py-1 rounded text-xs transition-colors font-medium ${g==="article_cover"?"bg-black text-white dark:bg-white dark:text-black":"text-[#666666] dark:text-[#888888] hover:bg-[#f5f5f5] dark:hover:bg-[#1c1c1c]"}`,children:"文章封面"}),f.jsx("button",{onClick:()=>N("newspic_cover"),className:`px-2.5 py-1 rounded text-xs transition-colors font-medium ${g==="newspic_cover"?"bg-black text-white dark:bg-white dark:text-black":"text-[#666666] dark:text-[#888888] hover:bg-[#f5f5f5] dark:hover:bg-[#1c1c1c]"}`,children:"贴图封面"}),f.jsx("button",{onClick:()=>N("newspic_content"),className:`px-2.5 py-1 rounded text-xs transition-colors font-medium ${g==="newspic_content"?"bg-black text-white dark:bg-white dark:text-black":"text-[#666666] dark:text-[#888888] hover:bg-[#f5f5f5] dark:hover:bg-[#1c1c1c]"}`,children:"贴图内容"})]})]}),f.jsx("div",{className:"flex flex-col gap-2",children:C?f.jsx("div",{className:"text-center py-8 text-xs text-[#888888] dark:text-[#555555]",children:"正在加载模板..."}):$.length===0?f.jsx("div",{className:"text-center py-8 text-xs text-[#888888] dark:text-[#555555]",children:"暂无匹配模板"}):$.map(Y=>{const ae=v.article_cover?.id===Y.id,j=v.newspic_cover?.id===Y.id,B=v.newspic_content?.id===Y.id;return f.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between p-3 rounded-lg bg-[#fafafa] dark:bg-[#141414] border border-[#eaeaea] dark:border-[#222222] hover:border-[#cccccc] dark:hover:border-[#333333] transition-all gap-2 group",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-5 h-5 rounded border border-[#d4d4d4] dark:border-[#333333] shrink-0",style:{backgroundColor:Y.theme.bgColor}}),f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[f.jsx("span",{className:"text-xs font-semibold text-[#171717] dark:text-white",children:Y.name}),Y.slot&&f.jsx("span",{className:"text-[10px] px-1.5 py-0.2 rounded bg-blue-500/10 text-blue-600 dark:text-blue-400 border border-blue-500/20 font-medium",children:Y.slot==="article_cover"?"文章封面":Y.slot==="newspic_cover"?"贴图封面":"贴图内容"}),ae&&f.jsxs("span",{className:"text-[10px] px-1.5 py-0.2 rounded bg-amber-500/10 text-amber-600 dark:text-amber-400 border border-amber-500/20 font-medium flex items-center gap-0.5",children:[f.jsx(fo,{className:"w-2.5 h-2.5 fill-amber-500"})," 文章封面默认"]}),j&&f.jsxs("span",{className:"text-[10px] px-1.5 py-0.2 rounded bg-amber-500/10 text-amber-600 dark:text-amber-400 border border-amber-500/20 font-medium flex items-center gap-0.5",children:[f.jsx(fo,{className:"w-2.5 h-2.5 fill-amber-500"})," 贴图封面默认"]}),B&&f.jsxs("span",{className:"text-[10px] px-1.5 py-0.2 rounded bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 border border-emerald-500/20 font-medium flex items-center gap-0.5",children:[f.jsx(fo,{className:"w-2.5 h-2.5 fill-emerald-500"})," 贴图内容默认"]})]}),f.jsxs("div",{className:"text-[10px] text-[#888888] dark:text-[#666666] font-mono mt-0.5",children:[Y.aspectRatio," • 字号: ",Y.algorithm.baseFontSize,"px",Y.images&&Y.images.length>0&&` • 配图: ${Y.images.length}个`]})]})]}),f.jsxs("div",{className:"flex items-center gap-2 self-end sm:self-auto",children:[Y.id&&f.jsxs("select",{value:"",onChange:k=>{k.target.value&&G(k.target.value,Y.id)},className:"text-[11px] bg-white dark:bg-[#1a1a1a] border border-[#d4d4d4] dark:border-[#333333] text-[#666666] dark:text-[#aaaaaa] rounded px-2 py-1 focus:outline-none",title:"为此账号设为某个槽位的默认模板",children:[f.jsx("option",{value:"",children:"设为槽位默认..."}),f.jsx("option",{value:"article_cover",children:"设为「文章封面默认」"}),f.jsx("option",{value:"newspic_cover",children:"设为「贴图封面默认」"}),f.jsx("option",{value:"newspic_content",children:"设为「贴图内容默认」"})]}),f.jsxs("button",{onClick:()=>{r(Y),c()},className:"flex items-center gap-1 px-2.5 py-1 bg-white dark:bg-[#1f1f1f] hover:bg-emerald-50 dark:hover:bg-emerald-500/20 text-[#333333] dark:text-[#cccccc] hover:text-emerald-700 dark:hover:text-emerald-400 border border-[#d4d4d4] dark:border-[#2a2a2a] hover:border-emerald-500/40 rounded text-xs transition-all font-medium",children:[f.jsx(q1,{className:"w-3 h-3"}),f.jsx("span",{children:"套用"})]}),Y.id&&!Y.id.startsWith("tpl_wechat_")&&!Y.id.startsWith("tpl_longform_")&&!Y.id.startsWith("tpl_square_")&&!Y.id.startsWith("tpl_wide_")&&f.jsx("button",{onClick:()=>D(Y.id),className:"p-1 text-[#888888] dark:text-[#555555] hover:text-red-500 rounded hover:bg-[#f0f0f0] dark:hover:bg-[#1f1f1f]",title:"删除自定义模板",children:f.jsx(vh,{className:"w-3.5 h-3.5"})})]})]},Y.id)})})]})]})})},xo="typeset_studio_admin_key";function Yp(){const[u,c]=me.useState(()=>localStorage.getItem(xo)||""),[o,r]=me.useState(null),[d,h]=me.useState(!1),b=async y=>{if(!y)return r(!1),!1;h(!0);try{const g=!!(await(await fetch("/api/auth/verify",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:y})})).json()).ok;return r(g),g}catch{return r(!1),!1}finally{h(!1)}},v=y=>{localStorage.setItem(xo,y),c(y),b(y)};return me.useEffect(()=>{(async()=>{let m=u;if(!m)try{const g=await(await fetch("/api/auth/current-key")).json();g.ok&&g.key&&(m=g.key,c(g.key),localStorage.setItem(xo,g.key))}catch{}m?b(m):r(!1)})()},[]),{adminKey:u,setAdminKey:v,isVerified:o,isVerifying:d,verifyKey:b}}const Xp=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],p1=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function Qp(u){if(u<=255)return Xp[u];let c=0,o=p1.length-1;for(;c<=o;){const r=c+o>>1,d=p1[r];if(u<d[0]){o=r-1;continue}if(u>d[1]){c=r+1;continue}return d[2]}return"L"}function Vp(u){const c=u.length;if(c===0)return null;const o=new Array(c);let r=!1;for(let m=0;m<c;){const p=u.charCodeAt(m);let g=p,N=1;if(p>=55296&&p<=56319&&m+1<c){const V=u.charCodeAt(m+1);V>=56320&&V<=57343&&(g=(p-55296<<10)+(V-56320)+65536,N=2)}const C=Qp(g);(C==="R"||C==="AL"||C==="AN")&&(r=!0);for(let V=0;V<N;V++)o[m+V]=C;m+=N}if(!r)return null;let d=0;for(let m=0;m<c;m++){const p=o[m];if(p==="L"){d=0;break}if(p==="R"||p==="AL"){d=1;break}}const h=new Int8Array(c);for(let m=0;m<c;m++)h[m]=d;const b=d&1?"R":"L",v=b;let y=v;for(let m=0;m<c;m++)o[m]==="NSM"?o[m]=y:y=o[m];y=v;for(let m=0;m<c;m++){const p=o[m];p==="EN"?o[m]=y==="AL"?"AN":"EN":(p==="R"||p==="L"||p==="AL")&&(y=p)}for(let m=0;m<c;m++)o[m]==="AL"&&(o[m]="R");for(let m=1;m<c-1;m++)o[m]==="ES"&&o[m-1]==="EN"&&o[m+1]==="EN"&&(o[m]="EN"),o[m]==="CS"&&(o[m-1]==="EN"||o[m-1]==="AN")&&o[m+1]===o[m-1]&&(o[m]=o[m-1]);for(let m=0;m<c;m++){if(o[m]!=="EN")continue;let p;for(p=m-1;p>=0&&o[p]==="ET";p--)o[p]="EN";for(p=m+1;p<c&&o[p]==="ET";p++)o[p]="EN"}for(let m=0;m<c;m++){const p=o[m];(p==="WS"||p==="ES"||p==="ET"||p==="CS")&&(o[m]="ON")}y=v;for(let m=0;m<c;m++){const p=o[m];p==="EN"?o[m]=y==="L"?"L":"EN":(p==="R"||p==="L")&&(y=p)}for(let m=0;m<c;m++){if(o[m]!=="ON")continue;let p=m+1;for(;p<c&&o[p]==="ON";)p++;const g=m>0?o[m-1]:v,N=p<c?o[p]:v,C=g!=="L"?"R":"L";if(C===(N!=="L"?"R":"L"))for(let W=m;W<p;W++)o[W]=C;m=p-1}for(let m=0;m<c;m++)o[m]==="ON"&&(o[m]=b);for(let m=0;m<c;m++){const p=o[m];(h[m]&1)===0?p==="R"?h[m]++:(p==="AN"||p==="EN")&&(h[m]+=2):(p==="L"||p==="AN"||p==="EN")&&h[m]++}return h}function Zp(u,c){const o=Vp(u);if(o===null)return null;const r=new Int8Array(c.length);for(let d=0;d<c.length;d++)r[d]=o[c[d]];return r}const Kp=/[ \t\n\r\f]+/g,Jp=/[\t\n\r\f]| {2,}|^ | $/;function Ip(u){const c=u??"normal";return c==="pre-wrap"?{mode:c,preserveOrdinarySpaces:!0,preserveHardBreaks:!0}:{mode:c,preserveOrdinarySpaces:!1,preserveHardBreaks:!1}}function Wp(u){if(!Jp.test(u))return u;let c=u.replace(Kp," ");return c.charCodeAt(0)===32&&(c=c.slice(1)),c.length>0&&c.charCodeAt(c.length-1)===32&&(c=c.slice(0,-1)),c}function $p(u){return/[\r\f]/.test(u)?u.replace(/\r\n/g,`
293
- `).replace(/[\r\f]/g,`
294
- `):u}let pc=null,Pp;function ev(){return pc===null&&(pc=new Intl.Segmenter(Pp,{granularity:"word"})),pc}function tv(){pc=null}const lv=/\p{Script=Arabic}/u,cn=/\p{M}/u,Fo=/\p{Nd}/u;function v1(u){return lv.test(u)}function b1(u){return u>=19968&&u<=40959||u>=13312&&u<=19903||u>=131072&&u<=173791||u>=173824&&u<=177983||u>=177984&&u<=178207||u>=178208&&u<=183983||u>=183984&&u<=191471||u>=191472&&u<=192093||u>=194560&&u<=195103||u>=196608&&u<=201551||u>=201552&&u<=205743||u>=205744&&u<=210041||u>=63744&&u<=64255||u>=12288&&u<=12351||u>=12352&&u<=12447||u>=12448&&u<=12543||u>=12592&&u<=12687||u>=44032&&u<=55215||u>=65280&&u<=65519}function dl(u){for(let c=0;c<u.length;c++){const o=u.charCodeAt(c);if(!(o<12288)){if(o>=55296&&o<=56319&&c+1<u.length){const r=u.charCodeAt(c+1);if(r>=56320&&r<=57343){const d=(o-55296<<10)+(r-56320)+65536;if(b1(d))return!0;c++;continue}}if(b1(o))return!0}}return!1}function nv(u){const c=ji(u);return c!==null&&(To.has(c)||_n.has(c))}const av=new Set([" "," ","⁠","\uFEFF"]),iv=new Set(["-","‐","–","—"]);function uv(u){const c=ji(u);return c!==null&&av.has(c)}function cv(u){const c=ji(u);return c!==null&&iv.has(c)}function Mh(u,c){return uv(u)?!1:c?!(nv(u)||cv(u)):!0}const To=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),Cc=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),wo=new Set(["'","’"]),_n=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),rv=new Set([":",".","،","؛"]),sv=new Set(["၏"]),ov=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function fv(u){if(Do(u))return!0;let c=!1;for(const o of u){if(_n.has(o)||kc(o)){c=!0;continue}if(!(c&&cn.test(o)))return!1}return c}function dv(u){for(const c of u)if(!To.has(c)&&!_n.has(c))return!1;return u.length>0}function xv(u){if(Do(u))return!0;for(const c of u)if(!Cc.has(c)&&!wo.has(c)&&!cn.test(c)&&!kc(c))return!1;return u.length>0}function Do(u){let c=!1;for(const o of u)if(!(o==="\\"||cn.test(o))){if(Cc.has(o)||_n.has(o)||wo.has(o)){c=!0;continue}return!1}return c}function Mc(u,c){const o=c-1;if(o<=0)return Math.max(o,0);const r=u.charCodeAt(o);if(r<56320||r>57343)return o;const d=o-1;if(d<0)return o;const h=u.charCodeAt(d);return h>=55296&&h<=56319?d:o}function ji(u){if(u.length===0)return null;const c=Mc(u,u.length);return u.slice(c)}function hv(u){for(const c of u)if(!cn.test(c))return c;return null}function mv(u){for(let c=u.length;c>0;){const o=Mc(u,c),r=u.slice(o,c);if(!cn.test(r))return r;c=o}return null}const gv=[36,37,43,43,92,92,162,165,176,177,1423,1423,1545,1547,1642,1642,2046,2047,2546,2547,2553,2555,2801,2801,3065,3065,3449,3449,3647,3647,6107,6107,8240,8247,8279,8279,8352,8399,8451,8451,8457,8457,8470,8470,8722,8723,43064,43064,65020,65020,65129,65130,65284,65285,65504,65505,65509,65510,73693,73696,123647,123647,126124,126124,126128,126128];function pv(u,c){for(let o=0;o<c.length;o+=2)if(u>=c[o]&&u<=c[o+1])return!0;return!1}function kc(u){const c=u.codePointAt(0);return c!==void 0&&pv(c,gv)}function vv(u){const c=mv(u);return c!==null&&kc(c)}function bv(u){const c=hv(u);return c!==null&&Fo.test(c)}function yv(u){const c=Array.from(u);let o=c.length;for(;o>0;){const r=c[o-1];if(cn.test(r)){o--;continue}if(Cc.has(r)||wo.has(r)){o--;continue}break}return o<=0||o===c.length?null:{head:c.slice(0,o).join(""),tail:c.slice(o).join("")}}function Nv(u,c,o){return o==="text"&&!c&&u.length===1&&u!=="-"&&u!=="—"?u:null}function y1(u,c,o,r){const d=c[r],h=u[r];if(d==null)return h;const b=o[r];if(h.length===b)return h;const v=d.repeat(b);return u[r]=v,v}function N1(u,c){return u&&c!==null&&rv.has(c)}function Sv(u){const c=ji(u);return c!==null&&sv.has(c)}function Ev(u){if(u.length<2||u[0]!==" ")return null;const c=u.slice(1);return/^\p{M}+$/u.test(c)?{space:" ",marks:c}:null}function yo(u){let c=u.length;for(;c>0;){const o=Mc(u,c),r=u.slice(o,c);if(ov.has(r))return!0;if(!_n.has(r))return!1;c=o}return!1}function Av(u,c){if(c.preserveOrdinarySpaces||c.preserveHardBreaks){if(u===" ")return"preserved-space";if(u===" ")return"tab";if(c.preserveHardBreaks&&u===`
295
- `)return"hard-break"}return u===" "?"space":u===" "||u===" "||u==="⁠"||u==="\uFEFF"?"glue":u==="​"?"zero-width-break":u==="­"?"soft-hyphen":"text"}const Cv=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function Pt(u){return u.length===1?u[0]:u.join("")}function Mv(u,c){const o=[];for(let r=u.length-1;r>=0;r--)o.push(u[r]);return o.push(c),Pt(o)}function kv(u,c,o,r){if(!Cv.test(u))return[{text:u,isWordLike:c,kind:"text",start:o}];const d=[];let h=null,b=[],v=o,y=!1,m=0;for(const p of u){const g=Av(p,r),N=g==="text"&&c;if(h!==null&&g===h&&N===y){b.push(p),m+=p.length;continue}h!==null&&d.push({text:Pt(b),isWordLike:y,kind:h,start:v}),h=g,b=[p],v=o+m,y=N,m+=p.length}return h!==null&&d.push({text:Pt(b),isWordLike:y,kind:h,start:v}),d}function No(u){return u==="space"||u==="preserved-space"||u==="zero-width-break"||u==="hard-break"}const Fv=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function Tv(u,c){const o=u.texts[c];return o.startsWith("www.")?!0:Fv.test(o)&&c+1<u.len&&u.kinds[c+1]==="text"&&u.texts[c+1]==="//"}function wv(u){return u.includes("?")&&(u.includes("://")||u.startsWith("www."))}function Dv(u){const c=u.texts.slice(),o=u.isWordLike.slice(),r=u.kinds.slice(),d=u.starts.slice();for(let b=0;b<u.len;b++){if(r[b]!=="text"||!Tv(u,b))continue;const v=[c[b]];let y=b+1;for(;y<u.len&&!No(r[y]);){v.push(c[y]),o[b]=!0;const m=c[y].includes("?");if(r[y]="text",c[y]="",y++,m)break}c[b]=Pt(v)}let h=0;for(let b=0;b<c.length;b++){const v=c[b];v.length!==0&&(h!==b&&(c[h]=v,o[h]=o[b],r[h]=r[b],d[h]=d[b]),h++)}return c.length=h,o.length=h,r.length=h,d.length=h,{len:h,texts:c,isWordLike:o,kinds:r,starts:d}}function Bv(u){const c=[],o=[],r=[],d=[];for(let h=0;h<u.len;h++){const b=u.texts[h];if(c.push(b),o.push(u.isWordLike[h]),r.push(u.kinds[h]),d.push(u.starts[h]),!wv(b))continue;const v=h+1;if(v>=u.len||No(u.kinds[v]))continue;const y=[],m=u.starts[v];let p=v;for(;p<u.len&&!No(u.kinds[p]);)y.push(u.texts[p]),p++;y.length>0&&(c.push(Pt(y)),o.push(!0),r.push("text"),d.push(m),h=p-1)}return{len:c.length,texts:c,isWordLike:o,kinds:r,starts:d}}const Ov=new Set([":","-","/","×",",",".","+","–","—"]),jv=/[\p{P}\p{S}\p{Co}]/u,zv=/\p{Emoji_Presentation}/u,_v=new Set(["?","֊","-","‐","‒","–","—","…","‼","‽","⁉"]);function Rv(u){return u>=33&&u<=47&&u!==45||u>=58&&u<=64&&u!==63||u>=91&&u<=96||u>=123&&u<=126}function kh(u){const c=u.charCodeAt(0);return c<128?Rv(c):!_v.has(u)&&!zv.test(u)&&jv.test(u)}function S1(u){let c=!1;for(const o of u)if(!cn.test(o)){if(!kh(o))return!1;c=!0}return c}function Lv(u){for(let c=u.length;c>0;){const o=Mc(u,c),r=u.slice(o,c);if(cn.test(r)){c=o;continue}return kh(r)||kc(r)}return!1}function Hv(u,c,o,r){const d=!c&&S1(u),h=!r&&S1(o),b=vv(u),v=(c||b)&&Lv(u);return!d&&!h&&!v||dl(u)||dl(o)?!1:(c||d||b)&&(r||h)}function Fh(u){for(const c of u)if(Fo.test(c))return!0;return!1}function Nc(u){if(u.length===0)return!1;for(const c of u)if(!(Fo.test(c)||Ov.has(c)))return!1;return!0}function Uv(u){const c=[],o=[],r=[],d=[];for(let h=0;h<u.len;h++){const b=u.texts[h],v=u.kinds[h];if(v==="text"&&Nc(b)&&Fh(b)){const y=[b];let m=h+1;for(;m<u.len&&u.kinds[m]==="text"&&Nc(u.texts[m]);)y.push(u.texts[m]),m++;c.push(Pt(y)),o.push(!0),r.push("text"),d.push(u.starts[h]),h=m-1;continue}c.push(b),o.push(u.isWordLike[h]),r.push(v),d.push(u.starts[h])}return{len:c.length,texts:c,isWordLike:o,kinds:r,starts:d}}function qv(u){const c=[],o=[],r=[],d=[];let h=0;for(;h<u.len;){const b=u.texts[h],v=u.kinds[h],y=u.isWordLike[h];if(v==="text"){const m=[b];let p=h+1,g=y;for(;p<u.len&&u.kinds[p]==="text"&&Hv(u.texts[p-1],u.isWordLike[p-1],u.texts[p],u.isWordLike[p]);){const N=u.texts[p];m.push(N),g=g||u.isWordLike[p],p++}if(p>h+1){c.push(Pt(m)),o.push(g),r.push("text"),d.push(u.starts[h]),h=p;continue}}c.push(b),o.push(y),r.push(v),d.push(u.starts[h]),h++}return{len:c.length,texts:c,isWordLike:o,kinds:r,starts:d}}function Gv(u){const c=[],o=[],r=[],d=[];for(let h=0;h<u.len;h++){const b=u.texts[h];if(u.kinds[h]==="text"&&b.includes("-")){const v=b.split("-");let y=v.length>1;for(let m=0;m<v.length;m++){const p=v[m];if(!y)break;(p.length===0||!Fh(p)||!Nc(p))&&(y=!1)}if(y){let m=0;for(let p=0;p<v.length;p++){const g=v[p],N=p<v.length-1?`${g}-`:g;c.push(N),o.push(!0),r.push("text"),d.push(u.starts[h]+m),m+=N.length}continue}}c.push(b),o.push(u.isWordLike[h]),r.push(u.kinds[h]),d.push(u.starts[h])}return{len:c.length,texts:c,isWordLike:o,kinds:r,starts:d}}function Yv(u){const c=[],o=[],r=[],d=[];let h=0;for(;h<u.len;){const b=[u.texts[h]];let v=u.isWordLike[h],y=u.kinds[h],m=u.starts[h];if(y==="glue"){const p=[b[0]],g=m;for(h++;h<u.len&&u.kinds[h]==="glue";)p.push(u.texts[h]),h++;const N=Pt(p);if(h<u.len&&u.kinds[h]==="text")b[0]=N,b.push(u.texts[h]),v=u.isWordLike[h],y="text",m=g,h++;else{c.push(N),o.push(!1),r.push("glue"),d.push(g);continue}}else h++;if(y==="text")for(;h<u.len&&u.kinds[h]==="glue";){const p=[];for(;h<u.len&&u.kinds[h]==="glue";)p.push(u.texts[h]),h++;const g=Pt(p);if(h<u.len&&u.kinds[h]==="text"){b.push(g,u.texts[h]),v=v||u.isWordLike[h],h++;continue}b.push(g)}c.push(Pt(b)),o.push(v),r.push(y),d.push(m)}return{len:c.length,texts:c,isWordLike:o,kinds:r,starts:d}}function Xv(u){const c=u.texts.slice(),o=u.isWordLike.slice(),r=u.kinds.slice(),d=u.starts.slice();for(let h=0;h<c.length-1;h++){if(r[h]!=="text"||r[h+1]!=="text"||!dl(c[h])||!dl(c[h+1]))continue;const b=yv(c[h]);b!==null&&(c[h]=b.head,c[h+1]=b.tail+c[h+1],d[h+1]=d[h]+b.head.length)}return{len:c.length,texts:c,isWordLike:o,kinds:r,starts:d}}function Qv(u,c,o){const r=ev();let d=0;const h=[],b=[],v=[],y=[],m=[],p=[],g=[],N=[],C=[],V=[],W=[],L=[];for(const Z of r.segment(u))for(const ee of kv(Z.segment,Z.isWordLike??!1,Z.index,o)){let B=function(){p[j]!==null&&(b[j]=[y1(h,p,g,j)],p[j]=null),b[j].push(ee.text),v[j]=v[j]||ee.isWordLike,N[j]=N[j]||X,C[j]=C[j]||D,V[j]=Y,W[j]=ae,L[j]=N1(C[j],$)};const G=ee.kind==="text",A=Nv(ee.text,ee.isWordLike,ee.kind),X=dl(ee.text),D=v1(ee.text),$=ji(ee.text),Y=yo(ee.text),ae=Sv(ee.text),j=d-1;c.carryCJKAfterClosingQuote&&G&&d>0&&y[j]==="text"&&X&&N[j]&&V[j]||G&&d>0&&y[j]==="text"&&dv(ee.text)&&N[j]||G&&d>0&&y[j]==="text"&&W[j]?B():G&&d>0&&y[j]==="text"&&ee.isWordLike&&D&&L[j]?(B(),v[j]=!0):A!==null&&d>0&&y[j]==="text"&&p[j]===A?g[j]=(g[j]??1)+1:G&&!ee.isWordLike&&d>0&&y[j]==="text"&&!N[j]&&(fv(ee.text)||ee.text==="-"&&v[j])?B():(h[d]=ee.text,b[d]=[ee.text],v[d]=ee.isWordLike,y[d]=ee.kind,m[d]=ee.start,p[d]=A,g[d]=A===null?0:1,N[d]=X,C[d]=D,V[d]=Y,W[d]=ae,L[d]=N1(D,$),d++)}for(let Z=0;Z<d;Z++){if(p[Z]!==null){h[Z]=y1(h,p,g,Z);continue}h[Z]=Pt(b[Z])}for(let Z=1;Z<d;Z++)y[Z]==="text"&&!v[Z]&&Do(h[Z])&&y[Z-1]==="text"&&!N[Z-1]&&(h[Z-1]+=h[Z],v[Z-1]=v[Z-1]||v[Z],h[Z]="");const U=Array.from({length:d},()=>null);let te=-1;for(let Z=d-1;Z>=0;Z--){const ee=h[Z];if(ee.length!==0){if(y[Z]==="text"&&!v[Z]&&te>=0&&y[te]==="text"&&(xv(ee)||ee==="-"&&bv(h[te]))){const G=U[te]??[];G.push(ee),U[te]=G,m[te]=m[Z],h[Z]="";continue}te=Z}}for(let Z=0;Z<d;Z++){const ee=U[Z];ee!=null&&(h[Z]=Mv(ee,h[Z]))}let le=0;for(let Z=0;Z<d;Z++){const ee=h[Z];ee.length!==0&&(le!==Z&&(h[le]=ee,v[le]=v[Z],y[le]=y[Z],m[le]=m[Z]),le++)}h.length=le,v.length=le,y.length=le,m.length=le;const oe=Yv({len:le,texts:h,isWordLike:v,kinds:y,starts:m}),ce=Xv(qv(Gv(Uv(Bv(Dv(oe))))));for(let Z=0;Z<ce.len-1;Z++){const ee=Ev(ce.texts[Z]);ee!==null&&(ce.kinds[Z]!=="space"&&ce.kinds[Z]!=="preserved-space"||ce.kinds[Z+1]!=="text"||!v1(ce.texts[Z+1])||(ce.texts[Z]=ee.space,ce.isWordLike[Z]=!1,ce.kinds[Z]=ce.kinds[Z]==="preserved-space"?"preserved-space":"space",ce.texts[Z+1]=ee.marks+ce.texts[Z+1],ce.starts[Z+1]=ce.starts[Z]+ee.space.length))}return ce}function Vv(u,c){if(u.len===0)return[];if(!c.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:u.len,consumedEndSegmentIndex:u.len}];const o=[];let r=0;for(let d=0;d<u.len;d++)u.kinds[d]==="hard-break"&&(o.push({startSegmentIndex:r,endSegmentIndex:d,consumedEndSegmentIndex:d+1}),r=d+1);return r<u.len&&o.push({startSegmentIndex:r,endSegmentIndex:u.len,consumedEndSegmentIndex:u.len}),o}function Zv(u,c,o){if(c.len<=1)return c;const r=[],d=[],h=[],b=[];let v=-1,y=!1;function m(N){r.push(c.texts[N]),d.push(c.isWordLike[N]),h.push("text"),b.push(c.starts[N])}function p(N,C){let V=!1;for(let U=N;U<C;U++)V=V||c.isWordLike[U];const W=c.starts[N],L=C<c.len?c.starts[C]:u.length;r.push(u.slice(W,L)),d.push(V),h.push("text"),b.push(W)}function g(N){if(!(v<0)){if(y)v+1===N?m(v):p(v,N);else for(let C=v;C<N;C++)m(C);v=-1,y=!1}}for(let N=0;N<c.len;N++){const C=c.texts[N],V=c.kinds[N];if(V==="text"){v>=0&&!Mh(c.texts[N-1],o)&&g(N),v<0&&(v=N),y=y||dl(C);continue}g(N),r.push(C),d.push(c.isWordLike[N]),h.push(V),b.push(c.starts[N])}return g(c.len),{len:r.length,texts:r,isWordLike:d,kinds:h,starts:b}}function Kv(u,c,o="normal",r="normal"){const d=Ip(o),h=d.mode==="pre-wrap"?$p(u):Wp(u);if(h.length===0)return{normalized:h,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const b=Qv(h,c,d),v=r==="keep-all"?Zv(h,b,c.breakKeepAllAfterPunctuation):b;return{normalized:h,chunks:Vv(v,d),...v}}let Da=null;const So=new Map;let Ba=null;const Jv=96,Iv=/\p{Emoji_Presentation}/u,Wv=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let vc=null;const Eo=new Map;function Bo(){if(Da!==null)return Da;if(typeof OffscreenCanvas<"u")return Da=new OffscreenCanvas(1,1).getContext("2d"),Da;if(typeof document<"u")return Da=document.createElement("canvas").getContext("2d"),Da;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function $v(u){let c=So.get(u);return c||(c=new Map,So.set(u,c)),c}function un(u,c){let o=c.get(u);return o===void 0&&(o={width:Bo().measureText(u).width,containsCJK:dl(u)},c.set(u,o)),o}function Ra(){if(Ba!==null)return Ba;if(typeof navigator>"u")return Ba={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Ba;const u=navigator.userAgent,o=navigator.vendor==="Apple Computer, Inc."&&u.includes("Safari/")&&!u.includes("Chrome/")&&!u.includes("Chromium/")&&!u.includes("CriOS/")&&!u.includes("FxiOS/")&&!u.includes("EdgiOS/"),r=u.includes("Chrome/")||u.includes("Chromium/")||u.includes("CriOS/")||u.includes("Edg/");return Ba={lineFitEpsilon:o?1/64:.005,carryCJKAfterClosingQuote:r,breakKeepAllAfterPunctuation:!o,preferPrefixWidthsForBreakableRuns:o,preferEarlySoftHyphenBreak:o},Ba}function Pv(u){const c=u.match(/(\d+(?:\.\d+)?)\s*px/);return c?parseFloat(c[1]):16}function Th(){return vc===null&&(vc=new Intl.Segmenter(void 0,{granularity:"grapheme"})),vc}function eb(u){return Iv.test(u)||u.includes("️")}function tb(u){return Wv.test(u)}function lb(u,c){let o=Eo.get(u);if(o!==void 0)return o;const r=Bo();r.font=u;const d=r.measureText("😀").width;if(o=0,d>c+.5&&typeof document<"u"&&document.body!==null){const h=document.createElement("span");h.style.font=u,h.style.display="inline-block",h.style.visibility="hidden",h.style.position="absolute",h.textContent="😀",document.body.appendChild(h);const b=h.getBoundingClientRect().width;document.body.removeChild(h),d-b>.5&&(o=d-b)}return Eo.set(u,o),o}function nb(u){let c=0;const o=Th();for(const r of o.segment(u))eb(r.segment)&&c++;return c}function ab(u,c){return c.emojiCount===void 0&&(c.emojiCount=nb(u)),c.emojiCount}function zn(u,c,o){return o===0?c.width:c.width-ab(u,c)*o}function ib(u,c,o,r,d){if(c.breakableFitAdvances!==void 0&&c.breakableFitMode===d)return c.breakableFitAdvances;c.breakableFitMode=d;const h=Th(),b=[];for(const p of h.segment(u))b.push(p.segment);if(b.length<=1)return c.breakableFitAdvances=null,c.breakableFitAdvances;if(d==="sum-graphemes"){const p=[];for(const g of b){const N=un(g,o);p.push(zn(g,N,r))}return c.breakableFitAdvances=p,c.breakableFitAdvances}if(d==="pair-context"||b.length>Jv){const p=[];let g=null,N=0;for(const C of b){const V=un(C,o),W=zn(C,V,r);if(g===null)p.push(W);else{const L=g+C,U=un(L,o);p.push(zn(L,U,r)-N)}g=C,N=W}return c.breakableFitAdvances=p,c.breakableFitAdvances}const v=[];let y="",m=0;for(const p of b){y+=p;const g=un(y,o),N=zn(y,g,r);v.push(N-m),m=N}return c.breakableFitAdvances=v,c.breakableFitAdvances}function ub(u,c){const o=Bo();o.font=u;const r=$v(u),d=Pv(u),h=c?lb(u,d):0;return{cache:r,fontSize:d,emojiCorrection:h}}function cb(){So.clear(),Eo.clear(),vc=null}function rb(u){return u==="space"||u==="zero-width-break"||u==="soft-hyphen"}function Fc(u){return u==="space"||u==="preserved-space"||u==="tab"||u==="zero-width-break"||u==="soft-hyphen"}function Oo(u,c,o=u.widths.length){for(;c<o;){const r=u.kinds[c];if(!rb(r))break;c++}return c}function wh(u,c){if(c<=0)return 0;const o=u%c;return Math.abs(o)<=1e-6?c:c-o}function Dh(u,c,o){return u.letterSpacing!==0&&c&&u.spacingGraphemeCounts[o]>0?u.letterSpacing:0}function jo(u,c){return c===0?0:u+c}function sb(u,c){return u.letterSpacing!==0&&u.spacingGraphemeCounts[c]>0?u.letterSpacing:0}function Bh(u,c,o,r,d){const h=c==="tab"?d+sb(u,o):u.lineEndFitAdvances[o];return jo(r,h)}function Sc(u,c,o,r){const d=c==="tab"?0:u.lineEndFitAdvances[o];return jo(r,d)}function Ec(u,c,o,r,d){const h=c==="tab"?d:u.lineEndPaintAdvances[o];return jo(r,h)}function Oh(u,c,o){return u.letterSpacing!==0&&c?o+u.letterSpacing:o}function jh(u,c){return u.letterSpacing===0?c:c+u.letterSpacing}function _a(u,c,o){let r=c;for(;r<u.length&&u[r]<o;)r++;return r}function ob(u,c,o,r,d){if(u.letterSpacing===0)return 0;if(d>0)return u.spacingGraphemeCounts[r]>0?u.letterSpacing:0;for(let h=r-1;h>=c;h--){const b=u.kinds[h];if(!(b==="space"||b==="zero-width-break"||b==="hard-break")){if(b==="soft-hyphen"){if(h===r-1)return 0;continue}return h===c&&o>0||u.spacingGraphemeCounts[h]>0?u.letterSpacing:0}}return 0}function zh(u,c,o,r,d,h){return c+ob(u,o,r,d,h)}function fb(u,c){let o=0,r=u.chunks.length;for(;o<r;){const d=Math.floor((o+r)/2);c<u.chunks[d].consumedEndSegmentIndex?r=d:o=d+1}return o<u.chunks.length?o:-1}function db(u,c,o){let r=o.segmentIndex;if(o.graphemeIndex>0)return c;const d=u.chunks[c];return d.startSegmentIndex===d.endSegmentIndex&&r===d.startSegmentIndex||(r<d.startSegmentIndex&&(r=d.startSegmentIndex),r=Oo(u,r,d.endSegmentIndex),r<d.endSegmentIndex)?(o.segmentIndex=r,o.graphemeIndex=0,c):d.consumedEndSegmentIndex>=u.widths.length?-1:(o.segmentIndex=d.consumedEndSegmentIndex,o.graphemeIndex=0,c+1)}function xb(u,c){if(c.segmentIndex>=u.widths.length)return-1;const o=fb(u,c.segmentIndex);return o<0?-1:db(u,o,c)}function hb(u,c,o){const{widths:r,kinds:d,breakableFitAdvances:h,breakablePreferredBreaks:b}=u;if(r.length===0)return 0;const y=Ra().lineFitEpsilon,m=c+y;let p=0,g=0,N=!1,C=0,V=0,W=0,L=0,U=-1,te=0;function le(){U=-1,te=0}function oe(X=W,D=L,$=g){p++,o?.($,C,V,X,D),g=0,N=!1,le()}function ce(X,D){N=!0,C=X,V=0,W=X+1,L=0,g=D}function Z(X,D,$){N=!0,C=X,V=D,W=X,L=D+1,g=$}function ee(X,D){if(!N){ce(X,D);return}g+=D,W=X+1,L=0}function G(X,D){const $=h[X],Y=b[X]??null;let ae=Y===null?-1:_a(Y,0,D+1),j=-1,B=0,k=D;for(;k<$.length;){const O=$[k];if(!N)Z(X,k,O);else if(g+O>m){if(Y!==null&&j>D){oe(X,j,B),k=j,ae=_a(Y,ae,k+1),j=-1,B=0;continue}oe(),Z(X,k,O)}else g+=O,W=X,L=k+1;const Q=k+1;Y!==null&&Y[ae]===Q&&(j=Q,B=g,ae++),k++}N&&W===X&&L===$.length&&(W=X+1,L=0)}let A=0;for(;A<r.length&&!(!N&&(A=Oo(u,A),A>=r.length));){const X=r[A],D=d[A],$=Fc(D);if(!N){X>m&&h[A]!==null?G(A,0):ce(A,X),$&&(U=A+1,te=g-X),A++;continue}if(g+X>m){if($){ee(A,X),oe(A+1,0,g-X),A++;continue}if(U>=0){if(W>U||W===U&&L>0){oe();continue}oe(U,0,te);continue}if(X>m&&h[A]!==null){oe(),G(A,0),A++;continue}oe();continue}ee(A,X),$&&(U=A+1,te=g-X),A++}return N&&oe(),p}function mb(u,c,o){if(u.simpleLineWalkFastPath)return hb(u,c,o);const{widths:r,kinds:d,breakableFitAdvances:h,breakablePreferredBreaks:b,discretionaryHyphenWidth:v,chunks:y}=u;if(r.length===0||y.length===0)return 0;const m=Ra(),p=m.lineFitEpsilon,g=c+p;let N=0,C=0,V=!1,W=0,L=0,U=0,te=0,le=-1,oe=0,ce=0,Z=null;function ee(){le=-1,oe=0,ce=0,Z=null}function G(){return Z==="soft-hyphen"&&le===U&&te===0?ce:C}function A(B=U,k=te,O){N++,o!==void 0&&o(zh(u,O??G(),W,L,B,k),W,L,B,k),C=0,V=!1,ee()}function X(B,k){V=!0,W=B,L=0,U=B+1,te=0,C=k}function D(B,k,O){V=!0,W=B,L=k,U=B,te=k+1,C=O}function $(B,k){if(!V){X(B,k);return}C+=k,U=B+1,te=0}function Y(B,k,O,Q,P,re){if(!k)return;const ne=Sc(u,B,O,P),ie=Ec(u,B,O,P,Q);le=O+1,oe=C-re+ne,ce=C-re+ie,Z=B}function ae(B,k){const O=h[B],Q=b[B]??null;let P=Q===null?-1:_a(Q,0,k+1),re=-1,ne=0,ie=k;for(;ie<O.length;){const S=O[ie];if(!V)D(B,ie,S);else{const q=Oh(u,!0,S),I=C+q;if(jh(u,I)>g){if(Q!==null&&re>k){A(B,re,ne),ie=re,P=_a(Q,P,ie+1),re=-1,ne=0;continue}A(),D(B,ie,S)}else C=I,U=B,te=ie+1}const H=ie+1;Q!==null&&Q[P]===H&&(re=H,ne=C,P++),ie++}V&&U===B&&te===O.length&&(U=B+1,te=0)}function j(B){N++,o?.(0,B.startSegmentIndex,0,B.consumedEndSegmentIndex,0),ee()}for(let B=0;B<y.length;B++){const k=y[B];if(k.startSegmentIndex===k.endSegmentIndex){j(k);continue}V=!1,C=0,W=k.startSegmentIndex,L=0,U=k.startSegmentIndex,te=0,ee();let O=k.startSegmentIndex;for(;O<k.endSegmentIndex&&!(!V&&(O=Oo(u,O,k.endSegmentIndex),O>=k.endSegmentIndex));){const Q=d[O],P=Fc(Q),re=Dh(u,V,O),ne=Q==="tab"?wh(C+re,u.tabStopAdvance):r[O],ie=re+ne,S=Bh(u,Q,O,re,ne);if(Q==="soft-hyphen"){V&&(U=O+1,te=0,le=O+1,oe=C+v,ce=C+v,Z=Q),O++;continue}if(!V){S>g&&h[O]!==null?ae(O,0):X(O,ne),Y(Q,P,O,ne,re,ie),O++;continue}if(C+S>g){const q=C+Sc(u,Q,O,re),I=C+Ec(u,Q,O,re,ne);if(Z==="soft-hyphen"&&m.preferEarlySoftHyphenBreak&&oe<=g){A(le,0,ce);continue}if(P&&q<=g){$(O,ie),A(O+1,0,I),O++;continue}if(le>=0&&oe<=g){if(U>le||U===le&&te>0){A();continue}const ge=le;A(ge,0,ce),O=ge;continue}if(S>g&&h[O]!==null){A(),ae(O,0),O++;continue}A();continue}$(O,ie),Y(Q,P,O,ne,re,ie),O++}if(V){const Q=le===k.consumedEndSegmentIndex?ce:C;A(k.consumedEndSegmentIndex,0,Q)}}return N}function gb(u,c,o,r){const d=u.chunks[o];if(d.startSegmentIndex===d.endSegmentIndex)return c.segmentIndex=d.consumedEndSegmentIndex,c.graphemeIndex=0,0;const{widths:h,kinds:b,breakableFitAdvances:v,breakablePreferredBreaks:y,discretionaryHyphenWidth:m}=u,p=Ra(),g=p.lineFitEpsilon,N=r+g,C=c.segmentIndex,V=c.graphemeIndex;let W=0,L=!1,U=c.segmentIndex,te=c.graphemeIndex,le=-1,oe=0,ce=0,Z=null;function ee(){return Z==="soft-hyphen"&&le===U&&te===0?ce:W}function G(j=U,B=te,k=ee()){return L?(c.segmentIndex=j,c.graphemeIndex=B,zh(u,k,C,V,j,B)):null}function A(j,B){L=!0,U=j+1,te=0,W=B}function X(j,B,k){L=!0,U=j,te=B+1,W=k}function D(j,B){if(!L){A(j,B);return}W+=B,U=j+1,te=0}function $(j,B,k,O,Q,P){if(!B)return;const re=Sc(u,j,k,Q),ne=Ec(u,j,k,Q,O);le=k+1,oe=W-P+re,ce=W-P+ne,Z=j}function Y(j,B){const k=v[j],O=y[j]??null;let Q=O===null?-1:_a(O,0,B+1),P=-1,re=0;for(let ne=B;ne<k.length;ne++){const ie=k[ne];if(!L)X(j,ne,ie);else{const H=Oh(u,!0,ie),q=W+H;if(jh(u,q)>N)return O!==null&&P>B?G(j,P,re):G();W=q,U=j,te=ne+1}const S=ne+1;O!==null&&O[Q]===S&&(P=S,re=W,Q++)}return L&&U===j&&te===k.length&&(U=j+1,te=0),null}function ae(){return Z!=="soft-hyphen"||le<0?null:oe<=N?G(le,0,ce):null}for(let j=c.segmentIndex;j<d.endSegmentIndex;j++){const B=b[j],k=Fc(B),O=j===c.segmentIndex?c.graphemeIndex:0,Q=Dh(u,L,j),P=B==="tab"?wh(W+Q,u.tabStopAdvance):h[j],re=Q+P,ne=Bh(u,B,j,Q,P);if(B==="soft-hyphen"&&O===0){L&&(U=j+1,te=0,le=j+1,oe=W+m,ce=W+m,Z=B);continue}if(!L){if(O>0){const S=Y(j,O);if(S!==null)return S}else if(ne>N&&v[j]!==null){const S=Y(j,0);if(S!==null)return S}else A(j,P);$(B,k,j,P,Q,re);continue}if(W+ne>N){const S=W+Sc(u,B,j,Q),H=W+Ec(u,B,j,Q,P);if(Z==="soft-hyphen"&&p.preferEarlySoftHyphenBreak&&oe<=N)return G(le,0,ce);const q=ae();if(q!==null)return q;if(k&&S<=N)return D(j,re),G(j+1,0,H);if(le>=0&&oe<=N)return U>le||U===le&&te>0?G():G(le,0,ce);if(ne>N&&v[j]!==null){const I=G();if(I!==null)return I;const ge=Y(j,0);if(ge!==null)return ge}return G()}D(j,re),$(B,k,j,P,Q,re)}return le===d.consumedEndSegmentIndex&&te===0?G(d.consumedEndSegmentIndex,0,ce):G(d.consumedEndSegmentIndex,0,W)}function pb(u,c,o){const{widths:r,kinds:d,breakableFitAdvances:h,breakablePreferredBreaks:b}=u,y=Ra().lineFitEpsilon,m=o+y;let p=0,g=!1,N=c.segmentIndex,C=c.graphemeIndex,V=-1,W=0;for(let L=c.segmentIndex;L<r.length;L++){const U=d[L],te=Fc(U),le=L===c.segmentIndex?c.graphemeIndex:0,oe=h[L],ce=r[L];if(!g){if(le>0||ce>m&&oe!==null){const Z=oe,ee=b[L]??null;let G=ee===null?-1:_a(ee,0,le+1),A=-1,X=0;const D=Z[le];g=!0,p=D,N=L,C=le+1,ee!==null&&ee[G]===C&&(A=C,X=p,G++);for(let $=le+1;$<Z.length;$++){const Y=Z[$];if(p+Y>m)return ee!==null&&A>le?(c.segmentIndex=L,c.graphemeIndex=A,X):(c.segmentIndex=N,c.graphemeIndex=C,p);p+=Y,N=L,C=$+1,ee!==null&&ee[G]===C&&(A=C,X=p,G++)}N===L&&C===Z.length&&(N=L+1,C=0)}else g=!0,p=ce,N=L+1,C=0;te&&(V=L+1,W=p-ce);continue}if(p+ce>m)return te?(c.segmentIndex=L+1,c.graphemeIndex=0,p):V>=0?N>V||N===V&&C>0?(c.segmentIndex=N,c.graphemeIndex=C,p):(c.segmentIndex=V,c.graphemeIndex=0,W):(c.segmentIndex=N,c.graphemeIndex=C,p);p+=ce,N=L+1,C=0,te&&(V=L+1,W=p-ce)}return g?(c.segmentIndex=N,c.graphemeIndex=C,p):null}function vb(u,c,o,r){return u.simpleLineWalkFastPath?pb(u,c,r):gb(u,c,o,r)}function Ao(u,c,o){const r=xb(u,c);return r<0?null:vb(u,c,r,o)}let bc=null,Co=new WeakMap;function bb(){return bc===null&&(bc=new Intl.Segmenter(void 0,{granularity:"grapheme"})),bc}function E1(u,c,o){let r=o.get(u);if(r!==void 0)return r;r=[];const d=bb();for(const h of d.segment(c[u]))r.push(h.segment);return o.set(u,r),r}function yb(u,c,o){return o>c&&u[o-1]==="soft-hyphen"}function A1(u,c,o,r){for(let d=o;d<r;d++)u+=c[d];return u}function Nb(u){let c=Co.get(u);return c!==void 0||(c=new Map,Co.set(u,c)),c}function Sb(u,c,o,r,d,h){let b="";const v=yb(u.kinds,o,d);for(let y=o;y<d;y++)if(!(u.kinds[y]==="soft-hyphen"||u.kinds[y]==="hard-break"))if(y===o&&r>0){const m=E1(y,u.segments,c);b=A1(b,m,r,m.length)}else b+=u.segments[y];if(h>0){v&&(b+="-");const y=E1(d,u.segments,c);b=A1(b,y,o===d?r:0,h)}else v&&(b+="-");return b}function Eb(){bc=null,Co=new WeakMap}let yc=null;function zo(){return yc===null&&(yc=new Intl.Segmenter(void 0,{granularity:"grapheme"})),yc}function Ab(u){return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]}}function Cb(u,c){const o=[];let r=[],d=0,h=!1,b=!1,v=!1;function y(){r.length!==0&&(o.push({text:r.length===1?r[0]:r.join(""),start:d}),r=[],h=!1,b=!1,v=!1)}function m(g,N,C){r=[g],d=N,h=C,b=yo(g),v=Cc.has(g)}function p(g,N){r.push(g),h=h||N;const C=yo(g);g.length===1&&_n.has(g)?b=b||C:b=C,v=!1}for(const g of zo().segment(u)){const N=g.segment,C=dl(N);if(r.length===0){m(N,g.index,C);continue}if(v||To.has(N)||_n.has(N)||c.carryCJKAfterClosingQuote&&C&&b){p(N,C);continue}if(!h&&!C){p(N,C);continue}y(),m(N,g.index,C)}return y(),o}function Mb(u,c,o){if(c.length<=1)return c;const r=[];let d=-1,h=!1;function b(y,m){const p=c[y].start,g=m<c.length?c[m].start:u.length;r.push({text:u.slice(p,g),start:p})}function v(y){if(!(d<0)){if(h)d+1===y?r.push(c[d]):b(d,y);else for(let m=d;m<y;m++)r.push(c[m]);d=-1,h=!1}}for(let y=0;y<c.length;y++){const m=c[y];d>=0&&!Mh(c[y-1].text,o)&&v(y),d<0&&(d=y),h=h||dl(m.text)}return v(c.length),r}function C1(u,c){if(c==="zero-width-break"||c==="soft-hyphen"||c==="hard-break")return 0;if(c==="tab")return 1;let o=0;const r=zo();for(const d of r.segment(u))o++;return o}function kb(u){return u==="-"||u==="֊"||u==="‐"||u==="‒"||u==="–"||u==="—"}function Fb(u){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(u))return null;const c=[];let o=0;for(const r of zo().segment(u))o++,kb(r.segment)&&c.push(o);return c.length===0?null:c}function Tb(u,c,o){return c>1?u+(c-1)*o:u}function wb(u,c,o,r,d){const h=Ra(),{cache:b,emojiCorrection:v}=ub(c,tb(u.normalized)),y=zn("-",un("-",b),v)+(d===0?0:d*2),p=zn(" ",un(" ",b),v)*8,g=d!==0;if(u.len===0)return Ab();const N=[],C=[],V=[],W=[];let L=u.chunks.length<=1&&!g;const U=o?[]:null,te=[],le=[],oe=[],ce=o?[]:null,Z=Array.from({length:u.len});function ee(D,$,Y,ae,j,B,k,O,Q){j!=="text"&&j!=="space"&&j!=="zero-width-break"&&(L=!1),N.push($),C.push(Y),V.push(ae),W.push(j),U?.push(B),te.push(k),le.push(O),g&&oe.push(Q),ce!==null&&ce.push(D)}function G(D,$,Y,ae,j){const B=un(D,b),k=g?C1(D,$):0,O=Tb(zn(D,B,v),k,d),Q=$==="space"||$==="preserved-space"||$==="zero-width-break"?0:O,P=Q===0?0:Q+(k>0?d:0),re=$==="space"||$==="zero-width-break"?0:O;if(j&&ae&&D.length>1){let ne="sum-graphemes";d!==0?ne="segment-prefixes":Nc(D)?ne="pair-context":h.preferPrefixWidthsForBreakableRuns&&(ne="segment-prefixes");const ie=ib(D,B,b,v,ne),S=ie===null||r==="keep-all"?null:Fb(D);ee(D,O,P,re,$,Y,ie,S,k);return}ee(D,O,P,re,$,Y,null,null,k)}for(let D=0;D<u.len;D++){Z[D]=N.length;const $=u.texts[D],Y=u.isWordLike[D],ae=u.kinds[D],j=u.starts[D];if(ae==="soft-hyphen"){ee($,0,y,y,ae,j,null,null,0);continue}if(ae==="hard-break"){ee($,0,0,0,ae,j,null,null,0);continue}if(ae==="tab"){ee($,0,0,0,ae,j,null,null,g?C1($,ae):0);continue}const B=un($,b);if(ae==="text"&&B.containsCJK){const k=Cb($,h),O=r==="keep-all"?Mb($,k,h.breakKeepAllAfterPunctuation):k;for(let Q=0;Q<O.length;Q++){const P=O[Q];G(P.text,"text",j+P.start,Y,r==="keep-all"||!dl(P.text))}continue}G($,ae,j,Y,!0)}const A=Db(u.chunks,Z,N.length),X=U===null?null:Zp(u.normalized,U);return ce!==null?{widths:N,lineEndFitAdvances:C,lineEndPaintAdvances:V,kinds:W,simpleLineWalkFastPath:L,segLevels:X,breakableFitAdvances:te,breakablePreferredBreaks:le,letterSpacing:d,spacingGraphemeCounts:oe,discretionaryHyphenWidth:y,tabStopAdvance:p,chunks:A,segments:ce}:{widths:N,lineEndFitAdvances:C,lineEndPaintAdvances:V,kinds:W,simpleLineWalkFastPath:L,segLevels:X,breakableFitAdvances:te,breakablePreferredBreaks:le,letterSpacing:d,spacingGraphemeCounts:oe,discretionaryHyphenWidth:y,tabStopAdvance:p,chunks:A}}function Db(u,c,o){const r=[];for(let d=0;d<u.length;d++){const h=u[d],b=h.startSegmentIndex<c.length?c[h.startSegmentIndex]:o,v=h.endSegmentIndex<c.length?c[h.endSegmentIndex]:o,y=h.consumedEndSegmentIndex<c.length?c[h.consumedEndSegmentIndex]:o;r.push({startSegmentIndex:b,endSegmentIndex:v,consumedEndSegmentIndex:y})}return r}function Bb(u,c,o,r){const d=r?.wordBreak??"normal",h=r?.letterSpacing??0,b=Kv(u,Ra(),r?.whiteSpace,d);return wb(b,c,o,d,h)}function Mo(u,c,o){return Bb(u,c,!0,o)}function M1(u){let c=0;return mb(u,Number.POSITIVE_INFINITY,o=>{o>c&&(c=o)}),c}function Ob(){tv(),yc=null,Eb(),cb()}function fc(u){return u.replace(/[ \t]+/g," ")}function jb(u,c=[]){const o=[],r=c.filter(m=>m.length>0).map(m=>m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),d=r.length?new RegExp(`(${r.join("|")})`,"g"):null,h=/(\*\*[^*]+\*\*|\*[^*]+\*|==[^=]+==)/g;let b=0,v;function y(m,p={}){if(!m)return;if(!d){o.push({text:m,...p});return}d.lastIndex=0;let g=0,N;for(;(N=d.exec(m))!==null;)N.index>g&&o.push({text:m.slice(g,N.index),...p}),o.push({text:N[0],...p,highlight:!0}),g=N.index+N[0].length;g<m.length&&o.push({text:m.slice(g),...p})}for(;(v=h.exec(u))!==null;){v.index>b&&y(u.slice(b,v.index));const m=v[0];m.startsWith("**")&&m.endsWith("**")?y(m.slice(2,-2),{bold:!0}):m.startsWith("*")&&m.endsWith("*")?y(m.slice(1,-1),{italic:!0}):m.startsWith("==")&&m.endsWith("==")&&o.push({text:m.slice(2,-2),highlight:!0,bold:!0}),b=v.index+m.length}return b<u.length&&y(u.slice(b)),o.length>0?o:[{text:u}]}function zb(u){const c=u.replaceAll(`\r
296
- `,`
297
- `).split(`
298
- `),o=[];let r=[];function d(){const h=fc(r.join(" ").trim());h.length>0&&o.push({kind:"paragraph",text:h}),r=[]}for(const h of c){const b=h.trim();if(b.length===0){d();continue}if(_h(b)){d();continue}const v=b.match(/^(#{1,6})\s+(.+)$/);if(v){d();const m=v[1].length;o.push({kind:m===1?"heading":m===2?"subheading":"minor-heading",text:fc(v[2])});continue}if(b.startsWith(">")){d(),o.push({kind:"quote",text:fc(b.replace(/^>\s?/,"").trim())});continue}const y=b.match(/^(\d+[.)]|[-*+])\s+(.+)$/);if(y){d(),o.push({kind:"list-item",text:fc(y[2]),bullet:/^\d/.test(y[1])?y[1]:"•"});continue}r.push(b)}return d(),o}function _h(u){const c=u.trim();return/^【第([一二三四五六七八九十百两\d]+)页】$/.test(c)||/^【Page\s*(\d+)】$/i.test(c)||/^(?:-{3,}|\*{3,}|_{3,})$/.test(c)||/^<!--\s*(?:pagebreak|page-break|next-page|page(?::\s*\d+)?)\s*-->$/i.test(c)}function _b(u){const c=u.replaceAll(`\r
299
- `,`
300
- `).split(`
301
- `),o=[[]];let r=!1;for(const d of c){if(_h(d)){if(r=!0,o.length===1&&o[0].length===0)continue;o.push([]);continue}o[o.length-1].push(d)}return r?o.map(d=>d.join(`
302
- `).trim()):[u]}const Rb="modulepreload",Lb=function(u){return"/"+u},k1={},Hb=function(c,o,r){let d=Promise.resolve();if(o&&o.length>0){let b=function(m){return Promise.all(m.map(p=>Promise.resolve(p).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const v=document.querySelector("meta[property=csp-nonce]"),y=v?.nonce||v?.getAttribute("nonce");d=b(o.map(m=>{if(m=Lb(m),m in k1)return;k1[m]=!0;const p=m.endsWith(".css"),g=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${g}`))return;const N=document.createElement("link");if(N.rel=p?"stylesheet":Rb,p||(N.as="script"),N.crossOrigin="",N.href=m,y&&N.setAttribute("nonce",y),document.head.appendChild(N),p)return new Promise((C,V)=>{N.addEventListener("load",C),N.addEventListener("error",()=>V(new Error(`Unable to preload CSS for ${m}`)))})}))}function h(b){const v=new Event("vite:preloadError",{cancelable:!0});if(v.payload=b,window.dispatchEvent(v),!v.defaultPrevented)throw b}return d.then(b=>{for(const v of b||[])v.status==="rejected"&&h(v.reason);return c().catch(h)})},Ub=/[ \t\n\f\r]+/,F1=/^[ \t\n\f\r]+/,T1=/[ \t\n\f\r]+$/,w1={segmentIndex:0,graphemeIndex:0},qb={itemIndex:0,segmentIndex:0,graphemeIndex:0};function ho(u){return{segmentIndex:u.segmentIndex,graphemeIndex:u.graphemeIndex}}function D1(u){return u.segmentIndex===0&&u.graphemeIndex===0}function dc(u,c,o){const r=`${u}\0${c}`,d=o.get(r);if(d!==void 0)return d;const h=c===0?void 0:{letterSpacing:c},b=M1(Mo("A A",u,h)),v=M1(Mo("AA",u,h)),y=Math.max(0,b-v);return o.set(r,y),y}function Gb(u){const c={segmentIndex:0,graphemeIndex:0},o=Ao(u,c,Number.POSITIVE_INFINITY);return o===null?null:{endGraphemeIndex:c.graphemeIndex,endSegmentIndex:c.segmentIndex,width:o}}function Yb(u,c){return u===0&&c>0}function Xb(u){const c=[],o=Array.from({length:u.length}),r=new Map;let d=0;for(let h=0;h<u.length;h++){const b=u[h],v=b.letterSpacing??0,y=F1.test(b.text),m=T1.test(b.text),p=b.text.replace(F1,"").replace(T1,"");if(p.length===0){Ub.test(b.text)&&d===0&&(d=dc(b.font,v,r));continue}const g=d>0?d:y?dc(b.font,v,r):0,N=Mo(p,b.font,v===0?void 0:{letterSpacing:v}),C=Gb(N);if(C===null){d=m?dc(b.font,v,r):0;continue}const V={break:b.break??"normal",endGraphemeIndex:C.endGraphemeIndex,endSegmentIndex:C.endSegmentIndex,extraWidth:b.extraWidth??0,gapBefore:g,naturalWidth:C.width,prepared:N,sourceItemIndex:h};c.push(V),o[h]=V,d=m?dc(b.font,v,r):0}return{items:c,itemsBySourceItemIndex:o}}function Qb(u,c,o,r){if(u.items.length===0||o.itemIndex>=u.items.length)return null;const d=Math.max(1,c);let h=0,b=d,v=o.itemIndex;e:for(;v<u.items.length;){const y=u.items[v];if(!D1(o)&&o.segmentIndex===y.endSegmentIndex&&o.graphemeIndex===y.endGraphemeIndex){v++,o.segmentIndex=0,o.graphemeIndex=0;continue}const m=h===0?0:y.gapBefore,p=D1(o);if(y.break==="never"){if(!p){v++,o.segmentIndex=0,o.graphemeIndex=0;continue}const U=y.naturalWidth+y.extraWidth,te=m+U;if(h>0&&te>b)break e;r?.(y,m,U,ho(w1),{segmentIndex:y.endSegmentIndex,graphemeIndex:y.endGraphemeIndex}),h+=te,b=Math.max(0,d-h),v++,o.segmentIndex=0,o.graphemeIndex=0;continue}const g=m+y.extraWidth;if(h>0&&g>=b)break e;if(p){const U=g+y.naturalWidth;if(U<=b){r?.(y,m,y.naturalWidth+y.extraWidth,ho(w1),{segmentIndex:y.endSegmentIndex,graphemeIndex:y.endGraphemeIndex}),h+=U,b=Math.max(0,d-h),v++,o.segmentIndex=0,o.graphemeIndex=0;continue}}const N=Math.max(1,b-g),C={segmentIndex:o.segmentIndex,graphemeIndex:o.graphemeIndex},V=Ao(y.prepared,C,N);if(V===null){v++,o.segmentIndex=0,o.graphemeIndex=0;continue}if(o.segmentIndex===C.segmentIndex&&o.graphemeIndex===C.graphemeIndex){v++,o.segmentIndex=0,o.graphemeIndex=0;continue}const W=V+y.extraWidth,L=m+W;if(h>0&&p&&L>b)break e;if(h>0&&p&&m>0&&Yb(C.segmentIndex,C.graphemeIndex)){const U={segmentIndex:0,graphemeIndex:0};if(Ao(y.prepared,U,Math.max(1,d-y.extraWidth))!==null&&(U.segmentIndex>C.segmentIndex||U.segmentIndex===C.segmentIndex&&U.graphemeIndex>C.graphemeIndex))break e}if(r?.(y,m,W,ho(o),{segmentIndex:C.segmentIndex,graphemeIndex:C.graphemeIndex}),h+=L,b=Math.max(0,d-h),C.segmentIndex===y.endSegmentIndex&&C.graphemeIndex===y.endGraphemeIndex){v++,o.segmentIndex=0,o.graphemeIndex=0;continue}o.segmentIndex=C.segmentIndex,o.graphemeIndex=C.graphemeIndex;break}return h===0?null:(o.itemIndex=v,h)}function mo(u,c,o=qb){const r=u,d={itemIndex:o.itemIndex,segmentIndex:o.segmentIndex,graphemeIndex:o.graphemeIndex},h=[],b=Qb(r,c,d,(v,y,m,p,g)=>{h.push({itemIndex:v.sourceItemIndex,gapBefore:y,occupiedWidth:m,start:p,end:g})});return b===null?null:{fragments:h,width:b,end:d}}function Vb(u,c){return Sb(u.prepared,Nb(u.prepared),c.start.segmentIndex,c.start.graphemeIndex,c.end.segmentIndex,c.end.graphemeIndex)}function Zb(u,c){const o=u,r=[];for(let d=0;d<c.fragments.length;d++){const h=c.fragments[d],b=o.itemsBySourceItemIndex[h.itemIndex];if(b===void 0)throw new Error("Missing rich-text inline item for fragment");r.push({itemIndex:h.itemIndex,text:Vb(b,h),gapBefore:h.gapBefore,occupiedWidth:h.occupiedWidth,start:h.start,end:h.end})}return{fragments:r,width:c.width,end:c.end}}const Kb=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),B1=typeof process<"u"&&process.versions?.node?(await Hb(async()=>{const{createRequire:u}=await Promise.resolve().then(()=>Kb);return{createRequire:u}},void 0)).createRequire(import.meta.url):void 0;let xc=!1;function Jb(){if(!xc){if(typeof globalThis.OffscreenCanvas<"u"){xc=!0;return}if(typeof document<"u"){const u=document.createElement("canvas");class c{width=1e3;height=1e3;getContext(r){return u.getContext(r)}}globalThis.OffscreenCanvas=c,xc=!0;return}try{if(B1){const{createCanvas:u}=B1("@napi-rs/canvas");class c{width;height;#e;constructor(r,d){this.width=r,this.height=d,this.#e=u(r,d)}getContext(r){return r!=="2d"?null:this.#e.getContext("2d")}}globalThis.OffscreenCanvas=c,xc=!0}}catch{console.warn("Pretext requires OffscreenCanvas or @napi-rs/canvas for text measurement.")}}}function Ib(u,c,o,r){const h=Math.min(260,Math.round(r*.22))+u*(c+32),b=Math.max(60,r-c-o-16);return Math.min(h,b)}function Tc(u,c,o,r){if(u.templateAssetKey&&u.x!=null&&u.y!=null&&u.width!=null&&u.height!=null)return{...u,x:u.x,y:u.y,width:u.width,height:u.height};const d=u.layoutPreset||"auto",h=16,b=u.captionHeight??36;if(u.isAbsolute)return{...u,x:u.x??h,y:u.y??100,width:u.width??420,height:u.height??280};if(d==="custom")return{...u,x:u.x??h,y:u.y??260,width:u.width??420,height:u.height??280};if(d==="fill"){const L=o,U=u.height||Math.round(r*.28),te=Math.max(160,r-U-b-h);return{...u,x:0,y:te,width:L,height:U}}if(d==="corner-soft"){const L=Math.min(u.width||380,Math.round(o*.48)),U=u.height||260,te=Math.max(0,o-L-h),le=Math.max(160,r-U-b-24);return{...u,x:te,y:le,width:L,height:U}}const v=420,y=280,m=Math.round(o*.52),p=Math.min(u.width||v,m),g=u.height||y,N=Ib(c,g,b,r);if(d==="center"){const L=Math.min(u.width||560,o-h*2),U=Math.max(0,Math.round((o-L)/2));return{...u,x:U,y:N,width:L,height:g}}if(d==="staggered"){const U=c%2===1?Math.max(0,o-p-h):h;return{...u,x:U,y:N,width:p,height:g}}if(d==="mid-right"){const L=Math.max(0,o-p-h);return{...u,x:L,y:N,width:p,height:g}}if(d==="mid-left")return{...u,x:h,y:N,width:p,height:g};if((u.width||v)>=o*.75){const L=Math.min(u.width||v,o-h*2);return{...u,x:Math.max(0,Math.round((o-L)/2)),y:N,width:L,height:g}}const W=c%2===1?Math.max(0,o-p-h):h;return{...u,x:W,y:N,width:p,height:g}}const Oa={itemIndex:0,segmentIndex:0,graphemeIndex:0};function Wb(u,c){const o=c.bold?u.replace(/^\d+\s+/,"700 "):u;return c.italic?"italic "+o:o}function ja(u,c){return u.itemIndex-c.itemIndex||u.segmentIndex-c.segmentIndex||u.graphemeIndex-c.graphemeIndex}function hc(u,c,o,r,d={}){Jb();let h=o;const b=d.obstacleGap??24,v=d.pageImageLimit??2,y=u.map(A=>{const X=A.runs.map(D=>({...D,font:Wb(A.font,D)}));return{...A,runs:X,prepared:Xb(X)}});function m(A,X,D,$,Y=1/0){const ae=[];let j=D;for(;j+A.lineHeight<=h&&ae.length<Y;){if(!mo(A.prepared,c,X))return{lines:ae,cursor:X,y:j,done:!0};const B=A.textIndent??0;let k=[{left:0,right:c}];const O=$.filter(q=>!q.isAbsolute&&j+A.lineHeight>q.y-b&&j<q.y+q.height+(q.captionHeight??0)+b);for(const q of O)k=k.flatMap(I=>q.x-b>=I.right||q.x+q.width+b<=I.left?[I]:[{left:I.left,right:Math.min(I.right,q.x-b)},{left:Math.max(I.left,q.x+q.width+b),right:I.right}]).filter(I=>I.right>I.left);const Q=Number(A.font.match(/(\d+(?:\.\d+)?)px/)?.[1]??36);let P=null;for(const q of k){const I=q.right-q.left-B;if(I<Q*(O.length?2.5:1))continue;const ge=mo(A.prepared,I,X);!ge||ge.width>I+.5||(!P||ja(ge.end,P.line.end)>0)&&(P={line:ge,left:q.left+B,width:I})}if(!P){if(!O.length)break;j=Math.min(...O.map(q=>q.y+q.height+(q.captionHeight??0)+b));continue}if(ja(P.line.end,X)<=0)break;const ne=Zb(A.prepared,P.line).fragments.map(q=>{const I=A.runs[q.itemIndex];return{text:q.text,font:I.font??A.font,bold:I.bold,italic:I.italic,highlight:I.highlight,gapBefore:q.gapBefore,occupiedWidth:q.occupiedWidth,letterSpacing:I.letterSpacing}});let ie=P.left,S=ja(X,Oa)===0&&A.bullet?P.left-B:void 0;const H=P.line.width;if(d.textAlign==="center"){const q=Math.max(0,P.width-H),I=Math.round(q/2);ie+=I,S!==void 0&&(S+=I)}else if(d.textAlign==="right"){const q=Math.max(0,P.width-H);ie+=q,S!==void 0&&(S+=q)}ae.push({text:ne.map(q=>q.text).join(""),fragments:ne,x:ie,y:j,className:A.className,font:A.font,lineHeight:A.lineHeight,maxWidth:P.width,start:X,end:P.line.end,bullet:ja(X,Oa)===0?A.bullet:void 0,bulletX:S}),X=P.line.end,j+=A.lineHeight}return{lines:ae,cursor:X,y:j,done:mo(A.prepared,c,X)===null}}const p=[];let g=0,N=Oa;const C=d.initialPageNumber??1,V=d.initialPageNumber!==void 0;let W=0;const L=r.filter(A=>!A.pageIndex);let U=!1;const te=d.maxPages||50,le=d.templateImages||[],oe=Math.max(0,...le.filter(A=>!A.repeatEveryPage).map(A=>A.pageIndex||1)),ce=Math.max(d.lastPageNumber||0,V?0:oe),Z=A=>le.filter(X=>X.repeatEveryPage||(X.pageIndex||1)===A),ee=V?0:Math.max(0,...r.map(A=>A.pageIndex||0)),G=()=>g<y.length||!V&&(W<L.length||C+p.length<=ee)||V&&!U&&(r.length>0||Z(C).length>0)||C+p.length<=ce;for(;p.length<te&&G();){const A=C+p.length,X=d.pageFillRatios?.[A]??d.targetFillRatio??1;if(!Number.isFinite(X)||X<=0||X>1)throw new RangeError("targetFillRatio must be greater than 0 and at most 1");h=o*X;let D=[];if(V)U||(D=r,U=!0);else{const ne=r.filter(ie=>ie.pageIndex===A);ne.length>0?D=ne:(D=L.slice(W,W+v),W+=Math.max(D.length,1))}const $=[...D,...Z(A)].map((ne,ie)=>Tc(ne,ie,c,o)),Y=[];let ae=0;const j=g,B=N;for(;g<y.length;){const ne=y[g],ie=ja(N,Oa)===0,S=ae+(ie&&Y.length?ne.gapBefore??0:0);if(ie&&ne.keepWithNext&&Y.length){let q=S,I=!0;for(let ge=g;ge<y.length;ge++){const ve=y[ge];ge>g&&(q+=ve.gapBefore??0);const Ee=m(ve,Oa,q,$,ve.keepWithNext?1/0:2);if((ve.keepWithNext||Ee.lines.length<2)&&!Ee.done){I=!1;break}if(!ve.keepWithNext)break;q=Ee.y+(ve.gapAfter??0)}if(!I)break}const H=m(ne,N,S,$);if(!H.done&&H.lines.length){const q=m(ne,H.cursor,0,[],2);if(q.done&&q.lines.length===1&&H.lines.length>=2){const I=H.lines.pop();H.cursor=I.start,H.y=I.y}if(ie&&H.lines.length<2&&Y.length)break}if(Y.push(...H.lines),N=H.cursor,ae=H.y,!H.done)break;g++,N=Oa,ae+=ne.gapAfter??0}if(g===j&&ja(N,B)===0&&!D.length&&!$.some(ne=>!ne.isAbsolute&&!ne.repeatEveryPage)&&g<y.length)throw new RangeError("Text cannot fit in the available page area; reduce font size or enlarge the safe area");const k=Y.reduce((ne,ie)=>Math.max(ne,ie.y+ie.lineHeight),0),O=$.filter(ne=>!ne.isAbsolute),Q=O.reduce((ne,ie)=>Math.max(ne,ie.y+ie.height+(ie.captionHeight??0)),0),P=Math.max(k,Q),re=o>0?Math.min(1,P/o):0;if(Y.length>0&&d.verticalAlign&&d.verticalAlign!=="top"){const ne=Y.reduce((q,I)=>Math.min(q,I.y),1/0),ie=O.reduce((q,I)=>Math.min(q,I.y),1/0),S=Math.min(ne,ie===1/0?ne:ie),H=P-S;if(o>H){let q=0;if(d.verticalAlign==="center"?q=Math.round((o-H)/2)-S:d.verticalAlign==="bottom"&&(q=o-H-S),q!==0){for(const I of Y)I.y+=q;for(const I of O)I.layoutPreset!=="custom"&&(I.y+=q)}}}p.push({pageNumber:A,lines:Y,images:$,textBottom:k,fillRatio:re})}if(G())throw new RangeError(`Content exceeds maxPages=${te}; no content was discarded`);return p}function go(u,c,o){return Math.round(u*Math.pow(c,o))}function za(u,c=1.45){if(u<=0)return 24;const r=1.65-Math.log(Math.max(8,u)/8)/Math.log(160/8)*(1.65-1.15),d=Math.max(1.1,Math.min(1.8,r*(c/1.45)));return Math.round(u*d)}function O1(u,c=!1){const o=(u||"").trim();switch(o){case"PingFang SC":return'"PingFang SC", -apple-system, BlinkMacSystemFont, "Noto Sans SC", "Microsoft YaHei", sans-serif';case"Noto Sans SC":return'"Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif';case"Songti SC":return'"Songti SC", "Noto Serif SC", "STSong", "SimSun", serif';case"Noto Serif SC":return'"Noto Serif SC", "Songti SC", "SimSun", serif';case"Kaiti SC":return'"Kaiti SC", "LXGW WenKai Screen", "STKaiti", "KaiTi", serif';case"Yuanti SC":return'"Yuanti SC", "STYuanti", "PingFang SC", sans-serif';case"Inter":return'Inter, "PingFang SC", system-ui, sans-serif';case"Georgia":return'Georgia, "Songti SC", serif';default:return o?o.includes(",")?o:`"${o}", ${c?"serif":"sans-serif"}`:c?'"Songti SC", serif':'"PingFang SC", sans-serif'}}function $b(u){const{baseFontSize:c,scaleRatio:o,lineHeightMultiplier:r,headingFont:d,bodyFont:h}=u,b=O1(d,!1),v=O1(h,!0),y=c,m=go(c,o,1),p=go(c,o,2),g=go(c,o,3),N=c,C=c;return{heading:{font:`700 ${g}px ${b}`,fontSize:g,lineHeight:za(g,r*.95),gapBefore:Math.round(g*.8),gapAfter:Math.round(g*.4),className:"body-heading"},subheading:{font:`700 ${p}px ${b}`,fontSize:p,lineHeight:za(p,r*.98),gapBefore:Math.round(p*.7),gapAfter:Math.round(p*.35),className:"body-subheading"},"minor-heading":{font:`700 ${m}px ${b}`,fontSize:m,lineHeight:za(m,r),gapBefore:Math.round(m*.6),gapAfter:Math.round(m*.3),className:"body-minor-heading"},paragraph:{font:`400 ${y}px ${v}`,fontSize:y,lineHeight:za(y,r),gapBefore:0,gapAfter:Math.round(y*.6),className:"body-line"},quote:{font:`400 ${N}px ${v}`,fontSize:N,lineHeight:za(N,r*1.05),gapBefore:Math.round(N*.5),gapAfter:Math.round(N*.5),className:"body-quote"},"list-item":{font:`400 ${C}px ${v}`,fontSize:C,lineHeight:za(C,r),gapBefore:0,gapAfter:Math.round(C*.3),className:"body-line"}}}function j1(u="longform-3-4"){const c=Fl(u),o=u==="wechat-cover-2.35",r=u==="square-1-1";return{name:"默认样式",aspectRatio:u,algorithm:{baseFontSize:u==="wechat-cover-2.35"?56:u==="wide-16-9"?44:u==="square-1-1"?48:40,scaleRatio:o?1.35:1.25,lineHeightMultiplier:1.45,obstacleGap:24,targetFillRatio:.8,contentBottomGap:o?0:20,textAlign:o||r?"center":"left",verticalAlign:o||r?"center":"top",safeArea:o?{top:40,right:60,bottom:40,left:60}:c.defaultSafeArea},theme:{bgColor:"#ffffff",textColor:"#171717",headingColor:"#171717",accentColor:"#059669",quoteColor:"#525252",captionColor:"#737373",watermarkColor:"#a3a3a3",cardBg:"#f5f5f5",borderSubtle:"#e5e5e5"},typography:{headingFont:"PingFang SC",bodyFont:"Songti SC"},footerText:o?"":"Typeset Studio · 纯算法排版",watermarkText:o?"":"@Antigravity",chrome:{showHeader:!o,showWatermark:!o,showPageNumber:!o&&!r,showFooter:!o,showFooterDivider:!o,showFooterText:!o,showFillRatio:!1}}}function Pb(u){const{markdown:c,images:o=[],config:r,highlightWords:d=[],minPages:h=1,maxPages:b=0,pageFillRatios:v}=u;if(!Number.isInteger(h)||h<1||!Number.isInteger(b)||b<0||b>0&&b<h)throw new RangeError("Invalid page constraints: maxPages must be 0 or at least minPages");if(Ac(o),o.some(U=>!U.repeatEveryPage&&U.pageIndex!=null&&(!Number.isInteger(U.pageIndex)||U.pageIndex<1||U.pageIndex>50)))throw new RangeError("Image pageIndex must be an integer between 1 and 50");const y=Fl(r.aspectRatio),{stageWidth:m,stageHeight:p}=jn(y,r.algorithm.safeArea,r.algorithm.contentBottomGap),g=$b({baseFontSize:r.algorithm.baseFontSize,scaleRatio:r.algorithm.scaleRatio,lineHeightMultiplier:r.algorithm.lineHeightMultiplier,headingFont:r.typography.headingFont,bodyFont:r.typography.bodyFont});if(r.coverTheme){const U=r.coverTheme.typography;for(const[te,le]of Object.entries(g)){const oe=te.includes("heading")?U.title:U.subtitle;Object.assign(le,{font:`${oe.fontWeight} ${oe.fontSize}px "${oe.fontFamily}"`,lineHeight:Math.round(oe.fontSize*oe.lineHeight)})}}const N=U=>zb(U).map(te=>({...g[te.kind],kind:te.kind,text:te.text,runs:jb(te.text,d).map(le=>({...le,letterSpacing:r.coverTheme?.typography[te.kind.includes("heading")?"title":"subtitle"].letterSpacing})),bullet:te.kind==="list-item"?te.bullet??"•":void 0,textIndent:te.kind==="list-item"?28:te.kind==="quote"?20:0,keepWithNext:["heading","subheading","minor-heading"].includes(te.kind)})),C=o.filter(U=>U.templateAssetKey),V=o.filter(U=>!U.templateAssetKey),W=_b(c);let L=[];if(W.length>1){const U=Math.max(W.length,...V.map(le=>le.pageIndex||1));if(U>50)throw new RangeError("Content exceeds engine limit of 50 pages");for(let le=0;le<U;le++){const oe=V.filter(Z=>(Z.pageIndex||1)===le+1),ce=hc(N(W[le]||""),m,p,oe,{obstacleGap:r.algorithm.obstacleGap,pageImageLimit:2,textAlign:r.algorithm.textAlign,verticalAlign:r.algorithm.verticalAlign,initialPageNumber:L.length+1,templateImages:C,targetFillRatio:v?.[le+1]??r.algorithm.targetFillRatio});L.push(...ce.length?ce:[{pageNumber:L.length+1,lines:[],images:[],textBottom:0,fillRatio:0}])}const te=Math.max(0,...C.filter(le=>!le.repeatEveryPage).map(le=>le.pageIndex||1));L.length<te&&L.push(...hc([],m,p,[],{initialPageNumber:L.length+1,lastPageNumber:te,templateImages:C}))}else{const U=N(c);L=hc(U,m,p,V,{obstacleGap:r.algorithm.obstacleGap,pageImageLimit:r.aspectRatio==="longform-3-4"?2:1,textAlign:r.algorithm.textAlign,verticalAlign:r.algorithm.verticalAlign,targetFillRatio:r.algorithm.targetFillRatio,pageFillRatios:v,templateImages:C})}if(W.length===1&&L.length<h&&c.trim())for(let U=1;U<=8&&L.length<h;U++){const te=r.algorithm.targetFillRatio*Math.pow(.75,U);try{L=hc(N(c),m,p,V,{obstacleGap:r.algorithm.obstacleGap,pageImageLimit:r.aspectRatio==="longform-3-4"?2:1,textAlign:r.algorithm.textAlign,verticalAlign:r.algorithm.verticalAlign,targetFillRatio:te,templateImages:C,pageFillRatios:v&&Object.fromEntries(Object.entries(v).map(([le,oe])=>[le,Math.min(oe,te)]))})}catch{break}}if(L.length<h&&h>1)throw new RangeError(`Content cannot satisfy minPages=${h}; lower the minimum page count`);if(L.length>50)throw new RangeError("Content exceeds engine limit of 50 pages");if(b>0&&L.length>b)throw new RangeError(`Content exceeds maxPages=${b}; no content was discarded`);return L.length===0&&(L=[{pageNumber:1,lines:[],images:o.filter(U=>!U.templateAssetKey||U.repeatEveryPage||(U.pageIndex||1)===1).map((U,te)=>Tc(U,te,m,p)),textBottom:0,fillRatio:0}]),{pages:L,pageCount:L.length,canvasSpec:y,config:r}}function mc(u){return{x:u.x,y:u.y,width:u.width,height:u.height,isAbsolute:u.isAbsolute,layoutPreset:u.layoutPreset,pageIndex:u.pageIndex,zIndex:u.zIndex,rotate:u.rotate,opacity:u.opacity,borderRadius:u.borderRadius,captionHeight:u.captionHeight}}function po(u,c){const o={...u,...c};return(!o.isAbsolute||!o.templateAssetKey)&&(o.repeatEveryPage=!1),o}function ey(u){const c=Fl(u.aspectRatio);return{isAbsolute:!0,layoutPreset:"custom",zIndex:0,rotate:0,borderRadius:0,captionHeight:0,x:-u.algorithm.safeArea.left,y:-u.algorithm.safeArea.top,width:c.width,height:c.height}}const ty=`# 大模型纯算法排版深度剖析
303
-
304
- 这是一篇利用纯几何计算与字符分词度量排版的示例文章。无论是字号、行距、还是图片避让,均由算法自动寻优。
305
-
306
- > 排版的美感在于克制与韵律,让机器承担繁琐的对齐与换行,让人专注思想的表达。
307
-
308
- ### 为什么选择纯算法绕排?
309
-
310
- 传统排版依赖 DOM 回流与重绘,无法在无头环境中进行确定性的页面切割。而结合 Canvas 字符测距与空间网格,我们可以在微秒级求解最优文字流向。
311
-
312
- - 零 DOM 依赖,多端极速运行
313
- - 亚像素级字宽计算与平滑孤行控制
314
- - 任意画板比例智能自适应
315
- `;function gc(u,c,o,r){if(u.isAbsolute||!u.layoutPreset||u.layoutPreset==="custom")return u;const d=u.pageIndex||1,h=c.filter(b=>!!b.templateAssetKey==!!u.templateAssetKey&&(b.pageIndex||1)===d).findIndex(b=>b.id===u.id);return Tc(u,h,o,r)}function ly(u,c){const[o,r]=me.useState(null),[d,h]=me.useState(0),[b,v]=me.useState(()=>j1("longform-3-4")),y=b.aspectRatio,[m,p]=me.useState(ty),[g,N]=me.useState([{id:"img_demo_1",src:"https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?w=800&auto=format&fit=crop&q=80",alt:"抽象建筑线条",caption:"图 1:建筑结构中的空间秩序感",x:16,y:420,width:420,height:280,captionHeight:40,layoutPreset:"mid-left"}]),[C,V]=me.useState(["算法排版","确定性","空间秩序"]),W=me.useRef(new Map(g.map(k=>[k.id,mc(k)]))),[L,U]=me.useState({}),{result:te,layoutError:le}=me.useMemo(()=>{try{return{result:Pb({markdown:m,images:g,config:b,highlightWords:C}),layoutError:null}}catch(k){return{result:{pages:[],pageCount:0,canvasSpec:Fl(b.aspectRatio),config:b},layoutError:k instanceof Error?k.message:"排版失败"}}},[m,g,b,C,d]);me.useEffect(()=>{let k=!0,O;const Q=()=>{k&&(clearTimeout(O),O=setTimeout(()=>{Ob(),h(P=>P+1)},0))};return document.fonts.ready.then(Q),document.fonts.addEventListener("loadingdone",Q),window.addEventListener("typeset-fonts-loaded",Q),()=>{k=!1,clearTimeout(O),document.fonts.removeEventListener("loadingdone",Q),window.removeEventListener("typeset-fonts-loaded",Q)}},[]),me.useEffect(()=>{if(!c)return;let k=!0;const O={"x-admin-key":u},Q=async re=>{const ne=await fetch(re,{headers:O}),ie=await ne.json();if(!ne.ok||!ie.ok)throw new Error(ie.message||ie.error||"加载模板失败");return ie},P=async()=>{try{const re=new URLSearchParams(window.location.search),ne=re.get("template")||re.get("templateId")||re.get("templateKey"),ie=re.get("slot"),S=re.get("account")||"default",H=re.get("title"),q=re.get("markdown")||re.get("text");if(q?p(q):H&&p(`# ${H}
316
-
317
- 在此输入正文内容...`),ne){const ve=await Q(`/api/templates/resolve/${encodeURIComponent(ne)}`);if(ve.ok&&ve.template){k&&j(ve.template);return}}if(ie){const ve=await Q(`/api/templates/slots?account=${encodeURIComponent(S)}`);if(ve.ok&&ve.slots?.[ie]?.template){k&&j(ve.slots[ie].template);return}}const I=await Q(`/api/templates/slots?account=${encodeURIComponent(S)}`);if(I.ok&&I.slots?.newspic_content?.template){k&&j(I.slots.newspic_content.template);return}const ge=await Q("/api/templates/default");ge.ok&&ge.template&&k&&j(ge.template)}catch(re){k&&r(re instanceof Error?re.message:"加载模板失败")}};return r(null),P(),()=>{k=!1}},[u,c]);const oe=k=>{const O=Fl(k),Q=j1(k),{stageWidth:P,stageHeight:re}=jn(O,Q.algorithm.safeArea,Q.algorithm.contentBottomGap);N(ne=>ne.map(ie=>gc(ie,ne,P,re))),v(ne=>({...ne,aspectRatio:k,algorithm:{...ne.algorithm,baseFontSize:Q.algorithm.baseFontSize,scaleRatio:Q.algorithm.scaleRatio,safeArea:Q.algorithm.safeArea,textAlign:Q.algorithm.textAlign,verticalAlign:Q.algorithm.verticalAlign,contentBottomGap:Q.algorithm.contentBottomGap},chrome:{...Q.chrome},watermarkText:Q.watermarkText,footerText:Q.footerText}))},ce=k=>{v(O=>({...O,algorithm:{...O.algorithm,...k}}))},Z=k=>{v(O=>({...O,theme:{...O.theme,...k}}))},ee=k=>{v(O=>({...O,algorithm:{...O.algorithm,safeArea:{...O.algorithm.safeArea,...k}}}))},G=k=>{const O=Fl(y),{stageWidth:Q,stageHeight:P}=jn(O,b.algorithm.safeArea,b.algorithm.contentBottomGap),re=k.pageIndex||1,ie=g.filter(I=>!I.templateAssetKey&&(I.pageIndex||1)===re).length,S={...k,id:`img_${Date.now()}_${Math.random().toString(36).substring(2,6)}`},H=Tc(S,ie,Q,P),q={...S,x:H.x,y:H.y,width:H.width,height:H.height};W.current.set(q.id,mc(q)),N(I=>[...I,q])},A=(k,O)=>{const Q=O.isAbsolute===!1?L[k]:void 0;Q&&X(k),N(P=>{const re=P.map(ie=>{if(ie.id!==k)return ie;const S=po(ie,{...Q,...O});return O.layoutPreset&&O.layoutPreset!=="custom"&&(delete S.x,delete S.y,delete S.width,delete S.height),S}),ne=re.find(ie=>ie.id===k);if(!ne)return P;if(!ne.isAbsolute&&ne.layoutPreset&&ne.layoutPreset!=="custom"){const ie=Fl(y),{stageWidth:S,stageHeight:H}=jn(ie,b.algorithm.safeArea,b.algorithm.contentBottomGap);return re.map(q=>q.id===k?gc(q,re,S,H):q)}return re})},X=k=>U(O=>{const Q={...O};return delete Q[k],Q}),D=(k,O)=>{const Q=g.find(P=>P.id===k);if(Q)if(O){if(L[k])return;U(P=>({...P,[k]:mc(Q)})),A(k,ey(b))}else{const P=L[k];if(!P)return;X(k),N(re=>re.map(ne=>ne.id===k?po(ne,P):ne))}},$=k=>{const O=W.current.get(k);O&&(X(k),N(Q=>Q.map(P=>P.id===k?po(P,O):P)))},Y=k=>{W.current.delete(k),X(k),N(O=>{const Q=O.filter(ie=>ie.id!==k),P=Fl(y),{stageWidth:re,stageHeight:ne}=jn(P,b.algorithm.safeArea,b.algorithm.contentBottomGap);return Q.map(ie=>gc(ie,Q,re,ne))})},ae=(k,O)=>{N(Q=>{const P=Q.findIndex(I=>I.id===k);if(P===-1)return Q;const re=O==="up"?P-1:P+1;if(re<0||re>=Q.length)return Q;const ne=[...Q],ie=ne[P];ne[P]=ne[re],ne[re]=ie;const S=Fl(y),{stageWidth:H,stageHeight:q}=jn(S,b.algorithm.safeArea,b.algorithm.contentBottomGap);return ne.map(I=>gc(I,ne,H,q))})},j=k=>{try{Ac(k.images),v(k),U({}),N(O=>{const Q=qp(O,k.images);return W.current=new Map(Q.map(P=>[P.id,mc(P)])),Q}),r(null)}catch(O){r(O instanceof Error?O.message:"模板素材无效")}},B=k=>{v(O=>({...O,typography:{...O.typography,...k}}))};return{error:le||o,aspectRatio:y,switchAspectRatio:oe,config:b,setConfig:v,markdown:m,setMarkdown:p,images:g,addImage:G,updateImage:A,toggleImageBackground:D,resetImageLayout:$,backgroundImageIds:Object.keys(L),removeImage:Y,moveImage:ae,highlightWords:C,setHighlightWords:V,result:te,updateAlgorithm:ce,updateTheme:Z,updateTypography:B,updateSafeArea:ee,loadTemplate:j}}const ny=()=>{const{adminKey:u,setAdminKey:c,isVerified:o}=Yp(),{error:r,aspectRatio:d,switchAspectRatio:h,config:b,markdown:v,setMarkdown:y,images:m,addImage:p,updateImage:g,toggleImageBackground:N,resetImageLayout:C,backgroundImageIds:V,removeImage:W,moveImage:L,highlightWords:U,setHighlightWords:te,result:le,updateAlgorithm:oe,updateTheme:ce,updateTypography:Z,updateSafeArea:ee,loadTemplate:G,setConfig:A}=ly(u,o),[X,D]=me.useState(()=>localStorage.getItem("typeset_studio_theme_mode")||"light");me.useEffect(()=>{X==="dark"?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),localStorage.setItem("typeset_studio_theme_mode",X)},[X]);const $=()=>{D(se=>se==="light"?"dark":"light")},[Y,ae]=me.useState("grid"),[j,B]=me.useState(.45),[k,O]=me.useState(!0),[Q,P]=me.useState(!1),[re,ne]=me.useState(!1),[ie,S]=me.useState(!1),H=me.useRef(null),q=(se=Y)=>{if(!H.current)return .45;const{clientWidth:Oe,clientHeight:xt}=H.current;if(Oe<=0||xt<=0)return .45;const Qe=le.canvasSpec,Ge=le.pages.length;if(Ge<=1||se==="stack"){const Ln=Math.max(200,Oe-64),_t=Math.max(200,xt-120),sn=Math.min(Ln/Qe.width,_t/Qe.height);return Math.max(.2,Math.min(1.2,Math.round(sn*100)/100))}const Ve=48,we=96,it=28,rn=36,el=Math.max(200,Oe-Ve),Rn=Math.max(200,xt-we);let Tl=.2;const wl=Math.min(Ge,4);for(let Vt=1;Vt<=wl;Vt++){const Dl=Math.ceil(Ge/Vt),Ln=(Vt-1)*it,_t=(Dl-1)*it,sn=Dl*rn,Hn=el-Ln,_i=Rn-_t-sn;if(Hn>60&&_i>60){const Ri=Hn/(Vt*Qe.width),La=_i/(Dl*Qe.height),Un=Math.min(Ri,La);Un>Tl&&(Tl=Un)}}return Math.max(.22,Math.min(.9,Math.round(Tl*100)/100))},I=()=>{O(!0);const se=q(Y);B(se)},ge=se=>{O(!1),B(se)},ve=se=>{ae(se),O(!0);const Oe=q(se);B(Oe)},Ee=se=>{if(O(!1),!H.current)return;const{clientWidth:Oe,clientHeight:xt}=H.current,Qe=le.canvasSpec,Ge=Math.max(.2,Math.min(1.2,Math.round(Math.min((Oe-64)/Qe.width,(xt-120)/Qe.height)*100)/100));B(Ge),setTimeout(()=>{document.getElementById(`typeset-page-${se}`)?.scrollIntoView({behavior:"smooth",block:"center"})},60)};me.useEffect(()=>{const se=setTimeout(()=>{if(k){const Oe=q(Y);B(Oe)}},60);return()=>clearTimeout(se)},[d,le.canvasSpec.width,le.canvasSpec.height,le.pages.length,Y]),me.useEffect(()=>{if(!H.current)return;const se=new ResizeObserver(()=>{if(k){const Oe=q(Y);B(Oe)}});return se.observe(H.current),()=>se.disconnect()},[k,le.canvasSpec.width,le.canvasSpec.height,le.pages.length,Y]);const xe=async()=>{S(!0);try{const se=document.querySelectorAll("canvas.typeset-page");if([...se].some(Qe=>Qe.dataset.renderState!=="ready"))throw new Error("画布尚未完成绘制,请检查素材或稍后再导出");if(se.length>0){let Qe=!0;for(let Ge=0;Ge<se.length;Ge++){const Ve=se[Ge];try{const we=Ve.toDataURL("image/png"),it=document.createElement("a");it.download=`typeset-${d}-p${Ge+1}-${Date.now()}.png`,it.href=we,it.click()}catch(we){console.warn("Canvas is tainted by external non-CORS image, falling back to server export:",we),Qe=!1;break}}if(Qe)return}const Oe=await fetch("/api/render/export",{method:"POST",headers:{"Content-Type":"application/json",...u?{"X-Admin-Key":u}:{}},body:JSON.stringify({result:le})});if(!Oe.ok)throw new Error(`Server returned status ${Oe.status}`);const xt=await Oe.json();if(!xt.ok||!xt.pages?.length)throw new Error(xt.error||"No pages returned from server-side render");for(const Qe of xt.pages){const Ge=document.createElement("a");Ge.download=`typeset-${d}-p${Qe.pageNumber}-${Date.now()}.png`,Ge.href=Qe.dataUrl,Ge.click()}}catch(se){console.error("Export failed:",se),alert(se instanceof Error?se.message:"导出失败,请检查网络或后端服务连接")}finally{S(!1)}};return f.jsxs("div",{className:"flex flex-col h-screen w-screen overflow-hidden bg-[#fafafa] dark:bg-[#000000] text-[#171717] dark:text-[#ededed] transition-colors",children:[f.jsx(Lp,{currentRatio:d,onSelectRatio:h,zoom:j,onZoomChange:ge,onAutoFit:I,isAutoFit:k,onOpenTemplates:()=>P(!0),onOpenAuth:()=>ne(!0),onExport:xe,isExporting:ie,isAuthed:!!o,pageCount:le.pageCount,themeMode:X,onToggleThemeMode:$}),r&&f.jsx("div",{role:"alert",className:"px-4 py-2 text-sm text-red-600",children:r}),f.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden relative",children:[f.jsx(_p,{markdown:v,onMarkdownChange:y,images:m,onAddImage:p,onToggleBackground:N,onResetImageLayout:C,backgroundImageIds:V,onUpdateImage:g,onRemoveImage:W,onMoveImage:L,pageCount:le.pageCount,highlightWords:U,onHighlightWordsChange:te,adminKey:u}),f.jsx(zp,{result:le,zoom:j,viewportRef:H,onAutoFit:I,isAutoFit:k,viewMode:Y,onToggleViewMode:ve,onFocusPage:Ee}),f.jsx(Up,{config:b,onUpdateAlgorithm:oe,onUpdateTheme:ce,onUpdateTypography:Z,onUpdateSafeArea:ee,onUpdateBranding:(se,Oe)=>{A(xt=>({...xt,footerText:se,watermarkText:Oe}))},onUpdateChrome:se=>{A(Oe=>({...Oe,chrome:{...Oe.chrome,...se}}))}})]}),f.jsx(Gp,{isOpen:Q,onClose:()=>P(!1),currentConfig:{...b,images:m},onApplyTemplate:G,adminKey:u}),f.jsx(Dp,{isOpen:re,onClose:()=>ne(!1),currentKey:u,onSaveKey:c,isVerified:o})]})},Rh=document.getElementById("root");if(!Rh)throw new Error("Failed to find root element");X2.createRoot(Rh).render(f.jsx(_2.StrictMode,{children:f.jsx(ny,{})}));