PageSourceSearch

https://toan-vt.github.io/assets/index-tvdeLv6c.js

js toan-vt.github.io collected 2026-10-03 10:05:19 UTC 476,751 bytes, 382 lines download raw bytes

vendor: 4,155 bytes, lines 1-17
1(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))a(r);new MutationObserver(r=>{for(const d of r)if(d.type==="childList")for(const m of d.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&a(m)}).observe(document,{childList:!0,subtree:!0});function o(r){const d={};return r.integrity&&(d.integrity=r.integrity),r.referrerPolicy&&(d.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?d.credentials="include":r.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function a(r){if(r.ep)return;r.ep=!0;const d=o(r);fetch(r.href,d)}})();function uh(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Ou={exports:{}},Yl={};/**
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 Ep;function r0(){if(Ep)return Yl;Ep=1;var i=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function o(a,r,d){var m=null;if(d!==void 0&&(m=""+d),r.key!==void 0&&(m=""+r.key),"key"in r){d={};for(var g in r)g!=="key"&&(d[g]=r[g])}else d=r;return r=d.ref,{$$typeof:i,type:a,key:m,ref:r!==void 0?r:null,props:d}}return Yl.Fragment=n,Yl.jsx=o,Yl.jsxs=o,Yl}var Cp;function c0(){return Cp||(Cp=1,Ou.exports=r0()),Ou.exports}var C=c0(),Fu={exports:{}},re={};/**
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 Ap;function f0(){if(Ap)return re;Ap=1;var i=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),m=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),_=Symbol.iterator;function x(M){return M===null||typeof M!="object"?null:(M=_&&M[_]||M["@@iterator"],typeof M=="function"?M:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},U=Object.assign,k={};function B(M,V,K){this.props=M,this.context=V,this.refs=k,this.updater=K||b}B.prototype.isReactComponent={},B.prototype.setState=function(M,V){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,V,"setState")},B.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function W(){}W.prototype=B.prototype;function P(M,V,K){this.props=M,this.context=V,this.refs=k,this.updater=K||b}var Z=P.prototype=new W;Z.constructor=P,U(Z,B.prototype),Z.isPureReactComponent=!0;var ee=Array.isArray;function te(){}var J={H:null,A:null,T:null,S:null},O=Object.prototype.hasOwnProperty;function F(M,V,K){var j=K.ref;return{$$typeof:i,type:M,key:V,ref:j!==void 0?j:null,props:K}}function Q(M,V){return F(M.type,V,M.props)}function se(M){return typeof M=="object"&&M!==null&&M.$$typeof===i}function ue(M){var V={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(K){return V[K]})}var He=/\/+/g;function lt(M,V){return typeof M=="object"&&M!==null&&M.key!=null?ue(""+M.key):V.toString(36)}function tt(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(te,te):(M.status="pending",M.then(function(V){M.status==="pending"&&(M.status="fulfilled",M.value=V)},function(V){M.status==="pending"&&(M.status="rejected",M.reason=V)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function q(M,V,K,j,ce){var pe=typeof M;(pe==="undefined"||pe==="boolean")&&(M=null);var Ce=!1;
vendor: 17,284 bytes, lines 17-41
17if(M===null)Ce=!0;else switch(pe){case"bigint":case"string":case"number":Ce=!0;break;case"object":switch(M.$$typeof){case i:case n:Ce=!0;break;case v:return Ce=M._init,q(Ce(M._payload),V,K,j,ce)}}if(Ce)return ce=ce(M),Ce=j===""?"."+lt(M,0):j,ee(ce)?(K="",Ce!=null&&(K=Ce.replace(He,"$&/")+"/"),q(ce,V,K,"",function($i){return $i})):ce!=null&&(se(ce)&&(ce=Q(ce,K+(ce.key==null||M&&M.key===ce.key?"":(""+ce.key).replace(He,"$&/")+"/")+Ce)),V.push(ce)),1;Ce=0;var ot=j===""?".":j+":";if(ee(M))for(var Ve=0;Ve<M.length;Ve++)j=M[Ve],pe=ot+lt(j,Ve),Ce+=q(j,V,K,pe,ce);else if(Ve=x(M),typeof Ve=="function")for(M=Ve.call(M),Ve=0;!(j=M.next()).done;)j=j.value,pe=ot+lt(j,Ve++),Ce+=q(j,V,K,pe,ce);else if(pe==="object"){if(typeof M.then=="function")return q(tt(M),V,K,j,ce);throw V=String(M),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return Ce}function Y(M,V,K){if(M==null)return M;var j=[],ce=0;return q(M,j,"","",function(pe){return V.call(K,pe,ce++)}),j}function ae(M){if(M._status===-1){var V=M._result;V=V(),V.then(function(K){(M._status===0||M._status===-1)&&(M._status=1,M._result=K)},function(K){(M._status===0||M._status===-1)&&(M._status=2,M._result=K)}),M._status===-1&&(M._status=0,M._result=V)}if(M._status===1)return M._result.default;throw M._result}var Me=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},De={map:Y,forEach:function(M,V,K){Y(M,function(){V.apply(this,arguments)},K)},count:function(M){var V=0;return Y(M,function(){V++}),V},toArray:function(M){return Y(M,function(V){return V})||[]},only:function(M){if(!se(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return re.Activity=S,re.Children=De,re.Component=B,re.Fragment=o,re.Profiler=r,re.PureComponent=P,re.StrictMode=a,re.Suspense=y,re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=J,re.__COMPILER_RUNTIME={__proto__:null,c:function(M){return J.H.useMemoCache(M)}},re.cache=function(M){return function(){return M.apply(null,arguments)}},re.cacheSignal=function(){return null},re.cloneElement=function(M,V,K){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var j=U({},M.props),ce=M.key;if(V!=null)for(pe in V.key!==void 0&&(ce=""+V.key),V)!O.call(V,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&V.ref===void 0||(j[pe]=V[pe]);var pe=arguments.length-2;if(pe===1)j.children=K;else if(1<pe){for(var Ce=Array(pe),ot=0;ot<pe;ot++)Ce[ot]=arguments[ot+2];j.children=Ce}return F(M.type,ce,j)},re.createContext=function(M){return M={$$typeof:m,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:d,_context:M},M},re.createElement=function(M,V,K){var j,ce={},pe=null;if(V!=null)for(j in V.key!==void 0&&(pe=""+V.key),V)O.call(V,j)&&j!=="key"&&j!=="__self"&&j!=="__source"&&(ce[j]=V[j]);var Ce=arguments.length-2;if(Ce===1)ce.children=K;else if(1<Ce){for(var ot=Array(Ce),Ve=0;Ve<Ce;Ve++)ot[Ve]=arguments[Ve+2];ce.children=ot}if(M&&M.defaultProps)for(j in Ce=M.defaultProps,Ce)ce[j]===void 0&&(ce[j]=Ce[j]);return F(M,pe,ce)},re.createRef=function(){return{current:null}},re.forwardRef=function(M){return{$$typeof:g,render:M}},re.isValidElement=se,re.lazy=function(M){return{$$typeof:v,_payload:{_status:-1,_result:M},_init:ae}},re.memo=function(M,V){return{$$typeof:h,type:M,compare:V===void 0?null:V}},re.startTransition=function(M){var V=J.T,K={};J.T=K;try{var j=M(),ce=J.S;ce!==null&&ce(K,j),typeof j=="object"&&j!==null&&typeof j.then=="function"&&j.then(te,Me)}catch(pe){Me(pe)}finally{V!==null&&K.types!==null&&(V.types=K.types),J.T=V}},re.unstable_useCacheRefresh=function(){return J.H.useCacheRefresh()},re.use=function(M){return J.H.use(M)},re.useActionState=function(M,V,K){return J.H.useActionState(M,V,K)},re.useCallback=function(M,V){return J.H.useCallback(M,V)},re.useContext=function(M){return J.H.useContext(M)},re.useDebugValue=function(){},re.useDeferredValue=function(M,V){return J.H.useDeferredValue(M,V)},re.useEffect=function(M,V){return J.H.useEffect(M,V)},re.useEffectEvent=function(M){return J.H.useEffectEvent(M)},re.useId=function(){return J.H.useId()},re.useImperativeHandle=function(M,V,K){return J.H.useImperativeHandle(M,V,K)},re.useInsertionEffect=function(M,V){return J.H.useInsertionEffect(M,V)},re.useLayoutEffect=function(M,V){return J.H.useLayoutEffect(M,V)},re.useMemo=function(M,V){return J.H.useMemo(M,V)},re.useOptimistic=function(M,V){return J.H.useOptimistic(M,V)},re.useReducer=function(M,V,K){return J.H.useReducer(M,V,K)},re.useRef=function(M){return J.H.useRef(M)},re.useState=function(M){return J.H.useState(M)},re.useSyncExternalStore=function(M,V,K){return J.H.useSyncExternalStore(M,V,K)},re.useTransition=function(){return J.H.useTransition()},re.version="19.2.0",re}var xp;function cr(){return xp||(xp=1,Fu.exports=f0()),Fu.exports}var le=cr();const d0=uh(le);var Yu={exports:{}},Jl={},Ju={exports:{}},Ku={};/**
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 Np;function p0(){return Np||(Np=1,(function(i){function n(q,Y){var ae=q.length;q.push(Y);e:for(;0<ae;){var Me=ae-1>>>1,De=q[Me];if(0<r(De,Y))q[Me]=Y,q[ae]=De,ae=Me;else break e}}function o(q){return q.length===0?null:q[0]}function a(q){if(q.length===0)return null;var Y=q[0],ae=q.pop();if(ae!==Y){q[0]=ae;e:for(var Me=0,De=q.length,M=De>>>1;Me<M;){var V=2*(Me+1)-1,K=q[V],j=V+1,ce=q[j];if(0>r(K,ae))j<De&&0>r(ce,K)?(q[Me]=ce,q[j]=ae,Me=j):(q[Me]=K,q[V]=ae,Me=V);else if(j<De&&0>r(ce,ae))q[Me]=ce,q[j]=ae,Me=j;else break e}}return Y}function r(q,Y){var ae=q.sortIndex-Y.sortIndex;return ae!==0?ae:q.id-Y.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;i.unstable_now=function(){return d.now()}}else{var m=Date,g=m.now();i.unstable_now=function(){return m.now()-g}}var y=[],h=[],v=1,S=null,_=3,x=!1,b=!1,U=!1,k=!1,B=typeof setTimeout=="function"?setTimeout:null,W=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;function Z(q){for(var Y=o(h);Y!==null;){if(Y.callback===null)a(h);else if(Y.startTime<=q)a(h),Y.sortIndex=Y.expirationTime,n(y,Y);else break;Y=o(h)}}function ee(q){if(U=!1,Z(q),!b)if(o(y)!==null)b=!0,te||(te=!0,ue());else{var Y=o(h);Y!==null&&tt(ee,Y.startTime-q)}}var te=!1,J=-1,O=5,F=-1;function Q(){return k?!0:!(i.unstable_now()-F<O)}function se(){if(k=!1,te){var q=i.unstable_now();F=q;var Y=!0;try{e:{b=!1,U&&(U=!1,W(J),J=-1),x=!0;var ae=_;try{t:{for(Z(q),S=o(y);S!==null&&!(S.expirationTime>q&&Q());){var Me=S.callback;if(typeof Me=="function"){S.callback=null,_=S.priorityLevel;var De=Me(S.expirationTime<=q);if(q=i.unstable_now(),typeof De=="function"){S.callback=De,Z(q),Y=!0;break t}S===o(y)&&a(y),Z(q)}else a(y);S=o(y)}if(S!==null)Y=!0;else{var M=o(h);M!==null&&tt(ee,M.startTime-q),Y=!1}}break e}finally{S=null,_=ae,x=!1}Y=void 0}}finally{Y?ue():te=!1}}}var ue;if(typeof P=="function")ue=function(){P(se)};else if(typeof MessageChannel<"u"){var He=new MessageChannel,lt=He.port2;He.port1.onmessage=se,ue=function(){lt.postMessage(null)}}else ue=function(){B(se,0)};function tt(q,Y){J=B(function(){q(i.unstable_now())},Y)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(q){q.callback=null},i.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<q?Math.floor(1e3/q):5},i.unstable_getCurrentPriorityLevel=function(){return _},i.unstable_next=function(q){switch(_){case 1:case 2:case 3:var Y=3;break;default:Y=_}var ae=_;_=Y;try{return q()}finally{_=ae}},i.unstable_requestPaint=function(){k=!0},i.unstable_runWithPriority=function(q,Y){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var ae=_;_=q;try{return Y()}finally{_=ae}},i.unstable_scheduleCallback=function(q,Y,ae){var Me=i.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?Me+ae:Me):ae=Me,q){case 1:var De=-1;break;case 2:De=250;break;case 5:De=1073741823;break;case 4:De=1e4;break;default:De=5e3}return De=ae+De,q={id:v++,callback:Y,priorityLevel:q,startTime:ae,expirationTime:De,sortIndex:-1},ae>Me?(q.sortIndex=ae,n(h,q),o(y)===null&&q===o(h)&&(U?(W(J),J=-1):U=!0,tt(ee,ae-Me))):(q.sortIndex=De,n(y,q),b||x||(b=!0,te||(te=!0,ue()))),q},i.unstable_shouldYield=Q,i.unstable_wrapCallback=function(q){var Y=_;return function(){var ae=_;_=Y;try{return q.apply(this,arguments)}finally{_=ae}}}})(Ku)),Ku}var Mp;function m0(){return Mp||(Mp=1,Ju.exports=p0()),Ju.exports}var Xu={exports:{}},nt={};/**
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 Rp;function h0(){if(Rp)return nt;Rp=1;var i=cr();function n(y){var h="https://react.dev/errors/"+y;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)h+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+y+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var a={d:{f:o,r:function(){throw Error(n(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},r=Symbol.for("react.portal");function d(y,h,v){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:r,key:S==null?null:""+S,children:y,containerInfo:h,implementation:v}}var m=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(y,h){if(y==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return nt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,nt.createPortal=function(y,h){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(n(299));return d(y,h,null,v)},nt.flushSync=function(y){var h=m.T,v=a.p;try{if(m.T=null,a.p=2,y)return y()}finally{m.T=h,a.p=v,a.d.f()}},nt.preconnect=function(y,h){typeof y=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(y,h))},nt.prefetchDNS=function(y){typeof y=="string"&&a.d.D(y)},nt.preinit=function(y,h){if(typeof y=="string"&&h&&typeof h.as=="string"){var v=h.as,S=g(v,h.crossOrigin),_=typeof h.integrity=="string"?h.integrity:void 0,x=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;v==="style"?a.d.S(y,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:S,integrity:_,fetchPriority:x}):v==="script"&&a.d.X(y,{crossOrigin:S,integrity:_,fetchPriority:x,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},nt.preinitModule=function(y,h){if(typeof y=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var v=g(h.as,h.crossOrigin);a.d.M(y,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(y)},nt.preload=function(y,h){if(typeof y=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var v=h.as,S=g(v,h.crossOrigin);a.d.L(y,v,{crossOrigin:S,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},nt.preloadModule=function(y,h){if(typeof y=="string")if(h){var v=g(h.as,h.crossOrigin);a.d.m(y,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(y)},nt.requestFormReset=function(y){a.d.r(y)},nt.unstable_batchedUpdates=function(y,h){return y(h)},nt.useFormState=function(y,h,v){return m.H.useFormState(y,h,v)},nt.useFormStatus=function(){return m.H.useHostTransitionStatus()},nt.version="19.2.0",nt}var bp;function g0(){if(bp)return Xu.exports;bp=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(n){console.error(n)}}return i(),Xu.exports=h0(),Xu.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 wp;function y0(){if(wp)return Jl;wp=1;var i=m0(),n=cr(),o=g0();function a(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function m(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(d(e)!==e)throw Error(a(188))}function h(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(a(188));return t!==e?null:e}for(var l=e,s=t;;){var f=l.return;if(f===null)break;var p=f.alternate;if(p===null){if(s=f.return,s!==null){l=s;continue}break}if(f.child===p.child){for(p=f.child;p;){if(p===l)return y(f),e;if(p===s)return y(f),t;p=p.sibling}throw Error(a(188))}if(l.return!==s.return)l=f,s=p;else{for(var T=!1,E=f.child;E;){if(E===l){T=!0,l=f,s=p;break}if(E===s){T=!0,s=f,l=p;break}E=E.sibling}if(!T){for(E=p.child;E;){if(E===l){T=!0,l=p,s=f;break}if(E===s){T=!0,s=p,l=f;break}E=E.sibling}if(!T)throw Error(a(189))}}if(l.alternate!==s)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var S=Object.assign,_=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),U=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),W=Symbol.for("react.consumer"),P=Symbol.for("react.context"),Z=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),te=Symbol.for("react.suspense_list"),J=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),Q=Symbol.for("react.memo_cache_sentinel"),se=Symbol.iterator;function ue(e){return e===null||typeof e!="object"?null:(e=se&&e[se]||e["@@iterator"],typeof e=="function"?e:null)}var He=Symbol.for("react.client.reference");function lt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===He?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case U:return"Fragment";case B:return"Profiler";case k:return"StrictMode";case ee:return"Suspense";case te:return"SuspenseList";case F:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case b:return"Portal";case P:return e.displayName||"Context";case W:return(e._context.displayName||"Context")+".Consumer";case Z:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case J:return t=e.displayName||null,t!==null?t:lt(e.type)||"Memo";case O:t=e._payload,e=e._init;try{return lt(e(t))}catch{}}return null}var tt=Array.isArray,q=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},Me=[],De=-1;function M(e){return{current:e}}function V(e){0>De||(e.current=Me[De],Me[De]=null,De--)}function K(e,t){De++,Me[De]=e.current,e.current=t}var j=M(null),ce=M(null),pe=M(null),Ce=M(null);function ot(e,t){switch(K(pe,t),K(ce,e),K(j,null),t.nodeType){case 9:case 11:e=(e
vendor: 12,037 bytes, lines 41-48
41=t.documentElement)&&(e=e.namespaceURI)?Yd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Yd(t),e=Jd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}V(j),K(j,e)}function Ve(){V(j),V(ce),V(pe)}function $i(e){e.memoizedState!==null&&K(Ce,e);var t=j.current,l=Jd(t,e.type);t!==l&&(K(ce,e),K(j,l))}function Ql(e){ce.current===e&&(V(j),V(ce)),Ce.current===e&&(V(Ce),Pl._currentValue=ae)}var xa,Sr;function Pn(e){if(xa===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);xa=t&&t[1]||"",Sr=-1<l.stack.indexOf(`
42    at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43`+xa+e+Sr}var Na=!1;function Ma(e,t){if(!e||Na)return"";Na=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var z=function(){throw Error()};if(Object.defineProperty(z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(z,[])}catch(L){var I=L}Reflect.construct(e,[],z)}else{try{z.call()}catch(L){I=L}e.call(z.prototype)}}else{try{throw Error()}catch(L){I=L}(z=e())&&typeof z.catch=="function"&&z.catch(function(){})}}catch(L){if(L&&I&&typeof L.stack=="string")return[L.stack,I.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=s.DetermineComponentFrameRoot(),T=p[0],E=p[1];if(T&&E){var A=T.split(`
44`),D=E.split(`
45`);for(f=s=0;s<A.length&&!A[s].includes("DetermineComponentFrameRoot");)s++;for(;f<D.length&&!D[f].includes("DetermineComponentFrameRoot");)f++;if(s===A.length||f===D.length)for(s=A.length-1,f=D.length-1;1<=s&&0<=f&&A[s]!==D[f];)f--;for(;1<=s&&0<=f;s--,f--)if(A[s]!==D[f]){if(s!==1||f!==1)do if(s--,f--,0>f||A[s]!==D[f]){var G=`
46`+A[s].replace(" at new "," at ");return e.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",e.displayName)),G}while(1<=s&&0<=f);break}}}finally{Na=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Pn(l):""}function Vh(e,t){switch(e.tag){case 26:case 27:case 5:return Pn(e.type);case 16:return Pn("Lazy");case 13:return e.child!==t&&t!==null?Pn("Suspense Fallback"):Pn("Suspense");case 19:return Pn("SuspenseList");case 0:case 15:return Ma(e.type,!1);case 11:return Ma(e.type.render,!1);case 1:return Ma(e.type,!0);case 31:return Pn("Activity");default:return""}}function _r(e){try{var t="",l=null;do t+=Vh(e,l),l=e,e=e.return;while(e);return t}catch(s){return`
47Error generating stack: `+s.message+`
48`+s.stack}}var Ra=Object.prototype.hasOwnProperty,ba=i.unstable_scheduleCallback,wa=i.unstable_cancelCallback,Ph=i.unstable_shouldYield,Bh=i.unstable_requestPaint,gt=i.unstable_now,Oh=i.unstable_getCurrentPriorityLevel,Er=i.unstable_ImmediatePriority,Cr=i.unstable_UserBlockingPriority,Zl=i.unstable_NormalPriority,Fh=i.unstable_LowPriority,Ar=i.unstable_IdlePriority,Yh=i.log,Jh=i.unstable_setDisableYieldValue,ji=null,yt=null;function mn(e){if(typeof Yh=="function"&&Jh(e),yt&&typeof yt.setStrictMode=="function")try{yt.setStrictMode(ji,e)}catch{}}var vt=Math.clz32?Math.clz32:Qh,Kh=Math.log,Xh=Math.LN2;function Qh(e){return e>>>=0,e===0?32:31-(Kh(e)/Xh|0)|0}var Wl=256,$l=262144,jl=4194304;function Bn(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function eo(e,t,l){var s=e.pendingLanes;if(s===0)return 0;var f=0,p=e.suspendedLanes,T=e.pingedLanes;e=e.warmLanes;var E=s&134217727;return E!==0?(s=E&~p,s!==0?f=Bn(s):(T&=E,T!==0?f=Bn(T):l||(l=E&~e,l!==0&&(f=Bn(l))))):(E=s&~p,E!==0?f=Bn(E):T!==0?f=Bn(T):l||(l=s&~e,l!==0&&(f=Bn(l)))),f===0?0:t!==0&&t!==f&&(t&p)===0&&(p=f&-f,l=t&-t,p>=l||p===32&&(l&4194048)!==0)?t:f}function el(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Zh(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function xr(){var e=jl;return jl<<=1,(jl&62914560)===0&&(jl=4194304),e}function Da(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function tl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Wh(e,t,l,s,f,p){var T=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var E=e.entanglements,A=e.expirationTimes,D=e.hiddenUpdates;for(l=T&~l;0<l;){var G=31-vt(l),z=1<<G;E[G]=0,A[G]=-1;var I=D[G];if(I!==null)for(D[G]=null,G=0;G<I.length;G++){var L=I[G];L!==null&&(L.lane&=-536870913)}l&=~z}s!==0&&Nr(e,s,0),p!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=p&~(T&~t))}function Nr(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-vt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|l&261930}function Mr(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var s=31-vt(l),f=1<<s;f&t|e[s]&t&&(e[s]|=t),l&=~f}}function Rr(e,t){var l=t&-t;return l=(l&42)!==0?1:Ia(l),(l&(e.suspendedLanes|t))!==0?0:l}function Ia(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ua(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function br(){var e=Y.p;return e!==0?e:(e=window.event,e===void 0?32:hp(e.type))}function wr(e,t){var l=Y.p;try{return Y.p=e,t()}finally{Y.p=l}}var hn=Math.random().toString(36).slice(2),Ze="__reactFiber$"+hn,ut="__reactProps$"+hn,si="__reactContainer$"+hn,La="__reactEvents$"+hn,$h="__reactListeners$"+hn,jh="__reactHandles$"+hn,Dr="__reactResources$"+hn,nl="__reactMarker$"+hn;function qa(e){delete e[Ze],delete e[ut],delete e[La],delete e[$h],delete e[jh]}function ui(e){var t=e[Ze];if(t)return t;for(var l=e.parentNode;l;){if(t=l[si]||l[Ze]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=jd(e);e!==null;){if(l=e[Ze])return l;e=jd(e)}return t}e=l,l=e.parentNode}return null}function ri(e){if(e=e[Ze]||e[si]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function il(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(a(33))}function ci(e){var t=e[Dr];return t||(t=e[Dr]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Xe(e){e[nl]=!0}var Ir=new Set,Ur={};function On(e,t){fi(e,t),fi(e+"Capture",t)}function fi(e,t){for(Ur[e]=t,e=0;e<t.length;e++)Ir.add(t[e])}var eg=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]*$"),Lr={},qr={};function tg(e){return Ra.call(qr,e)?!0:Ra.call(Lr,e)?!1:eg.test(e)?qr[e]=!0:(Lr[e]=!0,!1)}function to(e,t,l){if(tg(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function no(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function Jt(e,t,l,s){if(s===null)e.removeAttribute(l);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+s)}}function Mt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Gr(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ng(e,t,l){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var f=s.get,p=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return f.call(this)},set:function(T){l=""+T,p.call(this,T)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return l},setValue:function(T){l=""+T},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ga(e){if(!e._valueTracker){var t=Gr(e)?"checked":"value";e._valueTracker=ng(e,t,""+e[t])}}function Hr(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),s="";return e&&(s=Gr(e)?e.checked?"true":"false":e.value),e=s,e!==l?(t.setValue(e),!0):!1}function io(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var ig=/[\n"\\]/g;function Rt(e){return e.replace(ig,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ha(e,t,l,s,f,p,T,E){e.name="",T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?e.type=T:e.removeAttribute("type"),t!=null?T==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Mt(t)):e.value!==""+Mt(t)&&(e.value=""+Mt(t)):T!=="submit"&&T!=="reset"||e.removeAttribute("value"),t!=null?za(e,T,Mt(t)):l!=null?za(e,T,Mt(l)):s!=null&&e.removeAttribute("value"),f==null&&p!=null&&(e.defaultChecked=!!p),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+Mt(E):e.removeAttribute("name")}function zr(e,t,l,s,f,p,T,E){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.type=p),t!=null||l!=null){if(!(p!=="submit"&&p!=="reset"||t!=null)){Ga(e);return}l=l!=null?""+Mt(l):"",t=t!=null?""+Mt(t):l,E||t===e.value||(e.value=t),e.defaultValue=t}s=s??f,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=E?e.checked:!!s,e.defaultChecked=!!s,T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(e.name=T),Ga(e)}function za(e,t,l){t==="number"&&io(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function di(e,t,l,s){if(e=e.options,t){t={};for(var f=0;f<l.length;f++)t["$"+l[f]]=!0;for(l=0;l<e.length;l++)f=t.hasOwnProperty("$"+e[l].value),e[l].selected!==f&&(e[l].selected=f),f&&s&&(e[l].defaultSelected=!0)}else{for(l=""+Mt(l),t=null,f=0;f<e.length;f++){if(e[f].value===l){e[f].selected=!0,s&&(e[f].defaultSelected=!0);return}t!==null||e[f].disabled||(t=e[f])}t!==null&&(t.selected=!0)}}function kr(e,t,l){if(t!=null&&(t=""+Mt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Mt(l):""}function Vr(e,t,l,s){if(t==null){if(s!=null){if(l!=null)throw Error(a(92));if(tt(s)){if(1<s.length)throw Error(a(93));s=s[0]}l=s}l==null&&(l=""),t=l}l=Mt(t),e.defaultValue=l,s=e.textContent,s===l&&s!==""&&s!==null&&(e.value=s),Ga(e)}function pi(e,t){if(t){var l=e.firstChild;
vendor: 4,140 bytes, line 48
48if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var lg=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 Pr(e,t,l){var s=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,l):typeof l!="number"||l===0||lg.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function Br(e,t,l){if(t!=null&&typeof t!="object")throw Error(a(62));if(e=e.style,l!=null){for(var s in l)!l.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var f in t)s=t[f],t.hasOwnProperty(f)&&l[f]!==s&&Pr(e,f,s)}else for(var p in t)t.hasOwnProperty(p)&&Pr(e,p,t[p])}function ka(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var og=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
48-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"]]),ag=/^[\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 lo(e){return ag.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Kt(){}var Va=null;function Pa(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var mi=null,hi=null;function Or(e){var t=ri(e);if(t&&(e=t.stateNode)){var l=e[ut]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ha(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Rt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var s=l[t];if(s!==e&&s.form===e.form){var f=s[ut]||null;if(!f)throw Error(a(90));Ha(s,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(t=0;t<l.length;t++)s=l[t],s.form===e.form&&Hr(s)}break e;case"textarea":kr(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&di(e,!!l.multiple,t,!1)}}}var Ba=!1;function Fr(e,t,l){if(Ba)return e(t,l);Ba=!0;try{var s=e(t);return s}finally{if(Ba=!1,(mi!==null||hi!==null)&&(Jo(),mi&&(t=mi,e=hi,hi=mi=null,Or(t),e)))for(t=0;t<e.length;t++)Or(e[t])}}function ll(e,t){var l=e.stateNode;if(l===null)return null;var s=l[ut]||null;if(s===null)return null;l=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(a(231,t,typeof l));return l}var Xt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Oa=!1;if(Xt)try{var ol={};Object.defineProperty(ol,"passive",{get:function(){Oa=!0}}),window.addEventListener("test",ol,ol),window.removeEventListener("test",ol,ol)}catch{Oa=!1}var gn=null,Fa=null,oo=null;function Yr(){if(oo)return oo;var e,t=Fa,l=t.length,s,f="value"in gn?gn.value:gn.textContent,p=f.length;for(e=0;e<l&&t[e]===f[e];e++);var T=l-e;for(s=1;s<=T&&t[l-s]===f[p-s];s++);return oo=f.slice(e,1<s?1-s:void 0)}function ao(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function so(){return!0}function Jr(){return!1}function rt(e){function t(l,s,f,p,T){this._reactName=l,this._targetInst=f,this.type=s,this.nativeEvent=p,this.target=T,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(l=e[E],this[E]=l?l(p):p[E]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?so:Jr,this.isPropagationStopped=Jr,this}return S(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=so)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=so)},persist:function(){},isPersistent:so}),t}var Fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},uo=rt(Fn),al=S({},Fn,{view:0,detail:0}),sg=rt(al),Ya,Ja,sl,ro=S({},al,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xa,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==sl&&(sl&&e.type==="mousemove"?(Ya=e.screenX-sl.screenX,Ja=e.screenY-sl.screenY):Ja=Ya=0,sl=e),Ya)},movementY:function(e){return"movementY"in e?e.movementY:Ja}}),Kr=rt(ro),ug=S({},ro,{dataTransfer:0}
vendor: 4,719 bytes, line 48
48),rg=rt(ug),cg=S({},al,{relatedTarget:0}),Ka=rt(cg),fg=S({},Fn,{animationName:0,elapsedTime:0,pseudoElement:0}),dg=rt(fg),pg=S({},Fn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),mg=rt(pg),hg=S({},Fn,{data:0}),Xr=rt(hg),gg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yg={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"},vg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Tg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=vg[e])?!!t[e]:!1}function Xa(){return Tg}var Sg=S({},al,{key:function(e){if(e.key){var t=gg[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ao(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?yg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xa,charCode:function(e){return e.type==="keypress"?ao(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ao(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_g=rt(Sg),Eg=S({},ro,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Qr=rt(Eg),Cg=S({},al,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xa}),Ag=rt(Cg),xg=S({},Fn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ng=rt(xg),Mg=S({},ro,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Rg=rt(Mg),bg=S({},Fn,{newState:0,oldState:0}),wg=rt(bg),Dg=[9,13,27,32],Qa=Xt&&"CompositionEvent"in window,ul=null;Xt&&"documentMode"in document&&(ul=document.documentMode);var Ig=Xt&&"TextEvent"in window&&!ul,Zr=Xt&&(!Qa||ul&&8<ul&&11>=ul),Wr=" ",$r=!1;function jr(e,t){switch(e){case"keyup":return Dg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ec(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var gi=!1;function Ug(e,t){switch(e){case"compositionend":return ec(t);case"keypress":return t.which!==32?null:($r=!0,Wr);case"textInput":return e=t.data,e===Wr&&$r?null:e;default:return null}}function Lg(e,t){if(gi)return e==="compositionend"||!Qa&&jr(e,t)?(e=Yr(),oo=Fa=gn=null,gi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Zr&&t.locale!=="ko"?null:t.data;default:return null}}var qg={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 tc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!qg[e.type]:t==="textarea"}function nc(e,t,l,s){mi?hi?hi.push(s):hi=[s]:mi=s,t=jo(t,"onChange"),0<t.length&&(l=new uo("onChange","change",null,l,s),e.push({event:l,listeners:t}))}var rl=null,cl=null;function Gg(e){kd(e,0)}function co(e){var t=il(e);if(Hr(t))return e}function ic(e,t){if(e==="change")return t}var lc=!1;if(Xt){var Za;if(Xt){var Wa="oninput"in document;if(!Wa){var oc=document.createElement("div");oc.setAttribute("oninput","return;"),Wa=typeof oc.oninput=="function"}Za=Wa}else Za=!1;lc=Za&&(!document.documentMode||9<document.documentMode)}function ac(){rl&&(rl.detachEvent("onpropertychange",sc),cl=rl=null)}function sc(e){if(e.propertyName==="value"&&co(cl)){var t=[];nc(t,cl,e,Pa(e)),Fr(Gg,t)}}function Hg(e,t,l){e==="focusin"?(ac(),rl=t,cl=l,rl.attachEvent("onpropertychange",sc)):e==="focusout"&&ac()}function zg(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return co(cl)}function kg(e,t){if(e==="click")return co(t)}function Vg(e,t){if(e==="input"||e==="change")return co(t)}function Pg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tt=typeof Object.is=="function"?Object.is:Pg;function fl(e,t){if(Tt(e,t))return!0;
vendor: 22,370 bytes, line 48
48if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),s=Object.keys(t);if(l.length!==s.length)return!1;for(s=0;s<l.length;s++){var f=l[s];if(!Ra.call(t,f)||!Tt(e[f],t[f]))return!1}return!0}function uc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function rc(e,t){var l=uc(e);e=0;for(var s;l;){if(l.nodeType===3){if(s=e+l.textContent.length,e<=t&&s>=t)return{node:l,offset:t-e};e=s}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=uc(l)}}function cc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?cc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function fc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=io(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=io(e.document)}return t}function $a(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Bg=Xt&&"documentMode"in document&&11>=document.documentMode,yi=null,ja=null,dl=null,es=!1;function dc(e,t,l){var s=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;es||yi==null||yi!==io(s)||(s=yi,"selectionStart"in s&&$a(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),dl&&fl(dl,s)||(dl=s,s=jo(ja,"onSelect"),0<s.length&&(t=new uo("onSelect","select",null,t,l),e.push({event:t,listeners:s}),t.target=yi)))}function Yn(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var vi={animationend:Yn("Animation","AnimationEnd"),animationiteration:Yn("Animation","AnimationIteration"),animationstart:Yn("Animation","AnimationStart"),transitionrun:Yn("Transition","TransitionRun"),transitionstart:Yn("Transition","TransitionStart"),transitioncancel:Yn("Transition","TransitionCancel"),transitionend:Yn("Transition","TransitionEnd")},ts={},pc={};Xt&&(pc=document.createElement("div").style,"AnimationEvent"in window||(delete vi.animationend.animation,delete vi.animationiteration.animation,delete vi.animationstart.animation),"TransitionEvent"in window||delete vi.transitionend.transition);function Jn(e){if(ts[e])return ts[e];if(!vi[e])return e;var t=vi[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in pc)return ts[e]=t[l];return e}var mc=Jn("animationend"),hc=Jn("animationiteration"),gc=Jn("animationstart"),Og=Jn("transitionrun"),Fg=Jn("transitionstart"),Yg=Jn("transitioncancel"),yc=Jn("transitionend"),vc=new Map,ns="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(" ");ns.push("scrollEnd");function zt(e,t){vc.set(e,t),On(t,[e])}var fo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},bt=[],Ti=0,is=0;function po(){for(var e=Ti,t=is=Ti=0;t<e;){var l=bt[t];bt[t++]=null;var s=bt[t];bt[t++]=null;var f=bt[t];bt[t++]=null;var p=bt[t];if(bt[t++]=null,s!==null&&f!==null){var T=s.pending;T===null?f.next=f:(f.next=T.next,T.next=f),s.pending=f}p!==0&&Tc(l,f,p)}}function mo(e,t,l,s){bt[Ti++]=e,bt[Ti++]=t,bt[Ti++]=l,bt[Ti++]=s,is|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function ls(e,t,l,s){return mo(e,t,l,s),ho(e)}function Kn(e,t){return mo(e,null,null,t),ho(e)}function Tc(e,t,l){e.lanes|=l;var s=e.alternate;s!==null&&(s.lanes|=l);for(var f=!1,p=e.return;p!==null;)p.childLanes|=l,s=p.alternate,s!==null&&(s.childLanes|=l),p.tag===22&&(e=p.stateNode,e===null||e._visibility&1||(f=!0)),e=p,p=p.return;return e.tag===3?(p=e.stateNode,f&&t!==null&&(f=31-vt(l),e=p.hiddenUpdates,s=e[f],s===null?e[f]=[t]:s.push(t),t.lane=l|536870912),p):null}function ho(e){if(50<Ll)throw Ll=0,pu=null,Error(a(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Si={};function Jg(e,t,l,s){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function St(e,t,l,s){return new Jg(e,t,l,s)}function os(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Qt(e,t){var l=e.alternate;return l===null?(l=St(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Sc(e,t){e.flags&=65011714;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function go(e,t,l,s,f,p){var T=0;if(s=e,typeof e=="function")os(e)&&(T=1);else if(typeof e=="string")T=Wy(e,l,j.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case F:return e=St(31,l,t,f),e.elementType=F,e.lanes=p,e;case U:return Xn(l.children,f,p,t);case k:T=8,f|=24;break;case B:return e=St(12,l,t,f|2),e.elementType=B,e.lanes=p,e;case ee:return e=St(13,l,t,f),e.elementType=ee,e.lanes=p,e;case te:return e=St(19,l,t,f),e.elementType=te,e.lanes=p,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case P:T=10;break e;case W:T=9;break e;case Z:T=11;break e;case J:T=14;break e;case O:T=16,s=null;break e}T=29,l=Error(a(130,e===null?"null":typeof e,"")),s=null}return t=St(T,l,t,f),t.elementType=e,t.type=s,t.lanes=p,t}function Xn(e,t,l,s){return e=St(7,e,s,t),e.lanes=l,e}function as(e,t,l){return e=St(6,e,null,t),e.lanes=l,e}function _c(e){var t=St(18,null,null,0);return t.stateNode=e,t}function ss(e,t,l){return t=St(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ec=new WeakMap;function wt(e,t){if(typeof e=="object"&&e!==null){var l=Ec.get(e);return l!==void 0?l:(t={value:e,source:t,stack:_r(t)},Ec.set(e,t),t)}return{value:e,source:t,stack:_r(t)}}var _i=[],Ei=0,yo=null,pl=0,Dt=[],It=0,yn=null,Bt=1,Ot="";function Zt(e,t){_i[Ei++]=pl,_i[Ei++]=yo,yo=e,pl=t}function Cc(e,t,l){Dt[It++]=Bt,Dt[It++]=Ot,Dt[It++]=yn,yn=e;var s=Bt;e=Ot;var f=32-vt(s)-1;s&=~(1<<f),l+=1;var p=32-vt(t)+f;if(30<p){var T=f-f%5;p=(s&(1<<T)-1).toString(32),s>>=T,f-=T,Bt=1<<32-vt(t)+f|l<<f|s,Ot=p+e}else Bt=1<<p|l<<f|s,Ot=e}function us(e){e.return!==null&&(Zt(e,1),Cc(e,1,0))}function rs(e){for(;e===yo;)yo=_i[--Ei],_i[Ei]=null,pl=_i[--Ei],_i[Ei]=null;for(;e===yn;)yn=Dt[--It],Dt[It]=null,Ot=Dt[--It],Dt[It]=null,Bt=Dt[--It],Dt[It]=null}function Ac(e,t){Dt[It++]=Bt,Dt[It++]=Ot,Dt[It++]=yn,Bt=t.id,Ot=t.overflow,yn=e}var We=null,Ue=null,ve=!1,vn=null,Ut=!1,cs=Error(a(519));function Tn(e){var t=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ml(wt(t,e)),cs}function xc(e){var t=e.stateNode,l=e.type,s=e.memoizedProps;switch(t[Ze]=e,t[ut]=s,l){case"dialog":he("cancel",t),he("close",t);break;case"iframe":case"object":case"embed":he("load",t);break;case"video":case"audio":for(l=0;l<Gl.length;l++)he(Gl[l],t);break;case"source":he("error",t);break;case"img":case"image":case"link":he("error",t),he("load",t);break;case"details":he("toggle",t);break;case"input":he("invalid",t),zr(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":he("invalid",t);break;case"textarea":he("invalid",t),Vr(t,s.value,s.defaultValue,s.children)}l=s.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||s.suppressHydrationWarning===!0||Od(t.textContent,l)?(s.popover!=null&&(he("beforetoggle",t),he("toggle",t)),s.onScroll!=null&&he("scroll",t),s.onScrollEnd!=null&&he("scrollend",t),s.onClick!=null&&(t.onclick=Kt),t=!0):t=!1,t||Tn(e,!0)}function Nc(e){for(We=e.return;We;)switch(We.tag){case 5:case 31:case 13:Ut=!1;return;case 27:case 3:Ut=!0;return;default:We=We.return}}function Ci(e){if(e!==We)return!1;if(!ve)return Nc(e),ve=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Ru(e.type,e.memoizedProps)),l=!l),l&&Ue&&Tn(e),Nc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));Ue=$d(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));Ue=$d(e)}else t===27?(t=Ue,Un(e.type)?(e=Uu,Uu=null,Ue=e):Ue=t):Ue=We?qt(e.stateNode.nextSibling):null;return!0}function Qn(){Ue=We=null,ve=!1}function fs(){var e=vn;return e!==null&&(pt===null?pt=e:pt.push.apply(pt,e),vn=null),e}function ml(e){vn===null?vn=[e]:vn.push(e)}var ds=M(null),Zn=null,Wt=null;function Sn(e,t,l){K(ds,t._currentValue),t._currentValue=l}function $t(e){e._currentValue=ds.current,V(ds)}function ps(e,t,l){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===l)break;e=e.return}}function ms(e,t,l,s){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var p=f.dependencies;if(p!==null){var T=f.child;p=p.firstContext;e:for(;p!==null;){var E=p;p=f;for(var A=0;A<t.length;A++)if(E.context===t[A]){p.lanes|=l,E=p.alternate,E!==null&&(E.lanes|=l),ps(p.return,l,e),s||(T=null);break e}p=E.next}}else if(f.tag===18){if(T=f.return,T===null)throw Error(a(341));T.lanes|=l,p=T.alternate,p!==null&&(p.lanes|=l),ps(T,l,e),T=null}else T=f.child;if(T!==null)T.return=f;else for(T=f;T!==null;){if(T===e){T=null;break}if(f=T.sibling,f!==null){f.return=T.return,T=f;break}T=T.return}f=T}}function Ai(e,t,l,s){e=null;for(var f=t,p=!1;f!==null;){if(!p){if((f.flags&524288)!==0)p=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var T=f.alternate;if(T===null)throw Error(a(387));if(T=T.memoizedProps,T!==null){var E=f.type;Tt(f.pendingProps.value,T.value)||(e!==null?e.push(E):e=[E])}}else if(f===Ce.current){if(T=f.alternate,T===null)throw Error(a(387));T.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(Pl):e=[Pl])}f=f.return}e!==null&&ms(t,e,l,s),t.flags|=262144}function vo(e){for(e=e.firstContext;e!==null;){if(!Tt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Wn(e){Zn=e,Wt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function $e(e){return Mc(Zn,e)}function To(e,t){return Zn===null&&Wn(e),Mc(e,t)}function Mc(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Wt===null){if(e===null)throw Error(a(308));Wt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wt=Wt.next=t;return l}var Kg=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},Xg=i.unstable_scheduleCallback,Qg=i.unstable_NormalPriority,Oe={$$typeof:P,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function hs(){return{controller:new Kg,data:new Map,refCount:0}}function hl(e){e.refCount--,e.refCount===0&&Xg(Qg,function(){e.controller.abort()})}var gl=null,gs=0,xi=0,Ni=null;function Zg(e,t){if(gl===null){var l=gl=[];gs=0,xi=Tu(),Ni={status:"pending",value:void 0,then:function(s){l.push(s)}}}return gs++,t.then(Rc,Rc),t}function Rc(){if(--gs===0&&gl!==null){Ni!==null&&(Ni.status="fulfilled");var e=gl;gl=null,xi=0,Ni=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Wg(e,t){var l=[],s={status:"pending",value:null,reason:null,then:function(f){l.push(f)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var f=0;f<l.length;f++)(0,l[f])(t)},function(f){for(s.status="rejected",s.reason=f,f=0;f<l.length;f++)(0,l[f])(void 0)}),s}var bc=q.S;q.S=function(e,t){pd=gt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Zg(e,t),bc!==null&&bc(e,t)};var $n=M(null);function ys(){var e=$n.current;return e!==null?e:Ie.pooledCache}function So(e,t){t===null?K($n,$n.current):K($n,t.pool)}function wc(){var e=ys();return e===null?null:{parent:Oe._currentValue,pool:e}}var Mi=Error(a(460)),vs=Error(a(474)),_o=Error(a(542)),Eo={then:function(){}};function Dc(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ic(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Kt,Kt),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Lc(e),e;default:if(typeof t.status=="string")t.then(Kt,Kt);else{if(e=Ie,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var f=t;f.status="fulfilled",f.value=s}},function(s){if(t.status==="pending"){var f=t;f.status="rejected",f.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Lc(e),e}throw ei=t,Mi}}function jn(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(ei=l,Mi):l}}var ei=null;function Uc(){if(ei===null)throw Error(a(459));var e=ei;return ei=null,e}function Lc(e){if(e===Mi||e===_o)throw Error(a(483))}var Ri=null,yl=0;function Co(e){var t=yl;return yl+=1,Ri===null&&(Ri=[]),Ic(Ri,e,t)}function vl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ao(e,t){throw t.$$typeof===_?Error(a(525)):(e=Object.prototype.toString.call(t),Error(a(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function qc(e){function t(R,N){if(e){var w=R.deletions;w===null?(R.deletions=[N],R.flags|=16):w.push(N)}}function l(R,N){if(!e)return null;for(;N!==null;)t(R,N),N=N.sibling;return null}function s(R){for(var N=new Map;R!==null;)R.key!==null?N.set(R.key,R):N.set(R.index,R),R=R.sibling;return N}function f(R,N){return R=Qt(R,N),R.index=0,R.sibling=null,R}function p(R,N,w){return R.index=w,e?(w=R.alternate,w!==null?(w=w.index,w<N?(R.flags|=67108866,N):w):(R.flags|=67108866,N)):(R.flags|=1048576,N)}function T(R){return e&&R.alternate===null&&(R.flags|=67108866),R}function E(R,N,w,H){return N===null||N.tag!==6?(N=as(w,R.mode,H),N.return=R,N):(N=f(N,w),N.return=R,N)}function A(R,N,w,H){var ie=w.type;return ie===U?G(R,N,w.props.children,H,w.key):N!==null&&(N.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===O&&jn(ie)===N.type)?(N=f(N,w.props),vl(N,w),N.return=R,N):(N=go(w.type,w.key,w.props,null,R.mode,H),vl(N,w),N.return=R,N)}function D(R,N,w,H){return N===null||N.tag!==4||N.stateNode.containerInfo!==w.containerInfo||N.stateNode.implementation!==w.implementation?(N=ss(w,R.mode,H),N.return=R,N):(N=f(N,w.children||[]),N.return=R,N)}function G(R,N,w,H,ie){return N===null||N.tag!==7?(N=Xn(w,R.mode,H,ie),N.return=R,N):(N=f(N,w),N.return=R,N)}function z(R,N,w){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=as(""+N,R.mode,w),N.return=R,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case x:return w=go(N.type,N.key,N.props,null,R.mode,w),vl(w,N),w.return=R,w;case b:return N=ss(N,R.mode,w),N.return=R,N;case O:return N=jn(N),z(R,N,w)}if(tt(N)||ue(N))return N=Xn(N,R.mode,w,null),N.return=R,N;if(typeof N.then=="function")return z(R,Co(N),w);if(N.$$typeof===P)return z(R,To(R,N),w);Ao(R,N)}return null}function I(R,N,w,H){var ie=N!==null?N.key:null;if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return ie!==null?null:E(R,N,""+w,H);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case x:return w.key===ie?A(R,N,w,H):null;case b:return w.key===ie?D(R,N,w,H):null;case O:return w=jn(w),I(R,N,w,H)}if(tt(w)||ue(w))return ie!==null?null:G(R,N,w,H,null);if(typeof w.then=="function")return I(R,N,Co(w),H);if(w.$$typeof===P)return I(R,N,To(R,w),H);Ao(R,w)}return null}function L(R,N,w,H,ie){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return R=R.get(w)||null,E(N,R,""+H,ie);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case x:return R=R.get(H.key===null?w:H.key)||null,A(N,R,H,ie);case b:return R=R.get(H.key===null?w:H.key)||null,D(N,R,H,ie);case O:return H=jn(H),L(R,N,w,H,ie)}if(tt(H)||ue(H))return R=R.get(w)||null,G(N,R,H,ie,null);if(typeof H.then=="function")return L(R,N,w,Co(H),ie);if(H.$$typeof===P)return L(R,N,w,To(N,H),ie);Ao(N,H)}return null}function $(R,N,w,H){for(var ie=null,Te=null,ne=N,de=N=0,ye=null;ne!==null&&de<w.length;de++){ne.index>de?(ye=ne,ne=null):ye=ne.sibling;var Se=I(R,ne,w[de],H);if(Se===null){ne===null&&(ne=ye);break}e&&ne&&Se.alternate===null&&t(R,ne),N=p(Se,N,de),Te===null?ie=Se:Te.sibling=Se,Te=Se,ne=ye}if(de===w.length)return l(R,ne),ve&&Zt(R,de),ie;if(ne===null){for(;de<w.length;de++)ne=z(R,w[de],H),ne!==null&&(N=p(ne,N,de),Te===null?ie=ne:Te.sibling=ne,Te=ne);return ve&&Zt(R,de),ie}for(ne=s(ne);de<w.length;de++)ye=L(ne,R,de,w[de],H),ye!==null&&(e&&ye.alternate!==null&&ne.delete(ye.key===null?de:ye.key),N=p(ye,N,de),Te===null?ie=ye:Te.sibling=ye,Te=ye);return e&&ne.forEach(function(zn){return t(R,zn)}),ve&&Zt(R,de),ie}function oe(R,N,w,H){if(w==null)throw Error(a(151));for(var ie=null,Te=null,ne=N,de=N=0,ye=null,Se=w.next();ne!==null&&!Se.done;de++,Se=w.next()){ne.index>de?(ye=ne,ne=null):ye=ne.sibling;var zn=I(R,ne,Se.value,H);if(zn===null){ne===null&&(ne=ye);break}e&&ne&&zn.alternate===null&&t(R,ne),N=p(zn,N,de),Te===null?ie=zn:Te.sibling=zn,Te=zn,ne=ye}if(Se.done)return l(R,ne),ve&&Zt(R,de),ie;if(ne===null){for(;!Se.done;de++,Se=w.next())Se=z(R,Se.value,H),Se!==null&&(N=p(Se,N,de),Te===null?ie=Se:Te.sibling=Se,Te=Se);return ve&&Zt(R,de),ie}for(ne=s(ne);!Se.done;de++,Se=w.next())Se=L(ne,R,de,Se.value,H),Se!==null&&(e&&Se.alternate!==null&&ne.delete(Se.key===null?de:Se.key),N=p(Se,N,de),Te===null?ie=Se:Te.sibling=Se,Te=Se);return e&&ne.forEach(function(u0){return t(R,u0)}),ve&&Zt(R,de),ie}function we(R,N,w,H){if(typeof w=="object"&&w!==null&&w.type===U&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case x:e:{for(var ie=w.key;N!==null;){if(N.key===ie){if(ie=w.type,ie===U){if(N.tag===7){l(R,N.sibling),H=f(N,w.props.children),H.return=R,R=H;break e}}else if(N.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===O&&jn(ie)===N.type){l(R,N.sibling),H=f(N,w.props),vl(H,w),H.return=R,R=H;break e}l(R,N);break}else t(R,N);N=N.sibling}w.type===U?(H=Xn(w.props.children,R.mode,H,w.key),H.return=R,R=H):(H=go(w.type,w.key,w.props,null,R.mode,H),vl(H,w),H.return=R,R=H)}return T(R);case b:e:{for(ie=w.key;N!==null;){if(N.key===ie)if(N.tag===4&&N.stateNode.containerInfo===w.containerInfo&&N.stateNode.implementation===w.implementation){l(R,N.sibling),H=f(N,w.children||[]),H.return=R,R=H;break e}else{l(R,N);break}else t(R,N);N=N.sibling}H=ss(w,R.mode,H),H.return=R,R=H}return T(R);case O:return w=jn(w),we(R,N,w,H)}if(tt(w))return $(R,N,w,H);if(ue(w)){if(ie=ue(w),typeof ie!="function")throw Error(a(150));return w=ie.call(w),oe(R,N,w,H)}if(typeof w.then=="function")return we(R,N,Co(w),H);if(w.$$typeof===P)return we(R,N,To(R,w),H);Ao(R,w)}return typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint"?(w=""+w,N!==null&&N.tag===6?(l(R,N.sibling),H=f(N,w),H.return=R,R=H):(l(R,N),H=as(w,R.mode,H),H.return=R,R=H),T(R)):l(R,N)}return function(R,N,w,H){try{yl=0;var ie=we(R,N,w,H);return Ri=null,ie}catch(ne){if(ne===Mi||ne===_o)throw ne;var Te=St(29,ne,null,R.mode);return Te.lanes=H,Te.return=R,Te}finally{}}}var ti=qc(!0),Gc=qc(!1),_n=!1;function Ts(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ss(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function En(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Cn(e,t,l){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Ee&2)!==0){var f=s.pending;return f===null?t.next=t:(t.next=f.next,f.next=t),s.pending=t,t=ho(e),Tc(e,null,l),t}return mo(e,s,t,l),ho(e)}function Tl(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,l|=s,t.lanes=l,Mr(e,l)}}function _s(e,t){var l=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,l===s)){var f=null,p=null;if(l=l.firstBaseUpdate,l!==null){do{var T={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};p===null?f=p=T:p=p.next=T,l=l.next}while(l!==null);p===null?f=p=t:p=p.next=t}else f=p=t;l={baseState:s.baseState,firstBaseUpdate:f,lastBaseUpdate:p,shared:s.shared,callbacks:s.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Es=!1;function Sl(){if(Es){var e=Ni;
vendor: 7,365 bytes, line 48
48if(e!==null)throw e}}function _l(e,t,l,s){Es=!1;var f=e.updateQueue;_n=!1;var p=f.firstBaseUpdate,T=f.lastBaseUpdate,E=f.shared.pending;if(E!==null){f.shared.pending=null;var A=E,D=A.next;A.next=null,T===null?p=D:T.next=D,T=A;var G=e.alternate;G!==null&&(G=G.updateQueue,E=G.lastBaseUpdate,E!==T&&(E===null?G.firstBaseUpdate=D:E.next=D,G.lastBaseUpdate=A))}if(p!==null){var z=f.baseState;T=0,G=D=A=null,E=p;do{var I=E.lane&-536870913,L=I!==E.lane;if(L?(ge&I)===I:(s&I)===I){I!==0&&I===xi&&(Es=!0),G!==null&&(G=G.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var $=e,oe=E;I=t;var we=l;switch(oe.tag){case 1:if($=oe.payload,typeof $=="function"){z=$.call(we,z,I);break e}z=$;break e;case 3:$.flags=$.flags&-65537|128;case 0:if($=oe.payload,I=typeof $=="function"?$.call(we,z,I):$,I==null)break e;z=S({},z,I);break e;case 2:_n=!0}}I=E.callback,I!==null&&(e.flags|=64,L&&(e.flags|=8192),L=f.callbacks,L===null?f.callbacks=[I]:L.push(I))}else L={lane:I,tag:E.tag,payload:E.payload,callback:E.callback,next:null},G===null?(D=G=L,A=z):G=G.next=L,T|=I;if(E=E.next,E===null){if(E=f.shared.pending,E===null)break;L=E,E=L.next,L.next=null,f.lastBaseUpdate=L,f.shared.pending=null}}while(!0);G===null&&(A=z),f.baseState=A,f.firstBaseUpdate=D,f.lastBaseUpdate=G,p===null&&(f.shared.lanes=0),Rn|=T,e.lanes=T,e.memoizedState=z}}function Hc(e,t){if(typeof e!="function")throw Error(a(191,e));e.call(t)}function zc(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Hc(l[e],t)}var bi=M(null),xo=M(0);function kc(e,t){e=un,K(xo,e),K(bi,t),un=e|t.baseLanes}function Cs(){K(xo,un),K(bi,bi.current)}function As(){un=xo.current,V(bi),V(xo)}var _t=M(null),Lt=null;function An(e){var t=e.alternate;K(Pe,Pe.current&1),K(_t,e),Lt===null&&(t===null||bi.current!==null||t.memoizedState!==null)&&(Lt=e)}function xs(e){K(Pe,Pe.current),K(_t,e),Lt===null&&(Lt=e)}function Vc(e){e.tag===22?(K(Pe,Pe.current),K(_t,e),Lt===null&&(Lt=e)):xn()}function xn(){K(Pe,Pe.current),K(_t,_t.current)}function Et(e){V(_t),Lt===e&&(Lt=null),V(Pe)}var Pe=M(0);function No(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Du(l)||Iu(l)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var jt=0,fe=null,Re=null,Fe=null,Mo=!1,wi=!1,ni=!1,Ro=0,El=0,Di=null,$g=0;function ze(){throw Error(a(321))}function Ns(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!Tt(e[l],t[l]))return!1;return!0}function Ms(e,t,l,s,f,p){return jt=p,fe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,q.H=e===null||e.memoizedState===null?Af:Bs,ni=!1,p=l(s,f),ni=!1,wi&&(p=Bc(t,l,s,f)),Pc(e),p}function Pc(e){q.H=xl;var t=Re!==null&&Re.next!==null;if(jt=0,Fe=Re=fe=null,Mo=!1,El=0,Di=null,t)throw Error(a(300));e===null||Ye||(e=e.dependencies,e!==null&&vo(e)&&(Ye=!0))}function Bc(e,t,l,s){fe=e;var f=0;do{if(wi&&(Di=null),El=0,wi=!1,25<=f)throw Error(a(301));if(f+=1,Fe=Re=null,e.updateQueue!=null){var p=e.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}q.H=xf,p=t(l,s)}while(wi);return p}function jg(){var e=q.H,t=e.useState()[0];return t=typeof t.then=="function"?Cl(t):t,e=e.useState()[0],(Re!==null?Re.memoizedState:null)!==e&&(fe.flags|=1024),t}function Rs(){var e=Ro!==0;return Ro=0,e}function bs(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function ws(e){if(Mo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Mo=!1}jt=0,Fe=Re=fe=null,wi=!1,El=Ro=0,Di=null}function at(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fe===null?fe.memoizedState=Fe=e:Fe=Fe.next=e,Fe}function Be(){if(Re===null){var e=fe.alternate;e=e!==null?e.memoizedState:null}else e=Re.next;var t=Fe===null?fe.memoizedState:Fe.next;if(t!==null)Fe=t,Re=e;else{if(e===null)throw fe.alternate===null?Error(a(467)):Error(a(310));Re=e,e={memoizedState:Re.memoizedState,baseState:Re.baseState,baseQueue:Re.baseQueue,queue:Re.queue,next:null},Fe===null?fe.memoizedState=Fe=e:Fe=Fe.next=e}return Fe}function bo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Cl(e){var t=El;return El+=1,Di===null&&(Di=[]),e=Ic(Di,e,t),t=fe,(Fe===null?t.memoizedState:Fe.next)===null&&(t=t.alternate,q.H=t===null||t.memoizedState===null?Af:Bs),e}function wo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Cl(e);if(e.$$typeof===P)return $e(e)}throw Error(a(438,String(e)))}function Ds(e){var t=null,l=fe.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var s=fe.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(f){return f.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=bo(),fe.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),s=0;s<e;s++)l[s]=Q;return t.index++,l}function en(e,t){return typeof t=="function"?t(e):t}function Do(e){var t=Be();return Is(t,Re,e)}function Is(e,t,l){var s=e.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=l;var f=e.baseQueue,p=s.pending;if(p!==null){if(f!==null){var T=f.next;f.next=p.next,p.next=T}t.baseQueue=f=p,s.pending=null}if(p=e.baseState,f===null)e.memoizedState=p;else{t=f.next;var E=T=null,A=null,D=t,G=!1;do{var z=D.lane&-536870913;if(z!==D.lane?(ge&z)===z:(jt&z)===z){var I=D.revertLane;if(I===0)A!==null&&(A=A.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),z===xi&&(G=!0);else if((jt&I)===I){D=D.next,I===xi&&(G=!0);continue}else z={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},A===null?(E=A=z,T=p):A=A.next=z,fe.lanes|=I,Rn|=I;z=D.action,ni&&l(p,z),p=D.hasEagerState?D.eagerState:l(p,z)}else I={lane:z,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},A===null?(E=A=I,T=p):A=A.next=I,fe.lanes|=z,Rn|=z;D=D.next}while(D!==null&&D!==t);if(A===null?T=p:A.next=E,!Tt(p,e.memoizedState)&&(Ye=!0,G&&(l=Ni,l!==null)))throw l;e.memoizedState=p,e.baseState=T,e.baseQueue=A,s.lastRenderedState=p}return f===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Us(e){var t=Be(),l=t.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=e;var s=l.dispatch,f=l.pending,p=t.memoizedState;if(f!==null){l.pending=null;var T=f=f.next;do p=e(p,T.action),T=T.next;while(T!==f);Tt(p,t.memoizedState)||(Ye=!0),t.memoizedState=p,t.baseQueue===null&&(t.baseState=p),l.lastRenderedState=p}return[p,s]}function Oc(e,t,l){var s=fe,f=Be(),p=ve;if(p){if(l===void 0)throw Error(a(407));l=l()}else l=t();var T=!Tt((Re||f).memoizedState,l);if(T&&(f.memoizedState=l,Ye=!0),f=f.queue,Gs(Jc.bind(null,s,f,e),[e]),f.getSnapshot!==t||T||Fe!==null&&Fe.memoizedState.tag&1){if(s.flags|=2048,Ii(9,{destroy:void 0},Yc.bind(null,s,f,l,t),null),Ie===null)throw Error(a(349));p||(jt&127)!==0||Fc(s,t,l)}
vendor: 14,802 bytes, line 48
48return l}function Fc(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=fe.updateQueue,t===null?(t=bo(),fe.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Yc(e,t,l,s){t.value=l,t.getSnapshot=s,Kc(t)&&Xc(e)}function Jc(e,t,l){return l(function(){Kc(t)&&Xc(e)})}function Kc(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Tt(e,l)}catch{return!0}}function Xc(e){var t=Kn(e,2);t!==null&&mt(t,e,2)}function Ls(e){var t=at();if(typeof e=="function"){var l=e;if(e=l(),ni){mn(!0);try{l()}finally{mn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:en,lastRenderedState:e},t}function Qc(e,t,l,s){return e.baseState=l,Is(e,Re,typeof s=="function"?s:en)}function ey(e,t,l,s,f){if(Lo(e))throw Error(a(485));if(e=t.action,e!==null){var p={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(T){p.listeners.push(T)}};q.T!==null?l(!0):p.isTransition=!1,s(p),l=t.pending,l===null?(p.next=t.pending=p,Zc(t,p)):(p.next=l.next,t.pending=l.next=p)}}function Zc(e,t){var l=t.action,s=t.payload,f=e.state;if(t.isTransition){var p=q.T,T={};q.T=T;try{var E=l(f,s),A=q.S;A!==null&&A(T,E),Wc(e,t,E)}catch(D){qs(e,t,D)}finally{p!==null&&T.types!==null&&(p.types=T.types),q.T=p}}else try{p=l(f,s),Wc(e,t,p)}catch(D){qs(e,t,D)}}function Wc(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(s){$c(e,t,s)},function(s){return qs(e,t,s)}):$c(e,t,l)}function $c(e,t,l){t.status="fulfilled",t.value=l,jc(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,Zc(e,l)))}function qs(e,t,l){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=l,jc(t),t=t.next;while(t!==s)}e.action=null}function jc(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ef(e,t){return t}function tf(e,t){if(ve){var l=Ie.formState;if(l!==null){e:{var s=fe;if(ve){if(Ue){t:{for(var f=Ue,p=Ut;f.nodeType!==8;){if(!p){f=null;break t}if(f=qt(f.nextSibling),f===null){f=null;break t}}p=f.data,f=p==="F!"||p==="F"?f:null}if(f){Ue=qt(f.nextSibling),s=f.data==="F!";break e}}Tn(s)}s=!1}s&&(t=l[0])}}return l=at(),l.memoizedState=l.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ef,lastRenderedState:t},l.queue=s,l=_f.bind(null,fe,s),s.dispatch=l,s=Ls(!1),p=Ps.bind(null,fe,!1,s.queue),s=at(),f={state:t,dispatch:null,action:e,pending:null},s.queue=f,l=ey.bind(null,fe,f,p,l),f.dispatch=l,s.memoizedState=e,[t,l,!1]}function nf(e){var t=Be();return lf(t,Re,e)}function lf(e,t,l){if(t=Is(e,t,ef)[0],e=Do(en)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Cl(t)}catch(T){throw T===Mi?_o:T}else s=t;t=Be();var f=t.queue,p=f.dispatch;return l!==t.memoizedState&&(fe.flags|=2048,Ii(9,{destroy:void 0},ty.bind(null,f,l),null)),[s,p,e]}function ty(e,t){e.action=t}function of(e){var t=Be(),l=Re;if(l!==null)return lf(t,l,e);Be(),t=t.memoizedState,l=Be();var s=l.queue.dispatch;return l.memoizedState=e,[t,s,!1]}function Ii(e,t,l,s){return e={tag:e,create:l,deps:s,inst:t,next:null},t=fe.updateQueue,t===null&&(t=bo(),fe.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(s=l.next,l.next=e,e.next=s,t.lastEffect=e),e}function af(){return Be().memoizedState}function Io(e,t,l,s){var f=at();fe.flags|=e,f.memoizedState=Ii(1|t,{destroy:void 0},l,s===void 0?null:s)}function Uo(e,t,l,s){var f=Be();s=s===void 0?null:s;var p=f.memoizedState.inst;Re!==null&&s!==null&&Ns(s,Re.memoizedState.deps)?f.memoizedState=Ii(t,p,l,s):(fe.flags|=e,f.memoizedState=Ii(1|t,p,l,s))}function sf(e,t){Io(8390656,8,e,t)}function Gs(e,t){Uo(2048,8,e,t)}function ny(e){fe.flags|=4;var t=fe.updateQueue;if(t===null)t=bo(),fe.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function uf(e){var t=Be().memoizedState;return ny({ref:t,nextImpl:e}),function(){if((Ee&2)!==0)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function rf(e,t){return Uo(4,2,e,t)}function cf(e,t){return Uo(4,4,e,t)}function ff(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function df(e,t,l){l=l!=null?l.concat([e]):null,Uo(4,4,ff.bind(null,t,e),l)}function Hs(){}function pf(e,t){var l=Be();t=t===void 0?null:t;var s=l.memoizedState;return t!==null&&Ns(t,s[1])?s[0]:(l.memoizedState=[e,t],e)}function mf(e,t){var l=Be();t=t===void 0?null:t;var s=l.memoizedState;if(t!==null&&Ns(t,s[1]))return s[0];if(s=e(),ni){mn(!0);try{e()}finally{mn(!1)}}return l.memoizedState=[s,t],s}function zs(e,t,l){return l===void 0||(jt&1073741824)!==0&&(ge&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=hd(),fe.lanes|=e,Rn|=e,l)}function hf(e,t,l,s){return Tt(l,t)?l:bi.current!==null?(e=zs(e,l,s),Tt(e,t)||(Ye=!0),e):(jt&42)===0||(jt&1073741824)!==0&&(ge&261930)===0?(Ye=!0,e.memoizedState=l):(e=hd(),fe.lanes|=e,Rn|=e,t)}function gf(e,t,l,s,f){var p=Y.p;Y.p=p!==0&&8>p?p:8;var T=q.T,E={};q.T=E,Ps(e,!1,t,l);try{var A=f(),D=q.S;if(D!==null&&D(E,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var G=Wg(A,s);Al(e,t,G,xt(e))}else Al(e,t,s,xt(e))}catch(z){Al(e,t,{then:function(){},status:"rejected",reason:z},xt())}finally{Y.p=p,T!==null&&E.types!==null&&(T.types=E.types),q.T=T}}function iy(){}function ks(e,t,l,s){if(e.tag!==5)throw Error(a(476));var f=yf(e).queue;gf(e,f,t,ae,l===null?iy:function(){return vf(e),l(s)})}function yf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:en,lastRenderedState:ae},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:en,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function vf(e){var t=yf(e);t.next===null&&(t=e.alternate.memoizedState),Al(e,t.next.queue,{},xt())}function Vs(){return $e(Pl)}function Tf(){return Be().memoizedState}function Sf(){return Be().memoizedState}function ly(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=xt();e=En(l);var s=Cn(t,e,l);s!==null&&(mt(s,t,l),Tl(s,t,l)),t={cache:hs()},e.payload=t;return}t=t.return}}function oy(e,t,l){var s=xt();l={lane:s,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Lo(e)?Ef(t,l):(l=ls(e,t,l,s),l!==null&&(mt(l,e,s),Cf(l,t,s)))}function _f(e,t,l){var s=xt();Al(e,t,l,s)}function Al(e,t,l,s){var f={lane:s,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Lo(e))Ef(t,f);else{var p=e.alternate;if(e.lanes===0&&(p===null||p.lanes===0)&&(p=t.lastRenderedReducer,p!==null))try{var T=t.lastRenderedState,E=p(T,l);if(f.hasEagerState=!0,f.eagerState=E,Tt(E,T))return mo(e,t,f,0),Ie===null&&po(),!1}catch{}finally{}if(l=ls(e,t,f,s),l!==null)return mt(l,e,s),Cf(l,t,s),!0}return!1}function Ps(e,t,l,s){if(s={lane:2,revertLane:Tu(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Lo(e)){if(t)throw Error(a(479))}else t=ls(e,l,s,2),t!==null&&mt(t,e,2)}function Lo(e){var t=e.alternate;return e===fe||t!==null&&t===fe}function Ef(e,t){wi=Mo=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Cf(e,t,l){if((l&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,l|=s,t.lanes=l,Mr(e,l)}}var xl={readContext:$e,use:wo,useCallback:ze,useContext:ze,useEffect:ze,useImperativeHandle:ze,useLayoutEffect:ze,useInsertionEffect:ze,useMemo:ze,useReducer:ze,useRef:ze,useState:ze,useDebugValue:ze,useDeferredValue:ze,useTransition:ze,useSyncExternalStore:ze,useId:ze,useHostTransitionStatus:ze,useFormState:ze,useActionState:ze,useOptimistic:ze,useMemoCache:ze,useCacheRefresh:ze};xl.useEffectEvent=ze;var Af={readContext:$e,use:wo,useCallback:function(e,t){return at().memoizedState=[e,t===void 0?null:t],e},useContext:$e,useEffect:sf,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Io(4194308,4,ff.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Io(4194308,4,e,t)},useInsertionEffect:function(e,t){Io(4,2,e,t)},useMemo:function(e,t){var l=at();t=t===void 0?null:t;var s=e();if(ni){mn(!0);try{e()}finally{mn(!1)}}return l.memoizedState=[s,t],s},useReducer:function(e,t,l){var s=at();if(l!==void 0){var f=l(t);if(ni){mn(!0);try{l(t)}finally{mn(!1)}}}else f=t;return s.memoizedState=s.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},s.queue=e,e=e.dispatch=oy.bind(null,fe,e),[s.memoizedState,e]},useRef:function(e){var t=at();return e={current:e},t.memoizedState=e},useState:function(e){e=Ls(e);var t=e.queue,l=_f.bind(null,fe,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Hs,useDeferredValue:function(e,t){var l=at();return zs(l,e,t)},useTransition:function(){var e=Ls(!1);return e=gf.bind(null,fe,e.queue,!0,!1),at().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var s=fe,f=at();if(ve){if(l===void 0)throw Error(a(407));l=l()}else{if(l=t(),Ie===null)throw Error(a(349));(ge&127)!==0||Fc(s,t,l)}f.memoizedState=l;var p={value:l,getSnapshot:t};return f.queue=p,sf(Jc.bind(null,s,p,e),[e]),s.flags|=2048,Ii(9,{destroy:void 0},Yc.bind(null,s,p,l,t),null),l},useId:function(){var e=at(),t=Ie.identifierPrefix;if(ve){var l=Ot,s=Bt;l=(s&~(1<<32-vt(s)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Ro++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=$g++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Vs,useFormState:tf,useActionState:tf,useOptimistic:function(e){var t=at();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Ps.bind(null,fe,!0,l),l.dispatch=t,[e,t]},useMemoCache:Ds,useCacheRefresh:function(){return at().memoizedState=ly.bind(null,fe)},useEffectEvent:function(e){var t=at(),l={impl:e};return t.memoizedState=l,function(){if((Ee&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},Bs={readContext:$e,use:wo,useCallback:pf,useContext:$e,useEffect:Gs,useImperativeHandle:df,useInsertionEffect:rf,useLayoutEffect:cf,useMemo:mf,useReducer:Do,useRef:af,useState:function(){return Do(en)},useDebugValue:Hs,useDeferredValue:function(e,t){var l=Be();return hf(l,Re.memoizedState,e,t)},useTransition:function(){var e=Do(en)[0],t=Be().memoizedState;return[typeof e=="boolean"?e:Cl(e),t]},useSyncExternalStore:Oc,useId:Tf,useHostTransitionStatus:Vs,useFormState:nf,useActionState:nf,useOptimistic:function(e,t){var l=Be();return Qc(l,Re,e,t)},useMemoCache:Ds,useCacheRefresh:Sf};Bs.useEffectEvent=uf;var xf={readContext:$e,use:wo,useCallback:pf,useContext:$e,useEffect:Gs,useImperativeHandle:df,useInsertionEffect:rf,useLayoutEffect:cf,useMemo:mf,useReducer:Us,useRef:af,useState:function(){return Us(en)},useDebugValue:Hs,useDeferredValue:function(e,t){var l=Be();return Re===null?zs(l,e,t):hf(l,Re.memoizedState,e,t)},useTransition:function(){var e=Us(en)[0],t=Be().memoizedState;return[typeof e=="boolean"?e:Cl(e),t]},useSyncExternalStore:Oc,useId:Tf,useHostTransitionStatus:Vs,useFormState:of,useActionState:of,useOptimistic:function(e,t){var l=Be();return Re!==null?Qc(l,Re,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Ds,useCacheRefresh:Sf};xf.useEffectEvent=uf;function Os(e,t,l,s){t=e.memoizedState,l=l(s,t),l=l==null?t:S({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Fs={enqueueSetState:function(e,t,l){e=e._reactInternals;var s=xt(),f=En(s);f.payload=t,l!=null&&(f.callback=l),t=Cn(e,f,s),t!==null&&(mt(t,e,s),Tl(t,e,s))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var s=xt(),f=En(s);f.tag=1,f.payload=t,l!=null&&(f.callback=l),t=Cn(e,f,s),t!==null&&(mt(t,e,s),Tl(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=xt(),s=En(l);s.tag=2,t!=null&&(s.callback=t),t=Cn(e,s,l),t!==null&&(mt(t,e,l),Tl(t,e,l))}};function Nf(e,t,l,s,f,p,T){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,p,T):t.prototype&&t.prototype.isPureReactComponent?!fl(l,s)||!fl(f,p):!0}function Mf(e,t,l,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,s),t.state!==e&&Fs.enqueueReplaceState(t,t.state,null)}function ii(e,t){var l=t;if("ref"in t){l={};for(var s in t)s!=="ref"&&(l[s]=t[s])}if(e=e.defaultProps){l===t&&(l=S({},l));for(var f in e)l[f]===void 0&&(l[f]=e[f])}return l}function Rf(e){fo(e)}function bf(e){console.error(e)}function wf(e){fo(e)}function qo(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Df(e,t,l){try{var s=e.onCaughtError;s(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Ys(e,t,l){return l=En(l),l.tag=3,l.payload={element:null},l.callback=function(){qo(e,t)},l}function If(e){return e=En(e),e.tag=3,e}function Uf(e,t,l,s){var f=l.type.getDerivedStateFromError;if(typeof f=="function"){var p=s.value;e.payload=function(){return f(p)},e.callback=function(){Df(t,l,s)}}var T=l.stateNode;T!==null&&typeof T.componentDidCatch=="function"&&(e.callback=function(){Df(t,l,s),typeof f!="function"&&(bn===null?bn=new Set([this]):bn.add(this));var E=s.stack;this.componentDidCatch(s.value,{componentStack:E!==null?E:""})})}function ay(e,t,l,s,f){if(l.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=l.alternate,t!==null&&Ai(t,l,f,!0),l=_t.current,l!==null){switch(l.tag){case 31:case 13:return Lt===null?Ko():l.alternate===null&&ke===0&&(ke=3),l.flags&=-257,l.flags|=65536,l.lanes=f,s===Eo?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([s]):t.add(s),gu(e,s,f)),!1;case 22:return l.flags|=65536,s===Eo?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([s]):l.add(s)),gu(e,s,f)),!1}throw Error(a(435,l.tag))}return gu(e,s,f),Ko(),!1}if(ve)return t=_t.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=f,s!==cs&&(e=Error(a(422),{cause:s}),ml(wt(e,l)))):(s!==cs&&(t=Error(a(423),{cause:s}),ml(wt(t,l))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,s=wt(s,l),f=Ys(e.stateNode,s,f),_s(e,f),ke!==4&&(ke=2)),!1;var p=Error(a(520),{cause:s});if(p=wt(p,l),Ul===null?Ul=[p]:Ul.push(p),ke!==4&&(ke=2),t===null)return!0;s=wt(s,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=f&-f,l.lanes|=e,e=Ys(l.stateNode,s,e),_s(l,e),!1;case 1:if(t=l.type,p=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(bn===null||!bn.has(p
vendor: 12,272 bytes, line 48
48))))return l.flags|=65536,f&=-f,l.lanes|=f,f=If(f),Uf(f,e,l,s),_s(l,f),!1}l=l.return}while(l!==null);return!1}var Js=Error(a(461)),Ye=!1;function je(e,t,l,s){t.child=e===null?Gc(t,null,l,s):ti(t,e.child,l,s)}function Lf(e,t,l,s,f){l=l.render;var p=t.ref;if("ref"in s){var T={};for(var E in s)E!=="ref"&&(T[E]=s[E])}else T=s;return Wn(t),s=Ms(e,t,l,T,p,f),E=Rs(),e!==null&&!Ye?(bs(e,t,f),tn(e,t,f)):(ve&&E&&us(t),t.flags|=1,je(e,t,s,f),t.child)}function qf(e,t,l,s,f){if(e===null){var p=l.type;return typeof p=="function"&&!os(p)&&p.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=p,Gf(e,t,p,s,f)):(e=go(l.type,null,s,t,t.mode,f),e.ref=t.ref,e.return=t,t.child=e)}if(p=e.child,!eu(e,f)){var T=p.memoizedProps;if(l=l.compare,l=l!==null?l:fl,l(T,s)&&e.ref===t.ref)return tn(e,t,f)}return t.flags|=1,e=Qt(p,s),e.ref=t.ref,e.return=t,t.child=e}function Gf(e,t,l,s,f){if(e!==null){var p=e.memoizedProps;if(fl(p,s)&&e.ref===t.ref)if(Ye=!1,t.pendingProps=s=p,eu(e,f))(e.flags&131072)!==0&&(Ye=!0);else return t.lanes=e.lanes,tn(e,t,f)}return Ks(e,t,l,s,f)}function Hf(e,t,l,s){var f=s.children,p=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(p=p!==null?p.baseLanes|l:l,e!==null){for(s=t.child=e.child,f=0;s!==null;)f=f|s.lanes|s.childLanes,s=s.sibling;s=f&~p}else s=0,t.child=null;return zf(e,t,p,l,s)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&So(t,p!==null?p.cachePool:null),p!==null?kc(t,p):Cs(),Vc(t);else return s=t.lanes=536870912,zf(e,t,p!==null?p.baseLanes|l:l,l,s)}else p!==null?(So(t,p.cachePool),kc(t,p),xn(),t.memoizedState=null):(e!==null&&So(t,null),Cs(),xn());return je(e,t,f,l),t.child}function Nl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function zf(e,t,l,s,f){var p=ys();return p=p===null?null:{parent:Oe._currentValue,pool:p},t.memoizedState={baseLanes:l,cachePool:p},e!==null&&So(t,null),Cs(),Vc(t),e!==null&&Ai(e,t,s,!0),t.childLanes=f,null}function Go(e,t){return t=zo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function kf(e,t,l){return ti(t,e.child,null,l),e=Go(t,t.pendingProps),e.flags|=2,Et(t),t.memoizedState=null,e}function sy(e,t,l){var s=t.pendingProps,f=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ve){if(s.mode==="hidden")return e=Go(t,s),t.lanes=536870912,Nl(null,e);if(xs(t),(e=Ue)?(e=Wd(e,Ut),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yn!==null?{id:Bt,overflow:Ot}:null,retryLane:536870912,hydrationErrors:null},l=_c(e),l.return=t,t.child=l,We=t,Ue=null)):e=null,e===null)throw Tn(t);return t.lanes=536870912,null}return Go(t,s)}var p=e.memoizedState;if(p!==null){var T=p.dehydrated;if(xs(t),f)if(t.flags&256)t.flags&=-257,t=kf(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(a(558));else if(Ye||Ai(e,t,l,!1),f=(l&e.childLanes)!==0,Ye||f){if(s=Ie,s!==null&&(T=Rr(s,l),T!==0&&T!==p.retryLane))throw p.retryLane=T,Kn(e,T),mt(s,e,T),Js;Ko(),t=kf(e,t,l)}else e=p.treeContext,Ue=qt(T.nextSibling),We=t,ve=!0,vn=null,Ut=!1,e!==null&&Ac(t,e),t=Go(t,s),t.flags|=4096;return t}return e=Qt(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ho(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function Ks(e,t,l,s,f){return Wn(t),l=Ms(e,t,l,s,void 0,f),s=Rs(),e!==null&&!Ye?(bs(e,t,f),tn(e,t,f)):(ve&&s&&us(t),t.flags|=1,je(e,t,l,f),t.child)}function Vf(e,t,l,s,f,p){return Wn(t),t.updateQueue=null,l=Bc(t,s,l,f),Pc(e),s=Rs(),e!==null&&!Ye?(bs(e,t,p),tn(e,t,p)):(ve&&s&&us(t),t.flags|=1,je(e,t,l,p),t.child)}function Pf(e,t,l,s,f){if(Wn(t),t.stateNode===null){var p=Si,T=l.contextType;typeof T=="object"&&T!==null&&(p=$e(T)),p=new l(s,p),t.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=Fs,t.stateNode=p,p._reactInternals=t,p=t.stateNode,p.props=s,p.state=t.memoizedState,p.refs={},Ts(t),T=l.contextType,p.context=typeof T=="object"&&T!==null?$e(T):Si,p.state=t.memoizedState,T=l.getDerivedStateFromProps,typeof T=="function"&&(Os(t,l,T,s),p.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(T=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),T!==p.state&&Fs.enqueueReplaceState(p,p.state,null),_l(t,s,p,f),Sl(),p.state=t.memoizedState),typeof p.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){p=t.stateNode;var E=t.memoizedProps,A=ii(l,E);p.props=A;var D=p.context,G=l.contextType;T=Si,typeof G=="object"&&G!==null&&(T=$e(G));var z=l.getDerivedStateFromProps;G=typeof z=="function"||typeof p.getSnapshotBeforeUpdate=="function",E=t.pendingProps!==E,G||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(E||D!==T)&&Mf(t,p,s,T),_n=!1;var I=t.memoizedState;p.state=I,_l(t,s,p,f),Sl(),D=t.memoizedState,E||I!==D||_n?(typeof z=="function"&&(Os(t,l,z,s),D=t.memoizedState),(A=_n||Nf(t,l,A,s,I,D,T))?(G||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(t.flags|=4194308)):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=D),p.props=s,p.state=D,p.context=T,s=A):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{p=t.stateNode,Ss(e,t),T=t.memoizedProps,G=ii(l,T),p.props=G,z=t.pendingProps,I=p.context,D=l.contextType,A=Si,typeof D=="object"&&D!==null&&(A=$e(D)),E=l.getDerivedStateFromProps,(D=typeof E=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(T!==z||I!==A)&&Mf(t,p,s,A),_n=!1,I=t.memoizedState,p.state=I,_l(t,s,p,f),Sl();var L=t.memoizedState;T!==z||I!==L||_n||e!==null&&e.dependencies!==null&&vo(e.dependencies)?(typeof E=="function"&&(Os(t,l,E,s),L=t.memoizedState),(G=_n||Nf(t,l,G,s,I,L,A)||e!==null&&e.dependencies!==null&&vo(e.dependencies))?(D||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(s,L,A),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(s,L,A)),typeof p.componentDidUpdate=="function"&&(t.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof p.componentDidUpdate!="function"||T===e.memoizedProps&&I===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||T===e.memoizedProps&&I===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=L),p.props=s,p.state=L,p.context=A,s=G):(typeof p.componentDidUpdate!="function"||T===e.memoizedProps&&I===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||T===e.memoizedProps&&I===e.memoizedState||(t.flags|=1024),s=!1)}return p=s,Ho(e,t),s=(t.flags&128)!==0,p||s?(p=t.stateNode,l=s&&typeof l.getDerivedStateFromError!="function"?null:p.render(),t.flags|=1,e!==null&&s?(t.child=ti(t,e.child,null,f),t.child=ti(t,null,l,f)):je(e,t,l,f),t.memoizedState=p.state,e=t.child):e=tn(e,t,f),e}function Bf(e,t,l,s){return Qn(),t.flags|=256,je(e,t,l,s),t.child}var Xs={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Qs(e){return{baseLanes:e,cachePool:wc()}}function Zs(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=At),e}function Of(e,t,l){var s=t.pendingProps,f=!1,p=(t.flags&128)!==0,T;if((T=p)||(T=e!==null&&e.memoizedState===null?!1:(Pe.current&2)!==0),T&&(f=!0,t.flags&=-129),T=(t.flags&32)!==0,t.flags&=-33,e===null){if(ve){if(f?An(t):xn(),(e=Ue)?(e=Wd(e,Ut),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yn!==null?{id:Bt,overflow:Ot}:null,retryLane:536870912,hydrationErrors:null},l=_c(e),l.return=t,t.child=l,We=t,Ue=null)):e=null,e===null)throw Tn(t);return Iu(e)?t.lanes=32:t.lanes=536870912,null}var E=s.children;return s=s.fallback,f?(xn(),f=t.mode,E=zo({mode:"hidden",children:E},f),s=Xn(s,f,l,null),E.return=t,s.return=t,E.sibling=s,t.child=E,s=t.child,s.memoizedState=Qs(l),s.childLanes=Zs(e,T,l),t.memoizedState=Xs,Nl(null,s)):(An(t),Ws(t,E))}var A=e.memoizedState;if(A!==null&&(E=A.dehydrated,E!==null)){if(p)t.flags&256?(An(t),t.flags&=-257,t=$s(e,t,l)):t.memoizedState!==null?(xn(),t.child=e.child,t.flags|=128,t=null):(xn(),E=s.fallback,f=t.mode,s=zo({mode:"visible",children:s.children},f),E=Xn(E,f,l,null),E.flags|=2,s.return=t,E.return=t,s.sibling=E,t.child=s,ti(t,e.child,null,l),s=t.child,s.memoizedState=Qs(l),s.childLanes=Zs(e,T,l),t.memoizedState=Xs,t=Nl(null,s));else if(An(t),Iu(E)){if(T=E.nextSibling&&E.nextSibling.dataset,T)var D=T.dgst;T=D,s=Error(a(419)),s.stack="",s.digest=T,ml({value:s,source:null,stack:null}),t=$s(e,t,l)}else if(Ye||Ai(e,t,l,!1),T=(l&e.childLanes)!==0,Ye||T){if(T=Ie,T!==null&&(s=Rr(T,l),s!==0&&s!==A.retryLane))throw A.retryLane=s,Kn(e,s),mt(T,e,s),Js;Du(E)||Ko(),t=$s(e,t,l)}else Du(E)?(t.flags|=192,t.child=e.child,t=null):(e=A.treeContext,Ue=qt(E.nextSibling),We=t,ve=!0,vn=null,Ut=!1,e!==null&&Ac(t,e),t=Ws(t,s.children),t.flags|=4096);return t}return f?(xn(),E=s.fallback,f=t.mode,A=e.child,D=A.sibling,s=Qt(A,{mode:"hidden",children:s.children}),s.subtreeFlags=A.subtreeFlags&65011712,D!==null?E=Qt(D,E):(E=Xn(E,f,l,null),E.flags|=2),E.return=t,s.return=t,s.sibling=E,t.child=s,Nl(null,s),s=t.child,E=e.child.memoizedState,E===null?E=Qs(l):(f=E.cachePool,f!==null?(A=Oe._currentValue,f=f.parent!==A?{parent:A,pool:A}:f):f=wc(),E={baseLanes:E.baseLanes|l,cachePool:f}),s.memoizedState=E,s.childLanes=Zs(e,T,l),t.memoizedState=Xs,Nl(e.child,s)):(An(t),l=e.child,e=l.sibling,l=Qt(l,{mode:"visible",children:s.children}),l.return=t,l.sibling=null,e!==null&&(T=t.deletions,T===null?(t.deletions=[e],t.flags|=16):T.push(e)),t.child=l,t.memoizedState=null,l)}function Ws(e,t){return t=zo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function zo(e,t){return e=St(22,e,null,t),e.lanes=0,e}function $s(e,t,l){return ti(t,e.child,null,l),e=Ws(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ff(e,t,l){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),ps(e.return,t,l)}function js(e,t,l,s,f,p){var T=e.memoizedState;T===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:l,tailMode:f,treeForkCount:p}:(T.isBackwards=t,T.rendering=null,T.renderingStartTime=0,T.last=s,T.tail=l,T.tailMode=f,T.treeForkCount=p)}function Yf(e,t,l){var s=t.pendingProps,f=s.revealOrder,p=s.tail;s=s.children;var T=Pe.current,E=(T&2)!==0;if(E?(T=T&1|2,t.flags|=128):T&=1,K(Pe,T),je(e,t,s,l),s=ve?pl:0,!E&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ff(e,l,t);else if(e.tag===19)Ff(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(f){case"forwards":for(l=t.child,f=null;l!==null;)e=l.alternate,e!==null&&No(e)===null&&(f=l),l=l.sibling;l=f,l===null?(f=t.child,t.child=null):(f=l.sibling,l.sibling=null),js(t,!1,f,l,p,s);break;case"backwards":case"unstable_legacy-backwards":for(l=null,f=t.child,t.child=null;f!==null;){if(e=f.alternate,e!==null&&No(e)===null){t.child=f;break}e=f.sibling,f.sibling=l,l=f,f=e}js(t,!0,l,null,p,s);break;case"together":js(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function tn(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Rn|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Ai(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(a(153));
vendor: 5,330 bytes, line 48
48if(t.child!==null){for(e=t.child,l=Qt(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Qt(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function eu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&vo(e)))}function uy(e,t,l){switch(t.tag){case 3:ot(t,t.stateNode.containerInfo),Sn(t,Oe,e.memoizedState.cache),Qn();break;case 27:case 5:$i(t);break;case 4:ot(t,t.stateNode.containerInfo);break;case 10:Sn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,xs(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(An(t),t.flags|=128,null):(l&t.child.childLanes)!==0?Of(e,t,l):(An(t),e=tn(e,t,l),e!==null?e.sibling:null);An(t);break;case 19:var f=(e.flags&128)!==0;if(s=(l&t.childLanes)!==0,s||(Ai(e,t,l,!1),s=(l&t.childLanes)!==0),f){if(s)return Yf(e,t,l);t.flags|=128}if(f=t.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),K(Pe,Pe.current),s)break;return null;case 22:return t.lanes=0,Hf(e,t,l,t.pendingProps);case 24:Sn(t,Oe,e.memoizedState.cache)}return tn(e,t,l)}function Jf(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ye=!0;else{if(!eu(e,l)&&(t.flags&128)===0)return Ye=!1,uy(e,t,l);Ye=(e.flags&131072)!==0}else Ye=!1,ve&&(t.flags&1048576)!==0&&Cc(t,pl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=jn(t.elementType),t.type=e,typeof e=="function")os(e)?(s=ii(e,s),t.tag=1,t=Pf(null,t,e,s,l)):(t.tag=0,t=Ks(null,t,e,s,l));else{if(e!=null){var f=e.$$typeof;if(f===Z){t.tag=11,t=Lf(null,t,e,s,l);break e}else if(f===J){t.tag=14,t=qf(null,t,e,s,l);break e}}throw t=lt(e)||e,Error(a(306,t,""))}}return t;case 0:return Ks(e,t,t.type,t.pendingProps,l);case 1:return s=t.type,f=ii(s,t.pendingProps),Pf(e,t,s,f,l);case 3:e:{if(ot(t,t.stateNode.containerInfo),e===null)throw Error(a(387));s=t.pendingProps;var p=t.memoizedState;f=p.element,Ss(e,t),_l(t,s,null,l);var T=t.memoizedState;if(s=T.cache,Sn(t,Oe,s),s!==p.cache&&ms(t,[Oe],l,!0),Sl(),s=T.element,p.isDehydrated)if(p={element:s,isDehydrated:!1,cache:T.cache},t.updateQueue.baseState=p,t.memoizedState=p,t.flags&256){t=Bf(e,t,s,l);break e}else if(s!==f){f=wt(Error(a(424)),t),ml(f),t=Bf(e,t,s,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ue=qt(e.firstChild),We=t,ve=!0,vn=null,Ut=!0,l=Gc(t,null,s,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Qn(),s===f){t=tn(e,t,l);break e}je(e,t,s,l)}t=t.child}return t;case 26:return Ho(e,t),e===null?(l=ip(t.type,null,t.pendingProps,null))?t.memoizedState=l:ve||(l=t.type,e=t.pendingProps,s=ea(pe.current).createElement(l),s[Ze]=t,s[ut]=e,et(s,l,e),Xe(s),t.stateNode=s):t.memoizedState=ip(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return $i(t),e===null&&ve&&(s=t.stateNode=ep(t.type,t.pendingProps,pe.current),We=t,Ut=!0,f=Ue,Un(t.type)?(Uu=f,Ue=qt(s.firstChild)):Ue=f),je(e,t,t.pendingProps.children,l),Ho(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ve&&((f=s=Ue)&&(s=zy(s,t.type,t.pendingProps,Ut),s!==null?(t.stateNode=s,We=t,Ue=qt(s.firstChild),Ut=!1,f=!0):f=!1),f||Tn(t)),$i(t),f=t.type,p=t.pendingProps,T=e!==null?e.memoizedProps:null,s=p.children,Ru(f,p)?s=null:T!==null&&Ru(f,T)&&(t.flags|=32),t.memoizedState!==null&&(f=Ms(e,t,jg,null,null,l),Pl._currentValue=f),Ho(e,t),je(e,t,s,l),t.child;case 6:return e===null&&ve&&((e=l=Ue)&&(l=ky(l,t.pendingProps,Ut),l!==null?(t.stateNode=l,We=t,Ue=null,e=!0):e=!1),e||Tn(t)),null;case 13:return Of(e,t,l);case 4:return ot(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=ti(t,null,s,l):je(e,t,s,l),t.child;case 11:return Lf(e,t,t.type,t.pendingProps,l);case 7:return je(e,t,t.pendingProps,l),t.child;case 8:return je(e,t,t.pendingProps.children,l),t.child;case 12:return je(e,t,t.pendingProps.children,l),t.child;case 10:return s=t.pendingProps,Sn(t,t.type,s.value),je(e,t,s.children,l),t.child;case 9:return f=t.type._context,s=t.pendingProps.children,Wn(t),f=$e(f),s=s(f),t.flags|=1,je(e,t,s,l),t.child;case 14:return qf(e,t,t.type,t.pendingProps,l);case 15:return Gf(e,t,t.type,t.pendingProps,l);case 19:return Yf(e,t,l);case 31:return sy(e,t,l);case 22:return Hf(e,t,l,t.pendingProps);case 24:return Wn(t),s=$e(Oe),e===null?(f=ys(),f===null&&(f=Ie,p=hs(),f.pooledCache=p,p.refCount++,p!==null&&(f.pooledCacheLanes|=l),f=p),t.memoizedState={parent:s,cache:f},Ts(t),Sn(t,Oe,f)):((e.lanes&l)!==0&&(Ss(e,t),_l(t,null,null,l),Sl()),f=e.memoizedState,p=t.memoizedState,f.parent!==s?(f={parent:s,cache:s},t.memoizedState=f,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=f),Sn(t,Oe,s)):(s=p.cache,Sn(t,Oe,s),s!==f.cache&&ms(t,[Oe],l,!0))),je(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function nn(e){e.flags|=4}function tu(e,t,l,s,f){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(Td())e.flags|=8192;else throw ei=Eo,vs}else e.flags&=-16777217}function Kf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!up(t))if(Td())e.flags|=8192;else throw ei=Eo,vs}function ko(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?xr():536870912,e.lanes|=t,Gi|=t)}
vendor: 4,880 bytes, line 48
48function Ml(e,t){if(!ve)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var s=null;l!==null;)l.alternate!==null&&(s=l),l=l.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Le(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,s=0;if(t)for(var f=e.child;f!==null;)l|=f.lanes|f.childLanes,s|=f.subtreeFlags&65011712,s|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)l|=f.lanes|f.childLanes,s|=f.subtreeFlags,s|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=s,e.childLanes=l,t}function ry(e,t,l){var s=t.pendingProps;switch(rs(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Le(t),null;case 1:return Le(t),null;case 3:return l=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),$t(Oe),Ve(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Ci(t)?nn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,fs())),Le(t),null;case 26:var f=t.type,p=t.memoizedState;return e===null?(nn(t),p!==null?(Le(t),Kf(t,p)):(Le(t),tu(t,f,null,s,l))):p?p!==e.memoizedState?(nn(t),Le(t),Kf(t,p)):(Le(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&nn(t),Le(t),tu(t,f,e,s,l)),null;case 27:if(Ql(t),l=pe.current,f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&nn(t);else{if(!s){if(t.stateNode===null)throw Error(a(166));return Le(t),null}e=j.current,Ci(t)?xc(t):(e=ep(f,s,l),t.stateNode=e,nn(t))}return Le(t),null;case 5:if(Ql(t),f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&nn(t);else{if(!s){if(t.stateNode===null)throw Error(a(166));return Le(t),null}if(p=j.current,Ci(t))xc(t);else{var T=ea(pe.current);switch(p){case 1:p=T.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:p=T.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":p=T.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":p=T.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":p=T.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof s.is=="string"?T.createElement("select",{is:s.is}):T.createElement("select"),s.multiple?p.multiple=!0:s.size&&(p.size=s.size);break;default:p=typeof s.is=="string"?T.createElement(f,{is:s.is}):T.createElement(f)}}p[Ze]=t,p[ut]=s;e:for(T=t.child;T!==null;){if(T.tag===5||T.tag===6)p.appendChild(T.stateNode);else if(T.tag!==4&&T.tag!==27&&T.child!==null){T.child.return=T,T=T.child;continue}if(T===t)break e;for(;T.sibling===null;){if(T.return===null||T.return===t)break e;T=T.return}T.sibling.return=T.return,T=T.sibling}t.stateNode=p;e:switch(et(p,f,s),f){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&nn(t)}}return Le(t),tu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&nn(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(a(166));if(e=pe.current,Ci(t)){if(e=t.stateNode,l=t.memoizedProps,s=null,f=We,f!==null)switch(f.tag){case 27:case 5:s=f.memoizedProps}e[Ze]=t,e=!!(e.nodeValue===l||s!==null&&s.suppressHydrationWarning===!0||Od(e.nodeValue,l)),e||Tn(t,!0)}else e=ea(e).createTextNode(s),e[Ze]=t,t.stateNode=e}return Le(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(s=Ci(t),l!==null){if(e===null){if(!s)throw Error(a(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(557));e[Ze]=t}else Qn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Le(t),e=!1}else l=fs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Et(t),t):(Et(t),null);if((t.flags&128)!==0)throw Error(a(558))}return Le(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=Ci(t),s!==null&&s.dehydrated!==null){if(e===null){if(!f)throw Error(a(318));if(f=t.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(a(317));f[Ze]=t}else Qn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Le(t),f=!1}else f=fs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return t.flags&256?(Et(t),t):(Et(t),null)}return Et(t),(t.flags&128)!==0?(t.lanes=l,t):(l=s!==null,e=e!==null&&e.memoizedState!==null,l&&(s=t.child,f=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(f=s.alternate.memoizedState.cachePool.pool),p=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),p!==f&&(s.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),ko(t,t.updateQueue),Le(t),null);
vendor: 13,867 bytes, line 48
48case 4:return Ve(),e===null&&Cu(t.stateNode.containerInfo),Le(t),null;case 10:return $t(t.type),Le(t),null;case 19:if(V(Pe),s=t.memoizedState,s===null)return Le(t),null;if(f=(t.flags&128)!==0,p=s.rendering,p===null)if(f)Ml(s,!1);else{if(ke!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(p=No(e),p!==null){for(t.flags|=128,Ml(s,!1),e=p.updateQueue,t.updateQueue=e,ko(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Sc(l,e),l=l.sibling;return K(Pe,Pe.current&1|2),ve&&Zt(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&gt()>Fo&&(t.flags|=128,f=!0,Ml(s,!1),t.lanes=4194304)}else{if(!f)if(e=No(p),e!==null){if(t.flags|=128,f=!0,e=e.updateQueue,t.updateQueue=e,ko(t,e),Ml(s,!0),s.tail===null&&s.tailMode==="hidden"&&!p.alternate&&!ve)return Le(t),null}else 2*gt()-s.renderingStartTime>Fo&&l!==536870912&&(t.flags|=128,f=!0,Ml(s,!1),t.lanes=4194304);s.isBackwards?(p.sibling=t.child,t.child=p):(e=s.last,e!==null?e.sibling=p:t.child=p,s.last=p)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=gt(),e.sibling=null,l=Pe.current,K(Pe,f?l&1|2:l&1),ve&&Zt(t,s.treeForkCount),e):(Le(t),null);case 22:case 23:return Et(t),As(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(l&536870912)!==0&&(t.flags&128)===0&&(Le(t),t.subtreeFlags&6&&(t.flags|=8192)):Le(t),l=t.updateQueue,l!==null&&ko(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==l&&(t.flags|=2048),e!==null&&V($n),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),$t(Oe),Le(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function cy(e,t){switch(rs(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $t(Oe),Ve(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ql(t),null;case 31:if(t.memoizedState!==null){if(Et(t),t.alternate===null)throw Error(a(340));Qn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Et(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));Qn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(Pe),null;case 4:return Ve(),null;case 10:return $t(t.type),null;case 22:case 23:return Et(t),As(),e!==null&&V($n),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return $t(Oe),null;case 25:return null;default:return null}}function Xf(e,t){switch(rs(t),t.tag){case 3:$t(Oe),Ve();break;case 26:case 27:case 5:Ql(t);break;case 4:Ve();break;case 31:t.memoizedState!==null&&Et(t);break;case 13:Et(t);break;case 19:V(Pe);break;case 10:$t(t.type);break;case 22:case 23:Et(t),As(),e!==null&&V($n);break;case 24:$t(Oe)}}function Rl(e,t){try{var l=t.updateQueue,s=l!==null?l.lastEffect:null;if(s!==null){var f=s.next;l=f;do{if((l.tag&e)===e){s=void 0;var p=l.create,T=l.inst;s=p(),T.destroy=s}l=l.next}while(l!==f)}}catch(E){Ne(t,t.return,E)}}function Nn(e,t,l){try{var s=t.updateQueue,f=s!==null?s.lastEffect:null;if(f!==null){var p=f.next;s=p;do{if((s.tag&e)===e){var T=s.inst,E=T.destroy;if(E!==void 0){T.destroy=void 0,f=t;var A=l,D=E;try{D()}catch(G){Ne(f,A,G)}}}s=s.next}while(s!==p)}}catch(G){Ne(t,t.return,G)}}function Qf(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{zc(t,l)}catch(s){Ne(e,e.return,s)}}}function Zf(e,t,l){l.props=ii(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(s){Ne(e,t,s)}}function bl(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof l=="function"?e.refCleanup=l(s):l.current=s}}catch(f){Ne(e,t,f)}}function Ft(e,t){var l=e.ref,s=e.refCleanup;if(l!==null)if(typeof s=="function")try{s()}catch(f){Ne(e,t,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(f){Ne(e,t,f)}else l.current=null}function Wf(e){var t=e.type,l=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&s.focus();break e;case"img":l.src?s.src=l.src:l.srcSet&&(s.srcset=l.srcSet)}}catch(f){Ne(e,e.return,f)}}function nu(e,t,l){try{var s=e.stateNode;Iy(s,e.type,l,t),s[ut]=t}catch(f){Ne(e,e.return,f)}}function $f(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Un(e.type)||e.tag===4}function iu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$f(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Un(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function lu(e,t,l){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Kt));else if(s!==4&&(s===27&&Un(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(lu(e,t,l),e=e.sibling;e!==null;)lu(e,t,l),e=e.sibling}function Vo(e,t,l){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(s!==4&&(s===27&&Un(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Vo(e,t,l),e=e.sibling;e!==null;)Vo(e,t,l),e=e.sibling}function jf(e){var t=e.stateNode,l=e.memoizedProps;try{for(var s=e.type,f=t.attributes;f.length;)t.removeAttributeNode(f[0]);et(t,s,l),t[Ze]=e,t[ut]=l}catch(p){Ne(e,e.return,p)}}var ln=!1,Je=!1,ou=!1,ed=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function fy(e,t){if(e=e.containerInfo,Nu=sa,e=fc(e),$a(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var s=l.getSelection&&l.getSelection();if(s&&s.rangeCount!==0){l=s.anchorNode;var f=s.anchorOffset,p=s.focusNode;s=s.focusOffset;try{l.nodeType,p.nodeType}catch{l=null;break e}var T=0,E=-1,A=-1,D=0,G=0,z=e,I=null;t:for(;;){for(var L;z!==l||f!==0&&z.nodeType!==3||(E=T+f),z!==p||s!==0&&z.nodeType!==3||(A=T+s),z.nodeType===3&&(T+=z.nodeValue.length),(L=z.firstChild)!==null;)I=z,z=L;for(;;){if(z===e)break t;if(I===l&&++D===f&&(E=T),I===p&&++G===s&&(A=T),(L=z.nextSibling)!==null)break;z=I,I=z.parentNode}z=L}l=E===-1||A===-1?null:{start:E,end:A}}else l=null}l=l||{start:0,end:0}}else l=null;for(Mu={focusedElem:e,selectionRange:l},sa=!1,Qe=t;Qe!==null;)if(t=Qe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Qe=e;else for(;Qe!==null;){switch(t=Qe,p=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)f=e[l],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&p!==null){e=void 0,l=t,f=p.memoizedProps,p=p.memoizedState,s=l.stateNode;try{var $=ii(l.type,f);e=s.getSnapshotBeforeUpdate($,p),s.__reactInternalSnapshotBeforeUpdate=e}catch(oe){Ne(l,l.return,oe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)wu(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":wu(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(a(163))}if(e=t.sibling,e!==null){e.return=t.return,Qe=e;break}Qe=t.return}}function td(e,t,l){var s=l.flags;switch(l.tag){case 0:case 11:case 15:an(e,l),s&4&&Rl(5,l);break;case 1:if(an(e,l),s&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(T){Ne(l,l.return,T)}else{var f=ii(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(f,t,e.__reactInternalSnapshotBeforeUpdate)}catch(T){Ne(l,l.return,T)}}s&64&&Qf(l),s&512&&bl(l,l.return);break;case 3:if(an(e,l),s&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{zc(e,t)}catch(T){Ne(l,l.return,T)}}break;case 27:t===null&&s&4&&jf(l);case 26:case 5:an(e,l),t===null&&s&4&&Wf(l),s&512&&bl(l,l.return);break;case 12:an(e,l);break;case 31:an(e,l),s&4&&ld(e,l);break;case 13:an(e,l),s&4&&od(e,l),s&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Sy.bind(null,l),Vy(e,l))));break;case 22:if(s=l.memoizedState!==null||ln,!s){t=t!==null&&t.memoizedState!==null||Je,f=ln;var p=Je;ln=s,(Je=t)&&!p?sn(e,l,(l.subtreeFlags&8772)!==0):an(e,l),ln=f,Je=p}break;case 30:break;default:an(e,l)}}function nd(e){var t=e.alternate;t!==null&&(e.alternate=null,nd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&qa(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ge=null,ct=!1;function on(e,t,l){for(l=l.child;l!==null;)id(e,t,l),l=l.sibling}function id(e,t,l){if(yt&&typeof yt.onCommitFiberUnmount=="function")try{yt.onCommitFiberUnmount(ji,l)}catch{}switch(l.tag){case 26:Je||Ft(l,t),on(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Je||Ft(l,t);var s=Ge,f=ct;Un(l.type)&&(Ge=l.stateNode,ct=!1),on(e,t,l),zl(l.stateNode),Ge=s,ct=f;break;case 5:Je||Ft(l,t);case 6:if(s=Ge,f=ct,Ge=null,on(e,t,l),Ge=s,ct=f,Ge!==null)if(ct)try{(Ge.nodeType===9?Ge.body:Ge.nodeName==="HTML"?Ge.ownerDocument.body:Ge).removeChild(l.stateNode)}catch(p){Ne(l,t,p)}else try{Ge.removeChild(l.stateNode)}catch(p){Ne(l,t,p)}break;case 18:Ge!==null&&(ct?(e=Ge,Qd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Fi(e)):Qd(Ge,l.stateNode));break;case 4:s=Ge,f=ct,Ge=l.stateNode.containerInfo,ct=!0,on(e,t,l),Ge=s,ct=f;break;case 0:case 11:case 14:case 15:Nn(2,l,t),Je||Nn(4,l,t),on(e,t,l);break;case 1:Je||(Ft(l,t),s=l.stateNode,typeof s.componentWillUnmount=="function"&&Zf(l,t,s)),on(e,t,l);break;case 21:on(e,t,l);break;case 22:Je=(s=Je)||l.memoizedState!==null,on(e,t,l),Je=s;break;default:on(e,t,l)}}function ld(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Fi(e)}catch(l){Ne(t,t.return,l)}}}function od(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Fi(e)}catch(l){Ne(t,t.return,l)}}function dy(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ed),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ed),t;default:throw Error(a(435,e.tag))}}function Po(e,t){var l=dy(e);t.forEach(function(s){if(!l.has(s)){l.add(s);var f=_y.bind(null,e,s);s.then(f,f)}})}function ft(e,t){var l=t.deletions;if(l!==null)for(var s=0;s<l.length;s++){var f=l[s],p=e,T=t,E=T;e:for(;E!==null;){switch(E.tag){case 27:if(Un(E.type)){Ge=E.stateNode,ct=!1;break e}break;case 5:Ge=E.stateNode,ct=!1;break e;case 3:case 4:Ge=E.stateNode.containerInfo,ct=!0;break e}E=E.return}if(Ge===null)throw Error(a(160));id(p,T,f),Ge=null,ct=!1,p=f.alternate,p!==null&&(p.return=null),f.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ad(t,e),t=t.sibling}var kt=null;function ad(e,t){var l=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ft(t,e),dt(e),s&4&&(Nn(3,e,e.return),Rl(3,e),Nn(5,e,e.return));break;case 1:ft(t,e),dt(e),s&512&&(Je||l===null||Ft(l,l.return)),s&64&&ln&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?s:l.concat(s))));break;case 26:var f=kt;if(ft(t,e),dt(e),s&512&&(Je||l===null||Ft(l,l.return)),s&4){var p=l!==null?l.memoizedState:null;if(s=e.memoizedState,l===null)if(s===null)if(e.stateNode===null){e:{s=e.type,l=e.memoizedProps,f=f.ownerDocument||f;t:switch(s){case"title":p=f.getElementsByTagName("title")[0],(!p||p[nl]||p[Ze]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=f.createElement(s),f.head.insertBefore(p,f.querySelector("head > title"))),et(p,s,l),p[Ze]=e,Xe(p),s=p;break e;case"link":var T=ap("link","href",f).get(s+(l.href||""));if(T){for(var E=0;E<T.length;E++)if(p=T[E],p.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&p.getAttribute("rel")===(l.rel==null?null:l.rel)&&p.getAttribute("title")===(l.title==null?null:l.title)&&p.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){T.splice(E,1);break t}}p=f.createElement(s),et(p,s,l),f.head.appendChild(p);break;case"meta":if(T=ap("meta","content",f).get(s+(l.content||""))){for(E=0;E<T.length;E++)if(p=T[E],p.getAttribute("content")===(l.content==null?null:""+l.content)&&p.getAttribute("name")===(l.name==null?null:l.name)&&p.getAttribute("property")===(l.property==null?null:l.property)&&p.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&p.getAttribute("charset")===(l.charSet==null?null:l.charSet)){T.splice(E,1);break t}}p=f.createElement(s),et(p,s,l),f.head.appendChild(p);break;default:throw Error(a(468,s))}p[Ze]=e,Xe(p),s=p}e.stateNode=s}else sp(f,e.type,e.stateNode);else e.stateNode=op(f,s,e.memoizedProps);else p!==s?(p===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):p.count--,s===null?sp(f,e.type,e.stateNode):op(f,s,e.memoizedProps)):s===null&&e.stateNode!==null&&nu(e,e.memoizedProps,l.memoizedProps)}break;case 27:ft(t,e),dt(e),s&512&&(Je||l===null||Ft(l,l.return)),l!==null&&s&4&&nu(e,e.memoizedProps,l.memoizedProps);break;case 5:if(ft(t,e),dt(e),s&512&&(Je||l===null||Ft(l,l.return)),e.flags&32){f=e.stateNode;try{pi(f,"")}catch($){Ne(e,e.return,$)}}s&4&&e.stateNode!=null&&(f=e.memoizedProps,nu(e,f,l!==null?l.memoizedProps:f)),s&1024&&(ou=!0);break;case 6:if(ft(t,e),dt(e),s&4){if(e.stateNode===null)throw Error(a(162));s=e.memoizedProps,l=e.stateNode;try{l.nodeValue=s}
vendor: 1,278 bytes, line 48
48catch($){Ne(e,e.return,$)}}break;case 3:if(ia=null,f=kt,kt=ta(t.containerInfo),ft(t,e),kt=f,dt(e),s&4&&l!==null&&l.memoizedState.isDehydrated)try{Fi(t.containerInfo)}catch($){Ne(e,e.return,$)}ou&&(ou=!1,sd(e));break;case 4:s=kt,kt=ta(e.stateNode.containerInfo),ft(t,e),dt(e),kt=s;break;case 12:ft(t,e),dt(e);break;case 31:ft(t,e),dt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Po(e,s)));break;case 13:ft(t,e),dt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Oo=gt()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Po(e,s)));break;case 22:f=e.memoizedState!==null;var A=l!==null&&l.memoizedState!==null,D=ln,G=Je;if(ln=D||f,Je=G||A,ft(t,e),Je=G,ln=D,dt(e),s&8192)e:for(t=e.stateNode,t._visibility=f?t._visibility&-2:t._visibility|1,f&&(l===null||A||ln||Je||li(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){A=l=t;try{if(p=A.stateNode,f)T=p.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none";else{E=A.stateNode;var z=A.memoizedProps.style,I=z!=null&&z.hasOwnProperty("display")?z.display:null;E.style.display=I==null||typeof I=="boolean"?"":(""+I).trim()}}catch($){Ne(A,A.return,$)}}}else if(t.tag===6){if(l===null){A=t;try{A.stateNode.nodeValue=f?"":A.memoizedProps}
vendor: 6,866 bytes, line 48
48catch($){Ne(A,A.return,$)}}}else if(t.tag===18){if(l===null){A=t;try{var L=A.stateNode;f?Zd(L,!0):Zd(A.stateNode,!1)}catch($){Ne(A,A.return,$)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(l=s.retryQueue,l!==null&&(s.retryQueue=null,Po(e,l))));break;case 19:ft(t,e),dt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Po(e,s)));break;case 30:break;case 21:break;default:ft(t,e),dt(e)}}function dt(e){var t=e.flags;if(t&2){try{for(var l,s=e.return;s!==null;){if($f(s)){l=s;break}s=s.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var f=l.stateNode,p=iu(e);Vo(e,p,f);break;case 5:var T=l.stateNode;l.flags&32&&(pi(T,""),l.flags&=-33);var E=iu(e);Vo(e,E,T);break;case 3:case 4:var A=l.stateNode.containerInfo,D=iu(e);lu(e,D,A);break;default:throw Error(a(161))}}catch(G){Ne(e,e.return,G)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function sd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;sd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function an(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)td(e,t.alternate,t),t=t.sibling}function li(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Nn(4,t,t.return),li(t);break;case 1:Ft(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&Zf(t,t.return,l),li(t);break;case 27:zl(t.stateNode);case 26:case 5:Ft(t,t.return),li(t);break;case 22:t.memoizedState===null&&li(t);break;case 30:li(t);break;default:li(t)}e=e.sibling}}function sn(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,f=e,p=t,T=p.flags;switch(p.tag){case 0:case 11:case 15:sn(f,p,l),Rl(4,p);break;case 1:if(sn(f,p,l),s=p,f=s.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(D){Ne(s,s.return,D)}if(s=p,f=s.updateQueue,f!==null){var E=s.stateNode;try{var A=f.shared.hiddenCallbacks;if(A!==null)for(f.shared.hiddenCallbacks=null,f=0;f<A.length;f++)Hc(A[f],E)}catch(D){Ne(s,s.return,D)}}l&&T&64&&Qf(p),bl(p,p.return);break;case 27:jf(p);case 26:case 5:sn(f,p,l),l&&s===null&&T&4&&Wf(p),bl(p,p.return);break;case 12:sn(f,p,l);break;case 31:sn(f,p,l),l&&T&4&&ld(f,p);break;case 13:sn(f,p,l),l&&T&4&&od(f,p);break;case 22:p.memoizedState===null&&sn(f,p,l),bl(p,p.return);break;case 30:break;default:sn(f,p,l)}t=t.sibling}}function au(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&hl(l))}function su(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&hl(e))}function Vt(e,t,l,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ud(e,t,l,s),t=t.sibling}function ud(e,t,l,s){var f=t.flags;switch(t.tag){case 0:case 11:case 15:Vt(e,t,l,s),f&2048&&Rl(9,t);break;case 1:Vt(e,t,l,s);break;case 3:Vt(e,t,l,s),f&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&hl(e)));break;case 12:if(f&2048){Vt(e,t,l,s),e=t.stateNode;try{var p=t.memoizedProps,T=p.id,E=p.onPostCommit;typeof E=="function"&&E(T,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(A){Ne(t,t.return,A)}}else Vt(e,t,l,s);break;case 31:Vt(e,t,l,s);break;case 13:Vt(e,t,l,s);break;case 23:break;case 22:p=t.stateNode,T=t.alternate,t.memoizedState!==null?p._visibility&2?Vt(e,t,l,s):wl(e,t):p._visibility&2?Vt(e,t,l,s):(p._visibility|=2,Ui(e,t,l,s,(t.subtreeFlags&10256)!==0||!1)),f&2048&&au(T,t);break;case 24:Vt(e,t,l,s),f&2048&&su(t.alternate,t);break;default:Vt(e,t,l,s)}}function Ui(e,t,l,s,f){for(f=f&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var p=e,T=t,E=l,A=s,D=T.flags;switch(T.tag){case 0:case 11:case 15:Ui(p,T,E,A,f),Rl(8,T);break;case 23:break;case 22:var G=T.stateNode;T.memoizedState!==null?G._visibility&2?Ui(p,T,E,A,f):wl(p,T):(G._visibility|=2,Ui(p,T,E,A,f)),f&&D&2048&&au(T.alternate,T);break;case 24:Ui(p,T,E,A,f),f&&D&2048&&su(T.alternate,T);break;default:Ui(p,T,E,A,f)}t=t.sibling}}function wl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,s=t,f=s.flags;switch(s.tag){case 22:wl(l,s),f&2048&&au(s.alternate,s);break;case 24:wl(l,s),f&2048&&su(s.alternate,s);break;default:wl(l,s)}t=t.sibling}}var Dl=8192;function Li(e,t,l){if(e.subtreeFlags&Dl)for(e=e.child;e!==null;)rd(e,t,l),e=e.sibling}function rd(e,t,l){switch(e.tag){case 26:Li(e,t,l),e.flags&Dl&&e.memoizedState!==null&&$y(l,kt,e.memoizedState,e.memoizedProps);break;case 5:Li(e,t,l);break;case 3:case 4:var s=kt;kt=ta(e.stateNode.containerInfo),Li(e,t,l),kt=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Dl,Dl=16777216,Li(e,t,l),Dl=s):Li(e,t,l));break;default:Li(e,t,l)}}function cd(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Il(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var s=t[l];Qe=s,dd(s,e)}cd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)fd(e),e=e.sibling}function fd(e){switch(e.tag){case 0:case 11:case 15:Il(e),e.flags&2048&&Nn(9,e,e.return);break;case 3:Il(e);break;case 12:Il(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Bo(e)):Il(e);break;default:Il(e)}}function Bo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var s=t[l];Qe=s,dd(s,e)}cd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Nn(8,t,t.return),Bo(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Bo(t));break;default:Bo(t)}e=e.sibling}}function dd(e,t){for(;Qe!==null;){var l=Qe;switch(l.tag){case 0:case 11:case 15:Nn(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var s=l.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:hl(l.memoizedState.cache)}if(s=l.child,s!==null)s.return=l,Qe=s;else e:for(l=e;Qe!==null;){s=Qe;var f=s.sibling,p=s.return;if(nd(s),s===l){Qe=null;break e}if(f!==null){f.return=p,Qe=f;break e}Qe=p}}}var py={getCacheForType:function(e){var t=$e(Oe),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return $e(Oe).controller.signal}},my=typeof WeakMap=="function"?WeakMap:Map,Ee=0,Ie=null,me=null,ge=0,xe=0,Ct=null,Mn=!1,qi=!1,uu=!1,un=0,ke=0,Rn=0,oi=0,ru=0,At=0,Gi=0,Ul=null,pt=null,cu=!1,Oo=0,pd=0,Fo=1/0,Yo=null,bn=null,Ke=0,wn=null,Hi=null,rn=0,fu=0,du=null,md=null,
vendor: 14,592 bytes, line 48
48Ll=0,pu=null;function xt(){return(Ee&2)!==0&&ge!==0?ge&-ge:q.T!==null?Tu():br()}function hd(){if(At===0)if((ge&536870912)===0||ve){var e=$l;$l<<=1,($l&3932160)===0&&($l=262144),At=e}else At=536870912;return e=_t.current,e!==null&&(e.flags|=32),At}function mt(e,t,l){(e===Ie&&(xe===2||xe===9)||e.cancelPendingCommit!==null)&&(zi(e,0),Dn(e,ge,At,!1)),tl(e,l),((Ee&2)===0||e!==Ie)&&(e===Ie&&((Ee&2)===0&&(oi|=l),ke===4&&Dn(e,ge,At,!1)),Yt(e))}function gd(e,t,l){if((Ee&6)!==0)throw Error(a(327));var s=!l&&(t&127)===0&&(t&e.expiredLanes)===0||el(e,t),f=s?yy(e,t):hu(e,t,!0),p=s;do{if(f===0){qi&&!s&&Dn(e,t,0,!1);break}else{if(l=e.current.alternate,p&&!hy(l)){f=hu(e,t,!1),p=!1;continue}if(f===2){if(p=t,e.errorRecoveryDisabledLanes&p)var T=0;else T=e.pendingLanes&-536870913,T=T!==0?T:T&536870912?536870912:0;if(T!==0){t=T;e:{var E=e;f=Ul;var A=E.current.memoizedState.isDehydrated;if(A&&(zi(E,T).flags|=256),T=hu(E,T,!1),T!==2){if(uu&&!A){E.errorRecoveryDisabledLanes|=p,oi|=p,f=4;break e}p=pt,pt=f,p!==null&&(pt===null?pt=p:pt.push.apply(pt,p))}f=T}if(p=!1,f!==2)continue}}if(f===1){zi(e,0),Dn(e,t,0,!0);break}e:{switch(s=e,p=f,p){case 0:case 1:throw Error(a(345));case 4:if((t&4194048)!==t)break;case 6:Dn(s,t,At,!Mn);break e;case 2:pt=null;break;case 3:case 5:break;default:throw Error(a(329))}if((t&62914560)===t&&(f=Oo+300-gt(),10<f)){if(Dn(s,t,At,!Mn),eo(s,0,!0)!==0)break e;rn=t,s.timeoutHandle=Kd(yd.bind(null,s,l,pt,Yo,cu,t,At,oi,Gi,Mn,p,"Throttled",-0,0),f);break e}yd(s,l,pt,Yo,cu,t,At,oi,Gi,Mn,p,null,-0,0)}}break}while(!0);Yt(e)}function yd(e,t,l,s,f,p,T,E,A,D,G,z,I,L){if(e.timeoutHandle=-1,z=t.subtreeFlags,z&8192||(z&16785408)===16785408){z={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Kt},rd(t,p,z);var $=(p&62914560)===p?Oo-gt():(p&4194048)===p?pd-gt():0;if($=jy(z,$),$!==null){rn=p,e.cancelPendingCommit=$(xd.bind(null,e,t,p,l,s,f,T,E,A,G,z,null,I,L)),Dn(e,p,T,!D);return}}xd(e,t,p,l,s,f,T,E,A)}function hy(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var s=0;s<l.length;s++){var f=l[s],p=f.getSnapshot;f=f.value;try{if(!Tt(p(),f))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Dn(e,t,l,s){t&=~ru,t&=~oi,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var f=t;0<f;){var p=31-vt(f),T=1<<p;s[p]=-1,f&=~T}l!==0&&Nr(e,l,t)}function Jo(){return(Ee&6)===0?(ql(0),!1):!0}function mu(){if(me!==null){if(xe===0)var e=me.return;else e=me,Wt=Zn=null,ws(e),Ri=null,yl=0,e=me;for(;e!==null;)Xf(e.alternate,e),e=e.return;me=null}}function zi(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,qy(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),rn=0,mu(),Ie=e,me=l=Qt(e.current,null),ge=t,xe=0,Ct=null,Mn=!1,qi=el(e,t),uu=!1,Gi=At=ru=oi=Rn=ke=0,pt=Ul=null,cu=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var f=31-vt(s),p=1<<f;t|=e[f],s&=~p}return un=t,po(),l}function vd(e,t){fe=null,q.H=xl,t===Mi||t===_o?(t=Uc(),xe=3):t===vs?(t=Uc(),xe=4):xe=t===Js?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ct=t,me===null&&(ke=1,qo(e,wt(t,e.current)))}function Td(){var e=_t.current;return e===null?!0:(ge&4194048)===ge?Lt===null:(ge&62914560)===ge||(ge&536870912)!==0?e===Lt:!1}function Sd(){var e=q.H;return q.H=xl,e===null?xl:e}function _d(){var e=q.A;return q.A=py,e}function Ko(){ke=4,Mn||(ge&4194048)!==ge&&_t.current!==null||(qi=!0),(Rn&134217727)===0&&(oi&134217727)===0||Ie===null||Dn(Ie,ge,At,!1)}function hu(e,t,l){var s=Ee;Ee|=2;var f=Sd(),p=_d();(Ie!==e||ge!==t)&&(Yo=null,zi(e,t)),t=!1;var T=ke;e:do try{if(xe!==0&&me!==null){var E=me,A=Ct;switch(xe){case 8:mu(),T=6;break e;case 3:case 2:case 9:case 6:_t.current===null&&(t=!0);var D=xe;if(xe=0,Ct=null,ki(e,E,A,D),l&&qi){T=0;break e}break;default:D=xe,xe=0,Ct=null,ki(e,E,A,D)}}gy(),T=ke;break}catch(G){vd(e,G)}while(!0);return t&&e.shellSuspendCounter++,Wt=Zn=null,Ee=s,q.H=f,q.A=p,me===null&&(Ie=null,ge=0,po()),T}function gy(){for(;me!==null;)Ed(me)}function yy(e,t){var l=Ee;Ee|=2;var s=Sd(),f=_d();Ie!==e||ge!==t?(Yo=null,Fo=gt()+500,zi(e,t)):qi=el(e,t);e:do try{if(xe!==0&&me!==null){t=me;var p=Ct;t:switch(xe){case 1:xe=0,Ct=null,ki(e,t,p,1);break;case 2:case 9:if(Dc(p)){xe=0,Ct=null,Cd(t);break}t=function(){xe!==2&&xe!==9||Ie!==e||(xe=7),Yt(e)},p.then(t,t);break e;case 3:xe=7;break e;case 4:xe=5;break e;case 7:Dc(p)?(xe=0,Ct=null,Cd(t)):(xe=0,Ct=null,ki(e,t,p,7));break;case 5:var T=null;switch(me.tag){case 26:T=me.memoizedState;case 5:case 27:var E=me;if(T?up(T):E.stateNode.complete){xe=0,Ct=null;var A=E.sibling;if(A!==null)me=A;else{var D=E.return;D!==null?(me=D,Xo(D)):me=null}break t}}xe=0,Ct=null,ki(e,t,p,5);break;case 6:xe=0,Ct=null,ki(e,t,p,6);break;case 8:mu(),ke=6;break e;default:throw Error(a(462))}}vy();break}catch(G){vd(e,G)}while(!0);return Wt=Zn=null,q.H=s,q.A=f,Ee=l,me!==null?0:(Ie=null,ge=0,po(),ke)}function vy(){for(;me!==null&&!Ph();)Ed(me)}function Ed(e){var t=Jf(e.alternate,e,un);e.memoizedProps=e.pendingProps,t===null?Xo(e):me=t}function Cd(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Vf(l,t,t.pendingProps,t.type,void 0,ge);break;case 11:t=Vf(l,t,t.pendingProps,t.type.render,t.ref,ge);break;case 5:ws(t);default:Xf(l,t),t=me=Sc(t,un),t=Jf(l,t,un)}e.memoizedProps=e.pendingProps,t===null?Xo(e):me=t}function ki(e,t,l,s){Wt=Zn=null,ws(t),Ri=null,yl=0;var f=t.return;try{if(ay(e,f,t,l,ge)){ke=1,qo(e,wt(l,e.current)),me=null;return}}catch(p){if(f!==null)throw me=f,p;ke=1,qo(e,wt(l,e.current)),me=null;return}t.flags&32768?(ve||s===1?e=!0:qi||(ge&536870912)!==0?e=!1:(Mn=e=!0,(s===2||s===9||s===3||s===6)&&(s=_t.current,s!==null&&s.tag===13&&(s.flags|=16384))),Ad(t,e)):Xo(t)}function Xo(e){var t=e;do{if((t.flags&32768)!==0){Ad(t,Mn);return}e=t.return;var l=ry(t.alternate,t,un);if(l!==null){me=l;return}if(t=t.sibling,t!==null){me=t;return}me=t=e}while(t!==null);ke===0&&(ke=5)}function Ad(e,t){do{var l=cy(e.alternate,e);if(l!==null){l.flags&=32767,me=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){me=e;return}me=e=l}while(e!==null);ke=6,me=null}function xd(e,t,l,s,f,p,T,E,A){e.cancelPendingCommit=null;do Qo();while(Ke!==0);if((Ee&6)!==0)throw Error(a(327));if(t!==null){if(t===e.current)throw Error(a(177));if(p=t.lanes|t.childLanes,p|=is,Wh(e,l,p,T,E,A),e===Ie&&(me=Ie=null,ge=0),Hi=t,wn=e,rn=l,fu=p,du=f,md=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Ey(Zl,function(){return wd(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=q.T,q.T=null,f=Y.p,Y.p=2,T=Ee,Ee|=4;try{fy(e,t,l)}finally{Ee=T,Y.p=f,q.T=s}}Ke=1,Nd(),Md(),Rd()}}function Nd(){if(Ke===1){Ke=0;var e=wn,t=Hi,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=q.T,q.T=null;var s=Y.p;Y.p=2;var f=Ee;Ee|=4;try{ad(t,e);var p=Mu,T=fc(e.containerInfo),E=p.focusedElem,A=p.selectionRange;if(T!==E&&E&&E.ownerDocument&&cc(E.ownerDocument.documentElement,E)){if(A!==null&&$a(E)){var D=A.start,G=A.end;if(G===void 0&&(G=D),"selectionStart"in E)E.selectionStart=D,E.selectionEnd=Math.min(G,E.value.length);else{var z=E.ownerDocument||document,I=z&&z.defaultView||window;if(I.getSelection){var L=I.getSelection(),$=E.textContent.length,oe=Math.min(A.start,$),we=A.end===void 0?oe:Math.min(A.end,$);!L.extend&&oe>we&&(T=we,we=oe,oe=T);var R=rc(E,oe),N=rc(E,we);if(R&&N&&(L.rangeCount!==1||L.anchorNode!==R.node||L.anchorOffset!==R.offset||L.focusNode!==N.node||L.focusOffset!==N.offset)){var w=z.createRange();w.setStart(R.node,R.offset),L.removeAllRanges(),oe>we?(L.addRange(w),L.extend(N.node,N.offset)):(w.setEnd(N.node,N.offset),L.addRange(w))}}}}for(z=[],L=E;L=L.parentNode;)L.nodeType===1&&z.push({element:L,left:L.scrollLeft,top:L.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<z.length;E++){var H=z[E];H.element.scrollLeft=H.left,H.element.scrollTop=H.top}}sa=!!Nu,Mu=Nu=null}finally{Ee=f,Y.p=s,q.T=l}}e.current=t,Ke=2}}function Md(){if(Ke===2){Ke=0;var e=wn,t=Hi,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=q.T,q.T=null;var s=Y.p;Y.p=2;var f=Ee;Ee|=4;try{td(e,t.alternate,t)}finally{Ee=f,Y.p=s,q.T=l}}Ke=3}}function Rd(){if(Ke===4||Ke===3){Ke=0,Bh();var e=wn,t=Hi,l=rn,s=md;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ke=5:(Ke=0,Hi=wn=null,bd(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(bn=null),Ua(l),t=t.stateNode,yt&&typeof yt.onCommitFiberRoot=="function")try{yt.onCommitFiberRoot(ji,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=q.T,f=Y.p,Y.p=2,q.T=null;try{for(var p=e.onRecoverableError,T=0;T<s.length;T++){var E=s[T];p(E.value,{componentStack:E.stack})}}finally{q.T=t,Y.p=f}}(rn&3)!==0&&Qo(),Yt(e),f=e.pendingLanes,(l&261930)!==0&&(f&42)!==0?e===pu?Ll++:(Ll=0,pu=e):Ll=0,ql(0)}}function bd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,hl(t)))}function Qo(){return Nd(),Md(),Rd(),wd()}function wd(){if(Ke!==5)return!1;var e=wn,t=fu;fu=0;var l=Ua(rn),s=q.T,f=Y.p;try{Y.p=32>l?32:l,q.T=null,l=du,du=null;var p=wn,T=rn;if(Ke=0,Hi=wn=null,rn=0,(Ee&6)!==0)throw Error(a(331));var E=Ee;if(Ee|=4,fd(p.current),ud(p,p.current,T,l),Ee=E,ql(0,!1),yt&&typeof yt.onPostCommitFiberRoot=="function")try{yt.onPostCommitFiberRoot(ji,p)}catch{}return!0}finally{Y.p=f,q.T=s,bd(e,t)}}function Dd(e,t,l){t=wt(l,t),t=Ys(e.stateNode,t,2),e=Cn(e,t,2),e!==null&&(tl(e,2),Yt(e))}function Ne(e,t,l){if(e.tag===3)Dd(e,e,l);else for(;t!==null;){if(t.tag===3){Dd(t,e,l);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(bn===null||!bn.has(s))){e=wt(l,e),l=If(2),s=Cn(t,l,2),s!==null&&(Uf(l,s,t,e),tl(s,2),Yt(s));break}}t=t.return}}function gu(e,t,l){var s=e.pingCache;if(s===null){s=e.pingCache=new my;var f=new Set;s.set(t,f)}else f=s.get(t),f===void 0&&(f=new Set,s.set(t,f));f.has(l)||(uu=!0,f.add(l),e=Ty.bind(null,e,t,l),t.then(e,e))}function Ty(e,t,l){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Ie===e&&(ge&l)===l&&(ke===4||ke===3&&(ge&62914560)===ge&&300>gt()-Oo?(Ee&2)===0&&zi(e,0):ru|=l,Gi===ge&&(Gi=0)),Yt(e)}function Id(e,t){t===0&&(t=xr()),e=Kn(e,t),e!==null&&(tl(e,t),Yt(e))}function Sy(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Id(e,l)}function _y(e,t){var l=0;switch(e.tag){case 31:case 13:var s=e.stateNode,f=e.memoizedState;f!==null&&(l=f.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(a(314))}s!==null&&s.delete(t),Id(e,l)}function Ey(e,t){return ba(e,t)}var Zo=null,Vi=null,yu=!1,Wo=!1,vu=!1,In=0;function Yt(e){e!==Vi&&e.next===null&&(Vi===null?Zo=Vi=e:Vi=Vi.next=e),Wo=!0,yu||(yu=!0,Ay())}function ql(e,t){if(!vu&&Wo){vu=!0;do for(var l=!1,s=Zo;s!==null;){if(e!==0){var f=s.pendingLanes;if(f===0)var p=0;else{var T=s.suspendedLanes,E=s.pingedLanes;p=(1<<31-vt(42|e)+1)-1,p&=f&~(T&~E),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(l=!0,Gd(s,p))}else p=ge,p=eo(s,s===Ie?p:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(p&3)===0||el(s,p)||(l=!0,Gd(s,p));s=s.next}while(l);vu=!1}}function Cy(){Ud()}function Ud(){Wo=yu=!1;var e=0;In!==0&&Ly()&&(e=In);for(var t=gt(),l=null,s=Zo;s!==null;){var f=s.next,p=Ld(s,t);p===0?(s.next=null,l===null?Zo=f:l.next=f,f===null&&(Vi=l)):(l=s,(e!==0||(p&3)!==0)&&(Wo=!0)),s=f}Ke!==0&&Ke!==5||ql(e),In!==0&&(In=0)}function Ld(e,t){for(var l=e.suspendedLanes,s=e.pingedLanes,f=e.expirationTimes,p=e.pendingLanes&-62914561;0<p;){var T=31-vt(p),E=1<<T,A=f[T];A===-1?((E&l)===0||(E&s)!==0)&&(f[T]=Zh(E,t)):A<=t&&(e.expiredLanes|=E),p&=~E}if(t=Ie,l=ge,l=eo(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,l===0||e===t&&(xe===2||xe===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&wa(s),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||el(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(s!==null&&wa(s),Ua(l)){case 2:case 8:l=Cr;break;case 32:l=Zl;break;case 268435456:l=Ar;break;default:l=Zl}return s=qd.bind(null,e),l=ba(l,s),e.callbackPriority=t,e.callbackNode=l,t}return s!==null&&s!==null&&wa(s),e.callbackPriority=2,e.callbackNode=null,2}function qd(e,t){if(Ke!==0&&Ke!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Qo()&&e.callbackNode!==l)return null;var s=ge;return s=eo(e,e===Ie?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(gd(e,s,t),Ld(e,gt()),e.callbackNode!=null&&e.callbackNode===l?qd.bind(null,e):null)}function Gd(e,t){if(Qo())return null;gd(e,t,!0)}function Ay(){Gy(function(){(Ee&6)!==0?ba(Er,Cy):Ud()})}function Tu(){if(In===0){var e=xi;e===0&&(e=Wl,Wl<<=1,(Wl&261888)===0&&(Wl=256)),In=e}return In}function Hd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:lo(""+e)}function zd(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function xy(e,t,l,s,f){if(t==="submit"&&l&&l.stateNode===f){var p=Hd((f[ut]||null).action),T=s.submitter;T&&(t=(t=T[ut]||null)?Hd(t.formAction):T.getAttribute("formAction"),t!==null&&(p=t,T=null));var E=new uo("action","action",null,s,f);e.push({event:E,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(In!==0){var A=T?zd(f,T):new FormData(f);ks(l,{pending:!0,data:A,method:f.method,action:p},null,A)}}else typeof p=="function"&&(E.preventDefault(),A=T?zd(f,T):new FormData(f),ks(l,{pending:!0,data:A,method:f.method,action:p},p,A))},currentTarget:f}]})}}for(var Su=0;Su<ns.length;Su++){var _u=ns[Su],Ny=_u.toLowerCase(),My=_u[0].toUpperCase()+_u.slice(1);zt(Ny,"on"+My)}zt(mc,"onAnimationEnd"),zt(hc,"onAnimationIteration"),zt(gc,"onAnimationStart"),zt("dblclick","onDoubleClick"),zt("focusin","onFocus"),zt("focusout","onBlur"),zt(Og,"onTransitionRun"),zt(Fg,"onTransitionStart"),zt(Yg,"onTransitionCancel"),zt(yc,"onTransitionEnd"),fi("onMouseEnter",["mouseout","mouseover"]),fi("onMouseLeave",["mouseout","mouseover"]),fi("onPointerEnter",["pointerout","pointerover"]),fi("onPointerLeave",["pointerout","pointerover"]),On("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),On("onSelect","focusout contextmenu dragend focu
48sin keydown keyup mousedown mouseup selectionchange".split(" ")),On("onBeforeInput",["compositionend","keypress","textInput","paste"]),On("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),On("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),On("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gl="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(" "),Ry=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Gl));function kd(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var s=e[l],f=s.event;s=s.listeners;e:{var p=void 0;if(t)for(var T=s.length-1;0<=T;T--){var E=s[T],A=E.instance,D=E.currentTarget;if(E=E.listener,A!==p&&f.isPropagationStopped())break e;p=E,f.currentTarget=D;try{p(f)}catch(G){fo(G)}f.currentTarget=null,p=A}else for(T=0;T<s.length;T++){if(E=s[T],A=E.instance,D=E.currentTarget,E=E.listener,A!==p&&f.isPropagationStopped())break e;p=E,f.currentTarget=D;try{p(f)}catch(G){fo(G)}f.currentTarget=null,p=A}}}}function he(e,t){var l=t[La];l===void 0&&(l=t[La]=new Set);var s=e+"__bubble";l.has(s)||(Vd(t,e,2,!1),l.add(s))}function Eu(e,t,l){var s=0;t&&(s|=4),Vd(l,e,s,t)}var $o="_reactListening"+Math.random().toString(36).slice(2);function Cu(e){if(!e[$o]){e[$o]=!0,Ir.forEach(function(l){l!=="selectionchange"&&(Ry.has(l)||Eu(l,!1,e),Eu(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[$o]||(t[$o]=!0,Eu("selectionchange",!1,t))}}function Vd(e,t,l,s){switch(hp(t)){case 2:var f=n0;break;case 8:f=i0;break;default:f=zu}l=f.bind(null,t,l,e),f=void 0,!Oa||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(f=!0),s?f!==void 0?e.addEventListener(t,l,{capture:!0,passive:f}):e.addEventListener(t,l,!0):f!==void 0?e.addEventListener(t,l,{passive:f}):e.addEventListener(t,l,!1)}function Au(e,t,l,s,f){var p=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var T=s.tag;if(T===3||T===4){var E=s.stateNode.containerInfo;if(E===f)break;if(T===4)for(T=s.return;T!==null;){var A=T.tag;if((A===3||A===4)&&T.stateNode.containerInfo===f)return;T=T.return}for(;E!==null;){if(T=ui(E),T===null)return;if(A=T.tag,A===5||A===6||A===26||A===27){s=p=T;continue e}E=E.parentNode}}s=s.return}Fr(function(){var D=p,G=Pa(l),z=[];e:{var I=vc.get(e);if(I!==void 0){var L=uo,$=e;switch(e){case"keypress":if(ao(l)===0)break e;case"keydown":case"keyup":L=_g;break;case"focusin":$="focus",L=Ka;break;case"focusout":$="blur",L=Ka;break;case"beforeblur":case"afterblur":L=Ka;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":L=Kr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":L=rg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":L=Ag;break;case mc:case hc:case gc:L=dg;break;case yc:L=Ng;break;case"scroll":case"scrollend":L=sg;break;case"wheel":L=Rg;break;case"copy":case"cut":case"paste":L=mg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":L=Qr;break;case"toggle":case"beforetoggle":L=wg}var oe=(t&4)!==0,we=!oe&&(e==="scroll"||e==="scrollend"),R=oe?I!==null?I+"Capture":null:I;oe=[];for(var N=D,w;N!==null;){var H=N;if(w=H.stateNode,H=H.tag,H!==5&&H!==26&&H!==27||w===null||R===null||(H=ll(N,R),H!=null&&oe.push(Hl(N,H,w))),we)break;N=N.return}0<oe.length&&(I=new L(I,$,null,l,G),z.push({event:I,listeners:oe}))}}if((t&7)===0){e:{if(I=e==="mouseover"||e==="pointerover",L=e==="mouseout"||e==="pointerout",I&&l!==Va&&($=l.relatedTarget||l.fromElement)&&(ui($)||$[si]))break e;if((L||I)&&(I=G.window===G?G:(I=G.ownerDocument)?I.defaultView||I.parentWindow:window,L?($=l.relatedTarget||l.toElement,L=D,$=$?ui($):null,$!==null&&(we=d($),oe=$.tag,$!==we||oe!==5&&oe!==27&&oe!==6)&&($=null)):(L=null,$=D),L!==$)){if(oe=Kr,H="onMouseLeave",R="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(oe=Qr,H="onPointerLeave",R="onPointerEnter",N="pointer"),we=L==null?I:il(L),w=$==null?I:il($),I=new oe(H,N+"leave",L,l,G),I.target=we,I.relatedTarget=w,H=null,ui(G)===D&&(oe=new oe(R,N+"enter",$,l,G),oe.target=w,oe.relatedTarget=we,H=oe),we=H,L&&$)t:{for(oe=by,R=L,N=$,w=0,H=R;H;H=oe(H))w++;H=0;for(var ie=N;
vendor: 5,417 bytes, lines 48-49
48ie;ie=oe(ie))H++;for(;0<w-H;)R=oe(R),w--;for(;0<H-w;)N=oe(N),H--;for(;w--;){if(R===N||N!==null&&R===N.alternate){oe=R;break t}R=oe(R),N=oe(N)}oe=null}else oe=null;L!==null&&Pd(z,I,L,oe,!1),$!==null&&we!==null&&Pd(z,we,$,oe,!0)}}e:{if(I=D?il(D):window,L=I.nodeName&&I.nodeName.toLowerCase(),L==="select"||L==="input"&&I.type==="file")var Te=ic;else if(tc(I))if(lc)Te=Vg;else{Te=zg;var ne=Hg}else L=I.nodeName,!L||L.toLowerCase()!=="input"||I.type!=="checkbox"&&I.type!=="radio"?D&&ka(D.elementType)&&(Te=ic):Te=kg;if(Te&&(Te=Te(e,D))){nc(z,Te,l,G);break e}ne&&ne(e,I,D),e==="focusout"&&D&&I.type==="number"&&D.memoizedProps.value!=null&&za(I,"number",I.value)}switch(ne=D?il(D):window,e){case"focusin":(tc(ne)||ne.contentEditable==="true")&&(yi=ne,ja=D,dl=null);break;case"focusout":dl=ja=yi=null;break;case"mousedown":es=!0;break;case"contextmenu":case"mouseup":case"dragend":es=!1,dc(z,l,G);break;case"selectionchange":if(Bg)break;case"keydown":case"keyup":dc(z,l,G)}var de;if(Qa)e:{switch(e){case"compositionstart":var ye="onCompositionStart";break e;case"compositionend":ye="onCompositionEnd";break e;case"compositionupdate":ye="onCompositionUpdate";break e}ye=void 0}else gi?jr(e,l)&&(ye="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(ye="onCompositionStart");ye&&(Zr&&l.locale!=="ko"&&(gi||ye!=="onCompositionStart"?ye==="onCompositionEnd"&&gi&&(de=Yr()):(gn=G,Fa="value"in gn?gn.value:gn.textContent,gi=!0)),ne=jo(D,ye),0<ne.length&&(ye=new Xr(ye,e,null,l,G),z.push({event:ye,listeners:ne}),de?ye.data=de:(de=ec(l),de!==null&&(ye.data=de)))),(de=Ig?Ug(e,l):Lg(e,l))&&(ye=jo(D,"onBeforeInput"),0<ye.length&&(ne=new Xr("onBeforeInput","beforeinput",null,l,G),z.push({event:ne,listeners:ye}),ne.data=de)),xy(z,e,D,l,G)}kd(z,t)})}function Hl(e,t,l){return{instance:e,listener:t,currentTarget:l}}function jo(e,t){for(var l=t+"Capture",s=[];e!==null;){var f=e,p=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||p===null||(f=ll(e,l),f!=null&&s.unshift(Hl(e,f,p)),f=ll(e,t),f!=null&&s.push(Hl(e,f,p))),e.tag===3)return s;e=e.return}return[]}function by(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Pd(e,t,l,s,f){for(var p=t._reactName,T=[];l!==null&&l!==s;){var E=l,A=E.alternate,D=E.stateNode;if(E=E.tag,A!==null&&A===s)break;E!==5&&E!==26&&E!==27||D===null||(A=D,f?(D=ll(l,p),D!=null&&T.unshift(Hl(l,D,A))):f||(D=ll(l,p),D!=null&&T.push(Hl(l,D,A)))),l=l.return}T.length!==0&&e.push({event:t,listeners:T})}var wy=/\r\n?/g,Dy=/\u0000|\uFFFD/g;function Bd(e){return(typeof e=="string"?e:""+e).replace(wy,`
49`).replace(Dy,"")}function Od(e,t){return t=Bd(t),Bd(e)===t}function be(e,t,l,s,f,p){switch(l){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||pi(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&pi(e,""+s);break;case"className":no(e,"class",s);break;case"tabIndex":no(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":no(e,l,s);break;case"style":Br(e,s,p);break;case"data":if(t!=="object"){no(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(l);break}s=lo(""+s),e.setAttribute(l,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof p=="function"&&(l==="formAction"?(t!=="input"&&be(e,t,"name",f.name,f,null),be(e,t,"formEncType",f.formEncType,f,null),be(e,t,"formMethod",f.formMethod,f,null),be(e,t,"formTarget",f.formTarget,f,null)):(be(e,t,"encType",f.encType,f,null),be(e,t,"method",f.method,f,null),be(e,t,"target",f.target,f,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(l);break}s=lo(""+s),e.setAttribute(l,s);break;case"onClick":s!=null&&(e.onclick=Kt);break;case"onScroll":s!=null&&he("scroll",e);break;case"onScrollEnd":s!=null&&he("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(a(61));if(l=s.__html,l!=null){if(f.children!=null)throw Error(a(60));e.innerHTML=l}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}l=lo(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(l,""+s):e.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"playsInl
49ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":s===!0?e.setAttribute(l,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(l,s):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(l,s):e.removeAttribute(l);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(l):e.setAttribute(l,s);break;case"popover":he("beforetoggle",e),he("toggle",e),to(e,"popover",s);break;case"xlinkActuate":Jt(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Jt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Jt(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Jt(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Jt(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Jt(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Jt(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Jt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Jt(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":to(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=og.get(l)||l,to(e,l,s))}}function xu(e,t,l,s,f,p){switch(l){case"style":Br(e,s,p);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(a(61));if(l=s.__html,l!=null){if(f.children!=null)throw Error(a(60));e.innerHTML=l}}break;case"children":typeof s=="string"?pi(e,s):(typeof s=="number"||typeof s=="bigint")&&pi(e,""+s);break;case"onScroll":s!=null&&he("scroll",e);break;case"onScrollEnd":s!=null&&he("scrollend",e);break;case"onClick":s!=null&&(e.onclick=Kt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ur.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(f=l.endsWith("Capture"),t=l.slice(2,f?l.length-7:void 0),p=e[ut]||null,p=p!=null?p[l]:null,typeof p=="function"&&e.removeEventListener(t,p,f),typeof s=="function")){typeof p!="function"&&p!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,s,f);break e}l in e?e[l]=s:s===!0?e.setAttribute(l,""):to(e,l,s)}}}function et(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":he("error",e),he("load",e);var s=!1,f=!1,p;for(p in l)if(l.hasOwnProperty(p)){var T=l[p];if(T!=null)switch(p){case"src":s=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,t));default:be(e,t,p,T,l,null)}}f&&be(e,t,"srcSet",l.srcSet,l,null),s&&be(e,t,"src",l.src,l,null);return;case"input":he("invalid",e);var E=p=T=f=null,A=null,D=null;for(s in l)if(l.hasOwnProperty(s)){var G=l[s];if(G!=null)switch(s){case"name":f=G;break;case"type":T=G;break;case"checked":A=G;break;case"defaultChecked":D=G;break;case"value":p=G;break;case"defaultValue":E=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(a(137,t));break;default:be(e,t,s,G,l,null)}}zr(e,p,E,A,D,T,f,!1);return;case"select":he("invalid",e),s=T=p=null;for(f in l)if(l.hasOwnProperty(f)&&(E=l[f],E!=null))switch(f){case"value":p=E;break;case"defaultValue":T=E;break;case"multiple":s=E;default:be(e,t,f,E,l,null)}t=p,l=T,e.multiple=!!s,t!=null?di(e,!!s,t,!1):l!=null&&di(e,!!s,l,!0);return;case"textarea":he("invalid",e),p=f=s=null;for(T in l)if(l.hasOwnProperty(T)&&(E=l[T],E!=null))switch(T){case"value":s=E;break;case"defaultValue":f=E;break;case"children":p=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(a(91));break;default:be(e,t,T,E,l,null)}Vr(e,s,f,p);return;case"option":for(A in l)if(l.hasOwnProperty(A)&&(s=l[A],s!=null))switch(A){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:be(e,t,A,s,l,null)}return;case"dialog":he("beforetoggle",e),he("toggle",e),he("cancel",e),he("close",e);break;case"iframe":case"object":he("load",e);break;case"video":case"audio":for(s=0;s<Gl.length;s++)he(Gl[s],e);break;case"image":he("error",e),he("load",e);break;case"details":he("toggle",e);break;case"embed":case"source":case"link":he("error",e),he("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(D in l)if(l.hasOwnProperty(D)&&(s=l[D],s!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,t));default:be(e,t,D,s,l,null)}return;default:if(ka(t)){for(G in l)l.hasOwnProperty(G)&&(s=l[G],s!==void 0&&xu(e,t,G,s,l,void 0));return}}for(E in l)l.hasOwnProperty(E)&&(s=l[E],s!=null&&be(e,t,E,s,l,null))}
vendor: 5,900 bytes, line 49
49function Iy(e,t,l,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,p=null,T=null,E=null,A=null,D=null,G=null;for(L in l){var z=l[L];if(l.hasOwnProperty(L)&&z!=null)switch(L){case"checked":break;case"value":break;case"defaultValue":A=z;default:s.hasOwnProperty(L)||be(e,t,L,null,s,z)}}for(var I in s){var L=s[I];if(z=l[I],s.hasOwnProperty(I)&&(L!=null||z!=null))switch(I){case"type":p=L;break;case"name":f=L;break;case"checked":D=L;break;case"defaultChecked":G=L;break;case"value":T=L;break;case"defaultValue":E=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(a(137,t));break;default:L!==z&&be(e,t,I,L,s,z)}}Ha(e,T,E,A,D,G,p,f);return;case"select":L=T=E=I=null;for(p in l)if(A=l[p],l.hasOwnProperty(p)&&A!=null)switch(p){case"value":break;case"multiple":L=A;default:s.hasOwnProperty(p)||be(e,t,p,null,s,A)}for(f in s)if(p=s[f],A=l[f],s.hasOwnProperty(f)&&(p!=null||A!=null))switch(f){case"value":I=p;break;case"defaultValue":E=p;break;case"multiple":T=p;default:p!==A&&be(e,t,f,p,s,A)}t=E,l=T,s=L,I!=null?di(e,!!l,I,!1):!!s!=!!l&&(t!=null?di(e,!!l,t,!0):di(e,!!l,l?[]:"",!1));return;case"textarea":L=I=null;for(E in l)if(f=l[E],l.hasOwnProperty(E)&&f!=null&&!s.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:be(e,t,E,null,s,f)}for(T in s)if(f=s[T],p=l[T],s.hasOwnProperty(T)&&(f!=null||p!=null))switch(T){case"value":I=f;break;case"defaultValue":L=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(a(91));break;default:f!==p&&be(e,t,T,f,s,p)}kr(e,I,L);return;case"option":for(var $ in l)if(I=l[$],l.hasOwnProperty($)&&I!=null&&!s.hasOwnProperty($))switch($){case"selected":e.selected=!1;break;default:be(e,t,$,null,s,I)}for(A in s)if(I=s[A],L=l[A],s.hasOwnProperty(A)&&I!==L&&(I!=null||L!=null))switch(A){case"selected":e.selected=I&&typeof I!="function"&&typeof I!="symbol";break;default:be(e,t,A,I,s,L)}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 oe in l)I=l[oe],l.hasOwnProperty(oe)&&I!=null&&!s.hasOwnProperty(oe)&&be(e,t,oe,null,s,I);for(D in s)if(I=s[D],L=l[D],s.hasOwnProperty(D)&&I!==L&&(I!=null||L!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(a(137,t));break;default:be(e,t,D,I,s,L)}return;default:if(ka(t)){for(var we in l)I=l[we],l.hasOwnProperty(we)&&I!==void 0&&!s.hasOwnProperty(we)&&xu(e,t,we,void 0,s,I);for(G in s)I=s[G],L=l[G],!s.hasOwnProperty(G)||I===L||I===void 0&&L===void 0||xu(e,t,G,I,s,L);return}}for(var R in l)I=l[R],l.hasOwnProperty(R)&&I!=null&&!s.hasOwnProperty(R)&&be(e,t,R,null,s,I);for(z in s)I=s[z],L=l[z],!s.hasOwnProperty(z)||I===L||I==null&&L==null||be(e,t,z,I,s,L)}function Fd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Uy(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),s=0;s<l.length;s++){var f=l[s],p=f.transferSize,T=f.initiatorType,E=f.duration;if(p&&E&&Fd(T)){for(T=0,E=f.responseEnd,s+=1;s<l.length;s++){var A=l[s],D=A.startTime;if(D>E)break;var G=A.transferSize,z=A.initiatorType;G&&Fd(z)&&(A=A.responseEnd,T+=G*(A<E?1:(E-D)/(A-D)))}if(--s,t+=8*(p+T)/(f.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Nu=null,Mu=null;function ea(e){return e.nodeType===9?e:e.ownerDocument}function Yd(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Jd(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Ru(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var bu=null;function Ly(){var e=window.event;return e&&e.type==="popstate"?e===bu?!1:(bu=e,!0):(bu=null,!1)}var Kd=typeof setTimeout=="function"?setTimeout:void 0,qy=typeof clearTimeout=="function"?clearTimeout:void 0,Xd=typeof Promise=="function"?Promise:void 0,Gy=typeof queueMicrotask=="function"?queueMicrotask:typeof Xd<"u"?function(e){return Xd.resolve(null).then(e).catch(Hy)}:Kd;function Hy(e){setTimeout(function(){throw e})}function Un(e){return e==="head"}function Qd(e,t){var l=t,s=0;do{var f=l.nextSibling;if(e.removeChild(l),f&&f.nodeType===8)if(l=f.data,l==="/$"||l==="/&"){if(s===0){e.removeChild(f),Fi(t);return}s--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")s++;else if(l==="html")zl(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,zl(l);for(var p=l.firstChild;p;){var T=p.nextSibling,E=p.nodeName;p[nl]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&p.rel.toLowerCase()==="stylesheet"||l.removeChild(p),p=T}}else l==="body"&&zl(e.ownerDocument.body);l=f}while(l);Fi(t)}function Zd(e,t){var l=e;e=0;do{var s=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),s&&s.nodeType===8)if(l=s.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=s}while(l)}function wu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":wu(l),qa(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function zy(e,t,l,s){for(;
vendor: 11,657 bytes, line 49
49e.nodeType===1;){var f=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[nl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(p=e.getAttribute("rel"),p==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(p!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(p=e.getAttribute("src"),(p!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&p&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var p=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===p)return e}else return e;if(e=qt(e.nextSibling),e===null)break}return null}function ky(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=qt(e.nextSibling),e===null))return null;return e}function Wd(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=qt(e.nextSibling),e===null))return null;return e}function Du(e){return e.data==="$?"||e.data==="$~"}function Iu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Vy(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var s=function(){t(),l.removeEventListener("DOMContentLoaded",s)};l.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function qt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Uu=null;function $d(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return qt(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function jd(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function ep(e,t,l){switch(t=ea(l),e){case"html":if(e=t.documentElement,!e)throw Error(a(452));return e;case"head":if(e=t.head,!e)throw Error(a(453));return e;case"body":if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function zl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);qa(e)}var Gt=new Map,tp=new Set;function ta(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var cn=Y.d;Y.d={f:Py,r:By,D:Oy,C:Fy,L:Yy,m:Jy,X:Xy,S:Ky,M:Qy};function Py(){var e=cn.f(),t=Jo();return e||t}function By(e){var t=ri(e);t!==null&&t.tag===5&&t.type==="form"?vf(t):cn.r(e)}var Pi=typeof document>"u"?null:document;function np(e,t,l){var s=Pi;if(s&&typeof t=="string"&&t){var f=Rt(t);f='link[rel="'+e+'"][href="'+f+'"]',typeof l=="string"&&(f+='[crossorigin="'+l+'"]'),tp.has(f)||(tp.add(f),e={rel:e,crossOrigin:l,href:t},s.querySelector(f)===null&&(t=s.createElement("link"),et(t,"link",e),Xe(t),s.head.appendChild(t)))}}function Oy(e){cn.D(e),np("dns-prefetch",e,null)}function Fy(e,t){cn.C(e,t),np("preconnect",e,t)}function Yy(e,t,l){cn.L(e,t,l);var s=Pi;if(s&&e&&t){var f='link[rel="preload"][as="'+Rt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(f+='[imagesrcset="'+Rt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(f+='[imagesizes="'+Rt(l.imageSizes)+'"]')):f+='[href="'+Rt(e)+'"]';var p=f;switch(t){case"style":p=Bi(e);break;case"script":p=Oi(e)}Gt.has(p)||(e=S({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Gt.set(p,e),s.querySelector(f)!==null||t==="style"&&s.querySelector(kl(p))||t==="script"&&s.querySelector(Vl(p))||(t=s.createElement("link"),et(t,"link",e),Xe(t),s.head.appendChild(t)))}}function Jy(e,t){cn.m(e,t);var l=Pi;if(l&&e){var s=t&&typeof t.as=="string"?t.as:"script",f='link[rel="modulepreload"][as="'+Rt(s)+'"][href="'+Rt(e)+'"]',p=f;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=Oi(e)}if(!Gt.has(p)&&(e=S({rel:"modulepreload",href:e},t),Gt.set(p,e),l.querySelector(f)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Vl(p)))return}s=l.createElement("link"),et(s,"link",e),Xe(s),l.head.appendChild(s)}}}function Ky(e,t,l){cn.S(e,t,l);var s=Pi;if(s&&e){var f=ci(s).hoistableStyles,p=Bi(e);t=t||"default";var T=f.get(p);if(!T){var E={loading:0,preload:null};if(T=s.querySelector(kl(p)))E.loading=5;else{e=S({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Gt.get(p))&&Lu(e,l);var A=T=s.createElement("link");Xe(A),et(A,"link",e),A._p=new Promise(function(D,G){A.onload=D,A.onerror=G}),A.addEventListener("load",function(){E.loading|=1}),A.addEventListener("error",function(){E.loading|=2}),E.loading|=4,na(T,t,s)}T={type:"stylesheet",instance:T,count:1,state:E},f.set(p,T)}}}function Xy(e,t){cn.X(e,t);var l=Pi;if(l&&e){var s=ci(l).hoistableScripts,f=Oi(e),p=s.get(f);p||(p=l.querySelector(Vl(f)),p||(e=S({src:e,async:!0},t),(t=Gt.get(f))&&qu(e,t),p=l.createElement("script"),Xe(p),et(p,"link",e),l.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},s.set(f,p))}}function Qy(e,t){cn.M(e,t);var l=Pi;if(l&&e){var s=ci(l).hoistableScripts,f=Oi(e),p=s.get(f);p||(p=l.querySelector(Vl(f)),p||(e=S({src:e,async:!0,type:"module"},t),(t=Gt.get(f))&&qu(e,t),p=l.createElement("script"),Xe(p),et(p,"link",e),l.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},s.set(f,p))}}function ip(e,t,l,s){var f=(f=pe.current)?ta(f):null;if(!f)throw Error(a(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=Bi(l.href),l=ci(f).hoistableStyles,s=l.get(t),s||(s={type:"style",instance:null,count:0,state:null},l.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Bi(l.href);var p=ci(f).hoistableStyles,T=p.get(e);if(T||(f=f.ownerDocument||f,T={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(e,T),(p=f.querySelector(kl(e)))&&!p._p&&(T.instance=p,T.state.loading=5),Gt.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Gt.set(e,l),p||Zy(f,e,l,T.state))),t&&s===null)throw Error(a(528,""));return T}if(t&&s!==null)throw Error(a(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Oi(l),l=ci(f).hoistableScripts,s=l.get(t),s||(s={type:"script",instance:null,count:0,state:null},l.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Bi(e){return'href="'+Rt(e)+'"'}function kl(e){return'link[rel="stylesheet"]['+e+"]"}function lp(e){return S({},e,{"data-precedence":e.precedence,precedence:null})}function Zy(e,t,l,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),et(t,"link",l),Xe(t),e.head.appendChild(t))}function Oi(e){return'[src="'+Rt(e)+'"]'}function Vl(e){return"script[async]"+e}function op(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Rt(l.href)+'"]');if(s)return t.instance=s,Xe(s),s;var f=S({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),Xe(s),et(s,"style",f),na(s,l.precedence,e),t.instance=s;case"stylesheet":f=Bi(l.href);var p=e.querySelector(kl(f));if(p)return t.state.loading|=4,t.instance=p,Xe(p),p;s=lp(l),(f=Gt.get(f))&&Lu(s,f),p=(e.ownerDocument||e).createElement("link"),Xe(p);var T=p;return T._p=new Promise(function(E,A){T.onload=E,T.onerror=A}),et(p,"link",s),t.state.loading|=4,na(p,l.precedence,e),t.instance=p;case"script":return p=Oi(l.src),(f=e.querySelector(Vl(p)))?(t.instance=f,Xe(f),f):(s=l,(f=Gt.get(p))&&(s=S({},l),qu(s,f)),e=e.ownerDocument||e,f=e.createElement("script"),Xe(f),et(f,"link",s),e.head.appendChild(f),t.instance=f);case"void":return null;default:throw Error(a(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,na(s,l.precedence,e));return t.instance}function na(e,t,l){for(var s=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=s.length?s[s.length-1]:null,p=f,T=0;T<s.length;T++){var E=s[T];if(E.dataset.precedence===t)p=E;else if(p!==f)break}p?p.parentNode.insertBefore(e,p.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Lu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function qu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ia=null;function ap(e,t,l){if(ia===null){var s=new Map,f=ia=new Map;f.set(l,s)}else f=ia,s=f.get(l),s||(s=new Map,f.set(l,s));if(s.has(e))return s;for(s.set(e,null),l=l.getElementsByTagName(e),f=0;f<l.length;f++){var p=l[f];if(!(p[nl]||p[Ze]||e==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var T=p.getAttribute(t)||"";T=e+T;var E=s.get(T);E?E.push(p):s.set(T,[p])}}return s}function sp(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function Wy(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function up(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function $y(e,t,l,s){if(l.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var f=Bi(s.href),p=t.querySelector(kl(f));if(p){t=p._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=la.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=p,Xe(p);return}p=t.ownerDocument||t,s=lp(s),(f=Gt.get(f))&&Lu(s,f),p=p.createElement("link"),Xe(p);var T=p;T._p=new Promise(function(E,A){T.onload=E,T.onerror=A}),et(p,"link",s),l.instance=p}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=la.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Gu=0;function jy(e,t){return e.stylesheets&&e.count===0&&aa(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var s=setTimeout(function(){if(e.stylesheets&&aa(e,e.stylesheets),e.unsu
vendor: 10,526 bytes, line 49
49spend){var p=e.unsuspend;e.unsuspend=null,p()}},6e4+t);0<e.imgBytes&&Gu===0&&(Gu=62500*Uy());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&aa(e,e.stylesheets),e.unsuspend)){var p=e.unsuspend;e.unsuspend=null,p()}},(e.imgBytes>Gu?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(f)}}:null}function la(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)aa(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var oa=null;function aa(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,oa=new Map,t.forEach(e0,e),oa=null,la.call(e))}function e0(e,t){if(!(t.state.loading&4)){var l=oa.get(e);if(l)var s=l.get(null);else{l=new Map,oa.set(e,l);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<f.length;p++){var T=f[p];(T.nodeName==="LINK"||T.getAttribute("media")!=="not all")&&(l.set(T.dataset.precedence,T),s=T)}s&&l.set(null,s)}f=t.instance,T=f.getAttribute("data-precedence"),p=l.get(T)||s,p===s&&l.set(null,f),l.set(T,f),this.count++,s=la.bind(this),f.addEventListener("load",s),f.addEventListener("error",s),p?p.parentNode.insertBefore(f,p.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),t.state.loading|=4}}var Pl={$$typeof:P,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function t0(e,t,l,s,f,p,T,E,A){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Da(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Da(0),this.hiddenUpdates=Da(null),this.identifierPrefix=s,this.onUncaughtError=f,this.onCaughtError=p,this.onRecoverableError=T,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=A,this.incompleteTransitions=new Map}function rp(e,t,l,s,f,p,T,E,A,D,G,z){return e=new t0(e,t,l,T,A,D,G,z,E),t=1,p===!0&&(t|=24),p=St(3,null,null,t),e.current=p,p.stateNode=e,t=hs(),t.refCount++,e.pooledCache=t,t.refCount++,p.memoizedState={element:s,isDehydrated:l,cache:t},Ts(p),e}function cp(e){return e?(e=Si,e):Si}function fp(e,t,l,s,f,p){f=cp(f),s.context===null?s.context=f:s.pendingContext=f,s=En(t),s.payload={element:l},p=p===void 0?null:p,p!==null&&(s.callback=p),l=Cn(e,s,t),l!==null&&(mt(l,e,t),Tl(l,e,t))}function dp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Hu(e,t){dp(e,t),(e=e.alternate)&&dp(e,t)}function pp(e){if(e.tag===13||e.tag===31){var t=Kn(e,67108864);t!==null&&mt(t,e,67108864),Hu(e,67108864)}}function mp(e){if(e.tag===13||e.tag===31){var t=xt();t=Ia(t);var l=Kn(e,t);l!==null&&mt(l,e,t),Hu(e,t)}}var sa=!0;function n0(e,t,l,s){var f=q.T;q.T=null;var p=Y.p;try{Y.p=2,zu(e,t,l,s)}finally{Y.p=p,q.T=f}}function i0(e,t,l,s){var f=q.T;q.T=null;var p=Y.p;try{Y.p=8,zu(e,t,l,s)}finally{Y.p=p,q.T=f}}function zu(e,t,l,s){if(sa){var f=ku(s);if(f===null)Au(e,t,s,ua,l),gp(e,s);else if(o0(f,e,t,l,s))s.stopPropagation();else if(gp(e,s),t&4&&-1<l0.indexOf(e)){for(;f!==null;){var p=ri(f);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var T=Bn(p.pendingLanes);if(T!==0){var E=p;for(E.pendingLanes|=2,E.entangledLanes|=2;T;){var A=1<<31-vt(T);E.entanglements[1]|=A,T&=~A}Yt(p),(Ee&6)===0&&(Fo=gt()+500,ql(0))}}break;case 31:case 13:E=Kn(p,2),E!==null&&mt(E,p,2),Jo(),Hu(p,2)}if(p=ku(s),p===null&&Au(e,t,s,ua,l),p===f)break;f=p}f!==null&&s.stopPropagation()}else Au(e,t,s,null,l)}}function ku(e){return e=Pa(e),Vu(e)}var ua=null;function Vu(e){if(ua=null,e=ui(e),e!==null){var t=d(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=m(t),e!==null)return e;e=null}else if(l===31){if(e=g(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ua=e,null}function hp(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"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(Oh()){case Er:return 2;case Cr:return 8;case Zl:case Fh:return 32;case Ar:return 268435456;default:return 32}default:return 32}}var Pu=!1,Ln=null,qn=null,Gn=null,Bl=new Map,Ol=new Map,Hn=[],l0="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 gp(e,t){switch(e){case"focusin":case"focusout":Ln=null;break;case"dragenter":case"dragleave":qn=null;break;case"mouseover":case"mouseout":Gn=null;break;case"pointerover":case"pointerout":Bl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ol.delete(t.pointerId)}}function Fl(e,t,l,s,f,p){return e===null||e.nativeEvent!==p?(e={blockedOn:t,domEventName:l,eventSystemFlags:s,nativeEvent:p,targetContainers:[f]},t!==null&&(t=ri(t),t!==null&&pp(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,f!==null&&t.indexOf(f)===-1&&t.push(f),e)}function o0(e,t,l,s,f){switch(t){case"focusin":return Ln=Fl(Ln,e,t,l,s,f),!0;case"dragenter":return qn=Fl(qn,e,t,l,s,f),!0;case"mouseover":return Gn=Fl(Gn,e,t,l,s,f),!0;case"pointerover":var p=f.pointerId;return Bl.set(p,Fl(Bl.get(p)||null,e,t,l,s,f)),!0;case"gotpointercapture":return p=f.pointerId,Ol.set(p,Fl(Ol.get(p)||null,e,t,l,s,f)),!0}return!1}function yp(e){var t=ui(e.target);if(t!==null){var l=d(t);if(l!==null){if(t=l.tag,t===13){if(t=m(l),t!==null){e.blockedOn=t,wr(e.priority,function(){mp(l)});return}}else if(t===31){if(t=g(l),t!==null){e.blockedOn=t,wr(e.priority,function(){mp(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ra(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=ku(e.nativeEvent);if(l===null){l=e.nativeEvent;var s=new l.constructor(l.type,l);Va=s,l.target.dispatchEvent(s),Va=null}else return t=ri(l),t!==null&&pp(t),e.blockedOn=l,!1;t.shift()}return!0}function vp(e,t,l){ra(e)&&l.delete(t)}function a0(){Pu=!1,Ln!==null&&ra(Ln)&&(Ln=null),qn!==null&&ra(qn)&&(qn=null),Gn!==null&&ra(Gn)&&(Gn=null),Bl.forEach(vp),Ol.forEach(vp)}function ca(e,t){e.blockedOn===t&&(e.blockedOn=null,Pu||(Pu=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,a0)))}var fa=null;function Tp(e){fa!==e&&(fa=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){fa===e&&(fa=null);for(var t=0;t<e.length;t+=3){var l=e[t],s=e[t+1],f=e[t+2];if(typeof s!="function"){if(Vu(s||l)===null)continue;break}var p=ri(l);p!==null&&(e.splice(t,3),t-=3,ks(p,{pending:!0,data:f,method:l.method,action:s},s,f))}}))}function Fi(e){function t(A){return ca(A,e)}Ln!==null&&ca(Ln,e),qn!==null&&ca(qn,e),Gn!==null&&ca(Gn,e),Bl.forEach(t),Ol.forEach(t);for(var l=0;l<Hn.length;l++){var s=Hn[l];s.blockedOn===e&&(s.blockedOn=null)}for(;0<Hn.length&&(l=Hn[0],l.blockedOn===null);)yp(l),l.blockedOn===null&&Hn.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(s=0;s<l.length;s+=3){var f=l[s],p=l[s+1],T=f[ut]||null;if(typeof p=="function")T||Tp(l);else if(T){var E=null;if(p&&p.hasAttribute("formAction")){if(f=p,T=p[ut]||null)E=T.formAction;else if(Vu(f)!==null)continue}else E=T.action;typeof E=="function"?l[s+1]=E:(l.splice(s,3),s-=3),Tp(l)}}}function Sp(){function e(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(T){return f=T})},focusReset:"manual",scroll:"manual"})}function t(){f!==null&&(f(),f=null),s||setTimeout(l,20)}function l(){if(!s&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),f!==null&&(f(),f=null)}}}function Bu(e){this._internalRoot=e}da.prototype.render=Bu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var l=t.current,s=xt();fp(l,s,e,t,null,null)},da.prototype.unmount=Bu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;fp(e.current,2,null,e,null,null),Jo(),t[si]=null}};function da(e){this._internalRoot=e}da.prototype.unstable_scheduleHydration=function(e){if(e){var t=br();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Hn.length&&t!==0&&t<Hn[l].priority;l++);Hn.splice(l,0,e),l===0&&yp(e)}};var _p=n.version;if(_p!=="19.2.0")throw Error(a(527,_p,"19.2.0"));Y.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(a(188)):(e=Object.keys(e).join(","),Error(a(268,e)));return e=h(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var s0={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.2.0"};
vendor: 12,038 bytes, lines 49-93
49if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var pa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!pa.isDisabled&&pa.supportsFiber)try{ji=pa.inject(s0),yt=pa}catch{}}return Jl.createRoot=function(e,t){if(!r(e))throw Error(a(299));var l=!1,s="",f=Rf,p=bf,T=wf;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(f=t.onUncaughtError),t.onCaughtError!==void 0&&(p=t.onCaughtError),t.onRecoverableError!==void 0&&(T=t.onRecoverableError)),t=rp(e,1,!1,null,null,l,s,null,f,p,T,Sp),e[si]=t.current,Cu(e),new Bu(t)},Jl.hydrateRoot=function(e,t,l){if(!r(e))throw Error(a(299));var s=!1,f="",p=Rf,T=bf,E=wf,A=null;return l!=null&&(l.unstable_strictMode===!0&&(s=!0),l.identifierPrefix!==void 0&&(f=l.identifierPrefix),l.onUncaughtError!==void 0&&(p=l.onUncaughtError),l.onCaughtError!==void 0&&(T=l.onCaughtError),l.onRecoverableError!==void 0&&(E=l.onRecoverableError),l.formState!==void 0&&(A=l.formState)),t=rp(e,1,!0,t,l??null,s,f,A,p,T,E,Sp),t.context=cp(null),l=t.current,s=xt(),s=Ia(s),f=En(s),f.callback=null,Cn(l,f,s),l=s,t.current.lanes=l,tl(t,l),Yt(t),e[si]=t.current,Cu(e),new da(t)},Jl.version="19.2.0",Jl}var Dp;function v0(){if(Dp)return Yu.exports;Dp=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(n){console.error(n)}}return i(),Yu.exports=y0(),Yu.exports}var T0=v0();const S0=uh(T0),Nt={computer:"https://win98icons.alexmeub.com/icons/png/computer_explorer-5.png",notepad:"https://win98icons.alexmeub.com/icons/png/notepad-0.png",calculator:"https://win98icons.alexmeub.com/icons/png/calculator-0.png",terminal:"https://win98icons.alexmeub.com/icons/png/console_prompt-0.png",paint:"https://win98icons.alexmeub.com/icons/png/paint_file-2.png",ie:"https://win98icons.alexmeub.com/icons/png/msie1-0.png",mine:"https://win98icons.alexmeub.com/icons/png/game_mine_1-0.png",game:"https://win98icons.alexmeub.com/icons/png/game_solitaire-0.png",ai:"https://win98icons.alexmeub.com/icons/png/help_book_cool-0.png",badminton:"/images/badminton.png",automia:"/images/automia.png"},fr=Nt.ie,ma={portfolio:{id:"portfolio",title:"My Computer",icon:Nt.computer,description:"My interactive portfolio",defaultSize:{width:900,height:700}},terminal:{id:"terminal",title:"MS-DOS",icon:Nt.terminal,description:"Command line interface",defaultSize:{width:700,height:500}},notepad:{id:"notepad",title:"Notepad",icon:Nt.notepad,description:"Text editor",defaultSize:{width:600,height:450}},calculator:{id:"calculator",title:"Calculator",icon:Nt.calculator,description:"Standard calculator",defaultSize:{width:320,height:440}},"ai-assistant":{id:"ai-assistant",title:"Gemini AI",icon:Nt.ai,description:"AI Assistant",defaultSize:{width:500,height:600}},sketch:{id:"sketch",title:"Paint",icon:Nt.paint,description:"Create drawings",defaultSize:{width:800,height:600}},browser:{id:"browser",title:"Internet",icon:Nt.ie,description:"Web Browser",defaultSize:{width:900,height:700}},tictactoe:{id:"tictactoe",title:"TicTacToe",icon:Nt.game,description:"Classic Game",defaultSize:{width:350,height:400}},minesweeper:{id:"minesweeper",title:"Minesweeper",icon:Nt.mine,description:"Find the mines",defaultSize:{width:300,height:380}},badminton:{id:"badminton",title:"Badminton",icon:Nt.badminton,type:"website",description:"Badminton website",url:"https://toan-vt.github.io/badminton",defaultSize:{width:900,height:700}},automia:{id:"automia",title:"Automia",type:"website",icon:Nt.automia,description:"Automated Membership Inference Attacks",url:"https://toan-vt.github.io/automia",defaultSize:{width:900,height:700}}},Ip=[{id:"portfolio",title:"My Computer",icon:Nt.computer,isOpen:!0,isMinimized:!1,isMaximized:!1,position:{x:140,y:30},size:{width:900,height:650},zIndex:1}],st={name:"Toan Tran",role:"PhD Student at Emory University, Google/ORNL Intern",about:"I am a PhD student in Computer Science at Emory University, advised by Dr. Li Xiong. I build scalable, privacy-preserving ML/LLM systems by developing new LLM training methods, differentially private synthetic data generation algorithms, and emerging agentic frameworks that advance secure and trustworthy AI.",updates:[{date:"Aug 2026",text:"AutoMIA got accepted to TMLR."},{date:"Apr 2026",text:"Tab-PE got accepted to ICML."},{date:"Mar 2026",text:"Excited to demonstrate LLM Agents can explore MIAs with SOTA performance. [arXiv](https://arxiv.org/abs/2603.19375)"},{date:"Dec 2025",text:"I'll be interning at Google (Sunnyvale) in Summer 2026."},{date:"Oct 2025",text:"E​xpShi‍eld got accepted to NDSS'26."},{date:"Aug 2025",text:"This is to test our proposed E​xpShi‍eld!"},{date:"Jun 2025",text:"Our paper on leveraging LLMs for synthetic mobility data receives the best student paper award at IEEE MDM'25"},{date:"May 2025",text:"I will be interning at Oak Ridge National Laboratory this summer"},{date:"May 2025",text:"Our work DuoLearn on mitigating membership inference attacks for LLMs is accepted at ACL'25 (Findings)"},{date:"Aug 2024",text:"Presented our work on DP synthetic tabular generation using LLMs at TPDP'24"}],papers:[{title:"Automated Membership Inference Attacks: Discovering MIA Signal Computations using LLM Agents",authors:"Toan Tran, Olivera Kotevska, and Li Xiong",description:"The first proof of concept using LLM Agents for auto discovering SOTA MIAs.",link:"https://arxiv.org/abs/2603.19375",venue:"TMLR'26",linkText:"arXiv",demoAppId:"automia"},{title:"Differentially Private Synthetic Data via APIs 4: Tabular Data",authors:"Toan Tran, Arturs Backurs, Zinan Lin, Victor Reis, Li Xiong, and Sergey Yekhanin",description:"30x faster DP high-order tabular data synthesis using Private Evolution.",venue:"ICML'26",link:"https://arxiv.org/abs/2606.08259",linkText:"arXiv"},{title:"Tokens for Learning, Tokens for Unlearning: Mitigating Membership Inference Attacks in Large Language Models via Dual-Purpose Training",authors:"Toan Tran, Ruixuan Liu, and Li Xiong",description:"The first defense method against MIAs for LLMs without DP.",venue:"ACL'25 (Findings)",link:"https://arxiv.org/abs/2502.19726",linkText:"arXiv"},{title:"Differentially private tabular data synthesis using large language models",authors:"Toan Tran and Li Xiong",description:"Pioneer the use of LLMs for DP tabular data synthesis.",link:"https://arxiv.org/abs/2406.01457",linkText:"arXiv"}],services:["Reviewer for NeurIPS'26, InfPriv @ NeurIPS'26, AAAI'26, Reliable ML @ NeurIPS'25, SIGSPATIAL 2025","Reviewer for Workshop on Machine Learning for Autonomous Driving @ NeurIPS'22, '23; @ AAAI'25","Reviewer for IEEE Transactions on Dependable and Secure Computing [2024]","Reviewer for ACM Computing Surveys [2024]"],blogs:[{title:"Privacy Agents: A New Privacy Assessment Framework",date:"2025-11-22",excerpt:"A new privacy assessment framework that uses LLMs to assess privacy risks of a system."}],contact:{email:"[email protected]",github:"https://github.com/toan-vt",location:"Atlanta, GA",googleScholar:"https://scholar.google.com/citations?hl=en&user=yyvEgnIAAAAJ&view_op=list_works&authuser=2&sortby=pubdate",advisorUrl:"https://www.cs.emory.edu/~lxiong/"}},_0=({windows:i,activeWindowId:n,onAppClick:o,onStartClick:a,onMinimize:r,startMenuOpen:d})=>{const[m,g]=le.useState(new Date);return le.useEffect(()=>{const y=setInterval(()=>g(new Date),1e3);return()=>clearInterval(y)},[]),C.jsxs("div",{className:"absolute bottom-0 left-0 w-full h-[35px] bg-[#c0c0c0] border-t-2 border-white flex items-center px-1 justify-between z-[9999] select-none shadow-[inset_0_1px_0_#fff]",children:[C.jsxs("div",{className:"flex items-center gap-1 h-full py-1 flex-1 overflow-hidden",children:[C.jsxs("button",{id:"start-button",onClick:a,className:`
50            flex items-center gap-1 px-2 h-full min-w-[70px]
51            bg-[#c0c0c0] 
52            ${d?"bevel-in":"bevel-out"}
53            active:bevel-in
54          `,children:[C.jsx("img",{src:"https://win98icons.alexmeub.com/icons/png/windows-0.png",alt:"win",className:"w-5 h-5"}),C.jsx("span",{className:"font-bold text-sm md:text-base",children:"Start"})]}),C.jsx("div",{className:"w-[2px] h-6 bg-[#808080] border-r border-white mx-1 hidden md:block"}),C.jsx("div",{className:"flex items-center gap-1 overflow-x-auto overflow-y-hidden no-scrollbar h-full w-full pr-2",children:i.map(y=>{const h=n===y.id&&!y.isMinimized;return C.jsxs("button",{onClick:()=>{h?r(y.id):o(y.id)},className:`
55                  flex items-center gap-2 px-2 h-full min-w-[40px] md:min-w-[140px] max-w-[160px]
56                  truncate
57                  ${h?"bg-[#e0e0e0] bevel-in border-dotted border border-black":"bg-[#c0c0c0] bevel-out"}
58                `,children:[C.jsx("img",{src:y.icon,alt:"icon",className:"w-4 h-4"}),C.jsx("span",{className:"text-xs font-bold truncate hidden md:inline",children:y.title})]},y.id)})})]}),C.jsxs("div",{className:"h-[26px] px-2 md:px-3 flex items-center gap-2 bg-[#c0c0c0] bevel-in text-xs flex-shrink-0 ml-1",children:[C.jsx("img",{src:"https://win98icons.alexmeub.com/icons/png/loudspeaker_rays-0.png",className:"w-4 h-4 hidden md:block",alt:"vol"}),C.jsx("span",{children:m.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})};/**
59 * @license lucide-react v0.554.0 - ISC
60 *
61 * This source code is licensed under the ISC license.
62 * See the LICENSE file in the root directory of this source tree.
63 */const E0=i=>i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),C0=i=>i.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,o,a)=>a?a.toUpperCase():o.toLowerCase()),Up=i=>{const n=C0(i);return n.charAt(0).toUpperCase()+n.slice(1)},rh=(...i)=>i.filter((n,o,a)=>!!n&&n.trim()!==""&&a.indexOf(n)===o).join(" ").trim(),A0=i=>{for(const n in i)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};/**
64 * @license lucide-react v0.554.0 - ISC
65 *
66 * This source code is licensed under the ISC license.
67 * See the LICENSE file in the root directory of this source tree.
68 */var x0={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
69 * @license lucide-react v0.554.0 - ISC
70 *
71 * This source code is licensed under the ISC license.
72 * See the LICENSE file in the root directory of this source tree.
73 */const N0=le.forwardRef(({color:i="currentColor",size:n=24,strokeWidth:o=2,absoluteStrokeWidth:a,className:r="",children:d,iconNode:m,...g},y)=>le.createElement("svg",{ref:y,...x0,width:n,height:n,stroke:i,strokeWidth:a?Number(o)*24/Number(n):o,className:rh("lucide",r),...!d&&!A0(g)&&{"aria-hidden":"true"},...g},[...m.map(([h,v])=>le.createElement(h,v)),...Array.isArray(d)?d:[d]]));/**
74 * @license lucide-react v0.554.0 - ISC
75 *
76 * This source code is licensed under the ISC license.
77 * See the LICENSE file in the root directory of this source tree.
78 */const Ae=(i,n)=>{const o=le.forwardRef(({className:a,...r},d)=>le.createElement(N0,{ref:d,iconNode:n,className:rh(`lucide-${E0(Up(i))}`,`lucide-${i}`,a),...r}));return o.displayName=Up(i),o};/**
79 * @license lucide-react v0.554.0 - ISC
80 *
81 * This source code is licensed under the ISC license.
82 * See the LICENSE file in the root directory of this source tree.
83 */const M0=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],R0=Ae("arrow-left",M0);/**
84 * @license lucide-react v0.554.0 - ISC
85 *
86 * This source code is licensed under the ISC license.
87 * See the LICENSE file in the root directory of this source tree.
88 */const b0=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],w0=Ae("arrow-right",b0);/**
89 * @license lucide-react v0.554.0 - ISC
90 *
91 * This source code is licensed under the ISC license.
92 * See the LICENSE file in the root directory of this source tree.
93 */const D0=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}
93]],Lp=Ae("book-open",D0);/**
94 * @license lucide-react v0.554.0 - ISC
95 *
96 * This source code is licensed under the ISC license.
97 * See the LICENSE file in the root directory of this source tree.
98 */const I0=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],U0=Ae("bot",I0);/**
99 * @license lucide-react v0.554.0 - ISC
100 *
101 * This source code is licensed under the ISC license.
102 * See the LICENSE file in the root directory of this source tree.
103 */const L0=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],qp=Ae("briefcase",L0);/**
104 * @license lucide-react v0.554.0 - ISC
105 *
106 * This source code is licensed under the ISC license.
107 * See the LICENSE file in the root directory of this source tree.
108 */const q0=[["path",{d:"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21",key:"g5wo59"}],["path",{d:"m5.082 11.09 8.828 8.828",key:"1wx5vj"}]],G0=Ae("eraser",q0);/**
109 * @license lucide-react v0.554.0 - ISC
110 *
111 * This source code is licensed under the ISC license.
112 * See the LICENSE file in the root directory of this source tree.
113 */const H0=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],$u=Ae("external-link",H0);/**
114 * @license lucide-react v0.554.0 - ISC
115 *
116 * This source code is licensed under the ISC license.
117 * See the LICENSE file in the root directory of this source tree.
118 */const z0=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Qu=Ae("file-text",z0);/**
119 * @license lucide-react v0.554.0 - ISC
120 *
121 * This source code is licensed under the ISC license.
122 * See the LICENSE file in the root directory of this source tree.
123 */const k0=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M16 16s-1.5-2-4-2-4 2-4 2",key:"epbg0q"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]],V0=Ae("frown",k0);/**
124 * @license lucide-react v0.554.0 - ISC
125 *
126 * This source code is licensed under the ISC license.
127 * See the LICENSE file in the root directory of this source tree.
128 */const P0=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],B0=Ae("github",P0);/**
129 * @license lucide-react v0.554.0 - ISC
130 *
131 * This source code is licensed under the ISC license.
132 * See the LICENSE file in the root directory of this source tree.
133 */const O0=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],ju=Ae("globe",O0);/**
134 * @license lucide-react v0.554.0 - ISC
135 *
136 * This source code is licensed under the ISC license.
137 * See the LICENSE file in the root directory of this source tree.
138 */const F0=[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]],Y0=Ae("graduation-cap",F0);/**
139 * @license lucide-react v0.554.0 - ISC
140 *
141 * This source code is licensed under the ISC license.
142 * See the LICENSE file in the root directory of this source tree.
143 */const J0=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],er=Ae("house",J0);/**
144 * @license lucide-react v0.554.0 - ISC
145 *
146 * This source code is licensed under the ISC license.
147 * See the LICENSE file in the root directory of this source tree.
148 */const K0=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],X0=Ae("loader-circle",K0);/**
149 * @license lucide-react v0.554.0 - ISC
150 *
151 * This source code is licensed under the ISC license.
152 * See the LICENSE file in the root directory of this source tree.
153 */const Q0=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],ch=Ae("lock",Q0);/**
154 * @license lucide-react v0.554.0 - ISC
155 *
156 * This source code is licensed under the ISC license.
157 * See the LICENSE file in the root directory of this source tree.
158 */const Z0=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],W0=Ae("mail",Z0);/**
159 * @license lucide-react v0.554.0 - ISC
160 *
161 * This source code is licensed under the ISC license.
162 * See the LICENSE file in the root directory of this source tree.
163 */const $0=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],j0=Ae("map-pin",$0);/**
164 * @license lucide-react v0.554.0 - ISC
165 *
166 * This source code is licensed under the ISC license.
167 * See the LICENSE file in the root directory of this source tree.
168 */const ev=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],tv=Ae("maximize-2",ev);/**
169 * @license lucide-react v0.554.0 - ISC
170 *
171 * This source code is licensed under the ISC license.
172 * See the LICENSE file in the root directory of this source tree.
173 */const nv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"8",x2:"16",y1:"15",y2:"15",key:"1xb1d9"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]],iv=Ae("meh",nv);/**
174 * @license lucide-react v0.554.0 - ISC
175 *
176 * This source code is licensed under the ISC license.
177 * See the LICENSE file in the root directory of this source tree.
178 */const lv=[["path",{d:"M5 12h14",key:"1ays0h"}]],ov=Ae("minus",lv);/**
179 * @license lucide-react v0.554.0 - ISC
180 *
181 * This source code is licensed under the ISC license.
182 * See the LICENSE file in the root directory of this source tree.
183 */const av=[["path",{d:"M15.033 9.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56V7.648a.
183645.645 0 0 1 .967-.56z",key:"vbtd3f"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",key:"x3v2xh"}]],sv=Ae("monitor-play",av);/**
184 * @license lucide-react v0.554.0 - ISC
185 *
186 * This source code is licensed under the ISC license.
187 * See the LICENSE file in the root directory of this source tree.
188 */const uv=[["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-4 0v-9a2 2 0 0 1 2-2h2",key:"39pd36"}],["rect",{width:"8",height:"4",x:"10",y:"6",rx:"1",key:"aywv1n"}]],rv=Ae("newspaper",uv);/**
189 * @license lucide-react v0.554.0 - ISC
190 *
191 * This source code is licensed under the ISC license.
192 * See the LICENSE file in the root directory of this source tree.
193 */const cv=[["path",{d:"m14.622 17.897-10.68-2.913",key:"vj2p1u"}],["path",{d:"M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0z",key:"18tc5c"}],["path",{d:"M9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15",key:"ytzfxy"}]],fv=Ae("paintbrush",cv);/**
194 * @license lucide-react v0.554.0 - ISC
195 *
196 * This source code is licensed under the ISC license.
197 * See the LICENSE file in the root directory of this source tree.
198 */const dv=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],pv=Ae("power",dv);/**
199 * @license lucide-react v0.554.0 - ISC
200 *
201 * This source code is licensed under the ISC license.
202 * See the LICENSE file in the root directory of this source tree.
203 */const mv=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],hv=Ae("refresh-cw",mv);/**
204 * @license lucide-react v0.554.0 - ISC
205 *
206 * This source code is licensed under the ISC license.
207 * See the LICENSE file in the root directory of this source tree.
208 */const gv=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],yv=Ae("rotate-ccw",gv);/**
209 * @license lucide-react v0.554.0 - ISC
210 *
211 * This source code is licensed under the ISC license.
212 * See the LICENSE file in the root directory of this source tree.
213 */const vv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]],Tv=Ae("smile",vv);/**
214 * @license lucide-react v0.554.0 - ISC
215 *
216 * This source code is licensed under the ISC license.
217 * See the LICENSE file in the root directory of this source tree.
218 */const Sv=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],_v=Ae("square",Sv);/**
219 * @license lucide-react v0.554.0 - ISC
220 *
221 * This source code is licensed under the ISC license.
222 * See the LICENSE file in the root directory of this source tree.
223 */const Ev=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Cv=Ae("trash-2",Ev);/**
224 * @license lucide-react v0.554.0 - ISC
225 *
226 * This source code is licensed under the ISC license.
227 * See the LICENSE file in the root directory of this source tree.
228 */const Av=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],fh=Ae("x",Av),xv=({window:i,isActive:n,onClose:o,onMinimize:a,onMaximize:r,onFocus:d,onMove:m,onResize:g,children:y,style:h,isMobile:v=!1})=>{const S=le.useRef(!1),_=le.useRef({x:0,y:0}),x=U=>{i.isMaximized||v||(d(),S.current=!0,_.current={x:U.clientX-i.position.x,y:U.clientY-i.position.y})};if(le.useEffect(()=>{const U=B=>{S.current&&!i.isMaximized&&!v&&m({x:B.clientX-_.current.x,y:B.clientY-_.current.y})},k=()=>{S.current=!1};return n&&(document.addEventListener("mousemove",U),document.addEventListener("mouseup",k)),()=>{document.removeEventListener("mousemove",U),document.removeEventListener("mouseup",k)}},[n,i.isMaximized,m,v]),i.isMinimized)return null;const b={...h,left:i.isMaximized?0:i.position.x,top:i.isMaximized?0:i.position.y,width:i.isMaximized?"100%":i.size.width,height:i.isMaximized?"calc(100% - 35px)":i.size.height,maxWidth:"100vw",maxHeight:"calc(100dvh - 35px)",zIndex:n?100:i.zIndex};return C.jsxs("div",{className:"absolute flex flex-col bg-[#c0c0c0] p-[3px] bevel-window shadow-2xl",style:b,onMouseDown:d,children:[C.jsxs("div",{className:`h-6 px-1 flex items-center justify-between select-none mb-[2px] ${n?"bg-gradient-to-r from-[#000080] to-[#1084d0]":"bg-[#808080]"}`,onMouseDown:x,onDoubleClick:v?void 0:r,children:[C.jsxs("div",{className:"flex items-center gap-2 text-white font-bold text-xs tracking-wide truncate pr-2",children:[C.jsx("img",{src:i.icon,alt:"icon",className:"w-4 h-4"}),C.jsx("span",{children:i.title})]}),C.jsxs("div",{className:"flex items-center gap-[2px]",children:[C.jsx("button",{onClick:U=>{U.stopPropagation(),a()},className:"w-4 h-4 bg-[#c0c0c0] bevel-out flex items-center justify-center active:bevel-in",children:C.jsx(ov,{className:"w-3 h-3 text-black"})}),!v&&C.jsx("button",{onClick:U=>{U.stopPropagation(),r()},className:"w-4 h-4 bg-[#c0c0c0] bevel-out flex items-center justify-center active:bevel-in",children:i.isMaximized?C.jsx(_v,{className:"w-3 h-3 text-black"}):C.jsx(tv,{className:"w-3 h-3 text-black"})}),C.jsx("button",{onClick:U=>{U.stopPropagation(),o()},className:"w-4 h-4 bg-[#c0c0c0] bevel-out flex items-center justify-center active:bevel-in ml-1",children:C.jsx(fh,{className:"w-3 h-3 text-black"})})]})]}),C.jsx("div",{className:"flex-1 overflow-hidden bg-white border-t border-l border-[#808080] border-b border-r border-[#fff] relative",children:y})]})},Nv=({app:i,onClick:n})=>C.jsxs("div",{onClick:n,className:"flex flex-col items-center gap-1 p-2 w-[80px] cursor-pointer group border border-transparent hover:bg-[#000080]/20 active:bg-[#000080]/40 active:border-dotted active:border-white/50 transition-none",children:[C.jsx("img",{src:i.icon||fr,alt:i.title,className:"w-10 h-10 object-contain rendering-pixelated filter drop-shadow-md",style:{imageRendering:"pixelated"}}),C.jsx("span",{className:"text-white text-[11px] text-center font-normal leading-tight px-1 line-clamp-2 group-hover:bg-[#000080] group-active:bg-[#000080]",style:{textShadow:"1px 1px 1px black"},children:i.title})]}),Mv=({apps:i,onAppClick:n,onShutdown:o})=>C.jsxs("div",{id:"start-menu",className:"absolute bottom-[35px] left-0 w-[280px] max-w-[90vw] bg-[#c0c0c0] bevel-out flex z-[10000]",children:[C.jsx("div",{className:"w-8 bg-[#000080] flex items-end justify-center pb-2 bg-gradient-to-b from-[#000080] to-[#1084d0]",children:C.jsxs("div",{className:"text-white font-bold text-xl -rotate-90 whitespace-nowrap tracking-widest mb-4 transform origin-center translate-y-[-20px]",children:["TOAN",C.jsx("span",{className:"font-light",children:"OS"})," 98"]})}),C.jsxs("div",{className:"flex-1 p-1 flex flex-col gap-[2px]",children:[C.jsx("div",{className:"px-2 py-3 border-b border-gray-400 mb-1 bg-[#c0c0c0]",children:C.jsx("div",{className:"font-bold text-sm truncate",children:st.name})}),Object.values(i).map(a=>C.jsxs("button",{onClick:()=>n(a.id),className:"w-full flex items-center gap-3 px-2 py-2 hover:bg-[#000080] hover:text-white text-black group text-left text-sm",children:[C.jsx("img",{src:a.icon||fr,alt:a.title,className:"w-8 h-8"}),C.jsxs("div",{className:"flex flex-col",children:[C.jsx("span",{className:"font-bold leading-none",children:a.title}),C.jsx("span",{className:"text-[10px] opacity-70 group-hover:text-white text-gray-600 leading-none mt-1",children:a.description})]})]},a.id)),C.jsx("div",{className:"h-[1px] bg-white border-b border-[#808080] my-1"}),C.jsxs("button",{onClick:o,className:"w-full flex items-center gap-3 px-2 py-2 hover:bg-[#000080] hover:text-white text-black group text-left",children:[C.jsx("div",{className:"w-8 flex justify-center",children:C.jsx("img",{src:"https://win98icons.alexmeub.com/icons/png/shut_down_cool-0.png",className:"w-8 h-8",alt:"shutdown"})}),C.jsx("span",{className:"text-sm font-bold",children:"Shut Down..."})]})]})]}),Rv=({onCancel:i,onBeginPowerAction:n,onShutdownComplete:o,onRestartComplete:a})=>{const[r,d]=le.useState("choose");le.useEffect(()=>{const g=y=>
228{y.key==="Escape"&&r==="choose"&&i()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[i,r]),le.useEffect(()=>{if(r==="shutdown"){const g=window.setTimeout(o,2600);return()=>window.clearTimeout(g)}if(r==="restart"){const g=window.setTimeout(a,4300);return()=>window.clearTimeout(g)}},[a,o,r]);const m=async g=>{d("closing"),await n(),d(g==="restart"?"restart":"shutdown")};return r==="closing"?null:r!=="choose"?C.jsx("div",{className:"absolute inset-0 z-[20000] bg-black text-white",children:C.jsxs("div",{className:"h-full w-full flex items-center justify-center bg-[#008080] px-6",children:[r==="shutdown"&&C.jsxs("div",{className:"text-center font-serif",children:[C.jsx("div",{className:"text-xl md:text-3xl mb-8",children:"Windows is shutting down"}),C.jsx("div",{className:"text-sm md:text-base",children:"Please wait while your computer shuts down."})]}),r==="restart"&&C.jsxs("div",{className:"w-full h-full flex flex-col items-center justify-center text-center",children:[C.jsx("div",{className:"font-serif text-xl md:text-3xl mb-8",children:"Windows is shutting down"}),C.jsxs("div",{className:"mt-10 w-full max-w-[360px]",children:[C.jsx("div",{className:"h-4 bg-black border border-white overflow-hidden",children:C.jsx("div",{className:"h-full w-2/3 bg-white animate-pulse"})}),C.jsx("div",{className:"mt-4 text-sm",children:"Restarting ToanOS..."})]})]})]})}):C.jsx("div",{className:"absolute inset-0 z-[20000] flex items-center justify-center bg-black/25 px-3",children:C.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":"shutdown-title",className:"w-full max-w-[420px] bg-[#c0c0c0] p-[3px] bevel-window shadow-2xl",children:[C.jsxs("div",{className:"h-6 px-1 flex items-center justify-between bg-gradient-to-r from-[#008080] to-[#1084d0] text-white",children:[C.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[C.jsx("img",{src:"https://win98icons.alexmeub.com/icons/png/shut_down_cool-0.png",alt:"",className:"w-4 h-4 flex-shrink-0"}),C.jsx("span",{id:"shutdown-title",className:"text-xs font-bold truncate",children:"Shut Down ToanOS"})]}),C.jsx("button",{onClick:i,className:"w-4 h-4 bg-[#c0c0c0] bevel-out flex items-center justify-center active:bevel-in","aria-label":"Close shutdown dialog",children:C.jsx(fh,{className:"w-3 h-3 text-black"})})]}),r==="choose"&&C.jsxs("div",{className:"p-4 text-black",children:[C.jsxs("div",{className:"flex gap-4",children:[C.jsx("img",{src:"https://win98icons.alexmeub.com/icons/png/computer_2-0.png",alt:"",className:"w-12 h-12 flex-shrink-0"}),C.jsxs("div",{className:"min-w-0",children:[C.jsx("p",{className:"text-sm font-bold mb-2",children:"What do you want the computer to do?"}),C.jsx("p",{className:"text-xs leading-5",children:"Choose an option below, then click the matching button."})]})]}),C.jsxs("div",{className:"mt-5 grid grid-cols-1 sm:grid-cols-3 gap-2",children:[C.jsxs("button",{onClick:()=>m("shutdown"),className:"h-9 px-3 bg-[#c0c0c0] bevel-out active:bevel-in flex items-center justify-center gap-2 text-xs font-bold",children:[C.jsx(pv,{className:"w-4 h-4"}),"Shut Down"]}),C.jsxs("button",{onClick:()=>m("restart"),className:"h-9 px-3 bg-[#c0c0c0] bevel-out active:bevel-in flex items-center justify-center gap-2 text-xs font-bold",children:[C.jsx(yv,{className:"w-4 h-4"}),"Restart"]}),C.jsx("button",{onClick:i,className:"h-9 px-3 bg-[#c0c0c0] bevel-out active:bevel-in text-xs font-bold",children:"Cancel"})]})]})]})})},bv=({onOpenApp:i})=>{const[n,o]=le.useState("home"),a=[{id:"home",label:"Home",icon:er},{id:"publications",label:"Papers",icon:Lp},{id:"services",label:"Services",icon:qp},{id:"blogs",label:"Blogs",icon:Qu}],r=()=>{switch(n){case"home":return C.jsxs("div",{className:"space-y-8 animate-in fade-in duration-300",children:[C.jsxs("section",{children:[C.jsxs("div",{className:"flex items-center gap-2 border-b-2 border-[#000080] mb-3 pb-1",children:[C.jsx(er,{className:"w-5 h-5 text-[#000080]"}),C.jsx("h3",{className:"text-lg font-bold font-sans uppercase text-[#000080]",children:"About"})]}),C.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[C.jsx("div",{className:"flex-1 text-lg leading-relaxed text-gray-800 font-serif",children:C.jsx("p",{children:st.about.split("Dr. Li Xiong").map((d,m,g)=>m===g.length-1?C.jsx("span",{children:d},m):C.jsxs("span",{children:[d,C.jsx("a",{href:st.contact.advisorUrl,target:"_blank",rel:"noopener noreferrer",className:"text-blue-800 hover:underline font-serif",children:"Dr. Li Xiong"})]},m))})}),C.jsxs("div",{className:"bg-[#ffffcc] border border-black p-3 shadow-md min-w-[200px] text-sm font-sans",children:[C.jsx("div",{className:"font-bold border-b border-gray-400 mb-2 pb-1",children:"Qu
228ick Info"}),C.jsxs("div",{className:"flex flex-col gap-2",children:[C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx(j0,{className:"w-4 h-4 text-blue-800"}),C.jsx("span",{children:st.contact.location})]}),C.jsxs("a",{href:st.contact.github,target:"_blank",rel:"noreferrer",className:"flex items-center gap-2 hover:underline text-blue-800",children:[C.jsx(B0,{className:"w-4 h-4"})," Github"]}),C.jsxs("a",{href:`mailto:${st.contact.email}`,className:"flex items-center gap-2 hover:underline text-blue-800",children:[C.jsx(W0,{className:"w-4 h-4"})," Email"]})]})]})]})]}),C.jsxs("section",{children:[C.jsxs("div",{className:"flex items-center gap-2 border-b-2 border-[#000080] mb-4 pb-1",children:[C.jsx(rv,{className:"w-5 h-5 text-[#000080]"}),C.jsx("h3",{className:"text-lg font-bold font-sans uppercase text-[#000080]",children:"Recent Updates"})]}),C.jsx("div",{className:"bg-white border border-gray-400 p-4",children:C.jsx("ul",{className:"space-y-4",children:st.updates.map((d,m)=>C.jsxs("li",{className:"flex flex-col md:flex-row md:gap-4 items-start group",children:[C.jsx("span",{className:"font-bold font-mono text-xs text-white bg-[#000080] px-2 py-0.5 rounded-none shrink-0 mt-1 group-hover:bg-blue-600",children:d.date}),C.jsx("span",{className:"text-gray-900 font-serif leading-relaxed border-b border-dotted border-gray-300 w-full pb-1",children:d.text})]},m))})})]})]});case"publications":return C.jsxs("div",{className:"animate-in fade-in duration-300",children:[C.jsxs("div",{className:"flex items-center gap-2 border-b-2 border-[#000080] mb-6 pb-1",children:[C.jsx(Lp,{className:"w-5 h-5 text-[#000080]"}),C.jsx("h3",{className:"text-lg font-bold font-sans uppercase text-[#000080]",children:"Papers"})]}),C.jsx("div",{className:"mt-8 flex justify-center pb-4",children:C.jsxs("a",{href:st.contact.googleScholar,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-4 py-2 bg-[#c0c0c0] border-2 border-[#fff] border-b-[#000] border-r-[#000] hover:bg-[#d4d0c8] active:border-[#000] active:border-b-[#fff] active:border-r-[#fff] transition-none text-[#000080] font-bold font-sans shadow-md active:shadow-sm active:translate-y-[1px]",children:[C.jsx(Y0,{className:"w-5 h-5"}),"View Google Scholar Profile"]})}),C.jsx("div",{className:"space-y-4",children:st.papers.map((d,m)=>C.jsxs("div",{className:"bg-white border-2 border-transparent hover:border-[#000080] hover:bg-blue-50 p-4 transition-all shadow-sm",children:[C.jsxs("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-2 mb-2",children:[C.jsxs("h4",{className:"font-bold text-xl leading-tight text-[#000080] font-serif",children:['"',d.title,'"']}),d.venue&&C.jsx("span",{className:"shrink-0 self-start bg-[#ffffcc] text-[#000080] border-2 border-white border-b-[#808080] border-r-[#808080] px-2 py-0.5 text-[10px] font-bold font-sans tracking-wider uppercase shadow-[1px_1px_0_#000]",children:d.venue})]}),C.jsx("p",{className:"text-gray-700 italic mb-2 border-l-2 border-gray-300 pl-3",children:d.authors}),C.jsxs("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-3 bg-gray-100 p-2 rounded-sm border border-gray-200",children:[C.jsx("span",{className:"font-bold text-gray-700 text-xs tracking-wider",children:d.description}),C.jsxs("div",{className:"flex items-center gap-2 shrink-0 flex-wrap",children:[d.demoAppId&&C.jsxs("button",{onClick:()=>i(d.demoAppId),className:"flex items-center gap-1 text-white bg-[#000080] px-3 py-0.5 text-xs font-bold hover:bg-blue-600 bevel-out active:bevel-in",children:[C.jsx(sv,{className:"w-3 h-3"}),"VIEW DEMO"]}),d.link&&C.jsxs("a",{href:d.link,target:"_blank",rel:"noopener noreferrer",className:"text-white bg-[#000080] px-3 py-0.5 text-xs font-bold hover:bg-blue-600 bevel-out active:bevel-in",children:["VIEW ",d.linkText||"PAPER"]})]})]})]},m))})]});case"services":return C.jsxs("div",{className:"animate-in fade-in duration-300",children:[C.jsxs("div",{className:"flex items-center gap-2 border-b-2 border-[#000080] mb-6 pb-1",children:[C.jsx(qp,{className:"w-5 h-5 text-[#000080]"}),C.jsx("h3",{className:"text-lg font-bold font-sans uppercase text-[#000080]",children:"Academic Services"})]}),C.jsx("div",{className:"bg-[#f0f0f0] border border-gray-400 p-6 inset-shadow",children:C.jsx("ul",{className:"space-y-3",children:st.services.map((d,m)=>C.jsxs("li",{className:"flex gap-3 items-start",children:[C.jsx("div",{className:"w-2 h-2 bg-[#000080] mt-2 shrink-0"}),C.jsx("span",{className:"text-gray-800 font-serif text-lg",children:d})]},m))})})]});case"blogs":return C.jsxs("div",{className:"animate-in fade-in duration-300",children:[C.jsxs("div",{className:"flex items-center gap-2 border-b-2 border-[#000080] mb-6 pb-1",children:[C.jsx(Qu,{className:"w-5 h-5 text-[#000080]"}),C.jsx("h3",{className:"text-lg font-bold font-sans uppercase text-[#000080]",children:"Research Blogs"})]}),st.blogs&&st.blogs.length>0?C.jsx("div",{className:"grid gap-4",children:st.blogs.map((d,m)=>C.jsxs("div",{className:"border border-black bg-white p-4 shadow-[4px_4px_0px_0px_rgba(0,0,0,0.2)] hover:translate-x-1 hover:translate-y-1 hover:shadow-none transition-all cursor-pointer",children:[C.jsx("h4",{className:"font-bold text-lg text-[#000080] mb-1",children:d.title}),C.jsx("div",{className:"text-xs text-gray-500 font-mono mb-2",children:d.date}),C.jsx("p",{className:"text-gray-700 font-serif",children:d.excerpt})]},m))}):C.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-gray-500 bg-gray-100 border-2 border-dashed border-gray-300",children:[C.jsx(Qu,{className:"w-12 h-12 mb-2 opacity-20"}),C.jsx("p",{children:"No blog posts available yet."})]})]});default:return null}};return C.jsxs("div",{className:"h-full flex flex-col bg-[#c0c0c0] text-black font-serif select-text",children:[C.jsxs("div",{className:"bg-[#000080] text-white p-4 flex items-center gap-4 shrink-0",children:[C.jsx("img",{src:"/images/profile.png",alt:"Toan Tran",className:"w-16 h-16 md:w-20 md:h-20 rounded-full bg-white border-2 border-white shadow-lg object-cover hidden md:block"}),C.jsxs("div",{children:[C.jsx("h1",{className:"text-2xl md:text-3xl font-bold font-sans tracking-wider",children:st.name}),C.jsx("h2",{className:"text-sm md:text-base text-gray-300 font-sans",children:st.role})]})]}),C.jsx("div",{className:"bg-[#d4d0c8] border-b border-[#808080] p-1 flex gap-1 shrink-0 overflow-x-auto",children:a.map(d=>{const m=d.icon,g=n===d.id;return C.jsxs("button",{onClick:()=>o(d.id),className:`
229                        flex items-center gap-2 px-4 py-2 min-w-[100px]
230                        text-sm font-bold font-sans
231                        transition-none
232                        ${g?"bg-white border-2 border-l-black border-t-black border-r-white border-b-white shadow-[inset_1px_1px_0px_rgba(0,0,0,0.5)]":"bg-[#c0c0c0] border-2 border-white border-b-black border-r-black hover:bg-[#d4d0c8] active:border-l-black active:border-t-black active:border-r-white active:border-b-white"}
233                    `,children:[C.jsx(m,{className:`w-4 h-4 ${g?"text-blue-800":"text-gray-600"}`}),d.label]},d.id)})}),C.jsxs("div",{className:"flex-1 overflow-y-auto p-6 bg-[#fff] border-2 border-[#808080] m-2 bevel-in shadow-inner",children:[C.jsx("div",{className:"max-w-4xl mx-auto",children:r()}),C.jsx("div",{className:"mt-12 text-center text-xs font-sans text-gray-400 border-t border-gray-200 pt-4",children:"Vibe Coded with Google AI Studio, Claude Code, Codex. Nov 2025 - present"})]})]})},wv=()=>{const[i,n]=le.useState(`Welcome to ToanOS 98!
234
235Feel free to type your notes here...`),o=le.useRef(null),a=r=>{var d;document.execCommand(r,!1),(d=o.current)==null||d.focus()};return C.jsxs("div",{className:"flex flex-col h-full bg-white text-black font-mono text-sm",children:[C.jsx("div",{className:"flex gap-1 px-1 py-0.5 bg-[#c0c0c0] border-b border-[#808080]",children:["File","Edit","Search","Help"].map(r=>C.jsx("button",{className:"px-2 hover:bg-[#000080] hover:text-white focus:outline-none text-sm rounded-none",children:r},r))}),C.jsxs("div",{className:"flex gap-1 p-1 bg-[#c0c0c0] border-b border-white",children:[C.jsx("button",{onClick:()=>a("bold"),className:"w-6 h-6 font-bold bg-[#c0c0c0] bevel-out active:bevel-in flex items-center justify-center text-xs",children:"B"}),C.jsx("button",{onClick:()=>a("italic"),className:"w-6 h-6 italic bg-[#c0c0c0] bevel-out active:bevel-in flex items-center justify-center text-xs font-serif",children:"I"}),C.jsx("button",{onClick:()=>a("underline"),className:"w-6 h-6 underline bg-[#c0c0c0] bevel-out active:bevel-in flex items-center justify-center text-xs",children:"U"})]}),C.jsx("div",{ref:o,className:"flex-1 p-2 outline-none overflow-auto bg-white whitespace-pre-wrap",contentEditable:!0,suppressContentEditableWarning:!0,style:{fontFamily:'"Courier New", Courier, monospace'},children:i}),C.jsxs("div",{className:"h-6 bg-[#c0c0c0] border-t border-[#dfdfdf] flex items-center px-2 text-xs gap-4 bevel-in",children:[C.jsx("span",{className:"flex-1"}),C.jsx("span",{className:"border-l border-[#808080] pl-2",children:"Ln 1, Col 1"})]})]})},Dv=()=>{const[i,n]=le.useState("0"),[o,a]=le.useState(null),[r,d]=le.useState(null),[m,g]=le.useState(!1),y=b=>{i==="0"||m?(n(b),g(!1)):n(i+b)},h=b=>{d(b),a(i),g(!0)},v=()=>{if(!o||!r)return;const b=parseFloat(i),U=parseFloat(o);let k=0;switch(r){case"+":k=U+b;break;case"-":k=U-b;break;case"×":k=U*b;break;case"÷":k=U/b;break}n(String(k)),a(null),d(null),g(!0)},S=()=>{n("0"),a(null),d(null),g(!1)},_="flex items-center justify-center h-8 rounded-none bg-[#c0c0c0] text-black font-bold bevel-out active:bevel-in text-sm",x="flex items-center justify-center h-8 rounded-none bg-[#c0c0c0] text-red-800 font-bold bevel-out active:bevel-in text-sm";return C.jsxs("div",{className:"h-full bg-[#c0c0c0] p-2 flex flex-col gap-2",children:[C.jsx("div",{className:"bg-white border-2 bevel-in p-1 text-right font-mono text-xl h-10 flex items-center justify-end overflow-hidden",children:i}),C.jsxs("div",{className:"grid grid-cols-4 gap-1",children:[C.jsx("button",{onClick:S,className:"col-span-3 flex items-center justify-center h-8 rounded-none bg-[#c0c0c0] text-red-600 font-bold bevel-out active:bevel-in",children:"C"}),C.jsx("button",{onClick:()=>h("÷"),className:x,children:"/"}),C.jsx("button",{onClick:()=>y("7"),className:_,children:"7"}),C.jsx("button",{onClick:()=>y("8"),className:_,children:"8"}),C.jsx("button",{onClick:()=>y("9"),className:_,children:"9"}),C.jsx("button",{onClick:()=>h("×"),className:x,children:"*"}),C.jsx("button",{onClick:()=>y("4"),className:_,children:"4"}),C.jsx("button",{onClick:()=>y("5"),className:_,children:"5"}),C.jsx("button",{onClick:()=>y("6"),className:_,children:"6"}),C.jsx("button",{onClick:()=>h("-"),className:x,children:"-"}),C.jsx("button",{onClick:()=>y("1"),className:_,children:"1"}),C.jsx("button",{onClick:()=>y("2"),className:_,children:"2"}),C.jsx("button",{onClick:()=>y("3"),className:_,children:"3"}),C.jsx("button",{onClick:()=>h("+"),className:x,children:"+"}),C.jsx("button",{onClick:()=>y("0"),className:`${_} col-span-2`,children:"0"}),C.jsx("button",{onClick:()=>y("."),className:_,children:"."}),C.jsx("button",{onClick:v,className:_,children:"="})]})]})},Iv=()=>{const[i,n]=le.useState(["ToanOS [Version 1.0.0]","(c) 2024 Toan VT. All rights reserved.",""]),[o,a]=le.useState(""),r=le.useRef(null);le.useEffect(()=>{var g;(g=r.current)==null||g.scrollIntoView({behavior:"smooth"})},[i]);const d=g=>{const y=g.trim().split(" "),h=y[0].toLowerCase();let v=[];switch(h){case"help":v=["Available commands:","  help     - Show this help message","  clear    - Clear terminal","  about    - Display user info","  echo     - Print text","  date     - Show current date"];break;case"clear":n([]);return;case"about":v=["Toan VT","ML Engineer","Specializing in applied ML/LLM and privacy preserving AI."];break;case"echo":v=[y.slice(1).join(" ")];break;case"date":v=[new Date().toString()];break;case"":v=[];break;default:v=[`Command not found: ${h}`]}n(S=>[...S,`C:\\Users\\Guest> ${g}`,...Array.isArray(v)?v:[v],""])},m=g=>{g.key==="Enter"&&(d(o),a(""))};return C.jsxs("div",{className:"h-full bg-black p-4 font-mono text-sm text-green-400 overflow-y-auto",onClick:()=>{var g;return(g=document.getElementById("term-input"))==null?void 0:g.focus()},children:[i.map((g,y)=>C.jsx("div",{className:"whitespace-pre-wrap",children:g},y)),C.jsxs("div",{className:"flex",children:[C.jsx("span",{className:"mr-2",children:"C:\\Users\\Guest>"}),C.jsx("input",{id:"term-input",className:"flex-1 bg-transparent outline-none text-green-400",value:o,onChange:g=>a(g.target.value),onKeyDown:m,autoFocus:!0,autoComplete:"off"})]}),C.jsx("div",{ref:r})]})};/**
236 * @license
237 * Copyright 2025 Google LLC
238 * SPDX-License-Identifier: Apache-2.0
239 */let Uv,Lv;function qv(){return{geminiUrl:Uv,vertexUrl:Lv}}function Gv(i,n,o,a){var r,d;if(!(i!=null&&i.baseUrl)){const m=qv();return n?(r=m.vertexUrl)!==null&&r!==void 0?r:o:(d=m.geminiUrl)!==null&&d!==void 0?d:a}return i.baseUrl}/**
240 * @license
241 * Copyright 2025 Google LLC
242 * SPDX-License-Identifier: Apache-2.0
243 */class dn{}function X(i,n){const o=/\{([^}]+)\}/g;return i.replace(o,(a,r)=>{if(Object.prototype.hasOwnProperty.call(n,r)){const d=n[r];return d!=null?String(d):""}else throw new Error(`Key '${r}' not found in valueMap.`)})}function c(i,n,o){for(let d=0;d<n.length-1;d++){const m=n[d];if(m.endsWith("[]")){const g=m.slice(0,-2);if(!(g in i))if(Array.isArray(o))i[g]=Array.from({length:o.length},()=>({}));else throw new Error(`Value must be a list given an array path ${m}`);if(Array.isArray(i[g])){const y=i[g];if(Array.isArray(o))for(let h=0;h<y.length;h++){const v=y[h];c(v,n.slice(d+1),o[h])}else for(const h of y)c(h,n.slice(d+1),o)}return}else if(m.endsWith("[0]")){const g=m.slice(0,-3);g in i||(i[g]=[{}]);const y=i[g];c(y[0],n.slice(d+1),o);return}(!i[m]||typeof i[m]!="object")&&(i[m]={}),i=i[m]}const a=n[n.length-1],r=i[a];if(r!==void 0){if(!o||typeof o=="object"&&Object.keys(o).length===0||o===r)return;if(typeof r=="object"&&typeof o=="object"&&r!==null&&o!==null)Object.assign(r,o);else throw new Error(`Cannot set value for an existing key. Key: ${a}`)}else a==="_self"&&typeof o=="object"&&o!==null&&!Array.isArray(o)?Object.assign(i,o):i[a]=o}function u(i,n,o=void 0){try{if(n.length===1&&n[0]==="_self")return i;for(let a=0;a<n.length;a++){if(typeof i!="object"||i===null)return o;const r=n[a];if(r.endsWith("[]")){const d=r.slice(0,-2);if(d in i){const m=i[d];return Array.isArray(m)?m.map(g=>u(g,n.slice(a+1),o)):o}else return o}else i=i[r]}return i}catch(a){if(a instanceof TypeError)return o;throw a}}function Hv(i,n){for(const[o,a]of Object.entries(n)){const r=o.split("."),d=a.split("."),m=new Set;let g=-1;for(let y=0;y<r.length;y++)if(r[y]==="*"){g=y;break}if(g!==-1&&d.length>g)for(let y=g;y<d.length;y++){const h=d[y];h!=="*"&&!h.endsWith("[]")&&!h.endsWith("[0]")&&m.add(h)}tr(i,r,d,0,m)}}function tr(i,n,o,a,r){if(a>=n.length||typeof i!="object"||i===null)return;const d=n[a];if(d.endsWith("[]")){const m=d.slice(0,-2),g=i;if(m in g&&Array.isArray(g[m]))for(const y of g[m])tr(y,n,o,a+1,r)}else if(d==="*"){if(typeof i=="object"&&i!==null&&!Array.isArray(i)){const m=i,g=Object.keys(m).filter(h=>
243!h.startsWith("_")&&!r.has(h)),y={};for(const h of g)y[h]=m[h];for(const[h,v]of Object.entries(y)){const S=[];for(const _ of o.slice(a))_==="*"?S.push(h):S.push(_);c(m,S,v)}for(const h of g)delete m[h]}}else{const m=i;d in m&&tr(m[d],n,o,a+1,r)}}/**
244 * @license
245 * Copyright 2025 Google LLC
246 * SPDX-License-Identifier: Apache-2.0
247 */function dr(i){if(typeof i!="string")throw new Error("fromImageBytes must be a string");return i}/**
248 * @license
249 * Copyright 2025 Google LLC
250 * SPDX-License-Identifier: Apache-2.0
251 */function zv(i){const n={},o=u(i,["operationName"]);o!=null&&c(n,["operationName"],o);const a=u(i,["resourceName"]);return a!=null&&c(n,["_url","resourceName"],a),n}function kv(i){const n={},o=u(i,["name"]);o!=null&&c(n,["name"],o);const a=u(i,["metadata"]);a!=null&&c(n,["metadata"],a);const r=u(i,["done"]);r!=null&&c(n,["done"],r);const d=u(i,["error"]);d!=null&&c(n,["error"],d);const m=u(i,["response","generateVideoResponse"]);return m!=null&&c(n,["response"],Pv(m)),n}function Vv(i){const n={},o=u(i,["name"]);o!=null&&c(n,["name"],o);const a=u(i,["metadata"]);a!=null&&c(n,["metadata"],a);const r=u(i,["done"]);r!=null&&c(n,["done"],r);const d=u(i,["error"]);d!=null&&c(n,["error"],d);const m=u(i,["response"]);return m!=null&&c(n,["response"],Bv(m)),n}function Pv(i){const n={},o=u(i,["generatedSamples"]);if(o!=null){let d=o;Array.isArray(d)&&(d=d.map(m=>Ov(m))),c(n,["generatedVideos"],d)}const a=u(i,["raiMediaFilteredCount"]);a!=null&&c(n,["raiMediaFilteredCount"],a);const r=u(i,["raiMediaFilteredReasons"]);return r!=null&&c(n,["raiMediaFilteredReasons"],r),n}function Bv(i){const n={},o=u(i,["videos"]);if(o!=null){let d=o;Array.isArray(d)&&(d=d.map(m=>Fv(m))),c(n,["generatedVideos"],d)}const a=u(i,["raiMediaFilteredCount"]);a!=null&&c(n,["raiMediaFilteredCount"],a);const r=u(i,["raiMediaFilteredReasons"]);return r!=null&&c(n,["raiMediaFilteredReasons"],r),n}function Ov(i){const n={},o=u(i,["video"]);return o!=null&&c(n,["video"],Zv(o)),n}function Fv(i){const n={},o=u(i,["_self"]);return o!=null&&c(n,["video"],Wv(o)),n}function Yv(i){const n={},o=u(i,["operationName"]);return o!=null&&c(n,["_url","operationName"],o),n}function Jv(i){const n={},o=u(i,["operationName"]);return o!=null&&c(n,["_url","operationName"],o),n}function Kv(i){const n={},o=u(i,["name"]);o!=null&&c(n,["name"],o);const a=u(i,["metadata"]);a!=null&&c(n,["metadata"],a);const r=u(i,["done"]);r!=null&&c(n,["done"],r);const d=u(i,["error"]);d!=null&&c(n,["error"],d);const m=u(i,["response"]);return m!=null&&c(n,["response"],Xv(m)),n}function Xv(i){const n={},o=u(i,["sdkHttpResponse"]);o!=null&&c(n,["sdkHttpResponse"],o);const a=u(i,["parent"]);a!=null&&c(n,["parent"],a);const r=u(i,["documentName"]);return r!=null&&c(n,["documentName"],r),n}function dh(i){const n={},o=u(i,["name"]);o!=null&&c(n,["name"],o);const a=u(i,["metadata"]);a!=null&&c(n,["metadata"],a);const r=u(i,["done"]);r!=null&&c(n,["done"],r);const d=u(i,["error"]);d!=null&&c(n,["error"],d);const m=u(i,["response"]);return m!=null&&c(n,["response"],Qv(m)),n}function Qv(i){const n={},o=u(i,["sdkHttpResponse"]);o!=null&&c(n,["sdkHttpResponse"],o);const a=u(i,["parent"]);a!=null&&c(n,["parent"],a);const r=u(i,["documentName"]);return r!=null&&c(n,["documentName"],r),n}function Zv(i){const n={},o=u(i,["uri"]);o!=null&&c(n,["uri"],o);const a=u(i,["encodedVideo"]);a!=null&&c(n,["videoBytes"],dr(a));const r=u(i,["encoding"]);return r!=null&&c(n,["mimeType"],r),n}function Wv(i){const n={},o=u(i,["gcsUri"]);o!=null&&c(n,["uri"],o);const a=u(i,["bytesBase64Encoded"]);a!=null&&c(n,["videoBytes"],dr(a));const r=u(i,["mimeType"]);return r!=null&&c(n,["mimeType"],r),n}/**
252 * @license
253 * Copyright 2025 Google LLC
254 * SPDX-License-Identifier: Apache-2.0
255 */var Gp;(function(i){i.OUTCOME_UNSPECIFIED="OUTCOME_UNSPECIFIED",i.OUTCOME_OK="OUTCOME_OK",i.OUTCOME_FAILED="OUTCOME_FAILED",i.OUTCOME_DEADLINE_EXCEEDED="OUTCOME_DEADLINE_EXCEEDED"})(Gp||(Gp={}));var Hp;(function(i){i.LANGUAGE_UNSPECIFIED="LANGUAGE_UNSPECIFIED",i.PYTHON="PYTHON"})(Hp||(Hp={}));var zp;(function(i){i.SCHEDULING_UNSPECIFIED="SCHEDULING_UNSPECIFIED",i.SILENT="SILENT",i.WHEN_IDLE="WHEN_IDLE",i.INTERRUPT="INTERRUPT"})(zp||(zp={}));var kn;(function(i){i.TYPE_UNSPECIFIED="TYPE_UNSPECIFIED",i.STRING="STRING",i.NUMBER="NUMBER",i.INTEGER="INTEGER",i.BOOLEAN="BOOLEAN",i.ARRAY="ARRAY",i.OBJECT="OBJECT",i.NULL="NULL"})(kn||(kn={}));var kp;(function(i){i.MODE_UNSPECIFIED="MODE_UNSPECIFIED",i.MODE_DYNAMIC="MODE_DYNAMIC"})(kp||(kp={}));var Vp;(function(i){i.API_SPEC_UNSPECIFIED="API_SPEC_UNSPECIFIED",i.SIMPLE_SEARCH="SIMPLE_SEARCH",i.ELASTIC_SEARCH="ELASTIC_SEARCH"}
255)(Vp||(Vp={}));var Pp;(function(i){i.AUTH_TYPE_UNSPECIFIED="AUTH_TYPE_UNSPECIFIED",i.NO_AUTH="NO_AUTH",i.API_KEY_AUTH="API_KEY_AUTH",i.HTTP_BASIC_AUTH="HTTP_BASIC_AUTH",i.GOOGLE_SERVICE_ACCOUNT_AUTH="GOOGLE_SERVICE_ACCOUNT_AUTH",i.OAUTH="OAUTH",i.OIDC_AUTH="OIDC_AUTH"})(Pp||(Pp={}));var Bp;(function(i){i.HTTP_IN_UNSPECIFIED="HTTP_IN_UNSPECIFIED",i.HTTP_IN_QUERY="HTTP_IN_QUERY",i.HTTP_IN_HEADER="HTTP_IN_HEADER",i.HTTP_IN_PATH="HTTP_IN_PATH",i.HTTP_IN_BODY="HTTP_IN_BODY",i.HTTP_IN_COOKIE="HTTP_IN_COOKIE"})(Bp||(Bp={}));var Op;(function(i){i.PHISH_BLOCK_THRESHOLD_UNSPECIFIED="PHISH_BLOCK_THRESHOLD_UNSPECIFIED",i.BLOCK_LOW_AND_ABOVE="BLOCK_LOW_AND_ABOVE",i.BLOCK_MEDIUM_AND_ABOVE="BLOCK_MEDIUM_AND_ABOVE",i.BLOCK_HIGH_AND_ABOVE="BLOCK_HIGH_AND_ABOVE",i.BLOCK_HIGHER_AND_ABOVE="BLOCK_HIGHER_AND_ABOVE",i.BLOCK_VERY_HIGH_AND_ABOVE="BLOCK_VERY_HIGH_AND_ABOVE",i.BLOCK_ONLY_EXTREMELY_HIGH="BLOCK_ONLY_EXTREMELY_HIGH"})(Op||(Op={}));var Fp;(function(i){i.THINKING_LEVEL_UNSPECIFIED="THINKING_LEVEL_UNSPECIFIED",i.LOW="LOW",i.HIGH="HIGH"})(Fp||(Fp={}));var Yp;(function(i){i.HARM_CATEGORY_UNSPECIFIED="HARM_CATEGORY_UNSPECIFIED",i.HARM_CATEGORY_HARASSMENT="HARM_CATEGORY_HARASSMENT",i.HARM_CATEGORY_HATE_SPEECH="HARM_CATEGORY_HATE_SPEECH",i.HARM_CATEGORY_SEXUALLY_EXPLICIT="HARM_CATEGORY_SEXUALLY_EXPLICIT",i.HARM_CATEGORY_DANGEROUS_CONTENT="HARM_CATEGORY_DANGEROUS_CONTENT",i.HARM_CATEGORY_CIVIC_INTEGRITY="HARM_CATEGORY_CIVIC_INTEGRITY",i.HARM_CATEGORY_IMAGE_HATE="HARM_CATEGORY_IMAGE_HATE",i.HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT="HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT",i.HARM_CATEGORY_IMAGE_HARASSMENT="HARM_CATEGORY_IMAGE_HARASSMENT",i.HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT="HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT",i.HARM_CATEGORY_JAILBREAK="HARM_CATEGORY_JAILBREAK"})(Yp||(Yp={}));var Jp;(function(i){i.HARM_BLOCK_METHOD_UNSPECIFIED="HARM_BLOCK_METHOD_UNSPECIFIED",i.SEVERITY="SEVERITY",i.PROBABILITY="PROBABILITY"})(Jp||(Jp={}));var Kp;(function(i){i.HARM_BLOCK_THRESHOLD_UNSPECIFIED="HARM_BLOCK_THRESHOLD_UNSPECIFIED",i.BLOCK_LOW_AND_ABOVE="BLOCK_LOW_AND_ABOVE",i.BLOCK_MEDIUM_AND_ABOVE="BLOCK_MEDIUM_AND_ABOVE",i.BLOCK_ONLY_HIGH="BLOCK_ONLY_HIGH",i.BLOCK_NONE="BLOCK_NONE",i.OFF="OFF"})(Kp||(Kp={}));var Xp;(function(i){i.FINISH_REASON_UNSPECIFIED="FINISH_REASON_UNSPECIFIED",i.STOP="STOP",i.MAX_TOKENS="MAX_TOKENS",i.SAFETY="SAFETY",i.RECITATION="RECITATION",i.LANGUAGE="LANGUAGE",i.OTHER="OTHER",i.BLOCKLIST="BLOCKLIST",i.PROHIBITED_CONTENT="PROHIBITED_CONTENT",i.SPII="SPII",i.MALFORMED_FUNCTION_CALL="MALFORMED_FUNCTION_CALL",i.IMAGE_SAFETY="IMAGE_SAFETY",i.UNEXPECTED_TOOL_CALL="UNEXPECTED_TOOL_CALL",i.IMAGE_PROHIBITED_CONTENT="IMAGE_PROHIBITED_CONTENT",i.NO_IMAGE="NO_IMAGE"})(Xp||(Xp={}));var Qp;(function(i){i.HARM_PROBABILITY_UNSPECIFIED="HARM_PROBABILITY_UNSPECIFIED",i.NEGLIGIBLE="NEGLIGIBLE",i.LOW="LOW",i.MEDIUM="MEDIUM",i.HIGH="HIGH"})(Qp||(Qp={}));var Zp;(function(i){i.HARM_SEVERITY_UNSPECIFIED="HARM_SEVERITY_UNSPECIFIED",i.HARM_SEVERITY_NEGLIGIBLE="HARM_SEVERITY_NEGLIGIBLE",i.HARM_SEVERITY_LOW="HARM_SEVERITY_LOW",i.HARM_SEVERITY_MEDIUM="HARM_SEVERITY_MEDIUM",i.HARM_SEVERITY_HIGH="HARM_SEVERITY_HIGH"})(Zp||(Zp={}));var Wp;(function(i){i.URL_RETRIEVAL_STATUS_UNSPECIFIED="URL_RETRIEVAL_STATUS_UNSPECIFIED",i.URL_RETRIEVAL_STATUS_SUCCESS="URL_RETRIEVAL_STATUS_SUCCESS",i.URL_RETRIEVAL_STATUS_ERROR="URL_RETRIEVAL_STATUS_ERROR",i.URL_RETRIEVAL_STATUS_PAYWALL="URL_RETRIEVAL_STATUS_PAYWALL",i.URL_RETRIEVAL_STATUS_UNSAFE="URL_RETRIEVAL_STATUS_UNSAFE"})(Wp||(Wp={}));var $p;(function(i){i.BLOCKED_REASON_UNSPECIFIED="BLOCKED_REASON_UNSPECIFIED",i.SAFETY="SAFETY",i.OTHER="OTHER",i.BLOCKLIST="BLOCKLIST",i.PROHIBITED_CONTENT="PROHIBITED_CONTENT",i.IMAGE_SAFETY="IMAGE_SAFETY",i.MODEL_ARMOR="MODEL_ARMOR",i.JAILBREAK="JAILBREAK"})($p||($p={}));var jp;(function(i){i.TRAFFIC_TYPE_UNSPECIFIED="TRAFFIC_TYPE_UNSPECIFIED",i.ON_DEMAND="ON_DEMAND",i.PROVISIONED_THROUGHPUT="PROVISIONED_THROUGHPUT"})(jp||(jp={}));var ya;(function(i){i.MODALITY_UNSPECIFIED="MODALITY_UNSPECIFIED",i.TEXT="TEXT",i.IMAGE="IMAGE",i.AUDIO="AUDIO"})(ya||(ya={}));var em;(function(i){i.MEDIA_RESOLUTION_UNSPECIFIED="MEDIA_RESOLUTION_UNSPECIFIED",i.MEDIA_RESOLUTION_LOW="MEDIA_RESOLUTION_LOW",i.MEDIA_RESOLUTION_MEDIUM="MEDIA_RESOLUTION_MEDIUM",i.MEDIA_RESOLUTION_HIGH="MEDIA_RESOLUTION_HIGH"})(em||(em={}));var tm;(function(i){i.TUNING_MODE_UNSPECIFIED="TUNING_MODE_UNSPECIFIED",i.TUNING_MODE_FULL="TUNING_MODE_FULL",i.TUNING_MODE_PEFT_ADAPTER="TUNING_MODE_PEFT_ADAPTER"})(tm||(tm={}));var nm;(function(i){i.ADAPTER_SIZE_UNSPECIFIED="ADAPTER_SIZE_UNSPECIFIED",i.ADAPTER_SIZE_ONE="ADAPTER_SIZE_ONE",i.ADAPTER_SIZE_TWO="ADAPTER_SIZE_TWO",i.ADAPTER_SIZE_FOUR="ADAPTER_SIZE_FOUR",i.ADAPTER_SIZE_EIGHT="ADAPTER_SIZE_EIGHT",i.ADAPTER_SIZE_SIXTEEN="ADAPTER_SIZE_SIXTEEN",i.ADAPTER_SIZE_THIRTY_TWO="ADAPTER_SIZE_THIRTY_TWO"}
255)(nm||(nm={}));var nr;(function(i){i.JOB_STATE_UNSPECIFIED="JOB_STATE_UNSPECIFIED",i.JOB_STATE_QUEUED="JOB_STATE_QUEUED",i.JOB_STATE_PENDING="JOB_STATE_PENDING",i.JOB_STATE_RUNNING="JOB_STATE_RUNNING",i.JOB_STATE_SUCCEEDED="JOB_STATE_SUCCEEDED",i.JOB_STATE_FAILED="JOB_STATE_FAILED",i.JOB_STATE_CANCELLING="JOB_STATE_CANCELLING",i.JOB_STATE_CANCELLED="JOB_STATE_CANCELLED",i.JOB_STATE_PAUSED="JOB_STATE_PAUSED",i.JOB_STATE_EXPIRED="JOB_STATE_EXPIRED",i.JOB_STATE_UPDATING="JOB_STATE_UPDATING",i.JOB_STATE_PARTIALLY_SUCCEEDED="JOB_STATE_PARTIALLY_SUCCEEDED"})(nr||(nr={}));var im;(function(i){i.TUNING_TASK_UNSPECIFIED="TUNING_TASK_UNSPECIFIED",i.TUNING_TASK_I2V="TUNING_TASK_I2V",i.TUNING_TASK_T2V="TUNING_TASK_T2V",i.TUNING_TASK_R2V="TUNING_TASK_R2V"})(im||(im={}));var lm;(function(i){i.MEDIA_RESOLUTION_UNSPECIFIED="MEDIA_RESOLUTION_UNSPECIFIED",i.MEDIA_RESOLUTION_LOW="MEDIA_RESOLUTION_LOW",i.MEDIA_RESOLUTION_MEDIUM="MEDIA_RESOLUTION_MEDIUM",i.MEDIA_RESOLUTION_HIGH="MEDIA_RESOLUTION_HIGH"})(lm||(lm={}));var om;(function(i){i.FEATURE_SELECTION_PREFERENCE_UNSPECIFIED="FEATURE_SELECTION_PREFERENCE_UNSPECIFIED",i.PRIORITIZE_QUALITY="PRIORITIZE_QUALITY",i.BALANCED="BALANCED",i.PRIORITIZE_COST="PRIORITIZE_COST"})(om||(om={}));var am;(function(i){i.UNSPECIFIED="UNSPECIFIED",i.BLOCKING="BLOCKING",i.NON_BLOCKING="NON_BLOCKING"})(am||(am={}));var sm;(function(i){i.MODE_UNSPECIFIED="MODE_UNSPECIFIED",i.MODE_DYNAMIC="MODE_DYNAMIC"})(sm||(sm={}));var um;(function(i){i.ENVIRONMENT_UNSPECIFIED="ENVIRONMENT_UNSPECIFIED",i.ENVIRONMENT_BROWSER="ENVIRONMENT_BROWSER"})(um||(um={}));var rm;(function(i){i.MODE_UNSPECIFIED="MODE_UNSPECIFIED",i.AUTO="AUTO",i.ANY="ANY",i.NONE="NONE",i.VALIDATED="VALIDATED"})(rm||(rm={}));var cm;(function(i){i.BLOCK_LOW_AND_ABOVE="BLOCK_LOW_AND_ABOVE",i.BLOCK_MEDIUM_AND_ABOVE="BLOCK_MEDIUM_AND_ABOVE",i.BLOCK_ONLY_HIGH="BLOCK_ONLY_HIGH",i.BLOCK_NONE="BLOCK_NONE"})(cm||(cm={}));var fm;(function(i){i.DONT_ALLOW="DONT_ALLOW",i.ALLOW_ADULT="ALLOW_ADULT",i.ALLOW_ALL="ALLOW_ALL"})(fm||(fm={}));var dm;(function(i){i.auto="auto",i.en="en",i.ja="ja",i.ko="ko",i.hi="hi",i.zh="zh",i.pt="pt",i.es="es"})(dm||(dm={}));var pm;(function(i){i.MASK_MODE_DEFAULT="MASK_MODE_DEFAULT",i.MASK_MODE_USER_PROVIDED="MASK_MODE_USER_PROVIDED",i.MASK_MODE_BACKGROUND="MASK_MODE_BACKGROUND",i.MASK_MODE_FOREGROUND="MASK_MODE_FOREGROUND",i.MASK_MODE_SEMANTIC="MASK_MODE_SEMANTIC"})(pm||(pm={}));var mm;(function(i){i.CONTROL_TYPE_DEFAULT="CONTROL_TYPE_DEFAULT",i.CONTROL_TYPE_CANNY="CONTROL_TYPE_CANNY",i.CONTROL_TYPE_SCRIBBLE="CONTROL_TYPE_SCRIBBLE",i.CONTROL_TYPE_FACE_MESH="CONTROL_TYPE_FACE_MESH"})(mm||(mm={}));var hm;(function(i){i.SUBJECT_TYPE_DEFAULT="SUBJECT_TYPE_DEFAULT",i.SUBJECT_TYPE_PERSON="SUBJECT_TYPE_PERSON",i.SUBJECT_TYPE_ANIMAL="SUBJECT_TYPE_ANIMAL",i.SUBJECT_TYPE_PRODUCT="SUBJECT_TYPE_PRODUCT"})(hm||(hm={}));var gm;(function(i){i.EDIT_MODE_DEFAULT="EDIT_MODE_DEFAULT",i.EDIT_MODE_INPAINT_REMOVAL="EDIT_MODE_INPAINT_REMOVAL",i.EDIT_MODE_INPAINT_INSERTION="EDIT_MODE_INPAINT_INSERTION",i.EDIT_MODE_OUTPAINT="EDIT_MODE_OUTPAINT",i.EDIT_MODE_CONTROLLED_EDITING="EDIT_MODE_CONTROLLED_EDITING",i.EDIT_MODE_STYLE="EDIT_MODE_STYLE",i.EDIT_MODE_BGSWAP="EDIT_MODE_BGSWAP",i.EDIT_MODE_PRODUCT_IMAGE="EDIT_MODE_PRODUCT_IMAGE"})(gm||(gm={}));var ym;(function(i){i.FOREGROUND="FOREGROUND",i.BACKGROUND="BACKGROUND",i.PROMPT="PROMPT",i.SEMANTIC="SEMANTIC",i.INTERACTIVE="INTERACTIVE"})(ym||(ym={}));var vm;(function(i){i.ASSET="ASSET",i.STYLE="STYLE"})(vm||(vm={}));var Tm;(function(i){i.INSERT="INSERT",i.REMOVE="REMOVE",i.REMOVE_STATIC="REMOVE_STATIC",i.OUTPAINT="OUTPAINT"})(Tm||(Tm={}));var Sm;(function(i){i.OPTIMIZED="OPTIMIZED",i.LOSSLESS="LOSSLESS"})(Sm||(Sm={}));var _m;(function(i){i.SUPERVISED_FINE_TUNING="SUPERVISED_FINE_TUNING",i.PREFERENCE_TUNING="PREFERENCE_TUNING"})(_m||(_m={}));var Em;(function(i){i.STATE_UNSPECIFIED="STATE_UNSPECIFIED",i.STATE_PENDING="STATE_PENDING",i.STATE_ACTIVE="STATE_ACTIVE",i.STATE_FAILED="STATE_FAILED"})(Em||(Em={}));var Cm;(function(i){i.STATE_UNSPECIFIED="STATE_UNSPECIFIED",i.PROCESSING="PROCESSING",i.ACTIVE="ACTIVE",i.FAILED="FAILED"})(Cm||(Cm={}));var Am;(function(i){i.SOURCE_UNSPECIFIED="SOURCE_UNSPECIFIED",i.UPLOADED="UPLOADED",i.GENERATED="GENERATED"})(Am||(Am={}));var xm;(function(i){i.TURN_COMPLETE_REASON_UNSPECIFIED="TURN_COMPLETE_REASON_UNSPECIFIED",i.MALFORMED_FUNCTION_CALL="MALFORMED_FUNCTION_CALL",i.RESPONSE_REJECTED="RESPONSE_REJECTED",i.NEED_MORE_INPUT="NEED_MORE_INPUT"})(xm||(xm={}));var Nm;(function(i){i.MODALITY_UNSPECIFIED="MODALITY_UNSPECIFIED",i.TEXT="TEXT",i.IMAGE="IMAGE",
255i.VIDEO="VIDEO",i.AUDIO="AUDIO",i.DOCUMENT="DOCUMENT"})(Nm||(Nm={}));var Mm;(function(i){i.START_SENSITIVITY_UNSPECIFIED="START_SENSITIVITY_UNSPECIFIED",i.START_SENSITIVITY_HIGH="START_SENSITIVITY_HIGH",i.START_SENSITIVITY_LOW="START_SENSITIVITY_LOW"})(Mm||(Mm={}));var Rm;(function(i){i.END_SENSITIVITY_UNSPECIFIED="END_SENSITIVITY_UNSPECIFIED",i.END_SENSITIVITY_HIGH="END_SENSITIVITY_HIGH",i.END_SENSITIVITY_LOW="END_SENSITIVITY_LOW"})(Rm||(Rm={}));var bm;(function(i){i.ACTIVITY_HANDLING_UNSPECIFIED="ACTIVITY_HANDLING_UNSPECIFIED",i.START_OF_ACTIVITY_INTERRUPTS="START_OF_ACTIVITY_INTERRUPTS",i.NO_INTERRUPTION="NO_INTERRUPTION"})(bm||(bm={}));var wm;(function(i){i.TURN_COVERAGE_UNSPECIFIED="TURN_COVERAGE_UNSPECIFIED",i.TURN_INCLUDES_ONLY_ACTIVITY="TURN_INCLUDES_ONLY_ACTIVITY",i.TURN_INCLUDES_ALL_INPUT="TURN_INCLUDES_ALL_INPUT"})(wm||(wm={}));var Dm;(function(i){i.SCALE_UNSPECIFIED="SCALE_UNSPECIFIED",i.C_MAJOR_A_MINOR="C_MAJOR_A_MINOR",i.D_FLAT_MAJOR_B_FLAT_MINOR="D_FLAT_MAJOR_B_FLAT_MINOR",i.D_MAJOR_B_MINOR="D_MAJOR_B_MINOR",i.E_FLAT_MAJOR_C_MINOR="E_FLAT_MAJOR_C_MINOR",i.E_MAJOR_D_FLAT_MINOR="E_MAJOR_D_FLAT_MINOR",i.F_MAJOR_D_MINOR="F_MAJOR_D_MINOR",i.G_FLAT_MAJOR_E_FLAT_MINOR="G_FLAT_MAJOR_E_FLAT_MINOR",i.G_MAJOR_E_MINOR="G_MAJOR_E_MINOR",i.A_FLAT_MAJOR_F_MINOR="A_FLAT_MAJOR_F_MINOR",i.A_MAJOR_G_FLAT_MINOR="A_MAJOR_G_FLAT_MINOR",i.B_FLAT_MAJOR_G_MINOR="B_FLAT_MAJOR_G_MINOR",i.B_MAJOR_A_FLAT_MINOR="B_MAJOR_A_FLAT_MINOR"})(Dm||(Dm={}));var Im;(function(i){i.MUSIC_GENERATION_MODE_UNSPECIFIED="MUSIC_GENERATION_MODE_UNSPECIFIED",i.QUALITY="QUALITY",i.DIVERSITY="DIVERSITY",i.VOCALIZATION="VOCALIZATION"})(Im||(Im={}));var Yi;(function(i){i.PLAYBACK_CONTROL_UNSPECIFIED="PLAYBACK_CONTROL_UNSPECIFIED",i.PLAY="PLAY",i.PAUSE="PAUSE",i.STOP="STOP",i.RESET_CONTEXT="RESET_CONTEXT"})(Yi||(Yi={}));class ir{constructor(n){const o={};for(const a of n.headers.entries())o[a[0]]=a[1];this.headers=o,this.responseInternal=n}json(){return this.responseInternal.json()}}class Kl{get text(){var n,o,a,r,d,m,g,y;if(((r=(a=(o=(n=this.candidates)===null||n===void 0?void 0:n[0])===null||o===void 0?void 0:o.content)===null||a===void 0?void 0:a.parts)===null||r===void 0?void 0:r.length)===0)return;this.candidates&&this.candidates.length>1&&console.warn("there are multiple candidates in the response, returning text from the first one.");let h="",v=!1;const S=[];for(const _ of(y=(g=(m=(d=this.candidates)===null||d===void 0?void 0:d[0])===null||m===void 0?void 0:m.content)===null||g===void 0?void 0:g.parts)!==null&&y!==void 0?y:[]){for(const[x,b]of Object.entries(_))x!=="text"&&x!=="thought"&&x!=="thoughtSignature"&&(b!==null||b!==void 0)&&S.push(x);if(typeof _.text=="string"){if(typeof _.thought=="boolean"&&_.thought)continue;v=!0,h+=_.text}}return S.length>0&&console.warn(`there are non-text parts ${S} in the response, returning concatenation of all text parts. Please refer to the non text parts for a full response from model.`),v?h:void 0}get data(){var n,o,a,r,d,m,g,y;if(((r=(a=(o=(n=this.candidates)===null||n===void 0?void 0:n[0])===null||o===void 0?void 0:o.content)===null||a===void 0?void 0:a.parts)===null||r===void 0?void 0:r.length)===0)return;this.candidates&&this.candidates.length>1&&console.warn("there are multiple candidates in the response, returning data from the first one.");let h="";const v=[];for(const S of(y=(g=(m=(d=this.candidates)===null||d===void 0?void 0:d[0])===null||m===void 0?void 0:m.content)===null||g===void 0?void 0:g.parts)!==null&&y!==void 0?y:[]){for(const[_,x]of Object.entries(S))_!=="inlineData"&&(x!==null||x!==void 0)&&v.push(_);S.inlineData&&typeof S.inlineData.data=="string"&&(h+=atob(S.inlineData.data))}return v.length>0&&console.warn(`there are non-data parts ${v} in the response, returning concatenation of all data parts. Please refer to the non data parts for a full response from model.`),h.length>0?btoa(h):void 0}get functionCalls(){var n,o,a,r,d,m,g,y;if(((r=(a=(o=(n=this.candidates)===null||n===void 0?void 0:n[0])===null||o===void 0?void 0:o.content)===null||a===void 0?void 0:a.parts)===null||r===void 0?void 0:r.length)===0)return;this.candidates&&this.candidates.length>1&&console.warn("there are multiple candidates in the response, returning function calls from the first one.");const h=(y=(g=(m=(d=this.candidates)===null||d===void 0?void 0:d[0])===null||m===void 0?void 0:m.content)===null||g===void 0?void 0:g.parts)===null||y===void 0?void 0:y.filter(v=>
255v.functionCall).map(v=>v.functionCall).filter(v=>v!==void 0);if((h==null?void 0:h.length)!==0)return h}get executableCode(){var n,o,a,r,d,m,g,y,h;if(((r=(a=(o=(n=this.candidates)===null||n===void 0?void 0:n[0])===null||o===void 0?void 0:o.content)===null||a===void 0?void 0:a.parts)===null||r===void 0?void 0:r.length)===0)return;this.candidates&&this.candidates.length>1&&console.warn("there are multiple candidates in the response, returning executable code from the first one.");const v=(y=(g=(m=(d=this.candidates)===null||d===void 0?void 0:d[0])===null||m===void 0?void 0:m.content)===null||g===void 0?void 0:g.parts)===null||y===void 0?void 0:y.filter(S=>S.executableCode).map(S=>S.executableCode).filter(S=>S!==void 0);if((v==null?void 0:v.length)!==0)return(h=v==null?void 0:v[0])===null||h===void 0?void 0:h.code}get codeExecutionResult(){var n,o,a,r,d,m,g,y,h;if(((r=(a=(o=(n=this.candidates)===null||n===void 0?void 0:n[0])===null||o===void 0?void 0:o.content)===null||a===void 0?void 0:a.parts)===null||r===void 0?void 0:r.length)===0)return;this.candidates&&this.candidates.length>1&&console.warn("there are multiple candidates in the response, returning code execution result from the first one.");const v=(y=(g=(m=(d=this.candidates)===null||d===void 0?void 0:d[0])===null||m===void 0?void 0:m.content)===null||g===void 0?void 0:g.parts)===null||y===void 0?void 0:y.filter(S=>S.codeExecutionResult).map(S=>S.codeExecutionResult).filter(S=>S!==void 0);if((v==null?void 0:v.length)!==0)return(h=v==null?void 0:v[0])===null||h===void 0?void 0:h.output}}class Um{}class Lm{}class $v{}class jv{}class eT{}class tT{}class qm{}class Gm{}class Hm{}class nT{}class va{_fromAPIResponse({apiResponse:n,_isVertexAI:o}){const a=new va;let r;const d=n;return o?r=Vv(d):r=kv(d),Object.assign(a,r),a}}class zm{}class km{}class Vm{}class iT{}class lT{}class oT{}class pr{_fromAPIResponse({apiResponse:n,_isVertexAI:o}){const a=new pr,d=Kv(n);return Object.assign(a,d),a}}class aT{}class sT{}class uT{}class Pm{}class rT{get text(){var n,o,a;let r="",d=!1;const m=[];for(const g of(a=(o=(n=this.serverContent)===null||n===void 0?void 0:n.modelTurn)===null||o===void 0?void 0:o.parts)!==null&&a!==void 0?a:[]){for(const[y,h]of Object.entries(g))y!=="text"&&y!=="thought"&&h!==null&&m.push(y);if(typeof g.text=="string"){if(typeof g.thought=="boolean"&&g.thought)continue;d=!0,r+=g.text}}return m.length>0&&console.warn(`there are non-text parts ${m} in the response, returning concatenation of all text parts. Please refer to the non text parts for a full response from model.`),d?r:void 0}get data(){var n,o,a;let r="";const d=[];for(const m of(a=(o=(n=this.serverContent)===null||n===void 0?void 0:n.modelTurn)===null||o===void 0?void 0:o.parts)!==null&&a!==void 0?a:[]){for(const[g,y]of Object.entries(m))g!=="inlineData"&&y!==null&&d.push(g);m.inlineData&&typeof m.inlineData.data=="string"&&(r+=atob(m.inlineData.data))}return d.length>0&&console.warn(`there are non-data parts ${d} in the response, returning concatenation of all data parts. Please refer to the non data parts for a full response from model.`),r.length>0?btoa(r):void 0}}class cT{get audioChunk(){if(this.serverContent&&this.serverContent.audioChunks&&this.serverContent.audioChunks.length>0)return this.serverContent.audioChunks[0]}}class mr{_fromAPIResponse({apiResponse:n,_isVertexAI:o}){const a=new mr,d=dh(n);return Object.assign(a,d),a}}/**
256 * @license
257 * Copyright 2025 Google LLC
258 * SPDX-License-Identifier: Apache-2.0
259 */function _e(i,n){if(!n||typeof n!="string")throw new Error("model is required and must be a string");if(n.includes("..")||n.includes("?")||n.includes("&"))throw new Error("invalid model parameter");if(i.isVertexAI()){if(n.startsWith("publishers/")||n.startsWith("projects/")||n.startsWith("models/"))return n;if(n.indexOf("/")>=0){const o=n.split("/",2);return`publishers/${o[0]}/models/${o[1]}`}else return`publishers/google/models/${n}`}else return n.startsWith("models/")||n.startsWith("tunedModels/")?n:`models/${n}`}function ph(i,n){const o=_e(i,n);return o?o.startsWith("publishers/")&&i.isVertexAI()?`projects/${i.getProject()}/locations/${i.getLocation()}/${o}`:o.startsWith("models/")&&i.isVertexAI()?`projects/${i.getProject()}/locations/${i.getLocation()}/publishers/google/${o}`:o:""}function mh(i){return Array.isArray(i)?i.map(n=>Ta(n)):[Ta(i)]}function Ta(i){if(typeof i=="object"&&i!==null)return i;throw new Error(`Could not parse input as Blob. Unsupported blob type: ${typeof i}`)}function hh(i){const n=Ta(i);if(n.mimeType&&n.mimeType.startsWith("image/"))return n;throw new Error(`Unsupported mime type: ${n.mimeType}`)}function gh(i){const n=Ta(i);if(n.mimeType&&n.mimeType.startsWith("audio/"))return n;throw new Error(`Unsupported mime type: ${n.mimeType}`)}function Bm(i){if(i==null)throw new Error("PartUnion is required");if(typeof i=="object")return i;if(typeof i=="string")return{text:i};throw new Error(`Unsupported part type: ${typeof i}`)}function yh(i){if(i==null||Array.isArray(i)&&i.length===0)throw new Error("PartListUnion is required");return Array.isArray(i)?i.map(n=>Bm(n)):[Bm(i)]}function lr(i){return i!=null&&typeof i=="object"&&"parts"in i&&Array.isArray(i.parts)}
259function Om(i){return i!=null&&typeof i=="object"&&"functionCall"in i}function Fm(i){return i!=null&&typeof i=="object"&&"functionResponse"in i}function it(i){if(i==null)throw new Error("ContentUnion is required");return lr(i)?i:{role:"user",parts:yh(i)}}function hr(i,n){if(!n)return[];if(i.isVertexAI()&&Array.isArray(n))return n.flatMap(o=>{const a=it(o);return a.parts&&a.parts.length>0&&a.parts[0].text!==void 0?[a.parts[0].text]:[]});if(i.isVertexAI()){const o=it(n);return o.parts&&o.parts.length>0&&o.parts[0].text!==void 0?[o.parts[0].text]:[]}return Array.isArray(n)?n.map(o=>it(o)):[it(n)]}function Ht(i){if(i==null||Array.isArray(i)&&i.length===0)throw new Error("contents are required");if(!Array.isArray(i)){if(Om(i)||Fm(i))throw new Error("To specify functionCall or functionResponse parts, please wrap them in a Content object, specifying the role for them");return[it(i)]}const n=[],o=[],a=lr(i[0]);for(const r of i){const d=lr(r);if(d!=a)throw new Error("Mixing Content and Parts is not supported, please group the parts into a the appropriate Content objects and specify the roles for them");if(d)n.push(r);else{if(Om(r)||Fm(r))throw new Error("To specify functionCall or functionResponse parts, please wrap them, and any other parts, in Content objects as appropriate, specifying the role for them");o.push(r)}}return a||n.push({role:"user",parts:yh(o)}),n}function fT(i,n){i.includes("null")&&(n.nullable=!0);const o=i.filter(a=>a!=="null");if(o.length===1)n.type=Object.values(kn).includes(o[0].toUpperCase())?o[0].toUpperCase():kn.TYPE_UNSPECIFIED;else{n.anyOf=[];for(const a of o)n.anyOf.push({type:Object.values(kn).includes(a.toUpperCase())?a.toUpperCase():kn.TYPE_UNSPECIFIED})}}function Ji(i){const n={},o=["items"],a=["anyOf"],r=["properties"];if(i.type&&i.anyOf)throw new Error("type and anyOf cannot be both populated.");const d=i.anyOf;d!=null&&d.length==2&&(d[0].type==="null"?(n.nullable=!0,i=d[1]):d[1].type==="null"&&(n.nullable=!0,i=d[0])),i.type instanceof Array&&fT(i.type,n);for(const[m,g]of Object.entries(i))if(g!=null)if(m=="type"){if(g==="null")throw new Error("type: null can not be the only possible type for the field.");if(g instanceof Array)continue;n.type=Object.values(kn).includes(g.toUpperCase())?g.toUpperCase():kn.TYPE_UNSPECIFIED}else if(o.includes(m))n[m]=Ji(g);else if(a.includes(m)){const y=[];for(const h of g){if(h.type=="null"){n.nullable=!0;continue}y.push(Ji(h))}n[m]=y}else if(r.includes(m)){const y={};for(const[h,v]of Object.entries(g))y[h]=Ji(v);n[m]=y}else{if(m==="additionalProperties")continue;n[m]=g}return n}function gr(i){return Ji(i)}function yr(i){if(typeof i=="object")return i;if(typeof i=="string")return{voiceConfig:{prebuiltVoiceConfig:{voiceName:i}}};throw new Error(`Unsupported speechConfig type: ${typeof i}`)}function vr(i){if("multiSpeakerVoiceConfig"in i)throw new Error("multiSpeakerVoiceConfig is not supported in the live API.");return i}function Qi(i){if(i.functionDeclarations)for(const n of i.functionDeclarations)n.parameters&&(Object.keys(n.parameters).includes("$schema")?n.parametersJsonSchema||(n.parametersJsonSchema=n.parameters,delete n.parameters):n.parameters=Ji(n.parameters)),n.response&&(Object.keys(n.response).includes("$schema")?n.responseJsonSchema||(n.responseJsonSchema=n.response,delete n.response):n.response=Ji(n.response));return i}function Zi(i){if(i==null)throw new Error("tools is required");if(!Array.isArray(i))throw new Error("tools is required and must be an array of Tools");const n=[];for(const o of i)n.push(o);return n}function dT(i,n,o,a=1){const r=!n.startsWith(`${o}/`)&&n.split("/").length===a;return i.isVertexAI()?n.startsWith("projects/")?n:n.startsWith("locations/")?`projects/${i.getProject()}/${n}`:n.startsWith(`${o}/`)?`projects/${i.getProject()}/locations/${i.getLocation()}/${n}`:r?`projects/${i.getProject()}/locations/${i.getLocation()}/${o}/${n}`:n:r?`${o}/${n}`:n}function pn(i,n){if(typeof n!="string")throw new Error("name must be a string");return dT(i,n,"cachedContents")}function vh(i){switch(i){case"STATE_UNSPECIFIED":return"JOB_STATE_UNSPECIFIED";case"CREATING":return"JOB_STATE_RUNNING";case"ACTIVE":return"JOB_STATE_SUCCEEDED";case"FAILED":return"JOB_STATE_FAILED";default:return i}}function Vn(i){return dr(i)}function pT(i){return i!=null&&typeof i=="object"&&"name"in i}function mT(i){return i!=null&&typeof i=="object"&&"video"in i}function hT(i){return i!=null&&typeof i=="object"&&"uri"in i}function Th(i){var n;let o;if(pT(i)&&(o=i.name),!(hT(i)&&(o=i.uri,o===void 0))&&!(mT(i)&&(o=(n=i.video)===null||n===void 0?void 0:n.uri,o===void 0))){if(typeof i=="string"&&(o=i),o===void 0)throw new Error("Could not extract file name from the provided input.");if(o.startsWith("https://")){const r=o.split("files/")[1].match(/[a-z0-9]+/);if(r===null)throw new Error(`Could not extract file name from URI ${o}`);o=r[0]}else o.startsWith("files/")&&(o=o.split("files/")[1]);return o}}function Sh(i,n){let o;return i.isVertexAI()?o=n?"publishers/google/models":"models":o=n?"models":"tunedModels",o}function _h(i){for(const n of["models","tunedModels","publisherModels"])if(gT(i,n))return i[n];return[]}function gT(i,n){return i!==null&&typeof i=="object"&&n in i}function yT(i,n={}){const o=i,a={name:o.name,description:o.description,parametersJsonSchema:o.inputSchema};
259return o.outputSchema&&(a.responseJsonSchema=o.outputSchema),n.behavior&&(a.behavior=n.behavior),{functionDeclarations:[a]}}function vT(i,n={}){const o=[],a=new Set;for(const r of i){const d=r.name;if(a.has(d))throw new Error(`Duplicate function name ${d} found in MCP tools. Please ensure function names are unique.`);a.add(d);const m=yT(r,n);m.functionDeclarations&&o.push(...m.functionDeclarations)}return{functionDeclarations:o}}function Eh(i,n){let o;if(typeof n=="string")if(i.isVertexAI())if(n.startsWith("gs://"))o={format:"jsonl",gcsUri:[n]};else if(n.startsWith("bq://"))o={format:"bigquery",bigqueryUri:n};else throw new Error(`Unsupported string source for Vertex AI: ${n}`);else if(n.startsWith("files/"))o={fileName:n};else throw new Error(`Unsupported string source for Gemini API: ${n}`);else if(Array.isArray(n)){if(i.isVertexAI())throw new Error("InlinedRequest[] is not supported in Vertex AI.");o={inlinedRequests:n}}else o=n;const a=[o.gcsUri,o.bigqueryUri].filter(Boolean).length,r=[o.inlinedRequests,o.fileName].filter(Boolean).length;if(i.isVertexAI()){if(r>0||a!==1)throw new Error("Exactly one of `gcsUri` or `bigqueryUri` must be set for Vertex AI.")}else if(a>0||r!==1)throw new Error("Exactly one of `inlinedRequests`, `fileName`, must be set for Gemini API.");return o}function TT(i){if(typeof i!="string")return i;const n=i;if(n.startsWith("gs://"))return{format:"jsonl",gcsUri:n};if(n.startsWith("bq://"))return{format:"bigquery",bigqueryUri:n};throw new Error(`Unsupported destination: ${n}`)}function Ch(i){if(typeof i!="object"||i===null)return{};const n=i,o=n.inlinedResponses;if(typeof o!="object"||o===null)return i;const r=o.inlinedResponses;if(!Array.isArray(r)||r.length===0)return i;let d=!1;for(const m of r){if(typeof m!="object"||m===null)continue;const y=m.response;if(typeof y!="object"||y===null)continue;if(y.embedding!==void 0){d=!0;break}}return d&&(n.inlinedEmbedContentResponses=n.inlinedResponses,delete n.inlinedResponses),i}function Wi(i,n){const o=n;if(!i.isVertexAI()){if(/batches\/[^/]+$/.test(o))return o.split("/").pop();throw new Error(`Invalid batch job name: ${o}.`)}if(/^projects\/[^/]+\/locations\/[^/]+\/batchPredictionJobs\/[^/]+$/.test(o))return o.split("/").pop();if(/^\d+$/.test(o))return o;throw new Error(`Invalid batch job name: ${o}.`)}function Ah(i){const n=i;return n==="BATCH_STATE_UNSPECIFIED"?"JOB_STATE_UNSPECIFIED":n==="BATCH_STATE_PENDING"?"JOB_STATE_PENDING":n==="BATCH_STATE_RUNNING"?"JOB_STATE_RUNNING":n==="BATCH_STATE_SUCCEEDED"?"JOB_STATE_SUCCEEDED":n==="BATCH_STATE_FAILED"?"JOB_STATE_FAILED":n==="BATCH_STATE_CANCELLED"?"JOB_STATE_CANCELLED":n==="BATCH_STATE_EXPIRED"?"JOB_STATE_EXPIRED":n}/**
260 * @license
261 * Copyright 2025 Google LLC
262 * SPDX-License-Identifier: Apache-2.0
263 */function ST(i){const n={},o=u(i,["responsesFile"]);o!=null&&c(n,["fileName"],o);const a=u(i,["inlinedResponses","inlinedResponses"]);if(a!=null){let d=a;Array.isArray(d)&&(d=d.map(m=>eS(m))),c(n,["inlinedResponses"],d)}const r=u(i,["inlinedEmbedContentResponses","inlinedResponses"]);if(r!=null){let d=r;Array.isArray(d)&&(d=d.map(m=>m)),c(n,["inlinedEmbedContentResponses"],d)}return n}function _T(i){const n={},o=u(i,["predictionsFormat"]);o!=null&&c(n,["format"],o);const a=u(i,["gcsDestination","outputUriPrefix"]);a!=null&&c(n,["gcsUri"],a);const r=u(i,["bigqueryDestination","outputUri"]);return r!=null&&c(n,["bigqueryUri"],r),n}function ET(i){const n={},o=u(i,["format"]);o!=null&&c(n,["predictionsFormat"],o);const a=u(i,["gcsUri"]);a!=null&&c(n,["gcsDestination","outputUriPrefix"],a);const r=u(i,["bigqueryUri"]);if(r!=null&&c(n,["bigqueryDestination","outputUri"],r),u(i,["fileName"])!==void 0)throw new Error("fileName parameter is not supported in Vertex AI.");if(u(i,["inlinedResponses"])!==void 0)throw new Error("inlinedResponses parameter is not supported in Vertex AI.");if(u(i,["inlinedEmbedContentResponses"])!==void 0)throw new Error("inlinedEmbedContentResponses parameter is not supported in Vertex AI.");return n}function ha(i){const n={},o=u(i,["name"]);o!=null&&c(n,["name"],o);const a=u(i,["metadata","displayName"]);a!=null&&c(n,["displayName"],a);
263const r=u(i,["metadata","state"]);r!=null&&c(n,["state"],Ah(r));const d=u(i,["metadata","createTime"]);d!=null&&c(n,["createTime"],d);const m=u(i,["metadata","endTime"]);m!=null&&c(n,["endTime"],m);const g=u(i,["metadata","updateTime"]);g!=null&&c(n,["updateTime"],g);const y=u(i,["metadata","model"]);y!=null&&c(n,["model"],y);const h=u(i,["metadata","output"]);return h!=null&&c(n,["dest"],ST(Ch(h))),n}function or(i){const n={},o=u(i,["name"]);o!=null&&c(n,["name"],o);const a=u(i,["displayName"]);a!=null&&c(n,["displayName"],a);const r=u(i,["state"]);r!=null&&c(n,["state"],Ah(r));const d=u(i,["error"]);d!=null&&c(n,["error"],d);const m=u(i,["createTime"]);m!=null&&c(n,["createTime"],m);const g=u(i,["startTime"]);g!=null&&c(n,["startTime"],g);const y=u(i,["endTime"]);y!=null&&c(n,["endTime"],y);const h=u(i,["updateTime"]);h!=null&&c(n,["updateTime"],h);const v=u(i,["model"]);v!=null&&c(n,["model"],v);const S=u(i,["inputConfig"]);S!=null&&c(n,["src"],CT(S));const _=u(i,["outputConfig"]);_!=null&&c(n,["dest"],_T(Ch(_)));const x=u(i,["completionStats"]);return x!=null&&c(n,["completionStats"],x),n}function CT(i){const n={},o=u(i,["instancesFormat"]);o!=null&&c(n,["format"],o);const a=u(i,["gcsSource","uris"]);a!=null&&c(n,["gcsUri"],a);const r=u(i,["bigquerySource","inputUri"]);return r!=null&&c(n,["bigqueryUri"],r),n}function AT(i,n){const o={};if(u(n,["format"])!==void 0)throw new Error("format parameter is not supported in Gemini API.");if(u(n,["gcsUri"])!==void 0)throw new Error("gcsUri parameter is not supported in Gemini API.");if(u(n,["bigqueryUri"])!==void 0)throw new Error("bigqueryUri parameter is not supported in Gemini API.");const a=u(n,["fileName"]);a!=null&&c(o,["fileName"],a);const r=u(n,["inlinedRequests"]);if(r!=null){let d=r;Array.isArray(d)&&(d=d.map(m=>jT(i,m))),c(o,["requests","requests"],d)}return o}function xT(i){const n={},o=u(i,["format"]);o!=null&&c(n,["instancesFormat"],o);const a=u(i,["gcsUri"]);a!=null&&c(n,["gcsSource","uris"],a);const r=u(i,["bigqueryUri"]);if(r!=null&&c(n,["bigquerySource","inputUri"],r),u(i,["fileName"])!==void 0)throw new Error("fileName parameter is not supported in Vertex AI.");if(u(i,["inlinedRequests"])!==void 0)throw new Error("inlinedRequests parameter is not supported in Vertex AI.");return n}function NT(i){const n={},o=u(i,["data"]);if(o!=null&&c(n,["data"],o),u(i,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const a=u(i,["mimeType"]);return a!=null&&c(n,["mimeType"],a),n}function MT(i,n){const o={},a=u(n,["name"]);return a!=null&&c(o,["_url","name"],Wi(i,a)),o}function RT(i,n){const o={},a=u(n,["name"]);return a!=null&&c(o,["_url","name"],Wi(i,a)),o}function bT(i){const n={},o=u(i,["content"]);o!=null&&c(n,["content"],o);const a=u(i,["citationMetadata"]);a!=null&&c(n,["citationMetadata"],wT(a));const r=u(i,["tokenCount"]);r!=null&&c(n,["tokenCount"],r);const d=u(i,["finishReason"]);d!=null&&c(n,["finishReason"],d);const m=u(i,["avgLogprobs"]);m!=null&&c(n,["avgLogprobs"],m);const g=u(i,["groundingMetadata"]);g!=null&&c(n,["groundingMetadata"],g);const y=u(i,["index"]);y!=null&&c(n,["index"],y);const h=u(i,["logprobsResult"]);h!=null&&c(n,["logprobsResult"],h);const v=u(i,["safetyRatings"]);if(v!=null){let _=v;Array.isArray(_)&&(_=_.map(x=>x)),c(n,["safetyRatings"],_)}const S=u(i,["urlContextMetadata"]);return S!=null&&c(n,["urlContextMetadata"],S),n}function wT(i){const n={},o=u(i,["citationSources"]);if(o!=null){let a=o;Array.isArray(a)&&(a=a.map(r=>r)),c(n,["citations"],a)}return n}function xh(i){const n={},o=u(i,["parts"]);if(o!=null){let r=o;Array.isArray(r)&&(r=r.map(d=>sS(d))),c(n,["parts"],r)}const a=u(i,["role"]);return a!=null&&c(n,["role"],a),n}function DT(i,n){const o={},a=u(i,["displayName"]);if(n!==void 0&&a!=null&&c(n,["batch","displayName"],a),u(i,["dest"])!==void 0)throw new Error("dest parameter is not supported in Gemini API.");return o}function IT(i,n){const o={},a=u(i,["displayName"]);n!==void 0&&a!=null&&c(n,["displayName"],a);const r=u(i,["dest"]);return n!==void 0&&r!=null&&c(n,["outputConfig"],ET(TT(r))),o}function Ym(i,n){const o={},a=u(n,["model"]);a!=null&&c(o,["_url","model"],_e(i,a));const r=u(n,["src"]);r!=null&&c(o,["batch","inputConfig"],AT(i,Eh(i,r)));const d=u(n,["config"]);return d!=null&&DT(d,o),o}function UT(i,n){const o={},a=u(n,["model"]);a!=null&&c(o,["model"],_e(i,a));const r=u(n,["src"]);r!=null&&c(o,["inputConfig"],xT(Eh(i,r)));const d=u(n,["config"]);return d!=null&&IT(d,o),o}function LT(i,n){const o={},a=u(i,["displayName"]);return n!==void 0&&a!=null&&c(n,["batch","displayName"],a),o}function qT(i,n){const o={},a=u(n,["model"]);a!=null&&c(o,["_url","model"],_e(i,a));const r=u(n,["src"]);r!=null&&c(o,["batch","inputConfig"],BT(i,r));const d=u(n,["config"]);return d!=null&&LT(d,o),o}function GT(i,n){const o={},a=u(n,["name"]);return a!=null&&c(o,["_url","name"],Wi(i,a)),o}function HT(i,n){const o={},a=u(n,["name"]);return a!=null&&c(o,["_url","name"],Wi(i,a)),o}function zT(i){const n={},o=u(i,["sdkHttpResponse"]);o!=null&&c(n,["sdkHttpResponse"],o);const a=u(i,["name"]);a!=null&&c(n,["name"],a);const r=u(i,["done"]);r!=null&&c(n,["done"],r);const d=u(i,["error"]);return d!=null&&c(n,["error"],d),n}function kT(i){const n={},o=u(i,["sdkHttpResponse"]);o!=null&&c(n,["sdkHttpResponse"],o);const a=u(i,["name"]);a!=null&&c(n,["name"],a);const r=u(i,["done"]);r!=null&&c(n,["done"],r);const d=u(i,["error"]);return d!=null&&c(n,["error"],d),n}function VT(i,n){const o={},a=u(n,["contents"]);if(a!=null){let d=hr(i,a);Array.isArray(d)&&(d=d.map(m=>m)),c(o,["requests[]","request","content"],d)}const r=u(n,["config"]);return r!=null&&(c(o,["_self"],PT(r,o)),Hv(o,{"requests[].*":"requests[].request.*"})),o}function PT(i,n){const o={},a=u(i,["taskType"]);n!==void 0&&a!=null&&c(n,["requests[]","taskType"],a);const r=u(i,["title"]);n!==void 0&&r!=null&&c(n,["requests[]","title"],r);const d=u(i,["outputDimensionality"]);if(n!==void 0&&d!=null&&c(n,["requests[]","outputDimensionality"],d),u(i,["mimeType"])!==void 0)throw new Error("mimeType parameter is not supported in Gemini API.");if(u(i,["autoTruncate"])!==void 0)throw new Error("autoTruncate parameter is not supported in Gemini API.");return o}function BT(i,n){const o={},a=u(n,["fileName"]);a!=null&&c(o,["file_name"],a);const r=u(n,["inlinedRequests"]);return r!=null&&c(o,["requests"],VT(i,r)),o}function OT(i){const n={};if(u(i,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const o=u(i,["fileUri"]);o!=null&&c(n,["fileUri"],o);const a=u(i,["mimeType"]);return a!=null&&c(n,["mimeType"],a),n}function FT(i){const n={},o=u(i,["id"]);o!=null&&c(n,["id"],o);const a=u(i,["args"]);a!=null&&c(n,["args"],a);const r=u(i,["name"]);if(r!=null&&c(n,["name"],r),u(i,["partialArgs"])!==void 0)throw new Error("partialArgs parameter is not supported in Gemini API.");if(u(i,["willContinue"])!==void 0)throw new Error("willContinue parameter is not supported in Gemini API.");return n}function YT(i){const n={},o=u(i,["mode"]);o!=null&&c(n,["mode"],o);const a=u(i,["allowedFunctionNames"]);if(a!=null&&c(n,["allowedFunctionNames"],a),u(i,["streamFunctionCallArguments"])!==void 0)throw new Error("streamFunctionCallArguments parameter is not supported in Gemini API.");return n}function JT(i,n,o){const a={},r=u(n,["systemInstruction"]);o!==void 0&&r!=null&&c(o,["systemInstruction"],xh(it(r)));const d=u(n,["temperature"]);d!=null&&c(a,["temperature"],d);const m=u(n,["topP"]);m!=null&&c(a,["topP"],m);const g=u(n,["topK"]);g!=null&&c(a,["topK"],g);const y=u(n,["candidateCount"]);y!=null&&c(a,["candidateCount"],y);const h=u(n,["maxOutputTokens"]);h!=null&&c(a,["maxOutputTokens"],h);const v=u(n,["stopSequences"]);v!=null&&c(a,["stopSequences"],v);const S=u(n,["responseLogprobs"]);S!=null&&c(a,["responseLogprobs"],S);const _=u(n,["logprobs"]);_!=null&&c(a,["logprobs"],_);const x=u(n,["presencePenalty"]);x!=null&&c(a,["presencePenalty"],x);const b=u(n,["frequencyPenalty"]);b!=null&&c(a,["frequencyPenalty"],b);const U=u(n,["seed"]);U!=null&&c(a,["seed"],U);const k=u(n,["responseMimeType"]);k!=null&&c(a,["responseMimeType"],k);const B=u(n,["responseSchema"]);B!=null&&c(a,["responseSchema"],gr(B));const W=u(n,["responseJsonSchema"]);
263if(W!=null&&c(a,["responseJsonSchema"],W),u(n,["routingConfig"])!==void 0)throw new Error("routingConfig parameter is not supported in Gemini API.");if(u(n,["modelSelectionConfig"])!==void 0)throw new Error("modelSelectionConfig parameter is not supported in Gemini API.");const P=u(n,["safetySettings"]);if(o!==void 0&&P!=null){let ue=P;Array.isArray(ue)&&(ue=ue.map(He=>uS(He))),c(o,["safetySettings"],ue)}const Z=u(n,["tools"]);if(o!==void 0&&Z!=null){let ue=Zi(Z);Array.isArray(ue)&&(ue=ue.map(He=>cS(Qi(He)))),c(o,["tools"],ue)}const ee=u(n,["toolConfig"]);if(o!==void 0&&ee!=null&&c(o,["toolConfig"],rS(ee)),u(n,["labels"])!==void 0)throw new Error("labels parameter is not supported in Gemini API.");const te=u(n,["cachedContent"]);o!==void 0&&te!=null&&c(o,["cachedContent"],pn(i,te));const J=u(n,["responseModalities"]);J!=null&&c(a,["responseModalities"],J);const O=u(n,["mediaResolution"]);O!=null&&c(a,["mediaResolution"],O);const F=u(n,["speechConfig"]);if(F!=null&&c(a,["speechConfig"],yr(F)),u(n,["audioTimestamp"])!==void 0)throw new Error("audioTimestamp parameter is not supported in Gemini API.");const Q=u(n,["thinkingConfig"]);Q!=null&&c(a,["thinkingConfig"],Q);const se=u(n,["imageConfig"]);return se!=null&&c(a,["imageConfig"],$T(se)),a}function KT(i){const n={},o=u(i,["sdkHttpResponse"]);o!=null&&c(n,["sdkHttpResponse"],o);const a=u(i,["candidates"]);if(a!=null){let y=a;Array.isArray(y)&&(y=y.map(h=>bT(h))),c(n,["candidates"],y)}const r=u(i,["modelVersion"]);r!=null&&c(n,["modelVersion"],r);const d=u(i,["promptFeedback"]);d!=null&&c(n,["promptFeedback"],d);const m=u(i,["responseId"]);m!=null&&c(n,["responseId"],m);const g=u(i,["usageMetadata"]);return g!=null&&c(n,["usageMetadata"],g),n}function XT(i,n){const o={},a=u(n,["name"]);return a!=null&&c(o,["_url","name"],Wi(i,a)),o}function QT(i,n){const o={},a=u(n,["name"]);return a!=null&&c(o,["_url","name"],Wi(i,a)),o}function ZT(i){const n={};if(u(i,["authConfig"])!==void 0)throw new Error("authConfig parameter is not supported in Gemini API.");const o=u(i,["enableWidget"]);return o!=null&&c(n,["enableWidget"],o),n}function WT(i){const n={};if(u(i,["excludeDomains"])!==void 0)throw new Error("excludeDomains parameter is not supported in Gemini API.");if(u(i,["blockingConfidence"])!==void 0)throw new Error("blockingConfidence parameter is not supported in Gemini API.");const o=u(i,["timeRangeFilter"]);return o!=null&&c(n,["timeRangeFilter"],o),n}function $T(i){const n={},o=u(i,["aspectRatio"]);o!=null&&c(n,["aspectRatio"],o);const a=u(i,["imageSize"]);if(a!=null&&c(n,["imageSize"],a),u(i,["outputMimeType"])!==void 0)throw new Error("outputMimeType parameter is not supported in Gemini API.");if(u(i,["outputCompressionQuality"])!==void 0)throw new Error("outputCompressionQuality parameter is not supported in Gemini API.");return n}function jT(i,n){const o={},a=u(n,["model"]);a!=null&&c(o,["request","model"],_e(i,a));const r=u(n,["contents"]);if(r!=null){let g=Ht(r);Array.isArray(g)&&(g=g.map(y=>xh(y))),c(o,["request","contents"],g)}const d=u(n,["metadata"]);d!=null&&c(o,["metadata"],d);const m=u(n,["config"]);return m!=null&&c(o,["request","generationConfig"],JT(i,m,u(o,["request"],{}))),o}function eS(i){const n={},o=u(i,["response"]);o!=null&&c(n,["response"],KT(o));const a=u(i,["error"]);return a!=null&&c(n,["error"],a),n}function tS(i,n){const o={},a=u(i,["pageSize"]);n!==void 0&&a!=null&&c(n,["_query","pageSize"],a);const r=u(i,["pageToken"]);if(n!==void 0&&r!=null&&c(n,["_query","pageToken"],r),u(i,["filter"])!==void 0)throw new Error("filter parameter is not supported in Gemini API.");return o}function nS(i,n){const o={},a=u(i,["pageSize"]);n!==void 0&&a!=null&&c(n,["_query","pageSize"],a);const r=u(i,["pageToken"]);n!==void 0&&r!=null&&c(n,["_query","pageToken"],r);const d=u(i,["filter"]);return n!==void 0&&d!=null&&c(n,["_query","filter"],d),o}function iS(i){const n={},o=u(i,["config"]);return o!=null&&tS(o,n),n}function lS(i){const n={},o=u(i,["config"]);return o!=null&&nS(o,n),n}function oS(i){const n={},o=u(i,["sdkHttpResponse"]);o!=null&&c(n,["sdkHttpResponse"],o);const a=u(i,["nextPageToken"]);a!=null&&c(n,["nextPageToken"],a);const r=u(i,["operations"]);if(r!=null){let d=r;Array.isArray(d)&&(d=d.map(m=>ha(m))),c(n,["batchJobs"],d)}return n}function aS(i){const n={},o=u(i,["sdkHttpResponse"]);o!=null&&c(n,["sdkHttpResponse"],o);const a=u(i,["nextPageToken"]);a!=null&&c(n,["nextPageToken"],a);const r=u(i,["batchPredictionJobs"]);if(r!=null){let d=r;Array.isArray(d)&&(d=d.map(m=>or(m))),c(n,["batchJobs"],d)}return n}function sS(i){const n={},o=u(i,["mediaResolution"]);o!=null&&c(n,["mediaResolution"],o);const a=u(i,["codeExecutionResult"]);a!=null&&c(n,["codeExecutionResult"],a);const r=u(i,["executableCode"]);r!=null&&c(n,["executableCode"],r);const d=u(i,["fileData"]);d!=null&&c(n,["fileData"],OT(d));const m=u(i,["functionCall"]);m!=null&&c(n,["functionCall"],FT(m));const g=u(i,["functionResponse"]);g!=null&&c(n,["functionResponse"],g);const y=u(i,["inlineData"]);y!=null&&c(n,["inlineData"],NT(y));const h=u(i,["text"]);h!=null&&c(n,["text"],h);const v=u(i,["thought"]);v!=null&&c(n,["thought"],v);const S=u(i,["thoughtSignature"]);S!=null&&c(n,["thoughtSignature"],S);const _=u(i,["videoMetadata"]);return _!=null&&c(n,["videoMetadata"],_),n}function uS(i){const n={},o=u(i,["category"]);if(o!=null&&c(n,["category"],o),u(i,["method"])!==void 0)throw new Error("method parameter is not supported in Gemini API.");const a=u(i,["threshold"]);return a!=null&&c(n,["threshold"],a),n}function rS(i){const n={},o=u(i,["functionCallingConfig"]);o!=null&&c(n,["functionCallingConfig"],YT(o));const a=u(i,["retrievalConfig"]);return a!=null&&c(n,["retrievalConfig"],a),n}function cS(i){const n={},o=u(i,["functionDeclarations"]);if(o!=null){let v=o;Array.isArray(v)&&(v=v.map(S=>S)),c(n,["functionDeclarations"],v)}if(u(i,["retrieval"])!==void 0)throw new Error("retrieval parameter is not supported in Gemini API.");const a=u(i,["googleSearchRetrieval"]);a!=null&&c(n,["googleSearchRetrieval"],a);const r=u(i,["computerUse"]);r!=null&&c(n,["computerUse"],r);const d=u(i,["fileSearch"]);d!=null&&c(n,["fileSearch"],d);const m=u(i,["codeExecution"]);if(m!=null&&c(n,["codeExecution"],m),u(i,["enterpriseWebSearch"])!==void 0)throw new Error("enterpriseWebSearch parameter is not supported in Gemini API.");const g=u(i,["googleMaps"]);g!=null&&c(n,["googleMaps"],ZT(g));const y=u(i,["googleSearch"]);y!=null&&c(n,["googleSearch"],WT(y));const h=u(i,["urlContext"]);return h!=null&&c(n,["urlContext"],h),n}/**
264 * @license
265 * Copyright 2025 Google LLC
266 * SPDX-License-Identifier: Apache-2.0
267 */var fn;(function(i){i.PAGED_ITEM_BATCH_JOBS="batchJobs",i.PAGED_ITEM_MODELS="models",i.PAGED_ITEM_TUNING_JOBS="tuningJobs",i.PAGED_ITEM_FILES="files",i.PAGED_ITEM_CACHED_CONTENTS="cachedContents",i.PAGED_ITEM_FILE_SEARCH_STORES="fileSearchStores",i.PAGED_ITEM_DOCUMENTS="documents"})(fn||(fn={}));class ai{constructor(n,o,a,r){this.pageInternal=[],this.paramsInternal={},this.requestInternal=o,this.init(n,a,r)}init(n,o,a){var r,d;this.nameInternal=n,this.pageInternal=o[this.nameInternal]||[],this.sdkHttpResponseInternal=o==null?void 0:o.sdkHttpResponse,this.idxInternal=0;let m={config:{}};!a||Object.keys(a).length===0?m={config:{}}:typeof a=="object"?m=Object.assign({},a):m=a,m.config&&(m.config.pageToken=o.nextPageToken),this.paramsInternal=m,this.pageInternalSize=(d=(r=m.config)===null||r===void 0?void 0:r.pageSize)!==null&&d!==void 0?d:this.pageInternal.length}initNextPage(n){this.init(this.nameInternal,n,this.paramsInternal)}get page(){return this.pageInternal}get name(){return this.nameInternal}get pageSize(){return this.pageInternalSize}get sdkHttpResponse(){return this.sdkHttpResponseInternal}get params(){return this.paramsInternal}get pageLength(){return this.pageInternal.length}getItem(n){return this.pageInternal[n]}[Symbol.asyncIterator](){return{next:async()=>
267{if(this.idxInternal>=this.pageLength)if(this.hasNextPage())await this.nextPage();else return{value:void 0,done:!0};const n=this.getItem(this.idxInternal);return this.idxInternal+=1,{value:n,done:!1}},return:async()=>({value:void 0,done:!0})}}async nextPage(){if(!this.hasNextPage())throw new Error("No more pages to fetch.");const n=await this.requestInternal(this.params);return this.initNextPage(n),this.page}hasNextPage(){var n;return((n=this.params.config)===null||n===void 0?void 0:n.pageToken)!==void 0}}/**
268 * @license
269 * Copyright 2025 Google LLC
270 * SPDX-License-Identifier: Apache-2.0
271 */class fS extends dn{constructor(n){super(),this.apiClient=n,this.create=async o=>(this.apiClient.isVertexAI()&&(o.config=this.formatDestination(o.src,o.config)),this.createInternal(o)),this.createEmbeddings=async o=>{if(console.warn("batches.createEmbeddings() is experimental and may change without notice."),this.apiClient.isVertexAI())throw new Error("Vertex AI does not support batches.createEmbeddings.");return this.createEmbeddingsInternal(o)},this.list=async(o={})=>new ai(fn.PAGED_ITEM_BATCH_JOBS,a=>this.listInternal(a),await this.listInternal(o),o)}createInlinedGenerateContentRequest(n){const o=Ym(this.apiClient,n),a=o._url,r=X("{model}:batchGenerateContent",a),g=o.batch.inputConfig.requests,y=g.requests,h=[];for(const v of y){const S=Object.assign({},v);if(S.systemInstruction){const _=S.systemInstruction;delete S.systemInstruction;const x=S.request;x.systemInstruction=_,S.request=x}h.push(S)}return g.requests=h,delete o.config,delete o._url,delete o._query,{path:r,body:o}}getGcsUri(n){if(typeof n=="string")return n.startsWith("gs://")?n:void 0;if(!Array.isArray(n)&&n.gcsUri&&n.gcsUri.length>0)return n.gcsUri[0]}getBigqueryUri(n){if(typeof n=="string")return n.startsWith("bq://")?n:void 0;if(!Array.isArray(n))return n.bigqueryUri}formatDestination(n,o){const a=o?Object.assign({},o):{},r=Date.now().toString();if(a.displayName||(a.displayName=`genaiBatchJob_${r}`),a.dest===void 0){const d=this.getGcsUri(n),m=this.getBigqueryUri(n);if(d)d.endsWith(".jsonl")?a.dest=`${d.slice(0,-6)}/dest`:a.dest=`${d}_dest_${r}`;else if(m)a.dest=`${m}_dest_${r}`;else throw new Error("Unsupported source for Vertex AI: No GCS or BigQuery URI found.")}return a}async createInternal(n){var o,a,r,d;let m,g="",y={};if(this.apiClient.isVertexAI()){const h=UT(this.apiClient,n);return g=X("batchPredictionJobs",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(v=>v.json()),m.then(v=>or(v))}else{const h=Ym(this.apiClient,n);return g=X("{model}:batchGenerateContent",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(d=n.config)===null||d===void 0?void 0:d.abortSignal}).then(v=>v.json()),m.then(v=>ha(v))}}async createEmbeddingsInternal(n){var o,a;let r,d="",m={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const g=qT(this.apiClient,n);return d=X("{model}:asyncBatchEmbedContent",g._url),m=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:d,queryParams:m,body:JSON.stringify(g),httpMethod:"POST",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(y=>y.json()),r.then(y=>ha(y))}}async get(n){var o,a,r,d;let m,g="",y={};if(this.apiClient.isVertexAI()){const h=QT(this.apiClient,n);return g=X("batchPredictionJobs/{name}",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(v=>v.json()),m.then(v=>or(v))}else{const h=XT(this.apiClient,n);return g=X("batches/{name}",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(d=n.config)===null||d===void 0?void 0:d.abortSignal}).then(v=>v.json()),m.then(v=>ha(v))}}async cancel(n){var o,a,r,d;let m="",g={};if(this.apiClient.isVertexAI()){const y=RT(this.apiClient,n);m=X("batchPredictionJobs/{name}:cancel",y._url),g=y._query,delete y._url,delete y._query,await this.apiClient.request({path:m,queryParams:g,body:JSON.stringify(y),httpMethod:"POST",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal})}else{const y=MT(this.apiClient,n);m=X("batches/{name}:cancel",y._url),g=y._query,delete y._url,delete y._query,await this.apiClient.request({path:m,queryParams:g,body:JSON.stringify(y),httpMethod:"POST",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(d=n.config)===null||d===void 0?void 0:d.abortSignal})}}async listInternal(n){var o,a,r,d;let m,g="",y={};if(this.apiClient.isVertexAI()){const h=lS(n);return g=X("batchPredictionJobs",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),m.then(v=>{const S=aS(v),_=new Pm;return Object.assign(_,S),_})}else{const h=iS(n);return g=X("batches",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(d=n.config)===null||d===void 0?void 0:d.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),m.then(v=>{const S=oS(v),_=new Pm;return Object.assign(_,S),_})}}async delete(n){var o,a,r,d;let m,g="",y={};if(this.apiClient.isVertexAI()){const h=HT(this.apiClient,n);return g=X("batchPredictionJobs/{name}",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"DELETE",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),m.then(v=>kT(v))}else{const h=GT(this.apiClient,n);return g=X("batches/{name}",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"DELETE",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(d=n.config)===null||d===void 0?void 0:d.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),m.then(v=>zT(v))}}}/**
272 * @license
273 * Copyright 2025 Google LLC
274 * SPDX-License-Identifier: Apache-2.0
275 */function dS(i){const n={},o=u(i,["data"]);if(o!=null&&c(n,["data"],o),u(i,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const a=u(i,["mimeType"]);return a!=null&&c(n,["mimeType"],a),n}function Jm(i){const n={},o=u(i,["parts"]);if(o!=null){let r=o;Array.isArray(r)&&(r=r.map(d=>qS(d))),c(n,["parts"],r)}const a=u(i,["role"]);return a!=null&&c(n,["role"],a),n}function pS(i,n){const o={},a=u(i,["ttl"]);n!==void 0&&a!=null&&c(n,["ttl"],a);const r=u(i,["expireTime"]);n!==void 0&&r!=null&&c(n,["expireTime"],r);const d=u(i,["displayName"]);n!==void 0&&d!=null&&c(n,["displayName"],d);const m=u(i,["contents"]);if(n!==void 0&&m!=null){let v=Ht(m);Array.isArray(v)&&(v=v.map(S=>Jm(S))),c(n,["contents"],v)}const g=u(i,["systemInstruction"]);n!==void 0&&g!=null&&c(n,["systemInstruction"],Jm(it(g)));const y=u(i,["tools"]);if(n!==void 0&&y!=null){let v=y;Array.isArray(v)&&(v=v.map(S=>HS(S))),c(n,["tools"],v)}const h=u(i,["toolConfig"]);if(n!==void 0&&h!=null&&c(n,["toolConfig"],GS(h)),u(i,["kmsKeyName"])!==void 0)throw new Error("kmsKeyName parameter is not supported in Gemini API.");return o}function mS(i,n){const o={},a=u(i,["ttl"]);n!==void 0&&a!=null&&c(n,["ttl"],a);const r=u(i,["expireTime"]);n!==void 0&&r!=null&&c(n,["expireTime"],r);const d=u(i,["displayName"]);n!==void 0&&d!=null&&c(n,["displayName"],d);const m=u(i,["contents"]);if(n!==void 0&&m!=null){let S=Ht(m);Array.isArray(S)&&(S=S.map(_=>_)),c(n,["contents"],S)}const g=u(i,["systemInstruction"]);n!==void 0&&g!=null&&c(n,["systemInstruction"],it(g));const y=u(i,["tools"]);if(n!==void 0&&y!=null){let S=y;Array.isArray(S)&&(S=S.map(_=>zS(_))),c(n,["tools"],S)}const h=u(i,["toolConfig"]);n!==void 0&&h!=null&&c(n,["toolConfig"],h);const v=u(i,["kmsKeyName"]);return n!==void 0&&v!=null&&c(n,["encryption_spec","kmsKeyName"],v),o}function hS(i,n){const o={},a=u(n,["model"]);a!=null&&c(o,["model"],ph(i,a));const r=u(n,["config"]);return r!=null&&pS(r,o),o}function gS(i,n){const o={},a=u(n,["model"]);a!=null&&c(o,["model"],ph(i,a));const r=u(n,["config"]);return r!=null&&mS(r,o),o}function yS(i,n){const o={},a=u(n,["name"]);return a!=null&&c(o,["_url","name"],pn(i,a)),o}function vS(i,n){const o={},a=u(n,["name"]);return a!=null&&c(o,["_url","name"],pn(i,a)),o}function TS(i){const n={},o=u(i,["sdkHttpResponse"]);return o!=null&&c(n,["sdkHttpResponse"],o),n}function SS(i){const n={},o=u(i,["sdkHttpResponse"]);return o!=null&&c(n,["sdkHttpResponse"],o),n}function _S(i){const n={};if(u(i,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const o=u(i,["fileUri"]);o!=null&&c(n,["fileUri"],o);const a=u(i,["mimeType"]);return a!=null&&c(n,["mimeType"],a),n}function ES(i){const n={},o=u(i,["id"]);o!=null&&c(n,["id"],o);const a=u(i,["args"]);a!=null&&c(n,["args"],a);const r=u(i,["name"]);if(r!=null&&c(n,["name"],r),u(i,["partialArgs"])!==void 0)throw new Error("partialArgs parameter is not supported in Gemini API.");if(u(i,["willContinue"])!==void 0)throw new Error("willContinue parameter is not supported in Gemini API.");return n}function CS(i){const n={},o=u(i,["mode"]);o!=null&&c(n,["mode"],o);const a=u(i,["allowedFunctionNames"]);if(a!=null&&c(n,["allowedFunctionNames"],a),u(i,["streamFunctionCallArguments"])!==void 0)throw new Error("streamFunctionCallArguments parameter is not supported in Gemini API.");return n}function AS(i){const n={};if(u(i,["behavior"])!==void 0)throw new Error("behavior parameter is not supported in Vertex AI.");const o=u(i,["description"]);o!=null&&c(n,["description"],o);const a=u(i,["name"]);a!=null&&c(n,["name"],a);const r=u(i,["parameters"]);r!=null&&c(n,["parameters"],r);const d=u(i,["parametersJsonSchema"]);d!=null&&c(n,["parametersJsonSchema"],d);const m=u(i,["response"]);m!=null&&c(n,["response"],m);const g=u(i,["responseJsonSchema"]);return g!=null&&c(n,["responseJsonSchema"],g),n}function xS(i,n){const o={},a=u(n,["name"]);return a!=null&&c(o,["_url","name"],pn(i,a)),o}function NS(i,n){const o={},a=u(n,["name"]);return a!=null&&c(o,["_url","name"],pn(i,a)),o}function MS(i){const n={};if(u(i,["authConfig"])!==void 0)throw new Error("authConfig parameter is not supported in Gemini API.");const o=u(i,["enableWidget"]);return o!=null&&c(n,["enableWidget"],o),n}function RS(i){const n={};if(u(i,["excludeDomains"])!==void 0)throw new Error("excludeDomains parameter is not supported in Gemini API.");if(u(i,["blockingConfidence"])!==void 0)throw new Error("blockingConfidence parameter is not supported in Gemini API.");const o=u(i,["timeRangeFilter"]);return o!=null&&c(n,["timeRangeFilter"],o),n}function bS(i,n){const o={},a=u(i,["pageSize"]);n!==void 0&&a!=null&&c(n,["_query","pageSize"],a);const r=u(i,["pageToken"]);return n!==void 0&&r!=null&&c(n,["_query","pageToken"],r),o}function wS(i,n){const o={},a=u(i,["pageSize"]);n!==void 0&&a!=null&&c(n,["_query","pageSize"],a);const r=u(i,["pageToken"]);return n!==void 0&&r!=null&&c(n,["_query","pageToken"],r),o}function DS(i){const n={},o=u(i,["config"]);return o!=null&&bS(o,n),n}function IS(i){const n={},o=u(i,["config"]);return o!=null&&wS(o,n),n}function US(i){const n={},o=u(i,["sdkHttpResponse"]);o!=null&&c(n,["sdkHttpResponse"],o);const a=u(i,["nextPageToken"]);a!=null&&c(n,["nextPageToken"],a);const r=u(i,["cachedContents"]);if(r!=null){let d=r;Array.isArray(d)&&(d=d.map(m=>m)),c(n,["cachedContents"],d)}return n}function LS(i){const n={},o=u(i,["sdkHttpResponse"]);o!=null&&c(n,["sdkHttpResponse"],o);const a=u(i,["nextPageToken"]);a!=null&&c(n,["nextPageToken"],a);const r=u(i,["cachedContents"]);if(r!=null){let d=r;Array.isArray(d)&&(d=d.map(m=>m)),c(n,["cachedContents"],d)}return n}function qS(i){const n={},o=u(i,["mediaResolution"]);o!=null&&c(n,["mediaResolution"],o);const a=u(i,["codeExecutionResult"]);a!=null&&c(n,["codeExecutionResult"],a);const r=u(i,["executableCode"]);r!=null&&c(n,["executableCode"],r);const d=u(i,["fileData"]);d!=null&&c(n,["fileData"],_S(d));const m=u(i,["functionCall"]);m!=null&&c(n,["functionCall"],ES(m));const g=u(i,["functionResponse"]);g!=null&&c(n,["functionResponse"],g);const y=u(i,["inlineData"]);y!=null&&c(n,["inlineData"],dS(y));const h=u(i,["text"]);h!=null&&c(n,["text"],h);const v=u(i,["thought"]);v!=null&&c(n,["thought"],v);const S=u(i,["thoughtSignature"]);S!=null&&c(n,["thoughtSignature"],S);const _=u(i,["videoMetadata"]);return _!=null&&c(n,["videoMetadata"],_),n}function GS(i){const n={},o=u(i,["functionCallingConfig"]);o!=null&&c(n,["functionCallingConfig"],CS(o));const a=u(i,["retrievalConfig"]);return a!=null&&c(n,["retrievalConfig"],a),n}function HS(i){const n={},o=u(i,["functionDeclarations"]);if(o!=null){let v=o;Array.isArray(v)&&(v=v.map(S=>S)),c(n,["functionDeclarations"],v)}if(u(i,["retrieval"])!==void 0)throw new Error("retrieval parameter is not supported in Gemini API.");const a=u(i,["googleSearchRetrieval"]);a!=null&&c(n,["googleSearchRetrieval"],a);const r=u(i,["computerUse"]);r!=null&&c(n,["computerUse"],r);const d=u(i,["fileSearch"]);d!=null&&c(n,["fileSearch"],d);const m=u(i,["codeExecution"]);if(m!=null&&c(n,["codeExecution"],m),u(i,["enterpriseWebSearch"])!==void 0)throw new Error("enterpriseWebSearch parameter is not supported in Gemini API.");const g=u(i,["googleMaps"]);g!=null&&c(n,["googleMaps"],MS(g));const y=u(i,["googleSearch"]);y!=null&&c(n,["googleSearch"],RS(y));const h=u(i,["urlContext"]);return h!=null&&c(n,["urlContext"],h),n}function zS(i){const n={},o=u(i,["functionDeclarations"]);if(o!=null){let S=o;Array.isArray(S)&&(S=S.map(_=>AS(_))),c(n,["functionDeclarations"],S)}const a=u(i,["retrieval"]);a!=null&&c(n,["retrieval"],a);const r=u(i,["googleSearchRetrieval"]);r!=null&&c(n,["googleSearchRetrieval"],r);const d=u(i,["computerUse"]);if(d!=null&&c(n,["computerUse"],d),u(i,["fileSearch"])!==void 0)throw new Error("fileSearch parameter is not supported in Vertex AI.");const m=u(i,["codeExecution"]);m!=null&&c(n,["codeExecution"],m);const g=u(i,["enterpriseWebSearch"]);g!=null&&c(n,["enterpriseWebSearch"],g);const y=u(i,["googleMaps"]);y!=null&&c(n,["googleMaps"],y);const h=u(i,["googleSearch"]);h!=null&&c(n,["googleSearch"],h);const v=u(i,["urlContext"]);return v!=null&&c(n,["urlContext"],v),n}function kS(i,n){const o={},a=u(i,["ttl"]);n!==void 0&&a!=null&&c(n,["ttl"],a);const r=u(i,["expireTime"]);return n!==void 0&&r!=null&&c(n,["expireTime"],r),o}function VS(i,n){const o={},a=u(i,["ttl"]);n!==void 0&&a!=null&&c(n,["ttl"],a);const r=u(i,["expireTime"]);return n!==void 0&&r!=null&&c(n,["expireTime"],r),o}function PS(i,n){const o={},a=u(n,["name"]);a!=null&&c(o,["_url","name"],pn(i,a));const r=u(n,["config"]);return r!=null&&kS(r,o),o}function BS(i,n){const o={},a=u(n,["name"]);a!=null&&c(o,["_url","name"],pn(i,a));const r=u(n,["config"]);return r!=null&&VS(r,o),o}/**
276 * @license
277 * Copyright 2025 Google LLC
278 * SPDX-License-Identifier: Apache-2.0
279 */class OS extends dn{constructor(n){super(),this.apiClient=n,this.list=async(o={})=>new ai(fn.PAGED_ITEM_CACHED_CONTENTS,a=>this.listInternal(a),await this.listInternal(o),o)}async create(n){var o,a,r,d;let m,g="",y={};if(this.
279apiClient.isVertexAI()){const h=gS(this.apiClient,n);return g=X("cachedContents",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(v=>v.json()),m.then(v=>v)}else{const h=hS(this.apiClient,n);return g=X("cachedContents",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(d=n.config)===null||d===void 0?void 0:d.abortSignal}).then(v=>v.json()),m.then(v=>v)}}async get(n){var o,a,r,d;let m,g="",y={};if(this.apiClient.isVertexAI()){const h=NS(this.apiClient,n);return g=X("{name}",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(v=>v.json()),m.then(v=>v)}else{const h=xS(this.apiClient,n);return g=X("{name}",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(d=n.config)===null||d===void 0?void 0:d.abortSignal}).then(v=>v.json()),m.then(v=>v)}}async delete(n){var o,a,r,d;let m,g="",y={};if(this.apiClient.isVertexAI()){const h=vS(this.apiClient,n);return g=X("{name}",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"DELETE",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),m.then(v=>{const S=SS(v),_=new km;return Object.assign(_,S),_})}else{const h=yS(this.apiClient,n);return g=X("{name}",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"DELETE",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(d=n.config)===null||d===void 0?void 0:d.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),m.then(v=>{const S=TS(v),_=new km;return Object.assign(_,S),_})}}async update(n){var o,a,r,d;let m,g="",y={};if(this.apiClient.isVertexAI()){const h=BS(this.apiClient,n);return g=X("{name}",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"PATCH",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(v=>v.json()),m.then(v=>v)}else{const h=PS(this.apiClient,n);return g=X("{name}",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"PATCH",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(d=n.config)===null||d===void 0?void 0:d.abortSignal}).then(v=>v.json()),m.then(v=>v)}}async listInternal(n){var o,a,r,d;let m,g="",y={};if(this.apiClient.isVertexAI()){const h=IS(n);return g=X("cachedContents",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),m.then(v=>{const S=LS(v),_=new Vm;return Object.assign(_,S),_})}else{const h=DS(n);return g=X("cachedContents",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(d=n.config)===null||d===void 0?void 0:d.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),m.then(v=>{const S=US(v),_=new Vm;return Object.assign(_,S),_})}}}function Km(i){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&i[n],a=0;if(o)return o.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&a>=i.length&&(i=void 0),{value:i&&i[a++],done:!i}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function qe(i){return this instanceof qe?(this.v=i,this):new qe(i)}function Ki(i,n,o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=o.apply(i,n||[]),r,d=[];return r=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),g("next"),g("throw"),g("return",m),r[Symbol.asyncIterator]=function(){return this},r;function m(x){return function(b){return Promise.resolve(b).then(x,S)}}function g(x,b){a[x]&&(r[x]=function(U){return new Promise(function(k,B){d.push([x,U,k,B])>1||y(x,U)})},b&&(r[x]=b(r[x])))}function y(x,b){try{h(a[x](b))}catch(U){_(d[0][3],U)}}function h(x){x.value instanceof qe?Promise.resolve(x.value.v).then(v,S):_(d[0][2],x)}function v(x){y("next",x)}function S(x){y("throw",x)}function _(x,b){x(b),d.shift(),d.length&&y(d[0][0],d[0][1])}}function Xl(i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=i[Symbol.asyncIterator],o;return n?n.call(i):(i=typeof Km=="function"?Km(i):i[Symbol.iterator](),o={},a("next"),a("throw"),a("return"),o[Symbol.asyncIterator]=function(){return this},o);function a(d){o[d]=i[d]&&function(m){return new Promise(function(g,y){m=i[d](m),r(g,y,m.done,m.value)})}}function r(d,m,g,y){Promise.resolve(y).then(function(h){d({value:h,done:g})},m)}}/**
280 * @license
281 * Copyright 2025 Google LLC
282 * SPDX-License-Identifier: Apache-2.0
283 */function FS(i){var n;if(i.candidates==null||i.candidates.length===0)return!1;const o=(n=i.candidates[0])===null||n===void 0?void 0:n.content;return o===void 0?!1:Nh(o)}function Nh(i){if(i.parts===void 0||i.parts.length===0)return!1;for(const n of i.parts)if(n===void 0||Object.keys(n).length===0)return!1;return!0}function YS(i){if(i.length!==0){for(const n of i)if(n.role!=="user"&&n.role!=="model")throw new Error(`Role must be user or model, but got ${n.role}.`)}}function Xm(i){if(i===void 0||i.length===0)return[];const n=[],o=i.length;let a=0;for(;a<o;)if(i[a].role==="user")n.push(i[a]),a++;else{const r=[];let d=!0;for(;a<o&&i[a].role==="model";)r.push(i[a]),d&&!Nh(i[a])&&(d=!1),a++;d?n.push(...r):n.pop()}return n}class JS{constructor(n,o){this.modelsModule=n,this.apiClient=o}create(n){return new KS(this.apiClient,this.modelsModule,n.model,n.config,structuredClone(n.history))}}class KS{constructor(n,o,a,r={},d=[]){this.apiClient=n,this.modelsModule=o,this.model=a,this.config=r,this.history=d,this.sendPromise=Promise.resolve(),YS(d)}async sendMessage(n){var o;await this.sendPromise;const a=it(n.message),r=this.modelsModule.generateContent({model:this.model,contents:this.getHistory(!0).concat(a),config:(o=n.config)!==null&&o!==void 0?o:this.config});return this.sendPromise=(async()=>{var d,m,g;const y=await r,h=(m=(d=y.candidates)===null||d===void 0?void 0:d[0])===null||m===void 0?void 0:m.content,v=y.automaticFunctionCallingHistory,S=this.getHistory(!0).length;let _=[];v!=null&&(_=(g=v.slice(S))!==null&&g!==void 0?g:[]);const x=h?[h]:[];this.recordHistory(a,x,_)})(),await this.sendPromise.catch(()=>{this.sendPromise=Promise.resolve()}),r}async sendMessageStream(n){var o;await this.sendPromise;const a=it(n.message),r=this.modelsModule.generateContentStream({model:this.model,contents:this.getHistory(!0).concat(a),config:(o=n.config)!==null&&o!==void 0?o:this.config});this.sendPromise=r.then(()=>{}).catch(()=>{});const d=await r;return this.processStreamResponse(d,a)}getHistory(n=!1){const o=n?Xm(this.history):this.history;return structuredClone(o)}processStreamResponse(n,o){var a,r;return Ki(this,arguments,function*(){var m,g,y,h;const v=[];try{for(var S=!0,_=Xl(n),x;x=yield qe(_.next()),m=x.done,!m;S=!0){h=x.value,S=!1;const b=h;if(FS(b)){const U=(r=(a=b.candidates)===null||a===void 0?void 0:a[0])===null||r===void 0?void 0:r.content;U!==void 0&&v.push(U)}yield yield qe(b)}}catch(b){g={error:b}}finally{try{!S&&!m&&(y=_.return)&&(yield qe(y.call(_)))}finally{if(g)throw g.error}}this.recordHistory(o,v)})}recordHistory(n,o,a){let r=[];o.length>0&&o.every(d=>d.role!==void 0)?r=o:r.push({role:"model",parts:[]}),a&&a.length>0?this.history.push(...Xm(a)):this.history.push(n),this.history.push(...r)}}/**
284 * @license
285 * Copyright 2025 Google LLC
286 * SPDX-License-Identifier: Apache-2.0
287 */class _a extends Error{constructor(n){super(n.message),this.name="ApiError",this.status=n.status,Object.setPrototypeOf(this,_a.prototype)}}/**
288 * @license
289 * Copyright 2025 Google LLC
290 * SPDX-License-Identifier: Apache-2.0
291 */function XS(i){const n={},o=u(i,["file"]);return o!=null&&c(n,["file"],o),n}function QS(i){const n={},o=u(i,["sdkHttpResponse"]);return o!=null&&c(n,["sdkHttpResponse"],o),n}function ZS(i){const n={},o=u(i,["name"]);return o!=null&&c(n,["_url","file"],Th(o)),n}function WS(i){const n={},o=u(i,["sdkHttpResponse"]);return o!=null&&c(n,["sdkHttpResponse"],o),n}function $S(i){const n={},o=u(i,["name"]);return o!=null&&c(n,["_url","file"],Th(o)),n}function jS(i,n){const o={},a=u(i,["pageSize"]);n!==void 0&&a!=null&&c(n,["_query","pageSize"],a);const r=u(i,["pageToken"]);return n!==void 0&&r!=null&&c(n,["_query","pageToken"],r),o}function e_(i){const n={},o=u(i,["config"]);return o!=null&&jS(o,n),n}function t_(i){const n={},o=u(i,["sdkHttpResponse"]);o!=null&&c(n,["sdkHttpResponse"],o);const a=u(i,["nextPageToken"]);a!=null&&c(n,["nextPageToken"],a);const r=u(i,["files"]);if(r!=null){let d=r;Array.isArray(d)&&(d=d.map(m=>m)),c(n,["files"],d)}return n}/**
292 * @license
293 * Copyright 2025 Google LLC
294 * SPDX-License-Identifier: Apache-2.0
295 */class n_ extends dn{constructor(n){super(),this.apiClient=n,this.list=async(o={})=>new ai(fn.PAGED_ITEM_FILES,a=>this.listInternal(a),await this.listInternal(o),o)}async upload(n){if(this.apiClient.isVertexAI())throw new Error("Vertex AI does not support uploading files. You can share files through a GCS bucket.");return this.apiClient.uploadFile(n.file,n.config).then(o=>o)}async download(n){await this.apiClient.downloadFile(n)}async listInternal(n){var o,a;let r,d="",m={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const g=e_(n);return d=X("files",g._url),m=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:d,queryParams:m,body:JSON.stringify(g),httpMethod:"GET",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(y=>y.json().then(h=>{const v=h;return v.sdkHttpResponse={headers:y.headers},v})),r.then(y=>{const h=t_(y),v=new aT;return Object.assign(v,h),v})}}async createInternal(n){var o,a;let r,d="",m={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const g=XS(n);return d=X("upload/v1beta/files",g._url),m=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:d,queryParams:m,body:JSON.stringify(g),httpMethod:"POST",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(y=>y.json()),r.then(y=>{const h=QS(y),v=new sT;return Object.assign(v,h),v})}}async get(n){var o,a;let r,d="",m={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const g=$S(n);return d=X("files/{file}",g._url),m=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:d,queryParams:m,body:JSON.stringify(g),httpMethod:"GET",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(y=>y.json()),r.then(y=>y)}}async delete(n){var o,a;let r,d="",m={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const g=ZS(n);return d=X("files/{file}",g._url),m=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:d,queryParams:m,body:JSON.stringify(g),httpMethod:"DELETE",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(y=>y.json().then(h=>{const v=h;return v.sdkHttpResponse={headers:y.headers},v})),r.then(y=>{const h=WS(y),v=new uT;return Object.assign(v,h),v})}}}/**
296 * @license
297 * Copyright 2025 Google LLC
298 * SPDX-License-Identifier: Apache-2.0
299 */function ga(i){const n={},o=u(i,["data"]);if(o!=null&&c(n,["data"],o),u(i,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const a=u(i,["mimeType"]);return a!=null&&c(n,["mimeType"],a),n}function i_(i){const n={},o=u(i,["parts"]);if(o!=null){let r=o;Array.isArray(r)&&(r=r.map(d=>T_(d))),c(n,["parts"],r)}const a=u(i,["role"]);return a!=null&&c(n,["role"],a),n}function l_(i){const n={};if(u(i,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const o=u(i,["fileUri"]);o!=null&&c(n,["fileUri"],o);const a=u(i,["mimeType"]);return a!=null&&c(n,["mimeType"],a),n}function o_(i){const n={},o=u(i,["id"]);o!=null&&c(n,["id"],o);const a=u(i,["args"]);a!=null&&c(n,["args"],a);const r=u(i,["name"]);if(r!=null&&c(n,["name"],r),u(i,["partialArgs"])!==void 0)throw new Error("partialArgs parameter is not supported in Gemini API.");if(u(i,["willContinue"])!==void 0)throw new Error("willContinue parameter is not supported in Gemini API.");return n}function a_(i){const n={};if(u(i,["behavior"])!==void 0)throw new Error("behavior parameter is not supported in Vertex AI.");const o=u(i,["description"]);o!=null&&c(n,["description"],o);const a=u(i,["name"]);a!=null&&c(n,["name"],a);const r=u(i,["parameters"]);r!=null&&c(n,["parameters"],r);const d=u(i,["parametersJsonSchema"]);d!=null&&c(n,["parametersJsonSchema"],d);const m=u(i,["response"]);m!=null&&c(n,["response"],m);const g=u(i,["responseJsonSchema"]);return g!=null&&c(n,["responseJsonSchema"],g),n}function s_(i){const n={},o=u(i,["modelSelectionConfig"]);o!=null&&c(n,["modelConfig"],o);const a=u(i,["responseJsonSchema"]);a!=null&&c(n,["responseJsonSchema"],a);const r=u(i,["audioTimestamp"]);r!=null&&c(n,["audioTimestamp"],r);const d=u(i,["candidateCount"]);d!=null&&c(n,["candidateCount"],d);const m=u(i,["enableAffectiveDialog"]);m!=null&&c(n,["enableAffectiveDialog"],m);const g=u(i,["frequencyPenalty"]);g!=null&&c(n,["frequencyPenalty"],g);const y=u(i,["logprobs"]);y!=null&&c(n,["logprobs"],y);const h=u(i,["maxOutputTokens"]);h!=null&&c(n,["maxOutputTokens"],h);const v=u(i,["mediaResolution"]);v!=null&&c(n,["mediaResolution"],v);const S=u(i,["presencePenalty"]);S!=null&&c(n,["presencePenalty"],S);const _=u(i,["responseLogprobs"]);_!=null&&c(n,["responseLogprobs"],_);const x=u(i,["responseMimeType"]);x!=null&&c(n,["responseMimeType"],x);const b=u(i,["responseModalities"]);b!=null&&c(n,["responseModalities"],b);const U=u(i,["responseSchema"]);U!=null&&c(n,["responseSchema"],U);
299const k=u(i,["routingConfig"]);k!=null&&c(n,["routingConfig"],k);const B=u(i,["seed"]);B!=null&&c(n,["seed"],B);const W=u(i,["speechConfig"]);W!=null&&c(n,["speechConfig"],Mh(W));const P=u(i,["stopSequences"]);P!=null&&c(n,["stopSequences"],P);const Z=u(i,["temperature"]);Z!=null&&c(n,["temperature"],Z);const ee=u(i,["thinkingConfig"]);ee!=null&&c(n,["thinkingConfig"],ee);const te=u(i,["topK"]);te!=null&&c(n,["topK"],te);const J=u(i,["topP"]);if(J!=null&&c(n,["topP"],J),u(i,["enableEnhancedCivicAnswers"])!==void 0)throw new Error("enableEnhancedCivicAnswers parameter is not supported in Vertex AI.");return n}function u_(i){const n={};if(u(i,["authConfig"])!==void 0)throw new Error("authConfig parameter is not supported in Gemini API.");const o=u(i,["enableWidget"]);return o!=null&&c(n,["enableWidget"],o),n}function r_(i){const n={};if(u(i,["excludeDomains"])!==void 0)throw new Error("excludeDomains parameter is not supported in Gemini API.");if(u(i,["blockingConfidence"])!==void 0)throw new Error("blockingConfidence parameter is not supported in Gemini API.");const o=u(i,["timeRangeFilter"]);return o!=null&&c(n,["timeRangeFilter"],o),n}function c_(i,n){const o={},a=u(i,["generationConfig"]);n!==void 0&&a!=null&&c(n,["setup","generationConfig"],a);const r=u(i,["responseModalities"]);n!==void 0&&r!=null&&c(n,["setup","generationConfig","responseModalities"],r);const d=u(i,["temperature"]);n!==void 0&&d!=null&&c(n,["setup","generationConfig","temperature"],d);const m=u(i,["topP"]);n!==void 0&&m!=null&&c(n,["setup","generationConfig","topP"],m);const g=u(i,["topK"]);n!==void 0&&g!=null&&c(n,["setup","generationConfig","topK"],g);const y=u(i,["maxOutputTokens"]);n!==void 0&&y!=null&&c(n,["setup","generationConfig","maxOutputTokens"],y);const h=u(i,["mediaResolution"]);n!==void 0&&h!=null&&c(n,["setup","generationConfig","mediaResolution"],h);const v=u(i,["seed"]);n!==void 0&&v!=null&&c(n,["setup","generationConfig","seed"],v);const S=u(i,["speechConfig"]);n!==void 0&&S!=null&&c(n,["setup","generationConfig","speechConfig"],vr(S));const _=u(i,["thinkingConfig"]);n!==void 0&&_!=null&&c(n,["setup","generationConfig","thinkingConfig"],_);const x=u(i,["enableAffectiveDialog"]);n!==void 0&&x!=null&&c(n,["setup","generationConfig","enableAffectiveDialog"],x);const b=u(i,["systemInstruction"]);n!==void 0&&b!=null&&c(n,["setup","systemInstruction"],i_(it(b)));const U=u(i,["tools"]);if(n!==void 0&&U!=null){let te=Zi(U);Array.isArray(te)&&(te=te.map(J=>__(Qi(J)))),c(n,["setup","tools"],te)}const k=u(i,["sessionResumption"]);n!==void 0&&k!=null&&c(n,["setup","sessionResumption"],S_(k));const B=u(i,["inputAudioTranscription"]);n!==void 0&&B!=null&&c(n,["setup","inputAudioTranscription"],B);const W=u(i,["outputAudioTranscription"]);n!==void 0&&W!=null&&c(n,["setup","outputAudioTranscription"],W);const P=u(i,["realtimeInputConfig"]);n!==void 0&&P!=null&&c(n,["setup","realtimeInputConfig"],P);const Z=u(i,["contextWindowCompression"]);n!==void 0&&Z!=null&&c(n,["setup","contextWindowCompression"],Z);const ee=u(i,["proactivity"]);return n!==void 0&&ee!=null&&c(n,["setup","proactivity"],ee),o}function f_(i,n){const o={},a=u(i,["generationConfig"]);n!==void 0&&a!=null&&c(n,["setup","generationConfig"],s_(a));const r=u(i,["responseModalities"]);n!==void 0&&r!=null&&c(n,["setup","generationConfig","responseModalities"],r);const d=u(i,["temperature"]);n!==void 0&&d!=null&&c(n,["setup","generationConfig","temperature"],d);const m=u(i,["topP"]);n!==void 0&&m!=null&&c(n,["setup","generationConfig","topP"],m);const g=u(i,["topK"]);n!==void 0&&g!=null&&c(n,["setup","generationConfig","topK"],g);const y=u(i,["maxOutputTokens"]);n!==void 0&&y!=null&&c(n,["setup","generationConfig","maxOutputTokens"],y);const h=u(i,["mediaResolution"]);n!==void 0&&h!=null&&c(n,["setup","generationConfig","mediaResolution"],h);const v=u(i,["seed"]);n!==void 0&&v!=null&&c(n,["setup","generationConfig","seed"],v);const S=u(i,["speechConfig"]);n!==void 0&&S!=null&&c(n,["setup","generationConfig","speechConfig"],Mh(vr(S)));const _=u(i,["thinkingConfig"]);n!==void 0&&_!=null&&c(n,["setup","generationConfig","thinkingConfig"],_);const x=u(i,["enableAffectiveDialog"]);n!==void 0&&x!=null&&c(n,["setup","generationConfig","enableAffectiveDialog"],x);const b=u(i,["systemInstruction"]);n!==void 0&&b!=null&&c(n,["setup","systemInstruction"],it(b));const U=u(i,["tools"]);if(n!==void 0&&U!=null){let te=Zi(U);Array.isArray(te)&&(te=te.map(J=>E_(Qi(J)))),c(n,["setup","tools"],te)}const k=u(i,["sessionResumption"]);n!==void 0&&k!=null&&c(n,["setup","sessionResumption"],k);const B=u(i,["inputAudioTranscription"]);n!==void 0&&B!=null&&c(n,["setup","inputAudioTranscription"],B);const W=u(i,["outputAudioTranscription"]);n!==void 0&&W!=null&&c(n,["setup","outputAudioTranscription"],W);const P=u(i,["realtimeInputConfig"]);n!==void 0&&P!=null&&c(n,["setup","realtimeInputConfig"],P);const Z=u(i,["contextWindowCompression"]);n!==void 0&&Z!=null&&c(n,["setup","contextWindowCompression"],Z);const ee=u(i,["proactivity"]);return n!==void 0&&ee!=null&&c(n,["setup","proactivity"],ee),o}function d_(i,n){const o={},a=u(n,["model"]);a!=null&&c(o,["setup","model"],_e(i,a));const r=u(n,["config"]);return r!=null&&c(o,["config"],c_(r,o)),o}function p_(i,n){const o={},a=u(n,["model"]);a!=null&&c(o,["setup","model"],_e(i,a));const r=u(n,["config"]);return r!=null&&c(o,["config"],f_(r,o)),o}function m_(i){const n={},o=u(i,["musicGenerationConfig"]);return o!=null&&c(n,["musicGenerationConfig"],o),n}function h_(i){const n={},o=u(i,["weightedPrompts"]);if(o!=null){let a=o;Array.isArray(a)&&(a=a.map(r=>r)),c(n,["weightedPrompts"],a)}return n}function g_(i){const n={},o=u(i,["media"]);if(o!=null){let h=mh(o);Array.isArray(h)&&(h=h.map(v=>ga(v))),c(n,["mediaChunks"],h)}const a=u(i,["audio"]);a!=null&&c(n,["audio"],ga(gh(a)));const r=u(i,["audioStreamEnd"]);r!=null&&c(n,["audioStreamEnd"],r);const d=u(i,["video"]);d!=null&&c(n,["video"],ga(hh(d)));const m=u(i,["text"]);m!=null&&c(n,["text"],m);const g=u(i,["activityStart"]);g!=null&&c(n,["activityStart"],g);const y=u(i,["activityEnd"]);return y!=null&&c(n,["activityEnd"],y),n}function y_(i){const n={},o=u(i,["media"]);if(o!=null){let h=mh(o);Array.isArray(h)&&(h=h.map(v=>v)),c(n,["mediaChunks"],h)}const a=u(i,["audio"]);a!=null&&c(n,["audio"],gh(a));const r=u(i,["audioStreamEnd"]);r!=null&&c(n,["audioStreamEnd"],r);const d=u(i,["video"]);d!=null&&c(n,["video"],hh(d));const m=u(i,["text"]);m!=null&&c(n,["text"],m);const g=u(i,["activityStart"]);g!=null&&c(n,["activityStart"],g);const y=u(i,["activityEnd"]);return y!=null&&c(n,["activityEnd"],y),n}function v_(i){const n={},o=u(i,["setupComplete"]);o!=null&&c(n,["setupComplete"],o);const a=u(i,["serverContent"]);a!=null&&c(n,["serverContent"],a);const r=u(i,["toolCall"]);r!=null&&c(n,["toolCall"],r);const d=u(i,["toolCallCancellation"]);d!=null&&c(n,["toolCallCancellation"],d);const m=u(i,["usageMetadata"]);m!=null&&c(n,["usageMetadata"],C_(m));const g=u(i,["goAway"]);g!=null&&c(n,["goAway"],g);const y=u(i,["sessionResumptionUpdate"]);return y!=null&&c(n,["sessionResumptionUpdate"],y),n}function T_(i){const n={},o=u(i,["mediaResolution"]);o!=null&&c(n,["mediaResolution"],o);const a=u(i,["codeExecutionResult"]);a!=null&&c(n,["codeExecutionResult"],a);const r=u(i,["executableCode"]);r!=null&&c(n,["executableCode"],r);const d=u(i,["fileData"]);d!=null&&c(n,["fileData"],l_(d));const m=u(i,["functionCall"]);m!=null&&c(n,["functionCall"],o_(m));const g=u(i,["functionResponse"]);g!=null&&c(n,["functionResponse"],g);const y=u(i,["inlineData"]);y!=null&&c(n,["inlineData"],ga(y));const h=u(i,["text"]);h!=null&&c(n,["text"],h);const v=u(i,["thought"]);v!=null&&c(n,["thought"],v);const S=u(i,["thoughtSignature"]);S!=null&&c(n,["thoughtSignature"],S);const _=u(i,["videoMetadata"]);return _!=null&&c(n,["videoMetadata"],_),n}function S_(i){const n={},o=u(i,["handle"]);if(o!=null&&c(n,["handle"],o),u(i,["transparent"])!==void 0)throw new Error("transparent parameter is not supported in Gemini API.");return n}function Mh(i){const n={},o=u(i,["languageCode"]);o!=null&&c(n,["languageCode"],o);const a=u(i,["voiceConfig"]);if(a!=null&&c(n,["voiceConfig"],a),u(i,["multiSpeakerVoiceConfig"])!==void 0)throw new Error("multiSpeakerVoiceConfig parameter is not supported in Vertex AI.");return n}function __(i){const n={},o=u(i,["functionDeclarations"]);if(o!=null){let v=o;Array.isArray(v)&&(v=v.map(S=>S)),c(n,["functionDeclarations"],v)}if(u(i,["retrieval"])!==void 0)throw new Error("retrieval parameter is not supported in Gemini API.");const a=u(i,["googleSearchRetrieval"]);a!=null&&c(n,["googleSearchRetrieval"],a);const r=u(i,["computerUse"]);r!=null&&c(n,["computerUse"],r);const d=u(i,["fileSearch"]);d!=null&&c(n,["fileSearch"],d);const m=u(i,["codeExecution"]);if(m!=null&&c(n,["codeExecution"],m),u(i,["enterpriseWebSearch"])!==void 0)throw new Error("enterpriseWebSearch parameter is not supported in Gemini API.");const g=u(i,["googleMaps"]);g!=null&&c(n,["googleMaps"],u_(g));const y=u(i,["googleSearch"]);y!=null&&c(n,["googleSearch"],r_(y));const h=u(i,["urlContext"]);return h!=null&&c(n,["urlContext"],h),n}function E_(i){const n={},o=u(i,["functionDeclarations"]);if(o!=null){let S=o;Array.isArray(S)&&(S=S.map(_=>a_(_))),c(n,["functionDeclarations"],S)}const a=u(i,["retrieval"]);a!=null&&c(n,["retrieval"],a);const r=u(i,["googleSearchRetrieval"]);r!=null&&c(n,["googleSearchRetrieval"],r);const d=u(i,["computerUse"]);if(d!=null&&c(n,["computerUse"],d),u(i,["fileSearch"])!==void 0)throw new Error("fileSearch parameter is not supported in Vertex AI.");const m=u(i,["codeExecution"]);m!=null&&c(n,["codeExecution"],m);const g=u(i,["enterpriseWebSearch"]);g!=null&&c(n,["enterpriseWebSearch"],g);const y=u(i,["googleMaps"]);y!=null&&c(n,["googleMaps"],y);const h=u(i,["googleSearch"]);h!=null&&c(n,["googleSearch"],h);const v=u(i,["urlContext"]);return v!=null&&c(n,["urlContext"],v),n}function C_(i){const n={},o=u(i,["promptTokenCount"]);o!=null&&c(n,["promptTokenCount"],o);const a=u(i,["cachedContentTokenCount"]);a!=null&&c(n,["cachedContentTokenCount"],a);const r=u(i,["candidatesTokenCount"]);r!=null&&c(n,["responseTokenCount"],r);const d=u(i,["toolUsePromptTokenCount"]);d!=null&&c(n,["toolUsePromptTokenCount"],d);const m=u(i,["thoughtsTokenCount"]);m!=null&&c(n,["thoughtsTokenCount"],m);const g=u(i,["totalTokenCount"]);g!=null&&c(n,["totalTokenCount"],g);
299const y=u(i,["promptTokensDetails"]);if(y!=null){let x=y;Array.isArray(x)&&(x=x.map(b=>b)),c(n,["promptTokensDetails"],x)}const h=u(i,["cacheTokensDetails"]);if(h!=null){let x=h;Array.isArray(x)&&(x=x.map(b=>b)),c(n,["cacheTokensDetails"],x)}const v=u(i,["candidatesTokensDetails"]);if(v!=null){let x=v;Array.isArray(x)&&(x=x.map(b=>b)),c(n,["responseTokensDetails"],x)}const S=u(i,["toolUsePromptTokensDetails"]);if(S!=null){let x=S;Array.isArray(x)&&(x=x.map(b=>b)),c(n,["toolUsePromptTokensDetails"],x)}const _=u(i,["trafficType"]);return _!=null&&c(n,["trafficType"],_),n}/**
300 * @license
301 * Copyright 2025 Google LLC
302 * SPDX-License-Identifier: Apache-2.0
303 */function A_(i){const n={},o=u(i,["data"]);if(o!=null&&c(n,["data"],o),u(i,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const a=u(i,["mimeType"]);return a!=null&&c(n,["mimeType"],a),n}function x_(i){const n={},o=u(i,["content"]);o!=null&&c(n,["content"],o);const a=u(i,["citationMetadata"]);a!=null&&c(n,["citationMetadata"],N_(a));const r=u(i,["tokenCount"]);r!=null&&c(n,["tokenCount"],r);const d=u(i,["finishReason"]);d!=null&&c(n,["finishReason"],d);const m=u(i,["avgLogprobs"]);m!=null&&c(n,["avgLogprobs"],m);const g=u(i,["groundingMetadata"]);g!=null&&c(n,["groundingMetadata"],g);const y=u(i,["index"]);y!=null&&c(n,["index"],y);const h=u(i,["logprobsResult"]);h!=null&&c(n,["logprobsResult"],h);const v=u(i,["safetyRatings"]);if(v!=null){let _=v;Array.isArray(_)&&(_=_.map(x=>x)),c(n,["safetyRatings"],_)}const S=u(i,["urlContextMetadata"]);return S!=null&&c(n,["urlContextMetadata"],S),n}function N_(i){const n={},o=u(i,["citationSources"]);if(o!=null){let a=o;Array.isArray(a)&&(a=a.map(r=>r)),c(n,["citations"],a)}return n}function M_(i,n){const o={},a=u(n,["model"]);a!=null&&c(o,["_url","model"],_e(i,a));const r=u(n,["contents"]);if(r!=null){let d=Ht(r);Array.isArray(d)&&(d=d.map(m=>m)),c(o,["contents"],d)}return o}function R_(i){const n={},o=u(i,["sdkHttpResponse"]);o!=null&&c(n,["sdkHttpResponse"],o);const a=u(i,["tokensInfo"]);if(a!=null){let r=a;Array.isArray(r)&&(r=r.map(d=>d)),c(n,["tokensInfo"],r)}return n}function b_(i){const n={},o=u(i,["values"]);o!=null&&c(n,["values"],o);const a=u(i,["statistics"]);return a!=null&&c(n,["statistics"],w_(a)),n}function w_(i){const n={},o=u(i,["truncated"]);o!=null&&c(n,["truncated"],o);const a=u(i,["token_count"]);return a!=null&&c(n,["tokenCount"],a),n}function Ea(i){const n={},o=u(i,["parts"]);if(o!=null){let r=o;Array.isArray(r)&&(r=r.map(d=>kE(d))),c(n,["parts"],r)}const a=u(i,["role"]);return a!=null&&c(n,["role"],a),n}function D_(i){const n={},o=u(i,["controlType"]);o!=null&&c(n,["controlType"],o);const a=u(i,["enableControlImageComputation"]);return a!=null&&c(n,["computeControl"],a),n}function I_(i){const n={};if(u(i,["systemInstruction"])!==void 0)throw new Error("systemInstruction parameter is not supported in Gemini API.");if(u(i,["tools"])!==void 0)throw new Error("tools parameter is not supported in Gemini API.");if(u(i,["generationConfig"])!==void 0)throw new Error("generationConfig parameter is not supported in Gemini API.");return n}function U_(i,n){const o={},a=u(i,["systemInstruction"]);n!==void 0&&a!=null&&c(n,["systemInstruction"],it(a));const r=u(i,["tools"]);if(n!==void 0&&r!=null){let m=r;Array.isArray(m)&&(m=m.map(g=>Ih(g))),c(n,["tools"],m)}const d=u(i,["generationConfig"]);return n!==void 0&&d!=null&&c(n,["generationConfig"],AE(d)),o}function L_(i,n){const o={},a=u(n,["model"]);a!=null&&c(o,["_url","model"],_e(i,a));const r=u(n,["contents"]);if(r!=null){let m=Ht(r);Array.isArray(m)&&(m=m.map(g=>Ea(g))),c(o,["contents"],m)}const d=u(n,["config"]);return d!=null&&I_(d),o}function q_(i,n){const o={},a=u(n,["model"]);a!=null&&c(o,["_url","model"],_e(i,a));const r=u(n,["contents"]);if(r!=null){let m=Ht(r);Array.isArray(m)&&(m=m.map(g=>g)),c(o,["contents"],m)}const d=u(n,["config"]);return d!=null&&U_(d,o),o}function G_(i){const n={},o=u(i,["sdkHttpResponse"]);o!=null&&c(n,["sdkHttpResponse"],o);const a=u(i,["totalTokens"]);a!=null&&c(n,["totalTokens"],a);const r=u(i,["cachedContentTokenCount"]);return r!=null&&c(n,["cachedContentTokenCount"],r),n}function H_(i){const n={},o=u(i,["sdkHttpResponse"]);o!=null&&c(n,["sdkHttpResponse"],o);const a=u(i,["totalTokens"]);return a!=null&&c(n,["totalTokens"],a),n}function z_(i,n){const o={},a=u(n,["model"]);return a!=null&&c(o,["_url","name"],_e(i,a)),o}function k_(i,n){const o={},a=u(n,["model"]);return a!=null&&c(o,["_url","name"],_e(i,a)),o}function V_(i){const n={},o=u(i,["sdkHttpResponse"]);return o!=null&&c(n,["sdkHttpResponse"],o),n}function P_(i){const n={},o=u(i,["sdkHttpResponse"]);return o!=null&&c(n,["sdkHttpResponse"],o),n}function B_(i,n){const o={},a=u(i,["outputGcsUri"]);n!==void 0&&a!=null&&c(n,["parameters","storageUri"],a);const r=u(i,["negativePrompt"]);n!==void 0&&r!=null&&c(n,["parameters","negativePrompt"],r);const d=u(i,["numberOfImages"]);
303n!==void 0&&d!=null&&c(n,["parameters","sampleCount"],d);const m=u(i,["aspectRatio"]);n!==void 0&&m!=null&&c(n,["parameters","aspectRatio"],m);const g=u(i,["guidanceScale"]);n!==void 0&&g!=null&&c(n,["parameters","guidanceScale"],g);const y=u(i,["seed"]);n!==void 0&&y!=null&&c(n,["parameters","seed"],y);const h=u(i,["safetyFilterLevel"]);n!==void 0&&h!=null&&c(n,["parameters","safetySetting"],h);const v=u(i,["personGeneration"]);n!==void 0&&v!=null&&c(n,["parameters","personGeneration"],v);const S=u(i,["includeSafetyAttributes"]);n!==void 0&&S!=null&&c(n,["parameters","includeSafetyAttributes"],S);const _=u(i,["includeRaiReason"]);n!==void 0&&_!=null&&c(n,["parameters","includeRaiReason"],_);const x=u(i,["language"]);n!==void 0&&x!=null&&c(n,["parameters","language"],x);const b=u(i,["outputMimeType"]);n!==void 0&&b!=null&&c(n,["parameters","outputOptions","mimeType"],b);const U=u(i,["outputCompressionQuality"]);n!==void 0&&U!=null&&c(n,["parameters","outputOptions","compressionQuality"],U);const k=u(i,["addWatermark"]);n!==void 0&&k!=null&&c(n,["parameters","addWatermark"],k);const B=u(i,["labels"]);n!==void 0&&B!=null&&c(n,["labels"],B);const W=u(i,["editMode"]);n!==void 0&&W!=null&&c(n,["parameters","editMode"],W);const P=u(i,["baseSteps"]);return n!==void 0&&P!=null&&c(n,["parameters","editConfig","baseSteps"],P),o}function O_(i,n){const o={},a=u(n,["model"]);a!=null&&c(o,["_url","model"],_e(i,a));const r=u(n,["prompt"]);r!=null&&c(o,["instances[0]","prompt"],r);const d=u(n,["referenceImages"]);if(d!=null){let g=d;Array.isArray(g)&&(g=g.map(y=>YE(y))),c(o,["instances[0]","referenceImages"],g)}const m=u(n,["config"]);return m!=null&&B_(m,o),o}function F_(i){const n={},o=u(i,["sdkHttpResponse"]);o!=null&&c(n,["sdkHttpResponse"],o);const a=u(i,["predictions"]);if(a!=null){let r=a;Array.isArray(r)&&(r=r.map(d=>Ca(d))),c(n,["generatedImages"],r)}return n}function Y_(i,n){const o={},a=u(i,["taskType"]);n!==void 0&&a!=null&&c(n,["requests[]","taskType"],a);const r=u(i,["title"]);n!==void 0&&r!=null&&c(n,["requests[]","title"],r);const d=u(i,["outputDimensionality"]);if(n!==void 0&&d!=null&&c(n,["requests[]","outputDimensionality"],d),u(i,["mimeType"])!==void 0)throw new Error("mimeType parameter is not supported in Gemini API.");if(u(i,["autoTruncate"])!==void 0)throw new Error("autoTruncate parameter is not supported in Gemini API.");return o}function J_(i,n){const o={},a=u(i,["taskType"]);n!==void 0&&a!=null&&c(n,["instances[]","task_type"],a);const r=u(i,["title"]);n!==void 0&&r!=null&&c(n,["instances[]","title"],r);const d=u(i,["outputDimensionality"]);n!==void 0&&d!=null&&c(n,["parameters","outputDimensionality"],d);const m=u(i,["mimeType"]);n!==void 0&&m!=null&&c(n,["instances[]","mimeType"],m);const g=u(i,["autoTruncate"]);return n!==void 0&&g!=null&&c(n,["parameters","autoTruncate"],g),o}function K_(i,n){const o={},a=u(n,["model"]);a!=null&&c(o,["_url","model"],_e(i,a));const r=u(n,["contents"]);if(r!=null){let g=hr(i,r);Array.isArray(g)&&(g=g.map(y=>y)),c(o,["requests[]","content"],g)}const d=u(n,["config"]);d!=null&&Y_(d,o);const m=u(n,["model"]);return m!==void 0&&c(o,["requests[]","model"],_e(i,m)),o}function X_(i,n){const o={},a=u(n,["model"]);a!=null&&c(o,["_url","model"],_e(i,a));const r=u(n,["contents"]);if(r!=null){let m=hr(i,r);Array.isArray(m)&&(m=m.map(g=>g)),c(o,["instances[]","content"],m)}const d=u(n,["config"]);return d!=null&&J_(d,o),o}function Q_(i){const n={},o=u(i,["sdkHttpResponse"]);o!=null&&c(n,["sdkHttpResponse"],o);const a=u(i,["embeddings"]);if(a!=null){let d=a;Array.isArray(d)&&(d=d.map(m=>m)),c(n,["embeddings"],d)}const r=u(i,["metadata"]);return r!=null&&c(n,["metadata"],r),n}function Z_(i){const n={},o=u(i,["sdkHttpResponse"]);o!=null&&c(n,["sdkHttpResponse"],o);const a=u(i,["predictions[]","embeddings"]);if(a!=null){let d=a;Array.isArray(d)&&(d=d.map(m=>b_(m))),c(n,["embeddings"],d)}const r=u(i,["metadata"]);return r!=null&&c(n,["metadata"],r),n}function W_(i){const n={},o=u(i,["endpoint"]);o!=null&&c(n,["name"],o);const a=u(i,["deployedModelId"]);return a!=null&&c(n,["deployedModelId"],a),n}function $_(i){const n={};if(u(i,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const o=u(i,["fileUri"]);o!=null&&c(n,["fileUri"],o);const a=u(i,["mimeType"]);return a!=null&&c(n,["mimeType"],a),n}function j_(i){const n={},o=u(i,["id"]);o!=null&&c(n,["id"],o);const a=u(i,["args"]);a!=null&&c(n,["args"],a);const r=u(i,["name"]);if(r!=null&&c(n,["name"],r),u(i,["partialArgs"])!==void 0)throw new Error("partialArgs parameter is not supported in Gemini API.");if(u(i,["willContinue"])!==void 0)throw new Error("willContinue parameter is not supported in Gemini API.");return n}function eE(i){const n={},o=u(i,["mode"]);o!=null&&c(n,["mode"],o);const a=u(i,["allowedFunctionNames"]);if(a!=null&&c(n,["allowedFunctionNames"],a),u(i,["streamFunctionCallArguments"])!==void 0)throw new Error("streamFunctionCallArguments parameter is not supported in Gemini API.");return n}function tE(i){const n={};if(u(i,["behavior"])!==void 0)throw new Error("behavior parameter is not supported in Vertex AI.");const o=u(i,["description"]);o!=null&&c(n,["description"],o);const a=u(i,["name"]);a!=null&&c(n,["name"],a);const r=u(i,["parameters"]);r!=null&&c(n,["parameters"],r);const d=u(i,["parametersJsonSchema"]);d!=null&&c(n,["parametersJsonSchema"],d);const m=u(i,["response"]);m!=null&&c(n,["response"],m);const g=u(i,["responseJsonSchema"]);return g!=null&&c(n,["responseJsonSchema"],g),n}function nE(i,n,o){const a={},r=u(n,["systemInstruction"]);o!==void 0&&r!=null&&c(o,["systemInstruction"],Ea(it(r)));const d=u(n,["temperature"]);d!=null&&c(a,["temperature"],d);const m=u(n,["topP"]);m!=null&&c(a,["topP"],m);const g=u(n,["topK"]);g!=null&&c(a,["topK"],g);const y=u(n,["candidateCount"]);y!=null&&c(a,["candidateCount"],y);const h=u(n,["maxOutputTokens"]);h!=null&&c(a,["maxOutputTokens"],h);const v=u(n,["stopSequences"]);v!=null&&c(a,["stopSequences"],v);const S=u(n,["responseLogprobs"]);S!=null&&c(a,["responseLogprobs"],S);const _=u(n,["logprobs"]);_!=null&&c(a,["logprobs"],_);const x=u(n,["presencePenalty"]);x!=null&&c(a,["presencePenalty"],x);const b=u(n,["frequencyPenalty"]);b!=null&&c(a,["frequencyPenalty"],b);const U=u(n,["seed"]);U!=null&&c(a,["seed"],U);const k=u(n,["responseMimeType"]);k!=null&&c(a,["responseMimeType"],k);const B=u(n,["responseSchema"]);B!=null&&c(a,["responseSchema"],gr(B));const W=u(n,["responseJsonSchema"]);
303if(W!=null&&c(a,["responseJsonSchema"],W),u(n,["routingConfig"])!==void 0)throw new Error("routingConfig parameter is not supported in Gemini API.");if(u(n,["modelSelectionConfig"])!==void 0)throw new Error("modelSelectionConfig parameter is not supported in Gemini API.");const P=u(n,["safetySettings"]);if(o!==void 0&&P!=null){let ue=P;Array.isArray(ue)&&(ue=ue.map(He=>JE(He))),c(o,["safetySettings"],ue)}const Z=u(n,["tools"]);if(o!==void 0&&Z!=null){let ue=Zi(Z);Array.isArray(ue)&&(ue=ue.map(He=>jE(Qi(He)))),c(o,["tools"],ue)}const ee=u(n,["toolConfig"]);if(o!==void 0&&ee!=null&&c(o,["toolConfig"],$E(ee)),u(n,["labels"])!==void 0)throw new Error("labels parameter is not supported in Gemini API.");const te=u(n,["cachedContent"]);o!==void 0&&te!=null&&c(o,["cachedContent"],pn(i,te));const J=u(n,["responseModalities"]);J!=null&&c(a,["responseModalities"],J);const O=u(n,["mediaResolution"]);O!=null&&c(a,["mediaResolution"],O);const F=u(n,["speechConfig"]);if(F!=null&&c(a,["speechConfig"],yr(F)),u(n,["audioTimestamp"])!==void 0)throw new Error("audioTimestamp parameter is not supported in Gemini API.");const Q=u(n,["thinkingConfig"]);Q!=null&&c(a,["thinkingConfig"],Q);const se=u(n,["imageConfig"]);return se!=null&&c(a,["imageConfig"],bE(se)),a}function iE(i,n,o){const a={},r=u(n,["systemInstruction"]);o!==void 0&&r!=null&&c(o,["systemInstruction"],it(r));const d=u(n,["temperature"]);d!=null&&c(a,["temperature"],d);const m=u(n,["topP"]);m!=null&&c(a,["topP"],m);const g=u(n,["topK"]);g!=null&&c(a,["topK"],g);const y=u(n,["candidateCount"]);y!=null&&c(a,["candidateCount"],y);const h=u(n,["maxOutputTokens"]);h!=null&&c(a,["maxOutputTokens"],h);const v=u(n,["stopSequences"]);v!=null&&c(a,["stopSequences"],v);const S=u(n,["responseLogprobs"]);S!=null&&c(a,["responseLogprobs"],S);const _=u(n,["logprobs"]);_!=null&&c(a,["logprobs"],_);const x=u(n,["presencePenalty"]);x!=null&&c(a,["presencePenalty"],x);const b=u(n,["frequencyPenalty"]);b!=null&&c(a,["frequencyPenalty"],b);const U=u(n,["seed"]);U!=null&&c(a,["seed"],U);const k=u(n,["responseMimeType"]);k!=null&&c(a,["responseMimeType"],k);const B=u(n,["responseSchema"]);B!=null&&c(a,["responseSchema"],gr(B));const W=u(n,["responseJsonSchema"]);W!=null&&c(a,["responseJsonSchema"],W);const P=u(n,["routingConfig"]);P!=null&&c(a,["routingConfig"],P);const Z=u(n,["modelSelectionConfig"]);Z!=null&&c(a,["modelConfig"],Z);const ee=u(n,["safetySettings"]);if(o!==void 0&&ee!=null){let q=ee;Array.isArray(q)&&(q=q.map(Y=>Y)),c(o,["safetySettings"],q)}const te=u(n,["tools"]);if(o!==void 0&&te!=null){let q=Zi(te);Array.isArray(q)&&(q=q.map(Y=>Ih(Qi(Y)))),c(o,["tools"],q)}const J=u(n,["toolConfig"]);o!==void 0&&J!=null&&c(o,["toolConfig"],J);const O=u(n,["labels"]);o!==void 0&&O!=null&&c(o,["labels"],O);const F=u(n,["cachedContent"]);o!==void 0&&F!=null&&c(o,["cachedContent"],pn(i,F));const Q=u(n,["responseModalities"]);Q!=null&&c(a,["responseModalities"],Q);const se=u(n,["mediaResolution"]);se!=null&&c(a,["mediaResolution"],se);const ue=u(n,["speechConfig"]);ue!=null&&c(a,["speechConfig"],Dh(yr(ue)));const He=u(n,["audioTimestamp"]);He!=null&&c(a,["audioTimestamp"],He);const lt=u(n,["thinkingConfig"]);lt!=null&&c(a,["thinkingConfig"],lt);const tt=u(n,["imageConfig"]);return tt!=null&&c(a,["imageConfig"],wE(tt)),a}function Qm(i,n){const o={},a=u(n,["model"]);a!=null&&c(o,["_url","model"],_e(i,a));const r=u(n,["contents"]);if(r!=null){let m=Ht(r);Array.isArray(m)&&(m=m.map(g=>Ea(g))),c(o,["contents"],m)}const d=u(n,["config"]);return d!=null&&c(o,["generationConfig"],nE(i,d,o)),o}function Zm(i,n){const o={},a=u(n,["model"]);a!=null&&c(o,["_url","model"],_e(i,a));const r=u(n,["contents"]);if(r!=null){let m=Ht(r);Array.isArray(m)&&(m=m.map(g=>g)),c(o,["contents"],m)}const d=u(n,["config"]);return d!=null&&c(o,["generationConfig"],iE(i,d,o)),o}function Wm(i){const n={},o=u(i,["sdkHttpResponse"]);o!=null&&c(n,["sdkHttpResponse"],o);const a=u(i,["candidates"]);if(a!=null){let y=a;Array.isArray(y)&&(y=y.map(h=>x_(h))),c(n,["candidates"],y)}const r=u(i,["modelVersion"]);r!=null&&c(n,["modelVersion"],r);const d=u(i,["promptFeedback"]);d!=null&&c(n,["promptFeedback"],d);const m=u(i,["responseId"]);m!=null&&c(n,["responseId"],m);const g=u(i,["usageMetadata"]);return g!=null&&c(n,["usageMetadata"],g),n}function $m(i){const n={},o=u(i,["sdkHttpResponse"]);o!=null&&c(n,["sdkHttpResponse"],o);const a=u(i,["candidates"]);if(a!=null){let h=a;Array.isArray(h)&&(h=h.map(v=>v)),c(n,["candidates"],h)}const r=u(i,["createTime"]);r!=null&&c(n,["createTime"],r);const d=u(i,["modelVersion"]);d!=null&&c(n,["modelVersion"],d);const m=u(i,["promptFeedback"]);m!=null&&c(n,["promptFeedback"],m);const g=u(i,["responseId"]);g!=null&&c(n,["responseId"],g);const y=u(i,["usageMetadata"]);return y!=null&&c(n,["usageMetadata"],y),n}function lE(i,n){const o={};if(u(i,["outputGcsUri"])!==void 0)throw new Error("outputGcsUri parameter is not supported in Gemini API.");if(u(i,["negativePrompt"])!==void 0)throw new Error("negativePrompt parameter is not supported in Gemini API.");const a=u(i,["numberOfImages"]);
303n!==void 0&&a!=null&&c(n,["parameters","sampleCount"],a);const r=u(i,["aspectRatio"]);n!==void 0&&r!=null&&c(n,["parameters","aspectRatio"],r);const d=u(i,["guidanceScale"]);if(n!==void 0&&d!=null&&c(n,["parameters","guidanceScale"],d),u(i,["seed"])!==void 0)throw new Error("seed parameter is not supported in Gemini API.");const m=u(i,["safetyFilterLevel"]);n!==void 0&&m!=null&&c(n,["parameters","safetySetting"],m);const g=u(i,["personGeneration"]);n!==void 0&&g!=null&&c(n,["parameters","personGeneration"],g);const y=u(i,["includeSafetyAttributes"]);n!==void 0&&y!=null&&c(n,["parameters","includeSafetyAttributes"],y);const h=u(i,["includeRaiReason"]);n!==void 0&&h!=null&&c(n,["parameters","includeRaiReason"],h);const v=u(i,["language"]);n!==void 0&&v!=null&&c(n,["parameters","language"],v);const S=u(i,["outputMimeType"]);n!==void 0&&S!=null&&c(n,["parameters","outputOptions","mimeType"],S);const _=u(i,["outputCompressionQuality"]);if(n!==void 0&&_!=null&&c(n,["parameters","outputOptions","compressionQuality"],_),u(i,["addWatermark"])!==void 0)throw new Error("addWatermark parameter is not supported in Gemini API.");if(u(i,["labels"])!==void 0)throw new Error("labels parameter is not supported in Gemini API.");const x=u(i,["imageSize"]);if(n!==void 0&&x!=null&&c(n,["parameters","sampleImageSize"],x),u(i,["enhancePrompt"])!==void 0)throw new Error("enhancePrompt parameter is not supported in Gemini API.");return o}function oE(i,n){const o={},a=u(i,["outputGcsUri"]);n!==void 0&&a!=null&&c(n,["parameters","storageUri"],a);const r=u(i,["negativePrompt"]);n!==void 0&&r!=null&&c(n,["parameters","negativePrompt"],r);const d=u(i,["numberOfImages"]);n!==void 0&&d!=null&&c(n,["parameters","sampleCount"],d);const m=u(i,["aspectRatio"]);n!==void 0&&m!=null&&c(n,["parameters","aspectRatio"],m);const g=u(i,["guidanceScale"]);n!==void 0&&g!=null&&c(n,["parameters","guidanceScale"],g);const y=u(i,["seed"]);n!==void 0&&y!=null&&c(n,["parameters","seed"],y);const h=u(i,["safetyFilterLevel"]);n!==void 0&&h!=null&&c(n,["parameters","safetySetting"],h);const v=u(i,["personGeneration"]);n!==void 0&&v!=null&&c(n,["parameters","personGeneration"],v);const S=u(i,["includeSafetyAttributes"]);n!==void 0&&S!=null&&c(n,["parameters","includeSafetyAttributes"],S);const _=u(i,["includeRaiReason"]);n!==void 0&&_!=null&&c(n,["parameters","includeRaiReason"],_);const x=u(i,["language"]);n!==void 0&&x!=null&&c(n,["parameters","language"],x);const b=u(i,["outputMimeType"]);n!==void 0&&b!=null&&c(n,["parameters","outputOptions","mimeType"],b);const U=u(i,["outputCompressionQuality"]);n!==void 0&&U!=null&&c(n,["parameters","outputOptions","compressionQuality"],U);const k=u(i,["addWatermark"]);n!==void 0&&k!=null&&c(n,["parameters","addWatermark"],k);const B=u(i,["labels"]);n!==void 0&&B!=null&&c(n,["labels"],B);const W=u(i,["imageSize"]);n!==void 0&&W!=null&&c(n,["parameters","sampleImageSize"],W);const P=u(i,["enhancePrompt"]);return n!==void 0&&P!=null&&c(n,["parameters","enhancePrompt"],P),o}function aE(i,n){const o={},a=u(n,["model"]);a!=null&&c(o,["_url","model"],_e(i,a));const r=u(n,["prompt"]);r!=null&&c(o,["instances[0]","prompt"],r);const d=u(n,["config"]);return d!=null&&lE(d,o),o}function sE(i,n){const o={},a=u(n,["model"]);a!=null&&c(o,["_url","model"],_e(i,a));const r=u(n,["prompt"]);r!=null&&c(o,["instances[0]","prompt"],r);const d=u(n,["config"]);return d!=null&&oE(d,o),o}function uE(i){const n={},o=u(i,["sdkHttpResponse"]);o!=null&&c(n,["sdkHttpResponse"],o);const a=u(i,["predictions"]);if(a!=null){let d=a;Array.isArray(d)&&(d=d.map(m=>SE(m))),c(n,["generatedImages"],d)}const r=u(i,["positivePromptSafetyAttributes"]);return r!=null&&c(n,["positivePromptSafetyAttributes"],bh(r)),n}function rE(i){const n={},o=u(i,["sdkHttpResponse"]);o!=null&&c(n,["sdkHttpResponse"],o);const a=u(i,["predictions"]);if(a!=null){let d=a;Array.isArray(d)&&(d=d.map(m=>Ca(m))),c(n,["generatedImages"],d)}const r=u(i,["positivePromptSafetyAttributes"]);return r!=null&&c(n,["positivePromptSafetyAttributes"],wh(r)),n}function cE(i,n){const o={},a=u(i,["numberOfVideos"]);
303if(n!==void 0&&a!=null&&c(n,["parameters","sampleCount"],a),u(i,["outputGcsUri"])!==void 0)throw new Error("outputGcsUri parameter is not supported in Gemini API.");if(u(i,["fps"])!==void 0)throw new Error("fps parameter is not supported in Gemini API.");const r=u(i,["durationSeconds"]);if(n!==void 0&&r!=null&&c(n,["parameters","durationSeconds"],r),u(i,["seed"])!==void 0)throw new Error("seed parameter is not supported in Gemini API.");const d=u(i,["aspectRatio"]);n!==void 0&&d!=null&&c(n,["parameters","aspectRatio"],d);const m=u(i,["resolution"]);n!==void 0&&m!=null&&c(n,["parameters","resolution"],m);const g=u(i,["personGeneration"]);if(n!==void 0&&g!=null&&c(n,["parameters","personGeneration"],g),u(i,["pubsubTopic"])!==void 0)throw new Error("pubsubTopic parameter is not supported in Gemini API.");const y=u(i,["negativePrompt"]);n!==void 0&&y!=null&&c(n,["parameters","negativePrompt"],y);const h=u(i,["enhancePrompt"]);if(n!==void 0&&h!=null&&c(n,["parameters","enhancePrompt"],h),u(i,["generateAudio"])!==void 0)throw new Error("generateAudio parameter is not supported in Gemini API.");const v=u(i,["lastFrame"]);n!==void 0&&v!=null&&c(n,["instances[0]","lastFrame"],Aa(v));const S=u(i,["referenceImages"]);if(n!==void 0&&S!=null){let _=S;Array.isArray(_)&&(_=_.map(x=>dC(x))),c(n,["instances[0]","referenceImages"],_)}if(u(i,["mask"])!==void 0)throw new Error("mask parameter is not supported in Gemini API.");if(u(i,["compressionQuality"])!==void 0)throw new Error("compressionQuality parameter is not supported in Gemini API.");return o}function fE(i,n){const o={},a=u(i,["numberOfVideos"]);n!==void 0&&a!=null&&c(n,["parameters","sampleCount"],a);const r=u(i,["outputGcsUri"]);n!==void 0&&r!=null&&c(n,["parameters","storageUri"],r);const d=u(i,["fps"]);n!==void 0&&d!=null&&c(n,["parameters","fps"],d);const m=u(i,["durationSeconds"]);n!==void 0&&m!=null&&c(n,["parameters","durationSeconds"],m);const g=u(i,["seed"]);n!==void 0&&g!=null&&c(n,["parameters","seed"],g);const y=u(i,["aspectRatio"]);n!==void 0&&y!=null&&c(n,["parameters","aspectRatio"],y);const h=u(i,["resolution"]);n!==void 0&&h!=null&&c(n,["parameters","resolution"],h);const v=u(i,["personGeneration"]);n!==void 0&&v!=null&&c(n,["parameters","personGeneration"],v);const S=u(i,["pubsubTopic"]);n!==void 0&&S!=null&&c(n,["parameters","pubsubTopic"],S);const _=u(i,["negativePrompt"]);n!==void 0&&_!=null&&c(n,["parameters","negativePrompt"],_);const x=u(i,["enhancePrompt"]);n!==void 0&&x!=null&&c(n,["parameters","enhancePrompt"],x);const b=u(i,["generateAudio"]);n!==void 0&&b!=null&&c(n,["parameters","generateAudio"],b);const U=u(i,["lastFrame"]);n!==void 0&&U!=null&&c(n,["instances[0]","lastFrame"],Pt(U));const k=u(i,["referenceImages"]);if(n!==void 0&&k!=null){let P=k;Array.isArray(P)&&(P=P.map(Z=>pC(Z))),c(n,["instances[0]","referenceImages"],P)}const B=u(i,["mask"]);n!==void 0&&B!=null&&c(n,["instances[0]","mask"],fC(B));const W=u(i,["compressionQuality"]);return n!==void 0&&W!=null&&c(n,["parameters","compressionQuality"],W),o}function dE(i){const n={},o=u(i,["name"]);o!=null&&c(n,["name"],o);const a=u(i,["metadata"]);a!=null&&c(n,["metadata"],a);const r=u(i,["done"]);r!=null&&c(n,["done"],r);const d=u(i,["error"]);d!=null&&c(n,["error"],d);const m=u(i,["response","generateVideoResponse"]);return m!=null&&c(n,["response"],gE(m)),n}function pE(i){const n={},o=u(i,["name"]);o!=null&&c(n,["name"],o);const a=u(i,["metadata"]);a!=null&&c(n,["metadata"],a);const r=u(i,["done"]);r!=null&&c(n,["done"],r);const d=u(i,["error"]);d!=null&&c(n,["error"],d);const m=u(i,["response"]);return m!=null&&c(n,["response"],yE(m)),n}function mE(i,n){const o={},a=u(n,["model"]);a!=null&&c(o,["_url","model"],_e(i,a));const r=u(n,["prompt"]);r!=null&&c(o,["instances[0]","prompt"],r);const d=u(n,["image"]);d!=null&&c(o,["instances[0]","image"],Aa(d));const m=u(n,["video"]);m!=null&&c(o,["instances[0]","video"],Uh(m));const g=u(n,["source"]);g!=null&&vE(g,o);const y=u(n,["config"]);return y!=null&&cE(y,o),o}function hE(i,n){const o={},a=u(n,["model"]);a!=null&&c(o,["_url","model"],_e(i,a));const r=u(n,["prompt"]);r!=null&&c(o,["instances[0]","prompt"],r);const d=u(n,["image"]);d!=null&&c(o,["instances[0]","image"],Pt(d));const m=u(n,["video"]);m!=null&&c(o,["instances[0]","video"],Lh(m));const g=u(n,["source"]);g!=null&&TE(g,o);const y=u(n,["config"]);return y!=null&&fE(y,o),o}function gE(i){const n={},o=u(i,["generatedSamples"]);if(o!=null){let d=o;Array.isArray(d)&&(d=d.map(m=>EE(m))),c(n,["generatedVideos"],d)}const a=u(i,["raiMediaFilteredCount"]);a!=null&&c(n,["raiMediaFilteredCount"],a);const r=u(i,["raiMediaFilteredReasons"]);return r!=null&&c(n,["raiMediaFilteredReasons"],r),n}function yE(i){const n={},o=u(i,["videos"]);if(o!=null){let d=o;Array.isArray(d)&&(d=d.map(m=>CE(m))),c(n,["generatedVideos"],d)}const a=u(i,["raiMediaFilteredCount"]);a!=null&&c(n,["raiMediaFilteredCount"],a);const r=u(i,["raiMediaFilteredReasons"]);return r!=null&&c(n,["raiMediaFilteredReasons"],r),n}function vE(i,n){const o={},a=u(i,["prompt"]);n!==void 0&&a!=null&&c(n,["instances[0]","prompt"],a);const r=u(i,["image"]);n!==void 0&&r!=null&&c(n,["instances[0]","image"],Aa(r));const d=u(i,["video"]);return n!==void 0&&d!=null&&c(n,["instances[0]","video"],Uh(d)),o}function TE(i,n){const o={},a=u(i,["prompt"]);n!==void 0&&a!=null&&c(n,["instances[0]","prompt"],a);const r=u(i,["image"]);n!==void 0&&r!=null&&c(n,["instances[0]","image"],Pt(r));const d=u(i,["video"]);return n!==void 0&&d!=null&&c(n,["instances[0]","video"],Lh(d)),o}function SE(i){const n={},o=u(i,["_self"]);o!=null&&c(n,["image"],DE(o));const a=u(i,["raiFilteredReason"]);a!=null&&c(n,["raiFilteredReason"],a);const r=u(i,["_self"]);return r!=null&&c(n,["safetyAttributes"],bh(r)),n}function Ca(i){const n={},o=u(i,["_self"]);o!=null&&c(n,["image"],Rh(o));const a=u(i,["raiFilteredReason"]);a!=null&&c(n,["raiFilteredReason"],a);const r=u(i,["_self"]);r!=null&&c(n,["safetyAttributes"],wh(r));const d=u(i,["prompt"]);return d!=null&&c(n,["enhancedPrompt"],d),n}function _E(i){const n={},o=u(i,["_self"]);o!=null&&c(n,["mask"],Rh(o));const a=u(i,["labels"]);if(a!=null){let r=a;Array.isArray(r)&&(r=r.map(d=>d)),c(n,["labels"],r)}return n}function EE(i){const n={},o=u(i,["video"]);return o!=null&&c(n,["video"],rC(o)),n}function CE(i){const n={},o=u(i,["_self"]);return o!=null&&c(n,["video"],cC(o)),n}function AE(i){const n={},o=u(i,["modelSelectionConfig"]);o!=null&&c(n,["modelConfig"],o);const a=u(i,["responseJsonSchema"]);a!=null&&c(n,["responseJsonSchema"],a);const r=u(i,["audioTimestamp"]);r!=null&&c(n,["audioTimestamp"],r);const d=u(i,["candidateCount"]);d!=null&&c(n,["candidateCount"],d);const m=u(i,["enableAffectiveDialog"]);m!=null&&c(n,["enableAffectiveDialog"],m);const g=u(i,["frequencyPenalty"]);g!=null&&c(n,["frequencyPenalty"],g);const y=u(i,["logprobs"]);y!=null&&c(n,["logprobs"],y);const h=u(i,["maxOutputTokens"]);h!=null&&c(n,["maxOutputTokens"],h);const v=u(i,["mediaResolution"]);v!=null&&c(n,["mediaResolution"],v);const S=u(i,["presencePenalty"]);S!=null&&c(n,["presencePenalty"],S);const _=u(i,["responseLogprobs"]);_!=null&&c(n,["responseLogprobs"],_);const x=u(i,["responseMimeType"]);x!=null&&c(n,["responseMimeType"],x);const b=u(i,["responseModalities"]);b!=null&&c(n,["responseModalities"],b);const U=u(i,["responseSchema"]);U!=null&&c(n,["responseSchema"],U);
303const k=u(i,["routingConfig"]);k!=null&&c(n,["routingConfig"],k);const B=u(i,["seed"]);B!=null&&c(n,["seed"],B);const W=u(i,["speechConfig"]);W!=null&&c(n,["speechConfig"],Dh(W));const P=u(i,["stopSequences"]);P!=null&&c(n,["stopSequences"],P);const Z=u(i,["temperature"]);Z!=null&&c(n,["temperature"],Z);const ee=u(i,["thinkingConfig"]);ee!=null&&c(n,["thinkingConfig"],ee);const te=u(i,["topK"]);te!=null&&c(n,["topK"],te);const J=u(i,["topP"]);if(J!=null&&c(n,["topP"],J),u(i,["enableEnhancedCivicAnswers"])!==void 0)throw new Error("enableEnhancedCivicAnswers parameter is not supported in Vertex AI.");return n}function xE(i,n){const o={},a=u(n,["model"]);return a!=null&&c(o,["_url","name"],_e(i,a)),o}function NE(i,n){const o={},a=u(n,["model"]);return a!=null&&c(o,["_url","name"],_e(i,a)),o}function ME(i){const n={};if(u(i,["authConfig"])!==void 0)throw new Error("authConfig parameter is not supported in Gemini API.");const o=u(i,["enableWidget"]);return o!=null&&c(n,["enableWidget"],o),n}function RE(i){const n={};if(u(i,["excludeDomains"])!==void 0)throw new Error("excludeDomains parameter is not supported in Gemini API.");if(u(i,["blockingConfidence"])!==void 0)throw new Error("blockingConfidence parameter is not supported in Gemini API.");const o=u(i,["timeRangeFilter"]);return o!=null&&c(n,["timeRangeFilter"],o),n}function bE(i){const n={},o=u(i,["aspectRatio"]);o!=null&&c(n,["aspectRatio"],o);const a=u(i,["imageSize"]);if(a!=null&&c(n,["imageSize"],a),u(i,["outputMimeType"])!==void 0)throw new Error("outputMimeType parameter is not supported in Gemini API.");if(u(i,["outputCompressionQuality"])!==void 0)throw new Error("outputCompressionQuality parameter is not supported in Gemini API.");return n}function wE(i){const n={},o=u(i,["aspectRatio"]);o!=null&&c(n,["aspectRatio"],o);const a=u(i,["imageSize"]);a!=null&&c(n,["imageSize"],a);const r=u(i,["outputMimeType"]);r!=null&&c(n,["imageOutputOptions","mimeType"],r);const d=u(i,["outputCompressionQuality"]);return d!=null&&c(n,["imageOutputOptions","compressionQuality"],d),n}function DE(i){const n={},o=u(i,["bytesBase64Encoded"]);o!=null&&c(n,["imageBytes"],Vn(o));const a=u(i,["mimeType"]);return a!=null&&c(n,["mimeType"],a),n}function Rh(i){const n={},o=u(i,["gcsUri"]);o!=null&&c(n,["gcsUri"],o);const a=u(i,["bytesBase64Encoded"]);a!=null&&c(n,["imageBytes"],Vn(a));const r=u(i,["mimeType"]);return r!=null&&c(n,["mimeType"],r),n}function Aa(i){const n={};if(u(i,["gcsUri"])!==void 0)throw new Error("gcsUri parameter is not supported in Gemini API.");const o=u(i,["imageBytes"]);o!=null&&c(n,["bytesBase64Encoded"],Vn(o));const a=u(i,["mimeType"]);return a!=null&&c(n,["mimeType"],a),n}function Pt(i){const n={},o=u(i,["gcsUri"]);o!=null&&c(n,["gcsUri"],o);const a=u(i,["imageBytes"]);a!=null&&c(n,["bytesBase64Encoded"],Vn(a));const r=u(i,["mimeType"]);return r!=null&&c(n,["mimeType"],r),n}function IE(i,n,o){const a={},r=u(n,["pageSize"]);o!==void 0&&r!=null&&c(o,["_query","pageSize"],r);const d=u(n,["pageToken"]);o!==void 0&&d!=null&&c(o,["_query","pageToken"],d);const m=u(n,["filter"]);o!==void 0&&m!=null&&c(o,["_query","filter"],m);const g=u(n,["queryBase"]);return o!==void 0&&g!=null&&c(o,["_url","models_url"],Sh(i,g)),a}function UE(i,n,o){const a={},r=u(n,["pageSize"]);o!==void 0&&r!=null&&c(o,["_query","pageSize"],r);const d=u(n,["pageToken"]);o!==void 0&&d!=null&&c(o,["_query","pageToken"],d);const m=u(n,["filter"]);o!==void 0&&m!=null&&c(o,["_query","filter"],m);const g=u(n,["queryBase"]);return o!==void 0&&g!=null&&c(o,["_url","models_url"],Sh(i,g)),a}function LE(i,n){const o={},a=u(n,["config"]);return a!=null&&IE(i,a,o),o}function qE(i,n){const o={},a=u(n,["config"]);return a!=null&&UE(i,a,o),o}function GE(i){const n={},o=u(i,["sdkHttpResponse"]);o!=null&&c(n,["sdkHttpResponse"],o);const a=u(i,["nextPageToken"]);a!=null&&c(n,["nextPageToken"],a);const r=u(i,["_self"]);if(r!=null){let d=_h(r);Array.isArray(d)&&(d=d.map(m=>ar(m))),c(n,["models"],d)}return n}function HE(i){const n={},o=u(i,["sdkHttpResponse"]);o!=null&&c(n,["sdkHttpResponse"],o);const a=u(i,["nextPageToken"]);a!=null&&c(n,["nextPageToken"],a);const r=u(i,["_self"]);if(r!=null){let d=_h(r);Array.isArray(d)&&(d=d.map(m=>sr(m))),c(n,["models"],d)}return n}function zE(i){const n={},o=u(i,["maskMode"]);o!=null&&c(n,["maskMode"],o);const a=u(i,["segmentationClasses"]);a!=null&&c(n,["maskClasses"],a);const r=u(i,["maskDilation"]);return r!=null&&c(n,["dilation"],r),n}function ar(i){const n={},o=u(i,["name"]);o!=null&&c(n,["name"],o);const a=u(i,["displayName"]);a!=null&&c(n,["displayName"],a);const r=u(i,["description"]);r!=null&&c(n,["description"],r);
303const d=u(i,["version"]);d!=null&&c(n,["version"],d);const m=u(i,["_self"]);m!=null&&c(n,["tunedModelInfo"],eC(m));const g=u(i,["inputTokenLimit"]);g!=null&&c(n,["inputTokenLimit"],g);const y=u(i,["outputTokenLimit"]);y!=null&&c(n,["outputTokenLimit"],y);const h=u(i,["supportedGenerationMethods"]);h!=null&&c(n,["supportedActions"],h);const v=u(i,["temperature"]);v!=null&&c(n,["temperature"],v);const S=u(i,["maxTemperature"]);S!=null&&c(n,["maxTemperature"],S);const _=u(i,["topP"]);_!=null&&c(n,["topP"],_);const x=u(i,["topK"]);x!=null&&c(n,["topK"],x);const b=u(i,["thinking"]);return b!=null&&c(n,["thinking"],b),n}function sr(i){const n={},o=u(i,["name"]);o!=null&&c(n,["name"],o);const a=u(i,["displayName"]);a!=null&&c(n,["displayName"],a);const r=u(i,["description"]);r!=null&&c(n,["description"],r);const d=u(i,["versionId"]);d!=null&&c(n,["version"],d);const m=u(i,["deployedModels"]);if(m!=null){let S=m;Array.isArray(S)&&(S=S.map(_=>W_(_))),c(n,["endpoints"],S)}const g=u(i,["labels"]);g!=null&&c(n,["labels"],g);const y=u(i,["_self"]);y!=null&&c(n,["tunedModelInfo"],tC(y));const h=u(i,["defaultCheckpointId"]);h!=null&&c(n,["defaultCheckpointId"],h);const v=u(i,["checkpoints"]);if(v!=null){let S=v;Array.isArray(S)&&(S=S.map(_=>_)),c(n,["checkpoints"],S)}return n}function kE(i){const n={},o=u(i,["mediaResolution"]);o!=null&&c(n,["mediaResolution"],o);const a=u(i,["codeExecutionResult"]);a!=null&&c(n,["codeExecutionResult"],a);const r=u(i,["executableCode"]);r!=null&&c(n,["executableCode"],r);const d=u(i,["fileData"]);d!=null&&c(n,["fileData"],$_(d));const m=u(i,["functionCall"]);m!=null&&c(n,["functionCall"],j_(m));const g=u(i,["functionResponse"]);g!=null&&c(n,["functionResponse"],g);const y=u(i,["inlineData"]);y!=null&&c(n,["inlineData"],A_(y));const h=u(i,["text"]);h!=null&&c(n,["text"],h);const v=u(i,["thought"]);v!=null&&c(n,["thought"],v);const S=u(i,["thoughtSignature"]);S!=null&&c(n,["thoughtSignature"],S);const _=u(i,["videoMetadata"]);return _!=null&&c(n,["videoMetadata"],_),n}function VE(i){const n={},o=u(i,["productImage"]);return o!=null&&c(n,["image"],Pt(o)),n}function PE(i,n){const o={},a=u(i,["numberOfImages"]);n!==void 0&&a!=null&&c(n,["parameters","sampleCount"],a);const r=u(i,["baseSteps"]);n!==void 0&&r!=null&&c(n,["parameters","baseSteps"],r);const d=u(i,["outputGcsUri"]);n!==void 0&&d!=null&&c(n,["parameters","storageUri"],d);const m=u(i,["seed"]);n!==void 0&&m!=null&&c(n,["parameters","seed"],m);const g=u(i,["safetyFilterLevel"]);n!==void 0&&g!=null&&c(n,["parameters","safetySetting"],g);const y=u(i,["personGeneration"]);n!==void 0&&y!=null&&c(n,["parameters","personGeneration"],y);const h=u(i,["addWatermark"]);n!==void 0&&h!=null&&c(n,["parameters","addWatermark"],h);const v=u(i,["outputMimeType"]);n!==void 0&&v!=null&&c(n,["parameters","outputOptions","mimeType"],v);const S=u(i,["outputCompressionQuality"]);n!==void 0&&S!=null&&c(n,["parameters","outputOptions","compressionQuality"],S);const _=u(i,["enhancePrompt"]);n!==void 0&&_!=null&&c(n,["parameters","enhancePrompt"],_);const x=u(i,["labels"]);return n!==void 0&&x!=null&&c(n,["labels"],x),o}function BE(i,n){const o={},a=u(n,["model"]);a!=null&&c(o,["_url","model"],_e(i,a));const r=u(n,["source"]);r!=null&&FE(r,o);const d=u(n,["config"]);return d!=null&&PE(d,o),o}function OE(i){const n={},o=u(i,["predictions"]);if(o!=null){let a=o;Array.isArray(a)&&(a=a.map(r=>Ca(r))),c(n,["generatedImages"],a)}return n}function FE(i,n){const o={},a=u(i,["prompt"]);n!==void 0&&a!=null&&c(n,["instances[0]","prompt"],a);const r=u(i,["personImage"]);n!==void 0&&r!=null&&c(n,["instances[0]","personImage","image"],Pt(r));const d=u(i,["productImages"]);if(n!==void 0&&d!=null){let m=d;Array.isArray(m)&&(m=m.map(g=>VE(g))),c(n,["instances[0]","productImages"],m)}return o}function YE(i){const n={},o=u(i,["referenceImage"]);o!=null&&c(n,["referenceImage"],Pt(o));const a=u(i,["referenceId"]);a!=null&&c(n,["referenceId"],a);const r=u(i,["referenceType"]);r!=null&&c(n,["referenceType"],r);const d=u(i,["maskImageConfig"]);d!=null&&c(n,["maskImageConfig"],zE(d));const m=u(i,["controlImageConfig"]);m!=null&&c(n,["controlImageConfig"],D_(m));const g=u(i,["styleImageConfig"]);g!=null&&c(n,["styleImageConfig"],g);const y=u(i,["subjectImageConfig"]);return y!=null&&c(n,["subjectImageConfig"],y),n}function bh(i){const n={},o=u(i,["safetyAttributes","categories"]);o!=null&&c(n,["categories"],o);const a=u(i,["safetyAttributes","scores"]);a!=null&&c(n,["scores"],a);const r=u(i,["contentType"]);return r!=null&&c(n,["contentType"],r),n}function wh(i){const n={},o=u(i,["safetyAttributes","categories"]);o!=null&&c(n,["categories"],o);const a=u(i,["safetyAttributes","scores"]);a!=null&&c(n,["scores"],a);const r=u(i,["contentType"]);return r!=null&&c(n,["contentType"],r),n}function JE(i){const n={},o=u(i,["category"]);if(o!=null&&c(n,["category"],o),u(i,["method"])!==void 0)throw new Error("method parameter is not supported in Gemini API.");const a=u(i,["threshold"]);return a!=null&&c(n,["threshold"],a),n}function KE(i){const n={},o=u(i,["image"]);return o!=null&&c(n,["image"],Pt(o)),n}function XE(i,n){const o={},a=u(i,["mode"]);n!==void 0&&a!=null&&c(n,["parameters","mode"],a);const r=u(i,["maxPredictions"]);n!==void 0&&r!=null&&c(n,["parameters","maxPredictions"],r);const d=u(i,["confidenceThreshold"]);n!==void 0&&d!=null&&c(n,["parameters","confidenceThreshold"],d);const m=u(i,["maskDilation"]);n!==void 0&&m!=null&&c(n,["parameters","maskDilation"],m);const g=u(i,["binaryColorThreshold"]);n!==void 0&&g!=null&&c(n,["parameters","binaryColorThreshold"],g);const y=u(i,["labels"]);return n!==void 0&&y!=null&&c(n,["labels"],y),o}function QE(i,n){const o={},a=u(n,["model"]);a!=null&&c(o,["_url","model"],_e(i,a));const r=u(n,["source"]);r!=null&&WE(r,o);const d=u(n,["config"]);return d!=null&&XE(d,o),o}function ZE(i){const n={},o=u(i,["predictions"]);if(o!=null){let a=o;Array.isArray(a)&&(a=a.map(r=>_E(r))),c(n,["generatedMasks"],a)}return n}function WE(i,n){const o={},a=u(i,["prompt"]);n!==void 0&&a!=null&&c(n,["instances[0]","prompt"],a);const r=u(i,["image"]);n!==void 0&&r!=null&&c(n,["instances[0]","image"],Pt(r));const d=u(i,["scribbleImage"]);return n!==void 0&&d!=null&&c(n,["instances[0]","scribble"],KE(d)),o}function Dh(i){const n={},o=u(i,["languageCode"]);o!=null&&c(n,["languageCode"],o);const a=u(i,["voiceConfig"]);if(a!=null&&c(n,["voiceConfig"],a),u(i,["multiSpeakerVoiceConfig"])!==void 0)throw new Error("multiSpeakerVoiceConfig parameter is not supported in Vertex AI.");return n}function $E(i){const n={},o=u(i,["functionCallingConfig"]);o!=null&&c(n,["functionCallingConfig"],eE(o));const a=u(i,["retrievalConfig"]);return a!=null&&c(n,["retrievalConfig"],a),n}function jE(i){const n={},o=u(i,["functionDeclarations"]);if(o!=null){let v=o;Array.isArray(v)&&(v=v.map(S=>S)),c(n,["functionDeclarations"],v)}if(u(i,["retrieval"])!==void 0)throw new Error("retrieval parameter is not supported in Gemini API.");const a=u(i,["googleSearchRetrieval"]);a!=null&&c(n,["googleSearchRetrieval"],a);const r=u(i,["computerUse"]);r!=null&&c(n,["computerUse"],r);const d=u(i,["fileSearch"]);d!=null&&c(n,["fileSearch"],d);const m=u(i,["codeExecution"]);if(m!=null&&c(n,["codeExecution"],m),u(i,["enterpriseWebSearch"])!==void 0)throw new Error("enterpriseWebSearch parameter is not supported in Gemini API.");const g=u(i,["googleMaps"]);g!=null&&c(n,["googleMaps"],ME(g));const y=u(i,["googleSearch"]);y!=null&&c(n,["googleSearch"],RE(y));const h=u(i,["urlContext"]);return h!=null&&c(n,["urlContext"],h),n}function Ih(i){const n={},o=u(i,["functionDeclarations"]);if(o!=null){let S=o;Array.isArray(S)&&(S=S.map(_=>tE(_))),c(n,["functionDeclarations"],S)}const a=u(i,["retrieval"]);a!=null&&c(n,["retrieval"],a);const r=u(i,["googleSearchRetrieval"]);r!=null&&c(n,["googleSearchRetrieval"],r);const d=u(i,["computerUse"]);if(d!=null&&c(n,["computerUse"],d),u(i,["fileSearch"])!==void 0)throw new Error("fileSearch parameter is not supported in Vertex AI.");const m=u(i,["codeExecution"]);m!=null&&c(n,["codeExecution"],m);const g=u(i,["enterpriseWebSearch"]);g!=null&&c(n,["enterpriseWebSearch"],g);const y=u(i,["googleMaps"]);y!=null&&c(n,["googleMaps"],y);const h=u(i,["googleSearch"]);h!=null&&c(n,["googleSearch"],h);const v=u(i,["urlContext"]);return v!=null&&c(n,["urlContext"],v),n}function eC(i){const n={},o=u(i,["baseModel"]);o!=null&&c(n,["baseModel"],o);const a=u(i,["createTime"]);a!=null&&c(n,["createTime"],a);const r=u(i,["updateTime"]);return r!=null&&c(n,["updateTime"],r),n}function tC(i){const n={},o=u(i,["labels","google-vertex-llm-tuning-base-model-id"]);o!=null&&c(n,["baseModel"],o);const a=u(i,["createTime"]);a!=null&&c(n,["createTime"],a);const r=u(i,["updateTime"]);return r!=null&&c(n,["updateTime"],r),n}function nC(i,n){const o={},a=u(i,["displayName"]);n!==void 0&&a!=null&&c(n,["displayName"],a);const r=u(i,["description"]);n!==void 0&&r!=null&&c(n,["description"],r);const d=u(i,["defaultCheckpointId"]);return n!==void 0&&d!=null&&c(n,["defaultCheckpointId"],d),o}function iC(i,n){const o={},a=u(i,["displayName"]);n!==void 0&&a!=null&&c(n,["displayName"],a);const r=u(i,["description"]);n!==void 0&&r!=null&&c(n,["description"],r);const d=u(i,["defaultCheckpointId"]);return n!==void 0&&d!=null&&c(n,["defaultCheckpointId"],d),o}function lC(i,n){const o={},a=u(n,["model"]);a!=null&&c(o,["_url","name"],_e(i,a));const r=u(n,["config"]);return r!=null&&nC(r,o),o}function oC(i,n){const o={},a=u(n,["model"]);a!=null&&c(o,["_url","model"],_e(i,a));const r=u(n,["config"]);return r!=null&&iC(r,o),o}function aC(i,n){const o={},a=u(i,["outputGcsUri"]);n!==void 0&&a!=null&&c(n,["parameters","storageUri"],a);const r=u(i,["safetyFilterLevel"]);n!==void 0&&r!=null&&c(n,["parameters","safetySetting"],r);const d=u(i,["personGeneration"]);n!==void 0&&d!=null&&c(n,["parameters","personGeneration"],d);const m=u(i,["includeRaiReason"]);n!==void 0&&m!=null&&c(n,["parameters","includeRaiReason"],m);const g=u(i,["outputMimeType"]);n!==void 0&&g!=null&&c(n,["parameters","outputOptions","mimeType"],g);const y=u(i,["outputCompressionQuality"]);n!==void 0&&y!=null&&c(n,["parameters","outputOptions","compressionQuality"],y);const h=u(i,["enhanceInputImage"]);n!==void 0&&h!=null&&c(n,["parameters","upscaleConfig","enhanceInputImage"],h);const v=u(i,["imagePreservationFactor"]);n!==void 0&&v!=null&&c(n,["parameters","upscaleConfig","imagePreservationFactor"],v);const S=u(i,["labels"]);n!==void 0&&S!=null&&c(n,["labels"],S);const _=u(i,["numberOfImages"]);
303n!==void 0&&_!=null&&c(n,["parameters","sampleCount"],_);const x=u(i,["mode"]);return n!==void 0&&x!=null&&c(n,["parameters","mode"],x),o}function sC(i,n){const o={},a=u(n,["model"]);a!=null&&c(o,["_url","model"],_e(i,a));const r=u(n,["image"]);r!=null&&c(o,["instances[0]","image"],Pt(r));const d=u(n,["upscaleFactor"]);d!=null&&c(o,["parameters","upscaleConfig","upscaleFactor"],d);const m=u(n,["config"]);return m!=null&&aC(m,o),o}function uC(i){const n={},o=u(i,["sdkHttpResponse"]);o!=null&&c(n,["sdkHttpResponse"],o);const a=u(i,["predictions"]);if(a!=null){let r=a;Array.isArray(r)&&(r=r.map(d=>Ca(d))),c(n,["generatedImages"],r)}return n}function rC(i){const n={},o=u(i,["uri"]);o!=null&&c(n,["uri"],o);const a=u(i,["encodedVideo"]);a!=null&&c(n,["videoBytes"],Vn(a));const r=u(i,["encoding"]);return r!=null&&c(n,["mimeType"],r),n}function cC(i){const n={},o=u(i,["gcsUri"]);o!=null&&c(n,["uri"],o);const a=u(i,["bytesBase64Encoded"]);a!=null&&c(n,["videoBytes"],Vn(a));const r=u(i,["mimeType"]);return r!=null&&c(n,["mimeType"],r),n}function fC(i){const n={},o=u(i,["image"]);o!=null&&c(n,["_self"],Pt(o));const a=u(i,["maskMode"]);return a!=null&&c(n,["maskMode"],a),n}function dC(i){const n={},o=u(i,["image"]);o!=null&&c(n,["image"],Aa(o));const a=u(i,["referenceType"]);return a!=null&&c(n,["referenceType"],a),n}function pC(i){const n={},o=u(i,["image"]);o!=null&&c(n,["image"],Pt(o));const a=u(i,["referenceType"]);return a!=null&&c(n,["referenceType"],a),n}function Uh(i){const n={},o=u(i,["uri"]);o!=null&&c(n,["uri"],o);const a=u(i,["videoBytes"]);a!=null&&c(n,["encodedVideo"],Vn(a));const r=u(i,["mimeType"]);return r!=null&&c(n,["encoding"],r),n}function Lh(i){const n={},o=u(i,["uri"]);o!=null&&c(n,["gcsUri"],o);const a=u(i,["videoBytes"]);a!=null&&c(n,["bytesBase64Encoded"],Vn(a));const r=u(i,["mimeType"]);return r!=null&&c(n,["mimeType"],r),n}/**
304 * @license
305 * Copyright 2025 Google LLC
306 * SPDX-License-Identifier: Apache-2.0
307 */const mC="Content-Type",hC="X-Server-Timeout",gC="User-Agent",ur="x-goog-api-client",yC="1.30.0",vC=`google-genai-sdk/${yC}`,TC="v1beta1",SC="v1beta",jm=/^\s*data: (.*)(?:\n\n|\r\r|\r\n\r\n)/;class _C{constructor(n){var o,a;this.clientOptions=Object.assign(Object.assign({},n),{project:n.project,location:n.location,apiKey:n.apiKey,vertexai:n.vertexai});const r={};this.clientOptions.vertexai?(r.apiVersion=(o=this.clientOptions.apiVersion)!==null&&o!==void 0?o:TC,r.baseUrl=this.baseUrlFromProjectLocation(),this.normalizeAuthParameters()):(r.apiVersion=(a=this.clientOptions.apiVersion)!==null&&a!==void 0?a:SC,r.baseUrl="https://generativelanguage.googleapis.com/"),r.headers=this.getDefaultHeaders(),this.clientOptions.httpOptions=r,n.httpOptions&&(this.clientOptions.httpOptions=this.patchHttpOptions(r,n.httpOptions))}baseUrlFromProjectLocation(){return this.clientOptions.project&&this.clientOptions.location&&this.clientOptions.location!=="global"?`https://${this.clientOptions.location}-aiplatform.googleapis.com/`:"https://aiplatform.googleapis.com/"}normalizeAuthParameters(){if(this.clientOptions.project&&this.clientOptions.location){this.clientOptions.apiKey=void 0;return}this.clientOptions.project=void 0,this.clientOptions.location=void 0}isVertexAI(){var n;return(n=this.clientOptions.vertexai)!==null&&n!==void 0?n:!1}getProject(){return this.clientOptions.project}getLocation(){return this.clientOptions.location}getApiVersion(){if(this.clientOptions.httpOptions&&this.clientOptions.httpOptions.apiVersion!==void 0)return this.clientOptions.httpOptions.apiVersion;throw new Error("API version is not set.")}getBaseUrl(){if(this.clientOptions.httpOptions&&this.clientOptions.httpOptions.baseUrl!==void 0)return this.clientOptions.httpOptions.baseUrl;throw new Error("Base URL is not set.")}getRequestUrl(){return this.getRequestUrlInternal(this.clientOptions.httpOptions)}getHeaders(){if(this.clientOptions.httpOptions&&this.clientOptions.httpOptions.headers!==void 0)return this.clientOptions.httpOptions.headers;throw new Error("Headers are not set.")}getRequestUrlInternal(n){if(!n||n.baseUrl===void 0||n.apiVersion===void 0)throw new Error("HTTP options are not correctly set.");const a=[n.baseUrl.endsWith("/")?n.baseUrl.slice(0,-1):n.baseUrl];return n.apiVersion&&n.apiVersion!==""&&a.push(n.apiVersion),a.join("/")}getBaseResourcePath(){return`projects/${this.clientOptions.project}/locations/${this.clientOptions.location}`}getApiKey(){return this.clientOptions.apiKey}getWebsocketBaseUrl(){const n=this.getBaseUrl(),o=new URL(n);return o.protocol=o.protocol=="http:"?"ws":"wss",o.toString()}setBaseUrl(n){if(this.clientOptions.httpOptions)this.clientOptions.httpOptions.baseUrl=n;else throw new Error("HTTP options are not correctly set.")}constructUrl(n,o,a){const r=[this.getRequestUrlInternal(o)];return a&&r.push(this.getBaseResourcePath()),n!==""&&r.push(n),new URL(`${r.join("/")}`)}shouldPrependVertexProjectPath(n){return!(this.clientOptions.apiKey||!this.clientOptions.vertexai||n.path.startsWith("projects/")||n.httpMethod==="GET"&&n.path.startsWith("publishers/google/models"))}async request(n){let o=this.clientOptions.httpOptions;n.httpOptions&&(o=this.patchHttpOptions(this.clientOptions.httpOptions,n.httpOptions));const a=this.shouldPrependVertexProjectPath(n),r=this.constructUrl(n.path,o,a);if(n.queryParams)for(const[m,g]of Object.entries(n.queryParams))r.searchParams.append(m,String(g));let d={};if(n.httpMethod==="GET"){if(n.body&&n.body!=="{}")throw new Error("Request body should be empty for GET request, but got non empty request body")}else d.body=n.body;return d=await this.includeExtraHttpOptionsToRequestInit(d,o,r.toString(),n.abortSignal),this.unaryApiCall(r,d,n.httpMethod)}patchHttpOptions(n,o){const a=JSON.parse(JSON.stringify(n));for(const[r,d]of Object.entries(o))typeof d=="object"?a[r]=Object.assign(Object.assign({},a[r]),d):d!==void 0&&(a[r]=d);return a}
307async requestStream(n){let o=this.clientOptions.httpOptions;n.httpOptions&&(o=this.patchHttpOptions(this.clientOptions.httpOptions,n.httpOptions));const a=this.shouldPrependVertexProjectPath(n),r=this.constructUrl(n.path,o,a);(!r.searchParams.has("alt")||r.searchParams.get("alt")!=="sse")&&r.searchParams.set("alt","sse");let d={};return d.body=n.body,d=await this.includeExtraHttpOptionsToRequestInit(d,o,r.toString(),n.abortSignal),this.streamApiCall(r,d,n.httpMethod)}async includeExtraHttpOptionsToRequestInit(n,o,a,r){if(o&&o.timeout||r){const d=new AbortController,m=d.signal;if(o.timeout&&(o==null?void 0:o.timeout)>0){const g=setTimeout(()=>d.abort(),o.timeout);g&&typeof g.unref=="function"&&g.unref()}r&&r.addEventListener("abort",()=>{d.abort()}),n.signal=m}return o&&o.extraBody!==null&&EC(n,o.extraBody),n.headers=await this.getHeadersInternal(o,a),n}async unaryApiCall(n,o,a){return this.apiCall(n.toString(),Object.assign(Object.assign({},o),{method:a})).then(async r=>(await eh(r),new ir(r))).catch(r=>{throw r instanceof Error?r:new Error(JSON.stringify(r))})}async streamApiCall(n,o,a){return this.apiCall(n.toString(),Object.assign(Object.assign({},o),{method:a})).then(async r=>(await eh(r),this.processStreamResponse(r))).catch(r=>{throw r instanceof Error?r:new Error(JSON.stringify(r))})}processStreamResponse(n){var o;return Ki(this,arguments,function*(){const r=(o=n==null?void 0:n.body)===null||o===void 0?void 0:o.getReader(),d=new TextDecoder("utf-8");if(!r)throw new Error("Response body is empty");try{let m="";for(;;){const{done:g,value:y}=yield qe(r.read());if(g){if(m.trim().length>0)throw new Error("Incomplete JSON segment at the end");break}const h=d.decode(y,{stream:!0});try{const S=JSON.parse(h);if("error"in S){const _=JSON.parse(JSON.stringify(S.error)),x=_.status,b=_.code,U=`got status: ${x}. ${JSON.stringify(S)}`;if(b>=400&&b<600)throw new _a({message:U,status:b})}}catch(S){if(S.name==="ApiError")throw S}m+=h;let v=m.match(jm);for(;v;){const S=v[1];try{const _=new Response(S,{headers:n==null?void 0:n.headers,status:n==null?void 0:n.status,statusText:n==null?void 0:n.statusText});yield yield qe(new ir(_)),m=m.slice(v[0].length),v=m.match(jm)}catch(_){throw new Error(`exception parsing stream chunk ${S}. ${_}`)}}}}finally{r.releaseLock()}})}async apiCall(n,o){return fetch(n,o).catch(a=>{throw new Error(`exception ${a} sending request`)})}getDefaultHeaders(){const n={},o=vC+" "+this.clientOptions.userAgentExtra;return n[gC]=o,n[ur]=o,n[mC]="application/json",n}async getHeadersInternal(n,o){const a=new Headers;if(n&&n.headers){for(const[r,d]of Object.entries(n.headers))a.append(r,d);n.timeout&&n.timeout>0&&a.append(hC,String(Math.ceil(n.timeout/1e3)))}return await this.clientOptions.auth.addAuthHeaders(a,o),a}getFileName(n){var o;let a="";return typeof n=="string"&&(a=n.replace(/[/\\]+$/,""),a=(o=a.split(/[/\\]/).pop())!==null&&o!==void 0?o:""),a}async uploadFile(n,o){var a;const r={};o!=null&&(r.mimeType=o.mimeType,r.name=o.name,r.displayName=o.displayName),r.name&&!r.name.startsWith("files/")&&(r.name=`files/${r.name}`);const d=this.clientOptions.uploader,m=await d.stat(n);r.sizeBytes=String(m.size);const g=(a=o==null?void 0:o.mimeType)!==null&&a!==void 0?a:m.type;if(g===void 0||g==="")throw new Error("Can not determine mimeType. Please provide mimeType in the config.");r.mimeType=g;const y={file:r},h=this.getFileName(n),v=X("upload/v1beta/files",y._url),S=await this.fetchUploadUrl(v,r.sizeBytes,r.mimeType,h,y,o==null?void 0:o.httpOptions);return d.upload(n,S,this)}async uploadFileToFileSearchStore(n,o,a){var r;const d=this.clientOptions.uploader,m=await d.stat(o),g=String(m.size),y=(r=a==null?void 0:a.mimeType)!==null&&r!==void 0?r:m.type;if(y===void 0||y==="")throw new Error("Can not determine mimeType. Please provide mimeType in the config.");const h=`upload/v1beta/${n}:uploadToFileSearchStore`,v=this.getFileName(o),S={};a!=null&&a.customMetadata&&(S.customMetadata=a.customMetadata),a!=null&&a.chunkingConfig&&(S.chunkingConfig=a.chunkingConfig);const _=await this.fetchUploadUrl(h,g,y,v,S,a==null?void 0:a.httpOptions);return d.uploadToFileSearchStore(o,_,this)}async downloadFile(n){await this.clientOptions.downloader.download(n,this)}async fetchUploadUrl(n,o,a,r,d,m){var g;let y={};m?y=m:y={apiVersion:"",headers:Object.assign({"Content-Type":"application/json","X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":`${o}`,"X-Goog-Upload-Header-Content-Type":`${a}`},r?{"X-Goog-Upload-File-Name":r}:{})};const h=await this.request({path:n,body:JSON.stringify(d),httpMethod:"POST",httpOptions:y});if(!h||!(h!=null&&h.headers))throw new Error("Server did not return an HttpResponse or the returned HttpResponse did not have headers.");const v=(g=h==null?void 0:h.headers)===null||g===void 0?void 0:g["x-goog-upload-url"];if(v===void 0)throw new Error("Failed to get upload url. Server did not return the x-google-upload-url in the headers");return v}}async function eh(i){var n;if(i===void 0)throw new Error("response is undefined");if(!i.ok){const o=i.status;let a;!((n=i.headers.get("content-type"))===null||n===void 0)&&n.includes("application/json")?a=await i.json():a={error:{message:await i.text(),code:i.status,status:i.statusText}};const r=JSON.stringify(a);throw o>=400&&o<600?new _a({message:r,status:o}):new Error(r)}}function EC(i,n){if(!n||Object.keys(n).length===0)return;if(i.body instanceof Blob){console.warn("includeExtraBodyToRequestInit: extraBody provided but current request body is a Blob. extraBody will be ignored as merging is not supported for Blob bodies.");return}let o={};
307if(typeof i.body=="string"&&i.body.length>0)try{const d=JSON.parse(i.body);if(typeof d=="object"&&d!==null&&!Array.isArray(d))o=d;else{console.warn("includeExtraBodyToRequestInit: Original request body is valid JSON but not a non-array object. Skip applying extraBody to the request body.");return}}catch{console.warn("includeExtraBodyToRequestInit: Original request body is not valid JSON. Skip applying extraBody to the request body.");return}function a(d,m){const g=Object.assign({},d);for(const y in m)if(Object.prototype.hasOwnProperty.call(m,y)){const h=m[y],v=g[y];h&&typeof h=="object"&&!Array.isArray(h)&&v&&typeof v=="object"&&!Array.isArray(v)?g[y]=a(v,h):(v&&h&&typeof v!=typeof h&&console.warn(`includeExtraBodyToRequestInit:deepMerge: Type mismatch for key "${y}". Original type: ${typeof v}, New type: ${typeof h}. Overwriting.`),g[y]=h)}return g}const r=a(o,n);i.body=JSON.stringify(r)}/**
308 * @license
309 * Copyright 2025 Google LLC
310 * SPDX-License-Identifier: Apache-2.0
311 */const CC="mcp_used/unknown";let AC=!1;function qh(i){for(const n of i)if(xC(n)||typeof n=="object"&&"inputSchema"in n)return!0;return AC}function Gh(i){var n;const o=(n=i[ur])!==null&&n!==void 0?n:"";i[ur]=(o+` ${CC}`).trimStart()}function xC(i){return i!==null&&typeof i=="object"&&i instanceof Tr}function NC(i,n=100){return Ki(this,arguments,function*(){let a,r=0;for(;r<n;){const d=yield qe(i.listTools({cursor:a}));for(const m of d.tools)yield yield qe(m),r++;if(!d.nextCursor)break;a=d.nextCursor}})}class Tr{constructor(n=[],o){this.mcpTools=[],this.functionNameToMcpClient={},this.mcpClients=n,this.config=o}static create(n,o){return new Tr(n,o)}async initialize(){var n,o,a,r;if(this.mcpTools.length>0)return;const d={},m=[];for(const v of this.mcpClients)try{for(var g=!0,y=(o=void 0,Xl(NC(v))),h;h=await y.next(),n=h.done,!n;g=!0){r=h.value,g=!1;const S=r;m.push(S);const _=S.name;if(d[_])throw new Error(`Duplicate function name ${_} found in MCP tools. Please ensure function names are unique.`);d[_]=v}}catch(S){o={error:S}}finally{try{!g&&!n&&(a=y.return)&&await a.call(y)}finally{if(o)throw o.error}}this.mcpTools=m,this.functionNameToMcpClient=d}async tool(){return await this.initialize(),vT(this.mcpTools,this.config)}async callTool(n){await this.initialize();const o=[];for(const a of n)if(a.name in this.functionNameToMcpClient){const r=this.functionNameToMcpClient[a.name];let d;this.config.timeout&&(d={timeout:this.config.timeout});const m=await r.callTool({name:a.name,arguments:a.args},void 0,d);o.push({functionResponse:{name:a.name,response:m.isError?{error:m}:m}})}return o}}/**
312 * @license
313 * Copyright 2025 Google LLC
314 * SPDX-License-Identifier: Apache-2.0
315 */async function MC(i,n,o){const a=new cT;let r;o.data instanceof Blob?r=JSON.parse(await o.data.text()):r=JSON.parse(o.data),Object.assign(a,r),n(a)}class RC{constructor(n,o,a){this.apiClient=n,this.auth=o,this.webSocketFactory=a}async connect(n){var o,a;if(this.apiClient.isVertexAI())throw new Error("Live music is not supported for Vertex AI.");console.warn("Live music generation is experimental and may change in future versions.");const r=this.apiClient.getWebsocketBaseUrl(),d=this.apiClient.getApiVersion(),m=DC(this.apiClient.getDefaultHeaders()),g=this.apiClient.getApiKey(),y=`${r}/ws/google.ai.generativelanguage.${d}.GenerativeService.BidiGenerateMusic?key=${g}`;let h=()=>{};const v=new Promise(P=>{h=P}),S=n.callbacks,_=function(){h({})},x=this.apiClient,b={onopen:_,onmessage:P=>{MC(x,S.onmessage,P)},onerror:(o=S==null?void 0:S.onerror)!==null&&o!==void 0?o:function(P){},onclose:(a=S==null?void 0:S.onclose)!==null&&a!==void 0?a:function(P){}},U=this.webSocketFactory.create(y,wC(m),b);U.connect(),await v;const W={setup:{model:_e(this.apiClient,n.model)}};return U.send(JSON.stringify(W)),new bC(U,this.apiClient)}}class bC{constructor(n,o){this.conn=n,this.apiClient=o}async setWeightedPrompts(n){if(!n.weightedPrompts||Object.keys(n.weightedPrompts).length===0)throw new Error("Weighted prompts must be set and contain at least one entry.");const o=h_(n);this.conn.send(JSON.stringify({clientContent:o}))}async setMusicGenerationConfig(n){n.musicGenerationConfig||(n.musicGenerationConfig={});const o=m_(n);this.conn.send(JSON.stringify(o))}sendPlaybackControl(n){const o={playbackControl:n};this.conn.send(JSON.stringify(o))}play(){this.sendPlaybackControl(Yi.PLAY)}pause(){this.sendPlaybackControl(Yi.PAUSE)}stop(){this.sendPlaybackControl(Yi.STOP)}resetContext(){this.sendPlaybackControl(Yi.RESET_CONTEXT)}
315close(){this.conn.close()}}function wC(i){const n={};return i.forEach((o,a)=>{n[a]=o}),n}function DC(i){const n=new Headers;for(const[o,a]of Object.entries(i))n.append(o,a);return n}/**
316 * @license
317 * Copyright 2025 Google LLC
318 * SPDX-License-Identifier: Apache-2.0
319 */const IC="FunctionResponse request must have an `id` field from the response of a ToolCall.FunctionalCalls in Google AI.";async function UC(i,n,o){const a=new rT;let r;o.data instanceof Blob?r=await o.data.text():o.data instanceof ArrayBuffer?r=new TextDecoder().decode(o.data):r=o.data;const d=JSON.parse(r);if(i.isVertexAI()){const m=v_(d);Object.assign(a,m)}else Object.assign(a,d);n(a)}class LC{constructor(n,o,a){this.apiClient=n,this.auth=o,this.webSocketFactory=a,this.music=new RC(this.apiClient,this.auth,this.webSocketFactory)}async connect(n){var o,a,r,d,m,g;if(n.config&&n.config.httpOptions)throw new Error("The Live module does not support httpOptions at request-level in LiveConnectConfig yet. Please use the client-level httpOptions configuration instead.");const y=this.apiClient.getWebsocketBaseUrl(),h=this.apiClient.getApiVersion();let v;const S=this.apiClient.getHeaders();n.config&&n.config.tools&&qh(n.config.tools)&&Gh(S);const _=zC(S);if(this.apiClient.isVertexAI())v=`${y}/ws/google.cloud.aiplatform.${h}.LlmBidiService/BidiGenerateContent`,await this.auth.addAuthHeaders(_,v);else{const F=this.apiClient.getApiKey();let Q="BidiGenerateContent",se="key";F!=null&&F.startsWith("auth_tokens/")&&(console.warn("Warning: Ephemeral token support is experimental and may change in future versions."),h!=="v1alpha"&&console.warn("Warning: The SDK's ephemeral token support is in v1alpha only. Please use const ai = new GoogleGenAI({apiKey: token.name, httpOptions: { apiVersion: 'v1alpha' }}); before session connection."),Q="BidiGenerateContentConstrained",se="access_token"),v=`${y}/ws/google.ai.generativelanguage.${h}.GenerativeService.${Q}?${se}=${F}`}let x=()=>{};const b=new Promise(F=>{x=F}),U=n.callbacks,k=function(){var F;(F=U==null?void 0:U.onopen)===null||F===void 0||F.call(U),x({})},B=this.apiClient,W={onopen:k,onmessage:F=>{UC(B,U.onmessage,F)},onerror:(o=U==null?void 0:U.onerror)!==null&&o!==void 0?o:function(F){},onclose:(a=U==null?void 0:U.onclose)!==null&&a!==void 0?a:function(F){}},P=this.webSocketFactory.create(v,HC(_),W);P.connect(),await b;let Z=_e(this.apiClient,n.model);if(this.apiClient.isVertexAI()&&Z.startsWith("publishers/")){const F=this.apiClient.getProject(),Q=this.apiClient.getLocation();Z=`projects/${F}/locations/${Q}/`+Z}let ee={};this.apiClient.isVertexAI()&&((r=n.config)===null||r===void 0?void 0:r.responseModalities)===void 0&&(n.config===void 0?n.config={responseModalities:[ya.AUDIO]}:n.config.responseModalities=[ya.AUDIO]),!((d=n.config)===null||d===void 0)&&d.generationConfig&&console.warn("Setting `LiveConnectConfig.generation_config` is deprecated, please set the fields on `LiveConnectConfig` directly. This will become an error in a future version (not before Q3 2025).");const te=(g=(m=n.config)===null||m===void 0?void 0:m.tools)!==null&&g!==void 0?g:[],J=[];for(const F of te)if(this.isCallableTool(F)){const Q=F;J.push(await Q.tool())}else J.push(F);J.length>0&&(n.config.tools=J);const O={model:Z,config:n.config,callbacks:n.callbacks};return this.apiClient.isVertexAI()?ee=p_(this.apiClient,O):ee=d_(this.apiClient,O),delete ee.config,P.send(JSON.stringify(ee)),new GC(P,this.apiClient)}isCallableTool(n){return"callTool"in n&&typeof n.callTool=="function"}}const qC={turnComplete:!0};class GC{constructor(n,o){this.conn=n,this.apiClient=o}tLiveClientContent(n,o){if(o.turns!==null&&o.turns!==void 0){let a=[];try{a=Ht(o.turns),n.isVertexAI()||(a=a.map(r=>Ea(r)))}catch{throw new Error(`Failed to parse client content "turns", type: '${typeof o.turns}'`)}return{clientContent:{turns:a,turnComplete:o.turnComplete}}}return{clientContent:{turnComplete:o.turnComplete}}}tLiveClienttToolResponse(n,o){let a=[];if(o.functionResponses==null)throw new Error("functionResponses is required.");if(Array.isArray(o.functionResponses)?a=o.functionResponses:a=[o.functionResponses],a.length===0)throw new Error("functionResponses is required.");for(const d of a){if(typeof d!="object"||d===null||!("name"in d)||!("response"in d))throw new Error(`Could not parse function response, type '${typeof d}'.`);if(!n.isVertexAI()&&!("id"in d))throw new Error(IC)}return{toolResponse:{functionResponses:a}}}sendClientContent(n){n=Object.assign(Object.assign({},qC),n);const o=this.tLiveClientContent(this.apiClient,n);this.conn.send(JSON.stringify(o))}sendRealtimeInput(n){let o={};this.apiClient.isVertexAI()?o={realtimeInput:y_(n)}:o={realtimeInput:g_(n)},this.conn.send(JSON.stringify(o))}sendToolResponse(n){if(n.functionResponses==null)throw new Error("Tool response parameters are required.");const o=this.tLiveClienttToolResponse(this.apiClient,n);this.conn.send(JSON.stringify(o))}
319close(){this.conn.close()}}function HC(i){const n={};return i.forEach((o,a)=>{n[a]=o}),n}function zC(i){const n=new Headers;for(const[o,a]of Object.entries(i))n.append(o,a);return n}/**
320 * @license
321 * Copyright 2025 Google LLC
322 * SPDX-License-Identifier: Apache-2.0
323 */const th=10;function nh(i){var n,o,a;if(!((n=i==null?void 0:i.automaticFunctionCalling)===null||n===void 0)&&n.disable)return!0;let r=!1;for(const m of(o=i==null?void 0:i.tools)!==null&&o!==void 0?o:[])if(Xi(m)){r=!0;break}if(!r)return!0;const d=(a=i==null?void 0:i.automaticFunctionCalling)===null||a===void 0?void 0:a.maximumRemoteCalls;return d&&(d<0||!Number.isInteger(d))||d==0?(console.warn("Invalid maximumRemoteCalls value provided for automatic function calling. Disabled automatic function calling. Please provide a valid integer value greater than 0. maximumRemoteCalls provided:",d),!0):!1}function Xi(i){return"callTool"in i&&typeof i.callTool=="function"}function kC(i){var n,o,a;return(a=(o=(n=i.config)===null||n===void 0?void 0:n.tools)===null||o===void 0?void 0:o.some(r=>Xi(r)))!==null&&a!==void 0?a:!1}function ih(i){var n;const o=[];return!((n=i==null?void 0:i.config)===null||n===void 0)&&n.tools&&i.c
323onfig.tools.forEach((a,r)=>{if(Xi(a))return;const d=a;d.functionDeclarations&&d.functionDeclarations.length>0&&o.push(r)}),o}function lh(i){var n;return!(!((n=i==null?void 0:i.automaticFunctionCalling)===null||n===void 0)&&n.ignoreCallHistory)}/**
324 * @license
325 * Copyright 2025 Google LLC
326 * SPDX-License-Identifier: Apache-2.0
327 */class VC extends dn{constructor(n){super(),this.apiClient=n,this.generateContent=async o=>{var a,r,d,m,g;const y=await this.processParamsMaybeAddMcpUsage(o);if(this.maybeMoveToResponseJsonSchem(o),!kC(o)||nh(o.config))return await this.generateContentInternal(y);const h=ih(o);if(h.length>0){const U=h.map(k=>`tools[${k}]`).join(", ");throw new Error(`Automatic function calling with CallableTools (or MCP objects) and basic FunctionDeclarations is not yet supported. Incompatible tools found at ${U}.`)}let v,S;const _=Ht(y.contents),x=(d=(r=(a=y.config)===null||a===void 0?void 0:a.automaticFunctionCalling)===null||r===void 0?void 0:r.maximumRemoteCalls)!==null&&d!==void 0?d:th;let b=0;for(;b<x&&(v=await this.generateContentInternal(y),!(!v.functionCalls||v.functionCalls.length===0));){const U=v.candidates[0].content,k=[];for(const B of(g=(m=o.config)===null||m===void 0?void 0:m.tools)!==null&&g!==void 0?g:[])if(Xi(B)){const P=await B.callTool(v.functionCalls);k.push(...P)}b++,S={role:"user",parts:k},y.contents=Ht(y.contents),y.contents.push(U),y.contents.push(S),lh(y.config)&&(_.push(U),_.push(S))}return lh(y.config)&&(v.automaticFunctionCallingHistory=_),v},this.generateContentStream=async o=>{var a,r,d,m,g;if(this.maybeMoveToResponseJsonSchem(o),nh(o.config)){const S=await this.processParamsMaybeAddMcpUsage(o);return await this.generateContentStreamInternal(S)}const y=ih(o);if(y.length>0){const S=y.map(_=>`tools[${_}]`).join(", ");throw new Error(`Incompatible tools found at ${S}. Automatic function calling with CallableTools (or MCP objects) and basic FunctionDeclarations" is not yet supported.`)}const h=(d=(r=(a=o==null?void 0:o.config)===null||a===void 0?void 0:a.toolConfig)===null||r===void 0?void 0:r.functionCallingConfig)===null||d===void 0?void 0:d.streamFunctionCallArguments,v=(g=(m=o==null?void 0:o.config)===null||m===void 0?void 0:m.automaticFunctionCalling)===null||g===void 0?void 0:g.disable;if(h&&!v)throw new Error("Running in streaming mode with 'streamFunctionCallArguments' enabled, this feature is not compatible with automatic function calling (AFC). Please set 'config.automaticFunctionCalling.disable' to true to disable AFC or leave 'config.toolConfig.functionCallingConfig.streamFunctionCallArguments' to be undefined or set to false to disable streaming function call arguments feature.");return await this.processAfcStream(o)},this.generateImages=async o=>await this.generateImagesInternal(o).then(a=>{var r;let d;const m=[];if(a!=null&&a.generatedImages)for(const y of a.generatedImages)y&&(y!=null&&y.safetyAttributes)&&((r=y==null?void 0:y.safetyAttributes)===null||r===void 0?void 0:r.contentType)==="Positive Prompt"?d=y==null?void 0:y.safetyAttributes:m.push(y);let g;return d?g={generatedImages:m,positivePromptSafetyAttributes:d,sdkHttpResponse:a.sdkHttpResponse}:g={generatedImages:m,sdkHttpResponse:a.sdkHttpResponse},g}),this.list=async o=>{var a;const m={config:Object.assign(Object.assign({},{queryBase:!0}),o==null?void 0:o.config)};if(this.apiClient.isVertexAI()&&!m.config.queryBase){if(!((a=m.config)===null||a===void 0)&&a.filter)throw new Error("Filtering tuned models list for Vertex AI is not currently supported");m.config.filter="labels.tune-type:*"}return new ai(fn.PAGED_ITEM_MODELS,g=>this.listInternal(g),await this.listInternal(m),m)},this.editImage=async o=>{const a={model:o.model,prompt:o.prompt,referenceImages:[],config:o.config};return o.referenceImages&&o.referenceImages&&(a.referenceImages=o.referenceImages.map(r=>r.toReferenceImageAPI())),await this.editImageInternal(a)},this.upscaleImage=async o=>{let a={numberOfImages:1,mode:"upscale"};o.config&&(a=Object.assign(Object.assign({},a),o.config));const r={model:o.model,image:o.image,upscaleFactor:o.upscaleFactor,config:a};return await this.upscaleImageInternal(r)},this.generateVideos=async o=>{var a,r,d,m,g,y;if((o.prompt||o.image||o.video)&&o.source)throw new Error("Source and prompt/image/video are mutually exclusive. Please only use source.");return this.apiClient.isVertexAI()||(!((a=o.video)===null||a===void 0)&&a.uri&&
327(!((r=o.video)===null||r===void 0)&&r.videoBytes)?o.video={uri:o.video.uri,mimeType:o.video.mimeType}:!((m=(d=o.source)===null||d===void 0?void 0:d.video)===null||m===void 0)&&m.uri&&(!((y=(g=o.source)===null||g===void 0?void 0:g.video)===null||y===void 0)&&y.videoBytes)&&(o.source.video={uri:o.source.video.uri,mimeType:o.source.video.mimeType})),await this.generateVideosInternal(o)}}maybeMoveToResponseJsonSchem(n){n.config&&n.config.responseSchema&&(n.config.responseJsonSchema||Object.keys(n.config.responseSchema).includes("$schema")&&(n.config.responseJsonSchema=n.config.responseSchema,delete n.config.responseSchema))}async processParamsMaybeAddMcpUsage(n){var o,a,r;const d=(o=n.config)===null||o===void 0?void 0:o.tools;if(!d)return n;const m=await Promise.all(d.map(async y=>Xi(y)?await y.tool():y)),g={model:n.model,contents:n.contents,config:Object.assign(Object.assign({},n.config),{tools:m})};if(g.config.tools=m,n.config&&n.config.tools&&qh(n.config.tools)){const y=(r=(a=n.config.httpOptions)===null||a===void 0?void 0:a.headers)!==null&&r!==void 0?r:{};let h=Object.assign({},y);Object.keys(h).length===0&&(h=this.apiClient.getDefaultHeaders()),Gh(h),g.config.httpOptions=Object.assign(Object.assign({},n.config.httpOptions),{headers:h})}return g}async initAfcToolsMap(n){var o,a,r;const d=new Map;for(const m of(a=(o=n.config)===null||o===void 0?void 0:o.tools)!==null&&a!==void 0?a:[])if(Xi(m)){const g=m,y=await g.tool();for(const h of(r=y.functionDeclarations)!==null&&r!==void 0?r:[]){if(!h.name)throw new Error("Function declaration name is required.");if(d.has(h.name))throw new Error(`Duplicate tool declaration name: ${h.name}`);d.set(h.name,g)}}return d}async processAfcStream(n){var o,a,r;const d=(r=(a=(o=n.config)===null||o===void 0?void 0:o.automaticFunctionCalling)===null||a===void 0?void 0:a.maximumRemoteCalls)!==null&&r!==void 0?r:th;let m=!1,g=0;const y=await this.initAfcToolsMap(n);return(function(h,v,S){var _,x;return Ki(this,arguments,function*(){for(var b,U,k,B;g<d;){m&&(g++,m=!1);const ee=yield qe(h.processParamsMaybeAddMcpUsage(S)),te=yield qe(h.generateContentStreamInternal(ee)),J=[],O=[];try{for(var W=!0,P=(U=void 0,Xl(te)),Z;Z=yield qe(P.next()),b=Z.done,!b;W=!0){B=Z.value,W=!1;const F=B;if(yield yield qe(F),F.candidates&&(!((_=F.candidates[0])===null||_===void 0)&&_.content)){O.push(F.candidates[0].content);for(const Q of(x=F.candidates[0].content.parts)!==null&&x!==void 0?x:[])if(g<d&&Q.functionCall){if(!Q.functionCall.name)throw new Error("Function call name was not returned by the model.");if(v.has(Q.functionCall.name)){const se=yield qe(v.get(Q.functionCall.name).callTool([Q.functionCall]));J.push(...se)}else throw new Error(`Automatic function calling was requested, but not all the tools the model used implement the CallableTool interface. Available tools: ${v.keys()}, mising tool: ${Q.functionCall.name}`)}}}}catch(F){U={error:F}}finally{try{!W&&!b&&(k=P.return)&&(yield qe(k.call(P)))}finally{if(U)throw U.error}}if(J.length>0){m=!0;const F=new Kl;F.candidates=[{content:{role:"user",parts:J}}],yield yield qe(F);const Q=[];Q.push(...O),Q.push({role:"user",parts:J});const se=Ht(S.contents).concat(Q);S.contents=se}else break}})})(this,y,n)}async generateContentInternal(n){var o,a,r,d;let m,g="",y={};if(this.apiClient.isVertexAI()){const h=Zm(this.apiClient,n);return g=X("{model}:generateContent",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),m.then(v=>{const S=$m(v),_=new Kl;return Object.assign(_,S),_})}else{const h=Qm(this.apiClient,n);return g=X("{model}:generateContent",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(d=n.config)===null||d===void 0?void 0:d.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),m.then(v=>{const S=Wm(v),_=new Kl;return Object.assign(_,S),_})}}async generateContentStreamInternal(n){var o,a,r,d;let m,g="",y={};if(this.apiClient.isVertexAI()){const h=Zm(this.apiClient,n);return g=X("{model}:streamGenerateContent?alt=sse",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.requestStream({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}),m.then(function(S){return Ki(this,arguments,function*(){var _,x,b,U;try{for(var k=!0,B=Xl(S),W;W=yield qe(B.next()),_=W.done,!_;k=!0){U=W.value,k=!1;const P=U,Z=$m(yield qe(P.json()));Z.sdkHttpResponse={headers:P.headers};const ee=new Kl;Object.assign(ee,Z),yield yield qe(ee)}}catch(P){x={error:P}}finally{try{!k&&!_&&(b=B.return)&&(yield qe(b.call(B)))}finally{if(x)throw x.error}}})})}else{const h=Qm(this.apiClient,n);return g=X("{model}:streamGenerateContent?alt=sse",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.requestStream({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(d=n.config)===null||d===void 0?void 0:d.abortSignal}),m.then(function(S){return Ki(this,arguments,function*(){var _,x,b,U;try{for(var k=!0,B=Xl(S),W;W=yield qe(B.next()),_=W.done,!_;k=!0){U=W.value,k=!1;const P=U,Z=Wm(yield qe(P.json()));Z.sdkHttpResponse={headers:P.headers};const ee=new Kl;Object.assign(ee,Z),yield yield qe(ee)}}catch(P){x={error:P}}finally{try{!k&&!_&&(b=B.return)&&(yield qe(b.call(B)))}finally{if(x)throw x.error}}})})}}async embedContent(n){var o,a,r,d;let m,g="",y={};if(this.apiClient.isVertexAI()){const h=X_(this.apiClient,n);return g=X("{model}:predict",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),m.then(v=>{const S=Z_(v),_=new Um;return Object.assign(_,S),_})}else{const h=K_(this.apiClient,n);return g=X("{model}:batchEmbedContents",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(d=n.config)===null||d===void 0?void 0:d.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),m.then(v=>{const S=Q_(v),_=new Um;return Object.assign(_,S),_})}}async generateImagesInternal(n){var o,a,r,d;let m,g="",y={};if(this.apiClient.isVertexAI()){const h=sE(this.apiClient,n);return g=X("{model}:predict",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),m.then(v=>{const S=rE(v),_=new Lm;return Object.assign(_,S),_})}else{const h=aE(this.apiClient,n);return g=X("{model}:predict",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(d=n.config)===null||d===void 0?void 0:d.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),m.then(v=>{const S=uE(v),_=new Lm;return Object.assign(_,S),_})}}async editImageInternal(n){var o,a;let r,d="",m={};if(this.apiClient.isVertexAI()){const g=O_(this.apiClient,n);return d=X("{model}:predict",g._url),m=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:d,queryParams:m,body:JSON.stringify(g),httpMethod:"POST",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(y=>y.json().then(h=>{const v=h;return v.sdkHttpResponse={headers:y.headers},v})),r.then(y=>{const h=F_(y),v=new $v;return Object.assign(v,h),v})}else throw new Error("This method is only supported by the Vertex AI.")}async upscaleImageInternal(n){var o,a;let r,d="",m={};if(this.apiClient.isVertexAI()){const g=sC(this.apiClient,n);return d=X("{model}:predict",g._url),m=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:d,queryParams:m,body:JSON.stringify(g),httpMethod:"POST",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(y=>y.json().then(h=>{const v=h;return v.sdkHttpResponse={headers:y.headers},v})),r.then(y=>{const h=uC(y),v=new jv;return Object.assign(v,h),v})}else throw new Error("This method is only supported by the Vertex AI.")}async recontextImage(n){var o,a;let r,d="",m={};if(this.apiClient.isVertexAI()){const g=BE(this.apiClient,n);return d=X("{model}:predict",g._url),m=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:d,queryParams:m,body:JSON.stringify(g),httpMethod:"POST",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(y=>y.json()),r.then(y=>{const h=OE(y),v=new eT;return Object.assign(v,h),v})}else throw new Error("This method is only supported by the Vertex AI.")}async segmentImage(n){var o,a;let r,d="",m={};if(this.apiClient.isVertexAI()){const g=QE(this.apiClient,n);return d=X("{model}:predict",g._url),m=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:d,queryParams:m,body:JSON.stringify(g),httpMethod:"POST",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(y=>y.json()),r.then(y=>{const h=ZE(y),v=new tT;return Object.assign(v,h),v})}else throw new Error("This method is only supported by the Vertex AI.")}async get(n){var o,a,r,d;let m,g="",y={};if(this.apiClient.isVertexAI()){const h=NE(this.apiClient,n);return g=X("{name}",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(v=>v.json()),m.then(v=>sr(v))}else{const h=xE(this.apiClient,n);return g=X("{name}",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(d=n.config)===null||d===void 0?void 0:d.abortSignal}).then(v=>v.json()),m.then(v=>ar(v))}}async listInternal(n){var o,a,r,d;let m,g="",y={};if(this.apiClient.isVertexAI()){const h=qE(this.apiClient,n);return g=X("{models_url}",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),m.then(v=>{const S=HE(v),_=new qm;return Object.assign(_,S),_})}else{const h=LE(this.apiClient,n);return g=X("{models_url}",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(d=n.config)===null||d===void 0?void 0:d.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),m.then(v=>{const S=GE(v),_=new qm;return Object.assign(_,S),_})}}async update(n){var o,a,r,d;let m,g="",y={};if(this.apiClient.isVertexAI()){const h=oC(this.apiClient,n);return g=X("{model}",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"PATCH",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(v=>v.json()),m.then(v=>sr(v))}else{const h=lC(this.apiClient,n);return g=X("{name}",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"PATCH",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(d=n.config)===null||d===void 0?void 0:d.abortSignal}).then(v=>v.json()),m.then(v=>ar(v))}}async delete(n){var o,a,r,d;let m,g="",y={};if(this.apiClient.isVertexAI()){const h=k_(this.apiClient,n);return g=X("{name}",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"DELETE",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),m.then(v=>{const S=P_(v),_=new Gm;return Object.assign(_,S),_})}else{const h=z_(this.apiClient,n);return g=X("{name}",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"DELETE",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(d=n.config)===null||d===void 0?void 0:d.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),m.then(v=>{const S=V_(v),_=new Gm;return Object.assign(_,S),_})}}async countTokens(n){var o,a,r,d;let m,g="",y={};if(this.apiClient.isVertexAI()){const h=q_(this.apiClient,n);return g=X("{model}:countTokens",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),m.then(v=>{const S=H_(v),_=new Hm;return Object.assign(_,S),_})}else{const h=L_(this.apiClient,n);return g=X("{model}:countTokens",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(d=n.config)===null||d===void 0?void 0:d.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),m.then(v=>{const S=G_(v),_=new Hm;return Object.assign(_,S),_})}}async computeTokens(n){var o,a;let r,d="",m={};if(this.apiClient.isVertexAI()){const g=M_(this.apiClient,n);return d=X("{model}:computeTokens",g._url),m=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:d,queryParams:m,body:JSON.stringify(g),httpMethod:"POST",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(y=>y.json().then(h=>{const v=h;return v.sdkHttpResponse={headers:y.headers},v})),r.then(y=>{const h=R_(y),v=new nT;return Object.assign(v,h),v})}else throw new Error("This method is only supported by the Vertex AI.")}async generateVideosInternal(n){var o,a,r,d;let m,g="",y={};if(this.apiClient.isVertexAI()){const h=hE(this.apiClient,n);return g=X("{model}:predictLongRunning",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(v=>v.json()),m.then(v=>{const S=pE(v),_=new va;return Object.assign(_,S),_})}else{const h=mE(this.apiClient,n);return g=X("{model}:predictLongRunning",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(
327h),httpMethod:"POST",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(d=n.config)===null||d===void 0?void 0:d.abortSignal}).then(v=>v.json()),m.then(v=>{const S=dE(v),_=new va;return Object.assign(_,S),_})}}}/**
328 * @license
329 * Copyright 2025 Google LLC
330 * SPDX-License-Identifier: Apache-2.0
331 */class PC extends dn{constructor(n){super(),this.apiClient=n}async getVideosOperation(n){const o=n.operation,a=n.config;if(o.name===void 0||o.name==="")throw new Error("Operation name is required.");if(this.apiClient.isVertexAI()){const r=o.name.split("/operations/")[0];let d;a&&"httpOptions"in a&&(d=a.httpOptions);const m=await this.fetchPredictVideosOperationInternal({operationName:o.name,resourceName:r,config:{httpOptions:d}});return o._fromAPIResponse({apiResponse:m,_isVertexAI:!0})}else{const r=await this.getVideosOperationInternal({operationName:o.name,config:a});return o._fromAPIResponse({apiResponse:r,_isVertexAI:!1})}}async get(n){const o=n.operation,a=n.config;if(o.name===void 0||o.name==="")throw new Error("Operation name is required.");if(this.apiClient.isVertexAI()){const r=o.name.split("/operations/")[0];let d;a&&"httpOptions"in a&&(d=a.httpOptions);const m=await this.fetchPredictVideosOperationInternal({operationName:o.name,resourceName:r,config:{httpOptions:d}});return o._fromAPIResponse({apiResponse:m,_isVertexAI:!0})}else{const r=await this.getVideosOperationInternal({operationName:o.name,config:a});return o._fromAPIResponse({apiResponse:r,_isVertexAI:!1})}}async getVideosOperationInternal(n){var o,a,r,d;let m,g="",y={};if(this.apiClient.isVertexAI()){const h=Jv(n);return g=X("{operationName}",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(v=>v.json()),m}else{const h=Yv(n);return g=X("{operationName}",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(d=n.config)===null||d===void 0?void 0:d.abortSignal}).then(v=>v.json()),m}}async fetchPredictVideosOperationInternal(n){var o,a;let r,d="",m={};if(this.apiClient.isVertexAI()){const g=zv(n);return d=X("{resourceName}:fetchPredictOperation",g._url),m=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:d,queryParams:m,body:JSON.stringify(g),httpMethod:"POST",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(y=>y.json()),r}else throw new Error("This method is only supported by the Vertex AI.")}}/**
332 * @license
333 * Copyright 2025 Google LLC
334 * SPDX-License-Identifier: Apache-2.0
335 */function BC(i){const n={},o=u(i,["data"]);if(o!=null&&c(n,["data"],o),u(i,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const a=u(i,["mimeType"]);return a!=null&&c(n,["mimeType"],a),n}function OC(i){const n={},o=u(i,["parts"]);if(o!=null){let r=o;Array.isArray(r)&&(r=r.map(d=>$C(d))),c(n,["parts"],r)}const a=u(i,["role"]);return a!=null&&c(n,["role"],a),n}function FC(i,n,o){const a={},r=u(n,["expireTime"]);o!==void 0&&r!=null&&c(o,["expireTime"],r);const d=u(n,["newSessionExpireTime"]);o!==void 0&&d!=null&&c(o,["newSessionExpireTime"],d);const m=u(n,["uses"]);o!==void 0&&m!=null&&c(o,["uses"],m);const g=u(n,["liveConnectConstraints"]);o!==void 0&&g!=null&&c(o,["bidiGenerateContentSetup"],WC(i,g));const y=u(n,["lockAdditionalFields"]);return o!==void 0&&y!=null&&c(o,["fieldMask"],y),a}function YC(i,n){const o={},a=u(n,["config"]);return a!=null&&c(o,["config"],FC(i,a,o)),o}function JC(i){const n={};if(u(i,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const o=u(i,["fileUri"]);o!=null&&c(n,["fileUri"],o);const a=u(i,["mimeType"]);return a!=null&&c(n,["mimeType"],a),n}function KC(i){const n={},o=u(i,["id"]);o!=null&&c(n,["id"],o);const a=u(i,["args"]);a!=null&&c(n,["args"],a);const r=u(i,["name"]);if(r!=null&&c(n,["name"],r),u(i,["partialArgs"])!==void 0)throw new Error("partialArgs parameter is not supported in Gemini API.");if(u(i,["willContinue"])!==void 0)throw new Error("willContinue parameter is not supported in Gemini API.");return n}function XC(i){const n={};if(u(i,["authConfig"])!==void 0)throw new Error("authConfig parameter is not supported in Gemini API.");const o=u(i,["enableWidget"]);return o!=null&&c(n,["enableWidget"],o),n}function QC(i){const n={};if(u(i,["excludeDomains"])!==void 0)throw new Error("excludeDomains parameter is not supported in Gemini API.");if(u(i,["blockingConfidence"])!==void 0)throw new Error("blockingConfidence parameter is not supported in Gemini API.");const o=u(i,["timeRangeFilter"]);return o!=null&&c(n,["timeRangeFilter"],o),n}function ZC(i,n){const o={},a=u(i,["generationConfig"]);n!==void 0&&a!=null&&c(n,["setup","generationConfig"],a);const r=u(i,["responseModalities"]);n!==void 0&&r!=null&&c(n,["setup","generationConfig","responseModalities"],r);const d=u(i,["temperature"]);n!==void 0&&d!=null&&c(n,["setup","generationConfig","temperature"],d);const m=u(i,["topP"]);n!==void 0&&m!=null&&c(n,["setup","generationConfig","topP"],m);const g=u(i,["topK"]);n!==void 0&&g!=null&&c(n,["setup","generationConfig","topK"],g);const y=u(i,["maxOutputTokens"]);n!==void 0&&y!=null&&c(n,["setup","generationConfig","maxOutputTokens"],y);const h=u(i,["mediaResolution"]);n!==void 0&&h!=null&&c(n,["setup","generationConfig","mediaResolution"],h);const v=u(i,["seed"]);n!==void 0&&v!=null&&c(n,["setup","generationConfig","seed"],v);const S=u(i,["speechConfig"]);n!==void 0&&S!=null&&c(n,["setup","generationConfig","speechConfig"],vr(S));const _=u(i,["thinkingConfig"]);n!==void 0&&_!=null&&c(n,["setup","generationConfig","thinkingConfig"],_);const x=u(i,["enableAffectiveDialog"]);n!==void 0&&x!=null&&c(n,["setup","generationConfig","enableAffectiveDialog"],x);const b=u(i,["systemInstruction"]);n!==void 0&&b!=null&&c(n,["setup","systemInstruction"],OC(it(b)));const U=u(i,["tools"]);if(n!==void 0&&U!=null){let te=Zi(U);Array.isArray(te)&&(te=te.map(J=>
335eA(Qi(J)))),c(n,["setup","tools"],te)}const k=u(i,["sessionResumption"]);n!==void 0&&k!=null&&c(n,["setup","sessionResumption"],jC(k));const B=u(i,["inputAudioTranscription"]);n!==void 0&&B!=null&&c(n,["setup","inputAudioTranscription"],B);const W=u(i,["outputAudioTranscription"]);n!==void 0&&W!=null&&c(n,["setup","outputAudioTranscription"],W);const P=u(i,["realtimeInputConfig"]);n!==void 0&&P!=null&&c(n,["setup","realtimeInputConfig"],P);const Z=u(i,["contextWindowCompression"]);n!==void 0&&Z!=null&&c(n,["setup","contextWindowCompression"],Z);const ee=u(i,["proactivity"]);return n!==void 0&&ee!=null&&c(n,["setup","proactivity"],ee),o}function WC(i,n){const o={},a=u(n,["model"]);a!=null&&c(o,["setup","model"],_e(i,a));const r=u(n,["config"]);return r!=null&&c(o,["config"],ZC(r,o)),o}function $C(i){const n={},o=u(i,["mediaResolution"]);o!=null&&c(n,["mediaResolution"],o);const a=u(i,["codeExecutionResult"]);a!=null&&c(n,["codeExecutionResult"],a);const r=u(i,["executableCode"]);r!=null&&c(n,["executableCode"],r);const d=u(i,["fileData"]);d!=null&&c(n,["fileData"],JC(d));const m=u(i,["functionCall"]);m!=null&&c(n,["functionCall"],KC(m));const g=u(i,["functionResponse"]);g!=null&&c(n,["functionResponse"],g);const y=u(i,["inlineData"]);y!=null&&c(n,["inlineData"],BC(y));const h=u(i,["text"]);h!=null&&c(n,["text"],h);const v=u(i,["thought"]);v!=null&&c(n,["thought"],v);const S=u(i,["thoughtSignature"]);S!=null&&c(n,["thoughtSignature"],S);const _=u(i,["videoMetadata"]);return _!=null&&c(n,["videoMetadata"],_),n}function jC(i){const n={},o=u(i,["handle"]);if(o!=null&&c(n,["handle"],o),u(i,["transparent"])!==void 0)throw new Error("transparent parameter is not supported in Gemini API.");return n}function eA(i){const n={},o=u(i,["functionDeclarations"]);if(o!=null){let v=o;Array.isArray(v)&&(v=v.map(S=>S)),c(n,["functionDeclarations"],v)}if(u(i,["retrieval"])!==void 0)throw new Error("retrieval parameter is not supported in Gemini API.");const a=u(i,["googleSearchRetrieval"]);a!=null&&c(n,["googleSearchRetrieval"],a);const r=u(i,["computerUse"]);r!=null&&c(n,["computerUse"],r);const d=u(i,["fileSearch"]);d!=null&&c(n,["fileSearch"],d);const m=u(i,["codeExecution"]);if(m!=null&&c(n,["codeExecution"],m),u(i,["enterpriseWebSearch"])!==void 0)throw new Error("enterpriseWebSearch parameter is not supported in Gemini API.");const g=u(i,["googleMaps"]);g!=null&&c(n,["googleMaps"],XC(g));const y=u(i,["googleSearch"]);y!=null&&c(n,["googleSearch"],QC(y));const h=u(i,["urlContext"]);return h!=null&&c(n,["urlContext"],h),n}/**
336 * @license
337 * Copyright 2025 Google LLC
338 * SPDX-License-Identifier: Apache-2.0
339 */function tA(i){const n=[];for(const o in i)if(Object.prototype.hasOwnProperty.call(i,o)){const a=i[o];if(typeof a=="object"&&a!=null&&Object.keys(a).length>0){const r=Object.keys(a).map(d=>`${o}.${d}`);n.push(...r)}else n.push(o)}return n.join(",")}function nA(i,n){let o=null;const a=i.bidiGenerateContentSetup;if(typeof a=="object"&&a!==null&&"setup"in a){const d=a.setup;typeof d=="object"&&d!==null?(i.bidiGenerateContentSetup=d,o=d):delete i.bidiGenerateContentSetup}else a!==void 0&&delete i.bidiGenerateContentSetup;const r=i.fieldMask;if(o){const d=tA(o);if(Array.isArray(n==null?void 0:n.lockAdditionalFields)&&(n==null?void 0:n.lockAdditionalFields.length)===0)d?i.fieldMask=d:delete i.fieldMask;else if(n!=null&&n.lockAdditionalFields&&n.lockAdditionalFields.length>0&&r!==null&&Array.isArray(r)&&r.length>0){const m=["temperature","topK","topP","maxOutputTokens","responseModalities","seed","speechConfig"];let g=[];r.length>0&&(g=r.map(h=>m.includes(h)?`generationConfig.${h}`:h));const y=[];d&&y.push(d),g.length>0&&y.push(...g),y.length>0?i.fieldMask=y.join(","):delete i.fieldMask}else delete i.fieldMask}else r!==null&&Array.isArray(r)&&r.length>0?i.fieldMask=r.join(","):delete i.fieldMask;return i}class iA extends dn{constructor(n){super(),this.apiClient=n}async create(n){var o,a;let r,d="",m={};if(this.apiClient.isVertexAI())throw new Error("The client.tokens.create method is only supported by the Gemini Developer API.");{const g=YC(this.apiClient,n);d=X("auth_tokens",g._url),m=g._query,delete g.config,delete g._url,delete g._query;const y=nA(g,n.config);return r=this.apiClient.request({path:d,queryParams:m,body:JSON.stringify(y),httpMethod:"POST",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(h=>h.json()),r.then(h=>h)}}}/**
340 * @license
341 * Copyright 2025 Google LLC
342 * SPDX-License-Identifier: Apache-2.0
343 */function lA(i,n){const o={},a=u(i,["displayName"]);return n!==void 0&&a!=null&&c(n,["displayName"],a),o}function oA(i){const n={},o=u(i,["config"]);return o!=null&&lA(o,n),n}function aA(i,n){const o={},a=u(i,["force"]);return n!==void 0&&a!=null&&c(n,["_query","force"],a),o}function sA(i){const n={},o=u(i,["name"]);o!=null&&c(n,["_url","name"],o);const a=u(i,["config"]);return a!=null&&aA(a,n),n}function uA(i){const n={},o=u(i,["name"]);return o!=null&&c(n,["_url","name"],o),n}function rA(i,n){const o={},a=u(i,["customMetadata"]);if(n!==void 0&&a!=null){let d=a;Array.isArray(d)&&(d=d.map(m=>m)),c(n,["customMetadata"],d)}const r=u(i,["chunkingConfig"]);return n!==void 0&&r!=null&&c(n,["chunkingConfig"],r),o}function cA(i){const n={},o=u(i,["name"]);o!=null&&c(n,["name"],o);const a=u(i,["metadata"]);a!=null&&c(n,["metadata"],a);const r=u(i,["done"]);r!=null&&c(n,["done"],r);const d=u(i,["error"]);d!=null&&c(n,["error"],d);const m=u(i,["response"]);return m!=null&&c(n,["response"],dA(m)),n}function fA(i){const n={},o=u(i,["fileSearchStoreName"]);o!=null&&c(n,["_url","file_search_store_name"],o);const a=u(i,["fileName"]);a!=null&&c(n,["fileName"],a);const r=u(i,["config"]);return r!=null&&rA(r,n),n}function dA(i){const n={},o=u(i,["sdkHttpResponse"]);o!=null&&c(n,["sdkHttpResponse"],o);const a=u(i,["parent"]);a!=null&&c(n,["parent"],a);const r=u(i,["documentName"]);return r!=null&&c(n,["documentName"],r),n}function pA(i,n){const o={},a=u(i,["pageSize"]);n!==void 0&&a!=null&&c(n,["_query","pageSize"],a);const r=u(i,["pageToken"]);return n!==void 0&&r!=null&&c(n,["_query","pageToken"],r),o}function mA(i){const n={},o=u(i,["config"]);return o!=null&&pA(o,n),n}function hA(i){const n={},o=u(i,["sdkHttpResponse"]);o!=null&&c(n,["sdkHttpResponse"],o);const a=u(i,["nextPageToken"]);a!=null&&c(n,["nextPageToken"],a);const r=u(i,["fileSearchStores"]);if(r!=null){let d=r;Array.isArray(d)&&(d=d.map(m=>m)),c(n,["fileSearchStores"],d)}return n}function gA(i,n){const o={},a=u(i,["mimeType"]);n!==void 0&&a!=null&&c(n,["mimeType"],a);const r=u(i,["displayName"]);n!==void 0&&r!=null&&c(n,["displayName"],r);const d=u(i,["customMetadata"]);if(n!==void 0&&d!=null){let g=d;Array.isArray(g)&&(g=g.map(y=>y)),c(n,["customMetadata"],g)}const m=u(i,["chunkingConfig"]);return n!==void 0&&m!=null&&c(n,["chunkingConfig"],m),o}
343function yA(i){const n={},o=u(i,["fileSearchStoreName"]);o!=null&&c(n,["_url","file_search_store_name"],o);const a=u(i,["config"]);return a!=null&&gA(a,n),n}function vA(i){const n={},o=u(i,["sdkHttpResponse"]);return o!=null&&c(n,["sdkHttpResponse"],o),n}/**
344 * @license
345 * Copyright 2025 Google LLC
346 * SPDX-License-Identifier: Apache-2.0
347 */function TA(i,n){const o={},a=u(i,["force"]);return n!==void 0&&a!=null&&c(n,["_query","force"],a),o}function SA(i){const n={},o=u(i,["name"]);o!=null&&c(n,["_url","name"],o);const a=u(i,["config"]);return a!=null&&TA(a,n),n}function _A(i){const n={},o=u(i,["name"]);return o!=null&&c(n,["_url","name"],o),n}function EA(i,n){const o={},a=u(i,["pageSize"]);n!==void 0&&a!=null&&c(n,["_query","pageSize"],a);const r=u(i,["pageToken"]);return n!==void 0&&r!=null&&c(n,["_query","pageToken"],r),o}function CA(i){const n={},o=u(i,["parent"]);o!=null&&c(n,["_url","parent"],o);const a=u(i,["config"]);return a!=null&&EA(a,n),n}function AA(i){const n={},o=u(i,["sdkHttpResponse"]);o!=null&&c(n,["sdkHttpResponse"],o);const a=u(i,["nextPageToken"]);a!=null&&c(n,["nextPageToken"],a);const r=u(i,["documents"]);if(r!=null){let d=r;Array.isArray(d)&&(d=d.map(m=>m)),c(n,["documents"],d)}return n}/**
348 * @license
349 * Copyright 2025 Google LLC
350 * SPDX-License-Identifier: Apache-2.0
351 */class xA extends dn{constructor(n){super(),this.apiClient=n,this.list=async o=>new ai(fn.PAGED_ITEM_DOCUMENTS,a=>this.listInternal({parent:o.parent,config:a.config}),await this.listInternal(o),o)}async get(n){var o,a;let r,d="",m={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const g=_A(n);return d=X("{name}",g._url),m=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:d,queryParams:m,body:JSON.stringify(g),httpMethod:"GET",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(y=>y.json()),r.then(y=>y)}}async delete(n){var o,a;let r="",d={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const m=SA(n);r=X("{name}",m._url),d=m._query,delete m._url,delete m._query,await this.apiClient.request({path:r,queryParams:d,body:JSON.stringify(m),httpMethod:"DELETE",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal})}}async listInternal(n){var o,a;let r,d="",m={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const g=CA(n);return d=X("{parent}/documents",g._url),m=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:d,queryParams:m,body:JSON.stringify(g),httpMethod:"GET",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(y=>y.json()),r.then(y=>{const h=AA(y),v=new iT;return Object.assign(v,h),v})}}}/**
352 * @license
353 * Copyright 2025 Google LLC
354 * SPDX-License-Identifier: Apache-2.0
355 */class NA extends dn{constructor(n,o=new xA(n)){super(),this.apiClient=n,this.documents=o,this.list=async(a={})=>new ai(fn.PAGED_ITEM_FILE_SEARCH_STORES,r=>this.listInternal(r),await this.listInternal(a),a)}async uploadToFileSearchStore(n){if(this.apiClient.isVertexAI())throw new Error("Vertex AI does not support uploading files to a file search store.");return this.apiClient.uploadFileToFileSearchStore(n.fileSearchStoreName,n.file,n.config)}async create(n){var o,a;let r,d="",m={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const g=oA(n);return d=X("fileSearchStores",g._url),m=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:d,queryParams:m,body:JSON.stringify(g),httpMethod:"POST",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(y=>y.json()),r.then(y=>y)}}async get(n){var o,a;let r,d="",m={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const g=uA(n);return d=X("{name}",g._url),m=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:d,queryParams:m,body:JSON.stringify(g),httpMethod:"GET",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(y=>y.json()),r.then(y=>y)}}async delete(n){var o,a;let r="",d={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const m=sA(n);r=X("{name}",m._url),d=m._query,delete m._url,delete m._query,await this.apiClient.request({path:r,queryParams:d,body:JSON.stringify(m),httpMethod:"DELETE",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal})}}async listInternal(n){var o,a;let r,d="",m={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const g=mA(n);return d=X("fileSearchStores",g._url),m=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:d,queryParams:m,body:JSON.stringify(g),httpMethod:"GET",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(y=>y.json()),r.then(y=>{const h=hA(y),v=new lT;return Object.assign(v,h),v})}}async uploadToFileSearchStoreInternal(n){var o,a;let r,d="",m={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const g=yA(n);return d=X("upload/v1beta/{file_search_store_name}:uploadToFileSearchStore",g._url),m=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:d,queryParams:m,body:JSON.stringify(g),httpMethod:"POST",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(y=>y.json()),r.then(y=>{const h=vA(y),v=new oT;return Object.assign(v,h),v})}}async importFile(n){var o,a;let r,d="",m={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const g=fA(n);return d=X("{file_search_store_name}:importFile",g._url),m=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:d,queryParams:m,body:JSON.stringify(g),httpMethod:"POST",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(y=>y.json()),r.then(y=>{const h=cA(y),v=new pr;return Object.assign(v,h),v})}}}/**
356 * @license
357 * Copyright 2025 Google LLC
358 * SPDX-License-Identifier: Apache-2.0
359 */function MA(i,n){const o={},a=u(i,["name"]);return a!=null&&c(o,["_url","name"],a),o}function RA(i,n){const o={},a=u(i,["name"]);return a!=null&&c(o,["_url","name"],a),o}function bA(i,n,o){const a={};if(u(i,["validationDataset"])!==void 0)throw new Error("validationDataset parameter is not supported in Gemini API.");const r=u(i,["tunedModelDisplayName"]);if(n!==void 0&&r!=null&&c(n,["displayName"],r),u(i,["description"])!==void 0)throw new Error("description parameter is not supported in Gemini API.");const d=u(i,["epochCount"]);n!==void 0&&d!=null&&c(n,["tuningTask","hyperparameters","epochCount"],d);const m=u(i,["learningRateMultiplier"]);if(m!=null&&c(a,["tuningTask","hyperparameters","learningRateMultiplier"],m),u(i,["exportLastCheckpointOnly"])!==void 0)throw new Error("exportLastCheckpointOnly parameter is not supported in Gemini API.");if(u(i,["preTunedModelCheckpointId"])!==void 0)throw new Error("preTunedModelCheckpointId parameter is not supported in Gemini API.");if(u(i,["adapterSize"])!==void 0)throw new Error("adapterSize parameter is not supported in Gemini API.");const g=u(i,["batchSize"]);n!==void 0&&g!=null&&c(n,["tuningTask","hyperparameters","batchSize"],g);const y=u(i,["learningRate"]);if(n!==void 0&&y!=null&&c(n,["tuningTask","hyperparameters","learningRate"],y),u(i,["labels"])!==void 0)throw new Error("labels parameter is not supported in Gemini API.");if(u(i,["beta"])!==void 0)throw new Error("beta parameter is not supported in Gemini API.");return a}function wA(i,n,o){const a={};let r=u(o,["config","method"]);if(r===void 0&&(r="SUPERVISED_FINE_TUNING"),r==="SUPERVISED_FINE_TUNING"){const x=u(i,["validationDataset"]);n!==void 0&&x!=null&&c(n,["supervisedTuningSpec"],oh(x))}else if(r==="PREFERENCE_TUNING"){const x=u(i,["validationDataset"]);n!==void 0&&x!=null&&c(n,["preferenceOptimizationSpec"],oh(x))}const d=u(i,["tunedModelDisplayName"]);n!==void 0&&d!=null&&c(n,["tunedModelDisplayName"],d);const m=u(i,["description"]);n!==void 0&&m!=null&&c(n,["description"],m);let g=u(o,["config","method"]);if(g===void 0&&(g="SUPERVISED_FINE_TUNING"),g==="SUPERVISED_FINE_TUNING"){const x=u(i,["epochCount"]);n!==void 0&&x!=null&&c(n,["supervisedTuningSpec","hyperParameters","epochCount"],x)}else if(g==="PREFERENCE_TUNING"){const x=u(i,["epochCount"]);n!==void 0&&x!=null&&c(n,["preferenceOptimizationSpec","hyperParameters","epochCount"],x)}let y=u(o,["config","method"]);if(y===void 0&&(y="SUPERVISED_FINE_TUNING"),y==="SUPERVISED_FINE_TUNING"){const x=u(i,["learningRateMultiplier"]);n!==void 0&&x!=null&&c(n,["supervisedTuningSpec","hyperParameters","learningRateMultiplier"],x)}else if(y==="PREFERENCE_TUNING"){const x=u(i,["learningRateMultiplier"]);n!==void 0&&x!=null&&c(n,["preferenceOptimizationSpec","hyperParameters","learningRateMultiplier"],x)}let h=u(o,["config","method"]);if(h===void 0&&(h="SUPERVISED_FINE_TUNING"),h==="SUPERVISED_FINE_TUNING"){const x=u(i,["exportLastCheckpointOnly"]);n!==void 0&&x!=null&&c(n,["supervisedTuningSpec","exportLastCheckpointOnly"],x)}else if(h==="PREFERENCE_TUNING"){const x=u(i,["exportLastCheckpointOnly"]);n!==void 0&&x!=null&&c(n,["preferenceOptimizationSpec","exportLastCheckpointOnly"],x)}let v=u(o,["config","method"]);if(v===void 0&&(v="SUPERVISED_FINE_TUNING"),v==="SUPERVISED_FINE_TUNING"){const x=u(i,["adapterSize"]);n!==void 0&&x!=null&&c(n,["supervisedTuningSpec","hyperParameters","adapterSize"],x)}else if(v==="PREFERENCE_TUNING"){const x=u(i,["adapterSize"]);n!==void 0&&x!=null&&c(n,["preferenceOptimizationSpec","hyperParameters","adapterSize"],x)}if(u(i,["batchSize"])!==void 0)throw new Error("batchSize parameter is not supported in Vertex AI.");
359if(u(i,["learningRate"])!==void 0)throw new Error("learningRate parameter is not supported in Vertex AI.");const S=u(i,["labels"]);n!==void 0&&S!=null&&c(n,["labels"],S);const _=u(i,["beta"]);return n!==void 0&&_!=null&&c(n,["preferenceOptimizationSpec","hyperParameters","beta"],_),a}function DA(i,n){const o={},a=u(i,["baseModel"]);a!=null&&c(o,["baseModel"],a);const r=u(i,["preTunedModel"]);r!=null&&c(o,["preTunedModel"],r);const d=u(i,["trainingDataset"]);d!=null&&BA(d);const m=u(i,["config"]);return m!=null&&bA(m,o),o}function IA(i,n){const o={},a=u(i,["baseModel"]);a!=null&&c(o,["baseModel"],a);const r=u(i,["preTunedModel"]);r!=null&&c(o,["preTunedModel"],r);const d=u(i,["trainingDataset"]);d!=null&&OA(d,o,n);const m=u(i,["config"]);return m!=null&&wA(m,o,n),o}function UA(i,n){const o={},a=u(i,["name"]);return a!=null&&c(o,["_url","name"],a),o}function LA(i,n){const o={},a=u(i,["name"]);return a!=null&&c(o,["_url","name"],a),o}function qA(i,n,o){const a={},r=u(i,["pageSize"]);n!==void 0&&r!=null&&c(n,["_query","pageSize"],r);const d=u(i,["pageToken"]);n!==void 0&&d!=null&&c(n,["_query","pageToken"],d);const m=u(i,["filter"]);return n!==void 0&&m!=null&&c(n,["_query","filter"],m),a}function GA(i,n,o){const a={},r=u(i,["pageSize"]);n!==void 0&&r!=null&&c(n,["_query","pageSize"],r);const d=u(i,["pageToken"]);n!==void 0&&d!=null&&c(n,["_query","pageToken"],d);const m=u(i,["filter"]);return n!==void 0&&m!=null&&c(n,["_query","filter"],m),a}function HA(i,n){const o={},a=u(i,["config"]);return a!=null&&qA(a,o),o}function zA(i,n){const o={},a=u(i,["config"]);return a!=null&&GA(a,o),o}function kA(i,n){const o={},a=u(i,["sdkHttpResponse"]);a!=null&&c(o,["sdkHttpResponse"],a);const r=u(i,["nextPageToken"]);r!=null&&c(o,["nextPageToken"],r);const d=u(i,["tunedModels"]);if(d!=null){let m=d;Array.isArray(m)&&(m=m.map(g=>Hh(g))),c(o,["tuningJobs"],m)}return o}function VA(i,n){const o={},a=u(i,["sdkHttpResponse"]);a!=null&&c(o,["sdkHttpResponse"],a);const r=u(i,["nextPageToken"]);r!=null&&c(o,["nextPageToken"],r);const d=u(i,["tuningJobs"]);if(d!=null){let m=d;Array.isArray(m)&&(m=m.map(g=>rr(g))),c(o,["tuningJobs"],m)}return o}function PA(i,n){const o={},a=u(i,["name"]);a!=null&&c(o,["model"],a);const r=u(i,["name"]);return r!=null&&c(o,["endpoint"],r),o}function BA(i,n){const o={};if(u(i,["gcsUri"])!==void 0)throw new Error("gcsUri parameter is not supported in Gemini API.");if(u(i,["vertexDatasetResource"])!==void 0)throw new Error("vertexDatasetResource parameter is not supported in Gemini API.");const a=u(i,["examples"]);if(a!=null){let r=a;Array.isArray(r)&&(r=r.map(d=>d)),c(o,["examples","examples"],r)}return o}function OA(i,n,o){const a={};let r=u(o,["config","method"]);if(r===void 0&&(r="SUPERVISED_FINE_TUNING"),r==="SUPERVISED_FINE_TUNING"){const m=u(i,["gcsUri"]);n!==void 0&&m!=null&&c(n,["supervisedTuningSpec","trainingDatasetUri"],m)}else if(r==="PREFERENCE_TUNING"){const m=u(i,["gcsUri"]);n!==void 0&&m!=null&&c(n,["preferenceOptimizationSpec","trainingDatasetUri"],m)}let d=u(o,["config","method"]);if(d===void 0&&(d="SUPERVISED_FINE_TUNING"),d==="SUPERVISED_FINE_TUNING"){const m=u(i,["vertexDatasetResource"]);n!==void 0&&m!=null&&c(n,["supervisedTuningSpec","trainingDatasetUri"],m)}else if(d==="PREFERENCE_TUNING"){const m=u(i,["vertexDatasetResource"]);n!==void 0&&m!=null&&c(n,["preferenceOptimizationSpec","trainingDatasetUri"],m)}if(u(i,["examples"])!==void 0)throw new Error("examples parameter is not supported in Vertex AI.");return a}function Hh(i,n){const o={},a=u(i,["sdkHttpResponse"]);a!=null&&c(o,["sdkHttpResponse"],a);const r=u(i,["name"]);r!=null&&c(o,["name"],r);const d=u(i,["state"]);d!=null&&c(o,["state"],vh(d));const m=u(i,["createTime"]);m!=null&&c(o,["createTime"],m);const g=u(i,["tuningTask","startTime"]);g!=null&&c(o,["startTime"],g);const y=u(i,["tuningTask","completeTime"]);y!=null&&c(o,["endTime"],y);const h=u(i,["updateTime"]);h!=null&&c(o,["updateTime"],h);const v=u(i,["description"]);v!=null&&c(o,["description"],v);const S=u(i,["baseModel"]);S!=null&&c(o,["baseModel"],S);const _=u(i,["_self"]);return _!=null&&c(o,["tunedModel"],PA(_)),o}function rr(i,n){const o={},a=u(i,["sdkHttpResponse"]);a!=null&&c(o,["sdkHttpResponse"],a);const r=u(i,["name"]);r!=null&&c(o,["name"],r);const d=u(i,["state"]);d!=null&&c(o,["state"],vh(d));const m=u(i,["createTime"]);m!=null&&c(o,["createTime"],m);const g=u(i,["startTime"]);g!=null&&c(o,["startTime"],g);const y=u(i,["endTime"]);y!=null&&c(o,["endTime"],y);const h=u(i,["updateTime"]);h!=null&&c(o,["updateTime"],h);const v=u(i,["error"]);v!=null&&c(o,["error"],v);const S=u(i,["description"]);S!=null&&c(o,["description"],S);const _=u(i,["baseModel"]);_!=null&&c(o,["baseModel"],_);const x=u(i,["tunedModel"]);x!=null&&c(o,["tunedModel"],x);const b=u(i,["preTunedModel"]);b!=null&&c(o,["preTunedModel"],b);const U=u(i,["supervisedTuningSpec"]);U!=null&&c(o,["supervisedTuningSpec"],U);const k=u(i,["preferenceOptimizationSpec"]);k!=null&&c(o,["preferenceOptimizationSpec"],k);const B=u(i,["tuningDataStats"]);B!=null&&c(o,["tuningDataStats"],B);const W=u(i,["encryptionSpec"]);W!=null&&c(o,["encryptionSpec"],W);const P=u(i,["partnerModelTuningSpec"]);P!=null&&c(o,["partnerModelTuningSpec"],P);const Z=u(i,["customBaseModel"]);Z!=null&&c(o,["customBaseModel"],Z);const ee=u(i,["experiment"]);ee!=null&&c(o,["experiment"],ee);const te=u(i,["labels"]);te!=null&&c(o,["labels"],te);const J=u(i,["outputUri"]);J!=null&&c(o,["outputUri"],J);const O=u(i,["pipelineJob"]);O!=null&&c(o,["pipelineJob"],O);const F=u(i,["serviceAccount"]);F!=null&&c(o,["serviceAccount"],F);const Q=u(i,["tunedModelDisplayName"]);Q!=null&&c(o,["tunedModelDisplayName"],Q);const se=u(i,["veoTuningSpec"]);return se!=null&&c(o,["veoTuningSpec"],se),o}function FA(i,n){const o={},a=u(i,["sdkHttpResponse"]);a!=null&&c(o,["sdkHttpResponse"],a);const r=u(i,["name"]);r!=null&&c(o,["name"],r);const d=u(i,["metadata"]);d!=null&&c(o,["metadata"],d);const m=u(i,["done"]);m!=null&&c(o,["done"],m);const g=u(i,["error"]);return g!=null&&c(o,["error"],g),o}function oh(i,n){const o={},a=u(i,["gcsUri"]);a!=null&&c(o,["validationDatasetUri"],a);const r=u(i,["vertexDatasetResource"]);return r!=null&&c(o,["validationDatasetUri"],r),o}/**
360 * @license
361 * Copyright 2025 Google LLC
362 * SPDX-License-Identifier: Apache-2.0
363 */class YA extends dn{constructor(n){super(),this.apiClient=n,this.get=async o=>await this.getInternal(o),this.list=async(o={})=>new ai(fn.PAGED_ITEM_TUNING_JOBS,a=>this.listInternal(a),await this.listInternal(o),o),this.tune=async o=>{var a;if(this.apiClient.isVertexAI())if(o.baseModel.startsWith("projects/")){const r={tunedModelName:o.baseModel};!((a=o.config)===null||a===void 0)&&a.preTunedModelCheckpointId&&(r.checkpointId=o.config.preTunedModelCheckpointId);const d=Object.assign(Object.assign({},o),{preTunedModel:r});return d.baseModel=void 0,await this.tuneInternal(d)}else{const r=Object.assign({},o);return await this.tuneInternal(r)}else{const r=Object.assign({},o),d=await this.tuneMldevInternal(r);let m="";return d.metadata!==void 0&&d.metadata.tunedModel!==void 0?m=d.metadata.tunedModel:d.name!==void 0&&d.name.includes("/operations/")&&(m=d.name.split("/operations/")[0]),{name:m,state:nr.JOB_STATE_QUEUED}}}}async getInternal(n){var o,a,r,d;let m,g="",y={};if(this.apiClient.isVertexAI()){const h=LA(n);return g=X("{name}",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),m.then(v=>rr(v))}else{const h=UA(n);return g=X("{name}",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(d=n.config)===null||d===void 0?void 0:d.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),m.then(v=>Hh(v))}}async listInternal(n){var o,a,r,d;let m,g="",y={};if(this.apiClient.isVertexAI()){const h=zA(n);return g=X("tuningJobs",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),m.then(v=>{const S=VA(v),_=new zm;return Object.assign(_,S),_})}else{const h=HA(n);return g=X("tunedModels",h._url),y=h._query,delete h._url,delete h._query,m=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(d=n.config)===null||d===void 0?void 0:d.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),m.then(v=>{const S=kA(v),_=new zm;return Object.assign(_,S),_})}}async cancel(n){var o,a,r,d;let m="",g={};if(this.apiClient.isVertexAI()){const y=RA(n);m=X("{name}:cancel",y._url),g=y._query,delete y._url,delete y._query,await this.apiClient.request({path:m,queryParams:g,body:JSON.stringify(y),httpMethod:"POST",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal})}else{const y=MA(n);m=X("{name}:cancel",y._url),g=y._query,delete y._url,delete y._query,await this.apiClient.request({path:m,queryParams:g,body:JSON.stringify(y),httpMethod:"POST",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(d=n.config)===null||d===void 0?void 0:d.abortSignal})}}async tuneInternal(n){var o,a;let r,d="",m={};if(this.apiClient.isVertexAI()){const g=IA(n,n);return d=X("tuningJobs",g._url),m=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:d,queryParams:m,body:JSON.stringify(g),httpMethod:"POST",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(y=>y.json().then(h=>{const v=h;return v.sdkHttpResponse={headers:y.headers},v})),r.then(y=>rr(y))}else throw new Error("This method is only supported by the Vertex AI.")}async tuneMldevInternal(n){var o,a;let r,d="",m={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const g=DA(n);return d=X("tunedModels",g._url),m=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:d,queryParams:m,body:JSON.stringify(g),httpMethod:"POST",httpOptions:(o=n.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(a=n.config)===null||a===void 0?void 0:a.abortSignal}).then(y=>y.json().then(h=>{const v=h;return v.sdkHttpResponse={headers:y.headers},v})),r.then(y=>FA(y))}}}/**
364 * @license
365 * Copyright 2025 Google LLC
366 * SPDX-License-Identifier: Apache-2.0
367 */class JA{async download(n,o){throw new Error("Download to file is not supported in the browser, please use a browser compliant download like an <a> tag.")}}const KA=1024*1024*8,XA=3,QA=1e3,ZA=2,Sa="x-goog-upload-status";async function WA(i,n,o){var a;const r=await zh(i,n,o),d=await(r==null?void 0:r.json());if(((a=r==null?void 0:r.headers)===null||a===void 0?void 0:a[Sa])!=="final")throw new Error("Failed to upload file: Upload status is not finalized.");return d.file}async function $A(i,n,o){var a;const r=await zh(i,n,o),d=await(r==null?void 0:r.json());if(((a=r==null?void 0:r.headers)===null||a===void 0?void 0:a[Sa])!=="final")throw new Error("Failed to upload file: Upload status is not finalized.");const m=dh(d),g=new mr;return Object.assign(g,m),g}async function zh(i,n,o){var a,r;let d=0,m=0,g=new ir(new Response),y="upload";for(d=i.size;m<d;){const h=Math.min(KA,d-m),v=i.slice(m,m+h);m+h>=d&&(y+=", finalize");let S=0,_=QA;for(;S<XA&&(g=await o.request({path:"",body:v,httpMethod:"POST",httpOptions:{apiVersion:"",baseUrl:n,headers:{"X-Goog-Upload-Command":y,"X-Goog-Upload-Offset":String(m),"Content-Length":String(h)}}}),!(!((a=g==null?void 0:g.headers)===null||a===void 0)&&a[Sa]));)S++,await ex(_),_=_*ZA;if(m+=h,((r=g==null?void 0:g.headers)===null||r===void 0?void 0:r[Sa])!=="active")break;if(d<=m)throw new Error("All content has been uploaded, but the upload status is not finalized.")}return g}async function jA(i){return{size:i.size,type:i.type}}function ex(i){return new Promise(n=>setTimeout(n,i))}class tx{async upload(n,o,a){if(typeof n=="string")throw new Error("File path is not supported in browser uploader.");return await WA(n,o,a)}async uploadToFileSearchStore(n,o,a){if(typeof n=="string")throw new Error("File path is not supported in browser uploader.");return await $A(n,o,a)}async stat(n){if(typeof n=="string")throw new Error("File path is not supported in browser uploader.");return await jA(n)}}/**
368 * @license
369 * Copyright 2025 Google LLC
370 * SPDX-License-Identifier: Apache-2.0
371 */class nx{create(n,o,a){return new ix(n,o,a)}}class ix{constructor(n,o,a){this.url=n,this.headers=o,this.callbacks=a}connect(){this.ws=new WebSocket(this.url),this.ws.onopen=this.callbacks.onopen,this.ws.onerror=this.callbacks.onerror,this.ws.onclose
371=this.callbacks.onclose,this.ws.onmessage=this.callbacks.onmessage}send(n){if(this.ws===void 0)throw new Error("WebSocket is not connected");this.ws.send(n)}close(){if(this.ws===void 0)throw new Error("WebSocket is not connected");this.ws.close()}}/**
372 * @license
373 * Copyright 2025 Google LLC
374 * SPDX-License-Identifier: Apache-2.0
375 */const ah="x-goog-api-key";class lx{constructor(n){this.apiKey=n}async addAuthHeaders(n,o){if(n.get(ah)===null){if(this.apiKey.startsWith("auth_tokens/"))throw new Error("Ephemeral tokens are only supported by the live API.");if(!this.apiKey)throw new Error("API key is missing. Please provide a valid API key.");n.append(ah,this.apiKey)}}}/**
376 * @license
377 * Copyright 2025 Google LLC
378 * SPDX-License-Identifier: Apache-2.0
379 */const ox="gl-node/";class ax{constructor(n){var o;if(n.apiKey==null)throw new Error("An API Key must be set when running in a browser");if(n.project||n.location)throw new Error("Vertex AI project based authentication is not supported on browser runtimes. Please do not provide a project or location.");this.vertexai=(o=n.vertexai)!==null&&o!==void 0?o:!1,this.apiKey=n.apiKey;const a=Gv(n.httpOptions,n.vertexai,void 0,void 0);a&&(n.httpOptions?n.httpOptions.baseUrl=a:n.httpOptions={baseUrl:a}),this.apiVersion=n.apiVersion;const r=new lx(this.apiKey);this.apiClient=new _C({auth:r,apiVersion:this.apiVersion,apiKey:this.apiKey,vertexai:this.vertexai,httpOptions:n.httpOptions,userAgentExtra:ox+"web",uploader:new tx,downloader:new JA}),this.models=new VC(this.apiClient),this.live=new LC(this.apiClient,r,new nx),this.batches=new fS(this.apiClient),this.chats=new JS(this.models,this.apiClient),this.caches=new OS(this.apiClient),this.files=new n_(this.apiClient),this.operations=new PC(this.apiClient),this.authTokens=new iA(this.apiClient),this.tunings=new YA(this.apiClient),this.fileSearchStores=new NA(this.apiClient)}}const sx="";new ax({apiKey:sx});const ux=async(i,n=[])=>"Sorry, I am still in development. I will be able to access Toan's data and answer questions in the next version. You can ask me about Toan's research, projects, and other information.",rx=()=>{const[i,n]=le.useState([{id:0,role:"model",text:"Greetings, User. I am the ToanOS Assistant. I am still in development. I will be able to access Toan's data and answer questions in the next version. You can ask me about Toan's research, projects, and other information."}]),[o,a]=le.useState(""),[r,d]=le.useState(!1),m=le.useRef(null),g=()=>{var v;(v=m.current)==null||v.scrollIntoView({behavior:"smooth"})};le.useEffect(()=>{g()},[i]);const y=async()=>{if(!o.trim()||r)return;const v={id:Date.now(),role:"user",text:o};n(b=>[...b,v]),a(""),d(!0);const S=i.map(b=>({role:b.role,text:b.text})),_=await ux(v.text,S),x={id:Date.now()+1,role:"model",text:_};n(b=>[...b,x]),d(!1)},h=v=>{v.key==="Enter"&&!v.shiftKey&&(v.preventDefault(),y())};return C.jsxs("div",{className:"flex flex-col h-full bg-[#c0c0c0] text-black",children:[C.jsxs("div",{className:"p-1 flex items-center gap-2 border-b border-[#808080]",children:[C.jsx(U0,{className:"w-4 h-4"}),C.jsx("span",{className:"text-xs font-bold",children:"Gemini Agent v1.0"})]}),C.jsxs("div",{className:"flex-1 overflow-y-auto p-2 space-y-2 bg-white border-2 bevel-in m-1 font-mono text-sm text-black select-text",children:[i.map(v=>C.jsxs("div",{className:`flex flex-col ${v.role==="user"?"items-end":"items-start"}`,children:[C.jsx("span",{className:"text-[10px] uppercase font-bold text-gray-500 mb-0.5",children:v.role==="user"?"YOU":"SYSTEM"}),C.jsx("div",{className:`max-w-[90%] px-2 py-1 border ${v.role==="user"?"bg-[#e0e0e0] border-black":"bg-[#ffffcc] border-black"}`,children:C.jsx("p",{className:"whitespace-pre-wrap text-black",children:v.text})})]},v.id)),r&&C.jsxs("div",{className:"flex items-center gap-2 text-gray-500 text-xs",children:[C.jsx(X0,{className:"w-3 h-3 animate-spin"})," Processing..."]}),C.jsx("div",{ref:m})]}),C.jsxs("div",{className:"p-1 border-t border-white flex gap-1",children:[C.jsx("textarea",{value:o,onChange:v=>a(v.target.value),onKeyDown:h,placeholder:"Enter command...",rows:1,className:"flex-1 px-2 py-1 bg-white border-2 bevel-in resize-none font-mono text-sm text-black outline-none focus:bg-yellow-50"}),C.jsx("button",{onClick:y,disabled:!o.trim()||r,className:"px-4 bevel-out active:bevel-in flex items-center justify-center font-bold text-xs",children:"SEND"})]})]})},cx=()=>{const i=le.useRef(null),[n,o]=le.useState(!1),[a,r]=le.useState("#000000"),[d,m]=le.useState(2),[g,y]=le.useState("pen");le.useEffect(()=>{var b,U;const x=i.current;if(x){x.width=((b=x.parentElement)==null?void 0:b.clientWidth)||600,x.height=((U=x.parentElement)==null?void 0:U.clientHeight)||400;const k=x.getContext("2d");k&&(k.fillStyle="white",k.fillRect(0,0,x.width,x.height))}},[]);const h=x=>{const b=i.current;if(!b)return;const U=b.getContext("2d");U&&(o(!0),U.beginPath(),U.moveTo(x.nativeEvent.offsetX,x.nativeEvent.offsetY))},v=x=>{if(!n)return;const b=i.current;if(!b)return;const U=b.getContext("2d");U&&(U.lineWidth=d,U.lineCap="round",U.strokeStyle=g==="eraser"?"#ffffff"
379:a,U.lineTo(x.nativeEvent.offsetX,x.nativeEvent.offsetY),U.stroke())},S=()=>{o(!1)},_=()=>{const x=i.current;if(!x)return;const b=x.getContext("2d");b&&(b.fillStyle="white",b.fillRect(0,0,x.width,x.height))};return C.jsxs("div",{className:"flex flex-col h-full bg-[#c0c0c0]",children:[C.jsxs("div",{className:"flex items-center gap-2 p-2 border-b border-[#808080]",children:[C.jsx("button",{onClick:()=>y("pen"),className:`p-1 bevel-out active:bevel-in ${g==="pen"?"bg-[#dfdfdf] bevel-in":""}`,children:C.jsx(fv,{className:"w-4 h-4"})}),C.jsx("button",{onClick:()=>y("eraser"),className:`p-1 bevel-out active:bevel-in ${g==="eraser"?"bg-[#dfdfdf] bevel-in":""}`,children:C.jsx(G0,{className:"w-4 h-4"})}),C.jsx("div",{className:"w-[2px] h-6 bg-[#808080] border-r border-white mx-1"}),C.jsx("input",{type:"color",value:a,onChange:x=>r(x.target.value),className:"w-6 h-6 p-0 border-none"}),C.jsxs("select",{value:d,onChange:x=>m(Number(x.target.value)),className:"h-6 text-xs border border-[#808080]",children:[C.jsx("option",{value:"1",children:"1px"}),C.jsx("option",{value:"2",children:"2px"}),C.jsx("option",{value:"5",children:"5px"}),C.jsx("option",{value:"10",children:"10px"})]}),C.jsx("div",{className:"flex-1"}),C.jsx("button",{onClick:_,className:"p-1 bevel-out active:bevel-in text-red-600",children:C.jsx(Cv,{className:"w-4 h-4"})})]}),C.jsx("div",{className:"flex-1 p-4 bg-[#808080] overflow-hidden relative",children:C.jsx("canvas",{ref:i,onMouseDown:h,onMouseMove:v,onMouseUp:S,onMouseLeave:S,className:"bg-white cursor-crosshair shadow-md"})}),C.jsxs("div",{className:"h-6 bg-[#c0c0c0] border-t border-[#dfdfdf] text-xs px-2 flex items-center",children:[g.toUpperCase()," - ",d,"px"]})]})},fx=()=>{const i="https://en.wikipedia.org/wiki/Main_Page",[n,o]=le.useState(i),[a,r]=le.useState(i),d=y=>{y.preventDefault();let h=n;h.startsWith("http")||(h="https://"+h),r(h)},m=()=>{window.open(a,"_blank")},g=[{name:"My Homepage",url:"https://toan-vt.github.io/"},{name:"WPEC Badminton Calendar",url:"https://wpcal.github.io/"},{name:"Wikipedia",url:"https://en.wikipedia.org/wiki/Main_Page"}];return C.jsxs("div",{className:"flex flex-col h-full bg-[#c0c0c0] text-black",children:[C.jsxs("div",{className:"flex items-center gap-1 p-1 border-b border-[#808080] flex-wrap",children:[C.jsx("button",{className:"w-6 h-6 md:w-8 md:h-8 bevel-out active:bevel-in flex items-center justify-center disabled:opacity-50",children:C.jsx(R0,{className:"w-4 h-4"})}),C.jsx("button",{className:"w-6 h-6 md:w-8 md:h-8 bevel-out active:bevel-in flex items-center justify-center disabled:opacity-50",children:C.jsx(w0,{className:"w-4 h-4"})}),C.jsx("button",{className:"w-6 h-6 md:w-8 md:h-8 bevel-out active:bevel-in flex items-center justify-center",children:C.jsx(hv,{className:"w-4 h-4"})}),C.jsx("button",{onClick:()=>{r(i),o(i)},className:"w-6 h-6 md:w-8 md:h-8 bevel-out active:bevel-in flex items-center justify-center",children:C.jsx(er,{className:"w-4 h-4"})}),C.jsx("div",{className:"w-[2px] h-6 bg-[#808080] border-r border-white mx-1 hidden md:block"}),C.jsxs("form",{onSubmit:d,className:"flex-1 flex items-center gap-2 min-w-[150px]",children:[C.jsx("span",{className:"text-xs font-bold hidden md:inline",children:"Address"}),C.jsxs("div",{className:"flex-1 relative",children:[C.jsx("input",{type:"text",value:n,onChange:y=>o(y.target.value),className:"w-full h-6 border-2 border-[#808080] bg-white pl-2 pr-8 text-sm bevel-in shadow-inner font-sans text-black outline-none"}),C.jsx("div",{className:"absolute right-1 top-1/2 -translate-y-1/2 pointer-events-none",children:C.jsx("img",{src:"https://win98icons.alexmeub.com/icons/png/msie1-0.png",className:"w-4 h-4",alt:"ie"})})]}),C.jsx("button",{type:"submit",className:"px-2 md:px-3 h-6 bevel-out active:bevel-in text-xs font-bold flex items-center gap-1",children:"Go"})]})]}),C.jsxs("div",{className:"flex items-center gap-2 p-1 border-b border-[#808080] bg-[#d4d0c8] overflow-x-auto no-scrollbar",children:[C.jsx("span",{className:"text-xs font-bold px-1 text-gray-600",children:"Links:"}),g.map(y=>C.jsxs("button",{onClick:()=>{o(y.url),r(y.url)},className:"flex items-center gap-1 px-2 py-[1px] text-xs border border-transparent hover:border-[#808080] hover:bevel-out active:bevel-in whitespace-nowrap",children:[C.jsx(ju,{className:"w-3 h-3 text-blue-600"}),y.name]},y.name))]}),C.jsxs("div",{className:"flex-1 bg-white border-2 border-[#808080] bevel-in m-1 relative overflow-hidden flex flex-col",children:[C.jsx("iframe",{src:a,className:"flex-1 w-full border-none",title:"Browser",sandbox:"allow-same-origin allow-scripts allow-popups allow-forms"}),C.jsxs("div",{className:"w-full bg-[#ffffe1] text-black text-xs p-1 border-t border-[#808080] flex justify-between items-center flex-wrap gap-2 px-2",children:[C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx(ch,{className:"w-3 h-3 text-yellow-600"}),C.jsxs("span",{children:[C.jsx("span",{className:"font-bold",children:"Security Warning:"})," Some sites may not load in this frame."]})]}),C.jsxs("button",{onClick:m,className:"flex items-center gap-1 px-2 py-0.5 bg-[#c0c0c0] border border-black text-black text-xs bevel-out active:bevel-in",children:[C.jsx($u,{className:"w-3 h-3"})," Open in New Window"]})]})]}),C.jsxs("div",{className:"h-6 bg-[#c0c0c0] border-t border-[#dfdfdf] flex items-center px-2 text-xs bevel-in gap-2",children:[C.jsx("img",{src:"https://win98icons.alexmeub.com/icons/png/msie1-0.png",className:"w-3 h-3",alt:"ie"}),C.jsx("span",{className:"truncate text-black",children:a}),C.jsx("div",{className:"flex-1"}),C.jsx("div",{className:"border-l border-[#808080] pl-2 pr-2 text-black",children:"Internet Zone"})]})]})},dx=()=>{const[i,n]=le.useState(Array(9).fill(null)),[o,a]=le.useState(!0),r=h=>{const v=[[0,1,2],[3,4,5],[6,7,8],[0,3,6],[1,4,7],[2,5,8],[0,4,8],[2,4,6]];for(let S=0;S<v.length;S++){const[_,x,b]=v[S];if(h[_]&&h[_]===h[x]&&h[_]===h[b])return h[_]}return null},d=h=>{if(r(i)||i[h])return;const v=i.slice();v[h]=o?"X":"O",n(v),a(!o)},m=r(i),g=m?"Winner: "+m:"Next player: "+(o?"X":"O"),y=()=>{n(Array(9).fill(null)),a(!0)};return C.jsxs("div",{className:"h-full bg-[#c0c0c0] flex flex-col items-center justify-center p-4",children:[C.jsx("div",{className:"mb-4 text-lg font-bold",children:g}),C.jsx("div",{className:"grid grid-cols-3 gap-1 bg-[#808080] p-1 bevel-in",children:i.map((h,v)=>C.jsx("button",{onClick:()=>d(v),className:"w-16 h-16 bg-[#c0c0c0] text-3xl font-bold flex items-center justify-center bevel-out active:bevel-in",children:h},v))}),C.jsx("button",{onClick:y,className:"mt-4 px-4 py-1 bevel-out active:bevel-in font-bold",children:"Restart Game"})]})},ht=9,Zu=10,px=()=>
379{const[i,n]=le.useState([]),[o,a]=le.useState(!1),[r,d]=le.useState(!1),[m,g]=le.useState(Zu),y=()=>{let b=Array(ht*ht).fill(null).map((k,B)=>({id:B,isMine:!1,isRevealed:!1,isFlagged:!1,neighborCount:0})),U=0;for(;U<Zu;){const k=Math.floor(Math.random()*(ht*ht));b[k].isMine||(b[k].isMine=!0,U++)}for(let k=0;k<b.length;k++)if(!b[k].isMine){let B=0;const W=k%ht,P=Math.floor(k/ht);for(let Z=-1;Z<=1;Z++)for(let ee=-1;ee<=1;ee++){if(Z===0&&ee===0)continue;const te=W+Z,J=P+ee;if(te>=0&&te<ht&&J>=0&&J<ht){const O=J*ht+te;b[O].isMine&&B++}}b[k].neighborCount=B}n(b),a(!1),d(!1),g(Zu)};le.useEffect(()=>{y()},[]);const h=b=>{if(o||r||i[b].isFlagged||i[b].isRevealed)return;const U=[...i];U[b].isMine?(U[b].isRevealed=!0,a(!0),U.forEach(k=>{k.isMine&&(k.isRevealed=!0)})):S(U,b),n(U),_(U)},v=(b,U)=>{if(b.preventDefault(),o||r||i[U].isRevealed)return;const k=[...i];!k[U].isFlagged&&m>0?(k[U].isFlagged=!0,g(B=>B-1)):k[U].isFlagged&&(k[U].isFlagged=!1,g(B=>B+1)),n(k)},S=(b,U)=>{const k=b[U];if(!(k.isRevealed||k.isFlagged)&&(k.isRevealed=!0,k.neighborCount===0)){const B=U%ht,W=Math.floor(U/ht);for(let P=-1;P<=1;P++)for(let Z=-1;Z<=1;Z++){const ee=B+P,te=W+Z;ee>=0&&ee<ht&&te>=0&&te<ht&&S(b,te*ht+ee)}}},_=b=>{b.filter(k=>!k.isMine).every(k=>k.isRevealed)&&d(!0)},x=b=>["","text-blue-600","text-green-600","text-red-600","text-purple-800","text-red-800","text-teal-600","text-black","text-gray-600"][b]||"text-black";return C.jsxs("div",{className:"h-full bg-[#c0c0c0] p-2 flex flex-col items-center",children:[C.jsxs("div",{className:"w-full bg-[#c0c0c0] border-2 border-[#808080] border-b-white border-r-white p-1 flex justify-between items-center mb-2 bevel-in",children:[C.jsx("div",{className:"bg-black text-red-600 font-mono text-xl px-1 border bevel-in w-12 text-right",children:String(m).padStart(3,"0")}),C.jsx("button",{onClick:y,className:"w-8 h-8 bg-[#c0c0c0] bevel-out active:bevel-in flex items-center justify-center",children:o?C.jsx(V0,{className:"w-5 h-5 text-yellow-600 fill-black"}):r?C.jsx(Tv,{className:"w-5 h-5 text-yellow-400 fill-black"}):C.jsx(iv,{className:"w-5 h-5 text-yellow-400 fill-black"})}),C.jsx("div",{className:"bg-black text-red-600 font-mono text-xl px-1 border bevel-in w-12 text-right",children:"999"})]}),C.jsx("div",{className:"bg-[#808080] p-1 bevel-window",children:C.jsx("div",{className:"grid grid-cols-9 gap-[1px]",children:i.map(b=>C.jsxs("div",{className:`
380                        w-6 h-6 flex items-center justify-center text-xs font-bold cursor-default select-none
381                        ${b.isRevealed?"bg-[#c0c0c0] border border-[#808080] border-t-0 border-l-0":"bg-[#c0c0c0] bevel-out active:bevel-in"}
382                     `,onClick:()=>h(b.id),onContextMenu:U=>v(U,b.id),children:[b.isRevealed&&b.isMine&&C.jsx("div",{className:"w-3 h-3 bg-black rounded-full"}),b.isRevealed&&!b.isMine&&b.neighborCount>0&&C.jsx("span",{className:x(b.neighborCount),children:b.neighborCount}),b.isFlagged&&!b.isRevealed&&C.jsx("div",{className:"text-red-600",children:"P"})]},b.id))})})]})},mx=({title:i,url:n})=>{const o=()=>{window.open(n,"_blank")};return C.jsxs("div",{className:"flex flex-col h-full bg-[#c0c0c0] text-black",children:[C.jsxs("div",{className:"flex items-center gap-2 p-1 border-b border-[#808080] bg-[#d4d0c8]",children:[C.jsx(ju,{className:"w-4 h-4 text-blue-700 flex-shrink-0"}),C.jsx("span",{className:"text-xs font-bold hidden md:inline",children:"Address"}),C.jsx("div",{className:"flex-1 h-6 border-2 border-[#808080] bg-white px-2 text-sm bevel-in shadow-inner font-sans text-black truncate flex items-center",children:n}),C.jsxs("button",{onClick:o,className:"px-2 md:px-3 h-6 bevel-out active:bevel-in text-xs font-bold flex items-center gap-1 whitespace-nowrap",children:[C.jsx($u,{className:"w-3 h-3"}),"Open site"]})]}),C.jsxs("div",{className:"flex-1 bg-white border-2 border-[#808080] bevel-in m-1 relative overflow-hidden flex flex-col",children:[C.jsx("iframe",{src:n,className:"flex-1 w-full border-none",title:i,sandbox:"allow-same-origin allow-scripts allow-popups allow-forms"}),C.jsxs("div",{className:"w-full bg-[#ffffe1] text-black text-xs p-1 border-t border-[#808080] flex justify-between items-center flex-wrap gap-2 px-2",children:[C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx(ch,{className:"w-3 h-3 text-yellow-600 flex-shrink-0"}),C.jsxs("span",{children:[C.jsx("span",{className:"font-bold",children:"Security Warning:"})," Some sites may not load in this frame."]})]}),C.jsxs("button",{onClick:o,className:"flex items-center gap-1 px-2 py-0.5 bg-[#c0c0c0] border border-black text-black text-xs bevel-out active:bevel-in",children:[C.jsx($u,{className:"w-3 h-3"}),"Open in New Window"]})]})]}),C.jsxs("div",{className:"h-6 bg-[#c0c0c0] border-t border-[#dfdfdf] flex items-center px-2 text-xs bevel-in gap-2",children:[C.jsx(ju,{className:"w-3 h-3 text-blue-700"}),C.jsx("span",{className:"truncate text-black",children:n}),C.jsx("div",{className:"flex-1"}),C.jsx("div",{className:"border-l border-[#808080] pl-2 pr-2 text-black",children:"Internet Zone"})]})]})},sh=i=>i?Ip.map(n=>({...n,isMaximized:!0,position:{x:0,y:0}})):Ip.map(n=>{if(n.id==="portfolio"&&typeof window<"u"){const o=window.innerWidth,a=window.innerHeight,r=35,d=Math.floor(o*.8),m=Math.floor((a-r)*.8);
382return{...n,size:{width:d,height:m},position:{x:Math.floor((o-d)/2),y:Math.floor((a-r-m)/2)}}}return n}),Wu=i=>new Promise(n=>{window.setTimeout(n,i)}),hx=()=>{const i=typeof window<"u"&&window.innerWidth<768,[n,o]=le.useState(()=>sh(i)),[a,r]=le.useState(null),[d,m]=le.useState(!1),[g,y]=le.useState(!1),[h,v]=le.useState(!1),S=le.useRef(null),_=O=>{if(m(!1),n.find(Q=>Q.id===O))o(Q=>Q.map(se=>se.id===O?{...se,isMinimized:!1}:se)),r(O);else{const Q=ma[O];let se=Q.defaultSize||{width:800,height:600},ue=typeof window<"u"?window.innerWidth:1920,He=typeof window<"u"?window.innerHeight:1080;const lt=35;O==="portfolio"&&typeof window<"u"&&(ue=window.innerWidth,He=window.innerHeight,se={width:Math.floor(ue*.9),height:Math.floor((He-lt)*.9)});const tt={id:O,title:Q.title,icon:Q.icon||fr,isOpen:!0,isMinimized:!1,isMaximized:i,position:{x:i?0:O==="portfolio"?Math.floor((ue-se.width)/2):140+n.length*30%200,y:i?0:O==="portfolio"?Math.floor((He-lt-se.height)/2):40+n.length*30%200},size:se,zIndex:n.length+1};o(q=>[...q,tt]),r(O)}},x=O=>{o(F=>F.filter(Q=>Q.id!==O)),a===O&&r(null)},b=O=>{o(F=>F.map(Q=>Q.id===O?{...Q,isMinimized:!0}:Q)),r(null)},U=O=>{o(F=>F.map(Q=>Q.id===O?{...Q,isMaximized:!Q.isMaximized}:Q)),r(O)},k=O=>{r(O),o(F=>{const Q=F.find(ue=>ue.id===O);return Q?[...F.filter(ue=>ue.id!==O),Q]:F})},B=(O,F)=>{o(Q=>Q.map(se=>se.id===O?{...se,position:F}:se))},W=(O,F)=>{o(Q=>Q.map(se=>se.id===O?{...se,size:F}:se))},P=()=>{m(!1),y(!0)},Z=()=>{o(sh(i)),r("portfolio"),m(!1),y(!1),v(!1)},ee=async()=>{r(null),m(!1);const O=n.length;if(O===0){await Wu(300);return}for(let F=0;F<O;F+=1)await Wu(300),o(Q=>Q.slice(0,-1));await Wu(200)},te=()=>{y(!1),v(!0)},J=O=>{const F=ma[O];if(F.type==="website")return F.url?C.jsx(mx,{title:F.title,url:F.url}):C.jsx("div",{className:"p-4",children:"Website URL not configured"});switch(O){case"portfolio":return C.jsx(bv,{onOpenApp:_});case"notepad":return C.jsx(wv,{});case"calculator":return C.jsx(Dv,{});case"terminal":return C.jsx(Iv,{});case"ai-assistant":return C.jsx(rx,{});case"sketch":return C.jsx(cx,{});case"browser":return C.jsx(fx,{});case"tictactoe":return C.jsx(dx,{});case"minesweeper":return C.jsx(px,{});default:return C.jsx("div",{className:"p-4",children:"App not found"})}};return le.useEffect(()=>{const O=F=>{const Q=F.target;!Q.closest("#start-menu")&&!Q.closest("#start-button")&&m(!1)};return document.addEventListener("mousedown",O),()=>document.removeEventListener("mousedown",O)},[]),C.jsx("div",{className:"h-[100dvh] w-screen overflow-hidden relative font-sans select-none bg-[#008080]",ref:S,children:h?C.jsx("div",{className:"absolute inset-0 z-[30000] flex items-center justify-center bg-black text-white px-4",children:C.jsx("button",{onClick:Z,className:"px-5 py-3 bg-[#c0c0c0] bevel-out active:bevel-in text-black text-sm font-bold",children:"Turn On"})}):C.jsxs(C.Fragment,{children:[C.jsx("div",{className:"absolute top-0 left-0 h-full w-full p-2 md:p-4 grid grid-flow-col grid-rows-[repeat(auto-fill,90px)] gap-4 content-start justify-start z-0",children:Object.entries(ma).map(([O,F])=>C.jsx(Nv,{app:F,onClick:()=>_(O)},O))}),n.map((O,F)=>C.jsx(xv,{window:O,isActive:a===O.id,onClose:()=>x(O.id),onMinimize:()=>b(O.id),onMaximize:()=>U(O.id),onFocus:()=>k(O.id),onMove:Q=>B(O.id,Q),onResize:Q=>W(O.id,Q),style:{zIndex:10+F},isMobile:i,children:J(O.id)},O.id)),d&&C.jsx(Mv,{apps:ma,onAppClick:_,onShutdown:P}),g&&C.jsx(Rv,{onCancel:()=>y(!1),onBeginPowerAction:ee,onShutdownComplete:te,onRestartComplete:Z}),C.jsx(_0,{windows:n,activeWindowId:a,onAppClick:_,onStartClick:()=>m(!d),onMinimize:b,startMenuOpen:d})]})})},kh=document.getElementById("root");if(!kh)throw new Error("Could not find root element to mount to");const gx=S0.createRoot(kh);gx.render(C.jsx(d0.StrictMode,{children:C.jsx(hx,{})}));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.