@xpert-ai/chatkit-wps-addin 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
var Dp=Object.defineProperty;var Gd=c=>{throw TypeError(c)};var Rp=(c,u,r)=>u in c?Dp(c,u,{enumerable:!0,configurable:!0,writable:!0,value:r}):c[u]=r;var vt=(c,u,r)=>Rp(c,typeof u!="symbol"?u+"":u,r),Qd=(c,u,r)=>u.has(c)||Gd("Cannot "+r);var ti=(c,u,r)=>(Qd(c,u,"read from private field"),r?r.call(c):u.get(c)),Ru=(c,u,r)=>u.has(c)?Gd("Cannot add the same private member more than once"):u instanceof WeakSet?u.add(c):u.set(c,r),Uu=(c,u,r,s)=>(Qd(c,u,"write to private field"),s?s.call(c,r):u.set(c,r),r);import{g as ta,a as ei,b as Up,r as wp}from"./wps-api-DgiVmik0.js";function Hp(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var hr={exports:{}},li={};/**
|
|
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 Kd;function Np(){if(Kd)return li;Kd=1;var c=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function r(s,f,d){var y=null;if(d!==void 0&&(y=""+d),f.key!==void 0&&(y=""+f.key),"key"in f){d={};for(var p in f)p!=="key"&&(d[p]=f[p])}else d=f;return f=d.ref,{$$typeof:c,type:s,key:y,ref:f!==void 0?f:null,props:d}}return li.Fragment=u,li.jsx=r,li.jsxs=r,li}var Vd;function Bp(){return Vd||(Vd=1,hr.exports=Np()),hr.exports}var K=Bp(),dr={exports:{}},V={};/**
|
|
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 Zd;function Lp(){if(Zd)return V;Zd=1;var c=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),y=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),W=Symbol.iterator;function st(v){return v===null||typeof v!="object"?null:(v=W&&v[W]||v["@@iterator"],typeof v=="function"?v:null)}var Et={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},it=Object.assign,Mt={};function Tt(v,R,H){this.props=v,this.context=R,this.refs=Mt,this.updater=H||Et}Tt.prototype.isReactComponent={},Tt.prototype.setState=function(v,R){if(typeof v!="object"&&typeof v!="function"&&v!=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,v,R,"setState")},Tt.prototype.forceUpdate=function(v){this.updater.enqueueForceUpdate(this,v,"forceUpdate")};function wt(){}wt.prototype=Tt.prototype;function Ht(v,R,H){this.props=v,this.context=R,this.refs=Mt,this.updater=H||Et}var te=Ht.prototype=new wt;te.constructor=Ht,it(te,Tt.prototype),te.isPureReactComponent=!0;var ee=Array.isArray;function Xt(){}var $={H:null,A:null,T:null,S:null},Ct=Object.prototype.hasOwnProperty;function Xe(v,R,H){var L=H.ref;return{$$typeof:c,type:v,key:R,ref:L!==void 0?L:null,props:H}}function yn(v,R){return Xe(v.type,R,v.props)}function Ge(v){return typeof v=="object"&&v!==null&&v.$$typeof===c}function le(v){var R={"=":"=0",":":"=2"};return"$"+v.replace(/[=:]/g,function(H){return R[H]})}var Jl=/\/+/g;function We(v,R){return typeof v=="object"&&v!==null&&v.key!=null?le(""+v.key):R.toString(36)}function Ne(v){switch(v.status){case"fulfilled":return v.value;case"rejected":throw v.reason;default:switch(typeof v.status=="string"?v.then(Xt,Xt):(v.status="pending",v.then(function(R){v.status==="pending"&&(v.status="fulfilled",v.value=R)},function(R){v.status==="pending"&&(v.status="rejected",v.reason=R)})),v.status){case"fulfilled":return v.value;case"rejected":throw v.reason}}throw v}function C(v,R,H,L,Z){var F=typeof v;(F==="undefined"||F==="boolean")&&(v=null);var ct=!1;if(v===null)ct=!0;else switch(F){case"bigint":case"string":case"number":ct=!0;break;case"object":switch(v.$$typeof){case c:case u:ct=!0;break;case N:return ct=v._init,C(ct(v._payload),R,H,L,Z)}}if(ct)return Z=Z(v),ct=L===""?"."+We(v,0):L,ee(Z)?(H="",ct!=null&&(H=ct.replace(Jl,"$&/")+"/"),C(Z,R,H,"",function(sa){return sa})):Z!=null&&(Ge(Z)&&(Z=yn(Z,H+(Z.key==null||v&&v.key===Z.key?"":(""+Z.key).replace(Jl,"$&/")+"/")+ct)),R.push(Z)),1;ct=0;var It=L===""?".":L+":";if(ee(v))for(var Dt=0;Dt<v.length;Dt++)L=v[Dt],F=It+We(L,Dt),ct+=C(L,R,H,F,Z);else if(Dt=st(v),typeof Dt=="function")for(v=Dt.call(v),Dt=0;!(L=v.next()).done;)L=L.value,F=It+We(L,Dt++),ct+=C(L,R,H,F,Z);else if(F==="object"){if(typeof v.then=="function")return C(Ne(v),R,H,L,Z);throw R=String(v),Error("Objects are not valid as a React child (found: "+(R==="[object Object]"?"object with keys {"+Object.keys(v).join(", ")+"}":R)+"). If you meant to render a collection of children, use an array instead.")}return ct}function w(v,R,H){if(v==null)return v;var L=[],Z=0;return C(v,L,"","",function(F){return R.call(H,F,Z++)}),L}function Q(v){if(v._status===-1){var R=v._result;R=R(),R.then(function(H){(v._status===0||v._status===-1)&&(v._status=1,v._result=H)},function(H){(v._status===0||v._status===-1)&&(v._status=2,v._result=H)}),v._status===-1&&(v._status=0,v._result=R)}if(v._status===1)return v._result.default;throw v._result}var ft=typeof reportError=="function"?reportError:function(v){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var R=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof v=="object"&&v!==null&&typeof v.message=="string"?String(v.message):String(v),error:v});if(!window.dispatchEvent(R))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",v);return}console.error(v)},yt={map:w,forEach:function(v,R,H){w(v,function(){R.apply(this,arguments)},H)},count:function(v){var R=0;return w(v,function(){R++}),R},toArray:function(v){return w(v,function(R){return R})||[]},only:function(v){if(!Ge(v))throw Error("React.Children.only expected to receive a single React element child.");return v}};return V.Activity=U,V.Children=yt,V.Component=Tt,V.Fragment=r,V.Profiler=f,V.PureComponent=Ht,V.StrictMode=s,V.Suspense=E,V.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,V.__COMPILER_RUNTIME={__proto__:null,c:function(v){return $.H.useMemoCache(v)}},V.cache=function(v){return function(){return v.apply(null,arguments)}},V.cacheSignal=function(){return null},V.cloneElement=function(v,R,H){if(v==null)throw Error("The argument must be a React element, but you passed "+v+".");var L=it({},v.props),Z=v.key;if(R!=null)for(F in R.key!==void 0&&(Z=""+R.key),R)!Ct.call(R,F)||F==="key"||F==="__self"||F==="__source"||F==="ref"&&R.ref===void 0||(L[F]=R[F]);var F=arguments.length-2;if(F===1)L.children=H;else if(1<F){for(var ct=Array(F),It=0;It<F;It++)ct[It]=arguments[It+2];L.children=ct}return Xe(v.type,Z,L)},V.createContext=function(v){return v={$$typeof:y,_currentValue:v,_currentValue2:v,_threadCount:0,Provider:null,Consumer:null},v.Provider=v,v.Consumer={$$typeof:d,_context:v},v},V.createElement=function(v,R,H){var L,Z={},F=null;if(R!=null)for(L in R.key!==void 0&&(F=""+R.key),R)Ct.call(R,L)&&L!=="key"&&L!=="__self"&&L!=="__source"&&(Z[L]=R[L]);var ct=arguments.length-2;if(ct===1)Z.children=H;else if(1<ct){for(var It=Array(ct),Dt=0;Dt<ct;Dt++)It[Dt]=arguments[Dt+2];Z.children=It}if(v&&v.defaultProps)for(L in ct=v.defaultProps,ct)Z[L]===void 0&&(Z[L]=ct[L]);return Xe(v,F,Z)},V.createRef=function(){return{current:null}},V.forwardRef=function(v){return{$$typeof:p,render:v}},V.isValidElement=Ge,V.lazy=function(v){return{$$typeof:N,_payload:{_status:-1,_result:v},_init:Q}},V.memo=function(v,R){return{$$typeof:b,type:v,compare:R===void 0?null:R}},V.startTransition=function(v){var R=$.T,H={};$.T=H;try{var L=v(),Z=$.S;Z!==null&&Z(H,L),typeof L=="object"&&L!==null&&typeof L.then=="function"&&L.then(Xt,ft)}catch(F){ft(F)}finally{R!==null&&H.types!==null&&(R.types=H.types),$.T=R}},V.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},V.use=function(v){return $.H.use(v)},V.useActionState=function(v,R,H){return $.H.useActionState(v,R,H)},V.useCallback=function(v,R){return $.H.useCallback(v,R)},V.useContext=function(v){return $.H.useContext(v)},V.useDebugValue=function(){},V.useDeferredValue=function(v,R){return $.H.useDeferredValue(v,R)},V.useEffect=function(v,R){return $.H.useEffect(v,R)},V.useEffectEvent=function(v){return $.H.useEffectEvent(v)},V.useId=function(){return $.H.useId()},V.useImperativeHandle=function(v,R,H){return $.H.useImperativeHandle(v,R,H)},V.useInsertionEffect=function(v,R){return $.H.useInsertionEffect(v,R)},V.useLayoutEffect=function(v,R){return $.H.useLayoutEffect(v,R)},V.useMemo=function(v,R){return $.H.useMemo(v,R)},V.useOptimistic=function(v,R){return $.H.useOptimistic(v,R)},V.useReducer=function(v,R,H){return $.H.useReducer(v,R,H)},V.useRef=function(v){return $.H.useRef(v)},V.useState=function(v){return $.H.useState(v)},V.useSyncExternalStore=function(v,R,H){return $.H.useSyncExternalStore(v,R,H)},V.useTransition=function(){return $.H.useTransition()},V.version="19.2.3",V}var Jd;function Rr(){return Jd||(Jd=1,dr.exports=Lp()),dr.exports}var bt=Rr();const kd=Hp(bt);var mr={exports:{}},ni={},yr={exports:{}},gr={};/**
|
|
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 Wd;function jp(){return Wd||(Wd=1,(function(c){function u(C,w){var Q=C.length;C.push(w);t:for(;0<Q;){var ft=Q-1>>>1,yt=C[ft];if(0<f(yt,w))C[ft]=w,C[Q]=yt,Q=ft;else break t}}function r(C){return C.length===0?null:C[0]}function s(C){if(C.length===0)return null;var w=C[0],Q=C.pop();if(Q!==w){C[0]=Q;t:for(var ft=0,yt=C.length,v=yt>>>1;ft<v;){var R=2*(ft+1)-1,H=C[R],L=R+1,Z=C[L];if(0>f(H,Q))L<yt&&0>f(Z,H)?(C[ft]=Z,C[L]=Q,ft=L):(C[ft]=H,C[R]=Q,ft=R);else if(L<yt&&0>f(Z,Q))C[ft]=Z,C[L]=Q,ft=L;else break t}}return w}function f(C,w){var Q=C.sortIndex-w.sortIndex;return Q!==0?Q:C.id-w.id}if(c.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;c.unstable_now=function(){return d.now()}}else{var y=Date,p=y.now();c.unstable_now=function(){return y.now()-p}}var E=[],b=[],N=1,U=null,W=3,st=!1,Et=!1,it=!1,Mt=!1,Tt=typeof setTimeout=="function"?setTimeout:null,wt=typeof clearTimeout=="function"?clearTimeout:null,Ht=typeof setImmediate<"u"?setImmediate:null;function te(C){for(var w=r(b);w!==null;){if(w.callback===null)s(b);else if(w.startTime<=C)s(b),w.sortIndex=w.expirationTime,u(E,w);else break;w=r(b)}}function ee(C){if(it=!1,te(C),!Et)if(r(E)!==null)Et=!0,Xt||(Xt=!0,le());else{var w=r(b);w!==null&&Ne(ee,w.startTime-C)}}var Xt=!1,$=-1,Ct=5,Xe=-1;function yn(){return Mt?!0:!(c.unstable_now()-Xe<Ct)}function Ge(){if(Mt=!1,Xt){var C=c.unstable_now();Xe=C;var w=!0;try{t:{Et=!1,it&&(it=!1,wt($),$=-1),st=!0;var Q=W;try{e:{for(te(C),U=r(E);U!==null&&!(U.expirationTime>C&&yn());){var ft=U.callback;if(typeof ft=="function"){U.callback=null,W=U.priorityLevel;var yt=ft(U.expirationTime<=C);if(C=c.unstable_now(),typeof yt=="function"){U.callback=yt,te(C),w=!0;break e}U===r(E)&&s(E),te(C)}else s(E);U=r(E)}if(U!==null)w=!0;else{var v=r(b);v!==null&&Ne(ee,v.startTime-C),w=!1}}break t}finally{U=null,W=Q,st=!1}w=void 0}}finally{w?le():Xt=!1}}}var le;if(typeof Ht=="function")le=function(){Ht(Ge)};else if(typeof MessageChannel<"u"){var Jl=new MessageChannel,We=Jl.port2;Jl.port1.onmessage=Ge,le=function(){We.postMessage(null)}}else le=function(){Tt(Ge,0)};function Ne(C,w){$=Tt(function(){C(c.unstable_now())},w)}c.unstable_IdlePriority=5,c.unstable_ImmediatePriority=1,c.unstable_LowPriority=4,c.unstable_NormalPriority=3,c.unstable_Profiling=null,c.unstable_UserBlockingPriority=2,c.unstable_cancelCallback=function(C){C.callback=null},c.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Ct=0<C?Math.floor(1e3/C):5},c.unstable_getCurrentPriorityLevel=function(){return W},c.unstable_next=function(C){switch(W){case 1:case 2:case 3:var w=3;break;default:w=W}var Q=W;W=w;try{return C()}finally{W=Q}},c.unstable_requestPaint=function(){Mt=!0},c.unstable_runWithPriority=function(C,w){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var Q=W;W=C;try{return w()}finally{W=Q}},c.unstable_scheduleCallback=function(C,w,Q){var ft=c.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?ft+Q:ft):Q=ft,C){case 1:var yt=-1;break;case 2:yt=250;break;case 5:yt=1073741823;break;case 4:yt=1e4;break;default:yt=5e3}return yt=Q+yt,C={id:N++,callback:w,priorityLevel:C,startTime:Q,expirationTime:yt,sortIndex:-1},Q>ft?(C.sortIndex=Q,u(b,C),r(E)===null&&C===r(b)&&(it?(wt($),$=-1):it=!0,Ne(ee,Q-ft))):(C.sortIndex=yt,u(E,C),Et||st||(Et=!0,Xt||(Xt=!0,le()))),C},c.unstable_shouldYield=yn,c.unstable_wrapCallback=function(C){var w=W;return function(){var Q=W;W=w;try{return C.apply(this,arguments)}finally{W=Q}}}})(gr)),gr}var $d;function qp(){return $d||($d=1,yr.exports=jp()),yr.exports}var pr={exports:{}},$t={};/**
|
|
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 Fd;function Yp(){if(Fd)return $t;Fd=1;var c=Rr();function u(E){var b="https://react.dev/errors/"+E;if(1<arguments.length){b+="?args[]="+encodeURIComponent(arguments[1]);for(var N=2;N<arguments.length;N++)b+="&args[]="+encodeURIComponent(arguments[N])}return"Minified React error #"+E+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var s={d:{f:r,r:function(){throw Error(u(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},f=Symbol.for("react.portal");function d(E,b,N){var U=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:U==null?null:""+U,children:E,containerInfo:b,implementation:N}}var y=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(E,b){if(E==="font")return"";if(typeof b=="string")return b==="use-credentials"?b:""}return $t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,$t.createPortal=function(E,b){var N=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!b||b.nodeType!==1&&b.nodeType!==9&&b.nodeType!==11)throw Error(u(299));return d(E,b,null,N)},$t.flushSync=function(E){var b=y.T,N=s.p;try{if(y.T=null,s.p=2,E)return E()}finally{y.T=b,s.p=N,s.d.f()}},$t.preconnect=function(E,b){typeof E=="string"&&(b?(b=b.crossOrigin,b=typeof b=="string"?b==="use-credentials"?b:"":void 0):b=null,s.d.C(E,b))},$t.prefetchDNS=function(E){typeof E=="string"&&s.d.D(E)},$t.preinit=function(E,b){if(typeof E=="string"&&b&&typeof b.as=="string"){var N=b.as,U=p(N,b.crossOrigin),W=typeof b.integrity=="string"?b.integrity:void 0,st=typeof b.fetchPriority=="string"?b.fetchPriority:void 0;N==="style"?s.d.S(E,typeof b.precedence=="string"?b.precedence:void 0,{crossOrigin:U,integrity:W,fetchPriority:st}):N==="script"&&s.d.X(E,{crossOrigin:U,integrity:W,fetchPriority:st,nonce:typeof b.nonce=="string"?b.nonce:void 0})}},$t.preinitModule=function(E,b){if(typeof E=="string")if(typeof b=="object"&&b!==null){if(b.as==null||b.as==="script"){var N=p(b.as,b.crossOrigin);s.d.M(E,{crossOrigin:N,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0})}}else b==null&&s.d.M(E)},$t.preload=function(E,b){if(typeof E=="string"&&typeof b=="object"&&b!==null&&typeof b.as=="string"){var N=b.as,U=p(N,b.crossOrigin);s.d.L(E,N,{crossOrigin:U,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0,type:typeof b.type=="string"?b.type:void 0,fetchPriority:typeof b.fetchPriority=="string"?b.fetchPriority:void 0,referrerPolicy:typeof b.referrerPolicy=="string"?b.referrerPolicy:void 0,imageSrcSet:typeof b.imageSrcSet=="string"?b.imageSrcSet:void 0,imageSizes:typeof b.imageSizes=="string"?b.imageSizes:void 0,media:typeof b.media=="string"?b.media:void 0})}},$t.preloadModule=function(E,b){if(typeof E=="string")if(b){var N=p(b.as,b.crossOrigin);s.d.m(E,{as:typeof b.as=="string"&&b.as!=="script"?b.as:void 0,crossOrigin:N,integrity:typeof b.integrity=="string"?b.integrity:void 0})}else s.d.m(E)},$t.requestFormReset=function(E){s.d.r(E)},$t.unstable_batchedUpdates=function(E,b){return E(b)},$t.useFormState=function(E,b,N){return y.H.useFormState(E,b,N)},$t.useFormStatus=function(){return y.H.useHostTransitionStatus()},$t.version="19.2.3",$t}var Id;function Xp(){if(Id)return pr.exports;Id=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(u){console.error(u)}}return c(),pr.exports=Yp(),pr.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 Pd;function Gp(){if(Pd)return ni;Pd=1;var c=qp(),u=Rr(),r=Xp();function s(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)e+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function d(t){var e=t,l=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(l=e.return),t=e.return;while(t)}return e.tag===3?l:null}function y(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function p(t){if(t.tag===31){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function E(t){if(d(t)!==t)throw Error(s(188))}function b(t){var e=t.alternate;if(!e){if(e=d(t),e===null)throw Error(s(188));return e!==t?null:t}for(var l=t,n=e;;){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 E(a),t;if(i===n)return E(a),e;i=i.sibling}throw Error(s(188))}if(l.return!==n.return)l=a,n=i;else{for(var o=!1,h=a.child;h;){if(h===l){o=!0,l=a,n=i;break}if(h===n){o=!0,n=a,l=i;break}h=h.sibling}if(!o){for(h=i.child;h;){if(h===l){o=!0,l=i,n=a;break}if(h===n){o=!0,n=i,l=a;break}h=h.sibling}if(!o)throw Error(s(189))}}if(l.alternate!==n)throw Error(s(190))}if(l.tag!==3)throw Error(s(188));return l.stateNode.current===l?t:e}function N(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=N(t),e!==null)return e;t=t.sibling}return null}var U=Object.assign,W=Symbol.for("react.element"),st=Symbol.for("react.transitional.element"),Et=Symbol.for("react.portal"),it=Symbol.for("react.fragment"),Mt=Symbol.for("react.strict_mode"),Tt=Symbol.for("react.profiler"),wt=Symbol.for("react.consumer"),Ht=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),Xt=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),Ct=Symbol.for("react.lazy"),Xe=Symbol.for("react.activity"),yn=Symbol.for("react.memo_cache_sentinel"),Ge=Symbol.iterator;function le(t){return t===null||typeof t!="object"?null:(t=Ge&&t[Ge]||t["@@iterator"],typeof t=="function"?t:null)}var Jl=Symbol.for("react.client.reference");function We(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===Jl?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case it:return"Fragment";case Tt:return"Profiler";case Mt:return"StrictMode";case ee:return"Suspense";case Xt:return"SuspenseList";case Xe:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case Et:return"Portal";case Ht:return t.displayName||"Context";case wt:return(t._context.displayName||"Context")+".Consumer";case te:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case $:return e=t.displayName||null,e!==null?e:We(t.type)||"Memo";case Ct:e=t._payload,t=t._init;try{return We(t(e))}catch{}}return null}var Ne=Array.isArray,C=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,w=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q={pending:!1,data:null,method:null,action:null},ft=[],yt=-1;function v(t){return{current:t}}function R(t){0>yt||(t.current=ft[yt],ft[yt]=null,yt--)}function H(t,e){yt++,ft[yt]=t.current,t.current=e}var L=v(null),Z=v(null),F=v(null),ct=v(null);function It(t,e){switch(H(F,e),H(Z,t),H(L,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?fd(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=fd(e),t=hd(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}R(L),H(L,t)}function Dt(){R(L),R(Z),R(F)}function sa(t){t.memoizedState!==null&&H(ct,t);var e=L.current,l=hd(e,t.type);e!==l&&(H(Z,t),H(L,l))}function di(t){Z.current===t&&(R(L),R(Z)),ct.current===t&&(R(ct),$a._currentValue=Q)}var ku,qr;function kl(t){if(ku===void 0)try{throw Error()}catch(l){var e=l.stack.trim().match(/\n( *(at )?)/);ku=e&&e[1]||"",qr=-1<l.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+ku+t+qr}var Wu=!1;function $u(t,e){if(!t||Wu)return"";Wu=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(e){var O=function(){throw Error()};if(Object.defineProperty(O.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(O,[])}catch(x){var _=x}Reflect.construct(t,[],O)}else{try{O.call()}catch(x){_=x}t.call(O.prototype)}}else{try{throw Error()}catch(x){_=x}(O=t())&&typeof O.catch=="function"&&O.catch(function(){})}}catch(x){if(x&&_&&typeof x.stack=="string")return[x.stack,_.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(),o=i[0],h=i[1];if(o&&h){var m=o.split(`
|
|
44
|
+
`),A=h.split(`
|
|
45
|
+
`);for(a=n=0;n<m.length&&!m[n].includes("DetermineComponentFrameRoot");)n++;for(;a<A.length&&!A[a].includes("DetermineComponentFrameRoot");)a++;if(n===m.length||a===A.length)for(n=m.length-1,a=A.length-1;1<=n&&0<=a&&m[n]!==A[a];)a--;for(;1<=n&&0<=a;n--,a--)if(m[n]!==A[a]){if(n!==1||a!==1)do if(n--,a--,0>a||m[n]!==A[a]){var M=`
|
|
46
|
+
`+m[n].replace(" at new "," at ");return t.displayName&&M.includes("<anonymous>")&&(M=M.replace("<anonymous>",t.displayName)),M}while(1<=n&&0<=a);break}}}finally{Wu=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?kl(l):""}function sy(t,e){switch(t.tag){case 26:case 27:case 5:return kl(t.type);case 16:return kl("Lazy");case 13:return t.child!==e&&e!==null?kl("Suspense Fallback"):kl("Suspense");case 19:return kl("SuspenseList");case 0:case 15:return $u(t.type,!1);case 11:return $u(t.type.render,!1);case 1:return $u(t.type,!0);case 31:return kl("Activity");default:return""}}function Yr(t){try{var e="",l=null;do e+=sy(t,l),l=t,t=t.return;while(t);return e}catch(n){return`
|
|
47
|
+
Error generating stack: `+n.message+`
|
|
48
|
+
`+n.stack}}var Fu=Object.prototype.hasOwnProperty,Iu=c.unstable_scheduleCallback,Pu=c.unstable_cancelCallback,cy=c.unstable_shouldYield,ry=c.unstable_requestPaint,he=c.unstable_now,oy=c.unstable_getCurrentPriorityLevel,Xr=c.unstable_ImmediatePriority,Gr=c.unstable_UserBlockingPriority,mi=c.unstable_NormalPriority,fy=c.unstable_LowPriority,Qr=c.unstable_IdlePriority,hy=c.log,dy=c.unstable_setDisableYieldValue,ca=null,de=null;function vl(t){if(typeof hy=="function"&&dy(t),de&&typeof de.setStrictMode=="function")try{de.setStrictMode(ca,t)}catch{}}var me=Math.clz32?Math.clz32:gy,my=Math.log,yy=Math.LN2;function gy(t){return t>>>=0,t===0?32:31-(my(t)/yy|0)|0}var yi=256,gi=262144,pi=4194304;function Wl(t){var e=t&42;if(e!==0)return e;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function vi(t,e,l){var n=t.pendingLanes;if(n===0)return 0;var a=0,i=t.suspendedLanes,o=t.pingedLanes;t=t.warmLanes;var h=n&134217727;return h!==0?(n=h&~i,n!==0?a=Wl(n):(o&=h,o!==0?a=Wl(o):l||(l=h&~t,l!==0&&(a=Wl(l))))):(h=n&~i,h!==0?a=Wl(h):o!==0?a=Wl(o):l||(l=n&~t,l!==0&&(a=Wl(l)))),a===0?0:e!==0&&e!==a&&(e&i)===0&&(i=a&-a,l=e&-e,i>=l||i===32&&(l&4194048)!==0)?e:a}function ra(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function py(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+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 e+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 Kr(){var t=pi;return pi<<=1,(pi&62914560)===0&&(pi=4194304),t}function ts(t){for(var e=[],l=0;31>l;l++)e.push(t);return e}function oa(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function vy(t,e,l,n,a,i){var o=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var h=t.entanglements,m=t.expirationTimes,A=t.hiddenUpdates;for(l=o&~l;0<l;){var M=31-me(l),O=1<<M;h[M]=0,m[M]=-1;var _=A[M];if(_!==null)for(A[M]=null,M=0;M<_.length;M++){var x=_[M];x!==null&&(x.lane&=-536870913)}l&=~O}n!==0&&Vr(t,n,0),i!==0&&a===0&&t.tag!==0&&(t.suspendedLanes|=i&~(o&~e))}function Vr(t,e,l){t.pendingLanes|=e,t.suspendedLanes&=~e;var n=31-me(e);t.entangledLanes|=e,t.entanglements[n]=t.entanglements[n]|1073741824|l&261930}function Zr(t,e){var l=t.entangledLanes|=e;for(t=t.entanglements;l;){var n=31-me(l),a=1<<n;a&e|t[n]&e&&(t[n]|=e),l&=~a}}function Jr(t,e){var l=e&-e;return l=(l&42)!==0?1:es(l),(l&(t.suspendedLanes|e))!==0?0:l}function es(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function ls(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function kr(){var t=w.p;return t!==0?t:(t=window.event,t===void 0?32:Nd(t.type))}function Wr(t,e){var l=w.p;try{return w.p=t,e()}finally{w.p=l}}var Sl=Math.random().toString(36).slice(2),Kt="__reactFiber$"+Sl,ne="__reactProps$"+Sl,gn="__reactContainer$"+Sl,ns="__reactEvents$"+Sl,Sy="__reactListeners$"+Sl,by="__reactHandles$"+Sl,$r="__reactResources$"+Sl,fa="__reactMarker$"+Sl;function as(t){delete t[Kt],delete t[ne],delete t[ns],delete t[Sy],delete t[by]}function pn(t){var e=t[Kt];if(e)return e;for(var l=t.parentNode;l;){if(e=l[gn]||l[Kt]){if(l=e.alternate,e.child!==null||l!==null&&l.child!==null)for(t=Sd(t);t!==null;){if(l=t[Kt])return l;t=Sd(t)}return e}t=l,l=t.parentNode}return null}function vn(t){if(t=t[Kt]||t[gn]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function ha(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(s(33))}function Sn(t){var e=t[$r];return e||(e=t[$r]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function Gt(t){t[fa]=!0}var Fr=new Set,Ir={};function $l(t,e){bn(t,e),bn(t+"Capture",e)}function bn(t,e){for(Ir[t]=e,t=0;t<e.length;t++)Fr.add(e[t])}var Ey=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]*$"),Pr={},to={};function Ty(t){return Fu.call(to,t)?!0:Fu.call(Pr,t)?!1:Ey.test(t)?to[t]=!0:(Pr[t]=!0,!1)}function Si(t,e,l){if(Ty(e))if(l===null)t.removeAttribute(e);else{switch(typeof l){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var n=e.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+l)}}function bi(t,e,l){if(l===null)t.removeAttribute(e);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+l)}}function $e(t,e,l,n){if(n===null)t.removeAttribute(l);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(l);return}t.setAttributeNS(e,l,""+n)}}function Ae(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function eo(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Ay(t,e,l){var n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var a=n.get,i=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return a.call(this)},set:function(o){l=""+o,i.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(o){l=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function is(t){if(!t._valueTracker){var e=eo(t)?"checked":"value";t._valueTracker=Ay(t,e,""+t[e])}}function lo(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var l=e.getValue(),n="";return t&&(n=eo(t)?t.checked?"true":"false":t.value),t=n,t!==l?(e.setValue(t),!0):!1}function Ei(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var _y=/[\n"\\]/g;function _e(t){return t.replace(_y,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function us(t,e,l,n,a,i,o,h){t.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?t.type=o:t.removeAttribute("type"),e!=null?o==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+Ae(e)):t.value!==""+Ae(e)&&(t.value=""+Ae(e)):o!=="submit"&&o!=="reset"||t.removeAttribute("value"),e!=null?ss(t,o,Ae(e)):l!=null?ss(t,o,Ae(l)):n!=null&&t.removeAttribute("value"),a==null&&i!=null&&(t.defaultChecked=!!i),a!=null&&(t.checked=a&&typeof a!="function"&&typeof a!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?t.name=""+Ae(h):t.removeAttribute("name")}function no(t,e,l,n,a,i,o,h){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.type=i),e!=null||l!=null){if(!(i!=="submit"&&i!=="reset"||e!=null)){is(t);return}l=l!=null?""+Ae(l):"",e=e!=null?""+Ae(e):l,h||e===t.value||(t.value=e),t.defaultValue=e}n=n??a,n=typeof n!="function"&&typeof n!="symbol"&&!!n,t.checked=h?t.checked:!!n,t.defaultChecked=!!n,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(t.name=o),is(t)}function ss(t,e,l){e==="number"&&Ei(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function En(t,e,l,n){if(t=t.options,e){e={};for(var a=0;a<l.length;a++)e["$"+l[a]]=!0;for(l=0;l<t.length;l++)a=e.hasOwnProperty("$"+t[l].value),t[l].selected!==a&&(t[l].selected=a),a&&n&&(t[l].defaultSelected=!0)}else{for(l=""+Ae(l),e=null,a=0;a<t.length;a++){if(t[a].value===l){t[a].selected=!0,n&&(t[a].defaultSelected=!0);return}e!==null||t[a].disabled||(e=t[a])}e!==null&&(e.selected=!0)}}function ao(t,e,l){if(e!=null&&(e=""+Ae(e),e!==t.value&&(t.value=e),l==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=l!=null?""+Ae(l):""}function io(t,e,l,n){if(e==null){if(n!=null){if(l!=null)throw Error(s(92));if(Ne(n)){if(1<n.length)throw Error(s(93));n=n[0]}l=n}l==null&&(l=""),e=l}l=Ae(e),t.defaultValue=l,n=t.textContent,n===l&&n!==""&&n!==null&&(t.value=n),is(t)}function Tn(t,e){if(e){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=e;return}}t.textContent=e}var xy=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 uo(t,e,l){var n=e.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?n?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":n?t.setProperty(e,l):typeof l!="number"||l===0||xy.has(e)?e==="float"?t.cssFloat=l:t[e]=(""+l).trim():t[e]=l+"px"}function so(t,e,l){if(e!=null&&typeof e!="object")throw Error(s(62));if(t=t.style,l!=null){for(var n in l)!l.hasOwnProperty(n)||e!=null&&e.hasOwnProperty(n)||(n.indexOf("--")===0?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="");for(var a in e)n=e[a],e.hasOwnProperty(a)&&l[a]!==n&&uo(t,a,n)}else for(var i in e)e.hasOwnProperty(i)&&uo(t,i,e[i])}function cs(t){if(t.indexOf("-")===-1)return!1;switch(t){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 My=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"],["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"]]),Cy=/^[\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 Ti(t){return Cy.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Fe(){}var rs=null;function os(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var An=null,_n=null;function co(t){var e=vn(t);if(e&&(t=e.stateNode)){var l=t[ne]||null;t:switch(t=e.stateNode,e.type){case"input":if(us(t,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),e=l.name,l.type==="radio"&&e!=null){for(l=t;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+_e(""+e)+'"][type="radio"]'),e=0;e<l.length;e++){var n=l[e];if(n!==t&&n.form===t.form){var a=n[ne]||null;if(!a)throw Error(s(90));us(n,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(e=0;e<l.length;e++)n=l[e],n.form===t.form&&lo(n)}break t;case"textarea":ao(t,l.value,l.defaultValue);break t;case"select":e=l.value,e!=null&&En(t,!!l.multiple,e,!1)}}}var fs=!1;function ro(t,e,l){if(fs)return t(e,l);fs=!0;try{var n=t(e);return n}finally{if(fs=!1,(An!==null||_n!==null)&&(ru(),An&&(e=An,t=_n,_n=An=null,co(e),t)))for(e=0;e<t.length;e++)co(t[e])}}function da(t,e){var l=t.stateNode;if(l===null)return null;var n=l[ne]||null;if(n===null)return null;l=n[e];t:switch(e){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)||(t=t.type,n=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!n;break t;default:t=!1}if(t)return null;if(l&&typeof l!="function")throw Error(s(231,e,typeof l));return l}var Ie=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),hs=!1;if(Ie)try{var ma={};Object.defineProperty(ma,"passive",{get:function(){hs=!0}}),window.addEventListener("test",ma,ma),window.removeEventListener("test",ma,ma)}catch{hs=!1}var bl=null,ds=null,Ai=null;function oo(){if(Ai)return Ai;var t,e=ds,l=e.length,n,a="value"in bl?bl.value:bl.textContent,i=a.length;for(t=0;t<l&&e[t]===a[t];t++);var o=l-t;for(n=1;n<=o&&e[l-n]===a[i-n];n++);return Ai=a.slice(t,1<n?1-n:void 0)}function _i(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function xi(){return!0}function fo(){return!1}function ae(t){function e(l,n,a,i,o){this._reactName=l,this._targetInst=a,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var h in t)t.hasOwnProperty(h)&&(l=t[h],this[h]=l?l(i):i[h]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?xi:fo,this.isPropagationStopped=fo,this}return U(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=xi)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=xi)},persist:function(){},isPersistent:xi}),e}var Fl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mi=ae(Fl),ya=U({},Fl,{view:0,detail:0}),zy=ae(ya),ms,ys,ga,Ci=U({},ya,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ps,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==ga&&(ga&&t.type==="mousemove"?(ms=t.screenX-ga.screenX,ys=t.screenY-ga.screenY):ys=ms=0,ga=t),ms)},movementY:function(t){return"movementY"in t?t.movementY:ys}}),ho=ae(Ci),Oy=U({},Ci,{dataTransfer:0}),Dy=ae(Oy),Ry=U({},ya,{relatedTarget:0}),gs=ae(Ry),Uy=U({},Fl,{animationName:0,elapsedTime:0,pseudoElement:0}),wy=ae(Uy),Hy=U({},Fl,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Ny=ae(Hy),By=U({},Fl,{data:0}),mo=ae(By),Ly={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jy={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"},qy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Yy(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=qy[t])?!!e[t]:!1}function ps(){return Yy}var Xy=U({},ya,{key:function(t){if(t.key){var e=Ly[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=_i(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?jy[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ps,charCode:function(t){return t.type==="keypress"?_i(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?_i(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Gy=ae(Xy),Qy=U({},Ci,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yo=ae(Qy),Ky=U({},ya,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ps}),Vy=ae(Ky),Zy=U({},Fl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Jy=ae(Zy),ky=U({},Ci,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Wy=ae(ky),$y=U({},Fl,{newState:0,oldState:0}),Fy=ae($y),Iy=[9,13,27,32],vs=Ie&&"CompositionEvent"in window,pa=null;Ie&&"documentMode"in document&&(pa=document.documentMode);var Py=Ie&&"TextEvent"in window&&!pa,go=Ie&&(!vs||pa&&8<pa&&11>=pa),po=" ",vo=!1;function So(t,e){switch(t){case"keyup":return Iy.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bo(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var xn=!1;function tg(t,e){switch(t){case"compositionend":return bo(e);case"keypress":return e.which!==32?null:(vo=!0,po);case"textInput":return t=e.data,t===po&&vo?null:t;default:return null}}function eg(t,e){if(xn)return t==="compositionend"||!vs&&So(t,e)?(t=oo(),Ai=ds=bl=null,xn=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return go&&e.locale!=="ko"?null:e.data;default:return null}}var lg={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 Eo(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!lg[t.type]:e==="textarea"}function To(t,e,l,n){An?_n?_n.push(n):_n=[n]:An=n,e=gu(e,"onChange"),0<e.length&&(l=new Mi("onChange","change",null,l,n),t.push({event:l,listeners:e}))}var va=null,Sa=null;function ng(t){id(t,0)}function zi(t){var e=ha(t);if(lo(e))return t}function Ao(t,e){if(t==="change")return e}var _o=!1;if(Ie){var Ss;if(Ie){var bs="oninput"in document;if(!bs){var xo=document.createElement("div");xo.setAttribute("oninput","return;"),bs=typeof xo.oninput=="function"}Ss=bs}else Ss=!1;_o=Ss&&(!document.documentMode||9<document.documentMode)}function Mo(){va&&(va.detachEvent("onpropertychange",Co),Sa=va=null)}function Co(t){if(t.propertyName==="value"&&zi(Sa)){var e=[];To(e,Sa,t,os(t)),ro(ng,e)}}function ag(t,e,l){t==="focusin"?(Mo(),va=e,Sa=l,va.attachEvent("onpropertychange",Co)):t==="focusout"&&Mo()}function ig(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return zi(Sa)}function ug(t,e){if(t==="click")return zi(e)}function sg(t,e){if(t==="input"||t==="change")return zi(e)}function cg(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var ye=typeof Object.is=="function"?Object.is:cg;function ba(t,e){if(ye(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var l=Object.keys(t),n=Object.keys(e);if(l.length!==n.length)return!1;for(n=0;n<l.length;n++){var a=l[n];if(!Fu.call(e,a)||!ye(t[a],e[a]))return!1}return!0}function zo(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Oo(t,e){var l=zo(t);t=0;for(var n;l;){if(l.nodeType===3){if(n=t+l.textContent.length,t<=e&&n>=e)return{node:l,offset:e-t};t=n}t:{for(;l;){if(l.nextSibling){l=l.nextSibling;break t}l=l.parentNode}l=void 0}l=zo(l)}}function Do(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Do(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Ro(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=Ei(t.document);e instanceof t.HTMLIFrameElement;){try{var l=typeof e.contentWindow.location.href=="string"}catch{l=!1}if(l)t=e.contentWindow;else break;e=Ei(t.document)}return e}function Es(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var rg=Ie&&"documentMode"in document&&11>=document.documentMode,Mn=null,Ts=null,Ea=null,As=!1;function Uo(t,e,l){var n=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;As||Mn==null||Mn!==Ei(n)||(n=Mn,"selectionStart"in n&&Es(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}),Ea&&ba(Ea,n)||(Ea=n,n=gu(Ts,"onSelect"),0<n.length&&(e=new Mi("onSelect","select",null,e,l),t.push({event:e,listeners:n}),e.target=Mn)))}function Il(t,e){var l={};return l[t.toLowerCase()]=e.toLowerCase(),l["Webkit"+t]="webkit"+e,l["Moz"+t]="moz"+e,l}var Cn={animationend:Il("Animation","AnimationEnd"),animationiteration:Il("Animation","AnimationIteration"),animationstart:Il("Animation","AnimationStart"),transitionrun:Il("Transition","TransitionRun"),transitionstart:Il("Transition","TransitionStart"),transitioncancel:Il("Transition","TransitionCancel"),transitionend:Il("Transition","TransitionEnd")},_s={},wo={};Ie&&(wo=document.createElement("div").style,"AnimationEvent"in window||(delete Cn.animationend.animation,delete Cn.animationiteration.animation,delete Cn.animationstart.animation),"TransitionEvent"in window||delete Cn.transitionend.transition);function Pl(t){if(_s[t])return _s[t];if(!Cn[t])return t;var e=Cn[t],l;for(l in e)if(e.hasOwnProperty(l)&&l in wo)return _s[t]=e[l];return t}var Ho=Pl("animationend"),No=Pl("animationiteration"),Bo=Pl("animationstart"),og=Pl("transitionrun"),fg=Pl("transitionstart"),hg=Pl("transitioncancel"),Lo=Pl("transitionend"),jo=new Map,xs="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error 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(" ");xs.push("scrollEnd");function Be(t,e){jo.set(t,e),$l(e,[t])}var Oi=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},xe=[],zn=0,Ms=0;function Di(){for(var t=zn,e=Ms=zn=0;e<t;){var l=xe[e];xe[e++]=null;var n=xe[e];xe[e++]=null;var a=xe[e];xe[e++]=null;var i=xe[e];if(xe[e++]=null,n!==null&&a!==null){var o=n.pending;o===null?a.next=a:(a.next=o.next,o.next=a),n.pending=a}i!==0&&qo(l,a,i)}}function Ri(t,e,l,n){xe[zn++]=t,xe[zn++]=e,xe[zn++]=l,xe[zn++]=n,Ms|=n,t.lanes|=n,t=t.alternate,t!==null&&(t.lanes|=n)}function Cs(t,e,l,n){return Ri(t,e,l,n),Ui(t)}function tn(t,e){return Ri(t,null,null,e),Ui(t)}function qo(t,e,l){t.lanes|=l;var n=t.alternate;n!==null&&(n.lanes|=l);for(var a=!1,i=t.return;i!==null;)i.childLanes|=l,n=i.alternate,n!==null&&(n.childLanes|=l),i.tag===22&&(t=i.stateNode,t===null||t._visibility&1||(a=!0)),t=i,i=i.return;return t.tag===3?(i=t.stateNode,a&&e!==null&&(a=31-me(l),t=i.hiddenUpdates,n=t[a],n===null?t[a]=[e]:n.push(e),e.lane=l|536870912),i):null}function Ui(t){if(50<Qa)throw Qa=0,Bc=null,Error(s(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var On={};function dg(t,e,l,n){this.tag=t,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=e,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 ge(t,e,l,n){return new dg(t,e,l,n)}function zs(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Pe(t,e){var l=t.alternate;return l===null?(l=ge(t.tag,e,t.key,t.mode),l.elementType=t.elementType,l.type=t.type,l.stateNode=t.stateNode,l.alternate=t,t.alternate=l):(l.pendingProps=e,l.type=t.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=t.flags&65011712,l.childLanes=t.childLanes,l.lanes=t.lanes,l.child=t.child,l.memoizedProps=t.memoizedProps,l.memoizedState=t.memoizedState,l.updateQueue=t.updateQueue,e=t.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},l.sibling=t.sibling,l.index=t.index,l.ref=t.ref,l.refCleanup=t.refCleanup,l}function Yo(t,e){t.flags&=65011714;var l=t.alternate;return l===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=l.childLanes,t.lanes=l.lanes,t.child=l.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=l.memoizedProps,t.memoizedState=l.memoizedState,t.updateQueue=l.updateQueue,t.type=l.type,e=l.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function wi(t,e,l,n,a,i){var o=0;if(n=t,typeof t=="function")zs(t)&&(o=1);else if(typeof t=="string")o=vp(t,l,L.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case Xe:return t=ge(31,l,e,a),t.elementType=Xe,t.lanes=i,t;case it:return en(l.children,a,i,e);case Mt:o=8,a|=24;break;case Tt:return t=ge(12,l,e,a|2),t.elementType=Tt,t.lanes=i,t;case ee:return t=ge(13,l,e,a),t.elementType=ee,t.lanes=i,t;case Xt:return t=ge(19,l,e,a),t.elementType=Xt,t.lanes=i,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Ht:o=10;break t;case wt:o=9;break t;case te:o=11;break t;case $:o=14;break t;case Ct:o=16,n=null;break t}o=29,l=Error(s(130,t===null?"null":typeof t,"")),n=null}return e=ge(o,l,e,a),e.elementType=t,e.type=n,e.lanes=i,e}function en(t,e,l,n){return t=ge(7,t,n,e),t.lanes=l,t}function Os(t,e,l){return t=ge(6,t,null,e),t.lanes=l,t}function Xo(t){var e=ge(18,null,null,0);return e.stateNode=t,e}function Ds(t,e,l){return e=ge(4,t.children!==null?t.children:[],t.key,e),e.lanes=l,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var Go=new WeakMap;function Me(t,e){if(typeof t=="object"&&t!==null){var l=Go.get(t);return l!==void 0?l:(e={value:t,source:e,stack:Yr(e)},Go.set(t,e),e)}return{value:t,source:e,stack:Yr(e)}}var Dn=[],Rn=0,Hi=null,Ta=0,Ce=[],ze=0,El=null,Qe=1,Ke="";function tl(t,e){Dn[Rn++]=Ta,Dn[Rn++]=Hi,Hi=t,Ta=e}function Qo(t,e,l){Ce[ze++]=Qe,Ce[ze++]=Ke,Ce[ze++]=El,El=t;var n=Qe;t=Ke;var a=32-me(n)-1;n&=~(1<<a),l+=1;var i=32-me(e)+a;if(30<i){var o=a-a%5;i=(n&(1<<o)-1).toString(32),n>>=o,a-=o,Qe=1<<32-me(e)+a|l<<a|n,Ke=i+t}else Qe=1<<i|l<<a|n,Ke=t}function Rs(t){t.return!==null&&(tl(t,1),Qo(t,1,0))}function Us(t){for(;t===Hi;)Hi=Dn[--Rn],Dn[Rn]=null,Ta=Dn[--Rn],Dn[Rn]=null;for(;t===El;)El=Ce[--ze],Ce[ze]=null,Ke=Ce[--ze],Ce[ze]=null,Qe=Ce[--ze],Ce[ze]=null}function Ko(t,e){Ce[ze++]=Qe,Ce[ze++]=Ke,Ce[ze++]=El,Qe=e.id,Ke=e.overflow,El=t}var Vt=null,At=null,lt=!1,Tl=null,Oe=!1,ws=Error(s(519));function Al(t){var e=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Aa(Me(e,t)),ws}function Vo(t){var e=t.stateNode,l=t.type,n=t.memoizedProps;switch(e[Kt]=t,e[ne]=n,l){case"dialog":P("cancel",e),P("close",e);break;case"iframe":case"object":case"embed":P("load",e);break;case"video":case"audio":for(l=0;l<Va.length;l++)P(Va[l],e);break;case"source":P("error",e);break;case"img":case"image":case"link":P("error",e),P("load",e);break;case"details":P("toggle",e);break;case"input":P("invalid",e),no(e,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":P("invalid",e);break;case"textarea":P("invalid",e),io(e,n.value,n.defaultValue,n.children)}l=n.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||e.textContent===""+l||n.suppressHydrationWarning===!0||rd(e.textContent,l)?(n.popover!=null&&(P("beforetoggle",e),P("toggle",e)),n.onScroll!=null&&P("scroll",e),n.onScrollEnd!=null&&P("scrollend",e),n.onClick!=null&&(e.onclick=Fe),e=!0):e=!1,e||Al(t,!0)}function Zo(t){for(Vt=t.return;Vt;)switch(Vt.tag){case 5:case 31:case 13:Oe=!1;return;case 27:case 3:Oe=!0;return;default:Vt=Vt.return}}function Un(t){if(t!==Vt)return!1;if(!lt)return Zo(t),lt=!0,!1;var e=t.tag,l;if((l=e!==3&&e!==27)&&((l=e===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||Fc(t.type,t.memoizedProps)),l=!l),l&&At&&Al(t),Zo(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(317));At=vd(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(317));At=vd(t)}else e===27?(e=At,Ll(t.type)?(t=lr,lr=null,At=t):At=e):At=Vt?Re(t.stateNode.nextSibling):null;return!0}function ln(){At=Vt=null,lt=!1}function Hs(){var t=Tl;return t!==null&&(ce===null?ce=t:ce.push.apply(ce,t),Tl=null),t}function Aa(t){Tl===null?Tl=[t]:Tl.push(t)}var Ns=v(null),nn=null,el=null;function _l(t,e,l){H(Ns,e._currentValue),e._currentValue=l}function ll(t){t._currentValue=Ns.current,R(Ns)}function Bs(t,e,l){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===l)break;t=t.return}}function Ls(t,e,l,n){var a=t.child;for(a!==null&&(a.return=t);a!==null;){var i=a.dependencies;if(i!==null){var o=a.child;i=i.firstContext;t:for(;i!==null;){var h=i;i=a;for(var m=0;m<e.length;m++)if(h.context===e[m]){i.lanes|=l,h=i.alternate,h!==null&&(h.lanes|=l),Bs(i.return,l,t),n||(o=null);break t}i=h.next}}else if(a.tag===18){if(o=a.return,o===null)throw Error(s(341));o.lanes|=l,i=o.alternate,i!==null&&(i.lanes|=l),Bs(o,l,t),o=null}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}}function wn(t,e,l,n){t=null;for(var a=e,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 o=a.alternate;if(o===null)throw Error(s(387));if(o=o.memoizedProps,o!==null){var h=a.type;ye(a.pendingProps.value,o.value)||(t!==null?t.push(h):t=[h])}}else if(a===ct.current){if(o=a.alternate,o===null)throw Error(s(387));o.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(t!==null?t.push($a):t=[$a])}a=a.return}t!==null&&Ls(e,t,l,n),e.flags|=262144}function Ni(t){for(t=t.firstContext;t!==null;){if(!ye(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function an(t){nn=t,el=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Zt(t){return Jo(nn,t)}function Bi(t,e){return nn===null&&an(t),Jo(t,e)}function Jo(t,e){var l=e._currentValue;if(e={context:e,memoizedValue:l,next:null},el===null){if(t===null)throw Error(s(308));el=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else el=el.next=e;return l}var mg=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(l,n){t.push(n)}};this.abort=function(){e.aborted=!0,t.forEach(function(l){return l()})}},yg=c.unstable_scheduleCallback,gg=c.unstable_NormalPriority,Nt={$$typeof:Ht,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function js(){return{controller:new mg,data:new Map,refCount:0}}function _a(t){t.refCount--,t.refCount===0&&yg(gg,function(){t.controller.abort()})}var xa=null,qs=0,Hn=0,Nn=null;function pg(t,e){if(xa===null){var l=xa=[];qs=0,Hn=Gc(),Nn={status:"pending",value:void 0,then:function(n){l.push(n)}}}return qs++,e.then(ko,ko),e}function ko(){if(--qs===0&&xa!==null){Nn!==null&&(Nn.status="fulfilled");var t=xa;xa=null,Hn=0,Nn=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function vg(t,e){var l=[],n={status:"pending",value:null,reason:null,then:function(a){l.push(a)}};return t.then(function(){n.status="fulfilled",n.value=e;for(var a=0;a<l.length;a++)(0,l[a])(e)},function(a){for(n.status="rejected",n.reason=a,a=0;a<l.length;a++)(0,l[a])(void 0)}),n}var Wo=C.S;C.S=function(t,e){wh=he(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&pg(t,e),Wo!==null&&Wo(t,e)};var un=v(null);function Ys(){var t=un.current;return t!==null?t:gt.pooledCache}function Li(t,e){e===null?H(un,un.current):H(un,e.pool)}function $o(){var t=Ys();return t===null?null:{parent:Nt._currentValue,pool:t}}var Bn=Error(s(460)),Xs=Error(s(474)),ji=Error(s(542)),qi={then:function(){}};function Fo(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Io(t,e,l){switch(l=t[l],l===void 0?t.push(e):l!==e&&(e.then(Fe,Fe),e=l),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,tf(t),t;default:if(typeof e.status=="string")e.then(Fe,Fe);else{if(t=gt,t!==null&&100<t.shellSuspendCounter)throw Error(s(482));t=e,t.status="pending",t.then(function(n){if(e.status==="pending"){var a=e;a.status="fulfilled",a.value=n}},function(n){if(e.status==="pending"){var a=e;a.status="rejected",a.reason=n}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,tf(t),t}throw cn=e,Bn}}function sn(t){try{var e=t._init;return e(t._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(cn=l,Bn):l}}var cn=null;function Po(){if(cn===null)throw Error(s(459));var t=cn;return cn=null,t}function tf(t){if(t===Bn||t===ji)throw Error(s(483))}var Ln=null,Ma=0;function Yi(t){var e=Ma;return Ma+=1,Ln===null&&(Ln=[]),Io(Ln,t,e)}function Ca(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function Xi(t,e){throw e.$$typeof===W?Error(s(525)):(t=Object.prototype.toString.call(e),Error(s(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function ef(t){function e(S,g){if(t){var T=S.deletions;T===null?(S.deletions=[g],S.flags|=16):T.push(g)}}function l(S,g){if(!t)return null;for(;g!==null;)e(S,g),g=g.sibling;return null}function n(S){for(var g=new Map;S!==null;)S.key!==null?g.set(S.key,S):g.set(S.index,S),S=S.sibling;return g}function a(S,g){return S=Pe(S,g),S.index=0,S.sibling=null,S}function i(S,g,T){return S.index=T,t?(T=S.alternate,T!==null?(T=T.index,T<g?(S.flags|=67108866,g):T):(S.flags|=67108866,g)):(S.flags|=1048576,g)}function o(S){return t&&S.alternate===null&&(S.flags|=67108866),S}function h(S,g,T,z){return g===null||g.tag!==6?(g=Os(T,S.mode,z),g.return=S,g):(g=a(g,T),g.return=S,g)}function m(S,g,T,z){var q=T.type;return q===it?M(S,g,T.props.children,z,T.key):g!==null&&(g.elementType===q||typeof q=="object"&&q!==null&&q.$$typeof===Ct&&sn(q)===g.type)?(g=a(g,T.props),Ca(g,T),g.return=S,g):(g=wi(T.type,T.key,T.props,null,S.mode,z),Ca(g,T),g.return=S,g)}function A(S,g,T,z){return g===null||g.tag!==4||g.stateNode.containerInfo!==T.containerInfo||g.stateNode.implementation!==T.implementation?(g=Ds(T,S.mode,z),g.return=S,g):(g=a(g,T.children||[]),g.return=S,g)}function M(S,g,T,z,q){return g===null||g.tag!==7?(g=en(T,S.mode,z,q),g.return=S,g):(g=a(g,T),g.return=S,g)}function O(S,g,T){if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return g=Os(""+g,S.mode,T),g.return=S,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case st:return T=wi(g.type,g.key,g.props,null,S.mode,T),Ca(T,g),T.return=S,T;case Et:return g=Ds(g,S.mode,T),g.return=S,g;case Ct:return g=sn(g),O(S,g,T)}if(Ne(g)||le(g))return g=en(g,S.mode,T,null),g.return=S,g;if(typeof g.then=="function")return O(S,Yi(g),T);if(g.$$typeof===Ht)return O(S,Bi(S,g),T);Xi(S,g)}return null}function _(S,g,T,z){var q=g!==null?g.key:null;if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return q!==null?null:h(S,g,""+T,z);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case st:return T.key===q?m(S,g,T,z):null;case Et:return T.key===q?A(S,g,T,z):null;case Ct:return T=sn(T),_(S,g,T,z)}if(Ne(T)||le(T))return q!==null?null:M(S,g,T,z,null);if(typeof T.then=="function")return _(S,g,Yi(T),z);if(T.$$typeof===Ht)return _(S,g,Bi(S,T),z);Xi(S,T)}return null}function x(S,g,T,z,q){if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return S=S.get(T)||null,h(g,S,""+z,q);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case st:return S=S.get(z.key===null?T:z.key)||null,m(g,S,z,q);case Et:return S=S.get(z.key===null?T:z.key)||null,A(g,S,z,q);case Ct:return z=sn(z),x(S,g,T,z,q)}if(Ne(z)||le(z))return S=S.get(T)||null,M(g,S,z,q,null);if(typeof z.then=="function")return x(S,g,T,Yi(z),q);if(z.$$typeof===Ht)return x(S,g,T,Bi(g,z),q);Xi(g,z)}return null}function B(S,g,T,z){for(var q=null,nt=null,j=g,k=g=0,et=null;j!==null&&k<T.length;k++){j.index>k?(et=j,j=null):et=j.sibling;var at=_(S,j,T[k],z);if(at===null){j===null&&(j=et);break}t&&j&&at.alternate===null&&e(S,j),g=i(at,g,k),nt===null?q=at:nt.sibling=at,nt=at,j=et}if(k===T.length)return l(S,j),lt&&tl(S,k),q;if(j===null){for(;k<T.length;k++)j=O(S,T[k],z),j!==null&&(g=i(j,g,k),nt===null?q=j:nt.sibling=j,nt=j);return lt&&tl(S,k),q}for(j=n(j);k<T.length;k++)et=x(j,S,k,T[k],z),et!==null&&(t&&et.alternate!==null&&j.delete(et.key===null?k:et.key),g=i(et,g,k),nt===null?q=et:nt.sibling=et,nt=et);return t&&j.forEach(function(Gl){return e(S,Gl)}),lt&&tl(S,k),q}function X(S,g,T,z){if(T==null)throw Error(s(151));for(var q=null,nt=null,j=g,k=g=0,et=null,at=T.next();j!==null&&!at.done;k++,at=T.next()){j.index>k?(et=j,j=null):et=j.sibling;var Gl=_(S,j,at.value,z);if(Gl===null){j===null&&(j=et);break}t&&j&&Gl.alternate===null&&e(S,j),g=i(Gl,g,k),nt===null?q=Gl:nt.sibling=Gl,nt=Gl,j=et}if(at.done)return l(S,j),lt&&tl(S,k),q;if(j===null){for(;!at.done;k++,at=T.next())at=O(S,at.value,z),at!==null&&(g=i(at,g,k),nt===null?q=at:nt.sibling=at,nt=at);return lt&&tl(S,k),q}for(j=n(j);!at.done;k++,at=T.next())at=x(j,S,k,at.value,z),at!==null&&(t&&at.alternate!==null&&j.delete(at.key===null?k:at.key),g=i(at,g,k),nt===null?q=at:nt.sibling=at,nt=at);return t&&j.forEach(function(Op){return e(S,Op)}),lt&&tl(S,k),q}function mt(S,g,T,z){if(typeof T=="object"&&T!==null&&T.type===it&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case st:t:{for(var q=T.key;g!==null;){if(g.key===q){if(q=T.type,q===it){if(g.tag===7){l(S,g.sibling),z=a(g,T.props.children),z.return=S,S=z;break t}}else if(g.elementType===q||typeof q=="object"&&q!==null&&q.$$typeof===Ct&&sn(q)===g.type){l(S,g.sibling),z=a(g,T.props),Ca(z,T),z.return=S,S=z;break t}l(S,g);break}else e(S,g);g=g.sibling}T.type===it?(z=en(T.props.children,S.mode,z,T.key),z.return=S,S=z):(z=wi(T.type,T.key,T.props,null,S.mode,z),Ca(z,T),z.return=S,S=z)}return o(S);case Et:t:{for(q=T.key;g!==null;){if(g.key===q)if(g.tag===4&&g.stateNode.containerInfo===T.containerInfo&&g.stateNode.implementation===T.implementation){l(S,g.sibling),z=a(g,T.children||[]),z.return=S,S=z;break t}else{l(S,g);break}else e(S,g);g=g.sibling}z=Ds(T,S.mode,z),z.return=S,S=z}return o(S);case Ct:return T=sn(T),mt(S,g,T,z)}if(Ne(T))return B(S,g,T,z);if(le(T)){if(q=le(T),typeof q!="function")throw Error(s(150));return T=q.call(T),X(S,g,T,z)}if(typeof T.then=="function")return mt(S,g,Yi(T),z);if(T.$$typeof===Ht)return mt(S,g,Bi(S,T),z);Xi(S,T)}return typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint"?(T=""+T,g!==null&&g.tag===6?(l(S,g.sibling),z=a(g,T),z.return=S,S=z):(l(S,g),z=Os(T,S.mode,z),z.return=S,S=z),o(S)):l(S,g)}return function(S,g,T,z){try{Ma=0;var q=mt(S,g,T,z);return Ln=null,q}catch(j){if(j===Bn||j===ji)throw j;var nt=ge(29,j,null,S.mode);return nt.lanes=z,nt.return=S,nt}finally{}}}var rn=ef(!0),lf=ef(!1),xl=!1;function Gs(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Qs(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Ml(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Cl(t,e,l){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,(ut&2)!==0){var a=n.pending;return a===null?e.next=e:(e.next=a.next,a.next=e),n.pending=e,e=Ui(t),qo(t,null,l),e}return Ri(t,n,e,l),Ui(t)}function za(t,e,l){if(e=e.updateQueue,e!==null&&(e=e.shared,(l&4194048)!==0)){var n=e.lanes;n&=t.pendingLanes,l|=n,e.lanes=l,Zr(t,l)}}function Ks(t,e){var l=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,l===n)){var a=null,i=null;if(l=l.firstBaseUpdate,l!==null){do{var o={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};i===null?a=i=o:i=i.next=o,l=l.next}while(l!==null);i===null?a=i=e:i=i.next=e}else a=i=e;l={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:n.shared,callbacks:n.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=e:t.next=e,l.lastBaseUpdate=e}var Vs=!1;function Oa(){if(Vs){var t=Nn;if(t!==null)throw t}}function Da(t,e,l,n){Vs=!1;var a=t.updateQueue;xl=!1;var i=a.firstBaseUpdate,o=a.lastBaseUpdate,h=a.shared.pending;if(h!==null){a.shared.pending=null;var m=h,A=m.next;m.next=null,o===null?i=A:o.next=A,o=m;var M=t.alternate;M!==null&&(M=M.updateQueue,h=M.lastBaseUpdate,h!==o&&(h===null?M.firstBaseUpdate=A:h.next=A,M.lastBaseUpdate=m))}if(i!==null){var O=a.baseState;o=0,M=A=m=null,h=i;do{var _=h.lane&-536870913,x=_!==h.lane;if(x?(tt&_)===_:(n&_)===_){_!==0&&_===Hn&&(Vs=!0),M!==null&&(M=M.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});t:{var B=t,X=h;_=e;var mt=l;switch(X.tag){case 1:if(B=X.payload,typeof B=="function"){O=B.call(mt,O,_);break t}O=B;break t;case 3:B.flags=B.flags&-65537|128;case 0:if(B=X.payload,_=typeof B=="function"?B.call(mt,O,_):B,_==null)break t;O=U({},O,_);break t;case 2:xl=!0}}_=h.callback,_!==null&&(t.flags|=64,x&&(t.flags|=8192),x=a.callbacks,x===null?a.callbacks=[_]:x.push(_))}else x={lane:_,tag:h.tag,payload:h.payload,callback:h.callback,next:null},M===null?(A=M=x,m=O):M=M.next=x,o|=_;if(h=h.next,h===null){if(h=a.shared.pending,h===null)break;x=h,h=x.next,x.next=null,a.lastBaseUpdate=x,a.shared.pending=null}}while(!0);M===null&&(m=O),a.baseState=m,a.firstBaseUpdate=A,a.lastBaseUpdate=M,i===null&&(a.shared.lanes=0),Ul|=o,t.lanes=o,t.memoizedState=O}}function nf(t,e){if(typeof t!="function")throw Error(s(191,t));t.call(e)}function af(t,e){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)nf(l[t],e)}var jn=v(null),Gi=v(0);function uf(t,e){t=fl,H(Gi,t),H(jn,e),fl=t|e.baseLanes}function Zs(){H(Gi,fl),H(jn,jn.current)}function Js(){fl=Gi.current,R(jn),R(Gi)}var pe=v(null),De=null;function zl(t){var e=t.alternate;H(Rt,Rt.current&1),H(pe,t),De===null&&(e===null||jn.current!==null||e.memoizedState!==null)&&(De=t)}function ks(t){H(Rt,Rt.current),H(pe,t),De===null&&(De=t)}function sf(t){t.tag===22?(H(Rt,Rt.current),H(pe,t),De===null&&(De=t)):Ol()}function Ol(){H(Rt,Rt.current),H(pe,pe.current)}function ve(t){R(pe),De===t&&(De=null),R(Rt)}var Rt=v(0);function Qi(t){for(var e=t;e!==null;){if(e.tag===13){var l=e.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||tr(l)||er(l)))return e}else if(e.tag===19&&(e.memoizedProps.revealOrder==="forwards"||e.memoizedProps.revealOrder==="backwards"||e.memoizedProps.revealOrder==="unstable_legacy-backwards"||e.memoizedProps.revealOrder==="together")){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var nl=0,J=null,ht=null,Bt=null,Ki=!1,qn=!1,on=!1,Vi=0,Ra=0,Yn=null,Sg=0;function zt(){throw Error(s(321))}function Ws(t,e){if(e===null)return!1;for(var l=0;l<e.length&&l<t.length;l++)if(!ye(t[l],e[l]))return!1;return!0}function $s(t,e,l,n,a,i){return nl=i,J=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,C.H=t===null||t.memoizedState===null?Kf:fc,on=!1,i=l(n,a),on=!1,qn&&(i=rf(e,l,n,a)),cf(t),i}function cf(t){C.H=Ha;var e=ht!==null&&ht.next!==null;if(nl=0,Bt=ht=J=null,Ki=!1,Ra=0,Yn=null,e)throw Error(s(300));t===null||Lt||(t=t.dependencies,t!==null&&Ni(t)&&(Lt=!0))}function rf(t,e,l,n){J=t;var a=0;do{if(qn&&(Yn=null),Ra=0,qn=!1,25<=a)throw Error(s(301));if(a+=1,Bt=ht=null,t.updateQueue!=null){var i=t.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}C.H=Vf,i=e(l,n)}while(qn);return i}function bg(){var t=C.H,e=t.useState()[0];return e=typeof e.then=="function"?Ua(e):e,t=t.useState()[0],(ht!==null?ht.memoizedState:null)!==t&&(J.flags|=1024),e}function Fs(){var t=Vi!==0;return Vi=0,t}function Is(t,e,l){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~l}function Ps(t){if(Ki){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}Ki=!1}nl=0,Bt=ht=J=null,qn=!1,Ra=Vi=0,Yn=null}function Pt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Bt===null?J.memoizedState=Bt=t:Bt=Bt.next=t,Bt}function Ut(){if(ht===null){var t=J.alternate;t=t!==null?t.memoizedState:null}else t=ht.next;var e=Bt===null?J.memoizedState:Bt.next;if(e!==null)Bt=e,ht=t;else{if(t===null)throw J.alternate===null?Error(s(467)):Error(s(310));ht=t,t={memoizedState:ht.memoizedState,baseState:ht.baseState,baseQueue:ht.baseQueue,queue:ht.queue,next:null},Bt===null?J.memoizedState=Bt=t:Bt=Bt.next=t}return Bt}function Zi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ua(t){var e=Ra;return Ra+=1,Yn===null&&(Yn=[]),t=Io(Yn,t,e),e=J,(Bt===null?e.memoizedState:Bt.next)===null&&(e=e.alternate,C.H=e===null||e.memoizedState===null?Kf:fc),t}function Ji(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Ua(t);if(t.$$typeof===Ht)return Zt(t)}throw Error(s(438,String(t)))}function tc(t){var e=null,l=J.updateQueue;if(l!==null&&(e=l.memoCache),e==null){var n=J.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(e={data:n.data.map(function(a){return a.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),l===null&&(l=Zi(),J.updateQueue=l),l.memoCache=e,l=e.data[e.index],l===void 0)for(l=e.data[e.index]=Array(t),n=0;n<t;n++)l[n]=yn;return e.index++,l}function al(t,e){return typeof e=="function"?e(t):e}function ki(t){var e=Ut();return ec(e,ht,t)}function ec(t,e,l){var n=t.queue;if(n===null)throw Error(s(311));n.lastRenderedReducer=l;var a=t.baseQueue,i=n.pending;if(i!==null){if(a!==null){var o=a.next;a.next=i.next,i.next=o}e.baseQueue=a=i,n.pending=null}if(i=t.baseState,a===null)t.memoizedState=i;else{e=a.next;var h=o=null,m=null,A=e,M=!1;do{var O=A.lane&-536870913;if(O!==A.lane?(tt&O)===O:(nl&O)===O){var _=A.revertLane;if(_===0)m!==null&&(m=m.next={lane:0,revertLane:0,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),O===Hn&&(M=!0);else if((nl&_)===_){A=A.next,_===Hn&&(M=!0);continue}else O={lane:0,revertLane:A.revertLane,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},m===null?(h=m=O,o=i):m=m.next=O,J.lanes|=_,Ul|=_;O=A.action,on&&l(i,O),i=A.hasEagerState?A.eagerState:l(i,O)}else _={lane:O,revertLane:A.revertLane,gesture:A.gesture,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},m===null?(h=m=_,o=i):m=m.next=_,J.lanes|=O,Ul|=O;A=A.next}while(A!==null&&A!==e);if(m===null?o=i:m.next=h,!ye(i,t.memoizedState)&&(Lt=!0,M&&(l=Nn,l!==null)))throw l;t.memoizedState=i,t.baseState=o,t.baseQueue=m,n.lastRenderedState=i}return a===null&&(n.lanes=0),[t.memoizedState,n.dispatch]}function lc(t){var e=Ut(),l=e.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=t;var n=l.dispatch,a=l.pending,i=e.memoizedState;if(a!==null){l.pending=null;var o=a=a.next;do i=t(i,o.action),o=o.next;while(o!==a);ye(i,e.memoizedState)||(Lt=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),l.lastRenderedState=i}return[i,n]}function of(t,e,l){var n=J,a=Ut(),i=lt;if(i){if(l===void 0)throw Error(s(407));l=l()}else l=e();var o=!ye((ht||a).memoizedState,l);if(o&&(a.memoizedState=l,Lt=!0),a=a.queue,ic(df.bind(null,n,a,t),[t]),a.getSnapshot!==e||o||Bt!==null&&Bt.memoizedState.tag&1){if(n.flags|=2048,Xn(9,{destroy:void 0},hf.bind(null,n,a,l,e),null),gt===null)throw Error(s(349));i||(nl&127)!==0||ff(n,e,l)}return l}function ff(t,e,l){t.flags|=16384,t={getSnapshot:e,value:l},e=J.updateQueue,e===null?(e=Zi(),J.updateQueue=e,e.stores=[t]):(l=e.stores,l===null?e.stores=[t]:l.push(t))}function hf(t,e,l,n){e.value=l,e.getSnapshot=n,mf(e)&&yf(t)}function df(t,e,l){return l(function(){mf(e)&&yf(t)})}function mf(t){var e=t.getSnapshot;t=t.value;try{var l=e();return!ye(t,l)}catch{return!0}}function yf(t){var e=tn(t,2);e!==null&&re(e,t,2)}function nc(t){var e=Pt();if(typeof t=="function"){var l=t;if(t=l(),on){vl(!0);try{l()}finally{vl(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:al,lastRenderedState:t},e}function gf(t,e,l,n){return t.baseState=l,ec(t,ht,typeof n=="function"?n:al)}function Eg(t,e,l,n,a){if(Fi(t))throw Error(s(485));if(t=e.action,t!==null){var i={payload:a,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){i.listeners.push(o)}};C.T!==null?l(!0):i.isTransition=!1,n(i),l=e.pending,l===null?(i.next=e.pending=i,pf(e,i)):(i.next=l.next,e.pending=l.next=i)}}function pf(t,e){var l=e.action,n=e.payload,a=t.state;if(e.isTransition){var i=C.T,o={};C.T=o;try{var h=l(a,n),m=C.S;m!==null&&m(o,h),vf(t,e,h)}catch(A){ac(t,e,A)}finally{i!==null&&o.types!==null&&(i.types=o.types),C.T=i}}else try{i=l(a,n),vf(t,e,i)}catch(A){ac(t,e,A)}}function vf(t,e,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(n){Sf(t,e,n)},function(n){return ac(t,e,n)}):Sf(t,e,l)}function Sf(t,e,l){e.status="fulfilled",e.value=l,bf(e),t.state=l,e=t.pending,e!==null&&(l=e.next,l===e?t.pending=null:(l=l.next,e.next=l,pf(t,l)))}function ac(t,e,l){var n=t.pending;if(t.pending=null,n!==null){n=n.next;do e.status="rejected",e.reason=l,bf(e),e=e.next;while(e!==n)}t.action=null}function bf(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function Ef(t,e){return e}function Tf(t,e){if(lt){var l=gt.formState;if(l!==null){t:{var n=J;if(lt){if(At){e:{for(var a=At,i=Oe;a.nodeType!==8;){if(!i){a=null;break e}if(a=Re(a.nextSibling),a===null){a=null;break e}}i=a.data,a=i==="F!"||i==="F"?a:null}if(a){At=Re(a.nextSibling),n=a.data==="F!";break t}}Al(n)}n=!1}n&&(e=l[0])}}return l=Pt(),l.memoizedState=l.baseState=e,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ef,lastRenderedState:e},l.queue=n,l=Xf.bind(null,J,n),n.dispatch=l,n=nc(!1),i=oc.bind(null,J,!1,n.queue),n=Pt(),a={state:e,dispatch:null,action:t,pending:null},n.queue=a,l=Eg.bind(null,J,a,i,l),a.dispatch=l,n.memoizedState=t,[e,l,!1]}function Af(t){var e=Ut();return _f(e,ht,t)}function _f(t,e,l){if(e=ec(t,e,Ef)[0],t=ki(al)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var n=Ua(e)}catch(o){throw o===Bn?ji:o}else n=e;e=Ut();var a=e.queue,i=a.dispatch;return l!==e.memoizedState&&(J.flags|=2048,Xn(9,{destroy:void 0},Tg.bind(null,a,l),null)),[n,i,t]}function Tg(t,e){t.action=e}function xf(t){var e=Ut(),l=ht;if(l!==null)return _f(e,l,t);Ut(),e=e.memoizedState,l=Ut();var n=l.queue.dispatch;return l.memoizedState=t,[e,n,!1]}function Xn(t,e,l,n){return t={tag:t,create:l,deps:n,inst:e,next:null},e=J.updateQueue,e===null&&(e=Zi(),J.updateQueue=e),l=e.lastEffect,l===null?e.lastEffect=t.next=t:(n=l.next,l.next=t,t.next=n,e.lastEffect=t),t}function Mf(){return Ut().memoizedState}function Wi(t,e,l,n){var a=Pt();J.flags|=t,a.memoizedState=Xn(1|e,{destroy:void 0},l,n===void 0?null:n)}function $i(t,e,l,n){var a=Ut();n=n===void 0?null:n;var i=a.memoizedState.inst;ht!==null&&n!==null&&Ws(n,ht.memoizedState.deps)?a.memoizedState=Xn(e,i,l,n):(J.flags|=t,a.memoizedState=Xn(1|e,i,l,n))}function Cf(t,e){Wi(8390656,8,t,e)}function ic(t,e){$i(2048,8,t,e)}function Ag(t){J.flags|=4;var e=J.updateQueue;if(e===null)e=Zi(),J.updateQueue=e,e.events=[t];else{var l=e.events;l===null?e.events=[t]:l.push(t)}}function zf(t){var e=Ut().memoizedState;return Ag({ref:e,nextImpl:t}),function(){if((ut&2)!==0)throw Error(s(440));return e.impl.apply(void 0,arguments)}}function Of(t,e){return $i(4,2,t,e)}function Df(t,e){return $i(4,4,t,e)}function Rf(t,e){if(typeof e=="function"){t=t();var l=e(t);return function(){typeof l=="function"?l():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function Uf(t,e,l){l=l!=null?l.concat([t]):null,$i(4,4,Rf.bind(null,e,t),l)}function uc(){}function wf(t,e){var l=Ut();e=e===void 0?null:e;var n=l.memoizedState;return e!==null&&Ws(e,n[1])?n[0]:(l.memoizedState=[t,e],t)}function Hf(t,e){var l=Ut();e=e===void 0?null:e;var n=l.memoizedState;if(e!==null&&Ws(e,n[1]))return n[0];if(n=t(),on){vl(!0);try{t()}finally{vl(!1)}}return l.memoizedState=[n,e],n}function sc(t,e,l){return l===void 0||(nl&1073741824)!==0&&(tt&261930)===0?t.memoizedState=e:(t.memoizedState=l,t=Nh(),J.lanes|=t,Ul|=t,l)}function Nf(t,e,l,n){return ye(l,e)?l:jn.current!==null?(t=sc(t,l,n),ye(t,e)||(Lt=!0),t):(nl&42)===0||(nl&1073741824)!==0&&(tt&261930)===0?(Lt=!0,t.memoizedState=l):(t=Nh(),J.lanes|=t,Ul|=t,e)}function Bf(t,e,l,n,a){var i=w.p;w.p=i!==0&&8>i?i:8;var o=C.T,h={};C.T=h,oc(t,!1,e,l);try{var m=a(),A=C.S;if(A!==null&&A(h,m),m!==null&&typeof m=="object"&&typeof m.then=="function"){var M=vg(m,n);wa(t,e,M,Ee(t))}else wa(t,e,n,Ee(t))}catch(O){wa(t,e,{then:function(){},status:"rejected",reason:O},Ee())}finally{w.p=i,o!==null&&h.types!==null&&(o.types=h.types),C.T=o}}function _g(){}function cc(t,e,l,n){if(t.tag!==5)throw Error(s(476));var a=Lf(t).queue;Bf(t,a,e,Q,l===null?_g:function(){return jf(t),l(n)})}function Lf(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:al,lastRenderedState:Q},next:null};var l={};return e.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:al,lastRenderedState:l},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function jf(t){var e=Lf(t);e.next===null&&(e=t.alternate.memoizedState),wa(t,e.next.queue,{},Ee())}function rc(){return Zt($a)}function qf(){return Ut().memoizedState}function Yf(){return Ut().memoizedState}function xg(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var l=Ee();t=Ml(l);var n=Cl(e,t,l);n!==null&&(re(n,e,l),za(n,e,l)),e={cache:js()},t.payload=e;return}e=e.return}}function Mg(t,e,l){var n=Ee();l={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Fi(t)?Gf(e,l):(l=Cs(t,e,l,n),l!==null&&(re(l,t,n),Qf(l,e,n)))}function Xf(t,e,l){var n=Ee();wa(t,e,l,n)}function wa(t,e,l,n){var a={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Fi(t))Gf(e,a);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,h=i(o,l);if(a.hasEagerState=!0,a.eagerState=h,ye(h,o))return Ri(t,e,a,0),gt===null&&Di(),!1}catch{}finally{}if(l=Cs(t,e,a,n),l!==null)return re(l,t,n),Qf(l,e,n),!0}return!1}function oc(t,e,l,n){if(n={lane:2,revertLane:Gc(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Fi(t)){if(e)throw Error(s(479))}else e=Cs(t,l,n,2),e!==null&&re(e,t,2)}function Fi(t){var e=t.alternate;return t===J||e!==null&&e===J}function Gf(t,e){qn=Ki=!0;var l=t.pending;l===null?e.next=e:(e.next=l.next,l.next=e),t.pending=e}function Qf(t,e,l){if((l&4194048)!==0){var n=e.lanes;n&=t.pendingLanes,l|=n,e.lanes=l,Zr(t,l)}}var Ha={readContext:Zt,use:Ji,useCallback:zt,useContext:zt,useEffect:zt,useImperativeHandle:zt,useLayoutEffect:zt,useInsertionEffect:zt,useMemo:zt,useReducer:zt,useRef:zt,useState:zt,useDebugValue:zt,useDeferredValue:zt,useTransition:zt,useSyncExternalStore:zt,useId:zt,useHostTransitionStatus:zt,useFormState:zt,useActionState:zt,useOptimistic:zt,useMemoCache:zt,useCacheRefresh:zt};Ha.useEffectEvent=zt;var Kf={readContext:Zt,use:Ji,useCallback:function(t,e){return Pt().memoizedState=[t,e===void 0?null:e],t},useContext:Zt,useEffect:Cf,useImperativeHandle:function(t,e,l){l=l!=null?l.concat([t]):null,Wi(4194308,4,Rf.bind(null,e,t),l)},useLayoutEffect:function(t,e){return Wi(4194308,4,t,e)},useInsertionEffect:function(t,e){Wi(4,2,t,e)},useMemo:function(t,e){var l=Pt();e=e===void 0?null:e;var n=t();if(on){vl(!0);try{t()}finally{vl(!1)}}return l.memoizedState=[n,e],n},useReducer:function(t,e,l){var n=Pt();if(l!==void 0){var a=l(e);if(on){vl(!0);try{l(e)}finally{vl(!1)}}}else a=e;return n.memoizedState=n.baseState=a,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:a},n.queue=t,t=t.dispatch=Mg.bind(null,J,t),[n.memoizedState,t]},useRef:function(t){var e=Pt();return t={current:t},e.memoizedState=t},useState:function(t){t=nc(t);var e=t.queue,l=Xf.bind(null,J,e);return e.dispatch=l,[t.memoizedState,l]},useDebugValue:uc,useDeferredValue:function(t,e){var l=Pt();return sc(l,t,e)},useTransition:function(){var t=nc(!1);return t=Bf.bind(null,J,t.queue,!0,!1),Pt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,l){var n=J,a=Pt();if(lt){if(l===void 0)throw Error(s(407));l=l()}else{if(l=e(),gt===null)throw Error(s(349));(tt&127)!==0||ff(n,e,l)}a.memoizedState=l;var i={value:l,getSnapshot:e};return a.queue=i,Cf(df.bind(null,n,i,t),[t]),n.flags|=2048,Xn(9,{destroy:void 0},hf.bind(null,n,i,l,e),null),l},useId:function(){var t=Pt(),e=gt.identifierPrefix;if(lt){var l=Ke,n=Qe;l=(n&~(1<<32-me(n)-1)).toString(32)+l,e="_"+e+"R_"+l,l=Vi++,0<l&&(e+="H"+l.toString(32)),e+="_"}else l=Sg++,e="_"+e+"r_"+l.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:rc,useFormState:Tf,useActionState:Tf,useOptimistic:function(t){var e=Pt();e.memoizedState=e.baseState=t;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=l,e=oc.bind(null,J,!0,l),l.dispatch=e,[t,e]},useMemoCache:tc,useCacheRefresh:function(){return Pt().memoizedState=xg.bind(null,J)},useEffectEvent:function(t){var e=Pt(),l={impl:t};return e.memoizedState=l,function(){if((ut&2)!==0)throw Error(s(440));return l.impl.apply(void 0,arguments)}}},fc={readContext:Zt,use:Ji,useCallback:wf,useContext:Zt,useEffect:ic,useImperativeHandle:Uf,useInsertionEffect:Of,useLayoutEffect:Df,useMemo:Hf,useReducer:ki,useRef:Mf,useState:function(){return ki(al)},useDebugValue:uc,useDeferredValue:function(t,e){var l=Ut();return Nf(l,ht.memoizedState,t,e)},useTransition:function(){var t=ki(al)[0],e=Ut().memoizedState;return[typeof t=="boolean"?t:Ua(t),e]},useSyncExternalStore:of,useId:qf,useHostTransitionStatus:rc,useFormState:Af,useActionState:Af,useOptimistic:function(t,e){var l=Ut();return gf(l,ht,t,e)},useMemoCache:tc,useCacheRefresh:Yf};fc.useEffectEvent=zf;var Vf={readContext:Zt,use:Ji,useCallback:wf,useContext:Zt,useEffect:ic,useImperativeHandle:Uf,useInsertionEffect:Of,useLayoutEffect:Df,useMemo:Hf,useReducer:lc,useRef:Mf,useState:function(){return lc(al)},useDebugValue:uc,useDeferredValue:function(t,e){var l=Ut();return ht===null?sc(l,t,e):Nf(l,ht.memoizedState,t,e)},useTransition:function(){var t=lc(al)[0],e=Ut().memoizedState;return[typeof t=="boolean"?t:Ua(t),e]},useSyncExternalStore:of,useId:qf,useHostTransitionStatus:rc,useFormState:xf,useActionState:xf,useOptimistic:function(t,e){var l=Ut();return ht!==null?gf(l,ht,t,e):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:tc,useCacheRefresh:Yf};Vf.useEffectEvent=zf;function hc(t,e,l,n){e=t.memoizedState,l=l(n,e),l=l==null?e:U({},e,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var dc={enqueueSetState:function(t,e,l){t=t._reactInternals;var n=Ee(),a=Ml(n);a.payload=e,l!=null&&(a.callback=l),e=Cl(t,a,n),e!==null&&(re(e,t,n),za(e,t,n))},enqueueReplaceState:function(t,e,l){t=t._reactInternals;var n=Ee(),a=Ml(n);a.tag=1,a.payload=e,l!=null&&(a.callback=l),e=Cl(t,a,n),e!==null&&(re(e,t,n),za(e,t,n))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var l=Ee(),n=Ml(l);n.tag=2,e!=null&&(n.callback=e),e=Cl(t,n,l),e!==null&&(re(e,t,l),za(e,t,l))}};function Zf(t,e,l,n,a,i,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,i,o):e.prototype&&e.prototype.isPureReactComponent?!ba(l,n)||!ba(a,i):!0}function Jf(t,e,l,n){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(l,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(l,n),e.state!==t&&dc.enqueueReplaceState(e,e.state,null)}function fn(t,e){var l=e;if("ref"in e){l={};for(var n in e)n!=="ref"&&(l[n]=e[n])}if(t=t.defaultProps){l===e&&(l=U({},l));for(var a in t)l[a]===void 0&&(l[a]=t[a])}return l}function kf(t){Oi(t)}function Wf(t){console.error(t)}function $f(t){Oi(t)}function Ii(t,e){try{var l=t.onUncaughtError;l(e.value,{componentStack:e.stack})}catch(n){setTimeout(function(){throw n})}}function Ff(t,e,l){try{var n=t.onCaughtError;n(l.value,{componentStack:l.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function mc(t,e,l){return l=Ml(l),l.tag=3,l.payload={element:null},l.callback=function(){Ii(t,e)},l}function If(t){return t=Ml(t),t.tag=3,t}function Pf(t,e,l,n){var a=l.type.getDerivedStateFromError;if(typeof a=="function"){var i=n.value;t.payload=function(){return a(i)},t.callback=function(){Ff(e,l,n)}}var o=l.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(t.callback=function(){Ff(e,l,n),typeof a!="function"&&(wl===null?wl=new Set([this]):wl.add(this));var h=n.stack;this.componentDidCatch(n.value,{componentStack:h!==null?h:""})})}function Cg(t,e,l,n,a){if(l.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(e=l.alternate,e!==null&&wn(e,l,a,!0),l=pe.current,l!==null){switch(l.tag){case 31:case 13:return De===null?ou():l.alternate===null&&Ot===0&&(Ot=3),l.flags&=-257,l.flags|=65536,l.lanes=a,n===qi?l.flags|=16384:(e=l.updateQueue,e===null?l.updateQueue=new Set([n]):e.add(n),qc(t,n,a)),!1;case 22:return l.flags|=65536,n===qi?l.flags|=16384:(e=l.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([n])},l.updateQueue=e):(l=e.retryQueue,l===null?e.retryQueue=new Set([n]):l.add(n)),qc(t,n,a)),!1}throw Error(s(435,l.tag))}return qc(t,n,a),ou(),!1}if(lt)return e=pe.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=a,n!==ws&&(t=Error(s(422),{cause:n}),Aa(Me(t,l)))):(n!==ws&&(e=Error(s(423),{cause:n}),Aa(Me(e,l))),t=t.current.alternate,t.flags|=65536,a&=-a,t.lanes|=a,n=Me(n,l),a=mc(t.stateNode,n,a),Ks(t,a),Ot!==4&&(Ot=2)),!1;var i=Error(s(520),{cause:n});if(i=Me(i,l),Ga===null?Ga=[i]:Ga.push(i),Ot!==4&&(Ot=2),e===null)return!0;n=Me(n,l),l=e;do{switch(l.tag){case 3:return l.flags|=65536,t=a&-a,l.lanes|=t,t=mc(l.stateNode,n,t),Ks(l,t),!1;case 1:if(e=l.type,i=l.stateNode,(l.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(wl===null||!wl.has(i))))return l.flags|=65536,a&=-a,l.lanes|=a,a=If(a),Pf(a,t,l,n),Ks(l,a),!1}l=l.return}while(l!==null);return!1}var yc=Error(s(461)),Lt=!1;function Jt(t,e,l,n){e.child=t===null?lf(e,null,l,n):rn(e,t.child,l,n)}function th(t,e,l,n,a){l=l.render;var i=e.ref;if("ref"in n){var o={};for(var h in n)h!=="ref"&&(o[h]=n[h])}else o=n;return an(e),n=$s(t,e,l,o,i,a),h=Fs(),t!==null&&!Lt?(Is(t,e,a),il(t,e,a)):(lt&&h&&Rs(e),e.flags|=1,Jt(t,e,n,a),e.child)}function eh(t,e,l,n,a){if(t===null){var i=l.type;return typeof i=="function"&&!zs(i)&&i.defaultProps===void 0&&l.compare===null?(e.tag=15,e.type=i,lh(t,e,i,n,a)):(t=wi(l.type,null,n,e,e.mode,a),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!Ac(t,a)){var o=i.memoizedProps;if(l=l.compare,l=l!==null?l:ba,l(o,n)&&t.ref===e.ref)return il(t,e,a)}return e.flags|=1,t=Pe(i,n),t.ref=e.ref,t.return=e,e.child=t}function lh(t,e,l,n,a){if(t!==null){var i=t.memoizedProps;if(ba(i,n)&&t.ref===e.ref)if(Lt=!1,e.pendingProps=n=i,Ac(t,a))(t.flags&131072)!==0&&(Lt=!0);else return e.lanes=t.lanes,il(t,e,a)}return gc(t,e,l,n,a)}function nh(t,e,l,n){var a=n.children,i=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((e.flags&128)!==0){if(i=i!==null?i.baseLanes|l:l,t!==null){for(n=e.child=t.child,a=0;n!==null;)a=a|n.lanes|n.childLanes,n=n.sibling;n=a&~i}else n=0,e.child=null;return ah(t,e,i,l,n)}if((l&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&Li(e,i!==null?i.cachePool:null),i!==null?uf(e,i):Zs(),sf(e);else return n=e.lanes=536870912,ah(t,e,i!==null?i.baseLanes|l:l,l,n)}else i!==null?(Li(e,i.cachePool),uf(e,i),Ol(),e.memoizedState=null):(t!==null&&Li(e,null),Zs(),Ol());return Jt(t,e,a,l),e.child}function Na(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function ah(t,e,l,n,a){var i=Ys();return i=i===null?null:{parent:Nt._currentValue,pool:i},e.memoizedState={baseLanes:l,cachePool:i},t!==null&&Li(e,null),Zs(),sf(e),t!==null&&wn(t,e,n,!0),e.childLanes=a,null}function Pi(t,e){return e=eu({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function ih(t,e,l){return rn(e,t.child,null,l),t=Pi(e,e.pendingProps),t.flags|=2,ve(e),e.memoizedState=null,t}function zg(t,e,l){var n=e.pendingProps,a=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(lt){if(n.mode==="hidden")return t=Pi(e,n),e.lanes=536870912,Na(null,t);if(ks(e),(t=At)?(t=pd(t,Oe),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:El!==null?{id:Qe,overflow:Ke}:null,retryLane:536870912,hydrationErrors:null},l=Xo(t),l.return=e,e.child=l,Vt=e,At=null)):t=null,t===null)throw Al(e);return e.lanes=536870912,null}return Pi(e,n)}var i=t.memoizedState;if(i!==null){var o=i.dehydrated;if(ks(e),a)if(e.flags&256)e.flags&=-257,e=ih(t,e,l);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(s(558));else if(Lt||wn(t,e,l,!1),a=(l&t.childLanes)!==0,Lt||a){if(n=gt,n!==null&&(o=Jr(n,l),o!==0&&o!==i.retryLane))throw i.retryLane=o,tn(t,o),re(n,t,o),yc;ou(),e=ih(t,e,l)}else t=i.treeContext,At=Re(o.nextSibling),Vt=e,lt=!0,Tl=null,Oe=!1,t!==null&&Ko(e,t),e=Pi(e,n),e.flags|=4096;return e}return t=Pe(t.child,{mode:n.mode,children:n.children}),t.ref=e.ref,e.child=t,t.return=e,t}function tu(t,e){var l=e.ref;if(l===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(s(284));(t===null||t.ref!==l)&&(e.flags|=4194816)}}function gc(t,e,l,n,a){return an(e),l=$s(t,e,l,n,void 0,a),n=Fs(),t!==null&&!Lt?(Is(t,e,a),il(t,e,a)):(lt&&n&&Rs(e),e.flags|=1,Jt(t,e,l,a),e.child)}function uh(t,e,l,n,a,i){return an(e),e.updateQueue=null,l=rf(e,n,l,a),cf(t),n=Fs(),t!==null&&!Lt?(Is(t,e,i),il(t,e,i)):(lt&&n&&Rs(e),e.flags|=1,Jt(t,e,l,i),e.child)}function sh(t,e,l,n,a){if(an(e),e.stateNode===null){var i=On,o=l.contextType;typeof o=="object"&&o!==null&&(i=Zt(o)),i=new l(n,i),e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=dc,e.stateNode=i,i._reactInternals=e,i=e.stateNode,i.props=n,i.state=e.memoizedState,i.refs={},Gs(e),o=l.contextType,i.context=typeof o=="object"&&o!==null?Zt(o):On,i.state=e.memoizedState,o=l.getDerivedStateFromProps,typeof o=="function"&&(hc(e,l,o,n),i.state=e.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(o=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),o!==i.state&&dc.enqueueReplaceState(i,i.state,null),Da(e,n,i,a),Oa(),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308),n=!0}else if(t===null){i=e.stateNode;var h=e.memoizedProps,m=fn(l,h);i.props=m;var A=i.context,M=l.contextType;o=On,typeof M=="object"&&M!==null&&(o=Zt(M));var O=l.getDerivedStateFromProps;M=typeof O=="function"||typeof i.getSnapshotBeforeUpdate=="function",h=e.pendingProps!==h,M||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(h||A!==o)&&Jf(e,i,n,o),xl=!1;var _=e.memoizedState;i.state=_,Da(e,n,i,a),Oa(),A=e.memoizedState,h||_!==A||xl?(typeof O=="function"&&(hc(e,l,O,n),A=e.memoizedState),(m=xl||Zf(e,l,m,n,_,A,o))?(M||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"&&(e.flags|=4194308)):(typeof i.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=A),i.props=n,i.state=A,i.context=o,n=m):(typeof i.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{i=e.stateNode,Qs(t,e),o=e.memoizedProps,M=fn(l,o),i.props=M,O=e.pendingProps,_=i.context,A=l.contextType,m=On,typeof A=="object"&&A!==null&&(m=Zt(A)),h=l.getDerivedStateFromProps,(A=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==O||_!==m)&&Jf(e,i,n,m),xl=!1,_=e.memoizedState,i.state=_,Da(e,n,i,a),Oa();var x=e.memoizedState;o!==O||_!==x||xl||t!==null&&t.dependencies!==null&&Ni(t.dependencies)?(typeof h=="function"&&(hc(e,l,h,n),x=e.memoizedState),(M=xl||Zf(e,l,M,n,_,x,m)||t!==null&&t.dependencies!==null&&Ni(t.dependencies))?(A||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(n,x,m),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(n,x,m)),typeof i.componentDidUpdate=="function"&&(e.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof i.componentDidUpdate!="function"||o===t.memoizedProps&&_===t.memoizedState||(e.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===t.memoizedProps&&_===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=x),i.props=n,i.state=x,i.context=m,n=M):(typeof i.componentDidUpdate!="function"||o===t.memoizedProps&&_===t.memoizedState||(e.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===t.memoizedProps&&_===t.memoizedState||(e.flags|=1024),n=!1)}return i=n,tu(t,e),n=(e.flags&128)!==0,i||n?(i=e.stateNode,l=n&&typeof l.getDerivedStateFromError!="function"?null:i.render(),e.flags|=1,t!==null&&n?(e.child=rn(e,t.child,null,a),e.child=rn(e,null,l,a)):Jt(t,e,l,a),e.memoizedState=i.state,t=e.child):t=il(t,e,a),t}function ch(t,e,l,n){return ln(),e.flags|=256,Jt(t,e,l,n),e.child}var pc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vc(t){return{baseLanes:t,cachePool:$o()}}function Sc(t,e,l){return t=t!==null?t.childLanes&~l:0,e&&(t|=be),t}function rh(t,e,l){var n=e.pendingProps,a=!1,i=(e.flags&128)!==0,o;if((o=i)||(o=t!==null&&t.memoizedState===null?!1:(Rt.current&2)!==0),o&&(a=!0,e.flags&=-129),o=(e.flags&32)!==0,e.flags&=-33,t===null){if(lt){if(a?zl(e):Ol(),(t=At)?(t=pd(t,Oe),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:El!==null?{id:Qe,overflow:Ke}:null,retryLane:536870912,hydrationErrors:null},l=Xo(t),l.return=e,e.child=l,Vt=e,At=null)):t=null,t===null)throw Al(e);return er(t)?e.lanes=32:e.lanes=536870912,null}var h=n.children;return n=n.fallback,a?(Ol(),a=e.mode,h=eu({mode:"hidden",children:h},a),n=en(n,a,l,null),h.return=e,n.return=e,h.sibling=n,e.child=h,n=e.child,n.memoizedState=vc(l),n.childLanes=Sc(t,o,l),e.memoizedState=pc,Na(null,n)):(zl(e),bc(e,h))}var m=t.memoizedState;if(m!==null&&(h=m.dehydrated,h!==null)){if(i)e.flags&256?(zl(e),e.flags&=-257,e=Ec(t,e,l)):e.memoizedState!==null?(Ol(),e.child=t.child,e.flags|=128,e=null):(Ol(),h=n.fallback,a=e.mode,n=eu({mode:"visible",children:n.children},a),h=en(h,a,l,null),h.flags|=2,n.return=e,h.return=e,n.sibling=h,e.child=n,rn(e,t.child,null,l),n=e.child,n.memoizedState=vc(l),n.childLanes=Sc(t,o,l),e.memoizedState=pc,e=Na(null,n));else if(zl(e),er(h)){if(o=h.nextSibling&&h.nextSibling.dataset,o)var A=o.dgst;o=A,n=Error(s(419)),n.stack="",n.digest=o,Aa({value:n,source:null,stack:null}),e=Ec(t,e,l)}else if(Lt||wn(t,e,l,!1),o=(l&t.childLanes)!==0,Lt||o){if(o=gt,o!==null&&(n=Jr(o,l),n!==0&&n!==m.retryLane))throw m.retryLane=n,tn(t,n),re(o,t,n),yc;tr(h)||ou(),e=Ec(t,e,l)}else tr(h)?(e.flags|=192,e.child=t.child,e=null):(t=m.treeContext,At=Re(h.nextSibling),Vt=e,lt=!0,Tl=null,Oe=!1,t!==null&&Ko(e,t),e=bc(e,n.children),e.flags|=4096);return e}return a?(Ol(),h=n.fallback,a=e.mode,m=t.child,A=m.sibling,n=Pe(m,{mode:"hidden",children:n.children}),n.subtreeFlags=m.subtreeFlags&65011712,A!==null?h=Pe(A,h):(h=en(h,a,l,null),h.flags|=2),h.return=e,n.return=e,n.sibling=h,e.child=n,Na(null,n),n=e.child,h=t.child.memoizedState,h===null?h=vc(l):(a=h.cachePool,a!==null?(m=Nt._currentValue,a=a.parent!==m?{parent:m,pool:m}:a):a=$o(),h={baseLanes:h.baseLanes|l,cachePool:a}),n.memoizedState=h,n.childLanes=Sc(t,o,l),e.memoizedState=pc,Na(t.child,n)):(zl(e),l=t.child,t=l.sibling,l=Pe(l,{mode:"visible",children:n.children}),l.return=e,l.sibling=null,t!==null&&(o=e.deletions,o===null?(e.deletions=[t],e.flags|=16):o.push(t)),e.child=l,e.memoizedState=null,l)}function bc(t,e){return e=eu({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function eu(t,e){return t=ge(22,t,null,e),t.lanes=0,t}function Ec(t,e,l){return rn(e,t.child,null,l),t=bc(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function oh(t,e,l){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),Bs(t.return,e,l)}function Tc(t,e,l,n,a,i){var o=t.memoizedState;o===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:l,tailMode:a,treeForkCount:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=l,o.tailMode=a,o.treeForkCount=i)}function fh(t,e,l){var n=e.pendingProps,a=n.revealOrder,i=n.tail;n=n.children;var o=Rt.current,h=(o&2)!==0;if(h?(o=o&1|2,e.flags|=128):o&=1,H(Rt,o),Jt(t,e,n,l),n=lt?Ta:0,!h&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&oh(t,l,e);else if(t.tag===19)oh(t,l,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(a){case"forwards":for(l=e.child,a=null;l!==null;)t=l.alternate,t!==null&&Qi(t)===null&&(a=l),l=l.sibling;l=a,l===null?(a=e.child,e.child=null):(a=l.sibling,l.sibling=null),Tc(e,!1,a,l,i,n);break;case"backwards":case"unstable_legacy-backwards":for(l=null,a=e.child,e.child=null;a!==null;){if(t=a.alternate,t!==null&&Qi(t)===null){e.child=a;break}t=a.sibling,a.sibling=l,l=a,a=t}Tc(e,!0,l,null,i,n);break;case"together":Tc(e,!1,null,null,void 0,n);break;default:e.memoizedState=null}return e.child}function il(t,e,l){if(t!==null&&(e.dependencies=t.dependencies),Ul|=e.lanes,(l&e.childLanes)===0)if(t!==null){if(wn(t,e,l,!1),(l&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(s(153));if(e.child!==null){for(t=e.child,l=Pe(t,t.pendingProps),e.child=l,l.return=e;t.sibling!==null;)t=t.sibling,l=l.sibling=Pe(t,t.pendingProps),l.return=e;l.sibling=null}return e.child}function Ac(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&Ni(t)))}function Og(t,e,l){switch(e.tag){case 3:It(e,e.stateNode.containerInfo),_l(e,Nt,t.memoizedState.cache),ln();break;case 27:case 5:sa(e);break;case 4:It(e,e.stateNode.containerInfo);break;case 10:_l(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,ks(e),null;break;case 13:var n=e.memoizedState;if(n!==null)return n.dehydrated!==null?(zl(e),e.flags|=128,null):(l&e.child.childLanes)!==0?rh(t,e,l):(zl(e),t=il(t,e,l),t!==null?t.sibling:null);zl(e);break;case 19:var a=(t.flags&128)!==0;if(n=(l&e.childLanes)!==0,n||(wn(t,e,l,!1),n=(l&e.childLanes)!==0),a){if(n)return fh(t,e,l);e.flags|=128}if(a=e.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),H(Rt,Rt.current),n)break;return null;case 22:return e.lanes=0,nh(t,e,l,e.pendingProps);case 24:_l(e,Nt,t.memoizedState.cache)}return il(t,e,l)}function hh(t,e,l){if(t!==null)if(t.memoizedProps!==e.pendingProps)Lt=!0;else{if(!Ac(t,l)&&(e.flags&128)===0)return Lt=!1,Og(t,e,l);Lt=(t.flags&131072)!==0}else Lt=!1,lt&&(e.flags&1048576)!==0&&Qo(e,Ta,e.index);switch(e.lanes=0,e.tag){case 16:t:{var n=e.pendingProps;if(t=sn(e.elementType),e.type=t,typeof t=="function")zs(t)?(n=fn(t,n),e.tag=1,e=sh(null,e,t,n,l)):(e.tag=0,e=gc(null,e,t,n,l));else{if(t!=null){var a=t.$$typeof;if(a===te){e.tag=11,e=th(null,e,t,n,l);break t}else if(a===$){e.tag=14,e=eh(null,e,t,n,l);break t}}throw e=We(t)||t,Error(s(306,e,""))}}return e;case 0:return gc(t,e,e.type,e.pendingProps,l);case 1:return n=e.type,a=fn(n,e.pendingProps),sh(t,e,n,a,l);case 3:t:{if(It(e,e.stateNode.containerInfo),t===null)throw Error(s(387));n=e.pendingProps;var i=e.memoizedState;a=i.element,Qs(t,e),Da(e,n,null,l);var o=e.memoizedState;if(n=o.cache,_l(e,Nt,n),n!==i.cache&&Ls(e,[Nt],l,!0),Oa(),n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){e=ch(t,e,n,l);break t}else if(n!==a){a=Me(Error(s(424)),e),Aa(a),e=ch(t,e,n,l);break t}else{switch(t=e.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(At=Re(t.firstChild),Vt=e,lt=!0,Tl=null,Oe=!0,l=lf(e,null,n,l),e.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(ln(),n===a){e=il(t,e,l);break t}Jt(t,e,n,l)}e=e.child}return e;case 26:return tu(t,e),t===null?(l=Ad(e.type,null,e.pendingProps,null))?e.memoizedState=l:lt||(l=e.type,t=e.pendingProps,n=pu(F.current).createElement(l),n[Kt]=e,n[ne]=t,kt(n,l,t),Gt(n),e.stateNode=n):e.memoizedState=Ad(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return sa(e),t===null&<&&(n=e.stateNode=bd(e.type,e.pendingProps,F.current),Vt=e,Oe=!0,a=At,Ll(e.type)?(lr=a,At=Re(n.firstChild)):At=a),Jt(t,e,e.pendingProps.children,l),tu(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&<&&((a=n=At)&&(n=ip(n,e.type,e.pendingProps,Oe),n!==null?(e.stateNode=n,Vt=e,At=Re(n.firstChild),Oe=!1,a=!0):a=!1),a||Al(e)),sa(e),a=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,n=i.children,Fc(a,i)?n=null:o!==null&&Fc(a,o)&&(e.flags|=32),e.memoizedState!==null&&(a=$s(t,e,bg,null,null,l),$a._currentValue=a),tu(t,e),Jt(t,e,n,l),e.child;case 6:return t===null&<&&((t=l=At)&&(l=up(l,e.pendingProps,Oe),l!==null?(e.stateNode=l,Vt=e,At=null,t=!0):t=!1),t||Al(e)),null;case 13:return rh(t,e,l);case 4:return It(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=rn(e,null,n,l):Jt(t,e,n,l),e.child;case 11:return th(t,e,e.type,e.pendingProps,l);case 7:return Jt(t,e,e.pendingProps,l),e.child;case 8:return Jt(t,e,e.pendingProps.children,l),e.child;case 12:return Jt(t,e,e.pendingProps.children,l),e.child;case 10:return n=e.pendingProps,_l(e,e.type,n.value),Jt(t,e,n.children,l),e.child;case 9:return a=e.type._context,n=e.pendingProps.children,an(e),a=Zt(a),n=n(a),e.flags|=1,Jt(t,e,n,l),e.child;case 14:return eh(t,e,e.type,e.pendingProps,l);case 15:return lh(t,e,e.type,e.pendingProps,l);case 19:return fh(t,e,l);case 31:return zg(t,e,l);case 22:return nh(t,e,l,e.pendingProps);case 24:return an(e),n=Zt(Nt),t===null?(a=Ys(),a===null&&(a=gt,i=js(),a.pooledCache=i,i.refCount++,i!==null&&(a.pooledCacheLanes|=l),a=i),e.memoizedState={parent:n,cache:a},Gs(e),_l(e,Nt,a)):((t.lanes&l)!==0&&(Qs(t,e),Da(e,null,null,l),Oa()),a=t.memoizedState,i=e.memoizedState,a.parent!==n?(a={parent:n,cache:n},e.memoizedState=a,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=a),_l(e,Nt,n)):(n=i.cache,_l(e,Nt,n),n!==a.cache&&Ls(e,[Nt],l,!0))),Jt(t,e,e.pendingProps.children,l),e.child;case 29:throw e.pendingProps}throw Error(s(156,e.tag))}function ul(t){t.flags|=4}function _c(t,e,l,n,a){if((e=(t.mode&32)!==0)&&(e=!1),e){if(t.flags|=16777216,(a&335544128)===a)if(t.stateNode.complete)t.flags|=8192;else if(qh())t.flags|=8192;else throw cn=qi,Xs}else t.flags&=-16777217}function dh(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!zd(e))if(qh())t.flags|=8192;else throw cn=qi,Xs}function lu(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?Kr():536870912,t.lanes|=e,Vn|=e)}function Ba(t,e){if(!lt)switch(t.tailMode){case"hidden":e=t.tail;for(var l=null;e!==null;)e.alternate!==null&&(l=e),e=e.sibling;l===null?t.tail=null:l.sibling=null;break;case"collapsed":l=t.tail;for(var n=null;l!==null;)l.alternate!==null&&(n=l),l=l.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function _t(t){var e=t.alternate!==null&&t.alternate.child===t.child,l=0,n=0;if(e)for(var a=t.child;a!==null;)l|=a.lanes|a.childLanes,n|=a.subtreeFlags&65011712,n|=a.flags&65011712,a.return=t,a=a.sibling;else for(a=t.child;a!==null;)l|=a.lanes|a.childLanes,n|=a.subtreeFlags,n|=a.flags,a.return=t,a=a.sibling;return t.subtreeFlags|=n,t.childLanes=l,e}function Dg(t,e,l){var n=e.pendingProps;switch(Us(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _t(e),null;case 1:return _t(e),null;case 3:return l=e.stateNode,n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),ll(Nt),Dt(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(Un(e)?ul(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,Hs())),_t(e),null;case 26:var a=e.type,i=e.memoizedState;return t===null?(ul(e),i!==null?(_t(e),dh(e,i)):(_t(e),_c(e,a,null,n,l))):i?i!==t.memoizedState?(ul(e),_t(e),dh(e,i)):(_t(e),e.flags&=-16777217):(t=t.memoizedProps,t!==n&&ul(e),_t(e),_c(e,a,t,n,l)),null;case 27:if(di(e),l=F.current,a=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==n&&ul(e);else{if(!n){if(e.stateNode===null)throw Error(s(166));return _t(e),null}t=L.current,Un(e)?Vo(e):(t=bd(a,n,l),e.stateNode=t,ul(e))}return _t(e),null;case 5:if(di(e),a=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==n&&ul(e);else{if(!n){if(e.stateNode===null)throw Error(s(166));return _t(e),null}if(i=L.current,Un(e))Vo(e);else{var o=pu(F.current);switch(i){case 1:i=o.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:i=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":i=o.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":i=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":i=o.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof n.is=="string"?o.createElement("select",{is:n.is}):o.createElement("select"),n.multiple?i.multiple=!0:n.size&&(i.size=n.size);break;default:i=typeof n.is=="string"?o.createElement(a,{is:n.is}):o.createElement(a)}}i[Kt]=e,i[ne]=n;t:for(o=e.child;o!==null;){if(o.tag===5||o.tag===6)i.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===e)break t;for(;o.sibling===null;){if(o.return===null||o.return===e)break t;o=o.return}o.sibling.return=o.return,o=o.sibling}e.stateNode=i;t:switch(kt(i,a,n),a){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break t;case"img":n=!0;break t;default:n=!1}n&&ul(e)}}return _t(e),_c(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,l),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==n&&ul(e);else{if(typeof n!="string"&&e.stateNode===null)throw Error(s(166));if(t=F.current,Un(e)){if(t=e.stateNode,l=e.memoizedProps,n=null,a=Vt,a!==null)switch(a.tag){case 27:case 5:n=a.memoizedProps}t[Kt]=e,t=!!(t.nodeValue===l||n!==null&&n.suppressHydrationWarning===!0||rd(t.nodeValue,l)),t||Al(e,!0)}else t=pu(t).createTextNode(n),t[Kt]=e,e.stateNode=t}return _t(e),null;case 31:if(l=e.memoizedState,t===null||t.memoizedState!==null){if(n=Un(e),l!==null){if(t===null){if(!n)throw Error(s(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(557));t[Kt]=e}else ln(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;_t(e),t=!1}else l=Hs(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return e.flags&256?(ve(e),e):(ve(e),null);if((e.flags&128)!==0)throw Error(s(558))}return _t(e),null;case 13:if(n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(a=Un(e),n!==null&&n.dehydrated!==null){if(t===null){if(!a)throw Error(s(318));if(a=e.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(s(317));a[Kt]=e}else ln(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;_t(e),a=!1}else a=Hs(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),a=!0;if(!a)return e.flags&256?(ve(e),e):(ve(e),null)}return ve(e),(e.flags&128)!==0?(e.lanes=l,e):(l=n!==null,t=t!==null&&t.memoizedState!==null,l&&(n=e.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!==t&&l&&(e.child.flags|=8192),lu(e,e.updateQueue),_t(e),null);case 4:return Dt(),t===null&&Zc(e.stateNode.containerInfo),_t(e),null;case 10:return ll(e.type),_t(e),null;case 19:if(R(Rt),n=e.memoizedState,n===null)return _t(e),null;if(a=(e.flags&128)!==0,i=n.rendering,i===null)if(a)Ba(n,!1);else{if(Ot!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(i=Qi(t),i!==null){for(e.flags|=128,Ba(n,!1),t=i.updateQueue,e.updateQueue=t,lu(e,t),e.subtreeFlags=0,t=l,l=e.child;l!==null;)Yo(l,t),l=l.sibling;return H(Rt,Rt.current&1|2),lt&&tl(e,n.treeForkCount),e.child}t=t.sibling}n.tail!==null&&he()>su&&(e.flags|=128,a=!0,Ba(n,!1),e.lanes=4194304)}else{if(!a)if(t=Qi(i),t!==null){if(e.flags|=128,a=!0,t=t.updateQueue,e.updateQueue=t,lu(e,t),Ba(n,!0),n.tail===null&&n.tailMode==="hidden"&&!i.alternate&&!lt)return _t(e),null}else 2*he()-n.renderingStartTime>su&&l!==536870912&&(e.flags|=128,a=!0,Ba(n,!1),e.lanes=4194304);n.isBackwards?(i.sibling=e.child,e.child=i):(t=n.last,t!==null?t.sibling=i:e.child=i,n.last=i)}return n.tail!==null?(t=n.tail,n.rendering=t,n.tail=t.sibling,n.renderingStartTime=he(),t.sibling=null,l=Rt.current,H(Rt,a?l&1|2:l&1),lt&&tl(e,n.treeForkCount),t):(_t(e),null);case 22:case 23:return ve(e),Js(),n=e.memoizedState!==null,t!==null?t.memoizedState!==null!==n&&(e.flags|=8192):n&&(e.flags|=8192),n?(l&536870912)!==0&&(e.flags&128)===0&&(_t(e),e.subtreeFlags&6&&(e.flags|=8192)):_t(e),l=e.updateQueue,l!==null&&lu(e,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),n=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),n!==l&&(e.flags|=2048),t!==null&&R(un),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),e.memoizedState.cache!==l&&(e.flags|=2048),ll(Nt),_t(e),null;case 25:return null;case 30:return null}throw Error(s(156,e.tag))}function Rg(t,e){switch(Us(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return ll(Nt),Dt(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return di(e),null;case 31:if(e.memoizedState!==null){if(ve(e),e.alternate===null)throw Error(s(340));ln()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(ve(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(s(340));ln()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return R(Rt),null;case 4:return Dt(),null;case 10:return ll(e.type),null;case 22:case 23:return ve(e),Js(),t!==null&&R(un),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return ll(Nt),null;case 25:return null;default:return null}}function mh(t,e){switch(Us(e),e.tag){case 3:ll(Nt),Dt();break;case 26:case 27:case 5:di(e);break;case 4:Dt();break;case 31:e.memoizedState!==null&&ve(e);break;case 13:ve(e);break;case 19:R(Rt);break;case 10:ll(e.type);break;case 22:case 23:ve(e),Js(),t!==null&&R(un);break;case 24:ll(Nt)}}function La(t,e){try{var l=e.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var a=n.next;l=a;do{if((l.tag&t)===t){n=void 0;var i=l.create,o=l.inst;n=i(),o.destroy=n}l=l.next}while(l!==a)}}catch(h){ot(e,e.return,h)}}function Dl(t,e,l){try{var n=e.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var i=a.next;n=i;do{if((n.tag&t)===t){var o=n.inst,h=o.destroy;if(h!==void 0){o.destroy=void 0,a=e;var m=l,A=h;try{A()}catch(M){ot(a,m,M)}}}n=n.next}while(n!==i)}}catch(M){ot(e,e.return,M)}}function yh(t){var e=t.updateQueue;if(e!==null){var l=t.stateNode;try{af(e,l)}catch(n){ot(t,t.return,n)}}}function gh(t,e,l){l.props=fn(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(n){ot(t,e,n)}}function ja(t,e){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var n=t.stateNode;break;case 30:n=t.stateNode;break;default:n=t.stateNode}typeof l=="function"?t.refCleanup=l(n):l.current=n}}catch(a){ot(t,e,a)}}function Ve(t,e){var l=t.ref,n=t.refCleanup;if(l!==null)if(typeof n=="function")try{n()}catch(a){ot(t,e,a)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(a){ot(t,e,a)}else l.current=null}function ph(t){var e=t.type,l=t.memoizedProps,n=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break t;case"img":l.src?n.src=l.src:l.srcSet&&(n.srcset=l.srcSet)}}catch(a){ot(t,t.return,a)}}function xc(t,e,l){try{var n=t.stateNode;Pg(n,t.type,l,e),n[ne]=e}catch(a){ot(t,t.return,a)}}function vh(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ll(t.type)||t.tag===4}function Mc(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||vh(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Ll(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Cc(t,e,l){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(t,e):(e=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,e.appendChild(t),l=l._reactRootContainer,l!=null||e.onclick!==null||(e.onclick=Fe));else if(n!==4&&(n===27&&Ll(t.type)&&(l=t.stateNode,e=null),t=t.child,t!==null))for(Cc(t,e,l),t=t.sibling;t!==null;)Cc(t,e,l),t=t.sibling}function nu(t,e,l){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?l.insertBefore(t,e):l.appendChild(t);else if(n!==4&&(n===27&&Ll(t.type)&&(l=t.stateNode),t=t.child,t!==null))for(nu(t,e,l),t=t.sibling;t!==null;)nu(t,e,l),t=t.sibling}function Sh(t){var e=t.stateNode,l=t.memoizedProps;try{for(var n=t.type,a=e.attributes;a.length;)e.removeAttributeNode(a[0]);kt(e,n,l),e[Kt]=t,e[ne]=l}catch(i){ot(t,t.return,i)}}var sl=!1,jt=!1,zc=!1,bh=typeof WeakSet=="function"?WeakSet:Set,Qt=null;function Ug(t,e){if(t=t.containerInfo,Wc=_u,t=Ro(t),Es(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else t:{l=(l=t.ownerDocument)&&l.defaultView||window;var n=l.getSelection&&l.getSelection();if(n&&n.rangeCount!==0){l=n.anchorNode;var a=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{l.nodeType,i.nodeType}catch{l=null;break t}var o=0,h=-1,m=-1,A=0,M=0,O=t,_=null;e:for(;;){for(var x;O!==l||a!==0&&O.nodeType!==3||(h=o+a),O!==i||n!==0&&O.nodeType!==3||(m=o+n),O.nodeType===3&&(o+=O.nodeValue.length),(x=O.firstChild)!==null;)_=O,O=x;for(;;){if(O===t)break e;if(_===l&&++A===a&&(h=o),_===i&&++M===n&&(m=o),(x=O.nextSibling)!==null)break;O=_,_=O.parentNode}O=x}l=h===-1||m===-1?null:{start:h,end:m}}else l=null}l=l||{start:0,end:0}}else l=null;for($c={focusedElem:t,selectionRange:l},_u=!1,Qt=e;Qt!==null;)if(e=Qt,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Qt=t;else for(;Qt!==null;){switch(e=Qt,i=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(l=0;l<t.length;l++)a=t[l],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&i!==null){t=void 0,l=e,a=i.memoizedProps,i=i.memoizedState,n=l.stateNode;try{var B=fn(l.type,a);t=n.getSnapshotBeforeUpdate(B,i),n.__reactInternalSnapshotBeforeUpdate=t}catch(X){ot(l,l.return,X)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,l=t.nodeType,l===9)Pc(t);else if(l===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Pc(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(s(163))}if(t=e.sibling,t!==null){t.return=e.return,Qt=t;break}Qt=e.return}}function Eh(t,e,l){var n=l.flags;switch(l.tag){case 0:case 11:case 15:rl(t,l),n&4&&La(5,l);break;case 1:if(rl(t,l),n&4)if(t=l.stateNode,e===null)try{t.componentDidMount()}catch(o){ot(l,l.return,o)}else{var a=fn(l.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(a,e,t.__reactInternalSnapshotBeforeUpdate)}catch(o){ot(l,l.return,o)}}n&64&&yh(l),n&512&&ja(l,l.return);break;case 3:if(rl(t,l),n&64&&(t=l.updateQueue,t!==null)){if(e=null,l.child!==null)switch(l.child.tag){case 27:case 5:e=l.child.stateNode;break;case 1:e=l.child.stateNode}try{af(t,e)}catch(o){ot(l,l.return,o)}}break;case 27:e===null&&n&4&&Sh(l);case 26:case 5:rl(t,l),e===null&&n&4&&ph(l),n&512&&ja(l,l.return);break;case 12:rl(t,l);break;case 31:rl(t,l),n&4&&_h(t,l);break;case 13:rl(t,l),n&4&&xh(t,l),n&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=Xg.bind(null,l),sp(t,l))));break;case 22:if(n=l.memoizedState!==null||sl,!n){e=e!==null&&e.memoizedState!==null||jt,a=sl;var i=jt;sl=n,(jt=e)&&!i?ol(t,l,(l.subtreeFlags&8772)!==0):rl(t,l),sl=a,jt=i}break;case 30:break;default:rl(t,l)}}function Th(t){var e=t.alternate;e!==null&&(t.alternate=null,Th(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&as(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var xt=null,ie=!1;function cl(t,e,l){for(l=l.child;l!==null;)Ah(t,e,l),l=l.sibling}function Ah(t,e,l){if(de&&typeof de.onCommitFiberUnmount=="function")try{de.onCommitFiberUnmount(ca,l)}catch{}switch(l.tag){case 26:jt||Ve(l,e),cl(t,e,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:jt||Ve(l,e);var n=xt,a=ie;Ll(l.type)&&(xt=l.stateNode,ie=!1),cl(t,e,l),Ja(l.stateNode),xt=n,ie=a;break;case 5:jt||Ve(l,e);case 6:if(n=xt,a=ie,xt=null,cl(t,e,l),xt=n,ie=a,xt!==null)if(ie)try{(xt.nodeType===9?xt.body:xt.nodeName==="HTML"?xt.ownerDocument.body:xt).removeChild(l.stateNode)}catch(i){ot(l,e,i)}else try{xt.removeChild(l.stateNode)}catch(i){ot(l,e,i)}break;case 18:xt!==null&&(ie?(t=xt,yd(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),Pn(t)):yd(xt,l.stateNode));break;case 4:n=xt,a=ie,xt=l.stateNode.containerInfo,ie=!0,cl(t,e,l),xt=n,ie=a;break;case 0:case 11:case 14:case 15:Dl(2,l,e),jt||Dl(4,l,e),cl(t,e,l);break;case 1:jt||(Ve(l,e),n=l.stateNode,typeof n.componentWillUnmount=="function"&&gh(l,e,n)),cl(t,e,l);break;case 21:cl(t,e,l);break;case 22:jt=(n=jt)||l.memoizedState!==null,cl(t,e,l),jt=n;break;default:cl(t,e,l)}}function _h(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Pn(t)}catch(l){ot(e,e.return,l)}}}function xh(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Pn(t)}catch(l){ot(e,e.return,l)}}function wg(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new bh),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new bh),e;default:throw Error(s(435,t.tag))}}function au(t,e){var l=wg(t);e.forEach(function(n){if(!l.has(n)){l.add(n);var a=Gg.bind(null,t,n);n.then(a,a)}})}function ue(t,e){var l=e.deletions;if(l!==null)for(var n=0;n<l.length;n++){var a=l[n],i=t,o=e,h=o;t:for(;h!==null;){switch(h.tag){case 27:if(Ll(h.type)){xt=h.stateNode,ie=!1;break t}break;case 5:xt=h.stateNode,ie=!1;break t;case 3:case 4:xt=h.stateNode.containerInfo,ie=!0;break t}h=h.return}if(xt===null)throw Error(s(160));Ah(i,o,a),xt=null,ie=!1,i=a.alternate,i!==null&&(i.return=null),a.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)Mh(e,t),e=e.sibling}var Le=null;function Mh(t,e){var l=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:ue(e,t),se(t),n&4&&(Dl(3,t,t.return),La(3,t),Dl(5,t,t.return));break;case 1:ue(e,t),se(t),n&512&&(jt||l===null||Ve(l,l.return)),n&64&&sl&&(t=t.updateQueue,t!==null&&(n=t.callbacks,n!==null&&(l=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=l===null?n:l.concat(n))));break;case 26:var a=Le;if(ue(e,t),se(t),n&512&&(jt||l===null||Ve(l,l.return)),n&4){var i=l!==null?l.memoizedState:null;if(n=t.memoizedState,l===null)if(n===null)if(t.stateNode===null){t:{n=t.type,l=t.memoizedProps,a=a.ownerDocument||a;e:switch(n){case"title":i=a.getElementsByTagName("title")[0],(!i||i[fa]||i[Kt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=a.createElement(n),a.head.insertBefore(i,a.querySelector("head > title"))),kt(i,n,l),i[Kt]=t,Gt(i),n=i;break t;case"link":var o=Md("link","href",a).get(n+(l.href||""));if(o){for(var h=0;h<o.length;h++)if(i=o[h],i.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&i.getAttribute("rel")===(l.rel==null?null:l.rel)&&i.getAttribute("title")===(l.title==null?null:l.title)&&i.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){o.splice(h,1);break e}}i=a.createElement(n),kt(i,n,l),a.head.appendChild(i);break;case"meta":if(o=Md("meta","content",a).get(n+(l.content||""))){for(h=0;h<o.length;h++)if(i=o[h],i.getAttribute("content")===(l.content==null?null:""+l.content)&&i.getAttribute("name")===(l.name==null?null:l.name)&&i.getAttribute("property")===(l.property==null?null:l.property)&&i.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&i.getAttribute("charset")===(l.charSet==null?null:l.charSet)){o.splice(h,1);break e}}i=a.createElement(n),kt(i,n,l),a.head.appendChild(i);break;default:throw Error(s(468,n))}i[Kt]=t,Gt(i),n=i}t.stateNode=n}else Cd(a,t.type,t.stateNode);else t.stateNode=xd(a,n,t.memoizedProps);else i!==n?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,n===null?Cd(a,t.type,t.stateNode):xd(a,n,t.memoizedProps)):n===null&&t.stateNode!==null&&xc(t,t.memoizedProps,l.memoizedProps)}break;case 27:ue(e,t),se(t),n&512&&(jt||l===null||Ve(l,l.return)),l!==null&&n&4&&xc(t,t.memoizedProps,l.memoizedProps);break;case 5:if(ue(e,t),se(t),n&512&&(jt||l===null||Ve(l,l.return)),t.flags&32){a=t.stateNode;try{Tn(a,"")}catch(B){ot(t,t.return,B)}}n&4&&t.stateNode!=null&&(a=t.memoizedProps,xc(t,a,l!==null?l.memoizedProps:a)),n&1024&&(zc=!0);break;case 6:if(ue(e,t),se(t),n&4){if(t.stateNode===null)throw Error(s(162));n=t.memoizedProps,l=t.stateNode;try{l.nodeValue=n}catch(B){ot(t,t.return,B)}}break;case 3:if(bu=null,a=Le,Le=vu(e.containerInfo),ue(e,t),Le=a,se(t),n&4&&l!==null&&l.memoizedState.isDehydrated)try{Pn(e.containerInfo)}catch(B){ot(t,t.return,B)}zc&&(zc=!1,Ch(t));break;case 4:n=Le,Le=vu(t.stateNode.containerInfo),ue(e,t),se(t),Le=n;break;case 12:ue(e,t),se(t);break;case 31:ue(e,t),se(t),n&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,au(t,n)));break;case 13:ue(e,t),se(t),t.child.flags&8192&&t.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(uu=he()),n&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,au(t,n)));break;case 22:a=t.memoizedState!==null;var m=l!==null&&l.memoizedState!==null,A=sl,M=jt;if(sl=A||a,jt=M||m,ue(e,t),jt=M,sl=A,se(t),n&8192)t:for(e=t.stateNode,e._visibility=a?e._visibility&-2:e._visibility|1,a&&(l===null||m||sl||jt||hn(t)),l=null,e=t;;){if(e.tag===5||e.tag===26){if(l===null){m=l=e;try{if(i=m.stateNode,a)o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{h=m.stateNode;var O=m.memoizedProps.style,_=O!=null&&O.hasOwnProperty("display")?O.display:null;h.style.display=_==null||typeof _=="boolean"?"":(""+_).trim()}}catch(B){ot(m,m.return,B)}}}else if(e.tag===6){if(l===null){m=e;try{m.stateNode.nodeValue=a?"":m.memoizedProps}catch(B){ot(m,m.return,B)}}}else if(e.tag===18){if(l===null){m=e;try{var x=m.stateNode;a?gd(x,!0):gd(m.stateNode,!1)}catch(B){ot(m,m.return,B)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===t)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;l===e&&(l=null),e=e.return}l===e&&(l=null),e.sibling.return=e.return,e=e.sibling}n&4&&(n=t.updateQueue,n!==null&&(l=n.retryQueue,l!==null&&(n.retryQueue=null,au(t,l))));break;case 19:ue(e,t),se(t),n&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,au(t,n)));break;case 30:break;case 21:break;default:ue(e,t),se(t)}}function se(t){var e=t.flags;if(e&2){try{for(var l,n=t.return;n!==null;){if(vh(n)){l=n;break}n=n.return}if(l==null)throw Error(s(160));switch(l.tag){case 27:var a=l.stateNode,i=Mc(t);nu(t,i,a);break;case 5:var o=l.stateNode;l.flags&32&&(Tn(o,""),l.flags&=-33);var h=Mc(t);nu(t,h,o);break;case 3:case 4:var m=l.stateNode.containerInfo,A=Mc(t);Cc(t,A,m);break;default:throw Error(s(161))}}catch(M){ot(t,t.return,M)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function Ch(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;Ch(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function rl(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)Eh(t,e.alternate,e),e=e.sibling}function hn(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:Dl(4,e,e.return),hn(e);break;case 1:Ve(e,e.return);var l=e.stateNode;typeof l.componentWillUnmount=="function"&&gh(e,e.return,l),hn(e);break;case 27:Ja(e.stateNode);case 26:case 5:Ve(e,e.return),hn(e);break;case 22:e.memoizedState===null&&hn(e);break;case 30:hn(e);break;default:hn(e)}t=t.sibling}}function ol(t,e,l){for(l=l&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var n=e.alternate,a=t,i=e,o=i.flags;switch(i.tag){case 0:case 11:case 15:ol(a,i,l),La(4,i);break;case 1:if(ol(a,i,l),n=i,a=n.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(A){ot(n,n.return,A)}if(n=i,a=n.updateQueue,a!==null){var h=n.stateNode;try{var m=a.shared.hiddenCallbacks;if(m!==null)for(a.shared.hiddenCallbacks=null,a=0;a<m.length;a++)nf(m[a],h)}catch(A){ot(n,n.return,A)}}l&&o&64&&yh(i),ja(i,i.return);break;case 27:Sh(i);case 26:case 5:ol(a,i,l),l&&n===null&&o&4&&ph(i),ja(i,i.return);break;case 12:ol(a,i,l);break;case 31:ol(a,i,l),l&&o&4&&_h(a,i);break;case 13:ol(a,i,l),l&&o&4&&xh(a,i);break;case 22:i.memoizedState===null&&ol(a,i,l),ja(i,i.return);break;case 30:break;default:ol(a,i,l)}e=e.sibling}}function Oc(t,e){var l=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==l&&(t!=null&&t.refCount++,l!=null&&_a(l))}function Dc(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&_a(t))}function je(t,e,l,n){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)zh(t,e,l,n),e=e.sibling}function zh(t,e,l,n){var a=e.flags;switch(e.tag){case 0:case 11:case 15:je(t,e,l,n),a&2048&&La(9,e);break;case 1:je(t,e,l,n);break;case 3:je(t,e,l,n),a&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&_a(t)));break;case 12:if(a&2048){je(t,e,l,n),t=e.stateNode;try{var i=e.memoizedProps,o=i.id,h=i.onPostCommit;typeof h=="function"&&h(o,e.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(m){ot(e,e.return,m)}}else je(t,e,l,n);break;case 31:je(t,e,l,n);break;case 13:je(t,e,l,n);break;case 23:break;case 22:i=e.stateNode,o=e.alternate,e.memoizedState!==null?i._visibility&2?je(t,e,l,n):qa(t,e):i._visibility&2?je(t,e,l,n):(i._visibility|=2,Gn(t,e,l,n,(e.subtreeFlags&10256)!==0||!1)),a&2048&&Oc(o,e);break;case 24:je(t,e,l,n),a&2048&&Dc(e.alternate,e);break;default:je(t,e,l,n)}}function Gn(t,e,l,n,a){for(a=a&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var i=t,o=e,h=l,m=n,A=o.flags;switch(o.tag){case 0:case 11:case 15:Gn(i,o,h,m,a),La(8,o);break;case 23:break;case 22:var M=o.stateNode;o.memoizedState!==null?M._visibility&2?Gn(i,o,h,m,a):qa(i,o):(M._visibility|=2,Gn(i,o,h,m,a)),a&&A&2048&&Oc(o.alternate,o);break;case 24:Gn(i,o,h,m,a),a&&A&2048&&Dc(o.alternate,o);break;default:Gn(i,o,h,m,a)}e=e.sibling}}function qa(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var l=t,n=e,a=n.flags;switch(n.tag){case 22:qa(l,n),a&2048&&Oc(n.alternate,n);break;case 24:qa(l,n),a&2048&&Dc(n.alternate,n);break;default:qa(l,n)}e=e.sibling}}var Ya=8192;function Qn(t,e,l){if(t.subtreeFlags&Ya)for(t=t.child;t!==null;)Oh(t,e,l),t=t.sibling}function Oh(t,e,l){switch(t.tag){case 26:Qn(t,e,l),t.flags&Ya&&t.memoizedState!==null&&Sp(l,Le,t.memoizedState,t.memoizedProps);break;case 5:Qn(t,e,l);break;case 3:case 4:var n=Le;Le=vu(t.stateNode.containerInfo),Qn(t,e,l),Le=n;break;case 22:t.memoizedState===null&&(n=t.alternate,n!==null&&n.memoizedState!==null?(n=Ya,Ya=16777216,Qn(t,e,l),Ya=n):Qn(t,e,l));break;default:Qn(t,e,l)}}function Dh(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function Xa(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var l=0;l<e.length;l++){var n=e[l];Qt=n,Uh(n,t)}Dh(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Rh(t),t=t.sibling}function Rh(t){switch(t.tag){case 0:case 11:case 15:Xa(t),t.flags&2048&&Dl(9,t,t.return);break;case 3:Xa(t);break;case 12:Xa(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,iu(t)):Xa(t);break;default:Xa(t)}}function iu(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var l=0;l<e.length;l++){var n=e[l];Qt=n,Uh(n,t)}Dh(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:Dl(8,e,e.return),iu(e);break;case 22:l=e.stateNode,l._visibility&2&&(l._visibility&=-3,iu(e));break;default:iu(e)}t=t.sibling}}function Uh(t,e){for(;Qt!==null;){var l=Qt;switch(l.tag){case 0:case 11:case 15:Dl(8,l,e);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:_a(l.memoizedState.cache)}if(n=l.child,n!==null)n.return=l,Qt=n;else t:for(l=t;Qt!==null;){n=Qt;var a=n.sibling,i=n.return;if(Th(n),n===l){Qt=null;break t}if(a!==null){a.return=i,Qt=a;break t}Qt=i}}}var Hg={getCacheForType:function(t){var e=Zt(Nt),l=e.data.get(t);return l===void 0&&(l=t(),e.data.set(t,l)),l},cacheSignal:function(){return Zt(Nt).controller.signal}},Ng=typeof WeakMap=="function"?WeakMap:Map,ut=0,gt=null,I=null,tt=0,rt=0,Se=null,Rl=!1,Kn=!1,Rc=!1,fl=0,Ot=0,Ul=0,dn=0,Uc=0,be=0,Vn=0,Ga=null,ce=null,wc=!1,uu=0,wh=0,su=1/0,cu=null,wl=null,qt=0,Hl=null,Zn=null,hl=0,Hc=0,Nc=null,Hh=null,Qa=0,Bc=null;function Ee(){return(ut&2)!==0&&tt!==0?tt&-tt:C.T!==null?Gc():kr()}function Nh(){if(be===0)if((tt&536870912)===0||lt){var t=gi;gi<<=1,(gi&3932160)===0&&(gi=262144),be=t}else be=536870912;return t=pe.current,t!==null&&(t.flags|=32),be}function re(t,e,l){(t===gt&&(rt===2||rt===9)||t.cancelPendingCommit!==null)&&(Jn(t,0),Nl(t,tt,be,!1)),oa(t,l),((ut&2)===0||t!==gt)&&(t===gt&&((ut&2)===0&&(dn|=l),Ot===4&&Nl(t,tt,be,!1)),Ze(t))}function Bh(t,e,l){if((ut&6)!==0)throw Error(s(327));var n=!l&&(e&127)===0&&(e&t.expiredLanes)===0||ra(t,e),a=n?jg(t,e):jc(t,e,!0),i=n;do{if(a===0){Kn&&!n&&Nl(t,e,0,!1);break}else{if(l=t.current.alternate,i&&!Bg(l)){a=jc(t,e,!1),i=!1;continue}if(a===2){if(i=e,t.errorRecoveryDisabledLanes&i)var o=0;else o=t.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){e=o;t:{var h=t;a=Ga;var m=h.current.memoizedState.isDehydrated;if(m&&(Jn(h,o).flags|=256),o=jc(h,o,!1),o!==2){if(Rc&&!m){h.errorRecoveryDisabledLanes|=i,dn|=i,a=4;break t}i=ce,ce=a,i!==null&&(ce===null?ce=i:ce.push.apply(ce,i))}a=o}if(i=!1,a!==2)continue}}if(a===1){Jn(t,0),Nl(t,e,0,!0);break}t:{switch(n=t,i=a,i){case 0:case 1:throw Error(s(345));case 4:if((e&4194048)!==e)break;case 6:Nl(n,e,be,!Rl);break t;case 2:ce=null;break;case 3:case 5:break;default:throw Error(s(329))}if((e&62914560)===e&&(a=uu+300-he(),10<a)){if(Nl(n,e,be,!Rl),vi(n,0,!0)!==0)break t;hl=e,n.timeoutHandle=dd(Lh.bind(null,n,l,ce,cu,wc,e,be,dn,Vn,Rl,i,"Throttled",-0,0),a);break t}Lh(n,l,ce,cu,wc,e,be,dn,Vn,Rl,i,null,-0,0)}}break}while(!0);Ze(t)}function Lh(t,e,l,n,a,i,o,h,m,A,M,O,_,x){if(t.timeoutHandle=-1,O=e.subtreeFlags,O&8192||(O&16785408)===16785408){O={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Fe},Oh(e,i,O);var B=(i&62914560)===i?uu-he():(i&4194048)===i?wh-he():0;if(B=bp(O,B),B!==null){hl=i,t.cancelPendingCommit=B(Vh.bind(null,t,e,i,l,n,a,o,h,m,M,O,null,_,x)),Nl(t,i,o,!A);return}}Vh(t,e,i,l,n,a,o,h,m)}function Bg(t){for(var e=t;;){var l=e.tag;if((l===0||l===11||l===15)&&e.flags&16384&&(l=e.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(!ye(i(),a))return!1}catch{return!1}}if(l=e.child,e.subtreeFlags&16384&&l!==null)l.return=e,e=l;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Nl(t,e,l,n){e&=~Uc,e&=~dn,t.suspendedLanes|=e,t.pingedLanes&=~e,n&&(t.warmLanes|=e),n=t.expirationTimes;for(var a=e;0<a;){var i=31-me(a),o=1<<i;n[i]=-1,a&=~o}l!==0&&Vr(t,l,e)}function ru(){return(ut&6)===0?(Ka(0),!1):!0}function Lc(){if(I!==null){if(rt===0)var t=I.return;else t=I,el=nn=null,Ps(t),Ln=null,Ma=0,t=I;for(;t!==null;)mh(t.alternate,t),t=t.return;I=null}}function Jn(t,e){var l=t.timeoutHandle;l!==-1&&(t.timeoutHandle=-1,lp(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),hl=0,Lc(),gt=t,I=l=Pe(t.current,null),tt=e,rt=0,Se=null,Rl=!1,Kn=ra(t,e),Rc=!1,Vn=be=Uc=dn=Ul=Ot=0,ce=Ga=null,wc=!1,(e&8)!==0&&(e|=e&32);var n=t.entangledLanes;if(n!==0)for(t=t.entanglements,n&=e;0<n;){var a=31-me(n),i=1<<a;e|=t[a],n&=~i}return fl=e,Di(),l}function jh(t,e){J=null,C.H=Ha,e===Bn||e===ji?(e=Po(),rt=3):e===Xs?(e=Po(),rt=4):rt=e===yc?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,Se=e,I===null&&(Ot=1,Ii(t,Me(e,t.current)))}function qh(){var t=pe.current;return t===null?!0:(tt&4194048)===tt?De===null:(tt&62914560)===tt||(tt&536870912)!==0?t===De:!1}function Yh(){var t=C.H;return C.H=Ha,t===null?Ha:t}function Xh(){var t=C.A;return C.A=Hg,t}function ou(){Ot=4,Rl||(tt&4194048)!==tt&&pe.current!==null||(Kn=!0),(Ul&134217727)===0&&(dn&134217727)===0||gt===null||Nl(gt,tt,be,!1)}function jc(t,e,l){var n=ut;ut|=2;var a=Yh(),i=Xh();(gt!==t||tt!==e)&&(cu=null,Jn(t,e)),e=!1;var o=Ot;t:do try{if(rt!==0&&I!==null){var h=I,m=Se;switch(rt){case 8:Lc(),o=6;break t;case 3:case 2:case 9:case 6:pe.current===null&&(e=!0);var A=rt;if(rt=0,Se=null,kn(t,h,m,A),l&&Kn){o=0;break t}break;default:A=rt,rt=0,Se=null,kn(t,h,m,A)}}Lg(),o=Ot;break}catch(M){jh(t,M)}while(!0);return e&&t.shellSuspendCounter++,el=nn=null,ut=n,C.H=a,C.A=i,I===null&&(gt=null,tt=0,Di()),o}function Lg(){for(;I!==null;)Gh(I)}function jg(t,e){var l=ut;ut|=2;var n=Yh(),a=Xh();gt!==t||tt!==e?(cu=null,su=he()+500,Jn(t,e)):Kn=ra(t,e);t:do try{if(rt!==0&&I!==null){e=I;var i=Se;e:switch(rt){case 1:rt=0,Se=null,kn(t,e,i,1);break;case 2:case 9:if(Fo(i)){rt=0,Se=null,Qh(e);break}e=function(){rt!==2&&rt!==9||gt!==t||(rt=7),Ze(t)},i.then(e,e);break t;case 3:rt=7;break t;case 4:rt=5;break t;case 7:Fo(i)?(rt=0,Se=null,Qh(e)):(rt=0,Se=null,kn(t,e,i,7));break;case 5:var o=null;switch(I.tag){case 26:o=I.memoizedState;case 5:case 27:var h=I;if(o?zd(o):h.stateNode.complete){rt=0,Se=null;var m=h.sibling;if(m!==null)I=m;else{var A=h.return;A!==null?(I=A,fu(A)):I=null}break e}}rt=0,Se=null,kn(t,e,i,5);break;case 6:rt=0,Se=null,kn(t,e,i,6);break;case 8:Lc(),Ot=6;break t;default:throw Error(s(462))}}qg();break}catch(M){jh(t,M)}while(!0);return el=nn=null,C.H=n,C.A=a,ut=l,I!==null?0:(gt=null,tt=0,Di(),Ot)}function qg(){for(;I!==null&&!cy();)Gh(I)}function Gh(t){var e=hh(t.alternate,t,fl);t.memoizedProps=t.pendingProps,e===null?fu(t):I=e}function Qh(t){var e=t,l=e.alternate;switch(e.tag){case 15:case 0:e=uh(l,e,e.pendingProps,e.type,void 0,tt);break;case 11:e=uh(l,e,e.pendingProps,e.type.render,e.ref,tt);break;case 5:Ps(e);default:mh(l,e),e=I=Yo(e,fl),e=hh(l,e,fl)}t.memoizedProps=t.pendingProps,e===null?fu(t):I=e}function kn(t,e,l,n){el=nn=null,Ps(e),Ln=null,Ma=0;var a=e.return;try{if(Cg(t,a,e,l,tt)){Ot=1,Ii(t,Me(l,t.current)),I=null;return}}catch(i){if(a!==null)throw I=a,i;Ot=1,Ii(t,Me(l,t.current)),I=null;return}e.flags&32768?(lt||n===1?t=!0:Kn||(tt&536870912)!==0?t=!1:(Rl=t=!0,(n===2||n===9||n===3||n===6)&&(n=pe.current,n!==null&&n.tag===13&&(n.flags|=16384))),Kh(e,t)):fu(e)}function fu(t){var e=t;do{if((e.flags&32768)!==0){Kh(e,Rl);return}t=e.return;var l=Dg(e.alternate,e,fl);if(l!==null){I=l;return}if(e=e.sibling,e!==null){I=e;return}I=e=t}while(e!==null);Ot===0&&(Ot=5)}function Kh(t,e){do{var l=Rg(t.alternate,t);if(l!==null){l.flags&=32767,I=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!e&&(t=t.sibling,t!==null)){I=t;return}I=t=l}while(t!==null);Ot=6,I=null}function Vh(t,e,l,n,a,i,o,h,m){t.cancelPendingCommit=null;do hu();while(qt!==0);if((ut&6)!==0)throw Error(s(327));if(e!==null){if(e===t.current)throw Error(s(177));if(i=e.lanes|e.childLanes,i|=Ms,vy(t,l,i,o,h,m),t===gt&&(I=gt=null,tt=0),Zn=e,Hl=t,hl=l,Hc=i,Nc=a,Hh=n,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Qg(mi,function(){return $h(),null})):(t.callbackNode=null,t.callbackPriority=0),n=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||n){n=C.T,C.T=null,a=w.p,w.p=2,o=ut,ut|=4;try{Ug(t,e,l)}finally{ut=o,w.p=a,C.T=n}}qt=1,Zh(),Jh(),kh()}}function Zh(){if(qt===1){qt=0;var t=Hl,e=Zn,l=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||l){l=C.T,C.T=null;var n=w.p;w.p=2;var a=ut;ut|=4;try{Mh(e,t);var i=$c,o=Ro(t.containerInfo),h=i.focusedElem,m=i.selectionRange;if(o!==h&&h&&h.ownerDocument&&Do(h.ownerDocument.documentElement,h)){if(m!==null&&Es(h)){var A=m.start,M=m.end;if(M===void 0&&(M=A),"selectionStart"in h)h.selectionStart=A,h.selectionEnd=Math.min(M,h.value.length);else{var O=h.ownerDocument||document,_=O&&O.defaultView||window;if(_.getSelection){var x=_.getSelection(),B=h.textContent.length,X=Math.min(m.start,B),mt=m.end===void 0?X:Math.min(m.end,B);!x.extend&&X>mt&&(o=mt,mt=X,X=o);var S=Oo(h,X),g=Oo(h,mt);if(S&&g&&(x.rangeCount!==1||x.anchorNode!==S.node||x.anchorOffset!==S.offset||x.focusNode!==g.node||x.focusOffset!==g.offset)){var T=O.createRange();T.setStart(S.node,S.offset),x.removeAllRanges(),X>mt?(x.addRange(T),x.extend(g.node,g.offset)):(T.setEnd(g.node,g.offset),x.addRange(T))}}}}for(O=[],x=h;x=x.parentNode;)x.nodeType===1&&O.push({element:x,left:x.scrollLeft,top:x.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<O.length;h++){var z=O[h];z.element.scrollLeft=z.left,z.element.scrollTop=z.top}}_u=!!Wc,$c=Wc=null}finally{ut=a,w.p=n,C.T=l}}t.current=e,qt=2}}function Jh(){if(qt===2){qt=0;var t=Hl,e=Zn,l=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||l){l=C.T,C.T=null;var n=w.p;w.p=2;var a=ut;ut|=4;try{Eh(t,e.alternate,e)}finally{ut=a,w.p=n,C.T=l}}qt=3}}function kh(){if(qt===4||qt===3){qt=0,ry();var t=Hl,e=Zn,l=hl,n=Hh;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?qt=5:(qt=0,Zn=Hl=null,Wh(t,t.pendingLanes));var a=t.pendingLanes;if(a===0&&(wl=null),ls(l),e=e.stateNode,de&&typeof de.onCommitFiberRoot=="function")try{de.onCommitFiberRoot(ca,e,void 0,(e.current.flags&128)===128)}catch{}if(n!==null){e=C.T,a=w.p,w.p=2,C.T=null;try{for(var i=t.onRecoverableError,o=0;o<n.length;o++){var h=n[o];i(h.value,{componentStack:h.stack})}}finally{C.T=e,w.p=a}}(hl&3)!==0&&hu(),Ze(t),a=t.pendingLanes,(l&261930)!==0&&(a&42)!==0?t===Bc?Qa++:(Qa=0,Bc=t):Qa=0,Ka(0)}}function Wh(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,_a(e)))}function hu(){return Zh(),Jh(),kh(),$h()}function $h(){if(qt!==5)return!1;var t=Hl,e=Hc;Hc=0;var l=ls(hl),n=C.T,a=w.p;try{w.p=32>l?32:l,C.T=null,l=Nc,Nc=null;var i=Hl,o=hl;if(qt=0,Zn=Hl=null,hl=0,(ut&6)!==0)throw Error(s(331));var h=ut;if(ut|=4,Rh(i.current),zh(i,i.current,o,l),ut=h,Ka(0,!1),de&&typeof de.onPostCommitFiberRoot=="function")try{de.onPostCommitFiberRoot(ca,i)}catch{}return!0}finally{w.p=a,C.T=n,Wh(t,e)}}function Fh(t,e,l){e=Me(l,e),e=mc(t.stateNode,e,2),t=Cl(t,e,2),t!==null&&(oa(t,2),Ze(t))}function ot(t,e,l){if(t.tag===3)Fh(t,t,l);else for(;e!==null;){if(e.tag===3){Fh(e,t,l);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(wl===null||!wl.has(n))){t=Me(l,t),l=If(2),n=Cl(e,l,2),n!==null&&(Pf(l,n,e,t),oa(n,2),Ze(n));break}}e=e.return}}function qc(t,e,l){var n=t.pingCache;if(n===null){n=t.pingCache=new Ng;var a=new Set;n.set(e,a)}else a=n.get(e),a===void 0&&(a=new Set,n.set(e,a));a.has(l)||(Rc=!0,a.add(l),t=Yg.bind(null,t,e,l),e.then(t,t))}function Yg(t,e,l){var n=t.pingCache;n!==null&&n.delete(e),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,gt===t&&(tt&l)===l&&(Ot===4||Ot===3&&(tt&62914560)===tt&&300>he()-uu?(ut&2)===0&&Jn(t,0):Uc|=l,Vn===tt&&(Vn=0)),Ze(t)}function Ih(t,e){e===0&&(e=Kr()),t=tn(t,e),t!==null&&(oa(t,e),Ze(t))}function Xg(t){var e=t.memoizedState,l=0;e!==null&&(l=e.retryLane),Ih(t,l)}function Gg(t,e){var l=0;switch(t.tag){case 31:case 13:var n=t.stateNode,a=t.memoizedState;a!==null&&(l=a.retryLane);break;case 19:n=t.stateNode;break;case 22:n=t.stateNode._retryCache;break;default:throw Error(s(314))}n!==null&&n.delete(e),Ih(t,l)}function Qg(t,e){return Iu(t,e)}var du=null,Wn=null,Yc=!1,mu=!1,Xc=!1,Bl=0;function Ze(t){t!==Wn&&t.next===null&&(Wn===null?du=Wn=t:Wn=Wn.next=t),mu=!0,Yc||(Yc=!0,Vg())}function Ka(t,e){if(!Xc&&mu){Xc=!0;do for(var l=!1,n=du;n!==null;){if(t!==0){var a=n.pendingLanes;if(a===0)var i=0;else{var o=n.suspendedLanes,h=n.pingedLanes;i=(1<<31-me(42|t)+1)-1,i&=a&~(o&~h),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,ld(n,i))}else i=tt,i=vi(n,n===gt?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(i&3)===0||ra(n,i)||(l=!0,ld(n,i));n=n.next}while(l);Xc=!1}}function Kg(){Ph()}function Ph(){mu=Yc=!1;var t=0;Bl!==0&&ep()&&(t=Bl);for(var e=he(),l=null,n=du;n!==null;){var a=n.next,i=td(n,e);i===0?(n.next=null,l===null?du=a:l.next=a,a===null&&(Wn=l)):(l=n,(t!==0||(i&3)!==0)&&(mu=!0)),n=a}qt!==0&&qt!==5||Ka(t),Bl!==0&&(Bl=0)}function td(t,e){for(var l=t.suspendedLanes,n=t.pingedLanes,a=t.expirationTimes,i=t.pendingLanes&-62914561;0<i;){var o=31-me(i),h=1<<o,m=a[o];m===-1?((h&l)===0||(h&n)!==0)&&(a[o]=py(h,e)):m<=e&&(t.expiredLanes|=h),i&=~h}if(e=gt,l=tt,l=vi(t,t===e?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),n=t.callbackNode,l===0||t===e&&(rt===2||rt===9)||t.cancelPendingCommit!==null)return n!==null&&n!==null&&Pu(n),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||ra(t,l)){if(e=l&-l,e===t.callbackPriority)return e;switch(n!==null&&Pu(n),ls(l)){case 2:case 8:l=Gr;break;case 32:l=mi;break;case 268435456:l=Qr;break;default:l=mi}return n=ed.bind(null,t),l=Iu(l,n),t.callbackPriority=e,t.callbackNode=l,e}return n!==null&&n!==null&&Pu(n),t.callbackPriority=2,t.callbackNode=null,2}function ed(t,e){if(qt!==0&&qt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(hu()&&t.callbackNode!==l)return null;var n=tt;return n=vi(t,t===gt?n:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),n===0?null:(Bh(t,n,e),td(t,he()),t.callbackNode!=null&&t.callbackNode===l?ed.bind(null,t):null)}function ld(t,e){if(hu())return null;Bh(t,e,!0)}function Vg(){np(function(){(ut&6)!==0?Iu(Xr,Kg):Ph()})}function Gc(){if(Bl===0){var t=Hn;t===0&&(t=yi,yi<<=1,(yi&261888)===0&&(yi=256)),Bl=t}return Bl}function nd(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Ti(""+t)}function ad(t,e){var l=e.ownerDocument.createElement("input");return l.name=e.name,l.value=e.value,t.id&&l.setAttribute("form",t.id),e.parentNode.insertBefore(l,e),t=new FormData(t),l.parentNode.removeChild(l),t}function Zg(t,e,l,n,a){if(e==="submit"&&l&&l.stateNode===a){var i=nd((a[ne]||null).action),o=n.submitter;o&&(e=(e=o[ne]||null)?nd(e.formAction):o.getAttribute("formAction"),e!==null&&(i=e,o=null));var h=new Mi("action","action",null,n,a);t.push({event:h,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Bl!==0){var m=o?ad(a,o):new FormData(a);cc(l,{pending:!0,data:m,method:a.method,action:i},null,m)}}else typeof i=="function"&&(h.preventDefault(),m=o?ad(a,o):new FormData(a),cc(l,{pending:!0,data:m,method:a.method,action:i},i,m))},currentTarget:a}]})}}for(var Qc=0;Qc<xs.length;Qc++){var Kc=xs[Qc],Jg=Kc.toLowerCase(),kg=Kc[0].toUpperCase()+Kc.slice(1);Be(Jg,"on"+kg)}Be(Ho,"onAnimationEnd"),Be(No,"onAnimationIteration"),Be(Bo,"onAnimationStart"),Be("dblclick","onDoubleClick"),Be("focusin","onFocus"),Be("focusout","onBlur"),Be(og,"onTransitionRun"),Be(fg,"onTransitionStart"),Be(hg,"onTransitionCancel"),Be(Lo,"onTransitionEnd"),bn("onMouseEnter",["mouseout","mouseover"]),bn("onMouseLeave",["mouseout","mouseover"]),bn("onPointerEnter",["pointerout","pointerover"]),bn("onPointerLeave",["pointerout","pointerover"]),$l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),$l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),$l("onBeforeInput",["compositionend","keypress","textInput","paste"]),$l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),$l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),$l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Va="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(" "),Wg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Va));function id(t,e){e=(e&4)!==0;for(var l=0;l<t.length;l++){var n=t[l],a=n.event;n=n.listeners;t:{var i=void 0;if(e)for(var o=n.length-1;0<=o;o--){var h=n[o],m=h.instance,A=h.currentTarget;if(h=h.listener,m!==i&&a.isPropagationStopped())break t;i=h,a.currentTarget=A;try{i(a)}catch(M){Oi(M)}a.currentTarget=null,i=m}else for(o=0;o<n.length;o++){if(h=n[o],m=h.instance,A=h.currentTarget,h=h.listener,m!==i&&a.isPropagationStopped())break t;i=h,a.currentTarget=A;try{i(a)}catch(M){Oi(M)}a.currentTarget=null,i=m}}}}function P(t,e){var l=e[ns];l===void 0&&(l=e[ns]=new Set);var n=t+"__bubble";l.has(n)||(ud(e,t,2,!1),l.add(n))}function Vc(t,e,l){var n=0;e&&(n|=4),ud(l,t,n,e)}var yu="_reactListening"+Math.random().toString(36).slice(2);function Zc(t){if(!t[yu]){t[yu]=!0,Fr.forEach(function(l){l!=="selectionchange"&&(Wg.has(l)||Vc(l,!1,t),Vc(l,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[yu]||(e[yu]=!0,Vc("selectionchange",!1,e))}}function ud(t,e,l,n){switch(Nd(e)){case 2:var a=Ap;break;case 8:a=_p;break;default:a=sr}l=a.bind(null,e,l,t),a=void 0,!hs||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(a=!0),n?a!==void 0?t.addEventListener(e,l,{capture:!0,passive:a}):t.addEventListener(e,l,!0):a!==void 0?t.addEventListener(e,l,{passive:a}):t.addEventListener(e,l,!1)}function Jc(t,e,l,n,a){var i=n;if((e&1)===0&&(e&2)===0&&n!==null)t:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var h=n.stateNode.containerInfo;if(h===a)break;if(o===4)for(o=n.return;o!==null;){var m=o.tag;if((m===3||m===4)&&o.stateNode.containerInfo===a)return;o=o.return}for(;h!==null;){if(o=pn(h),o===null)return;if(m=o.tag,m===5||m===6||m===26||m===27){n=i=o;continue t}h=h.parentNode}}n=n.return}ro(function(){var A=i,M=os(l),O=[];t:{var _=jo.get(t);if(_!==void 0){var x=Mi,B=t;switch(t){case"keypress":if(_i(l)===0)break t;case"keydown":case"keyup":x=Gy;break;case"focusin":B="focus",x=gs;break;case"focusout":B="blur",x=gs;break;case"beforeblur":case"afterblur":x=gs;break;case"click":if(l.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":x=ho;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":x=Dy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":x=Vy;break;case Ho:case No:case Bo:x=wy;break;case Lo:x=Jy;break;case"scroll":case"scrollend":x=zy;break;case"wheel":x=Wy;break;case"copy":case"cut":case"paste":x=Ny;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":x=yo;break;case"toggle":case"beforetoggle":x=Fy}var X=(e&4)!==0,mt=!X&&(t==="scroll"||t==="scrollend"),S=X?_!==null?_+"Capture":null:_;X=[];for(var g=A,T;g!==null;){var z=g;if(T=z.stateNode,z=z.tag,z!==5&&z!==26&&z!==27||T===null||S===null||(z=da(g,S),z!=null&&X.push(Za(g,z,T))),mt)break;g=g.return}0<X.length&&(_=new x(_,B,null,l,M),O.push({event:_,listeners:X}))}}if((e&7)===0){t:{if(_=t==="mouseover"||t==="pointerover",x=t==="mouseout"||t==="pointerout",_&&l!==rs&&(B=l.relatedTarget||l.fromElement)&&(pn(B)||B[gn]))break t;if((x||_)&&(_=M.window===M?M:(_=M.ownerDocument)?_.defaultView||_.parentWindow:window,x?(B=l.relatedTarget||l.toElement,x=A,B=B?pn(B):null,B!==null&&(mt=d(B),X=B.tag,B!==mt||X!==5&&X!==27&&X!==6)&&(B=null)):(x=null,B=A),x!==B)){if(X=ho,z="onMouseLeave",S="onMouseEnter",g="mouse",(t==="pointerout"||t==="pointerover")&&(X=yo,z="onPointerLeave",S="onPointerEnter",g="pointer"),mt=x==null?_:ha(x),T=B==null?_:ha(B),_=new X(z,g+"leave",x,l,M),_.target=mt,_.relatedTarget=T,z=null,pn(M)===A&&(X=new X(S,g+"enter",B,l,M),X.target=T,X.relatedTarget=mt,z=X),mt=z,x&&B)e:{for(X=$g,S=x,g=B,T=0,z=S;z;z=X(z))T++;z=0;for(var q=g;q;q=X(q))z++;for(;0<T-z;)S=X(S),T--;for(;0<z-T;)g=X(g),z--;for(;T--;){if(S===g||g!==null&&S===g.alternate){X=S;break e}S=X(S),g=X(g)}X=null}else X=null;x!==null&&sd(O,_,x,X,!1),B!==null&&mt!==null&&sd(O,mt,B,X,!0)}}t:{if(_=A?ha(A):window,x=_.nodeName&&_.nodeName.toLowerCase(),x==="select"||x==="input"&&_.type==="file")var nt=Ao;else if(Eo(_))if(_o)nt=sg;else{nt=ig;var j=ag}else x=_.nodeName,!x||x.toLowerCase()!=="input"||_.type!=="checkbox"&&_.type!=="radio"?A&&cs(A.elementType)&&(nt=Ao):nt=ug;if(nt&&(nt=nt(t,A))){To(O,nt,l,M);break t}j&&j(t,_,A),t==="focusout"&&A&&_.type==="number"&&A.memoizedProps.value!=null&&ss(_,"number",_.value)}switch(j=A?ha(A):window,t){case"focusin":(Eo(j)||j.contentEditable==="true")&&(Mn=j,Ts=A,Ea=null);break;case"focusout":Ea=Ts=Mn=null;break;case"mousedown":As=!0;break;case"contextmenu":case"mouseup":case"dragend":As=!1,Uo(O,l,M);break;case"selectionchange":if(rg)break;case"keydown":case"keyup":Uo(O,l,M)}var k;if(vs)t:{switch(t){case"compositionstart":var et="onCompositionStart";break t;case"compositionend":et="onCompositionEnd";break t;case"compositionupdate":et="onCompositionUpdate";break t}et=void 0}else xn?So(t,l)&&(et="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(et="onCompositionStart");et&&(go&&l.locale!=="ko"&&(xn||et!=="onCompositionStart"?et==="onCompositionEnd"&&xn&&(k=oo()):(bl=M,ds="value"in bl?bl.value:bl.textContent,xn=!0)),j=gu(A,et),0<j.length&&(et=new mo(et,t,null,l,M),O.push({event:et,listeners:j}),k?et.data=k:(k=bo(l),k!==null&&(et.data=k)))),(k=Py?tg(t,l):eg(t,l))&&(et=gu(A,"onBeforeInput"),0<et.length&&(j=new mo("onBeforeInput","beforeinput",null,l,M),O.push({event:j,listeners:et}),j.data=k)),Zg(O,t,A,l,M)}id(O,e)})}function Za(t,e,l){return{instance:t,listener:e,currentTarget:l}}function gu(t,e){for(var l=e+"Capture",n=[];t!==null;){var a=t,i=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||i===null||(a=da(t,l),a!=null&&n.unshift(Za(t,a,i)),a=da(t,e),a!=null&&n.push(Za(t,a,i))),t.tag===3)return n;t=t.return}return[]}function $g(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function sd(t,e,l,n,a){for(var i=e._reactName,o=[];l!==null&&l!==n;){var h=l,m=h.alternate,A=h.stateNode;if(h=h.tag,m!==null&&m===n)break;h!==5&&h!==26&&h!==27||A===null||(m=A,a?(A=da(l,i),A!=null&&o.unshift(Za(l,A,m))):a||(A=da(l,i),A!=null&&o.push(Za(l,A,m)))),l=l.return}o.length!==0&&t.push({event:e,listeners:o})}var Fg=/\r\n?/g,Ig=/\u0000|\uFFFD/g;function cd(t){return(typeof t=="string"?t:""+t).replace(Fg,`
|
|
49
|
+
`).replace(Ig,"")}function rd(t,e){return e=cd(e),cd(t)===e}function dt(t,e,l,n,a,i){switch(l){case"children":typeof n=="string"?e==="body"||e==="textarea"&&n===""||Tn(t,n):(typeof n=="number"||typeof n=="bigint")&&e!=="body"&&Tn(t,""+n);break;case"className":bi(t,"class",n);break;case"tabIndex":bi(t,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":bi(t,l,n);break;case"style":so(t,n,i);break;case"data":if(e!=="object"){bi(t,"data",n);break}case"src":case"href":if(n===""&&(e!=="a"||l!=="href")){t.removeAttribute(l);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){t.removeAttribute(l);break}n=Ti(""+n),t.setAttribute(l,n);break;case"action":case"formAction":if(typeof n=="function"){t.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"?(e!=="input"&&dt(t,e,"name",a.name,a,null),dt(t,e,"formEncType",a.formEncType,a,null),dt(t,e,"formMethod",a.formMethod,a,null),dt(t,e,"formTarget",a.formTarget,a,null)):(dt(t,e,"encType",a.encType,a,null),dt(t,e,"method",a.method,a,null),dt(t,e,"target",a.target,a,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){t.removeAttribute(l);break}n=Ti(""+n),t.setAttribute(l,n);break;case"onClick":n!=null&&(t.onclick=Fe);break;case"onScroll":n!=null&&P("scroll",t);break;case"onScrollEnd":n!=null&&P("scrollend",t);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(s(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(s(60));t.innerHTML=l}}break;case"multiple":t.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":t.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"){t.removeAttribute("xlink:href");break}l=Ti(""+n),t.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"?t.setAttribute(l,""+n):t.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":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"?t.setAttribute(l,""):t.removeAttribute(l);break;case"capture":case"download":n===!0?t.setAttribute(l,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?t.setAttribute(l,n):t.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?t.setAttribute(l,n):t.removeAttribute(l);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?t.removeAttribute(l):t.setAttribute(l,n);break;case"popover":P("beforetoggle",t),P("toggle",t),Si(t,"popover",n);break;case"xlinkActuate":$e(t,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":$e(t,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":$e(t,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":$e(t,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":$e(t,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":$e(t,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":$e(t,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":$e(t,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":$e(t,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Si(t,"is",n);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=My.get(l)||l,Si(t,l,n))}}function kc(t,e,l,n,a,i){switch(l){case"style":so(t,n,i);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(s(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(s(60));t.innerHTML=l}}break;case"children":typeof n=="string"?Tn(t,n):(typeof n=="number"||typeof n=="bigint")&&Tn(t,""+n);break;case"onScroll":n!=null&&P("scroll",t);break;case"onScrollEnd":n!=null&&P("scrollend",t);break;case"onClick":n!=null&&(t.onclick=Fe);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ir.hasOwnProperty(l))t:{if(l[0]==="o"&&l[1]==="n"&&(a=l.endsWith("Capture"),e=l.slice(2,a?l.length-7:void 0),i=t[ne]||null,i=i!=null?i[l]:null,typeof i=="function"&&t.removeEventListener(e,i,a),typeof n=="function")){typeof i!="function"&&i!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(e,n,a);break t}l in t?t[l]=n:n===!0?t.setAttribute(l,""):Si(t,l,n)}}}function kt(t,e,l){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":P("error",t),P("load",t);var n=!1,a=!1,i;for(i in l)if(l.hasOwnProperty(i)){var o=l[i];if(o!=null)switch(i){case"src":n=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,e));default:dt(t,e,i,o,l,null)}}a&&dt(t,e,"srcSet",l.srcSet,l,null),n&&dt(t,e,"src",l.src,l,null);return;case"input":P("invalid",t);var h=i=o=a=null,m=null,A=null;for(n in l)if(l.hasOwnProperty(n)){var M=l[n];if(M!=null)switch(n){case"name":a=M;break;case"type":o=M;break;case"checked":m=M;break;case"defaultChecked":A=M;break;case"value":i=M;break;case"defaultValue":h=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(s(137,e));break;default:dt(t,e,n,M,l,null)}}no(t,i,h,m,A,o,a,!1);return;case"select":P("invalid",t),n=o=i=null;for(a in l)if(l.hasOwnProperty(a)&&(h=l[a],h!=null))switch(a){case"value":i=h;break;case"defaultValue":o=h;break;case"multiple":n=h;default:dt(t,e,a,h,l,null)}e=i,l=o,t.multiple=!!n,e!=null?En(t,!!n,e,!1):l!=null&&En(t,!!n,l,!0);return;case"textarea":P("invalid",t),i=a=n=null;for(o in l)if(l.hasOwnProperty(o)&&(h=l[o],h!=null))switch(o){case"value":n=h;break;case"defaultValue":a=h;break;case"children":i=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(s(91));break;default:dt(t,e,o,h,l,null)}io(t,n,a,i);return;case"option":for(m in l)if(l.hasOwnProperty(m)&&(n=l[m],n!=null))switch(m){case"selected":t.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:dt(t,e,m,n,l,null)}return;case"dialog":P("beforetoggle",t),P("toggle",t),P("cancel",t),P("close",t);break;case"iframe":case"object":P("load",t);break;case"video":case"audio":for(n=0;n<Va.length;n++)P(Va[n],t);break;case"image":P("error",t),P("load",t);break;case"details":P("toggle",t);break;case"embed":case"source":case"link":P("error",t),P("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(A in l)if(l.hasOwnProperty(A)&&(n=l[A],n!=null))switch(A){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,e));default:dt(t,e,A,n,l,null)}return;default:if(cs(e)){for(M in l)l.hasOwnProperty(M)&&(n=l[M],n!==void 0&&kc(t,e,M,n,l,void 0));return}}for(h in l)l.hasOwnProperty(h)&&(n=l[h],n!=null&&dt(t,e,h,n,l,null))}function Pg(t,e,l,n){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,i=null,o=null,h=null,m=null,A=null,M=null;for(x in l){var O=l[x];if(l.hasOwnProperty(x)&&O!=null)switch(x){case"checked":break;case"value":break;case"defaultValue":m=O;default:n.hasOwnProperty(x)||dt(t,e,x,null,n,O)}}for(var _ in n){var x=n[_];if(O=l[_],n.hasOwnProperty(_)&&(x!=null||O!=null))switch(_){case"type":i=x;break;case"name":a=x;break;case"checked":A=x;break;case"defaultChecked":M=x;break;case"value":o=x;break;case"defaultValue":h=x;break;case"children":case"dangerouslySetInnerHTML":if(x!=null)throw Error(s(137,e));break;default:x!==O&&dt(t,e,_,x,n,O)}}us(t,o,h,m,A,M,i,a);return;case"select":x=o=h=_=null;for(i in l)if(m=l[i],l.hasOwnProperty(i)&&m!=null)switch(i){case"value":break;case"multiple":x=m;default:n.hasOwnProperty(i)||dt(t,e,i,null,n,m)}for(a in n)if(i=n[a],m=l[a],n.hasOwnProperty(a)&&(i!=null||m!=null))switch(a){case"value":_=i;break;case"defaultValue":h=i;break;case"multiple":o=i;default:i!==m&&dt(t,e,a,i,n,m)}e=h,l=o,n=x,_!=null?En(t,!!l,_,!1):!!n!=!!l&&(e!=null?En(t,!!l,e,!0):En(t,!!l,l?[]:"",!1));return;case"textarea":x=_=null;for(h in l)if(a=l[h],l.hasOwnProperty(h)&&a!=null&&!n.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:dt(t,e,h,null,n,a)}for(o in n)if(a=n[o],i=l[o],n.hasOwnProperty(o)&&(a!=null||i!=null))switch(o){case"value":_=a;break;case"defaultValue":x=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(s(91));break;default:a!==i&&dt(t,e,o,a,n,i)}ao(t,_,x);return;case"option":for(var B in l)if(_=l[B],l.hasOwnProperty(B)&&_!=null&&!n.hasOwnProperty(B))switch(B){case"selected":t.selected=!1;break;default:dt(t,e,B,null,n,_)}for(m in n)if(_=n[m],x=l[m],n.hasOwnProperty(m)&&_!==x&&(_!=null||x!=null))switch(m){case"selected":t.selected=_&&typeof _!="function"&&typeof _!="symbol";break;default:dt(t,e,m,_,n,x)}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 X in l)_=l[X],l.hasOwnProperty(X)&&_!=null&&!n.hasOwnProperty(X)&&dt(t,e,X,null,n,_);for(A in n)if(_=n[A],x=l[A],n.hasOwnProperty(A)&&_!==x&&(_!=null||x!=null))switch(A){case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(s(137,e));break;default:dt(t,e,A,_,n,x)}return;default:if(cs(e)){for(var mt in l)_=l[mt],l.hasOwnProperty(mt)&&_!==void 0&&!n.hasOwnProperty(mt)&&kc(t,e,mt,void 0,n,_);for(M in n)_=n[M],x=l[M],!n.hasOwnProperty(M)||_===x||_===void 0&&x===void 0||kc(t,e,M,_,n,x);return}}for(var S in l)_=l[S],l.hasOwnProperty(S)&&_!=null&&!n.hasOwnProperty(S)&&dt(t,e,S,null,n,_);for(O in n)_=n[O],x=l[O],!n.hasOwnProperty(O)||_===x||_==null&&x==null||dt(t,e,O,_,n,x)}function od(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function tp(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,l=performance.getEntriesByType("resource"),n=0;n<l.length;n++){var a=l[n],i=a.transferSize,o=a.initiatorType,h=a.duration;if(i&&h&&od(o)){for(o=0,h=a.responseEnd,n+=1;n<l.length;n++){var m=l[n],A=m.startTime;if(A>h)break;var M=m.transferSize,O=m.initiatorType;M&&od(O)&&(m=m.responseEnd,o+=M*(m<h?1:(h-A)/(m-A)))}if(--n,e+=8*(i+o)/(a.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Wc=null,$c=null;function pu(t){return t.nodeType===9?t:t.ownerDocument}function fd(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function hd(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function Fc(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Ic=null;function ep(){var t=window.event;return t&&t.type==="popstate"?t===Ic?!1:(Ic=t,!0):(Ic=null,!1)}var dd=typeof setTimeout=="function"?setTimeout:void 0,lp=typeof clearTimeout=="function"?clearTimeout:void 0,md=typeof Promise=="function"?Promise:void 0,np=typeof queueMicrotask=="function"?queueMicrotask:typeof md<"u"?function(t){return md.resolve(null).then(t).catch(ap)}:dd;function ap(t){setTimeout(function(){throw t})}function Ll(t){return t==="head"}function yd(t,e){var l=e,n=0;do{var a=l.nextSibling;if(t.removeChild(l),a&&a.nodeType===8)if(l=a.data,l==="/$"||l==="/&"){if(n===0){t.removeChild(a),Pn(e);return}n--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")n++;else if(l==="html")Ja(t.ownerDocument.documentElement);else if(l==="head"){l=t.ownerDocument.head,Ja(l);for(var i=l.firstChild;i;){var o=i.nextSibling,h=i.nodeName;i[fa]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=o}}else l==="body"&&Ja(t.ownerDocument.body);l=a}while(l);Pn(e)}function gd(t,e){var l=t;t=0;do{var n=l.nextSibling;if(l.nodeType===1?e?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(e?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),n&&n.nodeType===8)if(l=n.data,l==="/$"){if(t===0)break;t--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||t++;l=n}while(l)}function Pc(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var l=e;switch(e=e.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Pc(l),as(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function ip(t,e,l,n){for(;t.nodeType===1;){var a=l;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!n&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(n){if(!t[fa])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(i=t.getAttribute("rel"),i==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(i!==a.rel||t.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||t.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||t.getAttribute("title")!==(a.title==null?null:a.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(i=t.getAttribute("src"),(i!==(a.src==null?null:a.src)||t.getAttribute("type")!==(a.type==null?null:a.type)||t.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&i&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var i=a.name==null?null:""+a.name;if(a.type==="hidden"&&t.getAttribute("name")===i)return t}else return t;if(t=Re(t.nextSibling),t===null)break}return null}function up(t,e,l){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=Re(t.nextSibling),t===null))return null;return t}function pd(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=Re(t.nextSibling),t===null))return null;return t}function tr(t){return t.data==="$?"||t.data==="$~"}function er(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function sp(t,e){var l=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||l.readyState!=="loading")e();else{var n=function(){e(),l.removeEventListener("DOMContentLoaded",n)};l.addEventListener("DOMContentLoaded",n),t._reactRetry=n}}function Re(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var lr=null;function vd(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var l=t.data;if(l==="/$"||l==="/&"){if(e===0)return Re(t.nextSibling);e--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||e++}t=t.nextSibling}return null}function Sd(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var l=t.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(e===0)return t;e--}else l!=="/$"&&l!=="/&"||e++}t=t.previousSibling}return null}function bd(t,e,l){switch(e=pu(l),t){case"html":if(t=e.documentElement,!t)throw Error(s(452));return t;case"head":if(t=e.head,!t)throw Error(s(453));return t;case"body":if(t=e.body,!t)throw Error(s(454));return t;default:throw Error(s(451))}}function Ja(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);as(t)}var Ue=new Map,Ed=new Set;function vu(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var dl=w.d;w.d={f:cp,r:rp,D:op,C:fp,L:hp,m:dp,X:yp,S:mp,M:gp};function cp(){var t=dl.f(),e=ru();return t||e}function rp(t){var e=vn(t);e!==null&&e.tag===5&&e.type==="form"?jf(e):dl.r(t)}var $n=typeof document>"u"?null:document;function Td(t,e,l){var n=$n;if(n&&typeof e=="string"&&e){var a=_e(e);a='link[rel="'+t+'"][href="'+a+'"]',typeof l=="string"&&(a+='[crossorigin="'+l+'"]'),Ed.has(a)||(Ed.add(a),t={rel:t,crossOrigin:l,href:e},n.querySelector(a)===null&&(e=n.createElement("link"),kt(e,"link",t),Gt(e),n.head.appendChild(e)))}}function op(t){dl.D(t),Td("dns-prefetch",t,null)}function fp(t,e){dl.C(t,e),Td("preconnect",t,e)}function hp(t,e,l){dl.L(t,e,l);var n=$n;if(n&&t&&e){var a='link[rel="preload"][as="'+_e(e)+'"]';e==="image"&&l&&l.imageSrcSet?(a+='[imagesrcset="'+_e(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(a+='[imagesizes="'+_e(l.imageSizes)+'"]')):a+='[href="'+_e(t)+'"]';var i=a;switch(e){case"style":i=Fn(t);break;case"script":i=In(t)}Ue.has(i)||(t=U({rel:"preload",href:e==="image"&&l&&l.imageSrcSet?void 0:t,as:e},l),Ue.set(i,t),n.querySelector(a)!==null||e==="style"&&n.querySelector(ka(i))||e==="script"&&n.querySelector(Wa(i))||(e=n.createElement("link"),kt(e,"link",t),Gt(e),n.head.appendChild(e)))}}function dp(t,e){dl.m(t,e);var l=$n;if(l&&t){var n=e&&typeof e.as=="string"?e.as:"script",a='link[rel="modulepreload"][as="'+_e(n)+'"][href="'+_e(t)+'"]',i=a;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=In(t)}if(!Ue.has(i)&&(t=U({rel:"modulepreload",href:t},e),Ue.set(i,t),l.querySelector(a)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Wa(i)))return}n=l.createElement("link"),kt(n,"link",t),Gt(n),l.head.appendChild(n)}}}function mp(t,e,l){dl.S(t,e,l);var n=$n;if(n&&t){var a=Sn(n).hoistableStyles,i=Fn(t);e=e||"default";var o=a.get(i);if(!o){var h={loading:0,preload:null};if(o=n.querySelector(ka(i)))h.loading=5;else{t=U({rel:"stylesheet",href:t,"data-precedence":e},l),(l=Ue.get(i))&&nr(t,l);var m=o=n.createElement("link");Gt(m),kt(m,"link",t),m._p=new Promise(function(A,M){m.onload=A,m.onerror=M}),m.addEventListener("load",function(){h.loading|=1}),m.addEventListener("error",function(){h.loading|=2}),h.loading|=4,Su(o,e,n)}o={type:"stylesheet",instance:o,count:1,state:h},a.set(i,o)}}}function yp(t,e){dl.X(t,e);var l=$n;if(l&&t){var n=Sn(l).hoistableScripts,a=In(t),i=n.get(a);i||(i=l.querySelector(Wa(a)),i||(t=U({src:t,async:!0},e),(e=Ue.get(a))&&ar(t,e),i=l.createElement("script"),Gt(i),kt(i,"link",t),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(a,i))}}function gp(t,e){dl.M(t,e);var l=$n;if(l&&t){var n=Sn(l).hoistableScripts,a=In(t),i=n.get(a);i||(i=l.querySelector(Wa(a)),i||(t=U({src:t,async:!0,type:"module"},e),(e=Ue.get(a))&&ar(t,e),i=l.createElement("script"),Gt(i),kt(i,"link",t),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(a,i))}}function Ad(t,e,l,n){var a=(a=F.current)?vu(a):null;if(!a)throw Error(s(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(e=Fn(l.href),l=Sn(a).hoistableStyles,n=l.get(e),n||(n={type:"style",instance:null,count:0,state:null},l.set(e,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=Fn(l.href);var i=Sn(a).hoistableStyles,o=i.get(t);if(o||(a=a.ownerDocument||a,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(t,o),(i=a.querySelector(ka(t)))&&!i._p&&(o.instance=i,o.state.loading=5),Ue.has(t)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ue.set(t,l),i||pp(a,t,l,o.state))),e&&n===null)throw Error(s(528,""));return o}if(e&&n!==null)throw Error(s(529,""));return null;case"script":return e=l.async,l=l.src,typeof l=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=In(l),l=Sn(a).hoistableScripts,n=l.get(e),n||(n={type:"script",instance:null,count:0,state:null},l.set(e,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,t))}}function Fn(t){return'href="'+_e(t)+'"'}function ka(t){return'link[rel="stylesheet"]['+t+"]"}function _d(t){return U({},t,{"data-precedence":t.precedence,precedence:null})}function pp(t,e,l,n){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?n.loading=1:(e=t.createElement("link"),n.preload=e,e.addEventListener("load",function(){return n.loading|=1}),e.addEventListener("error",function(){return n.loading|=2}),kt(e,"link",l),Gt(e),t.head.appendChild(e))}function In(t){return'[src="'+_e(t)+'"]'}function Wa(t){return"script[async]"+t}function xd(t,e,l){if(e.count++,e.instance===null)switch(e.type){case"style":var n=t.querySelector('style[data-href~="'+_e(l.href)+'"]');if(n)return e.instance=n,Gt(n),n;var a=U({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return n=(t.ownerDocument||t).createElement("style"),Gt(n),kt(n,"style",a),Su(n,l.precedence,t),e.instance=n;case"stylesheet":a=Fn(l.href);var i=t.querySelector(ka(a));if(i)return e.state.loading|=4,e.instance=i,Gt(i),i;n=_d(l),(a=Ue.get(a))&&nr(n,a),i=(t.ownerDocument||t).createElement("link"),Gt(i);var o=i;return o._p=new Promise(function(h,m){o.onload=h,o.onerror=m}),kt(i,"link",n),e.state.loading|=4,Su(i,l.precedence,t),e.instance=i;case"script":return i=In(l.src),(a=t.querySelector(Wa(i)))?(e.instance=a,Gt(a),a):(n=l,(a=Ue.get(i))&&(n=U({},l),ar(n,a)),t=t.ownerDocument||t,a=t.createElement("script"),Gt(a),kt(a,"link",n),t.head.appendChild(a),e.instance=a);case"void":return null;default:throw Error(s(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(n=e.instance,e.state.loading|=4,Su(n,l.precedence,t));return e.instance}function Su(t,e,l){for(var n=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=n.length?n[n.length-1]:null,i=a,o=0;o<n.length;o++){var h=n[o];if(h.dataset.precedence===e)i=h;else if(i!==a)break}i?i.parentNode.insertBefore(t,i.nextSibling):(e=l.nodeType===9?l.head:l,e.insertBefore(t,e.firstChild))}function nr(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function ar(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var bu=null;function Md(t,e,l){if(bu===null){var n=new Map,a=bu=new Map;a.set(l,n)}else a=bu,n=a.get(l),n||(n=new Map,a.set(l,n));if(n.has(t))return n;for(n.set(t,null),l=l.getElementsByTagName(t),a=0;a<l.length;a++){var i=l[a];if(!(i[fa]||i[Kt]||t==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var o=i.getAttribute(e)||"";o=t+o;var h=n.get(o);h?h.push(i):n.set(o,[i])}}return n}function Cd(t,e,l){t=t.ownerDocument||t,t.head.insertBefore(l,e==="title"?t.querySelector("head > title"):null)}function vp(t,e,l){if(l===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function zd(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Sp(t,e,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=Fn(n.href),i=e.querySelector(ka(a));if(i){e=i._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=Eu.bind(t),e.then(t,t)),l.state.loading|=4,l.instance=i,Gt(i);return}i=e.ownerDocument||e,n=_d(n),(a=Ue.get(a))&&nr(n,a),i=i.createElement("link"),Gt(i);var o=i;o._p=new Promise(function(h,m){o.onload=h,o.onerror=m}),kt(i,"link",n),l.instance=i}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,e),(e=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=Eu.bind(t),e.addEventListener("load",l),e.addEventListener("error",l))}}var ir=0;function bp(t,e){return t.stylesheets&&t.count===0&&Au(t,t.stylesheets),0<t.count||0<t.imgCount?function(l){var n=setTimeout(function(){if(t.stylesheets&&Au(t,t.stylesheets),t.unsuspend){var i=t.unsuspend;t.unsuspend=null,i()}},6e4+e);0<t.imgBytes&&ir===0&&(ir=62500*tp());var a=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Au(t,t.stylesheets),t.unsuspend)){var i=t.unsuspend;t.unsuspend=null,i()}},(t.imgBytes>ir?50:800)+e);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(n),clearTimeout(a)}}:null}function Eu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Au(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Tu=null;function Au(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Tu=new Map,e.forEach(Ep,t),Tu=null,Eu.call(t))}function Ep(t,e){if(!(e.state.loading&4)){var l=Tu.get(t);if(l)var n=l.get(null);else{l=new Map,Tu.set(t,l);for(var a=t.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<a.length;i++){var o=a[i];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(l.set(o.dataset.precedence,o),n=o)}n&&l.set(null,n)}a=e.instance,o=a.getAttribute("data-precedence"),i=l.get(o)||n,i===n&&l.set(null,a),l.set(o,a),this.count++,n=Eu.bind(this),a.addEventListener("load",n),a.addEventListener("error",n),i?i.parentNode.insertBefore(a,i.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(a,t.firstChild)),e.state.loading|=4}}var $a={$$typeof:Ht,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function Tp(t,e,l,n,a,i,o,h,m){this.tag=1,this.containerInfo=t,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=ts(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ts(0),this.hiddenUpdates=ts(null),this.identifierPrefix=n,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=m,this.incompleteTransitions=new Map}function Od(t,e,l,n,a,i,o,h,m,A,M,O){return t=new Tp(t,e,l,o,m,A,M,O,h),e=1,i===!0&&(e|=24),i=ge(3,null,null,e),t.current=i,i.stateNode=t,e=js(),e.refCount++,t.pooledCache=e,e.refCount++,i.memoizedState={element:n,isDehydrated:l,cache:e},Gs(i),t}function Dd(t){return t?(t=On,t):On}function Rd(t,e,l,n,a,i){a=Dd(a),n.context===null?n.context=a:n.pendingContext=a,n=Ml(e),n.payload={element:l},i=i===void 0?null:i,i!==null&&(n.callback=i),l=Cl(t,n,e),l!==null&&(re(l,t,e),za(l,t,e))}function Ud(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<e?l:e}}function ur(t,e){Ud(t,e),(t=t.alternate)&&Ud(t,e)}function wd(t){if(t.tag===13||t.tag===31){var e=tn(t,67108864);e!==null&&re(e,t,67108864),ur(t,67108864)}}function Hd(t){if(t.tag===13||t.tag===31){var e=Ee();e=es(e);var l=tn(t,e);l!==null&&re(l,t,e),ur(t,e)}}var _u=!0;function Ap(t,e,l,n){var a=C.T;C.T=null;var i=w.p;try{w.p=2,sr(t,e,l,n)}finally{w.p=i,C.T=a}}function _p(t,e,l,n){var a=C.T;C.T=null;var i=w.p;try{w.p=8,sr(t,e,l,n)}finally{w.p=i,C.T=a}}function sr(t,e,l,n){if(_u){var a=cr(n);if(a===null)Jc(t,e,n,xu,l),Bd(t,n);else if(Mp(a,t,e,l,n))n.stopPropagation();else if(Bd(t,n),e&4&&-1<xp.indexOf(t)){for(;a!==null;){var i=vn(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var o=Wl(i.pendingLanes);if(o!==0){var h=i;for(h.pendingLanes|=2,h.entangledLanes|=2;o;){var m=1<<31-me(o);h.entanglements[1]|=m,o&=~m}Ze(i),(ut&6)===0&&(su=he()+500,Ka(0))}}break;case 31:case 13:h=tn(i,2),h!==null&&re(h,i,2),ru(),ur(i,2)}if(i=cr(n),i===null&&Jc(t,e,n,xu,l),i===a)break;a=i}a!==null&&n.stopPropagation()}else Jc(t,e,n,null,l)}}function cr(t){return t=os(t),rr(t)}var xu=null;function rr(t){if(xu=null,t=pn(t),t!==null){var e=d(t);if(e===null)t=null;else{var l=e.tag;if(l===13){if(t=y(e),t!==null)return t;t=null}else if(l===31){if(t=p(e),t!==null)return t;t=null}else if(l===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return xu=t,null}function Nd(t){switch(t){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"resize":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"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"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(oy()){case Xr:return 2;case Gr:return 8;case mi:case fy:return 32;case Qr:return 268435456;default:return 32}default:return 32}}var or=!1,jl=null,ql=null,Yl=null,Fa=new Map,Ia=new Map,Xl=[],xp="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 Bd(t,e){switch(t){case"focusin":case"focusout":jl=null;break;case"dragenter":case"dragleave":ql=null;break;case"mouseover":case"mouseout":Yl=null;break;case"pointerover":case"pointerout":Fa.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ia.delete(e.pointerId)}}function Pa(t,e,l,n,a,i){return t===null||t.nativeEvent!==i?(t={blockedOn:e,domEventName:l,eventSystemFlags:n,nativeEvent:i,targetContainers:[a]},e!==null&&(e=vn(e),e!==null&&wd(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,a!==null&&e.indexOf(a)===-1&&e.push(a),t)}function Mp(t,e,l,n,a){switch(e){case"focusin":return jl=Pa(jl,t,e,l,n,a),!0;case"dragenter":return ql=Pa(ql,t,e,l,n,a),!0;case"mouseover":return Yl=Pa(Yl,t,e,l,n,a),!0;case"pointerover":var i=a.pointerId;return Fa.set(i,Pa(Fa.get(i)||null,t,e,l,n,a)),!0;case"gotpointercapture":return i=a.pointerId,Ia.set(i,Pa(Ia.get(i)||null,t,e,l,n,a)),!0}return!1}function Ld(t){var e=pn(t.target);if(e!==null){var l=d(e);if(l!==null){if(e=l.tag,e===13){if(e=y(l),e!==null){t.blockedOn=e,Wr(t.priority,function(){Hd(l)});return}}else if(e===31){if(e=p(l),e!==null){t.blockedOn=e,Wr(t.priority,function(){Hd(l)});return}}else if(e===3&&l.stateNode.current.memoizedState.isDehydrated){t.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Mu(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var l=cr(t.nativeEvent);if(l===null){l=t.nativeEvent;var n=new l.constructor(l.type,l);rs=n,l.target.dispatchEvent(n),rs=null}else return e=vn(l),e!==null&&wd(e),t.blockedOn=l,!1;e.shift()}return!0}function jd(t,e,l){Mu(t)&&l.delete(e)}function Cp(){or=!1,jl!==null&&Mu(jl)&&(jl=null),ql!==null&&Mu(ql)&&(ql=null),Yl!==null&&Mu(Yl)&&(Yl=null),Fa.forEach(jd),Ia.forEach(jd)}function Cu(t,e){t.blockedOn===e&&(t.blockedOn=null,or||(or=!0,c.unstable_scheduleCallback(c.unstable_NormalPriority,Cp)))}var zu=null;function qd(t){zu!==t&&(zu=t,c.unstable_scheduleCallback(c.unstable_NormalPriority,function(){zu===t&&(zu=null);for(var e=0;e<t.length;e+=3){var l=t[e],n=t[e+1],a=t[e+2];if(typeof n!="function"){if(rr(n||l)===null)continue;break}var i=vn(l);i!==null&&(t.splice(e,3),e-=3,cc(i,{pending:!0,data:a,method:l.method,action:n},n,a))}}))}function Pn(t){function e(m){return Cu(m,t)}jl!==null&&Cu(jl,t),ql!==null&&Cu(ql,t),Yl!==null&&Cu(Yl,t),Fa.forEach(e),Ia.forEach(e);for(var l=0;l<Xl.length;l++){var n=Xl[l];n.blockedOn===t&&(n.blockedOn=null)}for(;0<Xl.length&&(l=Xl[0],l.blockedOn===null);)Ld(l),l.blockedOn===null&&Xl.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(n=0;n<l.length;n+=3){var a=l[n],i=l[n+1],o=a[ne]||null;if(typeof i=="function")o||qd(l);else if(o){var h=null;if(i&&i.hasAttribute("formAction")){if(a=i,o=i[ne]||null)h=o.formAction;else if(rr(a)!==null)continue}else h=o.action;typeof h=="function"?l[n+1]=h:(l.splice(n,3),n-=3),qd(l)}}}function Yd(){function t(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(o){return a=o})},focusReset:"manual",scroll:"manual"})}function e(){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",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(l,100),function(){n=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),a!==null&&(a(),a=null)}}}function fr(t){this._internalRoot=t}Ou.prototype.render=fr.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(s(409));var l=e.current,n=Ee();Rd(l,n,t,e,null,null)},Ou.prototype.unmount=fr.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Rd(t.current,2,null,t,null,null),ru(),e[gn]=null}};function Ou(t){this._internalRoot=t}Ou.prototype.unstable_scheduleHydration=function(t){if(t){var e=kr();t={blockedOn:null,target:t,priority:e};for(var l=0;l<Xl.length&&e!==0&&e<Xl[l].priority;l++);Xl.splice(l,0,t),l===0&&Ld(t)}};var Xd=u.version;if(Xd!=="19.2.3")throw Error(s(527,Xd,"19.2.3"));w.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(s(188)):(t=Object.keys(t).join(","),Error(s(268,t)));return t=b(e),t=t!==null?N(t):null,t=t===null?null:t.stateNode,t};var zp={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:C,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Du=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Du.isDisabled&&Du.supportsFiber)try{ca=Du.inject(zp),de=Du}catch{}}return ni.createRoot=function(t,e){if(!f(t))throw Error(s(299));var l=!1,n="",a=kf,i=Wf,o=$f;return e!=null&&(e.unstable_strictMode===!0&&(l=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onUncaughtError!==void 0&&(a=e.onUncaughtError),e.onCaughtError!==void 0&&(i=e.onCaughtError),e.onRecoverableError!==void 0&&(o=e.onRecoverableError)),e=Od(t,1,!1,null,null,l,n,null,a,i,o,Yd),t[gn]=e.current,Zc(t),new fr(e)},ni.hydrateRoot=function(t,e,l){if(!f(t))throw Error(s(299));var n=!1,a="",i=kf,o=Wf,h=$f,m=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&&(o=l.onCaughtError),l.onRecoverableError!==void 0&&(h=l.onRecoverableError),l.formState!==void 0&&(m=l.formState)),e=Od(t,1,!0,e,l??null,n,a,m,i,o,h,Yd),e.context=Dd(null),l=e.current,n=Ee(),n=es(n),a=Ml(n),a.callback=null,Cl(l,a,n),l=n,e.current.lanes=l,oa(e,l),Ze(e),t[gn]=e.current,Zc(t),new Ou(e)},ni.version="19.2.3",ni}var tm;function Qp(){if(tm)return mr.exports;tm=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(u){console.error(u)}}return c(),mr.exports=Gp(),mr.exports}var Kp=Qp();function em(c){return c!==null&&typeof c=="object"&&[null,Object.prototype].includes(Object.getPrototypeOf(c))||Array.isArray(c)}function Tr(c,u,r=new WeakMap){if(Object.is(c,u))return!0;if(typeof c=="function"&&typeof u=="function")return typeof c==typeof u;if(!em(c)||!em(u))return!1;const s=r.get(c);if(s&&s===u)return!0;if(r.set(c,u),Array.isArray(c)||Array.isArray(u)){if(!Array.isArray(c)||!Array.isArray(u)||c.length!==u.length)return!1;for(let y=0;y<c.length;y++)if(!Tr(c[y],u[y],r))return!1;return!0}const f=Object.keys(c),d=Object.keys(u);if(f.length!==d.length)return!1;for(let y=0;y<f.length;y++){const p=f[y];if(!Object.prototype.hasOwnProperty.call(u,p))return!1;const E=c[p],b=u[p];if(!Tr(E,b,r))return!1}return!0}function Vp(c){const u=[],r=(d,y)=>y.reduce((p,E)=>p==null?p:p[E],d),s=(d,y)=>(...p)=>{const E=r(c.current,d),b=E==null?void 0:E[y];if(typeof b=="function")return b.apply(E,p)},f=d=>{if(typeof d=="function"){const y=u[u.length-1],p=u.slice(0,-1);return s(p,y)}if(Array.isArray(d)){const y=u.length,p=new Array(d.length);for(let E=0;E<d.length;E++)u[y]=E,p[E]=f(d[E]);return u.length=y,p}if(d&&typeof d=="object"){const y=u.length,p={};for(const E of Object.keys(d))u[y]=E,p[E]=f(d[E]);return u.length=y,p}return d};return f(c.current)}function Zp(c){const u=kd.useRef(c);u.current=c;const r=kd.useRef(null);return(!r.current||!Tr(r.current.snapshot,c))&&(r.current={snapshot:c,shaped:Vp(u)}),r.current.shaped}const Jp=Object.freeze(["focusComposer","setThreadId","sendUserMessage","setComposerValue","setRuntimeCapabilities","fetchUpdates","sendCustomAction"]);function kp(c){const u=bt.useRef(null),r=Zp(c),s=bt.useMemo(()=>Jp.reduce((y,p)=>(y[p]=(...E)=>{if(!u.current){console.warn("ChatKit element is not mounted");return}return u.current[p](...E)},y),{}),[]),f=bt.useCallback(y=>{u.current=y},[]),d=bt.useMemo(()=>{const y={},p={};for(const[E,b]of Object.entries(r))/^on[A-Z]/.test(E)&&E!=="onClientTool"?p[E]=b:y[E]=b;return{setInstance:f,options:y,handlers:p}},[r,f]);return bt.useMemo(()=>({...s,control:d,ref:u}),[s,d])}class Wp{constructor(){vt(this,"callbacks",new Map)}on(u,r){this.callbacks.has(u)||this.callbacks.set(u,new Set),this.callbacks.get(u).add(r)}emit(u,...r){var f;const s=r[0];(f=this.callbacks.get(u))==null||f.forEach(d=>d(s))}off(u,r){var s;r?(s=this.callbacks.get(u))==null||s.delete(r):this.callbacks.delete(u)}allOff(){this.callbacks.clear()}}async function $p(c,u){const r=c.getReader();let s;for(;!(s=await r.read()).done;)u(s.value)}function Fp(c){let u,r,s,f=!1;return function(y){u===void 0?(u=y,r=0,s=-1):u=Pp(u,y);const p=u.length;let E=0;for(;r<p;){f&&(u[r]===10&&(E=++r),f=!1);let b=-1;for(;r<p&&b===-1;++r)switch(u[r]){case 58:s===-1&&(s=r-E);break;case 13:f=!0;case 10:b=r;break}if(b===-1)break;c(u.subarray(E,b),s),E=r,s=-1}E===p?u=void 0:E!==0&&(u=u.subarray(E),r-=E)}}function Ip(c,u,r){let s=lm();const f=new TextDecoder;return function(y,p){if(y.length===0)r==null||r(s),s=lm();else if(p>0){const E=f.decode(y.subarray(0,p)),b=p+(y[p+1]===32?2:1),N=f.decode(y.subarray(b));switch(E){case"data":s.data=s.data?s.data+`
|
|
50
|
+
`+N:N;break;case"event":s.event=N;break;case"id":c(s.id=N);break;case"retry":const U=parseInt(N,10);isNaN(U)||u(s.retry=U);break}}}}function Pp(c,u){const r=new Uint8Array(c.length+u.length);return r.set(c),r.set(u,c.length),r}function lm(){return{data:"",event:"",id:"",retry:void 0}}var t0=function(c,u){var r={};for(var s in c)Object.prototype.hasOwnProperty.call(c,s)&&u.indexOf(s)<0&&(r[s]=c[s]);if(c!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,s=Object.getOwnPropertySymbols(c);f<s.length;f++)u.indexOf(s[f])<0&&Object.prototype.propertyIsEnumerable.call(c,s[f])&&(r[s[f]]=c[s[f]]);return r};const Ar="text/event-stream",e0=1e3,nm="last-event-id";function l0(c,u){var{signal:r,headers:s,onopen:f,onmessage:d,onclose:y,onerror:p,openWhenHidden:E,fetch:b}=u,N=t0(u,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise((U,W)=>{const st=Object.assign({},s);st.accept||(st.accept=Ar);let Et;function it(){Et.abort(),document.hidden||ee()}E||document.addEventListener("visibilitychange",it);let Mt=e0,Tt=0;function wt(){document.removeEventListener("visibilitychange",it),window.clearTimeout(Tt),Et.abort()}r==null||r.addEventListener("abort",()=>{wt(),U()});const Ht=b??window.fetch,te=f??n0;async function ee(){var Xt;Et=new AbortController;try{const $=await Ht(c,Object.assign(Object.assign({},N),{headers:st,signal:Et.signal}));await te($),await $p($.body,Fp(Ip(Ct=>{Ct?st[nm]=Ct:delete st[nm]},Ct=>{Mt=Ct},d))),y==null||y(),wt(),U()}catch($){if(!Et.signal.aborted)try{const Ct=(Xt=p==null?void 0:p($))!==null&&Xt!==void 0?Xt:Mt;window.clearTimeout(Tt),Tt=window.setTimeout(ee,Ct)}catch(Ct){wt(),W(Ct)}}}ee()})}function n0(c){const u=c.headers.get("content-type");if(!(u!=null&&u.startsWith(Ar)))throw new Error(`Expected content-type to be ${Ar}, Actual: ${u}`)}const aa="__chatkit_error__";class Xu extends Error{constructor(r,s,f){super(r);vt(this,"status");vt(this,"statusText");vt(this,"metadata");this.name="HttpError",this.statusText=s.statusText,this.status=s.status,this.metadata=f}static fromPossibleFrameSafeError(r){if(r instanceof Xu)return r;if(r&&typeof r=="object"&&aa in r&&r[aa]==="HttpError"){const s=r,f=new Xu(s.message,{status:s.status,statusText:s.statusText},s.metadata);return f.stack=s.stack,f}return null}}var Tm;Tm=aa;const jr=class jr{constructor(u,r,s){vt(this,Tm,"HttpError");vt(this,"message");vt(this,"stack");vt(this,"status");vt(this,"statusText");vt(this,"metadata");this.message=u,this.stack=new Error(u).stack,this.status=r.status,this.statusText=r.statusText,this.metadata=s}static fromHttpError(u){return new jr(u.message,{status:u.status,statusText:u.statusText},u.metadata)}};let Gu=jr;const a0=1e3,i0=1e4,u0=5,s0=(c,u=i0,r=a0)=>{const s=Math.min(u,r*2**c);return Math.floor(s*(.5+Math.random()*.5))};class am extends Error{constructor(u){super(),this.cause=u}}const c0=async(c,u)=>{let r=0;const{onopen:s,...f}=u;await l0(c,{...f,onopen:async d=>{var p;if(s==null||s(d),d.ok&&((p=d.headers.get("content-type"))!=null&&p.startsWith("text/event-stream"))){r=0;return}const y=new Gu(`Streaming failed: ${d.statusText}`,d);throw d.status>=400&&d.status<500?y:new am(y)},onerror:d=>{if(d instanceof am){if(r>=u0)throw d.cause;return r+=1,s0(r)}throw d}})};function _m(){const c=globalThis.crypto;if(typeof(c==null?void 0:c.randomUUID)=="function")return c.randomUUID();if(typeof(c==null?void 0:c.getRandomValues)=="function"){const u=new Uint8Array(16);return c.getRandomValues(u),u[6]=u[6]&15|64,u[8]=u[8]&63|128,[...u].map(r=>r.toString(16).padStart(2,"0")).join("").replace(/^(.{8})(.{4})(.{4})(.{4})(.{12})$/,"$1-$2-$3-$4-$5")}return null}function vr(){return _m()??`ck_${Date.now()}_${Math.random().toString(16).slice(2)}`}function r0(c,{channelId:u,expectedOrigin:r,expectedSource:s}){const f=c.data;if(!f||typeof f!="object"||!("__xpaiChatKit"in f)||f.__xpaiChatKit!==!0||r!=="*"&&c.origin!==r)return!1;if(c.source===s)return!0;const d=u==null?void 0:u.trim();return d?"channelId"in f&&f.channelId===d:!1}let o0=class xm extends Error{constructor(r){super(r);vt(this,"_name");this.name="IntegrationError",this._name=this.name}static fromPossibleFrameSafeError(r){if(r&&typeof r=="object"&&aa in r&&r[aa]==="IntegrationError"){const s=r,f=new xm(s.message);return f.stack=s.stack,f}return null}};var Am;Am=aa;class f0{constructor(u){vt(this,Am,"IntegrationError");vt(this,"message");vt(this,"stack");this.message=u,this.stack=new Error(u).stack}}class h0{constructor({handlers:u,target:r,targetOrigin:s,channelId:f,fetch:d=window.fetch}){vt(this,"targetOrigin");vt(this,"target");vt(this,"channelId");vt(this,"commandHandlers");vt(this,"_fetch");vt(this,"emitter",new Wp);vt(this,"handlers",new Map);vt(this,"fetchEventSourceHandlers",new Map);vt(this,"abortControllers",new Map);vt(this,"commands",new Proxy({},{get:(u,r)=>(s,f)=>new Promise((d,y)=>{const p=vr();this.handlers.set(p,{resolve:d,reject:y,stack:new Error().stack||""}),this.sendMessage({type:"command",nonce:p,command:`on${r.charAt(0).toUpperCase()}${r.slice(1)}`,data:s},f)})}));vt(this,"handleMessage",async u=>{var s,f,d,y;if(!r0(u,{channelId:this.channelId,expectedOrigin:this.targetOrigin,expectedSource:this.target()}))return;const r=u.data;switch(r.type){case"event":{this.emitter.emit(r.event,r.data);break}case"fetch":{try{if(r.formData){const N=new FormData;for(const[U,W]of Object.entries(r.formData))N.append(U,W);r.params.body=N}const p=new AbortController;this.abortControllers.set(r.nonce,p),r.params.signal=p.signal;const E=await this._fetch(r.url,r.params);if(!E.ok){const N=await E.json().then(U=>U.message||E.statusText).catch(()=>E.statusText);throw new Gu(N,E)}const b=await E.json().catch(()=>({}));this.sendMessage({type:"response",response:b,nonce:r.nonce})}catch(p){this.sendMessage({type:"response",error:p,nonce:r.nonce})}break}case"fetchEventSource":{try{const p=new AbortController;this.abortControllers.set(r.nonce,p),await c0(r.url,{...r.params,signal:p.signal,fetch:this._fetch,onmessage:E=>{this.sendMessage({type:"fetchEventSourceMessage",message:E,nonce:r.nonce})}}),this.sendMessage({type:"response",response:void 0,nonce:r.nonce})}catch(p){this.sendMessage({type:"response",error:p,nonce:r.nonce})}break}case"command":{if(!this.canReceiveCommand(r.command)){this.sendMessage({type:"response",error:new f0(`Command ${r.command} not supported`),nonce:r.nonce});return}try{const p=await((f=(s=this.commandHandlers)[r.command])==null?void 0:f.call(s,r.data));this.sendMessage({type:"response",response:p,nonce:r.nonce})}catch(p){this.sendMessage({type:"response",error:p,nonce:r.nonce})}break}case"response":{const p=this.handlers.get(r.nonce);if(!p){console.error("No handler found for nonce",r.nonce);return}if(r.error){const E=o0.fromPossibleFrameSafeError(r.error),b=Xu.fromPossibleFrameSafeError(r.error);E?(E.stack=p.stack,p.reject(E)):b?p.reject(b):p.reject(r.error)}else p.resolve(r.response);this.handlers.delete(r.nonce);break}case"fetchEventSourceMessage":{if(!this.fetchEventSourceHandlers.get(r.nonce)){console.error("No handler found for nonce",r.nonce);return}(y=(d=this.fetchEventSourceHandlers.get(r.nonce))==null?void 0:d.onmessage)==null||y.call(d,r.message);break}case"abortSignal":{const p=this.abortControllers.get(r.nonce);p&&(p.abort(r.reason),this.abortControllers.delete(r.nonce));break}}});this.commandHandlers=u,this.target=r,this.targetOrigin=s,this.channelId=(f==null?void 0:f.trim())||void 0,this._fetch=((...y)=>d(...y))}setTargetOrigin(u){this.targetOrigin=u}sendMessage(u,r){var f;const s={__xpaiChatKit:!0,...this.channelId?{channelId:this.channelId}:{},...u};(f=this.target())==null||f.postMessage(s,this.targetOrigin,r)}connect(){window.addEventListener("message",this.handleMessage)}disconnect(){window.removeEventListener("message",this.handleMessage)}fetch(u,r){return new Promise((s,f)=>{const d=vr();this.handlers.set(d,{resolve:s,reject:f,stack:new Error().stack||""});let y;if(r.body instanceof FormData){y={};for(const[p,E]of r.body.entries())y[p]=E;r.body=void 0}r.signal&&(r.signal.addEventListener("abort",()=>{var p;this.sendMessage({type:"abortSignal",nonce:d,reason:(p=r.signal)==null?void 0:p.reason})}),r.signal=void 0),this.sendMessage({type:"fetch",nonce:d,params:r,formData:y,url:u})})}fetchEventSource(u,r){return new Promise((s,f)=>{const{onmessage:d,signal:y,...p}=r,E=vr();this.handlers.set(E,{resolve:s,reject:f,stack:new Error().stack||""}),this.fetchEventSourceHandlers.set(E,{onmessage:d}),y&&y.addEventListener("abort",()=>{this.sendMessage({type:"abortSignal",nonce:E,reason:y.reason})}),this.sendMessage({type:"fetchEventSource",nonce:E,params:p,url:u})})}emit(...[u,r,s]){this.sendMessage({type:"event",event:u,data:r},s)}on(...[u,r]){this.emitter.on(u,r)}destroy(){window.removeEventListener("message",this.handleMessage),this.emitter.allOff(),this.handlers.clear()}}const d0=c=>btoa(c).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),m0=c=>{if(c===void 0)throw new TypeError("encodeBase64: `undefined` cannot be encoded to valid JSON. Pass null instead.");const u=JSON.stringify(c),r=new TextEncoder().encode(u);let s="";for(const f of r)s+=String.fromCharCode(f);return d0(s)};class oe extends Error{}function y0(c){return c.message}const g0=["command.setOptions","command.sendUserMessage","command.setComposerValue","command.setRuntimeCapabilities","command.setThreadId","command.focusComposer","command.fetchUpdates","command.sendCustomAction","command.showHistory","command.hideHistory","event.ready","event.error","event.log","event.response.start","event.response.end","event.response.stop","event.thread.change","event.project.change","event.connectors.change","event.tool.change","event.thread.load.start","event.thread.load.end","event.deeplink","event.effect","error.StreamError","error.StreamEventParsingError","error.WidgetItemError","error.InitialThreadLoadError","error.FileAttachmentError","error.HistoryViewError","error.FatalAppError","error.IntegrationError","error.EntitySearchError","error.DomainVerificationRequestError","backend.threads.get_by_id","backend.threads.list","backend.threads.update","backend.threads.delete","backend.threads.create","backend.threads.add_user_message","backend.threads.add_client_tool_output","backend.threads.retry_after_item","backend.threads.custom_action","backend.attachments.create","backend.attachments.get_preview","backend.attachments.delete","backend.items.list","backend.items.feedback","thread.item.generated_image","thread.item.user_message","thread.item.assistant_message","thread.item.client_tool_call","thread.item.widget","thread.item.task","thread.item.workflow","thread.item.end_of_turn","thread.item.image_generation","widget.Basic","widget.Card","widget.ListView","widget.ListViewItem","widget.Badge","widget.Box","widget.Row","widget.Col","widget.Button","widget.Caption","widget.Chart","widget.Checkbox","widget.DatePicker","widget.Divider","widget.Form","widget.Icon","widget.Image","widget.Input","widget.Label","widget.Markdown","widget.RadioGroup","widget.Select","widget.Spacer","widget.Text","widget.Textarea","widget.Title","widget.Transition"],p0=["command.shareThread","command.setTrainingOptOut","event.thread.restore","event.message.share","event.image.download","event.history.open","event.history.close","event.log.chatgpt","error.HttpError","error.NetworkError","error.UnhandledError","error.UnhandledPromiseRejectionError","error.StreamEventHandlingError","error.StreamStopError","error.ThreadRenderingError","error.IntlError","error.AppError","backend.threads.stop","backend.threads.share","backend.threads.create_from_shared","backend.threads.init","backend.attachments.process","widget.CardCarousel","widget.Favicon","widget.CardLinkItem","widget.Map"],v0={chatkit:{allow:[...g0,"thread.item.image_generation"],deny:p0}},im=c=>{const u=v0[c],r=new Set(u.allow);for(const b of u.deny??[])r.delete(b);const s=new Set,f=new Set,d=new Set,y=new Set,p=new Set,E=new Set;for(const b of r){if(b.startsWith("command.")){s.add(b.slice(8));continue}if(b.startsWith("event.")){f.add(b.slice(6));continue}if(b.startsWith("backend.")){d.add(b.slice(8));continue}if(b.startsWith("thread.item.")&&y.add(b.slice(12)),b.startsWith("error.")){p.add(b.slice(6));continue}if(b.startsWith("widget.")){E.add(b.slice(7));continue}}return{commands:s,events:f,backend:d,threadItems:y,errors:p,widgets:E}};class S0 extends h0{canReceiveCommand(u){return!0}}const b0=["idle","running-right","running-left","waving","jumping","failed","waiting","running","review"],ai={columns:8,rows:9,cellWidth:192,cellHeight:208,animations:{idle:{row:0,frames:6,frameDurations:[280,110,110,140,140,320]},"running-right":{row:1,frames:8,frameDurations:[120,120,120,120,120,120,120,220]},"running-left":{row:2,frames:8,frameDurations:[120,120,120,120,120,120,120,220]},waving:{row:3,frames:4,frameDurations:[140,140,140,280]},jumping:{row:4,frames:5,frameDurations:[140,140,140,140,280]},failed:{row:5,frames:8,frameDurations:[140,140,140,140,140,140,140,240]},waiting:{row:6,frames:6,frameDurations:[150,150,150,150,150,260]},running:{row:7,frames:6,frameDurations:[120,120,120,120,120,220]},review:{row:8,frames:6,frameDurations:[150,150,150,150,150,280]}}},wu={top:0,right:0,bottom:0,left:0},um="chatkit:pet:position:v1",E0="/pets/boba/spritesheet.webp",_r={type:"sprite-atlas",src:E0},sm={pin:"bottom-right",draggable:!0,scale:.25,persist:!0,zIndex:40};function T0(c,u){return{row:(u==null?void 0:u.row)??c.row,frames:(u==null?void 0:u.frames)??c.frames,frameDurations:u!=null&&u.frameDurations&&u.frameDurations.length>0?u.frameDurations:c.frameDurations}}function A0(c){var r;const u={};for(const s of b0)u[s]=T0(ai.animations[s],(r=c==null?void 0:c.animations)==null?void 0:r[s]);return{columns:(c==null?void 0:c.columns)??ai.columns,rows:(c==null?void 0:c.rows)??ai.rows,cellWidth:(c==null?void 0:c.cellWidth)??ai.cellWidth,cellHeight:(c==null?void 0:c.cellHeight)??ai.cellHeight,animations:u}}function _0(c){return c&&c.src?c:_r}function fi(c){return c?c===!0?{character:_r,position:sm,behavior:"auto",ariaLabel:"Animated pet",imageRendering:"auto"}:c.enabled===!1?null:{character:_0(c.character),position:{...sm,...c.position},behavior:c.behavior??"auto",ariaLabel:c.ariaLabel??"Animated pet",imageRendering:c.imageRendering??"auto"}:null}function x0(c){return c.src?{kind:"atlas",src:c.src,atlas:A0(c.atlas)}:null}function Sr(c){return typeof c=="number"?{top:c,right:c,bottom:c,left:c}:{top:(c==null?void 0:c.top)??wu.top,right:(c==null?void 0:c.right)??wu.right,bottom:(c==null?void 0:c.bottom)??wu.bottom,left:(c==null?void 0:c.left)??wu.left}}function we(c,u,r,s){const f=s.left,d=s.top,y=Math.max(f,r.width-u.width-s.right),p=Math.max(d,r.height-u.height-s.bottom);return{x:Math.min(y,Math.max(f,c.x)),y:Math.min(p,Math.max(d,c.y))}}function M0(c,u,r,s){const f=(r.width-u.width)/2,d=(r.height-u.height)/2,y=r.width-u.width-s.right,p=r.height-u.height-s.bottom;switch(c){case"top-left":return we({x:s.left,y:s.top},u,r,s);case"top":return we({x:f,y:s.top},u,r,s);case"top-right":return we({x:y,y:s.top},u,r,s);case"left":return we({x:s.left,y:d},u,r,s);case"center":return we({x:f,y:d},u,r,s);case"right":return we({x:y,y:d},u,r,s);case"bottom-left":return we({x:s.left,y:p},u,r,s);case"bottom":return we({x:f,y:p},u,r,s);case"bottom-right":default:return we({x:y,y:p},u,r,s)}}const xr=(c,u=new WeakSet)=>{if(typeof c=="function")return"[ChatKitMethod]";if(typeof c!="object"||c===null||u.has(c))return c;if(u.add(c),Array.isArray(c))return c.map(s=>xr(s,u));const r={};for(const[s,f]of Object.entries(c))typeof f!="function"?r[s]=xr(f,u):r[s]="[ChatKitMethod]";return r},Hu=2,C0=.5,z0=1.5,O0=3,D0=2e3,cm=12,R0=320,Je=12,ea=8,U0='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',rm={"en-US":{closePetMenuItem:"Close pet",hideMessage:"Hide message",expandMessage:"Expand message",collapseMessage:"Collapse message",restoreMessage:"Show message",replyButton:"Reply",replyPlaceholder:"Reply...",sendButton:"Send",sendingButton:"Sending...",sendFailed:"Failed to send"},"zh-CN":{closePetMenuItem:"关闭宠物",hideMessage:"隐藏消息",expandMessage:"展开消息",collapseMessage:"收起消息",restoreMessage:"显示消息",replyButton:"回复",replyPlaceholder:"输入回复...",sendButton:"发送",sendingButton:"发送中...",sendFailed:"发送失败"}};function Nu(c){c.stopPropagation()}function la(){const c=window.visualViewport;return{width:(c==null?void 0:c.width)||window.innerWidth||320,height:(c==null?void 0:c.height)||window.innerHeight||480}}function w0(c,u){if(!u)return null;try{const r=window.localStorage.getItem(c);if(!r)return null;const s=JSON.parse(r);return!s||typeof s!="object"||typeof s.x!="number"||typeof s.y!="number"?null:{x:s.x,y:s.y}}catch{return null}}function H0(c,u,r){if(u)try{window.localStorage.setItem(c,JSON.stringify(r))}catch{}}function N0(c){return c.replace(/["\\]/g,"\\$&")}function om(c){return Math.max(.1,c)*C0}function Ql(c,u,r){return Math.min(r,Math.max(u,c))}function B0(){if(typeof window<"u")try{const c=window.localStorage.getItem("chatkit:locale");if(c)return c}catch{}return typeof navigator<"u"?navigator.language:null}function fm(c){const u=(c??B0()??"").trim().toLowerCase();return u==="zh-cn"||u==="zh-hans"||u.startsWith("zh")?"zh-CN":"en-US"}function L0(c){switch(c){case"compact":return{padding:"8px 10px",gap:6,marginTop:3,toggleSize:30,actionSize:22};case"spacious":return{padding:"14px 16px",gap:10,marginTop:6,toggleSize:38,actionSize:28};case"normal":default:return{padding:"12px 14px",gap:8,marginTop:4,toggleSize:34,actionSize:26}}}function j0(c){switch(c){case"pill":return 24;case"round":return 16;case"sharp":return 0;case"soft":default:return 12}}function ii(c){var p,E;const u=typeof c=="string"?null:c,r=((p=u==null?void 0:u.typography)==null?void 0:p.baseSize)??16,s=(u==null?void 0:u.density)??"normal",f=s==="compact"?-1:s==="spacious"?1:0,d=Ql(r-2+f,11,17);return{...L0(s),bodySize:d,titleSize:d+1,iconSize:Ql(d+2,13,19),radius:j0(u==null?void 0:u.radius),fontFamily:((E=u==null?void 0:u.typography)==null?void 0:E.fontFamily)??U0}}function q0(c){return c==="idle"||c==="running-right"||c==="running-left"||c==="waving"||c==="jumping"||c==="failed"||c==="waiting"||c==="running"||c==="review"}function Y0(c){if(!c||typeof c!="object"||Array.isArray(c))return null;const u=c;return q0(u.state)?{state:u.state}:null}function X0(c){if(!c||typeof c!="object"||Array.isArray(c))return null;const u=c;return u.pet===null||typeof u.pet=="boolean"?{pet:u.pet}:u.pet&&typeof u.pet=="object"&&!Array.isArray(u.pet)?{pet:u.pet}:null}function G0(c){return c==="running"||c==="completed"||c==="failed"}function hm(c){return c?[c.threadId,c.messageId||c.updatedAt||c.message].join(":"):null}function dm(c){return c?[c.threadId,c.messageId??""].join(":"):null}function Q0(c){if(c===null)return{summary:null};if(!c||typeof c!="object"||Array.isArray(c))return null;const u=c;return typeof u.threadId!="string"||!u.threadId.trim()||typeof u.title!="string"||!u.title.trim()||typeof u.message!="string"||!u.message.trim()||!G0(u.status)?null:{summary:{threadId:u.threadId,title:u.title,message:u.message,status:u.status,...typeof u.messageId=="string"&&u.messageId.trim()?{messageId:u.messageId}:{},...typeof u.updatedAt=="string"&&u.updatedAt.trim()?{updatedAt:u.updatedAt}:{}}}}function K0(c){if(!c||typeof c!="object"||Array.isArray(c))return null;const u=c;return u.name!=="thread.summary"?null:Q0(u.data??null)}class V0{constructor(u,r){this.overlayElement=null,this.petElement=null,this.contextMenuElement=null,this.summaryElement=null,this.summaryToggleElement=null,this.mediaElement=null,this.options=null,this.theme=null,this.resolved=null,this.summary=null,this.summaryRenderKey=null,this.dismissedSummaryKey=null,this.isSummaryCollapsed=!1,this.isSummaryExpanded=!1,this.isSummaryHovering=!1,this.isReplyOpen=!1,this.isReplySubmitting=!1,this.replyError=null,this.replyDraft="",this.replyInputElement=null,this.copyLocale=fm(),this.copy=rm[this.copyLocale],this.currentState="waiting",this.lastAutoState="waiting",this.transient=null,this.position=null,this.dragPosition=null,this.dragOffset={x:0,y:0},this.lastDragPosition=null,this.lastDragClientX=null,this.dragAnimation=null,this.activePointerId=null,this.isDragging=!1,this.isHovering=!1,this.movedDuringDrag=!1,this.prefersReducedMotion=!1,this.frame=0,this.completed=!1,this.activeAnimationName=null,this.activeAnimationMode=null,this.frameTimer=null,this.restingDelayTimer=null,this.mediaQuery=null,this.connected=!1,this.handleViewportChange=()=>{this.closeContextMenu(),this.render()},this.handleReducedMotionChange=()=>{var s;this.prefersReducedMotion=!!((s=this.mediaQuery)!=null&&s.matches),this.prefersReducedMotion&&(this.transient=null),this.render()},this.handlePointerEnter=()=>{this.clearRestingDelayTimer(),this.isHovering=!0,this.rescheduleAnimation()},this.handlePointerLeave=()=>{this.isDragging||this.enterRestingAfterDelay()},this.handleContextMenu=s=>{s.preventDefault(),s.stopPropagation(),this.openContextMenu({x:s.clientX,y:s.clientY})},this.handleContextMenuEvent=s=>{s.preventDefault(),s.stopPropagation()},this.handleContextMenuOutsidePointerDown=s=>{const f=this.contextMenuElement;f&&s.composedPath().includes(f)||this.closeContextMenu()},this.handleContextMenuKeyDown=s=>{s.key==="Escape"&&(s.preventDefault(),this.closeContextMenu())},this.handleClosePetMenuItemClick=s=>{var f;s.preventDefault(),s.stopPropagation(),this.closeContextMenu(),(f=this.onClose)==null||f.call(this)},this.handleSummaryPointerEnter=()=>{this.isSummaryHovering=!0,this.render()},this.handleSummaryPointerLeave=()=>{this.isSummaryHovering=!1,this.isReplyOpen||this.render()},this.handleSummaryClick=()=>{var f,d;const s=(f=this.summary)==null?void 0:f.threadId.trim();s&&((d=this.onThreadSummaryActivate)==null||d.call(this,s))},this.handleSummaryDelete=()=>{const s=hm(this.summary);s&&(this.dismissedSummaryKey=s),this.isSummaryCollapsed=!1,this.isReplyOpen=!1,this.replyDraft="",this.replyError=null,this.removeSummaryElements()},this.handleSummaryCollapseToggle=()=>{this.isSummaryCollapsed=!this.isSummaryCollapsed,this.isSummaryExpanded=!1,this.isReplyOpen=!1,this.replyError=null,this.render()},this.handleSummaryExpandToggle=()=>{this.isSummaryExpanded=!this.isSummaryExpanded,this.render()},this.handleReplyOpen=()=>{this.isReplyOpen=!0,this.replyError=null,this.render()},this.handleReplyInput=s=>{const f=s.currentTarget;f instanceof HTMLInputElement&&(this.replyDraft=f.value,this.replyError=null)},this.handleReplySubmit=s=>{s.preventDefault(),this.submitReply()},this.handleReplyKeyDown=s=>{s.key==="Escape"&&(s.preventDefault(),this.isReplyOpen=!1,this.replyError=null,this.render())},this.handlePointerDown=s=>{var y,p;if(s.button!==0||s.ctrlKey||this.isDragging||(this.closeContextMenu(),!((y=this.options)!=null&&y.position.draggable)))return;s.preventDefault();const f=(p=this.petElement)==null?void 0:p.getBoundingClientRect();if(!f)return;const d={x:f.left,y:f.top};this.dragOffset={x:s.clientX-f.left,y:s.clientY-f.top},this.lastDragPosition=d,this.lastDragClientX=s.clientX,this.dragAnimation=null,this.movedDuringDrag=!1,this.dragPosition=d,this.isDragging=!0,this.activePointerId=s.pointerId,this.clearRestingDelayTimer(),this.isHovering=!0,this.captureActivePointer(),this.installDragListeners(),this.rescheduleAnimation()},this.handlePointerMove=s=>{if(!this.isActiveDragPointer(s))return;const f=this.getNextDragPosition(s),d=this.lastDragPosition;if(d&&(Math.abs(d.x-f.x)>Hu||Math.abs(d.y-f.y)>Hu)&&(this.movedDuringDrag=!0),this.lastDragClientX!==null){const y=s.clientX-this.lastDragClientX;y>Hu?this.dragAnimation="running-right":y<-Hu&&(this.dragAnimation="running-left")}this.lastDragClientX=s.clientX,this.lastDragPosition=f,this.dragPosition=f,this.render()},this.handlePointerUp=s=>{if(!this.isActiveDragPointer(s))return;const f=this.lastDragPosition??this.getNextDragPosition(s);this.finishDrag(f,s)},this.handleLostPointerCapture=s=>{if(!this.isActiveDragPointer(s))return;const f=this.lastDragPosition??this.getNextDragPosition(s);this.finishDrag(f,s)},this.handleClick=()=>{var s;this.movedDuringDrag||((s=this.onActivate)==null||s.call(this),!this.prefersReducedMotion&&(this.transient={name:"waving"},this.render()))},this.root=u,this.onActivate=r==null?void 0:r.onActivate,this.onClose=r==null?void 0:r.onClose,this.onReply=r==null?void 0:r.onReply,this.onThreadSummaryActivate=r==null?void 0:r.onThreadSummaryActivate,this.connect()}connect(){this.connected||(this.connected=!0,this.installViewportListeners(),this.installReducedMotionListener(),this.render())}setOptions(u,r){this.closeContextMenu();const s=fi(u);if(this.options=s,this.theme=r??null,!s){this.isDragging=!1,this.isHovering=!1,this.position=null,this.dragPosition=null,this.dragAnimation=null,this.lastDragPosition=null,this.lastDragClientX=null,this.transient=null,this.resolved=null,this.clearRestingDelayTimer(),this.removeDragListeners(),this.removeOverlay();return}this.position=w0(um,s.position.persist),s.behavior==="auto"&&!this.prefersReducedMotion&&(this.transient={name:"waving"}),this.resolveCharacter(),this.render()}setState(u){var s;const r=this.lastAutoState;this.lastAutoState=u,this.currentState=u,((s=this.options)==null?void 0:s.behavior)==="auto"&&!this.prefersReducedMotion&&u==="idle"&&(r==="running"||r==="review")&&!this.transient?this.transient={name:"jumping"}:u!=="idle"&&(this.transient=null),this.render()}setLocale(u){const r=fm(u);r!==this.copyLocale&&(this.copyLocale=r,this.copy=rm[r],this.summaryRenderKey=null,this.closeContextMenu(),this.render())}setThreadSummary(u){const r=dm(this.summary),s=dm(u);if(this.summary=u,!u){this.isSummaryCollapsed=!1,this.isSummaryExpanded=!1,this.isSummaryHovering=!1,this.isReplyOpen=!1,this.isReplySubmitting=!1,this.replyError=null,this.replyDraft="",this.summaryRenderKey=null,this.removeSummaryElements();return}r!==s&&(this.isSummaryCollapsed=!1,this.isSummaryExpanded=!1,this.isSummaryHovering=!1,this.isReplyOpen=!1,this.isReplySubmitting=!1,this.replyError=null,this.replyDraft=""),this.render()}setThreadSummaryStatus(u){!this.summary||this.summary.status===u||(this.summary={...this.summary,status:u},this.render())}destroy(){var u,r,s,f;this.connected&&(this.connected=!1,this.clearRestingDelayTimer(),this.clearTimers(),this.removeDragListeners(),this.removeOverlay(),window.removeEventListener("resize",this.handleViewportChange),(u=window.visualViewport)==null||u.removeEventListener("resize",this.handleViewportChange),(r=window.visualViewport)==null||r.removeEventListener("scroll",this.handleViewportChange),(f=(s=this.mediaQuery)==null?void 0:s.removeEventListener)==null||f.call(s,"change",this.handleReducedMotionChange),this.mediaQuery=null)}installViewportListeners(){var u,r;window.addEventListener("resize",this.handleViewportChange),(u=window.visualViewport)==null||u.addEventListener("resize",this.handleViewportChange),(r=window.visualViewport)==null||r.addEventListener("scroll",this.handleViewportChange)}installReducedMotionListener(){var u,r;window.matchMedia&&(this.mediaQuery=window.matchMedia("(prefers-reduced-motion: reduce)"),this.prefersReducedMotion=this.mediaQuery.matches,(r=(u=this.mediaQuery).addEventListener)==null||r.call(u,"change",this.handleReducedMotionChange))}resolveCharacter(){if(!this.options){this.resolved=null;return}const u=this.options.character;this.resolved=x0(u)}ensureOverlay(){if(this.overlayElement&&this.petElement)return;const u=document.createElement("div");u.setAttribute("data-chatkit-host-pet-layer",""),u.style.position="fixed",u.style.inset="0",u.style.pointerEvents="none",u.style.overflow="visible";const r=document.createElement("style");r.textContent=`
|
|
51
|
+
@keyframes chatkit-pet-summary-spin {
|
|
52
|
+
to { transform: rotate(360deg); }
|
|
53
|
+
}
|
|
54
|
+
`;const s=document.createElement("div");s.setAttribute("data-chatkit-host-pet",""),s.style.position="absolute",s.style.top="0",s.style.left="0",s.style.pointerEvents="auto",s.style.touchAction="none",s.style.userSelect="none",s.style.willChange="transform",s.addEventListener("pointerenter",this.handlePointerEnter),s.addEventListener("pointerleave",this.handlePointerLeave),s.addEventListener("pointerdown",this.handlePointerDown),s.addEventListener("lostpointercapture",this.handleLostPointerCapture),s.addEventListener("contextmenu",this.handleContextMenu),s.addEventListener("click",this.handleClick),u.append(r,s),this.root.append(u),this.overlayElement=u,this.petElement=s}removeOverlay(){var u;this.cancelActiveDrag(),this.clearRestingDelayTimer(),this.clearTimers(),this.closeContextMenu(),this.petElement&&(this.petElement.removeEventListener("pointerenter",this.handlePointerEnter),this.petElement.removeEventListener("pointerleave",this.handlePointerLeave),this.petElement.removeEventListener("pointerdown",this.handlePointerDown),this.petElement.removeEventListener("lostpointercapture",this.handleLostPointerCapture),this.petElement.removeEventListener("contextmenu",this.handleContextMenu),this.petElement.removeEventListener("click",this.handleClick)),this.isHovering=!1,this.removeSummaryElements(),(u=this.overlayElement)==null||u.remove(),this.overlayElement=null,this.petElement=null,this.mediaElement=null}removeSummaryElements(){var u,r;(u=this.summaryElement)==null||u.remove(),(r=this.summaryToggleElement)==null||r.remove(),this.summaryElement=null,this.summaryToggleElement=null,this.replyInputElement=null,this.summaryRenderKey=null}getSize(){if(!this.options||!this.resolved)return{width:0,height:0};const u=om(this.options.position.scale),r={width:this.resolved.atlas.cellWidth,height:this.resolved.atlas.cellHeight};return{width:r.width*u,height:r.height*u}}getCurrentPosition(u){const r=this.options;if(!r)return{x:0,y:0};const s=la(),f=Sr(r.position.boundsPadding),d=r.position.pin===void 0?"bottom-right":r.position.pin,y=d?M0(d,u,s,f):null;return we(this.dragPosition??this.position??y??{x:f.left,y:f.top},u,s,f)}persistPosition(u){if(!this.options)return;const r=this.getSize(),s=we(u,r,la(),Sr(this.options.position.boundsPadding));this.position=s,H0(um,this.options.position.persist,s)}getActiveAnimationName(){return this.options?this.isDragging?this.dragAnimation??"running":this.transient?this.transient.name:this.options.behavior==="manual"?"idle":this.currentState:"idle"}getActiveAnimationMode(){return this.isDragging?"loop":this.transient?"once":"loop"}resetAnimationIfNeeded(u,r){this.activeAnimationName===u&&this.activeAnimationMode===r||(this.clearTimers(),this.activeAnimationName=u,this.activeAnimationMode=r,this.frame=0,this.completed=!1)}render(){if(!this.options||!this.resolved){this.clearTimers(),this.petElement&&this.petElement.replaceChildren(),this.removeSummaryElements(),this.mediaElement=null,this.activeAnimationName=null,this.activeAnimationMode=null,this.frame=0,this.completed=!1;return}this.ensureOverlay();const u=this.overlayElement,r=this.petElement;if(!u||!r)return;const s=this.getSize(),f=this.getCurrentPosition(s),d=this.getActiveAnimationName(),y=this.getActiveAnimationMode();this.resetAnimationIfNeeded(d,y),u.style.zIndex=String(this.options.position.zIndex),r.style.width=`${s.width}px`,r.style.height=`${s.height}px`,r.style.transform=`translate3d(${f.x}px, ${f.y}px, 0)`,r.style.cursor=this.options.position.draggable?this.isDragging?"grabbing":"grab":"default",r.dataset.petAnimation=d,r.setAttribute("aria-label",this.options.ariaLabel),r.setAttribute("role","img"),this.renderAtlas(d,y),this.renderThreadSummary(f,s),this.scheduleNextFrame(d,y)}renderThreadSummary(u,r){var y,p,E;const s=this.summary,f=hm(s);if(!s||!f||this.dismissedSummaryKey===f){this.removeSummaryElements();return}if(this.isSummaryCollapsed){this.renderCollapsedSummary(u,r);return}const d=[this.copyLocale,this.isSummaryExpanded?"expanded":"compact",this.isSummaryHovering?"hover":"rest",this.isReplyOpen?"reply":"closed",this.isReplySubmitting?"submitting":"ready",this.replyError??""].join("|");(!this.summaryElement||this.summaryRenderKey!==d)&&((y=this.summaryElement)==null||y.remove(),(p=this.summaryToggleElement)==null||p.remove(),this.summaryElement=this.createSummaryBubble(s),this.summaryToggleElement=this.createSummaryToggleButton("v"),(E=this.overlayElement)==null||E.append(this.summaryElement,this.summaryToggleElement),this.summaryRenderKey=d,this.isReplyOpen&&!this.isReplySubmitting&&window.setTimeout(()=>{var b;return(b=this.replyInputElement)==null?void 0:b.focus()},0)),this.updateSummaryBubbleContent(s),this.positionSummaryBubble(u,r)}renderCollapsedSummary(u,r){var s,f;(s=this.summaryElement)==null||s.remove(),this.summaryElement=null,this.summaryRenderKey=null,this.summaryToggleElement||(this.summaryToggleElement=this.createSummaryToggleButton("1"),(f=this.overlayElement)==null||f.append(this.summaryToggleElement)),this.summaryToggleElement.textContent="1",this.positionSummaryToggleBadge(u,r)}positionSummaryToggleBadge(u,r){const s=this.summaryToggleElement;if(!s)return;const f=la(),d=ii(this.theme).toggleSize,y=Ql(u.x+r.width-d*.35,Je,f.width-d-Je),p=Ql(u.y-d*.35,Je,f.height-d-Je);s.style.width=`${d}px`,s.style.height=`${d}px`,s.style.transform=`translate3d(${y}px, ${p}px, 0)`,s.style.borderRadius="999px"}positionSummaryBubble(u,r){const s=this.summaryElement,f=this.summaryToggleElement;if(!s||!f)return;const d=la(),y=Math.min(R0,d.width-Je*2);s.style.width=`${y}px`;const p=s.offsetHeight||96,E=u.y-p-cm,N=E>=Je?E:Ql(u.y+r.height+cm,Je,d.height-p-Je),U=Ql(u.x+r.width/2-y/2,Je,d.width-y-Je);s.style.transform=`translate3d(${U}px, ${N}px, 0)`,this.positionSummaryToggleBadge(u,r)}createSummaryBubble(u){const r=this.isSummaryHovering&&!this.isReplyOpen,s=ii(this.theme),f=document.createElement("div");f.setAttribute("data-chatkit-pet-summary",""),f.addEventListener("pointerenter",this.handleSummaryPointerEnter),f.addEventListener("pointerleave",this.handleSummaryPointerLeave),f.addEventListener("click",this.handleSummaryClick),f.style.position="absolute",f.style.top="0",f.style.left="0",f.style.boxSizing="border-box",f.style.pointerEvents="auto",f.style.padding=s.padding,f.style.border="1px solid rgba(148, 163, 184, 0.22)",f.style.borderRadius=`${s.radius}px`,f.style.background="rgba(255, 255, 255, 0.94)",f.style.color="#1f2937",f.style.boxShadow="0 8px 24px rgba(15, 23, 42, 0.1)",f.style.font=`500 ${s.bodySize}px/1.35 ${s.fontFamily}`,f.style.backdropFilter="blur(10px)";const d=document.createElement("div");d.style.display="flex",d.style.alignItems="center",d.style.gap=`${s.gap}px`,(this.isSummaryHovering||this.isReplyOpen)&&d.append(this.createSummaryActionButton("x",this.copy.hideMessage,this.handleSummaryDelete));const y=document.createElement("div");y.textContent=u.title,y.style.minWidth="0",y.style.flex="1",y.style.overflow="hidden",y.style.textOverflow="ellipsis",y.style.whiteSpace="nowrap",y.style.fontWeight="700",y.style.fontSize=`${s.titleSize}px`,y.dataset.chatkitPetSummaryTitle="",d.append(y),this.isSummaryHovering||this.isReplyOpen?d.append(this.createSummaryActionButton(this.isSummaryExpanded?"-":">",this.isSummaryExpanded?this.copy.collapseMessage:this.copy.expandMessage,this.handleSummaryExpandToggle)):d.append(this.createStatusIcon(u.status));const p=document.createElement("div");if(p.textContent=u.message,p.style.marginTop=`${s.marginTop}px`,p.style.fontWeight="400",p.style.color="#374151",p.style.overflow="hidden",this.isSummaryExpanded?(p.style.maxHeight="7em",p.style.overflowY="auto"):(p.style.display="-webkit-box",p.style.setProperty("-webkit-line-clamp","2"),p.style.setProperty("-webkit-box-orient","vertical")),p.dataset.chatkitPetSummaryMessage="",f.append(d,p),r){const E=this.createTextButton(this.copy.replyButton,this.handleReplyOpen);E.style.position="absolute",E.style.right="14px",E.style.bottom="10px",f.append(E)}return this.isReplyOpen&&f.append(this.createReplyForm()),f}updateSummaryBubbleContent(u){var d,y,p;const r=(d=this.summaryElement)==null?void 0:d.querySelector("[data-chatkit-pet-summary-title]");r&&r.textContent!==u.title&&(r.textContent=u.title);const s=(y=this.summaryElement)==null?void 0:y.querySelector("[data-chatkit-pet-summary-message]");s&&s.textContent!==u.message&&(s.textContent=u.message);const f=(p=this.summaryElement)==null?void 0:p.querySelector("[data-chatkit-pet-summary-status]");if(f&&f.dataset.chatkitPetSummaryStatus!==u.status){const E=this.createStatusIcon(u.status);f.replaceWith(E)}}createSummaryToggleButton(u){const r=ii(this.theme),s=document.createElement("button");return s.type="button",s.textContent=u,s.title=u==="1"?this.copy.restoreMessage:this.copy.collapseMessage,s.addEventListener("click",Nu),s.addEventListener("click",this.handleSummaryCollapseToggle),s.style.position="absolute",s.style.top="0",s.style.left="0",s.style.pointerEvents="auto",s.style.border="1px solid rgba(148, 163, 184, 0.28)",s.style.background="rgba(248, 250, 252, 0.94)",s.style.color="#475569",s.style.boxShadow="0 6px 18px rgba(15, 23, 42, 0.1)",s.style.cursor="pointer",s.style.font=`600 ${r.titleSize}px/1 ${r.fontFamily}`,s.style.display="flex",s.style.alignItems="center",s.style.justifyContent="center",s}createStatusIcon(u){const s=ii(this.theme).iconSize,f=document.createElement("span");if(f.setAttribute("aria-hidden","true"),f.dataset.chatkitPetSummaryStatus=u,f.style.display="inline-flex",f.style.width=`${s}px`,f.style.height=`${s}px`,f.style.alignItems="center",f.style.justifyContent="center",f.style.flex="0 0 auto",u==="running")return f.style.border="2px solid rgba(71, 85, 105, 0.32)",f.style.borderTopColor="#64748b",f.style.borderRadius="999px",f.style.animation="chatkit-pet-summary-spin 900ms linear infinite",f;if(f.style.borderRadius="999px",f.style.fontSize=`${Math.max(10,s-4)}px`,f.style.fontWeight="700",u==="failed")return f.textContent="!",f.style.background="#fee2e2",f.style.color="#b91c1c",f;f.textContent="",f.style.border="2px solid #22c55e",f.style.position="relative";const d=document.createElement("span");return d.style.width=`${Math.round(s*.44)}px`,d.style.height=`${Math.round(s*.25)}px`,d.style.borderLeft="2px solid #22c55e",d.style.borderBottom="2px solid #22c55e",d.style.transform="rotate(-45deg) translate(1px, -1px)",f.append(d),f}createSummaryActionButton(u,r,s){const f=ii(this.theme),d=document.createElement("button");return d.type="button",d.textContent=u,d.title=r,d.addEventListener("click",y=>{y.preventDefault(),y.stopPropagation(),s()}),d.style.width=`${f.actionSize}px`,d.style.height=`${f.actionSize}px`,d.style.border="0",d.style.borderRadius="999px",d.style.background="rgba(241, 245, 249, 0.96)",d.style.color="#475569",d.style.cursor="pointer",d.style.font=`600 ${f.titleSize}px/1 ${f.fontFamily}`,d}createTextButton(u,r){const s=document.createElement("button");return s.type="button",s.textContent=u,s.addEventListener("click",f=>{f.preventDefault(),f.stopPropagation(),r()}),s.style.border="1px solid rgba(148, 163, 184, 0.28)",s.style.borderRadius="999px",s.style.background="rgba(248, 250, 252, 0.95)",s.style.color="#334155",s.style.cursor="pointer",s.style.padding="3px 10px",s.style.font='600 12px/1.4 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',s}createReplyForm(){const u=document.createElement("form");u.addEventListener("click",Nu),u.addEventListener("submit",this.handleReplySubmit),u.addEventListener("keydown",this.handleReplyKeyDown),u.style.display="flex",u.style.gap="6px",u.style.alignItems="center",u.style.marginTop="8px";const r=document.createElement("input");r.type="text",r.value=this.replyDraft,r.disabled=this.isReplySubmitting,r.placeholder=this.copy.replyPlaceholder,r.addEventListener("input",this.handleReplyInput),r.style.minWidth="0",r.style.flex="1",r.style.border="1px solid rgba(148, 163, 184, 0.35)",r.style.borderRadius="999px",r.style.padding="6px 10px",r.style.font='400 13px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',this.replyInputElement=r;const s=document.createElement("button");if(s.type="submit",s.textContent=this.isReplySubmitting?this.copy.sendingButton:this.copy.sendButton,s.disabled=this.isReplySubmitting,s.style.border="0",s.style.borderRadius="999px",s.style.background="#22c55e",s.style.color="#052e16",s.style.cursor=this.isReplySubmitting?"default":"pointer",s.style.padding="6px 10px",s.style.font='700 12px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',u.append(r,s),this.replyError){const f=document.createElement("div");f.textContent=this.copy.sendFailed,f.style.flexBasis="100%",f.style.color="#b91c1c",f.style.fontSize="12px",u.style.flexWrap="wrap",u.append(f)}return u}createContextMenu(){const u=document.createElement("div");u.setAttribute("data-chatkit-pet-context-menu",""),u.setAttribute("role","menu"),u.addEventListener("contextmenu",this.handleContextMenuEvent),u.addEventListener("pointerdown",Nu),u.addEventListener("click",Nu),u.style.position="absolute",u.style.top="0",u.style.left="0",u.style.boxSizing="border-box",u.style.minWidth="132px",u.style.padding="4px",u.style.pointerEvents="auto",u.style.border="1px solid rgba(148, 163, 184, 0.28)",u.style.borderRadius="10px",u.style.background="rgba(255, 255, 255, 0.96)",u.style.color="#1f2937",u.style.boxShadow="0 12px 28px rgba(15, 23, 42, 0.16)",u.style.font='500 13px/1.3 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',u.style.backdropFilter="blur(10px)";const r=document.createElement("button");return r.type="button",r.textContent=this.copy.closePetMenuItem,r.setAttribute("role","menuitem"),r.addEventListener("click",this.handleClosePetMenuItemClick),r.style.display="block",r.style.width="100%",r.style.border="0",r.style.borderRadius="7px",r.style.background="transparent",r.style.color="inherit",r.style.cursor="pointer",r.style.padding="7px 10px",r.style.textAlign="left",r.style.font="inherit",u.append(r),u}openContextMenu(u){var f;const r=this.overlayElement;if(!r)return;this.closeContextMenu();const s=this.createContextMenu();r.append(s),this.contextMenuElement=s,this.positionContextMenu(u),(f=s.querySelector("button"))==null||f.focus({preventScroll:!0}),window.addEventListener("pointerdown",this.handleContextMenuOutsidePointerDown,!0),window.addEventListener("keydown",this.handleContextMenuKeyDown)}closeContextMenu(){var u;(u=this.contextMenuElement)==null||u.remove(),this.contextMenuElement=null,window.removeEventListener("pointerdown",this.handleContextMenuOutsidePointerDown,!0),window.removeEventListener("keydown",this.handleContextMenuKeyDown)}positionContextMenu(u){const r=this.contextMenuElement;if(!r)return;const s=la(),f=r.offsetWidth||132,d=r.offsetHeight||40,y=Math.max(ea,s.width-f-ea),p=Math.max(ea,s.height-d-ea),E=Ql(u.x,ea,y),b=Ql(u.y,ea,p);r.style.transform=`translate3d(${E}px, ${b}px, 0)`}renderAtlas(u,r){var W;if(!this.petElement||((W=this.resolved)==null?void 0:W.kind)!=="atlas"||!this.options)return;if(!(this.mediaElement instanceof HTMLDivElement)){const st=document.createElement("div");st.setAttribute("aria-hidden","true"),this.petElement.replaceChildren(st),this.mediaElement=st}const s=this.mediaElement,f=this.resolved.atlas,d=f.animations[u]??f.animations.idle,y=r==="once"&&this.completed?Math.max(0,d.frames-1):Math.min(this.frame,Math.max(0,d.frames-1)),p=om(this.options.position.scale),E=f.cellWidth,b=f.cellHeight,N=f.columns*E,U=f.rows*b;s.style.width=`${E}px`,s.style.height=`${b}px`,s.style.overflow="hidden",s.style.transform=`scale(${p})`,s.style.transformOrigin="top left",s.style.pointerEvents="none",s.style.backgroundImage=`url("${N0(this.resolved.src)}")`,s.style.backgroundRepeat="no-repeat",s.style.backgroundSize=`${N}px ${U}px`,s.style.backgroundPosition=`${-y*E}px ${-d.row*b}px`,s.style.imageRendering=this.options.imageRendering,s.dataset.petFrame=String(y)}scheduleNextFrame(u,r){if(this.prefersReducedMotion||this.completed||!this.resolved){this.clearTimers();return}if(this.frameTimer!==null)return;const s=this.resolved.atlas,f=s.animations[u]??s.animations.idle,y=(f.frameDurations[this.frame]??f.frameDurations[f.frameDurations.length-1]??150)*z0,p=this.isHovering||this.isDragging?y:y*O0;this.frameTimer=window.setTimeout(()=>{this.frameTimer=null;const E=this.frame+1;if(E>=f.frames){if(r==="once"){this.completed=!0,this.frame=Math.max(0,f.frames-1),this.finishTransient();return}this.frame=0,this.render();return}this.frame=E,this.render()},p)}clearTimers(){this.frameTimer!==null&&(window.clearTimeout(this.frameTimer),this.frameTimer=null)}clearRestingDelayTimer(){this.restingDelayTimer!==null&&(window.clearTimeout(this.restingDelayTimer),this.restingDelayTimer=null)}finishTransient(){this.transient=null,this.activeAnimationName=null,this.activeAnimationMode=null,this.render()}rescheduleAnimation(){this.clearTimers(),this.render()}enterRestingAfterDelay(){this.clearRestingDelayTimer(),this.isHovering=!0,this.restingDelayTimer=window.setTimeout(()=>{this.restingDelayTimer=null,!this.isDragging&&(this.isHovering=!1,this.rescheduleAnimation())},D0)}isPointOverPet(u,r){var f;const s=(f=this.petElement)==null?void 0:f.getBoundingClientRect();return s?u>=s.left&&u<=s.right&&r>=s.top&&r<=s.bottom:!1}isPointerOverPet(u){return this.isPointOverPet(u.clientX,u.clientY)}async submitReply(){var r;const u=this.replyDraft.trim();if(!(!u||this.isReplySubmitting)){this.isReplySubmitting=!0,this.replyError=null,this.render();try{await((r=this.onReply)==null?void 0:r.call(this,u)),this.replyDraft="",this.isReplyOpen=!1,this.isSummaryHovering=!1}catch{this.replyError="Failed to send"}finally{this.isReplySubmitting=!1,this.render()}}}captureActivePointer(){const u=this.activePointerId,r=this.petElement;if(!(u===null||typeof(r==null?void 0:r.setPointerCapture)!="function"))try{r.setPointerCapture(u)}catch{}}releaseActivePointer(){const u=this.activePointerId,r=this.petElement;if(this.activePointerId=null,!(u===null||typeof(r==null?void 0:r.hasPointerCapture)!="function"||typeof r.releasePointerCapture!="function"))try{r.hasPointerCapture(u)&&r.releasePointerCapture(u)}catch{}}isActiveDragPointer(u){return this.isDragging&&u.pointerId===this.activePointerId}getNextDragPosition(u){return this.options?we({x:u.clientX-this.dragOffset.x,y:u.clientY-this.dragOffset.y},this.getSize(),la(),Sr(this.options.position.boundsPadding)):{x:0,y:0}}finishDrag(u,r){this.isDragging=!1,this.dragPosition=null,this.dragAnimation=null,this.lastDragClientX=null,this.removeDragListeners(),this.releaseActivePointer(),this.persistPosition(u),r.pointerType==="mouse"&&this.isPointerOverPet(r)?(this.isHovering=!0,this.rescheduleAnimation()):(this.enterRestingAfterDelay(),this.rescheduleAnimation())}cancelActiveDrag(){this.isDragging=!1,this.dragPosition=null,this.dragAnimation=null,this.lastDragPosition=null,this.lastDragClientX=null,this.removeDragListeners(),this.releaseActivePointer()}installDragListeners(){window.addEventListener("pointermove",this.handlePointerMove),window.addEventListener("pointerup",this.handlePointerUp),window.addEventListener("pointercancel",this.handlePointerUp)}removeDragListeners(){window.removeEventListener("pointermove",this.handlePointerMove),window.removeEventListener("pointerup",this.handlePointerUp),window.removeEventListener("pointercancel",this.handlePointerUp)}}var Z0=Object.create,Mm=Object.defineProperty,J0=Object.getOwnPropertyDescriptor,Cm=(c,u)=>(u=Symbol[c])?u:Symbol.for("Symbol."+c),Ku=c=>{throw TypeError(c)},k0=(c,u,r)=>u in c?Mm(c,u,{enumerable:!0,configurable:!0,writable:!0,value:r}):c[u]=r,W0=c=>[,,,Z0((c==null?void 0:c[Cm("metadata")])??null)],zm=["class","method","getter","setter","accessor","field","value","get","set"],Om=c=>c!==void 0&&typeof c!="function"?Ku("Function expected"):c,$0=(c,u,r,s,f)=>({kind:zm[c],name:u,metadata:s,addInitializer:d=>r._?Ku("Already initialized"):f.push(Om(d||null))}),F0=(c,u)=>k0(u,Cm("metadata"),c[3]),I0=(c,u,r,s)=>{for(var f=0,d=c[u>>1],y=d&&d.length;f<y;f++)d[f].call(r);return s},Ye=(c,u,r,s,f,d)=>{for(var y,p,E,b,N=u&7,U=!1,W=!1,st=2,Et=zm[N+5],it=c[st]||(c[st]=[]),Mt=(f=f.prototype,J0(f,r)),Tt=s.length-1;Tt>=0;Tt--)E=$0(N,r,p={},c[3],it),E.static=U,E.private=W,b=E.access={has:wt=>r in wt},b.get=wt=>wt[r],y=(0,s[Tt])(Mt[Et],E),p._=1,Om(y)&&(Mt[Et]=y);return Mt&&Mm(f,r,Mt),f},Ur=(c,u,r)=>u.has(c)||Ku("Cannot "+r),D=(c,u,r)=>(Ur(c,u,"read from private field"),r?r.call(c):u.get(c)),Yt=(c,u,r)=>u.has(c)?Ku("Cannot add the same private member more than once"):u instanceof WeakSet?u.add(c):u.set(c,r),Ft=(c,u,r,s)=>(Ur(c,u,"write to private field"),u.set(c,r),r),G=(c,u,r)=>(Ur(c,u,"access private method"),r),Dm,Rm,Um,wm,Hm,Nm,Bm,Lm,jm,qm,Ym,Mr,pt,Vl,yl,gl,Lu,wr,Vu,ia,mn,ke,He,ju,Wt,si,St,Y,ml,Hr,pl,Zu,Xm,Ju,Gm,Qm,Nr,Zl,hi,Cr,Km,Vm,Zm,Jm,qu,km,Wm,$m,Yu,ua,zr,fe;function Fm(c){return xr(c)}function qe(c,u){const r=String(u.name);return function(...s){if(!this.capabilities.commands.has(r))throw new oe(`ChatKit command "${String(r)}" is not available for the "${this.profile}" profile.`);return c.apply(this,s)}}class Te extends(Mr=HTMLElement,Ym=[qe],qm=[qe],jm=[qe],Lm=[qe],Bm=[qe],Nm=[qe],Hm=[qe],wm=[qe],Um=[qe],Rm=[qe],Dm=[qe],Mr){constructor({profile:u}){super(),I0(fe,5,this),Yt(this,Y),this.profile=void 0,this.capabilities=void 0,Yt(this,pt),Yt(this,Vl),Yt(this,yl),Yt(this,gl),Yt(this,Lu),Yt(this,wr,!1),Yt(this,Vu,!1),Yt(this,ia),Yt(this,mn,!1),Yt(this,ke,this.attachShadow({mode:"open"})),Yt(this,He,new V0(D(this,ke),{onActivate:()=>G(this,Y,Km).call(this),onClose:()=>G(this,Y,Vm).call(this),onReply:r=>G(this,Y,Zm).call(this,r),onThreadSummaryActivate:r=>void G(this,Y,Jm).call(this,r)})),Yt(this,ju),Yt(this,Wt,new Promise(r=>{Ft(this,ju,r)})),Yt(this,si,_m()),Yt(this,St,new S0({channelId:D(this,si)??void 0,fetch:((...r)=>{var f;const s=((f=D(this,pt))==null?void 0:f.api)&&"fetch"in D(this,pt).api&&D(this,pt).api.fetch;return s?s(...r):fetch(...r)}),target:()=>{var r;return((r=D(this,yl))==null?void 0:r.contentWindow)??null},targetOrigin:window.location.origin,handlers:{onFileInputClick:({inputAttributes:r})=>new Promise(s=>{const f=document.createElement("input");for(const[y,p]of Object.entries(r))f.setAttribute(y,String(p));const d=()=>{s(Array.from(f.files||[])),D(this,ke).contains(f)&&D(this,ke).removeChild(f)};f.addEventListener("cancel",d),f.addEventListener("change",d),D(this,ke).appendChild(f),f.click()}),onClientToolCall:async({name:r,params:s,id:f,tool_call_id:d})=>{var p;const y=(p=D(this,pt))==null?void 0:p.onClientTool;return y||G(this,Y,ml).call(this,new oe("No handler for client tool calls. You'll need to add onClientTool to your ChatKit options.")),y({name:r,params:s,id:f,tool_call_id:d})},onToolOutputAttachmentPreview:async r=>{var f,d;const s=(d=(f=D(this,pt))==null?void 0:f.toolOutputAttachments)==null?void 0:d.onRequestPreview;return s||G(this,Y,ml).call(this,new oe("No handler for tool-output attachment previews. Add toolOutputAttachments.onRequestPreview to your ChatKit options.")),s(r)},onConnectWorkspaceConnector:async r=>{var f,d,y;const s=(y=(d=(f=D(this,pt))==null?void 0:f.composer)==null?void 0:d.resources)==null?void 0:y.onConnect;return s||G(this,Y,ml).call(this,new oe("Add composer.resources.onConnect to handle workspace Connector connections.")),s(r)},onWorkbenchClientCommand:async({commandKey:r,payload:s,hostType:f,hostId:d,viewKey:y})=>{var E,b;const p=(b=(E=D(this,pt))==null?void 0:E.workbench)==null?void 0:b.onClientCommand;return p||G(this,Y,ml).call(this,new oe(`No handler for workbench client command "${r}". Add workbench.onClientCommand to your ChatKit options.`)),p({commandKey:r,payload:s,hostType:f,hostId:d,viewKey:y})},onWidgetAction:async({action:r,widgetItem:s})=>{var d,y;const f=(y=(d=D(this,pt))==null?void 0:d.widgets)==null?void 0:y.onAction;return f||G(this,Y,ml).call(this,new oe("No handler for widget actions. You'll need to add widgets.onAction to your ChatKit options.")),f(r,s)},onEntitySearch:async({query:r})=>{var s,f,d;return((d=(f=(s=D(this,pt))==null?void 0:s.entities)==null?void 0:f.onTagSearch)==null?void 0:d.call(f,r))??[]},onEntityClick:async({entity:r})=>{var s,f,d;return(d=(f=(s=D(this,pt))==null?void 0:s.entities)==null?void 0:f.onClick)==null?void 0:d.call(f,r)},onEntityPreview:async({entity:r})=>{var s,f,d;return((d=(f=(s=D(this,pt))==null?void 0:s.entities)==null?void 0:f.onRequestPreview)==null?void 0:d.call(f,r))??{preview:null}},onGetClientSecret:async r=>((!D(this,pt)||!("getClientSecret"in D(this,pt).api)||!D(this,pt).api.getClientSecret)&&G(this,Y,ml).call(this,new oe("Could not refresh the session because ChatKitOptions.api.getClientSecret is not configured.")),D(this,pt).api.getClientSecret(r??null)),onAddMetadataToRequest:({op:r,params:s})=>{throw new oe("ChatKit: onAddMetadataToRequest is unimplemented.")}}})),Yt(this,qu,()=>{G(this,Y,Zl).call(this,!1)}),Yt(this,Yu,()=>{var r;this.dataset.loaded="true",this.dispatchEvent(new CustomEvent("chatkit.ready",{bubbles:!0,composed:!0})),(r=D(this,ju))==null||r.call(this)}),Yt(this,ua,!1),this.profile=u,this.capabilities=im(u)}setProfile(u){this.profile=u,this.capabilities=im(u)}connectedCallback(){D(this,He).connect();const u=document.createElement("style");u.textContent=`
|
|
55
|
+
:host {
|
|
56
|
+
display: block;
|
|
57
|
+
position: relative;
|
|
58
|
+
height: 100%;
|
|
59
|
+
width: 100%;
|
|
60
|
+
overflow: visible;
|
|
61
|
+
}
|
|
62
|
+
:host([data-display-mode="pet"]) {
|
|
63
|
+
display: contents;
|
|
64
|
+
}
|
|
65
|
+
:host([data-chat-minimized-to-pet="true"]) {
|
|
66
|
+
display: contents;
|
|
67
|
+
}
|
|
68
|
+
.ck-iframe {
|
|
69
|
+
border: none;
|
|
70
|
+
position: absolute;
|
|
71
|
+
inset: 0;
|
|
72
|
+
width: 100%;
|
|
73
|
+
height: 100%;
|
|
74
|
+
overflow: hidden;
|
|
75
|
+
color-scheme: light only;
|
|
76
|
+
}
|
|
77
|
+
.ck-wrapper {
|
|
78
|
+
position: absolute;
|
|
79
|
+
inset: 0;
|
|
80
|
+
width: 100%;
|
|
81
|
+
height: 100%;
|
|
82
|
+
overflow: hidden;
|
|
83
|
+
opacity: 0;
|
|
84
|
+
}
|
|
85
|
+
.ck-launcher-close {
|
|
86
|
+
display: none;
|
|
87
|
+
}
|
|
88
|
+
:host([data-display-mode="pet"]) .ck-wrapper {
|
|
89
|
+
position: fixed;
|
|
90
|
+
inset: auto 16px 16px auto;
|
|
91
|
+
width: min(420px, calc(100vw - 32px));
|
|
92
|
+
height: min(720px, calc(100vh - 32px));
|
|
93
|
+
max-height: calc(100vh - 32px);
|
|
94
|
+
overflow: visible;
|
|
95
|
+
border: 1px solid rgba(148, 163, 184, 0.35);
|
|
96
|
+
border-radius: 18px;
|
|
97
|
+
background: Canvas;
|
|
98
|
+
box-shadow:
|
|
99
|
+
0 24px 80px rgba(15, 23, 42, 0.22),
|
|
100
|
+
0 0 0 1px rgba(15, 23, 42, 0.04);
|
|
101
|
+
opacity: 0;
|
|
102
|
+
pointer-events: none;
|
|
103
|
+
transform: translateY(12px) scale(0.98);
|
|
104
|
+
transition:
|
|
105
|
+
opacity 160ms ease,
|
|
106
|
+
transform 160ms ease;
|
|
107
|
+
z-index: 39;
|
|
108
|
+
}
|
|
109
|
+
:host([data-display-mode="pet"][data-chat-open="true"]) .ck-wrapper {
|
|
110
|
+
opacity: 1;
|
|
111
|
+
pointer-events: auto;
|
|
112
|
+
transform: translateY(0) scale(1);
|
|
113
|
+
}
|
|
114
|
+
:host([data-display-mode="pet"]) .ck-iframe {
|
|
115
|
+
border-radius: inherit;
|
|
116
|
+
}
|
|
117
|
+
:host([data-display-mode="pet"]) .ck-launcher-close {
|
|
118
|
+
display: inline-flex;
|
|
119
|
+
position: absolute;
|
|
120
|
+
top: -10px;
|
|
121
|
+
right: -10px;
|
|
122
|
+
z-index: 2;
|
|
123
|
+
width: 28px;
|
|
124
|
+
height: 28px;
|
|
125
|
+
align-items: center;
|
|
126
|
+
justify-content: center;
|
|
127
|
+
border: 1px solid rgba(148, 163, 184, 0.45);
|
|
128
|
+
border-radius: 999px;
|
|
129
|
+
background: rgba(255, 255, 255, 0.96);
|
|
130
|
+
color: #475569;
|
|
131
|
+
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
|
|
132
|
+
cursor: pointer;
|
|
133
|
+
font: inherit;
|
|
134
|
+
font-size: 0;
|
|
135
|
+
line-height: 1;
|
|
136
|
+
}
|
|
137
|
+
:host([data-display-mode="pet"]) .ck-launcher-close::before,
|
|
138
|
+
:host([data-display-mode="pet"]) .ck-launcher-close::after {
|
|
139
|
+
content: '';
|
|
140
|
+
position: absolute;
|
|
141
|
+
top: 50%;
|
|
142
|
+
left: 50%;
|
|
143
|
+
width: 14px;
|
|
144
|
+
height: 2px;
|
|
145
|
+
border-radius: 999px;
|
|
146
|
+
background: currentColor;
|
|
147
|
+
transform: translate(-50%, -50%) rotate(45deg);
|
|
148
|
+
}
|
|
149
|
+
:host([data-display-mode="pet"]) .ck-launcher-close::after {
|
|
150
|
+
transform: translate(-50%, -50%) rotate(-45deg);
|
|
151
|
+
}
|
|
152
|
+
:host([data-display-mode="pet"]) .ck-launcher-close:hover {
|
|
153
|
+
background: #fff;
|
|
154
|
+
color: #0f172a;
|
|
155
|
+
}
|
|
156
|
+
:host([data-color-scheme="dark"]) .ck-iframe {
|
|
157
|
+
color-scheme: dark only;
|
|
158
|
+
}
|
|
159
|
+
:host([data-color-scheme="dark"][data-display-mode="pet"]) .ck-wrapper {
|
|
160
|
+
border-color: rgba(148, 163, 184, 0.28);
|
|
161
|
+
background: #020617;
|
|
162
|
+
box-shadow:
|
|
163
|
+
0 24px 80px rgba(0, 0, 0, 0.5),
|
|
164
|
+
0 0 0 1px rgba(255, 255, 255, 0.06);
|
|
165
|
+
}
|
|
166
|
+
:host([data-color-scheme="dark"][data-display-mode="pet"]) .ck-launcher-close {
|
|
167
|
+
background: rgba(15, 23, 42, 0.88);
|
|
168
|
+
border-color: rgba(148, 163, 184, 0.32);
|
|
169
|
+
color: #cbd5e1;
|
|
170
|
+
}
|
|
171
|
+
:host([data-color-scheme="dark"][data-display-mode="pet"]) .ck-launcher-close:hover {
|
|
172
|
+
background: #1e293b;
|
|
173
|
+
color: #f8fafc;
|
|
174
|
+
}
|
|
175
|
+
:host([data-loaded="true"]) .ck-wrapper {
|
|
176
|
+
opacity: 1;
|
|
177
|
+
}
|
|
178
|
+
:host([data-chat-minimized-to-pet="true"]) .ck-wrapper {
|
|
179
|
+
opacity: 0;
|
|
180
|
+
pointer-events: none;
|
|
181
|
+
visibility: hidden;
|
|
182
|
+
}
|
|
183
|
+
:host([data-display-mode="pet"]:not([data-chat-open="true"])) .ck-wrapper {
|
|
184
|
+
opacity: 0;
|
|
185
|
+
}
|
|
186
|
+
@media (max-width: 520px) {
|
|
187
|
+
:host([data-display-mode="pet"]) .ck-wrapper {
|
|
188
|
+
inset: auto 8px 8px 8px;
|
|
189
|
+
width: auto;
|
|
190
|
+
height: min(680px, calc(100vh - 16px));
|
|
191
|
+
max-height: calc(100vh - 16px);
|
|
192
|
+
border-radius: 16px;
|
|
193
|
+
}
|
|
194
|
+
:host([data-display-mode="pet"]) .ck-launcher-close {
|
|
195
|
+
top: -8px;
|
|
196
|
+
right: 8px;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
`;const r=document.createElement("iframe");r.className="ck-iframe",r.name="chatkit",r.role="presentation",r.tabIndex=0,r.setAttribute("allowtransparency","true"),r.setAttribute("frameborder","0"),r.setAttribute("scrolling","no"),r.setAttribute("allow","clipboard-read; clipboard-write"),Ft(this,yl,r);const s=document.createElement("div");s.className="ck-wrapper",s.appendChild(r),Ft(this,gl,s);const f=document.createElement("button");f.className="ck-launcher-close",f.type="button",f.setAttribute("aria-label","Close chat"),f.addEventListener("click",D(this,qu)),s.appendChild(f),Ft(this,Lu,f),D(this,ke).append(u),D(this,St).on("left_header_icon_click",()=>{var d,y,p;(p=(y=(d=D(this,pt))==null?void 0:d.header)==null?void 0:y.leftAction)==null||p.onClick()}),D(this,St).on("right_header_icon_click",()=>{var d,y,p;(p=(y=(d=D(this,pt))==null?void 0:d.header)==null?void 0:y.rightAction)==null||p.onClick()}),D(this,St).on("public_event",([d,y])=>{if(d==="log"){const p=K0(y);p&&D(this,He).setThreadSummary(p.summary)}else d==="response.start"?D(this,He).setThreadSummaryStatus("running"):d==="response.end"?D(this,He).setThreadSummaryStatus("completed"):d==="response.stop"&&D(this,He).setThreadSummaryStatus("completed");if(this.capabilities.events.has(d)){if(d==="error"&&"error"in y){const p=y0(y.error);if(this.dispatchEvent(new CustomEvent("chatkit.error",{detail:{error:p}})),p instanceof oe)throw p;return}this.dispatchEvent(new CustomEvent(`chatkit.${d}`,{detail:y}))}}),D(this,St).on("pet_state_change",d=>{const y=Y0(d);y&&D(this,He).setState(y.state)}),D(this,St).on("pet_options_change",d=>{const y=X0(d);y&&((!D(this,mn)||y.pet===null)&&Ft(this,mn,!1),Ft(this,ia,y.pet),G(this,Y,Cr).call(this))}),D(this,St).on("chat_minimize_change",d=>{const y=typeof d=="object"&&d!==null&&"minimized"in d&&d.minimized===!0;y&&!G(this,Y,Ju).call(this)||(G(this,Y,hi).call(this,y),y&&G(this,Y,Zl).call(this,!1))}),D(this,St).on("unmount",()=>{D(this,gl)&&D(this,ke).contains(D(this,gl))&&(D(this,ke).removeChild(D(this,gl)),Ft(this,gl,void 0),Ft(this,yl,void 0))}),D(this,St).on("capabilities_profile_change",({profile:d})=>{this.setProfile(d)}),r.addEventListener("load",D(this,Yu),{once:!0});try{G(this,Y,zr).call(this)}catch(d){console.error(d),G(this,Y,ml).call(this,d instanceof Error?d:new oe("Failed to initialize ChatKit"))}}disconnectedCallback(){var u,r;(u=D(this,yl))==null||u.removeEventListener("load",D(this,Yu)),(r=D(this,Lu))==null||r.removeEventListener("click",D(this,qu)),D(this,St).disconnect(),D(this,He).destroy()}applySanitizedOptions(u){Ft(this,pt,u),Ft(this,mn,!1),D(this,He).setLocale(u.locale),G(this,Y,Cr).call(this),D(this,ua)?(G(this,Y,Hr).call(this,D(this,pt)),D(this,Wt).then(()=>{D(this,St).commands.setOptions(Fm(G(this,Y,Nr).call(this,u)))})):G(this,Y,zr).call(this)}setOptions(u){try{const r=this.sanitizeOptions(u);G(this,Y,$m).call(this,r),this.applySanitizedOptions(r)}catch(r){G(this,Y,ml).call(this,r instanceof Error?r:new oe("Failed to parse options"))}}async focusComposer(){var u,r;await D(this,Wt),(u=D(this,yl))==null||u.focus(),await((r=D(this,St))==null?void 0:r.commands.focusComposer())}async fetchUpdates(){var u;await D(this,Wt),await((u=D(this,St))==null?void 0:u.commands.fetchUpdates())}async sendUserMessage(u){var r;await D(this,Wt),await((r=D(this,St))==null?void 0:r.commands.sendUserMessage(u))}async setComposerValue(u){var r;await D(this,Wt),await((r=D(this,St))==null?void 0:r.commands.setComposerValue(u))}async setRuntimeCapabilities(u){var r;await D(this,Wt),await((r=D(this,St))==null?void 0:r.commands.setRuntimeCapabilities(u))}async setThreadId(u){var r;await D(this,Wt),await((r=D(this,St))==null?void 0:r.commands.setThreadId({threadId:u}))}async shareThread(){var u;return await D(this,Wt),(u=D(this,St))==null?void 0:u.commands.shareThread()}async sendCustomAction(u,r){var s;return await D(this,Wt),(s=D(this,St))==null?void 0:s.commands.sendCustomAction({action:u,itemId:r})}async showHistory(){var u;return await D(this,Wt),(u=D(this,St))==null?void 0:u.commands.showHistory()}async hideHistory(){var u;return await D(this,Wt),(u=D(this,St))==null?void 0:u.commands.hideHistory()}async setTrainingOptOut(u){var r;return await D(this,Wt),(r=D(this,St))==null?void 0:r.commands.setTrainingOptOut({value:u})}}fe=W0(Mr);pt=new WeakMap;Vl=new WeakMap;yl=new WeakMap;gl=new WeakMap;Lu=new WeakMap;wr=new WeakMap;Vu=new WeakMap;ia=new WeakMap;mn=new WeakMap;ke=new WeakMap;He=new WeakMap;ju=new WeakMap;Wt=new WeakMap;si=new WeakMap;St=new WeakMap;Y=new WeakSet;ml=function(c){throw this.dispatchEvent(new CustomEvent("chatkit.error",{detail:{error:c}})),c};Hr=function(c){var u;this.dataset.colorScheme=typeof c.theme=="string"?c.theme:((u=c.theme)==null?void 0:u.colorScheme)??"light",this.dataset.displayMode=G(this,Y,pl).call(this,c),G(this,Y,pl).call(this,c)!=="pet"&&G(this,Y,Zl).call(this,!1)};pl=function(c=D(this,pt)){return(c==null?void 0:c.displayMode)==="pet"?"pet":"chat"};Zu=function(c=D(this,pt)){return c?G(this,Y,pl).call(this,c)==="pet"&&!fi(c.pet??null)?!0:c.pet??null:null};Xm=function(c){if(!c)return c;const u=fi(G(this,Y,Zu).call(this)??null);return u?c===!0?{position:u.position}:c.position?{...c,position:{...u.position,...c.position,boundsPadding:c.position.boundsPadding??u.position.boundsPadding,pin:"pin"in c.position?c.position.pin:u.position.pin}}:{...c,position:u.position}:c};Ju=function(){if(D(this,mn))return null;let c;return D(this,ia)!==void 0?c=G(this,Y,Xm).call(this,D(this,ia)):c=G(this,Y,Zu).call(this),G(this,Y,pl).call(this)==="pet"&&!fi(c??null)&&(c=!0),G(this,Y,Qm).call(this,c)};Gm=function(c){try{const u=new URL(D(this,Vl)??window.location.href,window.location.origin);return new URL(c,u).toString()}catch{return c}};Qm=function(c){const u=fi(c??null);return u?{character:{...u.character,src:G(this,Y,Gm).call(this,u.character.src)},position:u.position,behavior:u.behavior,ariaLabel:u.ariaLabel,imageRendering:u.imageRendering}:null};Nr=function(c){const u=G(this,Y,Zu).call(this,c);if(u===(c.pet??null))return c;const r={...c};return u===null?delete r.pet:r.pet=u,r};Zl=function(c){Ft(this,wr,c),c?this.dataset.chatOpen="true":delete this.dataset.chatOpen};hi=function(c){const u=c&&!!G(this,Y,Ju).call(this);Ft(this,Vu,u),u?this.dataset.chatMinimizedToPet="true":delete this.dataset.chatMinimizedToPet};Cr=function(){var u;const c=G(this,Y,Ju).call(this);D(this,He).setOptions(c,(u=D(this,pt))==null?void 0:u.theme),c||G(this,Y,hi).call(this,!1)};Km=function(){if(D(this,Vu)){G(this,Y,hi).call(this,!1),G(this,Y,pl).call(this)==="pet"&&G(this,Y,Zl).call(this,!0),D(this,Wt).then(()=>this.focusComposer()).catch(()=>{});return}G(this,Y,pl).call(this)==="pet"&&(G(this,Y,Zl).call(this,!0),D(this,Wt).then(()=>this.focusComposer()).catch(()=>{}))};Vm=function(){Ft(this,mn,!0),Ft(this,ia,null),G(this,Y,hi).call(this,!1),G(this,Y,Zl).call(this,!1),D(this,He).setOptions(null),G(this,Y,pl).call(this)!=="pet"&&D(this,Wt).then(()=>D(this,St).commands.setPetEnabled({enabled:!1})).catch(()=>{})};Zm=async function(c){await this.sendUserMessage({text:c})};Jm=async function(c){G(this,Y,pl).call(this)==="pet"&&G(this,Y,Zl).call(this,!0),await this.setThreadId(c),await this.focusComposer()};qu=new WeakMap;km=function(){if(!D(this,Vl))throw new oe("ChatKit frameUrl is not configured. Provide it via setOptions({ frameUrl }) before mounting.");return D(this,Vl)};Wm=function(c){if(D(this,ua)&&D(this,Vl)&&D(this,Vl)!==c)throw new oe("ChatKit frameUrl cannot be changed after initialization. Create a new element to use a different URL.");Ft(this,Vl,c)};$m=function(c){if(!("frameUrl"in c))return;const u=c.frameUrl;if(delete c.frameUrl,u!=null){if(typeof u!="string"||u.trim()==="")throw new oe("ChatKit frameUrl must be a non-empty string.");G(this,Y,Wm).call(this,u)}};Yu=new WeakMap;ua=new WeakMap;zr=function(){if(D(this,ua)||!D(this,yl)||!D(this,pt))return;Ft(this,ua,!0),G(this,Y,Hr).call(this,D(this,pt));const c=new URL(G(this,Y,km).call(this),window.location.origin);D(this,St).setTargetOrigin(c.origin),c.hash=m0({options:Fm(G(this,Y,Nr).call(this,D(this,pt))),referrer:window.location.origin,profile:this.profile,...D(this,si)?{channelId:D(this,si)}:{}}),D(this,St).connect(),D(this,yl).src=c.toString(),D(this,gl)&&D(this,ke).append(D(this,gl))};Ye(fe,1,"focusComposer",Ym,Te);Ye(fe,1,"fetchUpdates",qm,Te);Ye(fe,1,"sendUserMessage",jm,Te);Ye(fe,1,"setComposerValue",Lm,Te);Ye(fe,1,"setRuntimeCapabilities",Bm,Te);Ye(fe,1,"setThreadId",Nm,Te);Ye(fe,1,"shareThread",Hm,Te);Ye(fe,1,"sendCustomAction",wm,Te);Ye(fe,1,"showHistory",Um,Te);Ye(fe,1,"hideHistory",Rm,Te);Ye(fe,1,"setTrainingOptOut",Dm,Te);F0(fe,Te);class P0 extends Te{constructor(){super({profile:"chatkit"})}sanitizeOptions(u){var r;return(r=u.threadItemActions)==null||delete r.share,u}}function tv(c="xpertai-chatkit"){"customElements"in globalThis&&(customElements.get(c)||customElements.define(c,P0))}tv();const Im={"chatkit.error":"onError","chatkit.response.end":"onResponseEnd","chatkit.response.start":"onResponseStart","chatkit.log":"onLog","chatkit.thread.change":"onThreadChange","chatkit.project.change":"onProjectChange","chatkit.connectors.change":"onConnectorsChange","chatkit.thread.load.start":"onThreadLoadStart","chatkit.thread.load.end":"onThreadLoadEnd","chatkit.ready":"onReady","chatkit.effect":"onEffect"},ev=Object.keys(Im),lv=bt.forwardRef(function({control:u,...r},s){const f=bt.useRef(null);return bt.useLayoutEffect(()=>{const d=f.current;if(!d)return;if(customElements.get("xpertai-chatkit")){d.setOptions(u.options);return}let y=!0;return customElements.whenDefined("xpertai-chatkit").then(()=>{y&&d.setOptions(u.options)}),()=>{y=!1}},[u.options]),bt.useEffect(()=>{const d=f.current;if(!d)return;const y=new AbortController;for(const p of ev)d.addEventListener(p,E=>{const b=Im[p],N=u.handlers[b];typeof N=="function"&&N(E.detail)},{signal:y.signal});return()=>{y.abort()}},[u.handlers]),K.jsx("xpertai-chatkit",{ref:d=>{f.current=d,u.setInstance(d),typeof s=="function"?s(d):s&&(s.current=d),f.current},...r})}),nv=["office_word_snapshot","office_word_insert_text","office_word_replace_selection","office_word_insert_heading","office_word_insert_table","office_word_search_text"],av=new Set(nv);function iv(c){return av.has(c)}const uv=5e3,sv=20;function Pm(c){return typeof c=="string"&&c.trim()?c.trim():void 0}function Bu(c,u){const r=Pm(c);if(!r)throw new Error(`${u} must be a non-empty string.`);return r}function mm(c){return typeof c=="boolean"?c:void 0}function ci(c){if(!(typeof c!="number"||!Number.isInteger(c)||c<=0))return c}function Or(c,u){const r=ci(c);if(r===void 0)throw new Error(`${u} must be a positive integer.`);return r}function br(c,u="End"){var s;const r=(s=Pm(c))==null?void 0:s.toLowerCase();if(!r)return u;if(r==="start")return"Start";if(r==="end")return"End";throw new Error("location must be Start or End.")}function cv(c){if(c===void 0)return 1;const u=Or(c,"level");if(u>9)throw new Error("level must be between 1 and 9.");return u}function rv(c){if(c==null)return"";if(typeof c=="string"||typeof c=="number"||typeof c=="boolean")return String(c);throw new Error("table values must contain only strings, numbers, booleans, or nulls.")}function ov(c){if(c!==void 0){if(!Array.isArray(c))throw new Error("values must be a two-dimensional array.");return c.map(u=>{if(!Array.isArray(u))throw new Error("values must be a two-dimensional array.");return u.map(rv)})}}function fv(c){const u=ov(c.values),r=ci(c.rowCount),s=ci(c.columnCount);if(!u)return{rowCount:Or(c.rowCount,"rowCount"),columnCount:Or(c.columnCount,"columnCount")};const f=u.length,d=u.reduce((E,b)=>Math.max(E,b.length),0),y=r??f,p=s??d;if(y<=0||p<=0)throw new Error("values must include at least one row and one column.");return{rowCount:y,columnCount:p,values:Array.from({length:y},(E,b)=>Array.from({length:p},(N,U)=>{var W;return((W=u[b])==null?void 0:W[U])??""}))}}function Dr(c){var u;return((u=c.Content)==null?void 0:u.Text)??""}function ty(c,u){var y;const r=c.Content;if(!r)throw new Error("The active WPS document does not expose a content range.");const s=r.Start??0,f=r.End??Dr(c).length,d=u==="Start"?s:f;return((y=c.Range)==null?void 0:y.call(c,d,d))??r}function ym(c,u,r){const s=ty(c,r);return r==="Start"&&s.InsertBefore?(s.InsertBefore(u),s):r==="End"&&s.InsertAfter?(s.InsertAfter(u),s):(s.Text=u,s)}function hv(c){return-(c+1)}function dv(c,u){c!=null&&c.Cell&&u.forEach((r,s)=>{r.forEach((f,d)=>{var p;const y=(p=c.Cell)==null?void 0:p.call(c,s+1,d+1);y!=null&&y.Range&&(y.Range.Text=f)})})}function mv(c){return{name:c.Name??"WPS Writer",build:c.Build,version:c.Version}}function gm(c){return/^[\p{L}\p{N}_]$/u.test(c)}function yv(c,u,r){const s=u>0?c[u-1]:"",f=u+r<c.length?c[u+r]:"";return!gm(s)&&!gm(f)}function gv(c,u,r){const s=r.matchCase?c:c.toLocaleLowerCase(),f=r.matchCase?u:u.toLocaleLowerCase(),d=[];let y=0;for(;y<=s.length;){const p=s.indexOf(f,y);if(p===-1)break;y=p+Math.max(f.length,1),!(r.matchWholeWord&&!yv(c,p,u.length))&&d.push({index:p+1,text:c.slice(p,p+u.length)})}return d}var ri,oi;class pv{constructor(u={}){Ru(this,ri);Ru(this,oi);this.host="WPS Writer",Uu(this,ri,u.maxSnapshotCharacters??uv),Uu(this,oi,u.maxSearchResults??sv)}supports(u){return iv(u)}async execute(u,r){switch(u){case"office_word_snapshot":return this.snapshot(r);case"office_word_insert_text":return this.insertText(r);case"office_word_replace_selection":return this.replaceSelection(r);case"office_word_insert_heading":return this.insertHeading(r);case"office_word_insert_table":return this.insertTable(r);case"office_word_search_text":return this.searchText(r)}}snapshot(u){var y;const r=ci(u.maxCharacters)??ti(this,ri),s=ta(),f=ei(s),d=Dr(f);return{host:mv(s),requirements:{wpsJsApi:!0},documentName:f.Name,bodyTextLength:d.length,bodyTextPreview:d.slice(0,r),bodyTextTruncated:d.length>r,selectionText:((y=s.Selection)==null?void 0:y.Text)??""}}insertText(u){const r=Bu(u.text,"text"),s=br(u.location),f=ei(ta());return ym(f,r,s),{inserted:!0,location:s,textLength:r.length}}replaceSelection(u){const r=Bu(u.text,"text"),s=Up(ta());return s.TypeText?s.TypeText(r):s.Text=r,{replaced:!0,textLength:r.length}}insertHeading(u){const r=Bu(u.text,"text"),s=cv(u.level),f=br(u.location),d=ei(ta()),y=ym(d,`${r}\r`,f);return y.Style=hv(s),{inserted:!0,level:s,location:f,textLength:r.length}}insertTable(u){var p,E,b;const r=br(u.location),s=fv(u),f=ei(ta()),d=ty(f,r),y=(E=(p=f.Tables)==null?void 0:p.Add)==null?void 0:E.call(p,d,s.rowCount,s.columnCount);if(!((b=f.Tables)!=null&&b.Add))throw new Error("The active WPS document does not expose table insertion.");return s.values&&dv(y,s.values),{inserted:!0,location:r,rowCount:s.rowCount,columnCount:s.columnCount}}searchText(u){const r=Bu(u.query,"query"),s=ci(u.maxResults)??ti(this,oi),f=mm(u.matchCase),d=mm(u.matchWholeWord),y=ei(ta()),p=gv(Dr(y),r,{matchCase:f,matchWholeWord:d}),E=p.slice(0,s).map((b,N)=>({index:N+1,start:b.index,text:b.text}));return{query:r,count:p.length,results:E,truncated:p.length>E.length}}}ri=new WeakMap,oi=new WeakMap;function ey(c={}){return new pv(c)}var na;class vv{constructor(u){Ru(this,na);Uu(this,na,u)}supports(u){return ti(this,na).some(r=>r.supports(u))}async execute(u,r){const s=ti(this,na).find(f=>f.supports(u));if(!s)throw new Error(`Unknown Office tool: ${u}`);return s.execute(u,r)}}na=new WeakMap;function Sv(c){return new vv(c)}function bv(c){return typeof c=="object"&&c!==null&&!Array.isArray(c)?c:{}}function Er(c,u,r){return{tool_call_id:c.tool_call_id??c.id,name:c.name,status:u,content:JSON.stringify(r)}}function Ev(c){return c instanceof Error?c.message:String(c)}function Tv(c={}){const u=c.registry??Sv([c.adapter??ey()]);return async r=>{if(!u.supports(r.name))return Er(r,"error",{ok:!1,error:`Unknown Office tool: ${r.name}`});try{const s=await u.execute(r.name,bv(r.params));return Er(r,"success",{ok:!0,result:s})}catch(s){return Er(r,"error",{ok:!1,error:Ev(s)})}}}const Br="xpertai.chatkit.wps.config.v1",ly=600,Av="https://api.xpertai.cn/api/ai",_v="https://app.xpertai.cn/chatkit/index.html",xv="/api/create-session";function Mv(c){return c.replace(/\/+$/,"")}function Lr(c){if(typeof c!="string"&&typeof c!="number")return;const u=Number(c);return Number.isInteger(u)&&u>0?u:void 0}function Kl(c){return typeof c=="string"&&c.trim()?c.trim():void 0}function ny(){return typeof window>"u"?{}:window.XPERTAI_WPS_CONFIG??{}}function Cv(){if(typeof window>"u")return{};try{const c=window.localStorage.getItem(Br);if(!c)return{};const u=JSON.parse(c);return u&&typeof u=="object"&&!Array.isArray(u)?u:{}}catch{return{}}}function zv(...c){const u={};for(const r of c){const s=Kl(r.apiUrl),f=Kl(r.apiKey),d=Kl(r.xpertId),y=Kl(r.frameUrl),p=Lr(r.expiresAfter);s&&(u.apiUrl=s),f&&(u.apiKey=f),d&&(u.xpertId=d),y&&(u.frameUrl=y),p&&(u.expiresAfter=p)}return u}function Ov(){const c=ny().sessionMode;return c==="proxy"||c==="user-api-key"?c:"user-api-key"}function ay(){return zv({apiUrl:Av,frameUrl:_v,xpertId:void 0,apiKey:void 0,expiresAfter:Lr(void 0)},Cv(),ny())}function iy(c){const u=Kl(c.apiUrl),r=Kl(c.apiKey),s=Kl(c.xpertId),f=Kl(c.frameUrl);if(!u)throw new Error("XPERTAI_API_URL is required.");if(!r)throw new Error("XPERTAI_API_KEY is required.");if(!s)throw new Error("XPERTAI_XPERT_ID is required.");if(!f)throw new Error("XPERTAI_CHATKIT_FRAME_URL is required.");return{apiUrl:Mv(u),apiKey:r,xpertId:s,frameUrl:f,expiresAfter:Lr(c.expiresAfter)??ly}}function pm(){try{return iy(ay())}catch{return null}}function Dv(c){window.localStorage.setItem(Br,JSON.stringify(c))}function Rv(){window.localStorage.removeItem(Br)}async function vm(c){const u=await fetch(xv,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(c?{currentClientSecret:c}:{})}),r=await u.json().catch(()=>({}));if(!u.ok)throw new Error(r.error||`HTTP ${u.status}`);if(!r.client_secret||!r.apiUrl||!r.frameUrl||!r.xpertId)throw new Error("ChatKit session response is missing required fields.");return r}async function Sm(c){const u=`${c.apiUrl}/v1/chatkit/sessions`;let r;try{r=await fetch(u,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":c.apiKey},body:JSON.stringify({expires_after:c.expiresAfter??ly})})}catch(f){const d=typeof window>"u"?"unknown":window.location.origin;throw new Error(`Failed to fetch ${u}. Check network access and CORS. The API must allow origin ${d} and the x-api-key header. ${f instanceof Error?f.message:String(f)}`)}const s=await r.json().catch(()=>({}));if(!r.ok)throw new Error(s.error||r.statusText||`HTTP ${r.status}`);if(!s.client_secret)throw new Error("Missing client_secret in Xpert ChatKit session response.");return{client_secret:s.client_secret,expires_at:s.expires_at,expires_after:s.expires_after??c.expiresAfter,apiUrl:c.apiUrl,frameUrl:c.frameUrl,xpertId:c.xpertId,organizationId:null}}async function Uv(){const c=wp();return c?{host:c.Name,build:c.Build,version:c.Version,isWpsHost:!0}:{isWpsHost:!1}}function Qu(c){return c instanceof Error?c.message:String(c)}function wv(){return navigator.language.toLowerCase().startsWith("zh")?"zh-Hans":"en"}function Hv({createSession:c,initialSession:u,onConfigure:r}){const[s,f]=bt.useState(u),[d,y]=bt.useState(null),p=bt.useMemo(()=>Tv({adapter:ey()}),[]),E=bt.useMemo(()=>({frameUrl:s.frameUrl,locale:wv(),api:{apiUrl:s.apiUrl,xpertId:s.xpertId,getClientSecret:async N=>{const U=N?await c(N):s;return f(U),U.organizationId?{secret:U.client_secret,organizationId:U.organizationId}:U.client_secret}},theme:{colorScheme:"light",radius:"round",density:"compact",typography:{baseSize:14,fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'},color:{accent:{primary:"#0f766e",level:1}}},composer:{placeholder:"Ask XpertAI to edit this WPS document...",attachments:{enabled:!0}},startScreen:{greeting:"WPS Copilot is ready.",prompts:[{icon:"sparkle",label:"Draft an outline",prompt:"Create a structured outline for this document."},{icon:"square-text",label:"Improve selection",prompt:"Rewrite the selected paragraph to be clearer and more concise."}]},header:{enabled:!0,title:{enabled:!0,text:"XpertAI WPS Copilot"}},onClientTool:async N=>{y(null);const U=await p(N);return U.status==="error"&&y(typeof U.content=="string"?U.content:"Office tool failed."),U},onError:N=>{y(Qu(N))}}),[c,p,s]),b=kp(E);return K.jsxs("main",{className:"taskpane",children:[d?K.jsxs("div",{className:"status-banner error",children:[K.jsx("span",{children:d}),r?K.jsx("button",{className:"link-button",type:"button",onClick:r,children:"Settings"}):null]}):null,K.jsx(lv,{control:b.control,className:"chatkit-shell"})]})}function ui(c,u){const r=c.get(u);return typeof r=="string"?r:void 0}function Nv({error:c,initialConfig:u,isConnecting:r,onSave:s}){const[f,d]=bt.useState(null);function y(E){E.preventDefault();const b=new FormData(E.currentTarget);try{d(null),s(iy({apiUrl:ui(b,"apiUrl"),apiKey:ui(b,"apiKey"),xpertId:ui(b,"xpertId"),frameUrl:ui(b,"frameUrl"),expiresAfter:Number(ui(b,"expiresAfter"))}))}catch(N){d(Qu(N))}}function p(){Rv(),window.location.reload()}return K.jsx("main",{className:"taskpane settings",children:K.jsxs("form",{className:"settings-panel",onSubmit:y,children:[K.jsxs("div",{className:"settings-header",children:[K.jsx("h1",{children:"XpertAI WPS Copilot"}),K.jsx("p",{children:"Use your own XpertAI API key on this device."})]}),c||f?K.jsx("div",{className:"settings-error",children:f??c}):null,K.jsxs("label",{children:[K.jsx("span",{children:"API URL"}),K.jsx("input",{name:"apiUrl",required:!0,defaultValue:u.apiUrl??"",autoComplete:"url"})]}),K.jsxs("label",{children:[K.jsx("span",{children:"API Key"}),K.jsx("input",{name:"apiKey",required:!0,type:"password",defaultValue:u.apiKey??"",autoComplete:"off"})]}),K.jsxs("label",{children:[K.jsx("span",{children:"Xpert ID"}),K.jsx("input",{name:"xpertId",required:!0,defaultValue:u.xpertId??"",autoComplete:"off"})]}),K.jsxs("label",{children:[K.jsx("span",{children:"ChatKit Frame URL"}),K.jsx("input",{name:"frameUrl",required:!0,defaultValue:u.frameUrl??"",autoComplete:"url"})]}),K.jsxs("label",{children:[K.jsx("span",{children:"Secret TTL Seconds"}),K.jsx("input",{name:"expiresAfter",inputMode:"numeric",defaultValue:u.expiresAfter??600})]}),K.jsxs("div",{className:"settings-actions",children:[K.jsx("button",{disabled:r,type:"submit",children:r?"Connecting...":"Save and Connect"}),K.jsx("button",{disabled:r,type:"button",onClick:p,children:"Clear"})]})]})})}function bm(){return K.jsx("main",{className:"taskpane centered",children:K.jsxs("div",{className:"status-card",children:[K.jsx("h1",{children:"XpertAI WPS Copilot"}),K.jsx("p",{children:"Connecting..."})]})})}function Em({message:c}){return K.jsx("main",{className:"taskpane centered",children:K.jsxs("div",{className:"status-card",children:[K.jsx("h1",{children:"XpertAI WPS Copilot"}),K.jsx("p",{children:c})]})})}function Bv(){const[c]=bt.useState(()=>Ov()),[u,r]=bt.useState(null),[s,f]=bt.useState(null),[d,y]=bt.useState(()=>pm()),[p,E]=bt.useState(!1),[b,N]=bt.useState(!0),[U,W]=bt.useState(null),st=bt.useCallback(async it=>{N(!0),W(null);try{const Mt=await Sm(it);Dv(it),y(it),f(Mt),E(!1)}catch(Mt){f(null),E(!0),W(Qu(Mt))}finally{N(!1)}},[]);bt.useEffect(()=>{let it=!1;async function Mt(){try{const Tt=await Uv();if(it)return;if(r(Tt),c==="proxy"){const Ht=await vm();it||(f(Ht),N(!1));return}const wt=pm();if(y(wt),!wt){E(!0),N(!1);return}await st(wt)}catch(Tt){it||(W(Qu(Tt)),E(c==="user-api-key"),N(!1))}}return Mt(),()=>{it=!0}},[st,c]);const Et=bt.useCallback(it=>c==="proxy"?vm(it):d?Sm(d):Promise.reject(new Error("XPERTAI_API_KEY is not configured.")),[c,d]);return!u&&!p?U?K.jsx(Em,{message:U}):K.jsx(bm,{}):c==="user-api-key"&&(p||!s)?K.jsx(Nv,{error:U,initialConfig:ay(),isConnecting:b,onSave:st}):U&&!s?K.jsx(Em,{message:U}):s?K.jsx(Hv,{createSession:Et,initialSession:s,onConfigure:c==="user-api-key"?()=>E(!0):void 0}):K.jsx(bm,{})}const uy=document.getElementById("root");if(!uy)throw new Error("Missing #root element.");function Lv(){return new Promise(c=>{const u=document.createElement("script");u.src=new URL("config.js",window.location.href).toString(),u.onload=()=>c(),u.onerror=()=>c(),document.head.appendChild(u)})}Lv().then(()=>{Kp.createRoot(uy).render(K.jsx(bt.StrictMode,{children:K.jsx(Bv,{})}))});
|