@dsrcjs/ai-widget 1.0.11 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-dana-chat.js +52 -52
- package/dist/index-CzUSbOrl.js +19 -0
- package/dist/index.js +1 -1
- package/dist/{markdown-impl-7ocPztMu.js → markdown-impl-CUBecG9k.js} +1 -1
- package/dist/{stream-entry-CdtxSd08.js → stream-entry-CRMaTL9v.js} +1 -1
- package/package.json +1 -1
- package/dist/index-2rcu8aIP.js +0 -19
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var sb=Object.defineProperty,lb=(r,n,o)=>n in r?sb(r,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[n]=o,ia=(r,n,o)=>lb(r,typeof n!="symbol"?n+"":n,o);function cb(r,n){for(var o=0;o<n.length;o++){const s=n[o];if(typeof s!="string"&&!Array.isArray(s)){for(const d in s)if(d!=="default"&&!(d in r)){const p=Object.getOwnPropertyDescriptor(s,d);p&&Object.defineProperty(r,d,p.get?p:{enumerable:!0,get:()=>s[d]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}function tp(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var rp={exports:{}},Ja={},ap={exports:{}},je={},np;function db(){if(np)return je;np=1;var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),C=Symbol.iterator;function k(w){return w===null||typeof w!="object"?null:(w=C&&w[C]||w["@@iterator"],typeof w=="function"?w:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,E={};function M(w,L,H){this.props=w,this.context=L,this.refs=E,this.updater=H||j}M.prototype.isReactComponent={},M.prototype.setState=function(w,L){if(typeof w!="object"&&typeof w!="function"&&w!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,w,L,"setState")},M.prototype.forceUpdate=function(w){this.updater.enqueueForceUpdate(this,w,"forceUpdate")};function F(){}F.prototype=M.prototype;function Z(w,L,H){this.props=w,this.context=L,this.refs=E,this.updater=H||j}var oe=Z.prototype=new F;oe.constructor=Z,_(oe,M.prototype),oe.isPureReactComponent=!0;var J=Array.isArray,re=Object.prototype.hasOwnProperty,$={current:null},X={key:!0,ref:!0,__self:!0,__source:!0};function K(w,L,H){var V,ue={},pe=null,Ne=null;if(L!=null)for(V in L.ref!==void 0&&(Ne=L.ref),L.key!==void 0&&(pe=""+L.key),L)re.call(L,V)&&!X.hasOwnProperty(V)&&(ue[V]=L[V]);var ke=arguments.length-2;if(ke===1)ue.children=H;else if(1<ke){for(var be=Array(ke),it=0;it<ke;it++)be[it]=arguments[it+2];ue.children=be}if(w&&w.defaultProps)for(V in ke=w.defaultProps,ke)ue[V]===void 0&&(ue[V]=ke[V]);return{$$typeof:r,type:w,key:pe,ref:Ne,props:ue,_owner:$.current}}function fe(w,L){return{$$typeof:r,type:w.type,key:L,ref:w.ref,props:w.props,_owner:w._owner}}function ee(w){return typeof w=="object"&&w!==null&&w.$$typeof===r}function de(w){var L={"=":"=0",":":"=2"};return"$"+w.replace(/[=:]/g,function(H){return L[H]})}var B=/\/+/g;function Q(w,L){return typeof w=="object"&&w!==null&&w.key!=null?de(""+w.key):L.toString(36)}function me(w,L,H,V,ue){var pe=typeof w;(pe==="undefined"||pe==="boolean")&&(w=null);var Ne=!1;if(w===null)Ne=!0;else switch(pe){case"string":case"number":Ne=!0;break;case"object":switch(w.$$typeof){case r:case n:Ne=!0}}if(Ne)return Ne=w,ue=ue(Ne),w=V===""?"."+Q(Ne,0):V,J(ue)?(H="",w!=null&&(H=w.replace(B,"$&/")+"/"),me(ue,L,H,"",function(it){return it})):ue!=null&&(ee(ue)&&(ue=fe(ue,H+(!ue.key||Ne&&Ne.key===ue.key?"":(""+ue.key).replace(B,"$&/")+"/")+w)),L.push(ue)),1;if(Ne=0,V=V===""?".":V+":",J(w))for(var ke=0;ke<w.length;ke++){pe=w[ke];var be=V+Q(pe,ke);Ne+=me(pe,L,H,be,ue)}else if(be=k(w),typeof be=="function")for(w=be.call(w),ke=0;!(pe=w.next()).done;)pe=pe.value,be=V+Q(pe,ke++),Ne+=me(pe,L,H,be,ue);else if(pe==="object")throw L=String(w),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(w).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.");return Ne}function Se(w,L,H){if(w==null)return w;var V=[],ue=0;return me(w,V,"","",function(pe){return L.call(H,pe,ue++)}),V}function ve(w){if(w._status===-1){var L=w._result;L=L(),L.then(function(H){(w._status===0||w._status===-1)&&(w._status=1,w._result=H)},function(H){(w._status===0||w._status===-1)&&(w._status=2,w._result=H)}),w._status===-1&&(w._status=0,w._result=L)}if(w._status===1)return w._result.default;throw w._result}var ye={current:null},U={transition:null},D={ReactCurrentDispatcher:ye,ReactCurrentBatchConfig:U,ReactCurrentOwner:$};function T(){throw Error("act(...) is not supported in production builds of React.")}return je.Children={map:Se,forEach:function(w,L,H){Se(w,function(){L.apply(this,arguments)},H)},count:function(w){var L=0;return Se(w,function(){L++}),L},toArray:function(w){return Se(w,function(L){return L})||[]},only:function(w){if(!ee(w))throw Error("React.Children.only expected to receive a single React element child.");return w}},je.Component=M,je.Fragment=o,je.Profiler=d,je.PureComponent=Z,je.StrictMode=s,je.Suspense=m,je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=D,je.act=T,je.cloneElement=function(w,L,H){if(w==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+w+".");var V=_({},w.props),ue=w.key,pe=w.ref,Ne=w._owner;if(L!=null){if(L.ref!==void 0&&(pe=L.ref,Ne=$.current),L.key!==void 0&&(ue=""+L.key),w.type&&w.type.defaultProps)var ke=w.type.defaultProps;for(be in L)re.call(L,be)&&!X.hasOwnProperty(be)&&(V[be]=L[be]===void 0&&ke!==void 0?ke[be]:L[be])}var be=arguments.length-2;if(be===1)V.children=H;else if(1<be){ke=Array(be);for(var it=0;it<be;it++)ke[it]=arguments[it+2];V.children=ke}return{$$typeof:r,type:w.type,key:ue,ref:pe,props:V,_owner:Ne}},je.createContext=function(w){return w={$$typeof:f,_currentValue:w,_currentValue2:w,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},w.Provider={$$typeof:p,_context:w},w.Consumer=w},je.createElement=K,je.createFactory=function(w){var L=K.bind(null,w);return L.type=w,L},je.createRef=function(){return{current:null}},je.forwardRef=function(w){return{$$typeof:h,render:w}},je.isValidElement=ee,je.lazy=function(w){return{$$typeof:x,_payload:{_status:-1,_result:w},_init:ve}},je.memo=function(w,L){return{$$typeof:v,type:w,compare:L===void 0?null:L}},je.startTransition=function(w){var L=U.transition;U.transition={};try{w()}finally{U.transition=L}},je.unstable_act=T,je.useCallback=function(w,L){return ye.current.useCallback(w,L)},je.useContext=function(w){return ye.current.useContext(w)},je.useDebugValue=function(){},je.useDeferredValue=function(w){return ye.current.useDeferredValue(w)},je.useEffect=function(w,L){return ye.current.useEffect(w,L)},je.useId=function(){return ye.current.useId()},je.useImperativeHandle=function(w,L,H){return ye.current.useImperativeHandle(w,L,H)},je.useInsertionEffect=function(w,L){return ye.current.useInsertionEffect(w,L)},je.useLayoutEffect=function(w,L){return ye.current.useLayoutEffect(w,L)},je.useMemo=function(w,L){return ye.current.useMemo(w,L)},je.useReducer=function(w,L,H){return ye.current.useReducer(w,L,H)},je.useRef=function(w){return ye.current.useRef(w)},je.useState=function(w){return ye.current.useState(w)},je.useSyncExternalStore=function(w,L,H){return ye.current.useSyncExternalStore(w,L,H)},je.useTransition=function(){return ye.current.useTransition()},je.version="18.3.1",je}var op;function Bs(){return op||(op=1,ap.exports=db()),ap.exports}var ip;function ub(){if(ip)return Ja;ip=1;var r=Bs(),n=Symbol.for("react.element"),o=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,d=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function f(h,m,v){var x,C={},k=null,j=null;v!==void 0&&(k=""+v),m.key!==void 0&&(k=""+m.key),m.ref!==void 0&&(j=m.ref);for(x in m)s.call(m,x)&&!p.hasOwnProperty(x)&&(C[x]=m[x]);if(h&&h.defaultProps)for(x in m=h.defaultProps,m)C[x]===void 0&&(C[x]=m[x]);return{$$typeof:n,type:h,key:k,ref:j,props:C,_owner:d.current}}return Ja.Fragment=o,Ja.jsx=f,Ja.jsxs=f,Ja}var sp;function pb(){return sp||(sp=1,rp.exports=ub()),rp.exports}var c=pb(),b=Bs();const fb=tp(b),hb=cb({__proto__:null,default:fb},[b]);var Ro={},Ws={exports:{}},ot={},lp={exports:{}},cp={},dp;function gb(){return dp||(dp=1,(function(r){function n(U,D){var T=U.length;U.push(D);e:for(;0<T;){var w=T-1>>>1,L=U[w];if(0<d(L,D))U[w]=D,U[T]=L,T=w;else break e}}function o(U){return U.length===0?null:U[0]}function s(U){if(U.length===0)return null;var D=U[0],T=U.pop();if(T!==D){U[0]=T;e:for(var w=0,L=U.length,H=L>>>1;w<H;){var V=2*(w+1)-1,ue=U[V],pe=V+1,Ne=U[pe];if(0>d(ue,T))pe<L&&0>d(Ne,ue)?(U[w]=Ne,U[pe]=T,w=pe):(U[w]=ue,U[V]=T,w=V);else if(pe<L&&0>d(Ne,T))U[w]=Ne,U[pe]=T,w=pe;else break e}}return D}function d(U,D){var T=U.sortIndex-D.sortIndex;return T!==0?T:U.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var p=performance;r.unstable_now=function(){return p.now()}}else{var f=Date,h=f.now();r.unstable_now=function(){return f.now()-h}}var m=[],v=[],x=1,C=null,k=3,j=!1,_=!1,E=!1,M=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,Z=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function oe(U){for(var D=o(v);D!==null;){if(D.callback===null)s(v);else if(D.startTime<=U)s(v),D.sortIndex=D.expirationTime,n(m,D);else break;D=o(v)}}function J(U){if(E=!1,oe(U),!_)if(o(m)!==null)_=!0,ve(re);else{var D=o(v);D!==null&&ye(J,D.startTime-U)}}function re(U,D){_=!1,E&&(E=!1,F(K),K=-1),j=!0;var T=k;try{for(oe(D),C=o(m);C!==null&&(!(C.expirationTime>D)||U&&!de());){var w=C.callback;if(typeof w=="function"){C.callback=null,k=C.priorityLevel;var L=w(C.expirationTime<=D);D=r.unstable_now(),typeof L=="function"?C.callback=L:C===o(m)&&s(m),oe(D)}else s(m);C=o(m)}if(C!==null)var H=!0;else{var V=o(v);V!==null&&ye(J,V.startTime-D),H=!1}return H}finally{C=null,k=T,j=!1}}var $=!1,X=null,K=-1,fe=5,ee=-1;function de(){return!(r.unstable_now()-ee<fe)}function B(){if(X!==null){var U=r.unstable_now();ee=U;var D=!0;try{D=X(!0,U)}finally{D?Q():($=!1,X=null)}}else $=!1}var Q;if(typeof Z=="function")Q=function(){Z(B)};else if(typeof MessageChannel<"u"){var me=new MessageChannel,Se=me.port2;me.port1.onmessage=B,Q=function(){Se.postMessage(null)}}else Q=function(){M(B,0)};function ve(U){X=U,$||($=!0,Q())}function ye(U,D){K=M(function(){U(r.unstable_now())},D)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(U){U.callback=null},r.unstable_continueExecution=function(){_||j||(_=!0,ve(re))},r.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):fe=0<U?Math.floor(1e3/U):5},r.unstable_getCurrentPriorityLevel=function(){return k},r.unstable_getFirstCallbackNode=function(){return o(m)},r.unstable_next=function(U){switch(k){case 1:case 2:case 3:var D=3;break;default:D=k}var T=k;k=D;try{return U()}finally{k=T}},r.unstable_pauseExecution=function(){},r.unstable_requestPaint=function(){},r.unstable_runWithPriority=function(U,D){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var T=k;k=U;try{return D()}finally{k=T}},r.unstable_scheduleCallback=function(U,D,T){var w=r.unstable_now();switch(typeof T=="object"&&T!==null?(T=T.delay,T=typeof T=="number"&&0<T?w+T:w):T=w,U){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=T+L,U={id:x++,callback:D,priorityLevel:U,startTime:T,expirationTime:L,sortIndex:-1},T>w?(U.sortIndex=T,n(v,U),o(m)===null&&U===o(v)&&(E?(F(K),K=-1):E=!0,ye(J,T-w))):(U.sortIndex=L,n(m,U),_||j||(_=!0,ve(re))),U},r.unstable_shouldYield=de,r.unstable_wrapCallback=function(U){var D=k;return function(){var T=k;k=D;try{return U.apply(this,arguments)}finally{k=T}}}})(cp)),cp}var up;function mb(){return up||(up=1,lp.exports=gb()),lp.exports}var pp;function bb(){if(pp)return ot;pp=1;var r=Bs(),n=mb();function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,d={};function p(e,t){f(e,t),f(e+"Capture",t)}function f(e,t){for(d[e]=t,e=0;e<t.length;e++)s.add(t[e])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),m=Object.prototype.hasOwnProperty,v=/^[: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]*$/,x={},C={};function k(e){return m.call(C,e)?!0:m.call(x,e)?!1:v.test(e)?C[e]=!0:(x[e]=!0,!1)}function j(e,t,a,i){if(a!==null&&a.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:a!==null?!a.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function _(e,t,a,i){if(t===null||typeof t>"u"||j(e,t,a,i))return!0;if(i)return!1;if(a!==null)switch(a.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function E(e,t,a,i,l,u,g){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=l,this.mustUseProperty=a,this.propertyName=e,this.type=t,this.sanitizeURL=u,this.removeEmptyString=g}var M={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){M[e]=new E(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];M[t]=new E(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){M[e]=new E(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){M[e]=new E(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){M[e]=new E(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){M[e]=new E(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){M[e]=new E(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){M[e]=new E(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){M[e]=new E(e,5,!1,e.toLowerCase(),null,!1,!1)});var F=/[\-:]([a-z])/g;function Z(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(F,Z);M[t]=new E(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(F,Z);M[t]=new E(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(F,Z);M[t]=new E(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){M[e]=new E(e,1,!1,e.toLowerCase(),null,!1,!1)}),M.xlinkHref=new E("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){M[e]=new E(e,1,!1,e.toLowerCase(),null,!0,!0)});function oe(e,t,a,i){var l=M.hasOwnProperty(t)?M[t]:null;(l!==null?l.type!==0:i||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(_(t,a,l,i)&&(a=null),i||l===null?k(t)&&(a===null?e.removeAttribute(t):e.setAttribute(t,""+a)):l.mustUseProperty?e[l.propertyName]=a===null?l.type===3?!1:"":a:(t=l.attributeName,i=l.attributeNamespace,a===null?e.removeAttribute(t):(l=l.type,a=l===3||l===4&&a===!0?"":""+a,i?e.setAttributeNS(i,t,a):e.setAttribute(t,a))))}var J=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,re=Symbol.for("react.element"),$=Symbol.for("react.portal"),X=Symbol.for("react.fragment"),K=Symbol.for("react.strict_mode"),fe=Symbol.for("react.profiler"),ee=Symbol.for("react.provider"),de=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),me=Symbol.for("react.suspense_list"),Se=Symbol.for("react.memo"),ve=Symbol.for("react.lazy"),ye=Symbol.for("react.offscreen"),U=Symbol.iterator;function D(e){return e===null||typeof e!="object"?null:(e=U&&e[U]||e["@@iterator"],typeof e=="function"?e:null)}var T=Object.assign,w;function L(e){if(w===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);w=t&&t[1]||""}return`
|
|
2
|
+
`+w+e}var H=!1;function V(e,t){if(!e||H)return"";H=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(P){var i=P}Reflect.construct(e,[],t)}else{try{t.call()}catch(P){i=P}e.call(t.prototype)}else{try{throw Error()}catch(P){i=P}e()}}catch(P){if(P&&i&&typeof P.stack=="string"){for(var l=P.stack.split(`
|
|
3
|
+
`),u=i.stack.split(`
|
|
4
|
+
`),g=l.length-1,y=u.length-1;1<=g&&0<=y&&l[g]!==u[y];)y--;for(;1<=g&&0<=y;g--,y--)if(l[g]!==u[y]){if(g!==1||y!==1)do if(g--,y--,0>y||l[g]!==u[y]){var N=`
|
|
5
|
+
`+l[g].replace(" at new "," at ");return e.displayName&&N.includes("<anonymous>")&&(N=N.replace("<anonymous>",e.displayName)),N}while(1<=g&&0<=y);break}}}finally{H=!1,Error.prepareStackTrace=a}return(e=e?e.displayName||e.name:"")?L(e):""}function ue(e){switch(e.tag){case 5:return L(e.type);case 16:return L("Lazy");case 13:return L("Suspense");case 19:return L("SuspenseList");case 0:case 2:case 15:return e=V(e.type,!1),e;case 11:return e=V(e.type.render,!1),e;case 1:return e=V(e.type,!0),e;default:return""}}function pe(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case X:return"Fragment";case $:return"Portal";case fe:return"Profiler";case K:return"StrictMode";case Q:return"Suspense";case me:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case de:return(e.displayName||"Context")+".Consumer";case ee:return(e._context.displayName||"Context")+".Provider";case B:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Se:return t=e.displayName||null,t!==null?t:pe(e.type)||"Memo";case ve:t=e._payload,e=e._init;try{return pe(e(t))}catch{}}return null}function Ne(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pe(t);case 8:return t===K?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ke(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function be(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function it(e){var t=be(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var l=a.get,u=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(g){i=""+g,u.call(this,g)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return i},setValue:function(g){i=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function vn(e){e._valueTracker||(e._valueTracker=it(e))}function ic(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),i="";return e&&(i=be(e)?e.checked?"true":"false":e.value),e=i,e!==a?(t.setValue(e),!0):!1}function yn(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Jo(e,t){var a=t.checked;return T({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??e._wrapperState.initialChecked})}function sc(e,t){var a=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;a=ke(t.value!=null?t.value:a),e._wrapperState={initialChecked:i,initialValue:a,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function lc(e,t){t=t.checked,t!=null&&oe(e,"checked",t,!1)}function Go(e,t){lc(e,t);var a=ke(t.value),i=t.type;if(a!=null)i==="number"?(a===0&&e.value===""||e.value!=a)&&(e.value=""+a):e.value!==""+a&&(e.value=""+a);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ei(e,t.type,a):t.hasOwnProperty("defaultValue")&&ei(e,t.type,ke(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function cc(e,t,a){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,a||t===e.value||(e.value=t),e.defaultValue=t}a=e.name,a!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,a!==""&&(e.name=a)}function ei(e,t,a){(t!=="number"||yn(e.ownerDocument)!==e)&&(a==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+a&&(e.defaultValue=""+a))}var fa=Array.isArray;function Tr(e,t,a,i){if(e=e.options,t){t={};for(var l=0;l<a.length;l++)t["$"+a[l]]=!0;for(a=0;a<e.length;a++)l=t.hasOwnProperty("$"+e[a].value),e[a].selected!==l&&(e[a].selected=l),l&&i&&(e[a].defaultSelected=!0)}else{for(a=""+ke(a),t=null,l=0;l<e.length;l++){if(e[l].value===a){e[l].selected=!0,i&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function ti(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(o(91));return T({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function dc(e,t){var a=t.value;if(a==null){if(a=t.children,t=t.defaultValue,a!=null){if(t!=null)throw Error(o(92));if(fa(a)){if(1<a.length)throw Error(o(93));a=a[0]}t=a}t==null&&(t=""),a=t}e._wrapperState={initialValue:ke(a)}}function uc(e,t){var a=ke(t.value),i=ke(t.defaultValue);a!=null&&(a=""+a,a!==e.value&&(e.value=a),t.defaultValue==null&&e.defaultValue!==a&&(e.defaultValue=a)),i!=null&&(e.defaultValue=""+i)}function pc(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function fc(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ri(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?fc(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var wn,hc=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,a,i,l){MSApp.execUnsafeLocalFunction(function(){return e(t,a,i,l)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(wn=wn||document.createElement("div"),wn.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=wn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ha(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var ga={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ug=["Webkit","ms","Moz","O"];Object.keys(ga).forEach(function(e){ug.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ga[t]=ga[e]})});function gc(e,t,a){return t==null||typeof t=="boolean"||t===""?"":a||typeof t!="number"||t===0||ga.hasOwnProperty(e)&&ga[e]?(""+t).trim():t+"px"}function mc(e,t){e=e.style;for(var a in t)if(t.hasOwnProperty(a)){var i=a.indexOf("--")===0,l=gc(a,t[a],i);a==="float"&&(a="cssFloat"),i?e.setProperty(a,l):e[a]=l}}var pg=T({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ai(e,t){if(t){if(pg[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(o(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(o(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(t.style!=null&&typeof t.style!="object")throw Error(o(62))}}function ni(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 oi=null;function ii(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var si=null,Ir=null,Ar=null;function bc(e){if(e=Aa(e)){if(typeof si!="function")throw Error(o(280));var t=e.stateNode;t&&(t=Bn(t),si(e.stateNode,e.type,t))}}function xc(e){Ir?Ar?Ar.push(e):Ar=[e]:Ir=e}function vc(){if(Ir){var e=Ir,t=Ar;if(Ar=Ir=null,bc(e),t)for(e=0;e<t.length;e++)bc(t[e])}}function yc(e,t){return e(t)}function wc(){}var li=!1;function kc(e,t,a){if(li)return e(t,a);li=!0;try{return yc(e,t,a)}finally{li=!1,(Ir!==null||Ar!==null)&&(wc(),vc())}}function ma(e,t){var a=e.stateNode;if(a===null)return null;var i=Bn(a);if(i===null)return null;a=i[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":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(o(231,t,typeof a));return a}var ci=!1;if(h)try{var ba={};Object.defineProperty(ba,"passive",{get:function(){ci=!0}}),window.addEventListener("test",ba,ba),window.removeEventListener("test",ba,ba)}catch{ci=!1}function fg(e,t,a,i,l,u,g,y,N){var P=Array.prototype.slice.call(arguments,3);try{t.apply(a,P)}catch(A){this.onError(A)}}var xa=!1,kn=null,jn=!1,di=null,hg={onError:function(e){xa=!0,kn=e}};function gg(e,t,a,i,l,u,g,y,N){xa=!1,kn=null,fg.apply(hg,arguments)}function mg(e,t,a,i,l,u,g,y,N){if(gg.apply(this,arguments),xa){if(xa){var P=kn;xa=!1,kn=null}else throw Error(o(198));jn||(jn=!0,di=P)}}function hr(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function jc(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 Nc(e){if(hr(e)!==e)throw Error(o(188))}function bg(e){var t=e.alternate;if(!t){if(t=hr(e),t===null)throw Error(o(188));return t!==e?null:e}for(var a=e,i=t;;){var l=a.return;if(l===null)break;var u=l.alternate;if(u===null){if(i=l.return,i!==null){a=i;continue}break}if(l.child===u.child){for(u=l.child;u;){if(u===a)return Nc(l),e;if(u===i)return Nc(l),t;u=u.sibling}throw Error(o(188))}if(a.return!==i.return)a=l,i=u;else{for(var g=!1,y=l.child;y;){if(y===a){g=!0,a=l,i=u;break}if(y===i){g=!0,i=l,a=u;break}y=y.sibling}if(!g){for(y=u.child;y;){if(y===a){g=!0,a=u,i=l;break}if(y===i){g=!0,i=u,a=l;break}y=y.sibling}if(!g)throw Error(o(189))}}if(a.alternate!==i)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?e:t}function Cc(e){return e=bg(e),e!==null?Sc(e):null}function Sc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Sc(e);if(t!==null)return t;e=e.sibling}return null}var Ec=n.unstable_scheduleCallback,_c=n.unstable_cancelCallback,xg=n.unstable_shouldYield,vg=n.unstable_requestPaint,Ae=n.unstable_now,yg=n.unstable_getCurrentPriorityLevel,ui=n.unstable_ImmediatePriority,zc=n.unstable_UserBlockingPriority,Nn=n.unstable_NormalPriority,wg=n.unstable_LowPriority,Rc=n.unstable_IdlePriority,Cn=null,Rt=null;function kg(e){if(Rt&&typeof Rt.onCommitFiberRoot=="function")try{Rt.onCommitFiberRoot(Cn,e,void 0,(e.current.flags&128)===128)}catch{}}var kt=Math.clz32?Math.clz32:Cg,jg=Math.log,Ng=Math.LN2;function Cg(e){return e>>>=0,e===0?32:31-(jg(e)/Ng|0)|0}var Sn=64,En=4194304;function va(e){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:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function _n(e,t){var a=e.pendingLanes;if(a===0)return 0;var i=0,l=e.suspendedLanes,u=e.pingedLanes,g=a&268435455;if(g!==0){var y=g&~l;y!==0?i=va(y):(u&=g,u!==0&&(i=va(u)))}else g=a&~l,g!==0?i=va(g):u!==0&&(i=va(u));if(i===0)return 0;if(t!==0&&t!==i&&(t&l)===0&&(l=i&-i,u=t&-t,l>=u||l===16&&(u&4194240)!==0))return t;if((i&4)!==0&&(i|=a&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0<t;)a=31-kt(t),l=1<<a,i|=e[a],t&=~l;return i}function Sg(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Eg(e,t){for(var a=e.suspendedLanes,i=e.pingedLanes,l=e.expirationTimes,u=e.pendingLanes;0<u;){var g=31-kt(u),y=1<<g,N=l[g];N===-1?((y&a)===0||(y&i)!==0)&&(l[g]=Sg(y,t)):N<=t&&(e.expiredLanes|=y),u&=~y}}function pi(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Mc(){var e=Sn;return Sn<<=1,(Sn&4194240)===0&&(Sn=64),e}function fi(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function ya(e,t,a){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-kt(t),e[t]=a}function _g(e,t){var a=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0<a;){var l=31-kt(a),u=1<<l;t[l]=0,i[l]=-1,e[l]=-1,a&=~u}}function hi(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var i=31-kt(a),l=1<<i;l&t|e[i]&t&&(e[i]|=t),a&=~l}}var _e=0;function Pc(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Lc,gi,Dc,Tc,Ic,mi=!1,zn=[],Wt=null,Ht=null,Xt=null,wa=new Map,ka=new Map,Kt=[],zg="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 submit".split(" ");function Ac(e,t){switch(e){case"focusin":case"focusout":Wt=null;break;case"dragenter":case"dragleave":Ht=null;break;case"mouseover":case"mouseout":Xt=null;break;case"pointerover":case"pointerout":wa.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ka.delete(t.pointerId)}}function ja(e,t,a,i,l,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:a,eventSystemFlags:i,nativeEvent:u,targetContainers:[l]},t!==null&&(t=Aa(t),t!==null&&gi(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function Rg(e,t,a,i,l){switch(t){case"focusin":return Wt=ja(Wt,e,t,a,i,l),!0;case"dragenter":return Ht=ja(Ht,e,t,a,i,l),!0;case"mouseover":return Xt=ja(Xt,e,t,a,i,l),!0;case"pointerover":var u=l.pointerId;return wa.set(u,ja(wa.get(u)||null,e,t,a,i,l)),!0;case"gotpointercapture":return u=l.pointerId,ka.set(u,ja(ka.get(u)||null,e,t,a,i,l)),!0}return!1}function Oc(e){var t=gr(e.target);if(t!==null){var a=hr(t);if(a!==null){if(t=a.tag,t===13){if(t=jc(a),t!==null){e.blockedOn=t,Ic(e.priority,function(){Dc(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Rn(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=xi(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(a===null){a=e.nativeEvent;var i=new a.constructor(a.type,a);oi=i,a.target.dispatchEvent(i),oi=null}else return t=Aa(a),t!==null&&gi(t),e.blockedOn=a,!1;t.shift()}return!0}function $c(e,t,a){Rn(e)&&a.delete(t)}function Mg(){mi=!1,Wt!==null&&Rn(Wt)&&(Wt=null),Ht!==null&&Rn(Ht)&&(Ht=null),Xt!==null&&Rn(Xt)&&(Xt=null),wa.forEach($c),ka.forEach($c)}function Na(e,t){e.blockedOn===t&&(e.blockedOn=null,mi||(mi=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Mg)))}function Ca(e){function t(l){return Na(l,e)}if(0<zn.length){Na(zn[0],e);for(var a=1;a<zn.length;a++){var i=zn[a];i.blockedOn===e&&(i.blockedOn=null)}}for(Wt!==null&&Na(Wt,e),Ht!==null&&Na(Ht,e),Xt!==null&&Na(Xt,e),wa.forEach(t),ka.forEach(t),a=0;a<Kt.length;a++)i=Kt[a],i.blockedOn===e&&(i.blockedOn=null);for(;0<Kt.length&&(a=Kt[0],a.blockedOn===null);)Oc(a),a.blockedOn===null&&Kt.shift()}var Or=J.ReactCurrentBatchConfig,Mn=!0;function Pg(e,t,a,i){var l=_e,u=Or.transition;Or.transition=null;try{_e=1,bi(e,t,a,i)}finally{_e=l,Or.transition=u}}function Lg(e,t,a,i){var l=_e,u=Or.transition;Or.transition=null;try{_e=4,bi(e,t,a,i)}finally{_e=l,Or.transition=u}}function bi(e,t,a,i){if(Mn){var l=xi(e,t,a,i);if(l===null)Ti(e,t,i,Pn,a),Ac(e,i);else if(Rg(l,e,t,a,i))i.stopPropagation();else if(Ac(e,i),t&4&&-1<zg.indexOf(e)){for(;l!==null;){var u=Aa(l);if(u!==null&&Lc(u),u=xi(e,t,a,i),u===null&&Ti(e,t,i,Pn,a),u===l)break;l=u}l!==null&&i.stopPropagation()}else Ti(e,t,i,null,a)}}var Pn=null;function xi(e,t,a,i){if(Pn=null,e=ii(i),e=gr(e),e!==null)if(t=hr(e),t===null)e=null;else if(a=t.tag,a===13){if(e=jc(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Pn=e,null}function Fc(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(yg()){case ui:return 1;case zc:return 4;case Nn:case wg:return 16;case Rc:return 536870912;default:return 16}default:return 16}}var Qt=null,vi=null,Ln=null;function Uc(){if(Ln)return Ln;var e,t=vi,a=t.length,i,l="value"in Qt?Qt.value:Qt.textContent,u=l.length;for(e=0;e<a&&t[e]===l[e];e++);var g=a-e;for(i=1;i<=g&&t[a-i]===l[u-i];i++);return Ln=l.slice(e,1<i?1-i:void 0)}function Dn(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 Tn(){return!0}function qc(){return!1}function st(e){function t(a,i,l,u,g){this._reactName=a,this._targetInst=l,this.type=i,this.nativeEvent=u,this.target=g,this.currentTarget=null;for(var y in e)e.hasOwnProperty(y)&&(a=e[y],this[y]=a?a(u):u[y]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Tn:qc,this.isPropagationStopped=qc,this}return T(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Tn)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Tn)},persist:function(){},isPersistent:Tn}),t}var $r={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yi=st($r),Sa=T({},$r,{view:0,detail:0}),Dg=st(Sa),wi,ki,Ea,In=T({},Sa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ni,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!==Ea&&(Ea&&e.type==="mousemove"?(wi=e.screenX-Ea.screenX,ki=e.screenY-Ea.screenY):ki=wi=0,Ea=e),wi)},movementY:function(e){return"movementY"in e?e.movementY:ki}}),Vc=st(In),Tg=T({},In,{dataTransfer:0}),Ig=st(Tg),Ag=T({},Sa,{relatedTarget:0}),ji=st(Ag),Og=T({},$r,{animationName:0,elapsedTime:0,pseudoElement:0}),$g=st(Og),Fg=T({},$r,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ug=st(Fg),qg=T({},$r,{data:0}),Bc=st(qg),Vg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Bg={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"},Wg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Hg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Wg[e])?!!t[e]:!1}function Ni(){return Hg}var Xg=T({},Sa,{key:function(e){if(e.key){var t=Vg[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Dn(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Bg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ni,charCode:function(e){return e.type==="keypress"?Dn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Dn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Kg=st(Xg),Qg=T({},In,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Wc=st(Qg),Yg=T({},Sa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ni}),Zg=st(Yg),Jg=T({},$r,{propertyName:0,elapsedTime:0,pseudoElement:0}),Gg=st(Jg),em=T({},In,{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}),tm=st(em),rm=[9,13,27,32],Ci=h&&"CompositionEvent"in window,_a=null;h&&"documentMode"in document&&(_a=document.documentMode);var am=h&&"TextEvent"in window&&!_a,Hc=h&&(!Ci||_a&&8<_a&&11>=_a),Xc=" ",Kc=!1;function Qc(e,t){switch(e){case"keyup":return rm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Fr=!1;function nm(e,t){switch(e){case"compositionend":return Yc(t);case"keypress":return t.which!==32?null:(Kc=!0,Xc);case"textInput":return e=t.data,e===Xc&&Kc?null:e;default:return null}}function om(e,t){if(Fr)return e==="compositionend"||!Ci&&Qc(e,t)?(e=Uc(),Ln=vi=Qt=null,Fr=!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 Hc&&t.locale!=="ko"?null:t.data;default:return null}}var im={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 Zc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!im[e.type]:t==="textarea"}function Jc(e,t,a,i){xc(i),t=Un(t,"onChange"),0<t.length&&(a=new yi("onChange","change",null,a,i),e.push({event:a,listeners:t}))}var za=null,Ra=null;function sm(e){md(e,0)}function An(e){var t=Wr(e);if(ic(t))return e}function lm(e,t){if(e==="change")return t}var Gc=!1;if(h){var Si;if(h){var Ei="oninput"in document;if(!Ei){var ed=document.createElement("div");ed.setAttribute("oninput","return;"),Ei=typeof ed.oninput=="function"}Si=Ei}else Si=!1;Gc=Si&&(!document.documentMode||9<document.documentMode)}function td(){za&&(za.detachEvent("onpropertychange",rd),Ra=za=null)}function rd(e){if(e.propertyName==="value"&&An(Ra)){var t=[];Jc(t,Ra,e,ii(e)),kc(sm,t)}}function cm(e,t,a){e==="focusin"?(td(),za=t,Ra=a,za.attachEvent("onpropertychange",rd)):e==="focusout"&&td()}function dm(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return An(Ra)}function um(e,t){if(e==="click")return An(t)}function pm(e,t){if(e==="input"||e==="change")return An(t)}function fm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var jt=typeof Object.is=="function"?Object.is:fm;function Ma(e,t){if(jt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(i=0;i<a.length;i++){var l=a[i];if(!m.call(t,l)||!jt(e[l],t[l]))return!1}return!0}function ad(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function nd(e,t){var a=ad(e);e=0;for(var i;a;){if(a.nodeType===3){if(i=e+a.textContent.length,e<=t&&i>=t)return{node:a,offset:t-e};e=i}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=ad(a)}}function od(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?od(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function id(){for(var e=window,t=yn();t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=yn(e.document)}return t}function _i(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")}function hm(e){var t=id(),a=e.focusedElem,i=e.selectionRange;if(t!==a&&a&&a.ownerDocument&&od(a.ownerDocument.documentElement,a)){if(i!==null&&_i(a)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in a)a.selectionStart=t,a.selectionEnd=Math.min(e,a.value.length);else if(e=(t=a.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=a.textContent.length,u=Math.min(i.start,l);i=i.end===void 0?u:Math.min(i.end,l),!e.extend&&u>i&&(l=i,i=u,u=l),l=nd(a,u);var g=nd(a,i);l&&g&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==g.node||e.focusOffset!==g.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),u>i?(e.addRange(t),e.extend(g.node,g.offset)):(t.setEnd(g.node,g.offset),e.addRange(t)))}}for(t=[],e=a;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<t.length;a++)e=t[a],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var gm=h&&"documentMode"in document&&11>=document.documentMode,Ur=null,zi=null,Pa=null,Ri=!1;function sd(e,t,a){var i=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Ri||Ur==null||Ur!==yn(i)||(i=Ur,"selectionStart"in i&&_i(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Pa&&Ma(Pa,i)||(Pa=i,i=Un(zi,"onSelect"),0<i.length&&(t=new yi("onSelect","select",null,t,a),e.push({event:t,listeners:i}),t.target=Ur)))}function On(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var qr={animationend:On("Animation","AnimationEnd"),animationiteration:On("Animation","AnimationIteration"),animationstart:On("Animation","AnimationStart"),transitionend:On("Transition","TransitionEnd")},Mi={},ld={};h&&(ld=document.createElement("div").style,"AnimationEvent"in window||(delete qr.animationend.animation,delete qr.animationiteration.animation,delete qr.animationstart.animation),"TransitionEvent"in window||delete qr.transitionend.transition);function $n(e){if(Mi[e])return Mi[e];if(!qr[e])return e;var t=qr[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in ld)return Mi[e]=t[a];return e}var cd=$n("animationend"),dd=$n("animationiteration"),ud=$n("animationstart"),pd=$n("transitionend"),fd=new Map,hd="abort auxClick 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(" ");function Yt(e,t){fd.set(e,t),p(t,[e])}for(var Pi=0;Pi<hd.length;Pi++){var Li=hd[Pi],mm=Li.toLowerCase(),bm=Li[0].toUpperCase()+Li.slice(1);Yt(mm,"on"+bm)}Yt(cd,"onAnimationEnd"),Yt(dd,"onAnimationIteration"),Yt(ud,"onAnimationStart"),Yt("dblclick","onDoubleClick"),Yt("focusin","onFocus"),Yt("focusout","onBlur"),Yt(pd,"onTransitionEnd"),f("onMouseEnter",["mouseout","mouseover"]),f("onMouseLeave",["mouseout","mouseover"]),f("onPointerEnter",["pointerout","pointerover"]),f("onPointerLeave",["pointerout","pointerover"]),p("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),p("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),p("onBeforeInput",["compositionend","keypress","textInput","paste"]),p("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),p("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),p("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var La="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(" "),xm=new Set("cancel close invalid load scroll toggle".split(" ").concat(La));function gd(e,t,a){var i=e.type||"unknown-event";e.currentTarget=a,mg(i,t,void 0,e),e.currentTarget=null}function md(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var i=e[a],l=i.event;i=i.listeners;e:{var u=void 0;if(t)for(var g=i.length-1;0<=g;g--){var y=i[g],N=y.instance,P=y.currentTarget;if(y=y.listener,N!==u&&l.isPropagationStopped())break e;gd(l,y,P),u=N}else for(g=0;g<i.length;g++){if(y=i[g],N=y.instance,P=y.currentTarget,y=y.listener,N!==u&&l.isPropagationStopped())break e;gd(l,y,P),u=N}}}if(jn)throw e=di,jn=!1,di=null,e}function Re(e,t){var a=t[Ui];a===void 0&&(a=t[Ui]=new Set);var i=e+"__bubble";a.has(i)||(bd(t,e,2,!1),a.add(i))}function Di(e,t,a){var i=0;t&&(i|=4),bd(a,e,i,t)}var Fn="_reactListening"+Math.random().toString(36).slice(2);function Da(e){if(!e[Fn]){e[Fn]=!0,s.forEach(function(a){a!=="selectionchange"&&(xm.has(a)||Di(a,!1,e),Di(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Fn]||(t[Fn]=!0,Di("selectionchange",!1,t))}}function bd(e,t,a,i){switch(Fc(t)){case 1:var l=Pg;break;case 4:l=Lg;break;default:l=bi}a=l.bind(null,t,a,e),l=void 0,!ci||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),i?l!==void 0?e.addEventListener(t,a,{capture:!0,passive:l}):e.addEventListener(t,a,!0):l!==void 0?e.addEventListener(t,a,{passive:l}):e.addEventListener(t,a,!1)}function Ti(e,t,a,i,l){var u=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var g=i.tag;if(g===3||g===4){var y=i.stateNode.containerInfo;if(y===l||y.nodeType===8&&y.parentNode===l)break;if(g===4)for(g=i.return;g!==null;){var N=g.tag;if((N===3||N===4)&&(N=g.stateNode.containerInfo,N===l||N.nodeType===8&&N.parentNode===l))return;g=g.return}for(;y!==null;){if(g=gr(y),g===null)return;if(N=g.tag,N===5||N===6){i=u=g;continue e}y=y.parentNode}}i=i.return}kc(function(){var P=u,A=ii(a),O=[];e:{var I=fd.get(e);if(I!==void 0){var Y=yi,ae=e;switch(e){case"keypress":if(Dn(a)===0)break e;case"keydown":case"keyup":Y=Kg;break;case"focusin":ae="focus",Y=ji;break;case"focusout":ae="blur",Y=ji;break;case"beforeblur":case"afterblur":Y=ji;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Y=Vc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=Ig;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=Zg;break;case cd:case dd:case ud:Y=$g;break;case pd:Y=Gg;break;case"scroll":Y=Dg;break;case"wheel":Y=tm;break;case"copy":case"cut":case"paste":Y=Ug;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=Wc}var ne=(t&4)!==0,Oe=!ne&&e==="scroll",z=ne?I!==null?I+"Capture":null:I;ne=[];for(var S=P,R;S!==null;){R=S;var q=R.stateNode;if(R.tag===5&&q!==null&&(R=q,z!==null&&(q=ma(S,z),q!=null&&ne.push(Ta(S,q,R)))),Oe)break;S=S.return}0<ne.length&&(I=new Y(I,ae,null,a,A),O.push({event:I,listeners:ne}))}}if((t&7)===0){e:{if(I=e==="mouseover"||e==="pointerover",Y=e==="mouseout"||e==="pointerout",I&&a!==oi&&(ae=a.relatedTarget||a.fromElement)&&(gr(ae)||ae[Tt]))break e;if((Y||I)&&(I=A.window===A?A:(I=A.ownerDocument)?I.defaultView||I.parentWindow:window,Y?(ae=a.relatedTarget||a.toElement,Y=P,ae=ae?gr(ae):null,ae!==null&&(Oe=hr(ae),ae!==Oe||ae.tag!==5&&ae.tag!==6)&&(ae=null)):(Y=null,ae=P),Y!==ae)){if(ne=Vc,q="onMouseLeave",z="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(ne=Wc,q="onPointerLeave",z="onPointerEnter",S="pointer"),Oe=Y==null?I:Wr(Y),R=ae==null?I:Wr(ae),I=new ne(q,S+"leave",Y,a,A),I.target=Oe,I.relatedTarget=R,q=null,gr(A)===P&&(ne=new ne(z,S+"enter",ae,a,A),ne.target=R,ne.relatedTarget=Oe,q=ne),Oe=q,Y&&ae)t:{for(ne=Y,z=ae,S=0,R=ne;R;R=Vr(R))S++;for(R=0,q=z;q;q=Vr(q))R++;for(;0<S-R;)ne=Vr(ne),S--;for(;0<R-S;)z=Vr(z),R--;for(;S--;){if(ne===z||z!==null&&ne===z.alternate)break t;ne=Vr(ne),z=Vr(z)}ne=null}else ne=null;Y!==null&&xd(O,I,Y,ne,!1),ae!==null&&Oe!==null&&xd(O,Oe,ae,ne,!0)}}e:{if(I=P?Wr(P):window,Y=I.nodeName&&I.nodeName.toLowerCase(),Y==="select"||Y==="input"&&I.type==="file")var ie=lm;else if(Zc(I))if(Gc)ie=pm;else{ie=dm;var le=cm}else(Y=I.nodeName)&&Y.toLowerCase()==="input"&&(I.type==="checkbox"||I.type==="radio")&&(ie=um);if(ie&&(ie=ie(e,P))){Jc(O,ie,a,A);break e}le&&le(e,I,P),e==="focusout"&&(le=I._wrapperState)&&le.controlled&&I.type==="number"&&ei(I,"number",I.value)}switch(le=P?Wr(P):window,e){case"focusin":(Zc(le)||le.contentEditable==="true")&&(Ur=le,zi=P,Pa=null);break;case"focusout":Pa=zi=Ur=null;break;case"mousedown":Ri=!0;break;case"contextmenu":case"mouseup":case"dragend":Ri=!1,sd(O,a,A);break;case"selectionchange":if(gm)break;case"keydown":case"keyup":sd(O,a,A)}var ce;if(Ci)e:{switch(e){case"compositionstart":var he="onCompositionStart";break e;case"compositionend":he="onCompositionEnd";break e;case"compositionupdate":he="onCompositionUpdate";break e}he=void 0}else Fr?Qc(e,a)&&(he="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(he="onCompositionStart");he&&(Hc&&a.locale!=="ko"&&(Fr||he!=="onCompositionStart"?he==="onCompositionEnd"&&Fr&&(ce=Uc()):(Qt=A,vi="value"in Qt?Qt.value:Qt.textContent,Fr=!0)),le=Un(P,he),0<le.length&&(he=new Bc(he,e,null,a,A),O.push({event:he,listeners:le}),ce?he.data=ce:(ce=Yc(a),ce!==null&&(he.data=ce)))),(ce=am?nm(e,a):om(e,a))&&(P=Un(P,"onBeforeInput"),0<P.length&&(A=new Bc("onBeforeInput","beforeinput",null,a,A),O.push({event:A,listeners:P}),A.data=ce))}md(O,t)})}function Ta(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Un(e,t){for(var a=t+"Capture",i=[];e!==null;){var l=e,u=l.stateNode;l.tag===5&&u!==null&&(l=u,u=ma(e,a),u!=null&&i.unshift(Ta(e,u,l)),u=ma(e,t),u!=null&&i.push(Ta(e,u,l))),e=e.return}return i}function Vr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function xd(e,t,a,i,l){for(var u=t._reactName,g=[];a!==null&&a!==i;){var y=a,N=y.alternate,P=y.stateNode;if(N!==null&&N===i)break;y.tag===5&&P!==null&&(y=P,l?(N=ma(a,u),N!=null&&g.unshift(Ta(a,N,y))):l||(N=ma(a,u),N!=null&&g.push(Ta(a,N,y)))),a=a.return}g.length!==0&&e.push({event:t,listeners:g})}var vm=/\r\n?/g,ym=/\u0000|\uFFFD/g;function vd(e){return(typeof e=="string"?e:""+e).replace(vm,`
|
|
6
|
+
`).replace(ym,"")}function qn(e,t,a){if(t=vd(t),vd(e)!==t&&a)throw Error(o(425))}function Vn(){}var Ii=null,Ai=null;function Oi(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var $i=typeof setTimeout=="function"?setTimeout:void 0,wm=typeof clearTimeout=="function"?clearTimeout:void 0,yd=typeof Promise=="function"?Promise:void 0,km=typeof queueMicrotask=="function"?queueMicrotask:typeof yd<"u"?function(e){return yd.resolve(null).then(e).catch(jm)}:$i;function jm(e){setTimeout(function(){throw e})}function Fi(e,t){var a=t,i=0;do{var l=a.nextSibling;if(e.removeChild(a),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(i===0){e.removeChild(l),Ca(t);return}i--}else a!=="$"&&a!=="$?"&&a!=="$!"||i++;a=l}while(a);Ca(t)}function Zt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function wd(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"){if(t===0)return e;t--}else a==="/$"&&t++}e=e.previousSibling}return null}var Br=Math.random().toString(36).slice(2),Mt="__reactFiber$"+Br,Ia="__reactProps$"+Br,Tt="__reactContainer$"+Br,Ui="__reactEvents$"+Br,Nm="__reactListeners$"+Br,Cm="__reactHandles$"+Br;function gr(e){var t=e[Mt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Tt]||a[Mt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=wd(e);e!==null;){if(a=e[Mt])return a;e=wd(e)}return t}e=a,a=e.parentNode}return null}function Aa(e){return e=e[Mt]||e[Tt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Wr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(o(33))}function Bn(e){return e[Ia]||null}var qi=[],Hr=-1;function Jt(e){return{current:e}}function Me(e){0>Hr||(e.current=qi[Hr],qi[Hr]=null,Hr--)}function ze(e,t){Hr++,qi[Hr]=e.current,e.current=t}var Gt={},Xe=Jt(Gt),et=Jt(!1),mr=Gt;function Xr(e,t){var a=e.type.contextTypes;if(!a)return Gt;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var l={},u;for(u in a)l[u]=t[u];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function tt(e){return e=e.childContextTypes,e!=null}function Wn(){Me(et),Me(Xe)}function kd(e,t,a){if(Xe.current!==Gt)throw Error(o(168));ze(Xe,t),ze(et,a)}function jd(e,t,a){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return a;i=i.getChildContext();for(var l in i)if(!(l in t))throw Error(o(108,Ne(e)||"Unknown",l));return T({},a,i)}function Hn(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Gt,mr=Xe.current,ze(Xe,e),ze(et,et.current),!0}function Nd(e,t,a){var i=e.stateNode;if(!i)throw Error(o(169));a?(e=jd(e,t,mr),i.__reactInternalMemoizedMergedChildContext=e,Me(et),Me(Xe),ze(Xe,e)):Me(et),ze(et,a)}var It=null,Xn=!1,Vi=!1;function Cd(e){It===null?It=[e]:It.push(e)}function Sm(e){Xn=!0,Cd(e)}function er(){if(!Vi&&It!==null){Vi=!0;var e=0,t=_e;try{var a=It;for(_e=1;e<a.length;e++){var i=a[e];do i=i(!0);while(i!==null)}It=null,Xn=!1}catch(l){throw It!==null&&(It=It.slice(e+1)),Ec(ui,er),l}finally{_e=t,Vi=!1}}return null}var Kr=[],Qr=0,Kn=null,Qn=0,ft=[],ht=0,br=null,At=1,Ot="";function xr(e,t){Kr[Qr++]=Qn,Kr[Qr++]=Kn,Kn=e,Qn=t}function Sd(e,t,a){ft[ht++]=At,ft[ht++]=Ot,ft[ht++]=br,br=e;var i=At;e=Ot;var l=32-kt(i)-1;i&=~(1<<l),a+=1;var u=32-kt(t)+l;if(30<u){var g=l-l%5;u=(i&(1<<g)-1).toString(32),i>>=g,l-=g,At=1<<32-kt(t)+l|a<<l|i,Ot=u+e}else At=1<<u|a<<l|i,Ot=e}function Bi(e){e.return!==null&&(xr(e,1),Sd(e,1,0))}function Wi(e){for(;e===Kn;)Kn=Kr[--Qr],Kr[Qr]=null,Qn=Kr[--Qr],Kr[Qr]=null;for(;e===br;)br=ft[--ht],ft[ht]=null,Ot=ft[--ht],ft[ht]=null,At=ft[--ht],ft[ht]=null}var lt=null,ct=null,Le=!1,Nt=null;function Ed(e,t){var a=xt(5,null,null,0);a.elementType="DELETED",a.stateNode=t,a.return=e,t=e.deletions,t===null?(e.deletions=[a],e.flags|=16):t.push(a)}function _d(e,t){switch(e.tag){case 5:var a=e.type;return t=t.nodeType!==1||a.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,lt=e,ct=Zt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,lt=e,ct=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(a=br!==null?{id:At,overflow:Ot}:null,e.memoizedState={dehydrated:t,treeContext:a,retryLane:1073741824},a=xt(18,null,null,0),a.stateNode=t,a.return=e,e.child=a,lt=e,ct=null,!0):!1;default:return!1}}function Hi(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Xi(e){if(Le){var t=ct;if(t){var a=t;if(!_d(e,t)){if(Hi(e))throw Error(o(418));t=Zt(a.nextSibling);var i=lt;t&&_d(e,t)?Ed(i,a):(e.flags=e.flags&-4097|2,Le=!1,lt=e)}}else{if(Hi(e))throw Error(o(418));e.flags=e.flags&-4097|2,Le=!1,lt=e}}}function zd(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;lt=e}function Yn(e){if(e!==lt)return!1;if(!Le)return zd(e),Le=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Oi(e.type,e.memoizedProps)),t&&(t=ct)){if(Hi(e))throw Rd(),Error(o(418));for(;t;)Ed(e,t),t=Zt(t.nextSibling)}if(zd(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"){if(t===0){ct=Zt(e.nextSibling);break e}t--}else a!=="$"&&a!=="$!"&&a!=="$?"||t++}e=e.nextSibling}ct=null}}else ct=lt?Zt(e.stateNode.nextSibling):null;return!0}function Rd(){for(var e=ct;e;)e=Zt(e.nextSibling)}function Yr(){ct=lt=null,Le=!1}function Ki(e){Nt===null?Nt=[e]:Nt.push(e)}var Em=J.ReactCurrentBatchConfig;function Oa(e,t,a){if(e=a.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error(o(309));var i=a.stateNode}if(!i)throw Error(o(147,e));var l=i,u=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===u?t.ref:(t=function(g){var y=l.refs;g===null?delete y[u]:y[u]=g},t._stringRef=u,t)}if(typeof e!="string")throw Error(o(284));if(!a._owner)throw Error(o(290,e))}return e}function Zn(e,t){throw e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Md(e){var t=e._init;return t(e._payload)}function Pd(e){function t(z,S){if(e){var R=z.deletions;R===null?(z.deletions=[S],z.flags|=16):R.push(S)}}function a(z,S){if(!e)return null;for(;S!==null;)t(z,S),S=S.sibling;return null}function i(z,S){for(z=new Map;S!==null;)S.key!==null?z.set(S.key,S):z.set(S.index,S),S=S.sibling;return z}function l(z,S){return z=lr(z,S),z.index=0,z.sibling=null,z}function u(z,S,R){return z.index=R,e?(R=z.alternate,R!==null?(R=R.index,R<S?(z.flags|=2,S):R):(z.flags|=2,S)):(z.flags|=1048576,S)}function g(z){return e&&z.alternate===null&&(z.flags|=2),z}function y(z,S,R,q){return S===null||S.tag!==6?(S=Os(R,z.mode,q),S.return=z,S):(S=l(S,R),S.return=z,S)}function N(z,S,R,q){var ie=R.type;return ie===X?A(z,S,R.props.children,q,R.key):S!==null&&(S.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===ve&&Md(ie)===S.type)?(q=l(S,R.props),q.ref=Oa(z,S,R),q.return=z,q):(q=ko(R.type,R.key,R.props,null,z.mode,q),q.ref=Oa(z,S,R),q.return=z,q)}function P(z,S,R,q){return S===null||S.tag!==4||S.stateNode.containerInfo!==R.containerInfo||S.stateNode.implementation!==R.implementation?(S=$s(R,z.mode,q),S.return=z,S):(S=l(S,R.children||[]),S.return=z,S)}function A(z,S,R,q,ie){return S===null||S.tag!==7?(S=Sr(R,z.mode,q,ie),S.return=z,S):(S=l(S,R),S.return=z,S)}function O(z,S,R){if(typeof S=="string"&&S!==""||typeof S=="number")return S=Os(""+S,z.mode,R),S.return=z,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case re:return R=ko(S.type,S.key,S.props,null,z.mode,R),R.ref=Oa(z,null,S),R.return=z,R;case $:return S=$s(S,z.mode,R),S.return=z,S;case ve:var q=S._init;return O(z,q(S._payload),R)}if(fa(S)||D(S))return S=Sr(S,z.mode,R,null),S.return=z,S;Zn(z,S)}return null}function I(z,S,R,q){var ie=S!==null?S.key:null;if(typeof R=="string"&&R!==""||typeof R=="number")return ie!==null?null:y(z,S,""+R,q);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case re:return R.key===ie?N(z,S,R,q):null;case $:return R.key===ie?P(z,S,R,q):null;case ve:return ie=R._init,I(z,S,ie(R._payload),q)}if(fa(R)||D(R))return ie!==null?null:A(z,S,R,q,null);Zn(z,R)}return null}function Y(z,S,R,q,ie){if(typeof q=="string"&&q!==""||typeof q=="number")return z=z.get(R)||null,y(S,z,""+q,ie);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case re:return z=z.get(q.key===null?R:q.key)||null,N(S,z,q,ie);case $:return z=z.get(q.key===null?R:q.key)||null,P(S,z,q,ie);case ve:var le=q._init;return Y(z,S,R,le(q._payload),ie)}if(fa(q)||D(q))return z=z.get(R)||null,A(S,z,q,ie,null);Zn(S,q)}return null}function ae(z,S,R,q){for(var ie=null,le=null,ce=S,he=S=0,Be=null;ce!==null&&he<R.length;he++){ce.index>he?(Be=ce,ce=null):Be=ce.sibling;var Ee=I(z,ce,R[he],q);if(Ee===null){ce===null&&(ce=Be);break}e&&ce&&Ee.alternate===null&&t(z,ce),S=u(Ee,S,he),le===null?ie=Ee:le.sibling=Ee,le=Ee,ce=Be}if(he===R.length)return a(z,ce),Le&&xr(z,he),ie;if(ce===null){for(;he<R.length;he++)ce=O(z,R[he],q),ce!==null&&(S=u(ce,S,he),le===null?ie=ce:le.sibling=ce,le=ce);return Le&&xr(z,he),ie}for(ce=i(z,ce);he<R.length;he++)Be=Y(ce,z,he,R[he],q),Be!==null&&(e&&Be.alternate!==null&&ce.delete(Be.key===null?he:Be.key),S=u(Be,S,he),le===null?ie=Be:le.sibling=Be,le=Be);return e&&ce.forEach(function(cr){return t(z,cr)}),Le&&xr(z,he),ie}function ne(z,S,R,q){var ie=D(R);if(typeof ie!="function")throw Error(o(150));if(R=ie.call(R),R==null)throw Error(o(151));for(var le=ie=null,ce=S,he=S=0,Be=null,Ee=R.next();ce!==null&&!Ee.done;he++,Ee=R.next()){ce.index>he?(Be=ce,ce=null):Be=ce.sibling;var cr=I(z,ce,Ee.value,q);if(cr===null){ce===null&&(ce=Be);break}e&&ce&&cr.alternate===null&&t(z,ce),S=u(cr,S,he),le===null?ie=cr:le.sibling=cr,le=cr,ce=Be}if(Ee.done)return a(z,ce),Le&&xr(z,he),ie;if(ce===null){for(;!Ee.done;he++,Ee=R.next())Ee=O(z,Ee.value,q),Ee!==null&&(S=u(Ee,S,he),le===null?ie=Ee:le.sibling=Ee,le=Ee);return Le&&xr(z,he),ie}for(ce=i(z,ce);!Ee.done;he++,Ee=R.next())Ee=Y(ce,z,he,Ee.value,q),Ee!==null&&(e&&Ee.alternate!==null&&ce.delete(Ee.key===null?he:Ee.key),S=u(Ee,S,he),le===null?ie=Ee:le.sibling=Ee,le=Ee);return e&&ce.forEach(function(ib){return t(z,ib)}),Le&&xr(z,he),ie}function Oe(z,S,R,q){if(typeof R=="object"&&R!==null&&R.type===X&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case re:e:{for(var ie=R.key,le=S;le!==null;){if(le.key===ie){if(ie=R.type,ie===X){if(le.tag===7){a(z,le.sibling),S=l(le,R.props.children),S.return=z,z=S;break e}}else if(le.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===ve&&Md(ie)===le.type){a(z,le.sibling),S=l(le,R.props),S.ref=Oa(z,le,R),S.return=z,z=S;break e}a(z,le);break}else t(z,le);le=le.sibling}R.type===X?(S=Sr(R.props.children,z.mode,q,R.key),S.return=z,z=S):(q=ko(R.type,R.key,R.props,null,z.mode,q),q.ref=Oa(z,S,R),q.return=z,z=q)}return g(z);case $:e:{for(le=R.key;S!==null;){if(S.key===le)if(S.tag===4&&S.stateNode.containerInfo===R.containerInfo&&S.stateNode.implementation===R.implementation){a(z,S.sibling),S=l(S,R.children||[]),S.return=z,z=S;break e}else{a(z,S);break}else t(z,S);S=S.sibling}S=$s(R,z.mode,q),S.return=z,z=S}return g(z);case ve:return le=R._init,Oe(z,S,le(R._payload),q)}if(fa(R))return ae(z,S,R,q);if(D(R))return ne(z,S,R,q);Zn(z,R)}return typeof R=="string"&&R!==""||typeof R=="number"?(R=""+R,S!==null&&S.tag===6?(a(z,S.sibling),S=l(S,R),S.return=z,z=S):(a(z,S),S=Os(R,z.mode,q),S.return=z,z=S),g(z)):a(z,S)}return Oe}var Zr=Pd(!0),Ld=Pd(!1),Jn=Jt(null),Gn=null,Jr=null,Qi=null;function Yi(){Qi=Jr=Gn=null}function Zi(e){var t=Jn.current;Me(Jn),e._currentValue=t}function Ji(e,t,a){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===a)break;e=e.return}}function Gr(e,t){Gn=e,Qi=Jr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(rt=!0),e.firstContext=null)}function gt(e){var t=e._currentValue;if(Qi!==e)if(e={context:e,memoizedValue:t,next:null},Jr===null){if(Gn===null)throw Error(o(308));Jr=e,Gn.dependencies={lanes:0,firstContext:e}}else Jr=Jr.next=e;return t}var vr=null;function Gi(e){vr===null?vr=[e]:vr.push(e)}function Dd(e,t,a,i){var l=t.interleaved;return l===null?(a.next=a,Gi(t)):(a.next=l.next,l.next=a),t.interleaved=a,$t(e,i)}function $t(e,t){e.lanes|=t;var a=e.alternate;for(a!==null&&(a.lanes|=t),a=e,e=e.return;e!==null;)e.childLanes|=t,a=e.alternate,a!==null&&(a.childLanes|=t),a=e,e=e.return;return a.tag===3?a.stateNode:null}var tr=!1;function es(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Td(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ft(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function rr(e,t,a){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(Ce&2)!==0){var l=i.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),i.pending=t,$t(e,a)}return l=i.interleaved,l===null?(t.next=t,Gi(i)):(t.next=l.next,l.next=t),i.interleaved=t,$t(e,a)}function eo(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194240)!==0)){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,hi(e,a)}}function Id(e,t){var a=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,a===i)){var l=null,u=null;if(a=a.firstBaseUpdate,a!==null){do{var g={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};u===null?l=u=g:u=u.next=g,a=a.next}while(a!==null);u===null?l=u=t:u=u.next=t}else l=u=t;a={baseState:i.baseState,firstBaseUpdate:l,lastBaseUpdate:u,shared:i.shared,effects:i.effects},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}function to(e,t,a,i){var l=e.updateQueue;tr=!1;var u=l.firstBaseUpdate,g=l.lastBaseUpdate,y=l.shared.pending;if(y!==null){l.shared.pending=null;var N=y,P=N.next;N.next=null,g===null?u=P:g.next=P,g=N;var A=e.alternate;A!==null&&(A=A.updateQueue,y=A.lastBaseUpdate,y!==g&&(y===null?A.firstBaseUpdate=P:y.next=P,A.lastBaseUpdate=N))}if(u!==null){var O=l.baseState;g=0,A=P=N=null,y=u;do{var I=y.lane,Y=y.eventTime;if((i&I)===I){A!==null&&(A=A.next={eventTime:Y,lane:0,tag:y.tag,payload:y.payload,callback:y.callback,next:null});e:{var ae=e,ne=y;switch(I=t,Y=a,ne.tag){case 1:if(ae=ne.payload,typeof ae=="function"){O=ae.call(Y,O,I);break e}O=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=ne.payload,I=typeof ae=="function"?ae.call(Y,O,I):ae,I==null)break e;O=T({},O,I);break e;case 2:tr=!0}}y.callback!==null&&y.lane!==0&&(e.flags|=64,I=l.effects,I===null?l.effects=[y]:I.push(y))}else Y={eventTime:Y,lane:I,tag:y.tag,payload:y.payload,callback:y.callback,next:null},A===null?(P=A=Y,N=O):A=A.next=Y,g|=I;if(y=y.next,y===null){if(y=l.shared.pending,y===null)break;I=y,y=I.next,I.next=null,l.lastBaseUpdate=I,l.shared.pending=null}}while(!0);if(A===null&&(N=O),l.baseState=N,l.firstBaseUpdate=P,l.lastBaseUpdate=A,t=l.shared.interleaved,t!==null){l=t;do g|=l.lane,l=l.next;while(l!==t)}else u===null&&(l.shared.lanes=0);kr|=g,e.lanes=g,e.memoizedState=O}}function Ad(e,t,a){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],l=i.callback;if(l!==null){if(i.callback=null,i=a,typeof l!="function")throw Error(o(191,l));l.call(i)}}}var $a={},Pt=Jt($a),Fa=Jt($a),Ua=Jt($a);function yr(e){if(e===$a)throw Error(o(174));return e}function ts(e,t){switch(ze(Ua,t),ze(Fa,e),ze(Pt,$a),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ri(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ri(t,e)}Me(Pt),ze(Pt,t)}function ea(){Me(Pt),Me(Fa),Me(Ua)}function Od(e){yr(Ua.current);var t=yr(Pt.current),a=ri(t,e.type);t!==a&&(ze(Fa,e),ze(Pt,a))}function rs(e){Fa.current===e&&(Me(Pt),Me(Fa))}var De=Jt(0);function ro(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){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 as=[];function ns(){for(var e=0;e<as.length;e++)as[e]._workInProgressVersionPrimary=null;as.length=0}var ao=J.ReactCurrentDispatcher,os=J.ReactCurrentBatchConfig,wr=0,Te=null,Fe=null,qe=null,no=!1,qa=!1,Va=0,_m=0;function Ke(){throw Error(o(321))}function is(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!jt(e[a],t[a]))return!1;return!0}function ss(e,t,a,i,l,u){if(wr=u,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ao.current=e===null||e.memoizedState===null?Pm:Lm,e=a(i,l),qa){u=0;do{if(qa=!1,Va=0,25<=u)throw Error(o(301));u+=1,qe=Fe=null,t.updateQueue=null,ao.current=Dm,e=a(i,l)}while(qa)}if(ao.current=so,t=Fe!==null&&Fe.next!==null,wr=0,qe=Fe=Te=null,no=!1,t)throw Error(o(300));return e}function ls(){var e=Va!==0;return Va=0,e}function Lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qe===null?Te.memoizedState=qe=e:qe=qe.next=e,qe}function mt(){if(Fe===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=Fe.next;var t=qe===null?Te.memoizedState:qe.next;if(t!==null)qe=t,Fe=e;else{if(e===null)throw Error(o(310));Fe=e,e={memoizedState:Fe.memoizedState,baseState:Fe.baseState,baseQueue:Fe.baseQueue,queue:Fe.queue,next:null},qe===null?Te.memoizedState=qe=e:qe=qe.next=e}return qe}function Ba(e,t){return typeof t=="function"?t(e):t}function cs(e){var t=mt(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var i=Fe,l=i.baseQueue,u=a.pending;if(u!==null){if(l!==null){var g=l.next;l.next=u.next,u.next=g}i.baseQueue=l=u,a.pending=null}if(l!==null){u=l.next,i=i.baseState;var y=g=null,N=null,P=u;do{var A=P.lane;if((wr&A)===A)N!==null&&(N=N.next={lane:0,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null}),i=P.hasEagerState?P.eagerState:e(i,P.action);else{var O={lane:A,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null};N===null?(y=N=O,g=i):N=N.next=O,Te.lanes|=A,kr|=A}P=P.next}while(P!==null&&P!==u);N===null?g=i:N.next=y,jt(i,t.memoizedState)||(rt=!0),t.memoizedState=i,t.baseState=g,t.baseQueue=N,a.lastRenderedState=i}if(e=a.interleaved,e!==null){l=e;do u=l.lane,Te.lanes|=u,kr|=u,l=l.next;while(l!==e)}else l===null&&(a.lanes=0);return[t.memoizedState,a.dispatch]}function ds(e){var t=mt(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var i=a.dispatch,l=a.pending,u=t.memoizedState;if(l!==null){a.pending=null;var g=l=l.next;do u=e(u,g.action),g=g.next;while(g!==l);jt(u,t.memoizedState)||(rt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,i]}function $d(){}function Fd(e,t){var a=Te,i=mt(),l=t(),u=!jt(i.memoizedState,l);if(u&&(i.memoizedState=l,rt=!0),i=i.queue,us(Vd.bind(null,a,i,e),[e]),i.getSnapshot!==t||u||qe!==null&&qe.memoizedState.tag&1){if(a.flags|=2048,Wa(9,qd.bind(null,a,i,l,t),void 0,null),Ve===null)throw Error(o(349));(wr&30)!==0||Ud(a,t,l)}return l}function Ud(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Te.updateQueue,t===null?(t={lastEffect:null,stores:null},Te.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function qd(e,t,a,i){t.value=a,t.getSnapshot=i,Bd(t)&&Wd(e)}function Vd(e,t,a){return a(function(){Bd(t)&&Wd(e)})}function Bd(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!jt(e,a)}catch{return!0}}function Wd(e){var t=$t(e,1);t!==null&&_t(t,e,1,-1)}function Hd(e){var t=Lt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ba,lastRenderedState:e},t.queue=e,e=e.dispatch=Mm.bind(null,Te,e),[t.memoizedState,e]}function Wa(e,t,a,i){return e={tag:e,create:t,destroy:a,deps:i,next:null},t=Te.updateQueue,t===null?(t={lastEffect:null,stores:null},Te.updateQueue=t,t.lastEffect=e.next=e):(a=t.lastEffect,a===null?t.lastEffect=e.next=e:(i=a.next,a.next=e,e.next=i,t.lastEffect=e)),e}function Xd(){return mt().memoizedState}function oo(e,t,a,i){var l=Lt();Te.flags|=e,l.memoizedState=Wa(1|t,a,void 0,i===void 0?null:i)}function io(e,t,a,i){var l=mt();i=i===void 0?null:i;var u=void 0;if(Fe!==null){var g=Fe.memoizedState;if(u=g.destroy,i!==null&&is(i,g.deps)){l.memoizedState=Wa(t,a,u,i);return}}Te.flags|=e,l.memoizedState=Wa(1|t,a,u,i)}function Kd(e,t){return oo(8390656,8,e,t)}function us(e,t){return io(2048,8,e,t)}function Qd(e,t){return io(4,2,e,t)}function Yd(e,t){return io(4,4,e,t)}function Zd(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Jd(e,t,a){return a=a!=null?a.concat([e]):null,io(4,4,Zd.bind(null,t,e),a)}function ps(){}function Gd(e,t){var a=mt();t=t===void 0?null:t;var i=a.memoizedState;return i!==null&&t!==null&&is(t,i[1])?i[0]:(a.memoizedState=[e,t],e)}function eu(e,t){var a=mt();t=t===void 0?null:t;var i=a.memoizedState;return i!==null&&t!==null&&is(t,i[1])?i[0]:(e=e(),a.memoizedState=[e,t],e)}function tu(e,t,a){return(wr&21)===0?(e.baseState&&(e.baseState=!1,rt=!0),e.memoizedState=a):(jt(a,t)||(a=Mc(),Te.lanes|=a,kr|=a,e.baseState=!0),t)}function zm(e,t){var a=_e;_e=a!==0&&4>a?a:4,e(!0);var i=os.transition;os.transition={};try{e(!1),t()}finally{_e=a,os.transition=i}}function ru(){return mt().memoizedState}function Rm(e,t,a){var i=ir(e);if(a={lane:i,action:a,hasEagerState:!1,eagerState:null,next:null},au(e))nu(t,a);else if(a=Dd(e,t,a,i),a!==null){var l=Je();_t(a,e,i,l),ou(a,t,i)}}function Mm(e,t,a){var i=ir(e),l={lane:i,action:a,hasEagerState:!1,eagerState:null,next:null};if(au(e))nu(t,l);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var g=t.lastRenderedState,y=u(g,a);if(l.hasEagerState=!0,l.eagerState=y,jt(y,g)){var N=t.interleaved;N===null?(l.next=l,Gi(t)):(l.next=N.next,N.next=l),t.interleaved=l;return}}catch{}a=Dd(e,t,l,i),a!==null&&(l=Je(),_t(a,e,i,l),ou(a,t,i))}}function au(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function nu(e,t){qa=no=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function ou(e,t,a){if((a&4194240)!==0){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,hi(e,a)}}var so={readContext:gt,useCallback:Ke,useContext:Ke,useEffect:Ke,useImperativeHandle:Ke,useInsertionEffect:Ke,useLayoutEffect:Ke,useMemo:Ke,useReducer:Ke,useRef:Ke,useState:Ke,useDebugValue:Ke,useDeferredValue:Ke,useTransition:Ke,useMutableSource:Ke,useSyncExternalStore:Ke,useId:Ke,unstable_isNewReconciler:!1},Pm={readContext:gt,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:gt,useEffect:Kd,useImperativeHandle:function(e,t,a){return a=a!=null?a.concat([e]):null,oo(4194308,4,Zd.bind(null,t,e),a)},useLayoutEffect:function(e,t){return oo(4194308,4,e,t)},useInsertionEffect:function(e,t){return oo(4,2,e,t)},useMemo:function(e,t){var a=Lt();return t=t===void 0?null:t,e=e(),a.memoizedState=[e,t],e},useReducer:function(e,t,a){var i=Lt();return t=a!==void 0?a(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=Rm.bind(null,Te,e),[i.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:Hd,useDebugValue:ps,useDeferredValue:function(e){return Lt().memoizedState=e},useTransition:function(){var e=Hd(!1),t=e[0];return e=zm.bind(null,e[1]),Lt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,a){var i=Te,l=Lt();if(Le){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),Ve===null)throw Error(o(349));(wr&30)!==0||Ud(i,t,a)}l.memoizedState=a;var u={value:a,getSnapshot:t};return l.queue=u,Kd(Vd.bind(null,i,u,e),[e]),i.flags|=2048,Wa(9,qd.bind(null,i,u,a,t),void 0,null),a},useId:function(){var e=Lt(),t=Ve.identifierPrefix;if(Le){var a=Ot,i=At;a=(i&~(1<<32-kt(i)-1)).toString(32)+a,t=":"+t+"R"+a,a=Va++,0<a&&(t+="H"+a.toString(32)),t+=":"}else a=_m++,t=":"+t+"r"+a.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Lm={readContext:gt,useCallback:Gd,useContext:gt,useEffect:us,useImperativeHandle:Jd,useInsertionEffect:Qd,useLayoutEffect:Yd,useMemo:eu,useReducer:cs,useRef:Xd,useState:function(){return cs(Ba)},useDebugValue:ps,useDeferredValue:function(e){var t=mt();return tu(t,Fe.memoizedState,e)},useTransition:function(){var e=cs(Ba)[0],t=mt().memoizedState;return[e,t]},useMutableSource:$d,useSyncExternalStore:Fd,useId:ru,unstable_isNewReconciler:!1},Dm={readContext:gt,useCallback:Gd,useContext:gt,useEffect:us,useImperativeHandle:Jd,useInsertionEffect:Qd,useLayoutEffect:Yd,useMemo:eu,useReducer:ds,useRef:Xd,useState:function(){return ds(Ba)},useDebugValue:ps,useDeferredValue:function(e){var t=mt();return Fe===null?t.memoizedState=e:tu(t,Fe.memoizedState,e)},useTransition:function(){var e=ds(Ba)[0],t=mt().memoizedState;return[e,t]},useMutableSource:$d,useSyncExternalStore:Fd,useId:ru,unstable_isNewReconciler:!1};function Ct(e,t){if(e&&e.defaultProps){t=T({},t),e=e.defaultProps;for(var a in e)t[a]===void 0&&(t[a]=e[a]);return t}return t}function fs(e,t,a,i){t=e.memoizedState,a=a(i,t),a=a==null?t:T({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var lo={isMounted:function(e){return(e=e._reactInternals)?hr(e)===e:!1},enqueueSetState:function(e,t,a){e=e._reactInternals;var i=Je(),l=ir(e),u=Ft(i,l);u.payload=t,a!=null&&(u.callback=a),t=rr(e,u,l),t!==null&&(_t(t,e,l,i),eo(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var i=Je(),l=ir(e),u=Ft(i,l);u.tag=1,u.payload=t,a!=null&&(u.callback=a),t=rr(e,u,l),t!==null&&(_t(t,e,l,i),eo(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Je(),i=ir(e),l=Ft(a,i);l.tag=2,t!=null&&(l.callback=t),t=rr(e,l,i),t!==null&&(_t(t,e,i,a),eo(t,e,i))}};function iu(e,t,a,i,l,u,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,u,g):t.prototype&&t.prototype.isPureReactComponent?!Ma(a,i)||!Ma(l,u):!0}function su(e,t,a){var i=!1,l=Gt,u=t.contextType;return typeof u=="object"&&u!==null?u=gt(u):(l=tt(t)?mr:Xe.current,i=t.contextTypes,u=(i=i!=null)?Xr(e,l):Gt),t=new t(a,u),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=lo,e.stateNode=t,t._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=u),t}function lu(e,t,a,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,i),t.state!==e&&lo.enqueueReplaceState(t,t.state,null)}function hs(e,t,a,i){var l=e.stateNode;l.props=a,l.state=e.memoizedState,l.refs={},es(e);var u=t.contextType;typeof u=="object"&&u!==null?l.context=gt(u):(u=tt(t)?mr:Xe.current,l.context=Xr(e,u)),l.state=e.memoizedState,u=t.getDerivedStateFromProps,typeof u=="function"&&(fs(e,t,u,a),l.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(t=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),t!==l.state&&lo.enqueueReplaceState(l,l.state,null),to(e,a,l,i),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function ta(e,t){try{var a="",i=t;do a+=ue(i),i=i.return;while(i);var l=a}catch(u){l=`
|
|
7
|
+
Error generating stack: `+u.message+`
|
|
8
|
+
`+u.stack}return{value:e,source:t,stack:l,digest:null}}function gs(e,t,a){return{value:e,source:null,stack:a??null,digest:t??null}}function ms(e,t){try{console.error(t.value)}catch(a){setTimeout(function(){throw a})}}var Tm=typeof WeakMap=="function"?WeakMap:Map;function cu(e,t,a){a=Ft(-1,a),a.tag=3,a.payload={element:null};var i=t.value;return a.callback=function(){mo||(mo=!0,Rs=i),ms(e,t)},a}function du(e,t,a){a=Ft(-1,a),a.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var l=t.value;a.payload=function(){return i(l)},a.callback=function(){ms(e,t)}}var u=e.stateNode;return u!==null&&typeof u.componentDidCatch=="function"&&(a.callback=function(){ms(e,t),typeof i!="function"&&(nr===null?nr=new Set([this]):nr.add(this));var g=t.stack;this.componentDidCatch(t.value,{componentStack:g!==null?g:""})}),a}function uu(e,t,a){var i=e.pingCache;if(i===null){i=e.pingCache=new Tm;var l=new Set;i.set(t,l)}else l=i.get(t),l===void 0&&(l=new Set,i.set(t,l));l.has(a)||(l.add(a),e=Qm.bind(null,e,t,a),t.then(e,e))}function pu(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function fu(e,t,a,i,l){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(t=Ft(-1,1),t.tag=2,rr(a,t,1))),a.lanes|=1),e):(e.flags|=65536,e.lanes=l,e)}var Im=J.ReactCurrentOwner,rt=!1;function Ze(e,t,a,i){t.child=e===null?Ld(t,null,a,i):Zr(t,e.child,a,i)}function hu(e,t,a,i,l){a=a.render;var u=t.ref;return Gr(t,l),i=ss(e,t,a,i,u,l),a=ls(),e!==null&&!rt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Ut(e,t,l)):(Le&&a&&Bi(t),t.flags|=1,Ze(e,t,i,l),t.child)}function gu(e,t,a,i,l){if(e===null){var u=a.type;return typeof u=="function"&&!As(u)&&u.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(t.tag=15,t.type=u,mu(e,t,u,i,l)):(e=ko(a.type,null,i,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,(e.lanes&l)===0){var g=u.memoizedProps;if(a=a.compare,a=a!==null?a:Ma,a(g,i)&&e.ref===t.ref)return Ut(e,t,l)}return t.flags|=1,e=lr(u,i),e.ref=t.ref,e.return=t,t.child=e}function mu(e,t,a,i,l){if(e!==null){var u=e.memoizedProps;if(Ma(u,i)&&e.ref===t.ref)if(rt=!1,t.pendingProps=i=u,(e.lanes&l)!==0)(e.flags&131072)!==0&&(rt=!0);else return t.lanes=e.lanes,Ut(e,t,l)}return bs(e,t,a,i,l)}function bu(e,t,a){var i=t.pendingProps,l=i.children,u=e!==null?e.memoizedState:null;if(i.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ze(aa,dt),dt|=a;else{if((a&1073741824)===0)return e=u!==null?u.baseLanes|a:a,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ze(aa,dt),dt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=u!==null?u.baseLanes:a,ze(aa,dt),dt|=i}else u!==null?(i=u.baseLanes|a,t.memoizedState=null):i=a,ze(aa,dt),dt|=i;return Ze(e,t,l,a),t.child}function xu(e,t){var a=t.ref;(e===null&&a!==null||e!==null&&e.ref!==a)&&(t.flags|=512,t.flags|=2097152)}function bs(e,t,a,i,l){var u=tt(a)?mr:Xe.current;return u=Xr(t,u),Gr(t,l),a=ss(e,t,a,i,u,l),i=ls(),e!==null&&!rt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Ut(e,t,l)):(Le&&i&&Bi(t),t.flags|=1,Ze(e,t,a,l),t.child)}function vu(e,t,a,i,l){if(tt(a)){var u=!0;Hn(t)}else u=!1;if(Gr(t,l),t.stateNode===null)uo(e,t),su(t,a,i),hs(t,a,i,l),i=!0;else if(e===null){var g=t.stateNode,y=t.memoizedProps;g.props=y;var N=g.context,P=a.contextType;typeof P=="object"&&P!==null?P=gt(P):(P=tt(a)?mr:Xe.current,P=Xr(t,P));var A=a.getDerivedStateFromProps,O=typeof A=="function"||typeof g.getSnapshotBeforeUpdate=="function";O||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(y!==i||N!==P)&&lu(t,g,i,P),tr=!1;var I=t.memoizedState;g.state=I,to(t,i,g,l),N=t.memoizedState,y!==i||I!==N||et.current||tr?(typeof A=="function"&&(fs(t,a,A,i),N=t.memoizedState),(y=tr||iu(t,a,y,i,I,N,P))?(O||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(t.flags|=4194308)):(typeof g.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=N),g.props=i,g.state=N,g.context=P,i=y):(typeof g.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{g=t.stateNode,Td(e,t),y=t.memoizedProps,P=t.type===t.elementType?y:Ct(t.type,y),g.props=P,O=t.pendingProps,I=g.context,N=a.contextType,typeof N=="object"&&N!==null?N=gt(N):(N=tt(a)?mr:Xe.current,N=Xr(t,N));var Y=a.getDerivedStateFromProps;(A=typeof Y=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(y!==O||I!==N)&&lu(t,g,i,N),tr=!1,I=t.memoizedState,g.state=I,to(t,i,g,l);var ae=t.memoizedState;y!==O||I!==ae||et.current||tr?(typeof Y=="function"&&(fs(t,a,Y,i),ae=t.memoizedState),(P=tr||iu(t,a,P,i,I,ae,N)||!1)?(A||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(i,ae,N),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(i,ae,N)),typeof g.componentDidUpdate=="function"&&(t.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof g.componentDidUpdate!="function"||y===e.memoizedProps&&I===e.memoizedState||(t.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&I===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=ae),g.props=i,g.state=ae,g.context=N,i=P):(typeof g.componentDidUpdate!="function"||y===e.memoizedProps&&I===e.memoizedState||(t.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&I===e.memoizedState||(t.flags|=1024),i=!1)}return xs(e,t,a,i,u,l)}function xs(e,t,a,i,l,u){xu(e,t);var g=(t.flags&128)!==0;if(!i&&!g)return l&&Nd(t,a,!1),Ut(e,t,u);i=t.stateNode,Im.current=t;var y=g&&typeof a.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&g?(t.child=Zr(t,e.child,null,u),t.child=Zr(t,null,y,u)):Ze(e,t,y,u),t.memoizedState=i.state,l&&Nd(t,a,!0),t.child}function yu(e){var t=e.stateNode;t.pendingContext?kd(e,t.pendingContext,t.pendingContext!==t.context):t.context&&kd(e,t.context,!1),ts(e,t.containerInfo)}function wu(e,t,a,i,l){return Yr(),Ki(l),t.flags|=256,Ze(e,t,a,i),t.child}var vs={dehydrated:null,treeContext:null,retryLane:0};function ys(e){return{baseLanes:e,cachePool:null,transitions:null}}function ku(e,t,a){var i=t.pendingProps,l=De.current,u=!1,g=(t.flags&128)!==0,y;if((y=g)||(y=e!==null&&e.memoizedState===null?!1:(l&2)!==0),y?(u=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),ze(De,l&1),e===null)return Xi(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(g=i.children,e=i.fallback,u?(i=t.mode,u=t.child,g={mode:"hidden",children:g},(i&1)===0&&u!==null?(u.childLanes=0,u.pendingProps=g):u=jo(g,i,0,null),e=Sr(e,i,a,null),u.return=t,e.return=t,u.sibling=e,t.child=u,t.child.memoizedState=ys(a),t.memoizedState=vs,e):ws(t,g));if(l=e.memoizedState,l!==null&&(y=l.dehydrated,y!==null))return Am(e,t,g,i,y,l,a);if(u){u=i.fallback,g=t.mode,l=e.child,y=l.sibling;var N={mode:"hidden",children:i.children};return(g&1)===0&&t.child!==l?(i=t.child,i.childLanes=0,i.pendingProps=N,t.deletions=null):(i=lr(l,N),i.subtreeFlags=l.subtreeFlags&14680064),y!==null?u=lr(y,u):(u=Sr(u,g,a,null),u.flags|=2),u.return=t,i.return=t,i.sibling=u,t.child=i,i=u,u=t.child,g=e.child.memoizedState,g=g===null?ys(a):{baseLanes:g.baseLanes|a,cachePool:null,transitions:g.transitions},u.memoizedState=g,u.childLanes=e.childLanes&~a,t.memoizedState=vs,i}return u=e.child,e=u.sibling,i=lr(u,{mode:"visible",children:i.children}),(t.mode&1)===0&&(i.lanes=a),i.return=t,i.sibling=null,e!==null&&(a=t.deletions,a===null?(t.deletions=[e],t.flags|=16):a.push(e)),t.child=i,t.memoizedState=null,i}function ws(e,t){return t=jo({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function co(e,t,a,i){return i!==null&&Ki(i),Zr(t,e.child,null,a),e=ws(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Am(e,t,a,i,l,u,g){if(a)return t.flags&256?(t.flags&=-257,i=gs(Error(o(422))),co(e,t,g,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(u=i.fallback,l=t.mode,i=jo({mode:"visible",children:i.children},l,0,null),u=Sr(u,l,g,null),u.flags|=2,i.return=t,u.return=t,i.sibling=u,t.child=i,(t.mode&1)!==0&&Zr(t,e.child,null,g),t.child.memoizedState=ys(g),t.memoizedState=vs,u);if((t.mode&1)===0)return co(e,t,g,null);if(l.data==="$!"){if(i=l.nextSibling&&l.nextSibling.dataset,i)var y=i.dgst;return i=y,u=Error(o(419)),i=gs(u,i,void 0),co(e,t,g,i)}if(y=(g&e.childLanes)!==0,rt||y){if(i=Ve,i!==null){switch(g&-g){case 4:l=2;break;case 16:l=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=(l&(i.suspendedLanes|g))!==0?0:l,l!==0&&l!==u.retryLane&&(u.retryLane=l,$t(e,l),_t(i,e,l,-1))}return Is(),i=gs(Error(o(421))),co(e,t,g,i)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=Ym.bind(null,e),l._reactRetry=t,null):(e=u.treeContext,ct=Zt(l.nextSibling),lt=t,Le=!0,Nt=null,e!==null&&(ft[ht++]=At,ft[ht++]=Ot,ft[ht++]=br,At=e.id,Ot=e.overflow,br=t),t=ws(t,i.children),t.flags|=4096,t)}function ju(e,t,a){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Ji(e.return,t,a)}function ks(e,t,a,i,l){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:a,tailMode:l}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=i,u.tail=a,u.tailMode=l)}function Nu(e,t,a){var i=t.pendingProps,l=i.revealOrder,u=i.tail;if(Ze(e,t,i.children,a),i=De.current,(i&2)!==0)i=i&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ju(e,a,t);else if(e.tag===19)ju(e,a,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}i&=1}if(ze(De,i),(t.mode&1)===0)t.memoizedState=null;else switch(l){case"forwards":for(a=t.child,l=null;a!==null;)e=a.alternate,e!==null&&ro(e)===null&&(l=a),a=a.sibling;a=l,a===null?(l=t.child,t.child=null):(l=a.sibling,a.sibling=null),ks(t,!1,l,a,u);break;case"backwards":for(a=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&ro(e)===null){t.child=l;break}e=l.sibling,l.sibling=a,a=l,l=e}ks(t,!0,a,null,u);break;case"together":ks(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function uo(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ut(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),kr|=t.lanes,(a&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,a=lr(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=lr(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Om(e,t,a){switch(t.tag){case 3:yu(t),Yr();break;case 5:Od(t);break;case 1:tt(t.type)&&Hn(t);break;case 4:ts(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,l=t.memoizedProps.value;ze(Jn,i._currentValue),i._currentValue=l;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(ze(De,De.current&1),t.flags|=128,null):(a&t.child.childLanes)!==0?ku(e,t,a):(ze(De,De.current&1),e=Ut(e,t,a),e!==null?e.sibling:null);ze(De,De.current&1);break;case 19:if(i=(a&t.childLanes)!==0,(e.flags&128)!==0){if(i)return Nu(e,t,a);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),ze(De,De.current),i)break;return null;case 22:case 23:return t.lanes=0,bu(e,t,a)}return Ut(e,t,a)}var Cu,js,Su,Eu;Cu=function(e,t){for(var a=t.child;a!==null;){if(a.tag===5||a.tag===6)e.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},js=function(){},Su=function(e,t,a,i){var l=e.memoizedProps;if(l!==i){e=t.stateNode,yr(Pt.current);var u=null;switch(a){case"input":l=Jo(e,l),i=Jo(e,i),u=[];break;case"select":l=T({},l,{value:void 0}),i=T({},i,{value:void 0}),u=[];break;case"textarea":l=ti(e,l),i=ti(e,i),u=[];break;default:typeof l.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=Vn)}ai(a,i);var g;a=null;for(P in l)if(!i.hasOwnProperty(P)&&l.hasOwnProperty(P)&&l[P]!=null)if(P==="style"){var y=l[P];for(g in y)y.hasOwnProperty(g)&&(a||(a={}),a[g]="")}else P!=="dangerouslySetInnerHTML"&&P!=="children"&&P!=="suppressContentEditableWarning"&&P!=="suppressHydrationWarning"&&P!=="autoFocus"&&(d.hasOwnProperty(P)?u||(u=[]):(u=u||[]).push(P,null));for(P in i){var N=i[P];if(y=l?.[P],i.hasOwnProperty(P)&&N!==y&&(N!=null||y!=null))if(P==="style")if(y){for(g in y)!y.hasOwnProperty(g)||N&&N.hasOwnProperty(g)||(a||(a={}),a[g]="");for(g in N)N.hasOwnProperty(g)&&y[g]!==N[g]&&(a||(a={}),a[g]=N[g])}else a||(u||(u=[]),u.push(P,a)),a=N;else P==="dangerouslySetInnerHTML"?(N=N?N.__html:void 0,y=y?y.__html:void 0,N!=null&&y!==N&&(u=u||[]).push(P,N)):P==="children"?typeof N!="string"&&typeof N!="number"||(u=u||[]).push(P,""+N):P!=="suppressContentEditableWarning"&&P!=="suppressHydrationWarning"&&(d.hasOwnProperty(P)?(N!=null&&P==="onScroll"&&Re("scroll",e),u||y===N||(u=[])):(u=u||[]).push(P,N))}a&&(u=u||[]).push("style",a);var P=u;(t.updateQueue=P)&&(t.flags|=4)}},Eu=function(e,t,a,i){a!==i&&(t.flags|=4)};function Ha(e,t){if(!Le)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var i=null;a!==null;)a.alternate!==null&&(i=a),a=a.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Qe(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,i=0;if(t)for(var l=e.child;l!==null;)a|=l.lanes|l.childLanes,i|=l.subtreeFlags&14680064,i|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)a|=l.lanes|l.childLanes,i|=l.subtreeFlags,i|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=i,e.childLanes=a,t}function $m(e,t,a){var i=t.pendingProps;switch(Wi(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qe(t),null;case 1:return tt(t.type)&&Wn(),Qe(t),null;case 3:return i=t.stateNode,ea(),Me(et),Me(Xe),ns(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Yn(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Nt!==null&&(Ls(Nt),Nt=null))),js(e,t),Qe(t),null;case 5:rs(t);var l=yr(Ua.current);if(a=t.type,e!==null&&t.stateNode!=null)Su(e,t,a,i,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(o(166));return Qe(t),null}if(e=yr(Pt.current),Yn(t)){i=t.stateNode,a=t.type;var u=t.memoizedProps;switch(i[Mt]=t,i[Ia]=u,e=(t.mode&1)!==0,a){case"dialog":Re("cancel",i),Re("close",i);break;case"iframe":case"object":case"embed":Re("load",i);break;case"video":case"audio":for(l=0;l<La.length;l++)Re(La[l],i);break;case"source":Re("error",i);break;case"img":case"image":case"link":Re("error",i),Re("load",i);break;case"details":Re("toggle",i);break;case"input":sc(i,u),Re("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!u.multiple},Re("invalid",i);break;case"textarea":dc(i,u),Re("invalid",i)}ai(a,u),l=null;for(var g in u)if(u.hasOwnProperty(g)){var y=u[g];g==="children"?typeof y=="string"?i.textContent!==y&&(u.suppressHydrationWarning!==!0&&qn(i.textContent,y,e),l=["children",y]):typeof y=="number"&&i.textContent!==""+y&&(u.suppressHydrationWarning!==!0&&qn(i.textContent,y,e),l=["children",""+y]):d.hasOwnProperty(g)&&y!=null&&g==="onScroll"&&Re("scroll",i)}switch(a){case"input":vn(i),cc(i,u,!0);break;case"textarea":vn(i),pc(i);break;case"select":case"option":break;default:typeof u.onClick=="function"&&(i.onclick=Vn)}i=l,t.updateQueue=i,i!==null&&(t.flags|=4)}else{g=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=fc(a)),e==="http://www.w3.org/1999/xhtml"?a==="script"?(e=g.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=g.createElement(a,{is:i.is}):(e=g.createElement(a),a==="select"&&(g=e,i.multiple?g.multiple=!0:i.size&&(g.size=i.size))):e=g.createElementNS(e,a),e[Mt]=t,e[Ia]=i,Cu(e,t,!1,!1),t.stateNode=e;e:{switch(g=ni(a,i),a){case"dialog":Re("cancel",e),Re("close",e),l=i;break;case"iframe":case"object":case"embed":Re("load",e),l=i;break;case"video":case"audio":for(l=0;l<La.length;l++)Re(La[l],e);l=i;break;case"source":Re("error",e),l=i;break;case"img":case"image":case"link":Re("error",e),Re("load",e),l=i;break;case"details":Re("toggle",e),l=i;break;case"input":sc(e,i),l=Jo(e,i),Re("invalid",e);break;case"option":l=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},l=T({},i,{value:void 0}),Re("invalid",e);break;case"textarea":dc(e,i),l=ti(e,i),Re("invalid",e);break;default:l=i}ai(a,l),y=l;for(u in y)if(y.hasOwnProperty(u)){var N=y[u];u==="style"?mc(e,N):u==="dangerouslySetInnerHTML"?(N=N?N.__html:void 0,N!=null&&hc(e,N)):u==="children"?typeof N=="string"?(a!=="textarea"||N!=="")&&ha(e,N):typeof N=="number"&&ha(e,""+N):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(d.hasOwnProperty(u)?N!=null&&u==="onScroll"&&Re("scroll",e):N!=null&&oe(e,u,N,g))}switch(a){case"input":vn(e),cc(e,i,!1);break;case"textarea":vn(e),pc(e);break;case"option":i.value!=null&&e.setAttribute("value",""+ke(i.value));break;case"select":e.multiple=!!i.multiple,u=i.value,u!=null?Tr(e,!!i.multiple,u,!1):i.defaultValue!=null&&Tr(e,!!i.multiple,i.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=Vn)}switch(a){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Qe(t),null;case 6:if(e&&t.stateNode!=null)Eu(e,t,e.memoizedProps,i);else{if(typeof i!="string"&&t.stateNode===null)throw Error(o(166));if(a=yr(Ua.current),yr(Pt.current),Yn(t)){if(i=t.stateNode,a=t.memoizedProps,i[Mt]=t,(u=i.nodeValue!==a)&&(e=lt,e!==null))switch(e.tag){case 3:qn(i.nodeValue,a,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&qn(i.nodeValue,a,(e.mode&1)!==0)}u&&(t.flags|=4)}else i=(a.nodeType===9?a:a.ownerDocument).createTextNode(i),i[Mt]=t,t.stateNode=i}return Qe(t),null;case 13:if(Me(De),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Le&&ct!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Rd(),Yr(),t.flags|=98560,u=!1;else if(u=Yn(t),i!==null&&i.dehydrated!==null){if(e===null){if(!u)throw Error(o(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(o(317));u[Mt]=t}else Yr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Qe(t),u=!1}else Nt!==null&&(Ls(Nt),Nt=null),u=!0;if(!u)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=a,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(De.current&1)!==0?Ue===0&&(Ue=3):Is())),t.updateQueue!==null&&(t.flags|=4),Qe(t),null);case 4:return ea(),js(e,t),e===null&&Da(t.stateNode.containerInfo),Qe(t),null;case 10:return Zi(t.type._context),Qe(t),null;case 17:return tt(t.type)&&Wn(),Qe(t),null;case 19:if(Me(De),u=t.memoizedState,u===null)return Qe(t),null;if(i=(t.flags&128)!==0,g=u.rendering,g===null)if(i)Ha(u,!1);else{if(Ue!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(g=ro(e),g!==null){for(t.flags|=128,Ha(u,!1),i=g.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=a,a=t.child;a!==null;)u=a,e=i,u.flags&=14680066,g=u.alternate,g===null?(u.childLanes=0,u.lanes=e,u.child=null,u.subtreeFlags=0,u.memoizedProps=null,u.memoizedState=null,u.updateQueue=null,u.dependencies=null,u.stateNode=null):(u.childLanes=g.childLanes,u.lanes=g.lanes,u.child=g.child,u.subtreeFlags=0,u.deletions=null,u.memoizedProps=g.memoizedProps,u.memoizedState=g.memoizedState,u.updateQueue=g.updateQueue,u.type=g.type,e=g.dependencies,u.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),a=a.sibling;return ze(De,De.current&1|2),t.child}e=e.sibling}u.tail!==null&&Ae()>na&&(t.flags|=128,i=!0,Ha(u,!1),t.lanes=4194304)}else{if(!i)if(e=ro(g),e!==null){if(t.flags|=128,i=!0,a=e.updateQueue,a!==null&&(t.updateQueue=a,t.flags|=4),Ha(u,!0),u.tail===null&&u.tailMode==="hidden"&&!g.alternate&&!Le)return Qe(t),null}else 2*Ae()-u.renderingStartTime>na&&a!==1073741824&&(t.flags|=128,i=!0,Ha(u,!1),t.lanes=4194304);u.isBackwards?(g.sibling=t.child,t.child=g):(a=u.last,a!==null?a.sibling=g:t.child=g,u.last=g)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Ae(),t.sibling=null,a=De.current,ze(De,i?a&1|2:a&1),t):(Qe(t),null);case 22:case 23:return Ts(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&(t.mode&1)!==0?(dt&1073741824)!==0&&(Qe(t),t.subtreeFlags&6&&(t.flags|=8192)):Qe(t),null;case 24:return null;case 25:return null}throw Error(o(156,t.tag))}function Fm(e,t){switch(Wi(t),t.tag){case 1:return tt(t.type)&&Wn(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ea(),Me(et),Me(Xe),ns(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return rs(t),null;case 13:if(Me(De),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Yr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Me(De),null;case 4:return ea(),null;case 10:return Zi(t.type._context),null;case 22:case 23:return Ts(),null;case 24:return null;default:return null}}var po=!1,Ye=!1,Um=typeof WeakSet=="function"?WeakSet:Set,te=null;function ra(e,t){var a=e.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(i){Ie(e,t,i)}else a.current=null}function _u(e,t,a){try{a()}catch(i){Ie(e,t,i)}}var zu=!1;function qm(e,t){if(Ii=Mn,e=id(),_i(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var i=a.getSelection&&a.getSelection();if(i&&i.rangeCount!==0){a=i.anchorNode;var l=i.anchorOffset,u=i.focusNode;i=i.focusOffset;try{a.nodeType,u.nodeType}catch{a=null;break e}var g=0,y=-1,N=-1,P=0,A=0,O=e,I=null;t:for(;;){for(var Y;O!==a||l!==0&&O.nodeType!==3||(y=g+l),O!==u||i!==0&&O.nodeType!==3||(N=g+i),O.nodeType===3&&(g+=O.nodeValue.length),(Y=O.firstChild)!==null;)I=O,O=Y;for(;;){if(O===e)break t;if(I===a&&++P===l&&(y=g),I===u&&++A===i&&(N=g),(Y=O.nextSibling)!==null)break;O=I,I=O.parentNode}O=Y}a=y===-1||N===-1?null:{start:y,end:N}}else a=null}a=a||{start:0,end:0}}else a=null;for(Ai={focusedElem:e,selectionRange:a},Mn=!1,te=t;te!==null;)if(t=te,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,te=e;else for(;te!==null;){t=te;try{var ae=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(ae!==null){var ne=ae.memoizedProps,Oe=ae.memoizedState,z=t.stateNode,S=z.getSnapshotBeforeUpdate(t.elementType===t.type?ne:Ct(t.type,ne),Oe);z.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var R=t.stateNode.containerInfo;R.nodeType===1?R.textContent="":R.nodeType===9&&R.documentElement&&R.removeChild(R.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(q){Ie(t,t.return,q)}if(e=t.sibling,e!==null){e.return=t.return,te=e;break}te=t.return}return ae=zu,zu=!1,ae}function Xa(e,t,a){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var l=i=i.next;do{if((l.tag&e)===e){var u=l.destroy;l.destroy=void 0,u!==void 0&&_u(t,a,u)}l=l.next}while(l!==i)}}function fo(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var a=t=t.next;do{if((a.tag&e)===e){var i=a.create;a.destroy=i()}a=a.next}while(a!==t)}}function Ns(e){var t=e.ref;if(t!==null){var a=e.stateNode;e.tag,e=a,typeof t=="function"?t(e):t.current=e}}function Ru(e){var t=e.alternate;t!==null&&(e.alternate=null,Ru(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Mt],delete t[Ia],delete t[Ui],delete t[Nm],delete t[Cm])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Mu(e){return e.tag===5||e.tag===3||e.tag===4}function Pu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Mu(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.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 Cs(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?a.nodeType===8?a.parentNode.insertBefore(e,t):a.insertBefore(e,t):(a.nodeType===8?(t=a.parentNode,t.insertBefore(e,a)):(t=a,t.appendChild(e)),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Vn));else if(i!==4&&(e=e.child,e!==null))for(Cs(e,t,a),e=e.sibling;e!==null;)Cs(e,t,a),e=e.sibling}function Ss(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(Ss(e,t,a),e=e.sibling;e!==null;)Ss(e,t,a),e=e.sibling}var We=null,St=!1;function ar(e,t,a){for(a=a.child;a!==null;)Lu(e,t,a),a=a.sibling}function Lu(e,t,a){if(Rt&&typeof Rt.onCommitFiberUnmount=="function")try{Rt.onCommitFiberUnmount(Cn,a)}catch{}switch(a.tag){case 5:Ye||ra(a,t);case 6:var i=We,l=St;We=null,ar(e,t,a),We=i,St=l,We!==null&&(St?(e=We,a=a.stateNode,e.nodeType===8?e.parentNode.removeChild(a):e.removeChild(a)):We.removeChild(a.stateNode));break;case 18:We!==null&&(St?(e=We,a=a.stateNode,e.nodeType===8?Fi(e.parentNode,a):e.nodeType===1&&Fi(e,a),Ca(e)):Fi(We,a.stateNode));break;case 4:i=We,l=St,We=a.stateNode.containerInfo,St=!0,ar(e,t,a),We=i,St=l;break;case 0:case 11:case 14:case 15:if(!Ye&&(i=a.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){l=i=i.next;do{var u=l,g=u.destroy;u=u.tag,g!==void 0&&((u&2)!==0||(u&4)!==0)&&_u(a,t,g),l=l.next}while(l!==i)}ar(e,t,a);break;case 1:if(!Ye&&(ra(a,t),i=a.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=a.memoizedProps,i.state=a.memoizedState,i.componentWillUnmount()}catch(y){Ie(a,t,y)}ar(e,t,a);break;case 21:ar(e,t,a);break;case 22:a.mode&1?(Ye=(i=Ye)||a.memoizedState!==null,ar(e,t,a),Ye=i):ar(e,t,a);break;default:ar(e,t,a)}}function Du(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var a=e.stateNode;a===null&&(a=e.stateNode=new Um),t.forEach(function(i){var l=Zm.bind(null,e,i);a.has(i)||(a.add(i),i.then(l,l))})}}function Et(e,t){var a=t.deletions;if(a!==null)for(var i=0;i<a.length;i++){var l=a[i];try{var u=e,g=t,y=g;e:for(;y!==null;){switch(y.tag){case 5:We=y.stateNode,St=!1;break e;case 3:We=y.stateNode.containerInfo,St=!0;break e;case 4:We=y.stateNode.containerInfo,St=!0;break e}y=y.return}if(We===null)throw Error(o(160));Lu(u,g,l),We=null,St=!1;var N=l.alternate;N!==null&&(N.return=null),l.return=null}catch(P){Ie(l,t,P)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Tu(t,e),t=t.sibling}function Tu(e,t){var a=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Et(t,e),Dt(e),i&4){try{Xa(3,e,e.return),fo(3,e)}catch(ne){Ie(e,e.return,ne)}try{Xa(5,e,e.return)}catch(ne){Ie(e,e.return,ne)}}break;case 1:Et(t,e),Dt(e),i&512&&a!==null&&ra(a,a.return);break;case 5:if(Et(t,e),Dt(e),i&512&&a!==null&&ra(a,a.return),e.flags&32){var l=e.stateNode;try{ha(l,"")}catch(ne){Ie(e,e.return,ne)}}if(i&4&&(l=e.stateNode,l!=null)){var u=e.memoizedProps,g=a!==null?a.memoizedProps:u,y=e.type,N=e.updateQueue;if(e.updateQueue=null,N!==null)try{y==="input"&&u.type==="radio"&&u.name!=null&&lc(l,u),ni(y,g);var P=ni(y,u);for(g=0;g<N.length;g+=2){var A=N[g],O=N[g+1];A==="style"?mc(l,O):A==="dangerouslySetInnerHTML"?hc(l,O):A==="children"?ha(l,O):oe(l,A,O,P)}switch(y){case"input":Go(l,u);break;case"textarea":uc(l,u);break;case"select":var I=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!u.multiple;var Y=u.value;Y!=null?Tr(l,!!u.multiple,Y,!1):I!==!!u.multiple&&(u.defaultValue!=null?Tr(l,!!u.multiple,u.defaultValue,!0):Tr(l,!!u.multiple,u.multiple?[]:"",!1))}l[Ia]=u}catch(ne){Ie(e,e.return,ne)}}break;case 6:if(Et(t,e),Dt(e),i&4){if(e.stateNode===null)throw Error(o(162));l=e.stateNode,u=e.memoizedProps;try{l.nodeValue=u}catch(ne){Ie(e,e.return,ne)}}break;case 3:if(Et(t,e),Dt(e),i&4&&a!==null&&a.memoizedState.isDehydrated)try{Ca(t.containerInfo)}catch(ne){Ie(e,e.return,ne)}break;case 4:Et(t,e),Dt(e);break;case 13:Et(t,e),Dt(e),l=e.child,l.flags&8192&&(u=l.memoizedState!==null,l.stateNode.isHidden=u,!u||l.alternate!==null&&l.alternate.memoizedState!==null||(zs=Ae())),i&4&&Du(e);break;case 22:if(A=a!==null&&a.memoizedState!==null,e.mode&1?(Ye=(P=Ye)||A,Et(t,e),Ye=P):Et(t,e),Dt(e),i&8192){if(P=e.memoizedState!==null,(e.stateNode.isHidden=P)&&!A&&(e.mode&1)!==0)for(te=e,A=e.child;A!==null;){for(O=te=A;te!==null;){switch(I=te,Y=I.child,I.tag){case 0:case 11:case 14:case 15:Xa(4,I,I.return);break;case 1:ra(I,I.return);var ae=I.stateNode;if(typeof ae.componentWillUnmount=="function"){i=I,a=I.return;try{t=i,ae.props=t.memoizedProps,ae.state=t.memoizedState,ae.componentWillUnmount()}catch(ne){Ie(i,a,ne)}}break;case 5:ra(I,I.return);break;case 22:if(I.memoizedState!==null){Ou(O);continue}}Y!==null?(Y.return=I,te=Y):Ou(O)}A=A.sibling}e:for(A=null,O=e;;){if(O.tag===5){if(A===null){A=O;try{l=O.stateNode,P?(u=l.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none"):(y=O.stateNode,N=O.memoizedProps.style,g=N!=null&&N.hasOwnProperty("display")?N.display:null,y.style.display=gc("display",g))}catch(ne){Ie(e,e.return,ne)}}}else if(O.tag===6){if(A===null)try{O.stateNode.nodeValue=P?"":O.memoizedProps}catch(ne){Ie(e,e.return,ne)}}else if((O.tag!==22&&O.tag!==23||O.memoizedState===null||O===e)&&O.child!==null){O.child.return=O,O=O.child;continue}if(O===e)break e;for(;O.sibling===null;){if(O.return===null||O.return===e)break e;A===O&&(A=null),O=O.return}A===O&&(A=null),O.sibling.return=O.return,O=O.sibling}}break;case 19:Et(t,e),Dt(e),i&4&&Du(e);break;case 21:break;default:Et(t,e),Dt(e)}}function Dt(e){var t=e.flags;if(t&2){try{e:{for(var a=e.return;a!==null;){if(Mu(a)){var i=a;break e}a=a.return}throw Error(o(160))}switch(i.tag){case 5:var l=i.stateNode;i.flags&32&&(ha(l,""),i.flags&=-33);var u=Pu(e);Ss(e,u,l);break;case 3:case 4:var g=i.stateNode.containerInfo,y=Pu(e);Cs(e,y,g);break;default:throw Error(o(161))}}catch(N){Ie(e,e.return,N)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Vm(e,t,a){te=e,Iu(e)}function Iu(e,t,a){for(var i=(e.mode&1)!==0;te!==null;){var l=te,u=l.child;if(l.tag===22&&i){var g=l.memoizedState!==null||po;if(!g){var y=l.alternate,N=y!==null&&y.memoizedState!==null||Ye;y=po;var P=Ye;if(po=g,(Ye=N)&&!P)for(te=l;te!==null;)g=te,N=g.child,g.tag===22&&g.memoizedState!==null?$u(l):N!==null?(N.return=g,te=N):$u(l);for(;u!==null;)te=u,Iu(u),u=u.sibling;te=l,po=y,Ye=P}Au(e)}else(l.subtreeFlags&8772)!==0&&u!==null?(u.return=l,te=u):Au(e)}}function Au(e){for(;te!==null;){var t=te;if((t.flags&8772)!==0){var a=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Ye||fo(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!Ye)if(a===null)i.componentDidMount();else{var l=t.elementType===t.type?a.memoizedProps:Ct(t.type,a.memoizedProps);i.componentDidUpdate(l,a.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var u=t.updateQueue;u!==null&&Ad(t,u,i);break;case 3:var g=t.updateQueue;if(g!==null){if(a=null,t.child!==null)switch(t.child.tag){case 5:a=t.child.stateNode;break;case 1:a=t.child.stateNode}Ad(t,g,a)}break;case 5:var y=t.stateNode;if(a===null&&t.flags&4){a=y;var N=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":N.autoFocus&&a.focus();break;case"img":N.src&&(a.src=N.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var P=t.alternate;if(P!==null){var A=P.memoizedState;if(A!==null){var O=A.dehydrated;O!==null&&Ca(O)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(o(163))}Ye||t.flags&512&&Ns(t)}catch(I){Ie(t,t.return,I)}}if(t===e){te=null;break}if(a=t.sibling,a!==null){a.return=t.return,te=a;break}te=t.return}}function Ou(e){for(;te!==null;){var t=te;if(t===e){te=null;break}var a=t.sibling;if(a!==null){a.return=t.return,te=a;break}te=t.return}}function $u(e){for(;te!==null;){var t=te;try{switch(t.tag){case 0:case 11:case 15:var a=t.return;try{fo(4,t)}catch(N){Ie(t,a,N)}break;case 1:var i=t.stateNode;if(typeof i.componentDidMount=="function"){var l=t.return;try{i.componentDidMount()}catch(N){Ie(t,l,N)}}var u=t.return;try{Ns(t)}catch(N){Ie(t,u,N)}break;case 5:var g=t.return;try{Ns(t)}catch(N){Ie(t,g,N)}}}catch(N){Ie(t,t.return,N)}if(t===e){te=null;break}var y=t.sibling;if(y!==null){y.return=t.return,te=y;break}te=t.return}}var Bm=Math.ceil,ho=J.ReactCurrentDispatcher,Es=J.ReactCurrentOwner,bt=J.ReactCurrentBatchConfig,Ce=0,Ve=null,$e=null,He=0,dt=0,aa=Jt(0),Ue=0,Ka=null,kr=0,go=0,_s=0,Qa=null,at=null,zs=0,na=1/0,qt=null,mo=!1,Rs=null,nr=null,bo=!1,or=null,xo=0,Ya=0,Ms=null,vo=-1,yo=0;function Je(){return(Ce&6)!==0?Ae():vo!==-1?vo:vo=Ae()}function ir(e){return(e.mode&1)===0?1:(Ce&2)!==0&&He!==0?He&-He:Em.transition!==null?(yo===0&&(yo=Mc()),yo):(e=_e,e!==0||(e=window.event,e=e===void 0?16:Fc(e.type)),e)}function _t(e,t,a,i){if(50<Ya)throw Ya=0,Ms=null,Error(o(185));ya(e,a,i),((Ce&2)===0||e!==Ve)&&(e===Ve&&((Ce&2)===0&&(go|=a),Ue===4&&sr(e,He)),nt(e,i),a===1&&Ce===0&&(t.mode&1)===0&&(na=Ae()+500,Xn&&er()))}function nt(e,t){var a=e.callbackNode;Eg(e,t);var i=_n(e,e===Ve?He:0);if(i===0)a!==null&&_c(a),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(a!=null&&_c(a),t===1)e.tag===0?Sm(Uu.bind(null,e)):Cd(Uu.bind(null,e)),km(function(){(Ce&6)===0&&er()}),a=null;else{switch(Pc(i)){case 1:a=ui;break;case 4:a=zc;break;case 16:a=Nn;break;case 536870912:a=Rc;break;default:a=Nn}a=Qu(a,Fu.bind(null,e))}e.callbackPriority=t,e.callbackNode=a}}function Fu(e,t){if(vo=-1,yo=0,(Ce&6)!==0)throw Error(o(327));var a=e.callbackNode;if(oa()&&e.callbackNode!==a)return null;var i=_n(e,e===Ve?He:0);if(i===0)return null;if((i&30)!==0||(i&e.expiredLanes)!==0||t)t=wo(e,i);else{t=i;var l=Ce;Ce|=2;var u=Vu();(Ve!==e||He!==t)&&(qt=null,na=Ae()+500,Nr(e,t));do try{Xm();break}catch(y){qu(e,y)}while(!0);Yi(),ho.current=u,Ce=l,$e!==null?t=0:(Ve=null,He=0,t=Ue)}if(t!==0){if(t===2&&(l=pi(e),l!==0&&(i=l,t=Ps(e,l))),t===1)throw a=Ka,Nr(e,0),sr(e,i),nt(e,Ae()),a;if(t===6)sr(e,i);else{if(l=e.current.alternate,(i&30)===0&&!Wm(l)&&(t=wo(e,i),t===2&&(u=pi(e),u!==0&&(i=u,t=Ps(e,u))),t===1))throw a=Ka,Nr(e,0),sr(e,i),nt(e,Ae()),a;switch(e.finishedWork=l,e.finishedLanes=i,t){case 0:case 1:throw Error(o(345));case 2:Cr(e,at,qt);break;case 3:if(sr(e,i),(i&130023424)===i&&(t=zs+500-Ae(),10<t)){if(_n(e,0)!==0)break;if(l=e.suspendedLanes,(l&i)!==i){Je(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=$i(Cr.bind(null,e,at,qt),t);break}Cr(e,at,qt);break;case 4:if(sr(e,i),(i&4194240)===i)break;for(t=e.eventTimes,l=-1;0<i;){var g=31-kt(i);u=1<<g,g=t[g],g>l&&(l=g),i&=~u}if(i=l,i=Ae()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Bm(i/1960))-i,10<i){e.timeoutHandle=$i(Cr.bind(null,e,at,qt),i);break}Cr(e,at,qt);break;case 5:Cr(e,at,qt);break;default:throw Error(o(329))}}}return nt(e,Ae()),e.callbackNode===a?Fu.bind(null,e):null}function Ps(e,t){var a=Qa;return e.current.memoizedState.isDehydrated&&(Nr(e,t).flags|=256),e=wo(e,t),e!==2&&(t=at,at=a,t!==null&&Ls(t)),e}function Ls(e){at===null?at=e:at.push.apply(at,e)}function Wm(e){for(var t=e;;){if(t.flags&16384){var a=t.updateQueue;if(a!==null&&(a=a.stores,a!==null))for(var i=0;i<a.length;i++){var l=a[i],u=l.getSnapshot;l=l.value;try{if(!jt(u(),l))return!1}catch{return!1}}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;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 sr(e,t){for(t&=~_s,t&=~go,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var a=31-kt(t),i=1<<a;e[a]=-1,t&=~i}}function Uu(e){if((Ce&6)!==0)throw Error(o(327));oa();var t=_n(e,0);if((t&1)===0)return nt(e,Ae()),null;var a=wo(e,t);if(e.tag!==0&&a===2){var i=pi(e);i!==0&&(t=i,a=Ps(e,i))}if(a===1)throw a=Ka,Nr(e,0),sr(e,t),nt(e,Ae()),a;if(a===6)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Cr(e,at,qt),nt(e,Ae()),null}function Ds(e,t){var a=Ce;Ce|=1;try{return e(t)}finally{Ce=a,Ce===0&&(na=Ae()+500,Xn&&er())}}function jr(e){or!==null&&or.tag===0&&(Ce&6)===0&&oa();var t=Ce;Ce|=1;var a=bt.transition,i=_e;try{if(bt.transition=null,_e=1,e)return e()}finally{_e=i,bt.transition=a,Ce=t,(Ce&6)===0&&er()}}function Ts(){dt=aa.current,Me(aa)}function Nr(e,t){e.finishedWork=null,e.finishedLanes=0;var a=e.timeoutHandle;if(a!==-1&&(e.timeoutHandle=-1,wm(a)),$e!==null)for(a=$e.return;a!==null;){var i=a;switch(Wi(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&Wn();break;case 3:ea(),Me(et),Me(Xe),ns();break;case 5:rs(i);break;case 4:ea();break;case 13:Me(De);break;case 19:Me(De);break;case 10:Zi(i.type._context);break;case 22:case 23:Ts()}a=a.return}if(Ve=e,$e=e=lr(e.current,null),He=dt=t,Ue=0,Ka=null,_s=go=kr=0,at=Qa=null,vr!==null){for(t=0;t<vr.length;t++)if(a=vr[t],i=a.interleaved,i!==null){a.interleaved=null;var l=i.next,u=a.pending;if(u!==null){var g=u.next;u.next=l,i.next=g}a.pending=i}vr=null}return e}function qu(e,t){do{var a=$e;try{if(Yi(),ao.current=so,no){for(var i=Te.memoizedState;i!==null;){var l=i.queue;l!==null&&(l.pending=null),i=i.next}no=!1}if(wr=0,qe=Fe=Te=null,qa=!1,Va=0,Es.current=null,a===null||a.return===null){Ue=1,Ka=t,$e=null;break}e:{var u=e,g=a.return,y=a,N=t;if(t=He,y.flags|=32768,N!==null&&typeof N=="object"&&typeof N.then=="function"){var P=N,A=y,O=A.tag;if((A.mode&1)===0&&(O===0||O===11||O===15)){var I=A.alternate;I?(A.updateQueue=I.updateQueue,A.memoizedState=I.memoizedState,A.lanes=I.lanes):(A.updateQueue=null,A.memoizedState=null)}var Y=pu(g);if(Y!==null){Y.flags&=-257,fu(Y,g,y,u,t),Y.mode&1&&uu(u,P,t),t=Y,N=P;var ae=t.updateQueue;if(ae===null){var ne=new Set;ne.add(N),t.updateQueue=ne}else ae.add(N);break e}else{if((t&1)===0){uu(u,P,t),Is();break e}N=Error(o(426))}}else if(Le&&y.mode&1){var Oe=pu(g);if(Oe!==null){(Oe.flags&65536)===0&&(Oe.flags|=256),fu(Oe,g,y,u,t),Ki(ta(N,y));break e}}u=N=ta(N,y),Ue!==4&&(Ue=2),Qa===null?Qa=[u]:Qa.push(u),u=g;do{switch(u.tag){case 3:u.flags|=65536,t&=-t,u.lanes|=t;var z=cu(u,N,t);Id(u,z);break e;case 1:y=N;var S=u.type,R=u.stateNode;if((u.flags&128)===0&&(typeof S.getDerivedStateFromError=="function"||R!==null&&typeof R.componentDidCatch=="function"&&(nr===null||!nr.has(R)))){u.flags|=65536,t&=-t,u.lanes|=t;var q=du(u,y,t);Id(u,q);break e}}u=u.return}while(u!==null)}Wu(a)}catch(ie){t=ie,$e===a&&a!==null&&($e=a=a.return);continue}break}while(!0)}function Vu(){var e=ho.current;return ho.current=so,e===null?so:e}function Is(){(Ue===0||Ue===3||Ue===2)&&(Ue=4),Ve===null||(kr&268435455)===0&&(go&268435455)===0||sr(Ve,He)}function wo(e,t){var a=Ce;Ce|=2;var i=Vu();(Ve!==e||He!==t)&&(qt=null,Nr(e,t));do try{Hm();break}catch(l){qu(e,l)}while(!0);if(Yi(),Ce=a,ho.current=i,$e!==null)throw Error(o(261));return Ve=null,He=0,Ue}function Hm(){for(;$e!==null;)Bu($e)}function Xm(){for(;$e!==null&&!xg();)Bu($e)}function Bu(e){var t=Ku(e.alternate,e,dt);e.memoizedProps=e.pendingProps,t===null?Wu(e):$e=t,Es.current=null}function Wu(e){var t=e;do{var a=t.alternate;if(e=t.return,(t.flags&32768)===0){if(a=$m(a,t,dt),a!==null){$e=a;return}}else{if(a=Fm(a,t),a!==null){a.flags&=32767,$e=a;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ue=6,$e=null;return}}if(t=t.sibling,t!==null){$e=t;return}$e=t=e}while(t!==null);Ue===0&&(Ue=5)}function Cr(e,t,a){var i=_e,l=bt.transition;try{bt.transition=null,_e=1,Km(e,t,a,i)}finally{bt.transition=l,_e=i}return null}function Km(e,t,a,i){do oa();while(or!==null);if((Ce&6)!==0)throw Error(o(327));a=e.finishedWork;var l=e.finishedLanes;if(a===null)return null;if(e.finishedWork=null,e.finishedLanes=0,a===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var u=a.lanes|a.childLanes;if(_g(e,u),e===Ve&&($e=Ve=null,He=0),(a.subtreeFlags&2064)===0&&(a.flags&2064)===0||bo||(bo=!0,Qu(Nn,function(){return oa(),null})),u=(a.flags&15990)!==0,(a.subtreeFlags&15990)!==0||u){u=bt.transition,bt.transition=null;var g=_e;_e=1;var y=Ce;Ce|=4,Es.current=null,qm(e,a),Tu(a,e),hm(Ai),Mn=!!Ii,Ai=Ii=null,e.current=a,Vm(a),vg(),Ce=y,_e=g,bt.transition=u}else e.current=a;if(bo&&(bo=!1,or=e,xo=l),u=e.pendingLanes,u===0&&(nr=null),kg(a.stateNode),nt(e,Ae()),t!==null)for(i=e.onRecoverableError,a=0;a<t.length;a++)l=t[a],i(l.value,{componentStack:l.stack,digest:l.digest});if(mo)throw mo=!1,e=Rs,Rs=null,e;return(xo&1)!==0&&e.tag!==0&&oa(),u=e.pendingLanes,(u&1)!==0?e===Ms?Ya++:(Ya=0,Ms=e):Ya=0,er(),null}function oa(){if(or!==null){var e=Pc(xo),t=bt.transition,a=_e;try{if(bt.transition=null,_e=16>e?16:e,or===null)var i=!1;else{if(e=or,or=null,xo=0,(Ce&6)!==0)throw Error(o(331));var l=Ce;for(Ce|=4,te=e.current;te!==null;){var u=te,g=u.child;if((te.flags&16)!==0){var y=u.deletions;if(y!==null){for(var N=0;N<y.length;N++){var P=y[N];for(te=P;te!==null;){var A=te;switch(A.tag){case 0:case 11:case 15:Xa(8,A,u)}var O=A.child;if(O!==null)O.return=A,te=O;else for(;te!==null;){A=te;var I=A.sibling,Y=A.return;if(Ru(A),A===P){te=null;break}if(I!==null){I.return=Y,te=I;break}te=Y}}}var ae=u.alternate;if(ae!==null){var ne=ae.child;if(ne!==null){ae.child=null;do{var Oe=ne.sibling;ne.sibling=null,ne=Oe}while(ne!==null)}}te=u}}if((u.subtreeFlags&2064)!==0&&g!==null)g.return=u,te=g;else e:for(;te!==null;){if(u=te,(u.flags&2048)!==0)switch(u.tag){case 0:case 11:case 15:Xa(9,u,u.return)}var z=u.sibling;if(z!==null){z.return=u.return,te=z;break e}te=u.return}}var S=e.current;for(te=S;te!==null;){g=te;var R=g.child;if((g.subtreeFlags&2064)!==0&&R!==null)R.return=g,te=R;else e:for(g=S;te!==null;){if(y=te,(y.flags&2048)!==0)try{switch(y.tag){case 0:case 11:case 15:fo(9,y)}}catch(ie){Ie(y,y.return,ie)}if(y===g){te=null;break e}var q=y.sibling;if(q!==null){q.return=y.return,te=q;break e}te=y.return}}if(Ce=l,er(),Rt&&typeof Rt.onPostCommitFiberRoot=="function")try{Rt.onPostCommitFiberRoot(Cn,e)}catch{}i=!0}return i}finally{_e=a,bt.transition=t}}return!1}function Hu(e,t,a){t=ta(a,t),t=cu(e,t,1),e=rr(e,t,1),t=Je(),e!==null&&(ya(e,1,t),nt(e,t))}function Ie(e,t,a){if(e.tag===3)Hu(e,e,a);else for(;t!==null;){if(t.tag===3){Hu(t,e,a);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(nr===null||!nr.has(i))){e=ta(a,e),e=du(t,e,1),t=rr(t,e,1),e=Je(),t!==null&&(ya(t,1,e),nt(t,e));break}}t=t.return}}function Qm(e,t,a){var i=e.pingCache;i!==null&&i.delete(t),t=Je(),e.pingedLanes|=e.suspendedLanes&a,Ve===e&&(He&a)===a&&(Ue===4||Ue===3&&(He&130023424)===He&&500>Ae()-zs?Nr(e,0):_s|=a),nt(e,t)}function Xu(e,t){t===0&&((e.mode&1)===0?t=1:(t=En,En<<=1,(En&130023424)===0&&(En=4194304)));var a=Je();e=$t(e,t),e!==null&&(ya(e,t,a),nt(e,a))}function Ym(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Xu(e,a)}function Zm(e,t){var a=0;switch(e.tag){case 13:var i=e.stateNode,l=e.memoizedState;l!==null&&(a=l.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(o(314))}i!==null&&i.delete(t),Xu(e,a)}var Ku;Ku=function(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps||et.current)rt=!0;else{if((e.lanes&a)===0&&(t.flags&128)===0)return rt=!1,Om(e,t,a);rt=(e.flags&131072)!==0}else rt=!1,Le&&(t.flags&1048576)!==0&&Sd(t,Qn,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;uo(e,t),e=t.pendingProps;var l=Xr(t,Xe.current);Gr(t,a),l=ss(null,t,i,e,l,a);var u=ls();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,tt(i)?(u=!0,Hn(t)):u=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,es(t),l.updater=lo,t.stateNode=l,l._reactInternals=t,hs(t,i,e,a),t=xs(null,t,i,!0,u,a)):(t.tag=0,Le&&u&&Bi(t),Ze(null,t,l,a),t=t.child),t;case 16:i=t.elementType;e:{switch(uo(e,t),e=t.pendingProps,l=i._init,i=l(i._payload),t.type=i,l=t.tag=Gm(i),e=Ct(i,e),l){case 0:t=bs(null,t,i,e,a);break e;case 1:t=vu(null,t,i,e,a);break e;case 11:t=hu(null,t,i,e,a);break e;case 14:t=gu(null,t,i,Ct(i.type,e),a);break e}throw Error(o(306,i,""))}return t;case 0:return i=t.type,l=t.pendingProps,l=t.elementType===i?l:Ct(i,l),bs(e,t,i,l,a);case 1:return i=t.type,l=t.pendingProps,l=t.elementType===i?l:Ct(i,l),vu(e,t,i,l,a);case 3:e:{if(yu(t),e===null)throw Error(o(387));i=t.pendingProps,u=t.memoizedState,l=u.element,Td(e,t),to(t,i,null,a);var g=t.memoizedState;if(i=g.element,u.isDehydrated)if(u={element:i,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){l=ta(Error(o(423)),t),t=wu(e,t,i,a,l);break e}else if(i!==l){l=ta(Error(o(424)),t),t=wu(e,t,i,a,l);break e}else for(ct=Zt(t.stateNode.containerInfo.firstChild),lt=t,Le=!0,Nt=null,a=Ld(t,null,i,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Yr(),i===l){t=Ut(e,t,a);break e}Ze(e,t,i,a)}t=t.child}return t;case 5:return Od(t),e===null&&Xi(t),i=t.type,l=t.pendingProps,u=e!==null?e.memoizedProps:null,g=l.children,Oi(i,l)?g=null:u!==null&&Oi(i,u)&&(t.flags|=32),xu(e,t),Ze(e,t,g,a),t.child;case 6:return e===null&&Xi(t),null;case 13:return ku(e,t,a);case 4:return ts(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Zr(t,null,i,a):Ze(e,t,i,a),t.child;case 11:return i=t.type,l=t.pendingProps,l=t.elementType===i?l:Ct(i,l),hu(e,t,i,l,a);case 7:return Ze(e,t,t.pendingProps,a),t.child;case 8:return Ze(e,t,t.pendingProps.children,a),t.child;case 12:return Ze(e,t,t.pendingProps.children,a),t.child;case 10:e:{if(i=t.type._context,l=t.pendingProps,u=t.memoizedProps,g=l.value,ze(Jn,i._currentValue),i._currentValue=g,u!==null)if(jt(u.value,g)){if(u.children===l.children&&!et.current){t=Ut(e,t,a);break e}}else for(u=t.child,u!==null&&(u.return=t);u!==null;){var y=u.dependencies;if(y!==null){g=u.child;for(var N=y.firstContext;N!==null;){if(N.context===i){if(u.tag===1){N=Ft(-1,a&-a),N.tag=2;var P=u.updateQueue;if(P!==null){P=P.shared;var A=P.pending;A===null?N.next=N:(N.next=A.next,A.next=N),P.pending=N}}u.lanes|=a,N=u.alternate,N!==null&&(N.lanes|=a),Ji(u.return,a,t),y.lanes|=a;break}N=N.next}}else if(u.tag===10)g=u.type===t.type?null:u.child;else if(u.tag===18){if(g=u.return,g===null)throw Error(o(341));g.lanes|=a,y=g.alternate,y!==null&&(y.lanes|=a),Ji(g,a,t),g=u.sibling}else g=u.child;if(g!==null)g.return=u;else for(g=u;g!==null;){if(g===t){g=null;break}if(u=g.sibling,u!==null){u.return=g.return,g=u;break}g=g.return}u=g}Ze(e,t,l.children,a),t=t.child}return t;case 9:return l=t.type,i=t.pendingProps.children,Gr(t,a),l=gt(l),i=i(l),t.flags|=1,Ze(e,t,i,a),t.child;case 14:return i=t.type,l=Ct(i,t.pendingProps),l=Ct(i.type,l),gu(e,t,i,l,a);case 15:return mu(e,t,t.type,t.pendingProps,a);case 17:return i=t.type,l=t.pendingProps,l=t.elementType===i?l:Ct(i,l),uo(e,t),t.tag=1,tt(i)?(e=!0,Hn(t)):e=!1,Gr(t,a),su(t,i,l),hs(t,i,l,a),xs(null,t,i,!0,e,a);case 19:return Nu(e,t,a);case 22:return bu(e,t,a)}throw Error(o(156,t.tag))};function Qu(e,t){return Ec(e,t)}function Jm(e,t,a,i){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xt(e,t,a,i){return new Jm(e,t,a,i)}function As(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Gm(e){if(typeof e=="function")return As(e)?1:0;if(e!=null){if(e=e.$$typeof,e===B)return 11;if(e===Se)return 14}return 2}function lr(e,t){var a=e.alternate;return a===null?(a=xt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&14680064,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a}function ko(e,t,a,i,l,u){var g=2;if(i=e,typeof e=="function")As(e)&&(g=1);else if(typeof e=="string")g=5;else e:switch(e){case X:return Sr(a.children,l,u,t);case K:g=8,l|=8;break;case fe:return e=xt(12,a,t,l|2),e.elementType=fe,e.lanes=u,e;case Q:return e=xt(13,a,t,l),e.elementType=Q,e.lanes=u,e;case me:return e=xt(19,a,t,l),e.elementType=me,e.lanes=u,e;case ye:return jo(a,l,u,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ee:g=10;break e;case de:g=9;break e;case B:g=11;break e;case Se:g=14;break e;case ve:g=16,i=null;break e}throw Error(o(130,e==null?e:typeof e,""))}return t=xt(g,a,t,l),t.elementType=e,t.type=i,t.lanes=u,t}function Sr(e,t,a,i){return e=xt(7,e,i,t),e.lanes=a,e}function jo(e,t,a,i){return e=xt(22,e,i,t),e.elementType=ye,e.lanes=a,e.stateNode={isHidden:!1},e}function Os(e,t,a){return e=xt(6,e,null,t),e.lanes=a,e}function $s(e,t,a){return t=xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function eb(e,t,a,i,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=fi(0),this.expirationTimes=fi(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fi(0),this.identifierPrefix=i,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Fs(e,t,a,i,l,u,g,y,N){return e=new eb(e,t,a,y,N),t===1?(t=1,u===!0&&(t|=8)):t=0,u=xt(3,null,null,t),e.current=u,u.stateNode=e,u.memoizedState={element:i,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},es(u),e}function tb(e,t,a){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:$,key:i==null?null:""+i,children:e,containerInfo:t,implementation:a}}function Yu(e){if(!e)return Gt;e=e._reactInternals;e:{if(hr(e)!==e||e.tag!==1)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(tt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(o(171))}if(e.tag===1){var a=e.type;if(tt(a))return jd(e,a,t)}return t}function Zu(e,t,a,i,l,u,g,y,N){return e=Fs(a,i,!0,e,l,u,g,y,N),e.context=Yu(null),a=e.current,i=Je(),l=ir(a),u=Ft(i,l),u.callback=t??null,rr(a,u,l),e.current.lanes=l,ya(e,l,i),nt(e,i),e}function No(e,t,a,i){var l=t.current,u=Je(),g=ir(l);return a=Yu(a),t.context===null?t.context=a:t.pendingContext=a,t=Ft(u,g),t.payload={element:e},i=i===void 0?null:i,i!==null&&(t.callback=i),e=rr(l,t,g),e!==null&&(_t(e,l,g,u),eo(e,l,g)),g}function Co(e){return e=e.current,e.child?(e.child.tag,e.child.stateNode):null}function Ju(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Us(e,t){Ju(e,t),(e=e.alternate)&&Ju(e,t)}function rb(){return null}var Gu=typeof reportError=="function"?reportError:function(e){console.error(e)};function qs(e){this._internalRoot=e}So.prototype.render=qs.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));No(e,t,null,null)},So.prototype.unmount=qs.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;jr(function(){No(null,e,null,null)}),t[Tt]=null}};function So(e){this._internalRoot=e}So.prototype.unstable_scheduleHydration=function(e){if(e){var t=Tc();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Kt.length&&t!==0&&t<Kt[a].priority;a++);Kt.splice(a,0,e),a===0&&Oc(e)}};function Vs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Eo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ep(){}function ab(e,t,a,i,l){if(l){if(typeof i=="function"){var u=i;i=function(){var P=Co(g);u.call(P)}}var g=Zu(t,i,e,0,null,!1,!1,"",ep);return e._reactRootContainer=g,e[Tt]=g.current,Da(e.nodeType===8?e.parentNode:e),jr(),g}for(;l=e.lastChild;)e.removeChild(l);if(typeof i=="function"){var y=i;i=function(){var P=Co(N);y.call(P)}}var N=Fs(e,0,!1,null,null,!1,!1,"",ep);return e._reactRootContainer=N,e[Tt]=N.current,Da(e.nodeType===8?e.parentNode:e),jr(function(){No(t,N,a,i)}),N}function _o(e,t,a,i,l){var u=a._reactRootContainer;if(u){var g=u;if(typeof l=="function"){var y=l;l=function(){var N=Co(g);y.call(N)}}No(t,g,e,l)}else g=ab(a,t,e,l,i);return Co(g)}Lc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var a=va(t.pendingLanes);a!==0&&(hi(t,a|1),nt(t,Ae()),(Ce&6)===0&&(na=Ae()+500,er()))}break;case 13:jr(function(){var i=$t(e,1);if(i!==null){var l=Je();_t(i,e,1,l)}}),Us(e,1)}},gi=function(e){if(e.tag===13){var t=$t(e,134217728);if(t!==null){var a=Je();_t(t,e,134217728,a)}Us(e,134217728)}},Dc=function(e){if(e.tag===13){var t=ir(e),a=$t(e,t);if(a!==null){var i=Je();_t(a,e,t,i)}Us(e,t)}},Tc=function(){return _e},Ic=function(e,t){var a=_e;try{return _e=e,t()}finally{_e=a}},si=function(e,t,a){switch(t){case"input":if(Go(e,a),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<a.length;t++){var i=a[t];if(i!==e&&i.form===e.form){var l=Bn(i);if(!l)throw Error(o(90));ic(i),Go(i,l)}}}break;case"textarea":uc(e,a);break;case"select":t=a.value,t!=null&&Tr(e,!!a.multiple,t,!1)}},yc=Ds,wc=jr;var nb={usingClientEntryPoint:!1,Events:[Aa,Wr,Bn,xc,vc,Ds]},Za={findFiberByHostInstance:gr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ob={bundleType:Za.bundleType,version:Za.version,rendererPackageName:Za.rendererPackageName,rendererConfig:Za.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:J.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Cc(e),e===null?null:e.stateNode},findFiberByHostInstance:Za.findFiberByHostInstance||rb,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zo.isDisabled&&zo.supportsFiber)try{Cn=zo.inject(ob),Rt=zo}catch{}}return ot.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nb,ot.createPortal=function(e,t){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Vs(t))throw Error(o(200));return tb(e,t,null,a)},ot.createRoot=function(e,t){if(!Vs(e))throw Error(o(299));var a=!1,i="",l=Gu;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=Fs(e,1,!1,null,null,a,!1,i,l),e[Tt]=t.current,Da(e.nodeType===8?e.parentNode:e),new qs(t)},ot.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=Cc(t),e=e===null?null:e.stateNode,e},ot.flushSync=function(e){return jr(e)},ot.hydrate=function(e,t,a){if(!Eo(t))throw Error(o(200));return _o(null,e,t,!0,a)},ot.hydrateRoot=function(e,t,a){if(!Vs(e))throw Error(o(405));var i=a!=null&&a.hydratedSources||null,l=!1,u="",g=Gu;if(a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onRecoverableError!==void 0&&(g=a.onRecoverableError)),t=Zu(t,null,e,1,a??null,l,!1,u,g),e[Tt]=t.current,Da(e),i)for(e=0;e<i.length;e++)a=i[e],l=a._getVersion,l=l(a._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[a,l]:t.mutableSourceEagerHydrationData.push(a,l);return new So(t)},ot.render=function(e,t,a){if(!Eo(t))throw Error(o(200));return _o(null,e,t,!1,a)},ot.unmountComponentAtNode=function(e){if(!Eo(e))throw Error(o(40));return e._reactRootContainer?(jr(function(){_o(null,null,e,!1,function(){e._reactRootContainer=null,e[Tt]=null})}),!0):!1},ot.unstable_batchedUpdates=Ds,ot.unstable_renderSubtreeIntoContainer=function(e,t,a,i){if(!Eo(a))throw Error(o(200));if(e==null||e._reactInternals===void 0)throw Error(o(38));return _o(e,t,a,!1,i)},ot.version="18.3.1-next-f1338f8080-20240426",ot}var fp;function xb(){if(fp)return Ws.exports;fp=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(n){console.error(n)}}return r(),Ws.exports=bb(),Ws.exports}var hp;function vb(){if(hp)return Ro;hp=1;var r=xb();return Ro.createRoot=r.createRoot,Ro.hydrateRoot=r.hydrateRoot,Ro}var yb=vb();const wb=".aid-root{color-scheme:light;--background: 0 0% 100%;--background-secondary: 210, 40%, 96%;--foreground: 222.2 47.4% 11.2%;--foreground-secondary: 253, 40%, 16%;--scroll: 0, 0%, 78%;--sidebar-menu-background: 202, 100%, 18%;--sidebar: 210, 40%, 96%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 42%;--popover: 0 0% 100%;--popover-foreground: 222.2 47.4% 11.2%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--card: 0 0% 100%;--card-foreground: 222.2 47.4% 11.2%;--primary: 201, 100%, 29%;--primary-text: 201, 100%, 29%;--primary-foreground: 210, 40%, 96%;--primary-hovered: 202, 54%, 67%;--primary-pressed: 202, 100%, 18%;--disabled: 223, 8%, 18%, .15;--disabled-foreground: 223, 8%, 18%, .65;--main: 252, 39%, 16%;--main-foreground: 210, 40%, 96%;--secondary: 201, 95%, 36%, .1;--secondary-foreground: 201, 100%, 29%, 1;--secondary-hovered: 202, 54%, 67%;--secondary-pressed: 202, 100%, 18%;--accent: 223, 8%, 18%, .06;--accent-foreground: 223, 8%, 18%, 1;--destructive: 359, 84%, 50%, 1;--destructive-foreground: 0, 0%, 100%, 1;--destructive-background: 359, 84%, 50%, .1;--destructive-hovered: 359, 84%, 58%, 1;--destructive-pressed: 359, 84%, 44%, 1;--ring: 215 20.2% 65.1%;--radius: 12px;--header-height: 64px;--table-radius: 10px;--table-background: 202, 100%, 18%;--table-header-background: 223, 8%, 18%;--table-header-opacity: .02;--table-background-hover: 223, 8%, 18%;--chart-card: 210, 27%, 95%;--filled-filter: 343, 79%, 45%;--success: 100.24, 76.58%, 43.53%;--warning: 39.91, 95.83%, 52.94%;--error: 359, 84%, 50%;--processing: 201.2, 100%, 29.41%;--success-background: 90, 100%, 96%;--warning-background: 50, 100%, 95%, 1;--error-background: 8, 100%, 97%, 1;--processing-background: 204, 42%, 95%, 1;--default-background: 223, 8%, 18%, .02;--transfer-hovered: 223, 8%, 18%, .04;--transfer-selected: 204, 42%, 95%;--transfer-selected-hovered: 203, 55%, 91%;--toast-background: 204, 42%, 95%;--toast-border: 202, 55%, 85%;--toast-success-background: 90, 100%, 96%;--toast-success-border: 94, 70%, 74%;--toast-error-background: 8, 100%, 97%;--toast-error-border: 5, 100%, 89%, 1;--toast-warning-background: 50, 100%, 95%;--toast-warning-border: 46, 100%, 78%;--toast-info-background: 204, 42%, 95%;--toast-info-border: 202, 55%, 85%;--custom-magenta: 330 84% 33%;--custom-peach: 36 100% 94%;--custom-orange-soft: 18 100% 63%;--custom-orange-strong: 27, 95%, 55%;--chart-stroke: 0, 0%, 0%;--gray-soft: 220, 27%, 92%;--gray-softer: 0 0% 95%}.aid-root.dark{color-scheme:dark;--background: 222 47% 11%;--background-secondary: 217, 33%, 17%;--foreground: 210 40% 98%;--foreground-secondary: 210, 40%, 90%;--scroll: 215, 14%, 34%;--sidebar-menu-background: 222, 47%, 11%;--sidebar: 217, 33%, 17%;--muted: 217 33% 17%;--muted-foreground: 215 20.2% 65.1%;--popover: 222 47% 11%;--popover-foreground: 210 40% 98%;--border: 217 33% 25%;--input: 217 33% 25%;--card: 222 47% 11%;--card-foreground: 210 40% 98%;--primary: 201, 100%, 35%;--primary-text: 201, 90%, 60%;--primary-foreground: 210, 40%, 98%;--primary-hovered: 201, 100%, 39%;--primary-pressed: 201, 100%, 29%;--disabled: 215, 14%, 34%, .2;--disabled-foreground: 210, 40%, 90%, .5;--main: 210, 40%, 90%;--main-foreground: 222, 47%, 11%;--secondary: 201, 95%, 40%, .2;--secondary-foreground: 201, 100%, 70%, 1;--secondary-hovered: 201, 90%, 75%;--secondary-pressed: 201, 100%, 60%;--accent: 210, 40%, 90%, .1;--accent-foreground: 210, 40%, 90%, 1;--destructive: 0, 100%, 65%, 1;--destructive-foreground: 210, 40%, 98%, 1;--destructive-background: 359, 100%, 65%, .1;--destructive-hovered: 0, 100%, 70%, 1;--destructive-pressed: 0, 100%, 60%, 1;--ring: 215 20.2% 50%;--radius: 12px;--header-height: 64px;--table-radius: 10px;--table-background: 222, 47%, 15%;--table-header-background: 0, 0%, 100%;--table-header-opacity: .04;--table-background-hover: 0, 0%, 100%;--chart-card: 210, 25%, 18%;--filled-filter: 343, 79%, 55%;--success: 100.24, 76.58%, 43.53%;--warning: 39.91, 95.83%, 52.94%;--error: 359.33, 100%, 65.1%;--processing: 201, 90%, 60%;--success-background: 100, 77%, 44%, .12;--warning-background: 40, 96%, 53%, .12;--error-background: 359, 100%, 65%, .12;--processing-background: 201, 90%, 60%, .12;--default-background: 0, 0%, 100%, .04;--transfer-hovered: 0, 0%, 100%, .06;--transfer-selected: 201, 95%, 40%, .2;--transfer-selected-hovered: 201, 95%, 40%, .3;--toast-background: 222, 47%, 15%;--toast-border: 217, 33%, 25%;--toast-success-background: 142, 70%, 15%;--toast-success-border: 142, 70%, 25%;--toast-error-background: 0, 70%, 15%;--toast-error-border: 0, 70%, 25%;--toast-warning-background: 48, 70%, 15%;--toast-warning-border: 48, 70%, 25%;--toast-info-background: 201, 70%, 15%;--toast-info-border: 201, 70%, 25%;--custom-magenta: 330 84% 33%;--custom-peach: 36 100% 94%;--custom-orange-soft: 18 100% 63%;--custom-orange-strong: 27, 95%, 55%;--chart-stroke: 0, 0%, 100%;--gray-soft: 217, 33%, 22%;--gray-softer: 217 33% 17%}.aid-root{--chart-1: 12 76% 61%;--chart-2: 173 58% 39%;--chart-3: 197 37% 24%;--chart-4: 43 74% 66%;--chart-5: 27 87% 67%}",Hs=25,kb={ru:"ru-RU",kk:"kk-KZ",en:"en-US"};function zt(r,n,o){return r===null?"\u2014":new Intl.NumberFormat(kb[n],{minimumFractionDigits:o,maximumFractionDigits:o}).format(r).replace(new RegExp("\\u202F","g"),"\xA0")}const Xs=r=>typeof r=="number"&&Number.isFinite(r)?r:null;function jb(r,n,o){const s=o==="asc"?1:-1,d=n.type==="number"||n.type==="integer",p=[],f=[];for(const h of r){const m=h[n.key];((d?Xs(m)===null:m==null)?f:p).push(h)}return p.sort((h,m)=>d?s*((Xs(h[n.key])??0)-(Xs(m[n.key])??0)):s*String(h[n.key]).localeCompare(String(m[n.key]))),[...p,...f]}function Nb(r,n){let o=r.data;const s=n.query?.trim().toLowerCase();if(s){const x=r.columns.filter(C=>C.type==="string").map(C=>C.key);o=o.filter(C=>x.some(k=>String(C[k]??"").toLowerCase().includes(s)))}const d=r.columns.find(x=>x.key===n.sortKey);d&&(o=jb(o,d,n.dir??"asc"));const p=o.length,f=Math.max(1,Math.ceil(p/Hs)),h=Math.min(Math.max(1,Math.trunc(n.page)||1),f),m=(h-1)*Hs,v=o.slice(m,m+Hs);return{rows:v,page:h,pages:f,from:p===0?0:m+1,to:m+v.length,total:p}}function Cb(r){return r.split(`
|
|
9
|
+
`).map(n=>{const o=n.trim();return o.startsWith("|")?/^\|[\s:|-]+\|?$/.test(o)?null:o.replace(/^\||\|$/g,"").split("|").map(s=>s.trim()).join(" \u2014 "):n}).filter(n=>n!==null).join(`
|
|
10
|
+
`).replace(/^\s{0,3}#+\s*/gm,"").replace(/[*_`]/g,"").trim()}function Sb(r){const n=r.blocks.find(s=>s.kind==="plan"),o=[];return n&&n.passport.length>0&&o.push(n.passport.join(`
|
|
11
|
+
`)),o.push(Cb(r.content)),n?.source&&o.push(`\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A: ${n.source.name}`),o.join(`
|
|
12
|
+
|
|
13
|
+
`)}function gp(r,n){return n.isLastInBranch?n.now.getTime()>Date.parse(r.expires_at)?"expired":"open":"answered"}function Eb(r,n){const o=n.trim().toLowerCase();return o?r.filter(s=>s.label.toLowerCase().includes(o)):r}function Ga(r){return[...new Set(r.data.map(n=>n.period))].sort((n,o)=>n.localeCompare(o,void 0,{numeric:!0}))}const mp=r=>r.value_kind!=="level",bp=(r,n)=>{const o=Ga(r),s=o.indexOf(n);return s>0?o[s-1]:void 0},xp=(r,n)=>r.national?.period===n?r.national.value:null,_b=r=>{if(r.length===0)return null;const n=[...r].sort((s,d)=>s-d),o=Math.floor(n.length/2);return n.length%2?n[o]:(n[o-1]+n[o])/2},zb=r=>[r.territory_code??r.territory_name,r.item].filter(n=>!!n).join("|"),Rb=r=>[r.territory_name??r.territory_code,r.item].filter(n=>!!n).join(", ");function Ks(r,n){const o=new Map;for(const s of r.data)s.period===n&&o.set(zb(s),{name:Rb(s),value:s.value});return o}function Mb(r,n,o){return n===null||o===null||o===void 0?null:mp(r)?n-o:o<=0?null:(n/o-1)*100}const vp=r=>r!==null&&Number.isFinite(r)?r:null;function Pb(r,n){const o=Ks(r,n.period),s=bp(r,n.period),d=s?Ks(r,s):void 0,p=[...o.values()].map(m=>m.value).filter(m=>m!==null),f=p.reduce((m,v)=>m+v,0),h=n.base==="national"?xp(r,n.period):_b(p);return[...o].map(([m,{name:v,value:x}])=>{const C=vp(d?Mb(r,x,d.get(m)?.value):null);let k=x;n.mode==="deviation"?k=x===null||h===null?null:x-h:n.mode==="change"&&(k=C);const j=r.value_kind==="level"&&x!==null&&f!==0?x/f*100:null;return{key:m,name:v,value:x,display:vp(k),share:j,delta:C}}).sort((m,v)=>m.display===null||v.display===null?+(m.display===null)-+(v.display===null):v.display-m.display)}function Lb(r,n){return{deviation:[...Ks(r,n).values()].filter(o=>o.value!==null).length>=2,national:xp(r,n)!==null,change:bp(r,n)!==void 0}}function Db(r,n){return n==="value"?r.unit.label:mp(r)?"\u043F.\u043F.":n==="deviation"?r.unit.label:"%"}function Tb(r){const n=r.filter(Number.isFinite);if(n.length<2)return!0;const o=Math.max(...n),s=Math.min(...n);return o<=0||o===s?!0:(o-s)/o>=.2}function yp(r){switch(r){case"pdf":return"report";case"docx":return"document";case"pptx":return"presentation";case"xlsx":return"excel";case"csv":return"csv"}}const vt=r=>typeof r=="object"&&r!==null&&!Array.isArray(r),se=r=>typeof r=="string",Vt=r=>typeof r=="number"&&Number.isFinite(r),Qs=r=>r===null||se(r),yt=(r,n)=>Array.isArray(r)&&r.every(o=>vt(o)&&n(o)),Mo=r=>Array.isArray(r)&&r.every(se),Ib=["self","regions","districts"],Ab=["string","number","integer","period"],Ob=["indicator","territory","topic","period","scope","plan_confirm"];function $b(r){const{period:n}=r;return yt(r.indicators,o=>se(o.id)&&se(o.name)&&se(o.unit))&&yt(r.alternatives,o=>se(o.id)&&se(o.name))&&yt(r.territories,o=>se(o.code)&&se(o.name))&&se(r.scope)&&Ib.includes(r.scope)&&vt(n)&&se(n.label)&&typeof n.substituted=="boolean"&&Qs(n.reason)&&se(r.breakdown)&&Mo(r.passport)&&(r.source===void 0||vt(r.source)&&se(r.source.name))&&(r.methodology===void 0||vt(r.methodology)&&se(r.methodology.title)&&se(r.methodology.url))}function Fb(r){return se(r.section_id)&&yt(r.columns,n=>se(n.key)&&se(n.title)&&se(n.type)&&Ab.includes(n.type))&&yt(r.data,()=>!0)&&typeof r.truncated=="boolean"&&Vt(r.total_rows)}function Ub(r){return se(r.topic)&&yt(r.sections,n=>se(n.id)&&Mo(n.path)&&Vt(n.count))&&yt(r.indicators,n=>se(n.entity_id)&&se(n.name)&&se(n.unit)&&se(n.years)&&se(n.section))&&Vt(r.total)&&Mo(r.examples)}function qb(r){return se(r.id)&&se(r.type)&&Ob.includes(r.type)&&se(r.slot)&&se(r.question)&&yt(r.options,n=>se(n.value)&&se(n.label)&&Qs(n.hint))&&Qs(r.default)&&typeof r.allow_free_text=="boolean"&&Vt(r.round)&&se(r.expires_at)}const Vb=["regional","trend","breakdown","multi"],Bb=["level","percent","index","rate"],Wb=["pdf","docx","pptx","xlsx","csv"],Hb=["queued","running","done","failed","expired"],wp=["territory_code","territory_name","item"],en=r=>r==null,sa=r=>en(r)||se(r),Xb=r=>se(r.period)&&(r.value===null||Vt(r.value))&&wp.every(n=>sa(r[n])),Kb=r=>vt(r)&&se(r.title)&&se(r.url);function Qb(r){return en(r)?!0:!vt(r)||!sa(r.label)?!1:en(r.editions)?!0:vt(r.editions)&&Object.values(r.editions).every(Kb)}function Yb(r){const{unit:n,national:o}=r;return se(r.id)&&se(r.title)&&se(r.shape)&&Vb.includes(r.shape)&&vt(n)&&se(n.code)&&se(n.label)&&se(r.value_kind)&&Bb.includes(r.value_kind)&&Vt(r.decimals)&&se(r.freq)&&se(r.period)&&se(r.latest_period)&&yt(r.data,Xb)&&(en(o)||vt(o)&&se(o.period)&&Vt(o.value))&&yt(r.kpis,s=>se(s.label)&&se(s.value)&&sa(s.sub)&&sa(s.tone))&&Mo(r.findings)&&typeof r.truncated=="boolean"&&Vt(r.total_rows)&&Qb(r.methodology)&&sa(r.source_url)&&sa(r.source_name)}function Zb(r){const n={...r};for(const o of wp)n[o]===null&&delete n[o];return n}function Jb(r){if(!se(r.title)||!Array.isArray(r.sections))return;const n=r.sections.filter(o=>vt(o)&&Yb(o)).map(o=>({...o,national:o.national??null,data:o.data.map(Zb)}));if(n.length!==0)return{kind:"dashboard",title:r.title,auto_open:r.auto_open===!0,sections:n}}const kp=r=>se(r.format)&&Wb.includes(r.format)&&se(r.filename)&&se(r.title)&&se(r.download_url)&&Vt(r.size_bytes);function Gb(r){const{error:n}=r;return se(r.job_id)&&se(r.status)&&Hb.includes(r.status)&&yt(r.files,kp)&&(en(n)||vt(n)&&se(n.code)&&se(n.message))}function jp(r){if(vt(r))switch(r.kind){case"plan":return $b(r)?r:void 0;case"table":return Fb(r)?r:void 0;case"catalog":return Ub(r)?r:void 0;case"clarification":return qb(r)?r:void 0;case"dashboard":return Jb(r);case"export":return yt(r.files,kp)?r:void 0;case"report":return Gb(r)?r:void 0;default:return}}const Ys="/chat/stream",e0=100;class Ge extends Error{constructor(n,o,s=null){super(o),ia(this,"status"),ia(this,"code"),ia(this,"body"),this.name="ApiError",this.status=n,this.code=o,this.body=s}get resetAt(){const n=this.body;if(n&&typeof n=="object"&&"reset_at"in n&&typeof n.reset_at=="string")return n.reset_at}}function t0(r,n){if(r&&typeof r=="object"){if("detail"in r&&typeof r.detail=="string"&&r.detail)return r.detail;if("errors"in r&&Array.isArray(r.errors)){const o=r.errors[0];if(o&&typeof o=="object"&&"code"in o&&typeof o.code=="string"&&o.code)return o.code}}return`http_${n}`}async function r0(r){const n=await r.text();if(!n)return null;try{return JSON.parse(n)}catch{return null}}async function Zs(r){const n=await r0(r);return new Ge(r.status,t0(n,r.status),n)}const tn=r=>typeof r=="string"&&r.trim()!==""?r.trim():void 0,a0=["\u041E \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0435: ","\u041A\u0430\u043A \u043E\u0442\u0432\u0435\u0447\u0430\u0442\u044C: "],n0="\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u0434\u0438\u0430\u043B\u043E\u0433:",Np=`
|
|
14
|
+
\u041D\u043E\u0432\u044B\u0439 \u0432\u043E\u043F\u0440\u043E\u0441: `;function o0(r){let n=r;if(a0.some(o=>n.startsWith(o))){const o=n.indexOf(`
|
|
15
|
+
|
|
16
|
+
`);o!==-1&&(n=n.slice(o+2))}if(n.startsWith(n0)){const o=n.lastIndexOf(Np);o!==-1&&(n=n.slice(o+Np.length))}return n}const i0=["streaming","done","stopped","error"];function s0(r){return{...typeof r.id=="string"?{id:r.id}:{},node:typeof r.node=="string"?r.node:"",status:r.status==="running"?"running":"done",attempt:typeof r.attempt=="number"?r.attempt:1,...typeof r.durationMs=="number"?{durationMs:r.durationMs}:{},...typeof r.label=="string"?{label:r.label}:{},...typeof r.total=="number"||r.total===null?{total:r.total}:{},...tn(r.detail)!==void 0?{detail:tn(r.detail)}:{},...tn(r.result)!==void 0?{result:tn(r.result)}:{},...typeof r.startedAt=="number"?{startedAt:r.startedAt}:{}}}function Cp(r){return{id:r.id,parentId:r.parent_id,role:r.role==="user"?"user":"assistant",content:r.role==="user"?o0(r.content):r.content,mode:r.mode,status:i0.find(n=>n===r.status)??"done",steps:r.steps.map(s0),durationMs:r.duration_ms,rating:r.rating,feedback:r.feedback,feedbackReason:r.feedback_reason??"",attachments:r.attachments??[],blocks:(r.blocks??[]).flatMap(n=>{const o=jp(n);return o!=null?[o]:[]}),createdAt:r.created_at}}const l0=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,Sp=r=>l0.test(r);class Ep extends Error{constructor(n){super(n),this.name="StreamFailure"}}const c0=(r,n)=>Date.parse(r.createdAt)-Date.parse(n.createdAt)||(r.id<n.id?-1:r.id>n.id?1:0);function _p(r){const n=new Map,o=new Map;for(const s of r){n.set(s.id,s);const d=o.get(s.parentId);d?d.push(s):o.set(s.parentId,[s])}for(const s of o.values())s.sort(c0);return{byId:n,children:o}}function d0(r,n){const o=[],s=new Set;let d=r.byId.get(n);for(;d&&!s.has(d.id);)s.add(d.id),o.push(d),d=d.parentId===null?void 0:r.byId.get(d.parentId);return o.reverse()}function zp(r,n){if(!r.byId.has(n))return null;let o=n;for(;;){const s=r.children.get(o),d=s?.[s.length-1];if(!d)return o;o=d.id}}function u0(r,n){const o=r.byId.get(n);if(!o)return{list:[],position:-1};const s=r.children.get(o.parentId)??[];return{list:s,position:s.findIndex(d=>d.id===n)}}function Rp(r,n){if(n&&r.byId.has(n))return n;const o=r.children.get(null),s=o?.[o.length-1];return s?zp(r,s.id):null}let p0=0;const f0=r=>`temp-${r}-${Date.now().toString(36)}-${(p0++).toString(36)}`;function Js(r,n,o){return{id:f0(r==="user"?"user":"stream"),parent_id:o,role:r,content:"",mode:n,status:r==="user"?"done":"streaming",steps:[],duration_ms:null,rating:null,feedback:"",created_at:new Date().toISOString()}}function h0(r){return!r||r.messages.length===0?null:Rp(_p(r.messages.map(Cp)),r.current_leaf_id)}function g0(r,n){if(r.regenerateOf!=null){const d=n?.messages.find(p=>p.id===r.regenerateOf);return{assistant:Js("assistant",r.mode,d?.parent_id??null)}}const o=r.parentId===void 0?h0(n):r.parentId||null,s={...Js("user",r.mode,o),content:r.query,...r.file?{attachments:[{name:r.file.name,url:""}]}:{}};return{user:s,assistant:Js("assistant",r.mode,s.id)}}function m0(r,n,o){const s=new Map([[n.assistantId,o.assistantMessageId]]);n.userId!=null&&s.set(n.userId,o.userMessageId);const d=p=>p!=null?s.get(p)??p:p;return{...r,id:o.threadId,current_leaf_id:d(r.current_leaf_id),messages:r.messages.map(p=>s.has(p.id)||p.parent_id!=null&&s.has(p.parent_id)?{...p,id:d(p.id)??p.id,parent_id:d(p.parent_id)}:p)}}function b0(r,n){return{...r,content:n.text,steps:n.steps.map(o=>({...o})),...n.attachments.length>0?{attachments:n.attachments}:{},...n.blocks.length>0?{blocks:n.blocks.map(o=>({...o}))}:{}}}function x0(r,n,o,s){const d={...r,status:n,duration_ms:Date.now()-s};return n==="error"&&!r.content?{...d,content:o}:d}const v0=["thread_busy","mode_overloaded","daily_limit","rate_limit","concurrency_limit","file_too_large","file_not_allowed","invalid_query","invalid_parent","mode_not_found","thread_not_found","interrupted"],y0=r=>v0.includes(r);function w0(r){if(r instanceof Ge)return r.code;if(r instanceof Ep)return r.message}function Po(r){const n=w0(r);return n!=null&&y0(n)?{kind:"code",code:n}:r instanceof Ge?{kind:"status",status:r.status}:{kind:"generic"}}async function Lo(r,n,o={}){const s=o.method??"GET",d=new Headers(o.headers),p=await r.headers?.({method:s})??{};for(const[f,h]of Object.entries(p))d.set(f,h);return(r.fetch??fetch)(`${r.baseUrl}${n}`,{...o,method:s,headers:d,...r.credentials?{credentials:r.credentials}:{}})}const Mp="text/event-stream";function k0({query:r,mode:n,file:o,parentId:s,regenerateOf:d,clarification:p},f){const h=new FormData;return h.set("mode",n),d==null&&h.set("query",r),f!=null&&h.set("thread_id",f),s!==void 0&&h.set("parent_id",s),d!=null&&h.set("regenerate_of",d),o&&h.set("file",o),p&&h.set("clarification",JSON.stringify(p)),h}function j0(r,n,o){return Lo(r,Ys,{method:"POST",body:n,headers:{Accept:Mp},signal:o})}function N0(r,n,o){return Lo(r,`${Ys}/${n}`,{headers:{Accept:Mp},signal:o})}async function C0(r,n){const o=await Lo(r,`${Ys}/${n}/stop`,{method:"POST"});if(!o.ok)throw await Zs(o)}async function S0(r){if(!r.ok)throw await Zs(r);if(r.body==null)throw new Error("empty_stream");return r.body}const Gs="/api/v1/widget",el="aid_visitor",Pp=4e3,tl=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,Lp=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}:[\w-]{10,100}$/i,E0=()=>{if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();const r=new Uint8Array(16);crypto.getRandomValues(r),r[6]=(r[6]??0)&15|64,r[8]=(r[8]??0)&63|128;const n=Array.from(r,o=>o.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`},_0=(r,n)=>{if(r&&tl.test(r))return r;try{const s=n?.getItem(el);if(s&&(tl.test(s)||Lp.test(s)))return s}catch{}const o=E0();try{n?.setItem(el,o)}catch{}return o},z0=/\/api\/v1\/attachments\/([0-9a-f-]{36})\/?(?:[?#].*)?$/i,Do=(r,n)=>{const o=z0.exec(r);if(!o?.[1]){const s=/\/api\/v1\/widget\/attachments\/([0-9a-f-]{36})\/?$/i.exec(r);return s?.[1]?`${rl(n)}/attachments/${s[1]}`:null}return`${rl(n)}/attachments/${o[1]}`},rl=r=>`${r.replace(/\/+$/,"")}${Gs}`,R0=r=>{if(r==="")return r;let n;try{n=new URL(r)}catch{throw new TypeError(`AiDanaChat: api-url must be an absolute http(s) URL, got "${r}"`)}if(n.protocol!=="https:"&&n.protocol!=="http:")throw new TypeError(`AiDanaChat: api-url must be an http(s) URL, got "${r}"`);return r},al=r=>r&&(/^https:\/\//i.test(r)||/^\/(?!\/)/.test(r)||/^data:image\/(?:png|jpeg|webp|gif);/i.test(r))?r:void 0,To=r=>typeof r=="object"&&r!==null&&!Array.isArray(r),M0=r=>{if(!To(r)||!To(r.site)||!Array.isArray(r.modes)||!r.modes.every(n=>To(n)&&typeof n.slug=="string")||!To(r.visitor))throw new Error("bad config");return r},P0=r=>{const n={};if(!r||typeof r!="object")return n;const o=j=>{const _=r[j];return typeof _=="string"&&_?_:void 0},s=o("primary"),d=o("font"),p=al(o("logoUrl")),f=o("title"),h=o("scheme");s&&(n.primary=s),d&&(n.font=d),p&&(n.logoUrl=p),f&&(n.title=f),(h==="light"||h==="dark"||h==="auto")&&(n.scheme=h);const m=o("launcher");(m==="icon"||m==="label")&&(n.launcher=m);const v=o("launcherLabel");v&&(n.launcherLabel=v);const x=o("launcherShape");(x==="circle"||x==="rounded"||x==="square")&&(n.launcherShape=x),(typeof r.radius=="number"||typeof r.radius=="string"&&r.radius)&&(n.radius=r.radius);for(const j of["background","foreground","bubble","border"]){const _=o(j);_&&(n[j]=_)}const C=j=>{const _=r[j],E=typeof _=="number"?_:typeof _=="string"&&_?Number(_):NaN;return Number.isFinite(E)?E:void 0};for(const j of["windowWidth","windowHeight","offsetX","offsetY"]){const _=C(j);_!==void 0&&(n[j]=_)}const k=o("position");return(k==="bottom-right"||k==="bottom-left")&&(n.position=k),n},Dp=r=>{throw r instanceof Ge||r instanceof Error&&r.name==="AbortError"?r:new Ge(0,"network",null)},L0=({apiUrl:r,siteKey:n,visitorId:o,rememberVisitor:s,fetch:d})=>{let p=o;const f=R0(r),h=encodeURIComponent,m={baseUrl:rl(f),headers:()=>({"X-Visitor-Id":p,...n?{"X-Widget-Key":n}:{}}),credentials:"omit",...d?{fetch:d}:{}},v=async(k,j={})=>{const _=await Lo(m,k,j).catch(Dp);if(!_.ok)throw await Zs(_);return _},x=async(k,j)=>(await v(k,j)).json(),C=(k,j)=>({method:k,headers:{"Content-Type":"application/json"},body:JSON.stringify(j)});return{transport:m,apiUrl:f,config:async()=>M0(await x("/config")),health:()=>x("/modes/health"),threads:()=>x("/threads?limit=50"),thread:k=>x(`/threads/${h(k)}`),setLeaf:async(k,j)=>{await v(`/threads/${h(k)}`,C("PATCH",{current_leaf_id:j}))},deleteThread:async k=>{await v(`/threads/${h(k)}`,{method:"DELETE"})},rate:async(k,j)=>{await v(`/messages/${h(k)}/rating`,C("POST",{rating:j}))},feedback:async(k,j,_)=>{await v(`/messages/${h(k)}/feedback`,C("POST",_?{feedback:j,reason:_}:{feedback:j}))},stop:k=>C0(m,h(k)).catch(Dp),createReport:(k,j)=>x(`/messages/${h(k)}/report`,C("POST",{language:j})),reportStatus:k=>tl.test(k)?x(`/report-jobs/${k}`):Promise.reject(new Ge(0,"bad_job_id",null)),request:k=>v(k),attachment:async k=>{const j=Do(k,f);if(!j)throw new Ge(0,"not_attachment",null);const _=j.slice(m.baseUrl.length),E=await(await v(_)).blob();return URL.createObjectURL(E)},adoptVisitor:k=>!k||!Lp.test(k)||k===p?!1:(p=k,s?.(k),!0)}},nl=["kk","ru","en"],D0=r=>nl.includes(r),Tp=r=>{const n=[r,typeof document<"u"?document.documentElement.lang:void 0,typeof navigator<"u"?navigator.language:void 0];for(const o of n){const s=o?.toLowerCase().split("-")[0];if(D0(s))return s}return"ru"},Ip={title:"AI-Dana",open:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0447\u0430\u0442",unreadAnswers:"\u043D\u043E\u0432\u044B\u0445 \u043E\u0442\u0432\u0435\u0442\u043E\u0432: {count}",ask:"\u0417\u0430\u0434\u0430\u0442\u044C \u0432\u043E\u043F\u0440\u043E\u0441",close:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C",history:"\u0418\u0441\u0442\u043E\u0440\u0438\u044F",closeHistory:"\u0421\u043A\u0440\u044B\u0442\u044C \u0438\u0441\u0442\u043E\u0440\u0438\u044E",newChat:"\u041D\u043E\u0432\u044B\u0439 \u0447\u0430\u0442",untitled:"\u041D\u043E\u0432\u044B\u0439 \u0447\u0430\u0442",historyEmpty:"\u041F\u043E\u043A\u0430 \u043D\u0435\u0442 \u0447\u0430\u0442\u043E\u0432",historyError:"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0438\u0441\u0442\u043E\u0440\u0438\u044E",delete:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C",deleteConfirm:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0447\u0430\u0442?",deleteYes:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C",deleteNo:"\u041E\u0442\u043C\u0435\u043D\u0430",deleteError:"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u0447\u0430\u0442",modeLabel:"\u0420\u0435\u0436\u0438\u043C \u043E\u0442\u0432\u0435\u0442\u0430","health.idle":"\u0421\u0432\u043E\u0431\u043E\u0434\u0435\u043D","health.busy":"\u0417\u0430\u043D\u044F\u0442","health.unavailable":"\u041D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D",placeholder:"\u0417\u0430\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u043E\u043F\u0440\u043E\u0441\u044B",inputLabel:"\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435",send:"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C",stop:"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C",attach:"\u041F\u0440\u0438\u043A\u0440\u0435\u043F\u0438\u0442\u044C \u0444\u0430\u0439\u043B",attachOne:"\u041C\u043E\u0436\u043D\u043E \u043F\u0440\u0438\u043A\u0440\u0435\u043F\u0438\u0442\u044C \u0442\u043E\u043B\u044C\u043A\u043E \u043E\u0434\u0438\u043D \u0444\u0430\u0439\u043B",attachHint:"\u041C\u043E\u0436\u043D\u043E \u043F\u0440\u0438\u043A\u0440\u0435\u043F\u0438\u0442\u044C \u043E\u0434\u0438\u043D \u0444\u0430\u0439\u043B: XLS, XLSX, CSV, TXT \u0438\u043B\u0438 MD \u0434\u043E {size} \u041C\u0411",disclaimer:"\u0418\u0418 \u043C\u043E\u0436\u0435\u0442 \u043E\u0448\u0438\u0431\u0430\u0442\u044C\u0441\u044F \u2014 \u043F\u0440\u043E\u0432\u0435\u0440\u044F\u0439\u0442\u0435 \u0432\u0430\u0436\u043D\u0443\u044E \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044E",removeFile:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0444\u0430\u0439\u043B",counter:"{count} / {max}",counterLimit:"\u0414\u043E\u0441\u0442\u0438\u0433\u043D\u0443\u0442 \u043F\u0440\u0435\u0434\u0435\u043B \u0437\u043D\u0430\u043A\u043E\u0432",counterOver:"\u041F\u0440\u0435\u0432\u044B\u0448\u0435\u043D \u043F\u0440\u0435\u0434\u0435\u043B \u0437\u043D\u0430\u043A\u043E\u0432",fileTooLarge:"\u0424\u0430\u0439\u043B \xAB{name}\xBB \u0431\u043E\u043B\u044C\u0448\u0435 {size} \u041C\u0411",fileType:"\u0424\u0430\u0439\u043B \xAB{name}\xBB \u043D\u0435 \u043F\u043E\u0434\u0445\u043E\u0434\u0438\u0442. \u041C\u043E\u0436\u043D\u043E \u043F\u0440\u0438\u043A\u0440\u0435\u043F\u0438\u0442\u044C XLS, XLSX, CSV, TXT \u0438\u043B\u0438 MD",modeUnavailable:"\u0420\u0435\u0436\u0438\u043C \u0441\u0435\u0439\u0447\u0430\u0441 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D, \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u043E\u0439",greeting:"\u0427\u0435\u043C \u043C\u043E\u0433\u0443 \u043F\u043E\u043C\u043E\u0447\u044C?",loading:"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430\u2026",configError:"\u0427\u0430\u0442 \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D",overloaded:"\u0421\u0435\u0440\u0432\u0438\u0441 \u0441\u0435\u0439\u0447\u0430\u0441 \u043F\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043D. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.",retry:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C",dismiss:"\u0421\u043A\u0440\u044B\u0442\u044C",scrollDown:"\u041F\u0440\u043E\u043A\u0440\u0443\u0442\u0438\u0442\u044C \u0432\u043D\u0438\u0437",settings:"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438","settings.language":"\u042F\u0437\u044B\u043A","settings.theme":"\u0422\u0435\u043C\u0430","settings.themeLight":"\u0421\u0432\u0435\u0442\u043B\u0430\u044F","settings.themeDark":"\u0422\u0451\u043C\u043D\u0430\u044F","settings.themeAuto":"\u041A\u0430\u043A \u0432 \u0441\u0438\u0441\u0442\u0435\u043C\u0435","settings.model":"\u041C\u043E\u0434\u0435\u043B\u044C \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E","settings.modelHint":"\u0421 \u043D\u0435\u0451 \u043D\u0430\u0447\u0438\u043D\u0430\u0435\u0442\u0441\u044F \u043A\u0430\u0436\u0434\u044B\u0439 \u043D\u043E\u0432\u044B\u0439 \u0447\u0430\u0442","settings.shortcuts":"\u0413\u043E\u0440\u044F\u0447\u0438\u0435 \u043A\u043B\u0430\u0432\u0438\u0448\u0438","shortcut.search":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0447\u0430\u0442\u0430\u043C","shortcut.newChat":"\u041D\u043E\u0432\u044B\u0439 \u0447\u0430\u0442","shortcut.sidebar":"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0438\u043B\u0438 \u0441\u043A\u0440\u044B\u0442\u044C \u043F\u0430\u043D\u0435\u043B\u044C","shortcut.close":"\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u043E\u043A\u043D\u043E",search:"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0447\u0430\u0442\u0430\u043C",searchEmpty:"\u041D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E",collapseSidebar:"\u0421\u043A\u0440\u044B\u0442\u044C \u043F\u0430\u043D\u0435\u043B\u044C",expandSidebar:"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043F\u0430\u043D\u0435\u043B\u044C",expand:"\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u043D\u0430 \u0432\u0441\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443",shrink:"\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C",examples:"\u041F\u0440\u0438\u043C\u0435\u0440\u044B \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u0432","examples.whatCanDo":"\u0427\u0442\u043E \u043C\u043E\u0436\u043D\u043E \u0441\u0434\u0435\u043B\u0430\u0442\u044C","group.pinned":"\u0417\u0430\u043A\u0440\u0435\u043F\u043B\u0451\u043D\u043D\u044B\u0435","group.today":"\u0421\u0435\u0433\u043E\u0434\u043D\u044F","group.yesterday":"\u0412\u0447\u0435\u0440\u0430","group.week":"\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 7 \u0434\u043D\u0435\u0439","group.earlier":"\u0420\u0430\u043D\u0435\u0435","errors.thread_busy":"AI-Dana \u0435\u0449\u0451 \u043E\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0432 \u044D\u0442\u043E\u043C \u0447\u0430\u0442\u0435. \u0414\u043E\u0436\u0434\u0438\u0442\u0435\u0441\u044C \u043E\u0442\u0432\u0435\u0442\u0430 \u0438\u043B\u0438 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0435 \u0435\u0433\u043E.","errors.mode_overloaded":"AI-Dana \u0441\u0435\u0439\u0447\u0430\u0441 \u043F\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043D\u0430, \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0447\u0443\u0442\u044C \u043F\u043E\u0437\u0436\u0435","errors.daily_limit":"\u041B\u0438\u043C\u0438\u0442 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439 \u043D\u0430 \u0441\u0435\u0433\u043E\u0434\u043D\u044F \u0438\u0441\u0447\u0435\u0440\u043F\u0430\u043D","errors.rate_limit":"\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439 \u043F\u043E\u0434\u0440\u044F\u0434. \u041F\u043E\u0434\u043E\u0436\u0434\u0438\u0442\u0435 \u043C\u0438\u043D\u0443\u0442\u0443.","errors.ip_limit":"\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439 \u0438\u0437 \u0432\u0430\u0448\u0435\u0439 \u0441\u0435\u0442\u0438 \u0441\u0435\u0433\u043E\u0434\u043D\u044F. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0437\u0430\u0432\u0442\u0440\u0430.","errors.concurrency_limit":"\u0414\u043E\u0436\u0434\u0438\u0442\u0435\u0441\u044C \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u0433\u043E \u043E\u0442\u0432\u0435\u0442\u0430","errors.file_too_large":"\u0424\u0430\u0439\u043B \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0439","errors.file_not_allowed":"\u042D\u0442\u043E\u0442 \u0444\u0430\u0439\u043B \u043D\u0435\u043B\u044C\u0437\u044F \u043F\u0440\u0438\u043A\u0440\u0435\u043F\u0438\u0442\u044C. \u041F\u043E\u0434\u0445\u043E\u0434\u044F\u0442 XLS, XLSX, CSV, TXT \u0438 MD","errors.invalid_query":"\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u043F\u0443\u0441\u0442\u043E\u0435 \u0438\u043B\u0438 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0434\u043B\u0438\u043D\u043D\u043E\u0435","errors.invalid_parent":"\u042D\u0442\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435\u043B\u044C\u0437\u044F \u0438\u0437\u043C\u0435\u043D\u0438\u0442\u044C","errors.mode_not_found":"\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u0440\u0435\u0436\u0438\u043C \u0441\u0435\u0439\u0447\u0430\u0441 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D. \u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u043E\u0439 \u0440\u0435\u0436\u0438\u043C.","errors.thread_not_found":"\u0427\u0430\u0442 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D","errors.interrupted":"\u041E\u0442\u0432\u0435\u0442 \u043F\u0440\u0435\u0440\u0432\u0430\u043D","errors.code":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043E\u0442\u0432\u0435\u0442 (\u043A\u043E\u0434 {code}).","errors.generic":"\u041F\u0440\u043E\u0438\u0437\u043E\u0448\u043B\u0430 \u043E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F.","errors.network":"\u041D\u0435\u0442 \u0441\u0432\u044F\u0437\u0438 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043E\u043C. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435.","errors.render":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u044D\u0442\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435.","agent.thinking":"\u0414\u0443\u043C\u0430\u044E\u2026","agent.done":"\u0413\u043E\u0442\u043E\u0432\u043E","agent.stopped":"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043E","agent.stopping":"\u041E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u044E\u2026","agent.interrupted":"\u041E\u0442\u0432\u0435\u0442 \u043F\u0440\u0435\u0440\u0432\u0430\u043D","agent.answerStopped":"\u041E\u0442\u0432\u0435\u0442 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D. \u0417\u0430\u0434\u0430\u0439\u0442\u0435 \u0432\u043E\u043F\u0440\u043E\u0441 \u0437\u0430\u043D\u043E\u0432\u043E, \u0435\u0441\u043B\u0438 \u043D\u0443\u0436\u043D\u043E","agent.seconds":"{value} \u0441","agent.attempt":"\u043F\u043E\u043F\u044B\u0442\u043A\u0430 {count}","agent.showSteps":"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0448\u0430\u0433\u0438","agent.hideSteps":"\u0421\u043A\u0440\u044B\u0442\u044C \u0448\u0430\u0433\u0438","steps.router":"\u0420\u0430\u0437\u0431\u0438\u0440\u0430\u044E \u0432\u043E\u043F\u0440\u043E\u0441","steps.context_builder":"\u0418\u0449\u0443 \u043D\u0443\u0436\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435","steps.sql_architect":"\u0413\u043E\u0442\u043E\u0432\u043B\u044E \u0440\u0430\u0441\u0447\u0451\u0442","steps.executor":"\u0421\u0447\u0438\u0442\u0430\u044E \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u0438","steps.responder":"\u0413\u043E\u0442\u043E\u0432\u043B\u044E \u043E\u0442\u0432\u0435\u0442","steps.rag":"\u0418\u0449\u0443 \u0432 \u0441\u043F\u0440\u0430\u0432\u043E\u0447\u043D\u044B\u0445 \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u0430\u0445","steps.sql":"\u0418\u0449\u0443 \u0434\u0430\u043D\u043D\u044B\u0435 \u0432 \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0445 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430\u0445","steps.document":"\u0427\u0438\u0442\u0430\u044E \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442","steps.understand":"\u0420\u0430\u0437\u0431\u0438\u0440\u0430\u044E \u0432\u043E\u043F\u0440\u043E\u0441","steps.search_law":"\u0418\u0449\u0443 \u0432 \u0437\u0430\u043A\u043E\u043D\u0430\u0445","steps.run_sql":"\u0421\u0447\u0438\u0442\u0430\u044E \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u0438","steps.run_query":"\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u0434\u0430\u043D\u043D\u044B\u0435","steps.data":"\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u0434\u0430\u043D\u043D\u044B\u0435","steps.lookup_taxpayer":"\u0418\u0449\u0443 \u043D\u0430\u043B\u043E\u0433\u043E\u043F\u043B\u0430\u0442\u0435\u043B\u044C\u0449\u0438\u043A\u0430","steps.find_taxpayer":"\u0418\u0449\u0443 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u044E \u043F\u043E \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044E","steps.ask_clarification":"\u0423\u0442\u043E\u0447\u043D\u044F\u044E \u0432\u043E\u043F\u0440\u043E\u0441","steps.answer":"\u0413\u043E\u0442\u043E\u0432\u043B\u044E \u043E\u0442\u0432\u0435\u0442","steps.think":"\u0410\u043D\u0430\u043B\u0438\u0437\u0438\u0440\u0443\u044E \u043D\u0430\u0439\u0434\u0435\u043D\u043D\u043E\u0435","steps.file":"\u0427\u0438\u0442\u0430\u044E \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442","waiting.router.1":"\u0412\u044B\u0431\u0438\u0440\u0430\u044E, \u0433\u0434\u0435 \u0438\u0441\u043A\u0430\u0442\u044C \u043E\u0442\u0432\u0435\u0442\u2026","waiting.router.2":"\u0421\u043E\u043F\u043E\u0441\u0442\u0430\u0432\u043B\u044F\u044E \u0432\u043E\u043F\u0440\u043E\u0441 \u0441 \u0434\u0430\u043D\u043D\u044B\u043C\u0438 \u0438 \u043D\u043E\u0440\u043C\u0430\u043C\u0438\u2026","waiting.responder.1":"\u0421\u0432\u0435\u0440\u044F\u044E \u0446\u0438\u0444\u0440\u044B \u0441 \u0434\u0430\u043D\u043D\u044B\u043C\u0438\u2026","waiting.responder.2":"\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u044E \u0441\u0441\u044B\u043B\u043A\u0438 \u043D\u0430 \u043D\u043E\u0440\u043C\u044B\u2026","waiting.responder.3":"\u041F\u0440\u0438\u0432\u043E\u0436\u0443 \u043E\u0442\u0432\u0435\u0442 \u0432 \u043F\u043E\u0440\u044F\u0434\u043E\u043A\u2026","waiting.law.1":"\u0427\u0438\u0442\u0430\u044E \u043D\u0430\u0439\u0434\u0435\u043D\u043D\u044B\u0435 \u0441\u0442\u0430\u0442\u044C\u0438\u2026","waiting.law.2":"\u0421\u0432\u0435\u0440\u044F\u044E \u0440\u0435\u0434\u0430\u043A\u0446\u0438\u0438 \u043D\u043E\u0440\u043C\u2026","waiting.data.1":"\u0421\u0447\u0438\u0442\u0430\u044E \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u0438\u2026","waiting.data.2":"\u0421\u0432\u0435\u0440\u044F\u044E \u0438\u0442\u043E\u0433\u0438\u2026","waiting.executor.1":"\u0421\u0432\u0435\u0440\u044F\u044E \u0438\u0442\u043E\u0433\u0438\u2026","waiting.executor.2":"\u041F\u0440\u0438\u0432\u043E\u0436\u0443 \u0442\u0430\u0431\u043B\u0438\u0446\u0443 \u0432 \u043F\u043E\u0440\u044F\u0434\u043E\u043A\u2026","waiting.taxpayer.1":"\u0421\u043E\u0431\u0438\u0440\u0430\u044E \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0443\u2026","waiting.taxpayer.2":"\u0421\u043C\u043E\u0442\u0440\u044E \u043F\u043E\u0441\u0442\u0443\u043F\u043B\u0435\u043D\u0438\u044F \u043F\u043E \u0433\u043E\u0434\u0430\u043C\u2026","waiting.findCompany.1":"\u0421\u0432\u0435\u0440\u044F\u044E \u043F\u043E\u0445\u043E\u0436\u0438\u0435 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044F\u2026","waiting.findCompany.2":"\u0412\u044B\u0431\u0438\u0440\u0430\u044E \u0441\u0430\u043C\u043E\u0435 \u0442\u043E\u0447\u043D\u043E\u0435 \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0435\u2026","waiting.think.1":"\u0421\u043E\u043F\u043E\u0441\u0442\u0430\u0432\u043B\u044F\u044E \u043D\u0430\u0439\u0434\u0435\u043D\u043D\u043E\u0435 \u0441 \u0432\u043E\u043F\u0440\u043E\u0441\u043E\u043C\u2026","waiting.think.2":"\u0420\u0435\u0448\u0430\u044E, \u0447\u0442\u043E \u043F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u0435\u0449\u0451\u2026","waiting.unknown.1":"\u0415\u0449\u0451 \u043D\u0435\u043C\u043D\u043E\u0433\u043E\u2026","waiting.unknown.2":"\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u044E \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u2026","steps.unknown":"\u0420\u0430\u0431\u043E\u0442\u0430\u044E \u043D\u0430\u0434 \u043E\u0442\u0432\u0435\u0442\u043E\u043C",copy:"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C",copied:"\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E",download:"\u0421\u043A\u0430\u0447\u0430\u0442\u044C",regenerate:"\u041E\u0442\u0432\u0435\u0442\u0438\u0442\u044C \u0437\u0430\u043D\u043E\u0432\u043E",edit:"\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435",editLabel:"\u0422\u0435\u043A\u0441\u0442 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F",cancel:"\u041E\u0442\u043C\u0435\u043D\u0430",actionsLabel:"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0441 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435\u043C",rate:"\u041E\u0446\u0435\u043D\u0438\u0442\u044C \u043D\u0430 {count} \u0438\u0437 3",ratingError:"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043E\u0446\u0435\u043D\u043A\u0443",feedbackOpen:"\u041E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u0437\u044B\u0432",feedbackEdit:"\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043E\u0442\u0437\u044B\u0432",feedbackLabel:"\u041E\u0442\u0437\u044B\u0432 \u043E\u0431 \u043E\u0442\u0432\u0435\u0442\u0435",feedbackPlaceholder:"\u0412\u0430\u0448 \u043E\u0442\u0437\u044B\u0432 \u043E\u0431 \u043E\u0442\u0432\u0435\u0442\u0435",save:"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C","branch.label":"\u0412\u0430\u0440\u0438\u0430\u043D\u0442\u044B","branch.prev":"\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442","branch.next":"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442","branch.error":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432\u0430\u0440\u0438\u0430\u043D\u0442","limit.remaining":"\u0421\u0435\u0433\u043E\u0434\u043D\u044F \u043E\u0441\u0442\u0430\u043B\u043E\u0441\u044C {count} \u0438\u0437 {limit} \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439","limit.exhausted":"\u041B\u0438\u043C\u0438\u0442 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439 \u043D\u0430 \u0441\u0435\u0433\u043E\u0434\u043D\u044F \u0438\u0441\u0447\u0435\u0440\u043F\u0430\u043D","limit.until":"\u041B\u0438\u043C\u0438\u0442 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439 \u0438\u0441\u0447\u0435\u0440\u043F\u0430\u043D. \u041D\u043E\u0432\u044B\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u2014 \u043F\u043E\u0441\u043B\u0435 {time}.","blocks.data":"\u0414\u0430\u043D\u043D\u044B\u0435","blocks.hideData":"\u0421\u043A\u0440\u044B\u0442\u044C \u0434\u0430\u043D\u043D\u044B\u0435","blocks.methodology":"\u041C\u0435\u0442\u043E\u0434\u043E\u043B\u043E\u0433\u0438\u044F","blocks.passport":"\u0427\u0442\u043E \u043F\u043E\u0441\u0447\u0438\u0442\u0430\u043D\u043E","blocks.indicator":"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044C","blocks.territory":"\u0422\u0435\u0440\u0440\u0438\u0442\u043E\u0440\u0438\u044F","blocks.period":"\u041F\u0435\u0440\u0438\u043E\u0434","blocks.breakdown":"\u0420\u0430\u0437\u0440\u0435\u0437","blocks.breakdown.sex":"\u043F\u043E \u043F\u043E\u043B\u0443","blocks.breakdown.age":"\u043F\u043E \u0432\u043E\u0437\u0440\u0430\u0441\u0442\u0443","blocks.breakdown.urban_rural":"\u0433\u043E\u0440\u043E\u0434 \u0438 \u0441\u0435\u043B\u043E","blocks.breakdown.activity":"\u043F\u043E \u0432\u0438\u0434\u0430\u043C \u0434\u0435\u044F\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u0438","blocks.breakdown.item":"\u043F\u043E \u0442\u043E\u0432\u0430\u0440\u0430\u043C","blocks.substituted":"\u043F\u043E\u0434\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0430","blocks.alternatives":"\u041F\u043E\u0445\u043E\u0436\u0438\u0435 \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u0438","blocks.table":"\u0422\u0430\u0431\u043B\u0438\u0446\u0430 \u0434\u0430\u043D\u043D\u044B\u0445","blocks.tableSearch":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0442\u0430\u0431\u043B\u0438\u0446\u0435\u2026","blocks.tableEmpty":"\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445","blocks.page":"{a} \u0438\u0437 {b}","blocks.prevPage":"\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430","blocks.nextPage":"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430","blocks.truncated":"\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u044B \u043F\u0435\u0440\u0432\u044B\u0435 {n} \u0441\u0442\u0440\u043E\u043A \u2014 \u043F\u043E\u043B\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435 \u0432 Excel","blocks.catalogMore":"\u2026\u0438 \u0435\u0449\u0451 {count} \u0432 \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0435","blocks.catalogExamples":"\u041C\u043E\u0436\u043D\u043E \u0441\u043F\u0440\u043E\u0441\u0438\u0442\u044C","blocks.options":"\u0412\u0430\u0440\u0438\u0430\u043D\u0442\u044B \u043E\u0442\u0432\u0435\u0442\u0430","blocks.default":"\u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E","blocks.freeTextHint":"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0430\u0440\u0438\u0430\u043D\u0442 \u0438\u043B\u0438 \u043D\u0430\u043F\u0438\u0448\u0438\u0442\u0435 \u0441\u0432\u043E\u0439 \u0432 \u043F\u043E\u043B\u0435 \u043D\u0438\u0436\u0435","blocks.findOption":"\u041D\u0430\u0439\u0442\u0438 \u0432 \u0441\u043F\u0438\u0441\u043A\u0435\u2026","blocks.chosen":"\u0412\u044B\u0431\u0440\u0430\u043D\u043E: {label}","blocks.continue":"\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C","blocks.cancelPlan":"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C","blocks.expired":"\u0423\u0442\u043E\u0447\u043D\u0435\u043D\u0438\u0435 \u0443\u0441\u0442\u0430\u0440\u0435\u043B\u043E","blocks.askAgain":"\u0417\u0430\u0434\u0430\u0442\u044C \u0432\u043E\u043F\u0440\u043E\u0441 \u0437\u0430\u043D\u043E\u0432\u043E","blocks.dashboard":"\u0414\u0430\u0448\u0431\u043E\u0440\u0434","blocks.hideDashboard":"\u0421\u043A\u0440\u044B\u0442\u044C \u0434\u0430\u0448\u0431\u043E\u0440\u0434","chart.kinds":"\u0412\u0438\u0434 \u0434\u0438\u0430\u0433\u0440\u0430\u043C\u043C\u044B","chart.kind.bar":"\u041F\u043E\u043B\u043E\u0441\u044B","chart.kind.column":"\u0421\u0442\u043E\u043B\u0431\u0446\u044B","chart.kind.pie":"\u041A\u0440\u0443\u0433\u043E\u0432\u0430\u044F","chart.kind.line":"\u041B\u0438\u043D\u0438\u0438","chart.kind.area":"\u041E\u0431\u043B\u0430\u0441\u0442\u0438","chart.national":"\u0420\u041A {value}","chart.top":"\u0422\u043E\u043F-{n} \u0438\u0437 {total} \u2014 \u0432\u0441\u0451 \u0432 \u0434\u0430\u0448\u0431\u043E\u0440\u0434\u0435","chart.label":"{title}, {period}","files.list":"\u0424\u0430\u0439\u043B\u044B","files.report":"\u0413\u043E\u0442\u043E\u0432\u044B\u0439 \u043E\u0442\u0447\u0451\u0442","files.document":"\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u0443\u0435\u043C\u044B\u0439 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442","files.presentation":"\u041F\u0440\u0435\u0437\u0435\u043D\u0442\u0430\u0446\u0438\u044F","files.excel":"\u0414\u0430\u043D\u043D\u044B\u0435 Excel","files.csv":"\u0414\u0430\u043D\u043D\u044B\u0435 CSV","files.failed":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043A\u0430\u0447\u0430\u0442\u044C \u0444\u0430\u0439\u043B","report.create":"\u0421\u0444\u043E\u0440\u043C\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043E\u0442\u0447\u0451\u0442","report.pending":"\u0424\u0430\u0439\u043B\u044B \u043E\u0442\u0447\u0451\u0442\u0430 \u0444\u043E\u0440\u043C\u0438\u0440\u0443\u044E\u0442\u0441\u044F\u2026","report.failed":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u0444\u043E\u0440\u043C\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0444\u0430\u0439\u043B\u044B \u043E\u0442\u0447\u0451\u0442\u0430","report.retry":"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C","report.expired":"\u0421\u0440\u043E\u043A \u0444\u0430\u0439\u043B\u043E\u0432 \u0438\u0441\u0442\u0451\u043A","dashboard.eyebrow":"\u0410\u043D\u0430\u043B\u0438\u0442\u0438\u043A\u0430","dashboard.label":"\u0414\u0430\u0448\u0431\u043E\u0440\u0434","dashboard.sections":"\u0420\u0430\u0437\u0434\u0435\u043B\u044B \u0434\u0430\u0448\u0431\u043E\u0440\u0434\u0430","dashboard.regions":"\u0440\u0435\u0433\u0438\u043E\u043D\u043E\u0432: {n}","dashboard.items":"\u043F\u043E\u0437\u0438\u0446\u0438\u0439: {n}","dashboard.openSource":"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0435","dashboard.methodology":"\u041C\u0435\u0442\u043E\u0434\u043E\u043B\u043E\u0433\u0438\u044F","dashboard.fullscreen":"\u041D\u0430 \u0432\u0435\u0441\u044C \u044D\u043A\u0440\u0430\u043D","dashboard.collapse":"\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C","dashboard.close":"\u0417\u0430\u043A\u0440\u044B\u0442\u044C","dashboard.chatTab":"\u0427\u0430\u0442","dashboard.dashboardTab":"\u0414\u0430\u0448\u0431\u043E\u0440\u0434","dashboard.view":"\u0427\u0430\u0442 \u0438\u043B\u0438 \u0434\u0430\u0448\u0431\u043E\u0440\u0434","dashboard.region":"\u0420\u0435\u0433\u0438\u043E\u043D","dashboard.allRegions":"\u0412\u0441\u0435 \u0440\u0435\u0433\u0438\u043E\u043D\u044B","dashboard.period":"\u041F\u0435\u0440\u0438\u043E\u0434","dashboard.mode.label":"\u0420\u0435\u0436\u0438\u043C","dashboard.mode.value":"\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435","dashboard.mode.deviation":"\u041E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u0438\u0435","dashboard.mode.change":"\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435","dashboard.base.label":"\u0411\u0430\u0437\u0430 \u043E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u0438\u044F","dashboard.base.median":"\u043E\u0442 \u043C\u0435\u0434\u0438\u0430\u043D\u044B","dashboard.base.national":"\u043E\u0442 \u0420\u041A","dashboard.noPrevious":"\u041D\u0435\u0442 \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u0433\u043E \u043F\u0435\u0440\u0438\u043E\u0434\u0430","dashboard.noNational":"\u041D\u0435\u0442 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u043F\u043E \u0441\u0442\u0440\u0430\u043D\u0435 \u0437\u0430 \u044D\u0442\u043E\u0442 \u043F\u0435\u0440\u0438\u043E\u0434","dashboard.fewRegions":"\u041D\u0443\u0436\u043D\u043E \u0445\u043E\u0442\u044F \u0431\u044B \u0434\u0432\u0430 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F","dashboard.ranking":"\u0420\u0435\u0439\u0442\u0438\u043D\u0433","dashboard.trend":"\u0414\u0438\u043D\u0430\u043C\u0438\u043A\u0430","dashboard.findings":"\u0412\u044B\u0432\u043E\u0434\u044B","dashboard.data":"\u0414\u0430\u043D\u043D\u044B\u0435","dashboard.kpis":"\u041A\u043B\u044E\u0447\u0435\u0432\u044B\u0435 \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u0438","dashboard.table.rank":"\u2116","dashboard.table.position":"\u041F\u043E\u0437\u0438\u0446\u0438\u044F","dashboard.table.value":"\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435, {unit}","dashboard.table.share":"\u0414\u043E\u043B\u044F, %","dashboard.table.deviation":"\u041E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u0438\u0435, {unit}","dashboard.table.change":"\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435, {unit}","dashboard.source":"\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A: {name}","dashboard.points":"\u043F.\u043F.","dashboard.kpi.national":"\u0420\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u041A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","dashboard.kpi.max":"\u041C\u0430\u043A\u0441\u0438\u043C\u0443\u043C","dashboard.kpi.min":"\u041C\u0438\u043D\u0438\u043C\u0443\u043C","dashboard.kpi.median":"\u041C\u0435\u0434\u0438\u0430\u043D\u0430 \u043F\u043E \u0440\u0435\u0433\u0438\u043E\u043D\u0430\u043C","dashboard.kpi.spread":"\u0420\u0430\u0437\u043C\u0430\u0445","dashboard.kpi.gap":"\u0420\u0430\u0437\u0440\u044B\u0432","dashboard.kpi.last":"\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435","dashboard.kpi.first":"\u041D\u0430\u0447\u0430\u043B\u043E \u043F\u0435\u0440\u0438\u043E\u0434\u0430","dashboard.kpi.change":"\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435","dashboard.kpi.place":"\u041C\u0435\u0441\u0442\u043E","dashboard.kpi.placeOf":"{n} \u0438\u0437 {m}","dashboard.kpi.deviation":"\u041E\u0442\u043A\u043B. \u043E\u0442 \u043C\u0435\u0434\u0438\u0430\u043D\u044B","dashboard.kpi.previous":"\u041A \u043F\u0440\u043E\u0448\u043B\u043E\u043C\u0443 \u043F\u0435\u0440\u0438\u043E\u0434\u0443","steps.counter":"{done} \u0438\u0437 {total}","feedback.reason.wrong_number":"\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0446\u0438\u0444\u0440\u0430","feedback.reason.wrong_indicator":"\u041D\u0435 \u0442\u043E\u0442 \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044C","feedback.reason.wrong_territory":"\u041D\u0435 \u0442\u0430 \u0442\u0435\u0440\u0440\u0438\u0442\u043E\u0440\u0438\u044F","feedback.reason.wrong_period":"\u041D\u0435 \u0442\u043E\u0442 \u043F\u0435\u0440\u0438\u043E\u0434","feedback.reason.not_answered":"\u041D\u0435\u0442 \u043E\u0442\u0432\u0435\u0442\u0430 \u043D\u0430 \u0432\u043E\u043F\u0440\u043E\u0441","feedback.reason.language":"\u042F\u0437\u044B\u043A \u043E\u0442\u0432\u0435\u0442\u0430","feedback.reason.slow":"\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0434\u043E\u043B\u0433\u043E","feedback.reason.other":"\u0414\u0440\u0443\u0433\u043E\u0435","intro.title":"\u041F\u0435\u0440\u0435\u0434 \u043D\u0430\u0447\u0430\u043B\u043E\u043C","intro.continue":"\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C",source:"\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A: {name}","shell.siteBlocked":"\u0427\u0430\u0442 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u043D\u0430 \u044D\u0442\u043E\u043C \u0441\u0430\u0439\u0442\u0435","shell.siteBlockedHint":"\u0412\u043B\u0430\u0434\u0435\u043B\u0435\u0446 \u0441\u0430\u0439\u0442\u0430 \u0435\u0449\u0451 \u043D\u0435 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u043B AI-Dana \u0438\u043B\u0438 \u0434\u043E\u0441\u0442\u0443\u043F \u043F\u0440\u0438\u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D.","modes.none":"\u0420\u0435\u0436\u0438\u043C\u044B \u043E\u0442\u0432\u0435\u0442\u0430 \u0441\u0435\u0439\u0447\u0430\u0441 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.","attachment.sending":"\u043E\u0442\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442\u0441\u044F","agent.steps":"\u0428\u0430\u0433\u0438","agent.unfinished":"\u043D\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0451\u043D",rateGroup:"\u041E\u0446\u0435\u043D\u043A\u0430 \u043E\u0442\u0432\u0435\u0442\u0430","blocks.catalogTitle":"\u041A\u0430\u0442\u0430\u043B\u043E\u0433: {topic}","blocks.catalogSections":"\u0420\u0430\u0437\u0434\u0435\u043B\u044B","blocks.catalogIndicators":"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u0438","blocks.catalogSendHint":"\u0412\u043E\u043F\u0440\u043E\u0441 \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u0441\u044F \u0441\u0440\u0430\u0437\u0443 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0431\u043E\u0440\u0430","blocks.clarification":"\u0423\u0442\u043E\u0447\u043D\u0435\u043D\u0438\u0435","files.expired":"\u0421\u0440\u043E\u043A \u0444\u0430\u0439\u043B\u0430 \u0438\u0441\u0442\u0451\u043A","files.notFound":"\u0424\u0430\u0439\u043B \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D","files.unavailable":"\u0424\u0430\u0439\u043B \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D"},T0={title:"AI-Dana",open:"\u0427\u0430\u0442\u0442\u044B \u0430\u0448\u0443",unreadAnswers:"\u0436\u0430\u04A3\u0430 \u0436\u0430\u0443\u0430\u043F\u0442\u0430\u0440: {count}",ask:"\u0421\u04B1\u0440\u0430\u049B \u049B\u043E\u044E",close:"\u0416\u0430\u0431\u0443",history:"\u0422\u0430\u0440\u0438\u0445",closeHistory:"\u0422\u0430\u0440\u0438\u0445\u0442\u044B \u0436\u0430\u0441\u044B\u0440\u0443",newChat:"\u0416\u0430\u04A3\u0430 \u0447\u0430\u0442",untitled:"\u0416\u0430\u04A3\u0430 \u0447\u0430\u0442",historyEmpty:"\u04D8\u0437\u0456\u0440\u0433\u0435 \u0447\u0430\u0442\u0442\u0430\u0440 \u0436\u043E\u049B",historyError:"\u0422\u0430\u0440\u0438\u0445\u0442\u044B \u0436\u04AF\u043A\u0442\u0435\u0443 \u043C\u04AF\u043C\u043A\u0456\u043D \u0431\u043E\u043B\u043C\u0430\u0434\u044B",delete:"\u0416\u043E\u044E",deleteConfirm:"\u0427\u0430\u0442\u0442\u044B \u0436\u043E\u044E \u043A\u0435\u0440\u0435\u043A \u043F\u0435?",deleteYes:"\u0416\u043E\u044E",deleteNo:"\u0411\u0430\u0441 \u0442\u0430\u0440\u0442\u0443",deleteError:"\u0427\u0430\u0442\u0442\u044B \u0436\u043E\u044E \u043C\u04AF\u043C\u043A\u0456\u043D \u0431\u043E\u043B\u043C\u0430\u0434\u044B",modeLabel:"\u0416\u0430\u0443\u0430\u043F \u0440\u0435\u0436\u0438\u043C\u0456","health.idle":"\u0411\u043E\u0441","health.busy":"\u0411\u043E\u0441 \u0435\u043C\u0435\u0441","health.unavailable":"\u049A\u043E\u043B\u0436\u0435\u0442\u0456\u043C\u0441\u0456\u0437",placeholder:"\u0421\u04B1\u0440\u0430\u049B\u0442\u0430\u0440\u044B\u04A3\u044B\u0437\u0434\u044B \u049B\u043E\u0439\u044B\u04A3\u044B\u0437",inputLabel:"\u0425\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430",send:"\u0416\u0456\u0431\u0435\u0440\u0443",stop:"\u0422\u043E\u049B\u0442\u0430\u0442\u0443",attach:"\u0424\u0430\u0439\u043B \u0442\u0456\u0440\u043A\u0435\u0443",attachOne:"\u0422\u0435\u043A \u0431\u0456\u0440 \u0444\u0430\u0439\u043B \u0442\u0456\u0440\u043A\u0435\u0443\u0433\u0435 \u0431\u043E\u043B\u0430\u0434\u044B",attachHint:"\u0411\u0456\u0440 \u0444\u0430\u0439\u043B \u0442\u0456\u0440\u043A\u0435\u0443\u0433\u0435 \u0431\u043E\u043B\u0430\u0434\u044B: XLS, XLSX, CSV, TXT \u043D\u0435\u043C\u0435\u0441\u0435 MD, {size} \u041C\u0411-\u049B\u0430 \u0434\u0435\u0439\u0456\u043D",disclaimer:"\u0416\u0418 \u049B\u0430\u0442\u0435\u043B\u0435\u0441\u0443\u0456 \u043C\u04AF\u043C\u043A\u0456\u043D \u2014 \u043C\u0430\u04A3\u044B\u0437\u0434\u044B \u0430\u049B\u043F\u0430\u0440\u0430\u0442\u0442\u044B \u0442\u0435\u043A\u0441\u0435\u0440\u0456\u04A3\u0456\u0437",removeFile:"\u0424\u0430\u0439\u043B\u0434\u044B \u0436\u043E\u044E",counter:"{count} / {max}",counterLimit:"\u0422\u0430\u04A3\u0431\u0430 \u0448\u0435\u0433\u0456\u043D\u0435 \u0436\u0435\u0442\u0442\u0456\u04A3\u0456\u0437",counterOver:"\u0422\u0430\u04A3\u0431\u0430 \u0448\u0435\u0433\u0456\u043D\u0435\u043D \u0430\u0441\u044B\u043F \u043A\u0435\u0442\u0442\u0456\u04A3\u0456\u0437",fileTooLarge:"\xAB{name}\xBB \u0444\u0430\u0439\u043B\u044B {size} \u041C\u0411-\u0442\u0430\u043D \u04AF\u043B\u043A\u0435\u043D",fileType:"\xAB{name}\xBB \u0444\u0430\u0439\u043B\u044B \u0436\u0430\u0440\u0430\u043C\u0430\u0439\u0434\u044B. XLS, XLSX, CSV, TXT \u043D\u0435\u043C\u0435\u0441\u0435 MD \u0442\u0456\u0440\u043A\u0435\u0443\u0433\u0435 \u0431\u043E\u043B\u0430\u0434\u044B",modeUnavailable:"\u0420\u0435\u0436\u0438\u043C \u049B\u0430\u0437\u0456\u0440 \u049B\u043E\u043B\u0436\u0435\u0442\u0456\u043C\u0441\u0456\u0437, \u0431\u0430\u0441\u049B\u0430\u0441\u044B\u043D \u0442\u0430\u04A3\u0434\u0430\u04A3\u044B\u0437",greeting:"\u049A\u0430\u043B\u0430\u0439 \u043A\u04E9\u043C\u0435\u043A\u0442\u0435\u0441\u0435 \u0430\u043B\u0430\u043C\u044B\u043D?",loading:"\u0416\u04AF\u043A\u0442\u0435\u043B\u0443\u0434\u0435\u2026",configError:"\u0427\u0430\u0442 \u0443\u0430\u049B\u044B\u0442\u0448\u0430 \u049B\u043E\u043B\u0436\u0435\u0442\u0456\u043C\u0441\u0456\u0437",overloaded:"\u049A\u044B\u0437\u043C\u0435\u0442 \u049B\u0430\u0437\u0456\u0440 \u0448\u0430\u043C\u0430\u0434\u0430\u043D \u0442\u044B\u0441 \u0436\u04AF\u043A\u0442\u0435\u043B\u0433\u0435\u043D. \u041A\u0435\u0439\u0456\u043D\u0456\u0440\u0435\u043A \u049B\u0430\u0439\u0442\u0430\u043B\u0430\u043F \u043A\u04E9\u0440\u0456\u04A3\u0456\u0437.",retry:"\u049A\u0430\u0439\u0442\u0430\u043B\u0430\u0443",dismiss:"\u0416\u0430\u0441\u044B\u0440\u0443",scrollDown:"\u0422\u04E9\u043C\u0435\u043D\u0433\u0435 \u0430\u0439\u043D\u0430\u043B\u0434\u044B\u0440\u0443",settings:"\u0411\u0430\u043F\u0442\u0430\u0443\u043B\u0430\u0440","settings.language":"\u0422\u0456\u043B","settings.theme":"\u0422\u0430\u049B\u044B\u0440\u044B\u043F","settings.themeLight":"\u0410\u0448\u044B\u049B","settings.themeDark":"\u049A\u0430\u0440\u0430\u04A3\u0493\u044B","settings.themeAuto":"\u0416\u04AF\u0439\u0435\u0434\u0435\u0433\u0456\u0434\u0435\u0439","settings.model":"\u04D8\u0434\u0435\u043F\u043A\u0456 \u043C\u043E\u0434\u0435\u043B\u044C","settings.modelHint":"\u04D8\u0440 \u0436\u0430\u04A3\u0430 \u0447\u0430\u0442 \u043E\u0441\u044B\u0434\u0430\u043D \u0431\u0430\u0441\u0442\u0430\u043B\u0430\u0434\u044B","settings.shortcuts":"\u0416\u044B\u043B\u0434\u0430\u043C \u043F\u0435\u0440\u043D\u0435\u043B\u0435\u0440","shortcut.search":"\u0427\u0430\u0442\u0442\u0430\u0440\u0434\u0430\u043D \u0456\u0437\u0434\u0435\u0443","shortcut.newChat":"\u0416\u0430\u04A3\u0430 \u0447\u0430\u0442","shortcut.sidebar":"\u041F\u0430\u043D\u0435\u043B\u044C\u0434\u0456 \u043A\u04E9\u0440\u0441\u0435\u0442\u0443 \u043D\u0435 \u0436\u0430\u0441\u044B\u0440\u0443","shortcut.close":"\u0422\u0435\u0440\u0435\u0437\u0435\u043D\u0456 \u0436\u0430\u0431\u0443",search:"\u0427\u0430\u0442\u0442\u0430\u0440\u0434\u0430\u043D \u0456\u0437\u0434\u0435\u0443",searchEmpty:"\u0415\u0448\u0442\u0435\u04A3\u0435 \u0442\u0430\u0431\u044B\u043B\u043C\u0430\u0434\u044B",collapseSidebar:"\u041F\u0430\u043D\u0435\u043B\u044C\u0434\u0456 \u0436\u0430\u0441\u044B\u0440\u0443",expandSidebar:"\u041F\u0430\u043D\u0435\u043B\u044C\u0434\u0456 \u043A\u04E9\u0440\u0441\u0435\u0442\u0443",expand:"\u0411\u04AF\u043A\u0456\u043B \u0431\u0435\u0442\u043A\u0435 \u0436\u0430\u044E",shrink:"\u041A\u0456\u0448\u0456\u0440\u0435\u0439\u0442\u0443",examples:"\u0421\u04B1\u0440\u0430\u0443 \u043C\u044B\u0441\u0430\u043B\u0434\u0430\u0440\u044B","examples.whatCanDo":"\u041D\u0435 \u0456\u0441\u0442\u0435\u0439 \u0430\u043B\u0430\u0441\u044B\u0437","group.pinned":"\u0411\u0435\u043A\u0456\u0442\u0456\u043B\u0433\u0435\u043D\u0434\u0435\u0440","group.today":"\u0411\u04AF\u0433\u0456\u043D","group.yesterday":"\u041A\u0435\u0448\u0435","group.week":"\u0421\u043E\u04A3\u0493\u044B 7 \u043A\u04AF\u043D","group.earlier":"\u0411\u04B1\u0440\u044B\u043D\u044B\u0440\u0430\u049B","errors.thread_busy":"AI-Dana \u0431\u04B1\u043B \u0447\u0430\u0442\u0442\u0430 \u04D9\u043B\u0456 \u0436\u0430\u0443\u0430\u043F \u0431\u0435\u0440\u0456\u043F \u0436\u0430\u0442\u044B\u0440. \u0416\u0430\u0443\u0430\u043F\u0442\u044B \u043A\u04AF\u0442\u0456\u04A3\u0456\u0437 \u043D\u0435\u043C\u0435\u0441\u0435 \u0442\u043E\u049B\u0442\u0430\u0442\u044B\u04A3\u044B\u0437.","errors.mode_overloaded":"AI-Dana \u049B\u0430\u0437\u0456\u0440 \u0448\u0430\u043C\u0430\u0434\u0430\u043D \u0442\u044B\u0441 \u0436\u04AF\u043A\u0442\u0435\u043B\u0433\u0435\u043D, \u0441\u04D9\u043B \u043A\u0435\u0439\u0456\u043D\u0456\u0440\u0435\u043A \u049B\u0430\u0439\u0442\u0430\u043B\u0430\u043F \u043A\u04E9\u0440\u0456\u04A3\u0456\u0437","errors.daily_limit":"\u0411\u04AF\u0433\u0456\u043D\u0433\u0456 \u0445\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430 \u043B\u0438\u043C\u0438\u0442\u0456 \u0442\u0430\u0443\u0441\u044B\u043B\u0434\u044B","errors.rate_limit":"\u0425\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430\u043B\u0430\u0440 \u0442\u044B\u043C \u0436\u0438\u0456 \u0436\u0456\u0431\u0435\u0440\u0456\u043B\u0434\u0456. \u0411\u0456\u0440 \u043C\u0438\u043D\u0443\u0442 \u043A\u04AF\u0442\u0456\u04A3\u0456\u0437.","errors.ip_limit":"\u0411\u04AF\u0433\u0456\u043D \u0441\u0456\u0437\u0434\u0456\u04A3 \u0436\u0435\u043B\u0456\u04A3\u0456\u0437\u0434\u0435\u043D \u0445\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430\u043B\u0430\u0440 \u0442\u044B\u043C \u043A\u04E9\u043F \u0436\u0456\u0431\u0435\u0440\u0456\u043B\u0434\u0456. \u0415\u0440\u0442\u0435\u04A3 \u049B\u0430\u0439\u0442\u0430\u043B\u0430\u043F \u043A\u04E9\u0440\u0456\u04A3\u0456\u0437.","errors.concurrency_limit":"\u0410\u043B\u0434\u044B\u04A3\u0493\u044B \u0436\u0430\u0443\u0430\u043F\u0442\u044B\u04A3 \u0430\u044F\u049B\u0442\u0430\u043B\u0443\u044B\u043D \u043A\u04AF\u0442\u0456\u04A3\u0456\u0437","errors.file_too_large":"\u0424\u0430\u0439\u043B \u0442\u044B\u043C \u04AF\u043B\u043A\u0435\u043D","errors.file_not_allowed":"\u0411\u04B1\u043B \u0444\u0430\u0439\u043B\u0434\u044B \u0442\u0456\u0440\u043A\u0435\u0443\u0433\u0435 \u0431\u043E\u043B\u043C\u0430\u0439\u0434\u044B. XLS, XLSX, CSV, TXT \u0436\u04D9\u043D\u0435 MD \u0436\u0430\u0440\u0430\u0439\u0434\u044B","errors.invalid_query":"\u0425\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430 \u0431\u043E\u0441 \u043D\u0435\u043C\u0435\u0441\u0435 \u0442\u044B\u043C \u04B1\u0437\u044B\u043D","errors.invalid_parent":"\u0411\u04B1\u043B \u0445\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430\u043D\u044B \u0435\u043D\u0434\u0456 \u04E9\u0437\u0433\u0435\u0440\u0442\u0443\u0433\u0435 \u0431\u043E\u043B\u043C\u0430\u0439\u0434\u044B","errors.mode_not_found":"\u0422\u0430\u04A3\u0434\u0430\u043B\u0493\u0430\u043D \u0440\u0435\u0436\u0438\u043C \u049B\u0430\u0437\u0456\u0440 \u049B\u043E\u043B\u0436\u0435\u0442\u0456\u043C\u0441\u0456\u0437. \u0411\u0430\u0441\u049B\u0430 \u0440\u0435\u0436\u0438\u043C\u0434\u0456 \u0442\u0430\u04A3\u0434\u0430\u04A3\u044B\u0437.","errors.thread_not_found":"\u0427\u0430\u0442 \u0442\u0430\u0431\u044B\u043B\u043C\u0430\u0434\u044B","errors.interrupted":"\u0416\u0430\u0443\u0430\u043F \u04AF\u0437\u0456\u043B\u0434\u0456","errors.code":"\u0416\u0430\u0443\u0430\u043F \u0430\u043B\u0443 \u043C\u04AF\u043C\u043A\u0456\u043D \u0431\u043E\u043B\u043C\u0430\u0434\u044B (\u043A\u043E\u0434 {code}).","errors.generic":"\u0425\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430 \u0436\u0456\u0431\u0435\u0440\u0443 \u043A\u0435\u0437\u0456\u043D\u0434\u0435 \u049B\u0430\u0442\u0435 \u043E\u0440\u044B\u043D \u0430\u043B\u0434\u044B.","errors.network":"\u0421\u0435\u0440\u0432\u0435\u0440\u043C\u0435\u043D \u0431\u0430\u0439\u043B\u0430\u043D\u044B\u0441 \u0436\u043E\u049B. \u049A\u043E\u0441\u044B\u043B\u044B\u043C\u0434\u044B \u0442\u0435\u043A\u0441\u0435\u0440\u0456\u04A3\u0456\u0437.","errors.render":"\u0411\u04B1\u043B \u0445\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430\u043D\u044B \u043A\u04E9\u0440\u0441\u0435\u0442\u0443 \u043C\u04AF\u043C\u043A\u0456\u043D \u0431\u043E\u043B\u043C\u0430\u0434\u044B.","agent.thinking":"\u041E\u0439\u043B\u0430\u043D\u044B\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","agent.done":"\u0414\u0430\u0439\u044B\u043D","agent.stopped":"\u0422\u043E\u049B\u0442\u0430\u0442\u044B\u043B\u0434\u044B","agent.stopping":"\u0422\u043E\u049B\u0442\u0430\u0442\u044B\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","agent.interrupted":"\u0416\u0430\u0443\u0430\u043F \u04AF\u0437\u0456\u043B\u0434\u0456","agent.answerStopped":"\u0416\u0430\u0443\u0430\u043F \u0442\u043E\u049B\u0442\u0430\u0442\u044B\u043B\u0434\u044B. \u049A\u0430\u0436\u0435\u0442 \u0431\u043E\u043B\u0441\u0430, \u0441\u04B1\u0440\u0430\u049B\u0442\u044B \u049B\u0430\u0439\u0442\u0430 \u049B\u043E\u0439\u044B\u04A3\u044B\u0437","agent.seconds":"{value} \u0441","agent.attempt":"{count}-\u04D9\u0440\u0435\u043A\u0435\u0442","agent.showSteps":"\u049A\u0430\u0434\u0430\u043C\u0434\u0430\u0440\u0434\u044B \u043A\u04E9\u0440\u0441\u0435\u0442\u0443","agent.hideSteps":"\u049A\u0430\u0434\u0430\u043C\u0434\u0430\u0440\u0434\u044B \u0436\u0430\u0441\u044B\u0440\u0443","steps.router":"\u0421\u04B1\u0440\u0430\u049B\u0442\u044B \u0442\u0430\u043B\u0434\u0430\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.context_builder":"\u049A\u0430\u0436\u0435\u0442 \u0434\u0435\u0440\u0435\u043A\u0442\u0435\u0440\u0434\u0456 \u0456\u0437\u0434\u0435\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.sql_architect":"\u0415\u0441\u0435\u043F\u0442\u0435\u0443\u0434\u0456 \u0434\u0430\u0439\u044B\u043D\u0434\u0430\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.executor":"\u041A\u04E9\u0440\u0441\u0435\u0442\u043A\u0456\u0448\u0442\u0435\u0440\u0434\u0456 \u0435\u0441\u0435\u043F\u0442\u0435\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.responder":"\u0416\u0430\u0443\u0430\u043F \u0434\u0430\u0439\u044B\u043D\u0434\u0430\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.rag":"\u0410\u043D\u044B\u049B\u0442\u0430\u043C\u0430\u043B\u044B\u049B \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u0434\u0430\u0440\u0434\u0430\u043D \u0456\u0437\u0434\u0435\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.sql":"\u0410\u0448\u044B\u049B \u0434\u0435\u0440\u0435\u043A\u043A\u04E9\u0437\u0434\u0435\u0440\u0434\u0435\u043D \u0434\u0435\u0440\u0435\u043A\u0442\u0435\u0440 \u0456\u0437\u0434\u0435\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.document":"\u049A\u04B1\u0436\u0430\u0442\u0442\u044B \u043E\u049B\u044B\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.understand":"\u0421\u04B1\u0440\u0430\u049B\u0442\u044B \u0442\u0430\u043B\u0434\u0430\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.search_law":"\u0417\u0430\u04A3\u043D\u0430\u043C\u0430\u0434\u0430\u043D \u0456\u0437\u0434\u0435\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.run_sql":"\u041A\u04E9\u0440\u0441\u0435\u0442\u043A\u0456\u0448\u0442\u0435\u0440\u0434\u0456 \u0435\u0441\u0435\u043F\u0442\u0435\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.run_query":"\u0414\u0435\u0440\u0435\u043A\u0442\u0435\u0440\u0434\u0456 \u0430\u043B\u044B\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.data":"\u0414\u0435\u0440\u0435\u043A\u0442\u0435\u0440\u0434\u0456 \u0430\u043B\u044B\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.lookup_taxpayer":"\u0421\u0430\u043B\u044B\u049B \u0442\u04E9\u043B\u0435\u0443\u0448\u0456\u043D\u0456 \u0456\u0437\u0434\u0435\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.find_taxpayer":"\u041A\u043E\u043C\u043F\u0430\u043D\u0438\u044F\u043D\u044B \u0430\u0442\u0430\u0443\u044B \u0431\u043E\u0439\u044B\u043D\u0448\u0430 \u0456\u0437\u0434\u0435\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.ask_clarification":"\u0421\u04B1\u0440\u0430\u049B\u0442\u044B \u043D\u0430\u049B\u0442\u044B\u043B\u0430\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.answer":"\u0416\u0430\u0443\u0430\u043F \u0434\u0430\u0439\u044B\u043D\u0434\u0430\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.think":"\u0422\u0430\u0431\u044B\u043B\u0493\u0430\u043D\u0434\u044B \u0442\u0430\u043B\u0434\u0430\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.file":"\u049A\u04B1\u0436\u0430\u0442\u0442\u044B \u043E\u049B\u044B\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","waiting.router.1":"\u0416\u0430\u0443\u0430\u043F\u0442\u044B \u049B\u0430\u0439\u0434\u0430\u043D \u0456\u0437\u0434\u0435\u0443 \u043A\u0435\u0440\u0435\u0433\u0456\u043D \u0442\u0430\u04A3\u0434\u0430\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.router.2":"\u0421\u04B1\u0440\u0430\u049B\u0442\u044B \u0434\u0435\u0440\u0435\u043A\u0442\u0435\u0440\u043C\u0435\u043D \u0436\u04D9\u043D\u0435 \u043D\u043E\u0440\u043C\u0430\u043B\u0430\u0440\u043C\u0435\u043D \u0441\u0430\u043B\u044B\u0441\u0442\u044B\u0440\u044B\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.responder.1":"\u0421\u0430\u043D\u0434\u0430\u0440\u0434\u044B \u0434\u0435\u0440\u0435\u043A\u0442\u0435\u0440\u043C\u0435\u043D \u0441\u0430\u043B\u044B\u0441\u0442\u044B\u0440\u044B\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.responder.2":"\u041D\u043E\u0440\u043C\u0430\u043B\u0430\u0440\u0493\u0430 \u0441\u0456\u043B\u0442\u0435\u043C\u0435\u043B\u0435\u0440\u0434\u0456 \u0442\u0435\u043A\u0441\u0435\u0440\u0456\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.responder.3":"\u0416\u0430\u0443\u0430\u043F\u0442\u044B \u0440\u0435\u0442\u043A\u0435 \u043A\u0435\u043B\u0442\u0456\u0440\u0456\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.law.1":"\u0422\u0430\u0431\u044B\u043B\u0493\u0430\u043D \u0431\u0430\u043F\u0442\u0430\u0440\u0434\u044B \u043E\u049B\u044B\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.law.2":"\u041D\u043E\u0440\u043C\u0430 \u0440\u0435\u0434\u0430\u043A\u0446\u0438\u044F\u043B\u0430\u0440\u044B\u043D \u0441\u0430\u043B\u044B\u0441\u0442\u044B\u0440\u044B\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.data.1":"\u041A\u04E9\u0440\u0441\u0435\u0442\u043A\u0456\u0448\u0442\u0435\u0440\u0434\u0456 \u0435\u0441\u0435\u043F\u0442\u0435\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.data.2":"\u049A\u043E\u0440\u044B\u0442\u044B\u043D\u0434\u044B\u043B\u0430\u0440\u0434\u044B \u0442\u0435\u043A\u0441\u0435\u0440\u0456\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.executor.1":"\u049A\u043E\u0440\u044B\u0442\u044B\u043D\u0434\u044B\u043B\u0430\u0440\u0434\u044B \u0442\u0435\u043A\u0441\u0435\u0440\u0456\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.executor.2":"\u041A\u0435\u0441\u0442\u0435\u043D\u0456 \u0440\u0435\u0442\u043A\u0435 \u043A\u0435\u043B\u0442\u0456\u0440\u0456\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.taxpayer.1":"\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430\u043D\u044B \u0436\u0438\u043D\u0430\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.taxpayer.2":"\u0416\u044B\u043B\u0434\u0430\u0440 \u0431\u043E\u0439\u044B\u043D\u0448\u0430 \u0442\u04AF\u0441\u0456\u043C\u0434\u0435\u0440\u0434\u0456 \u049B\u0430\u0440\u0430\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.findCompany.1":"\u04B0\u049B\u0441\u0430\u0441 \u0430\u0442\u0430\u0443\u043B\u0430\u0440\u0434\u044B \u0441\u0430\u043B\u044B\u0441\u0442\u044B\u0440\u044B\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.findCompany.2":"\u0415\u04A3 \u0434\u04D9\u043B \u0441\u04D9\u0439\u043A\u0435\u0441\u0442\u0456\u043A\u0442\u0456 \u0442\u0430\u04A3\u0434\u0430\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.think.1":"\u0422\u0430\u0431\u044B\u043B\u0493\u0430\u043D\u0434\u044B \u0441\u04B1\u0440\u0430\u049B\u043F\u0435\u043D \u0441\u0430\u043B\u044B\u0441\u0442\u044B\u0440\u044B\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.think.2":"\u0422\u0430\u0493\u044B \u043D\u0435 \u049B\u0430\u0440\u0430\u0443 \u043A\u0435\u0440\u0435\u0433\u0456\u043D \u0448\u0435\u0448\u0456\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.unknown.1":"\u0422\u0430\u0493\u044B \u0430\u0437 \u0493\u0430\u043D\u0430\u2026","waiting.unknown.2":"\u041D\u04D9\u0442\u0438\u0436\u0435\u043D\u0456 \u0442\u0435\u043A\u0441\u0435\u0440\u0456\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","steps.unknown":"\u0416\u0430\u0443\u0430\u043F \u04AF\u0441\u0442\u0456\u043D\u0434\u0435 \u0436\u04B1\u043C\u044B\u0441 \u0456\u0441\u0442\u0435\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D",copy:"\u041A\u04E9\u0448\u0456\u0440\u0443",copied:"\u041A\u04E9\u0448\u0456\u0440\u0456\u043B\u0434\u0456",download:"\u0416\u04AF\u043A\u0442\u0435\u0443",regenerate:"\u049A\u0430\u0439\u0442\u0430 \u0436\u0430\u0443\u0430\u043F \u0431\u0435\u0440\u0443",edit:"\u0425\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430\u043D\u044B \u04E9\u0437\u0433\u0435\u0440\u0442\u0443",editLabel:"\u0425\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430 \u043C\u04D9\u0442\u0456\u043D\u0456",cancel:"\u0411\u043E\u043B\u0434\u044B\u0440\u043C\u0430\u0443",actionsLabel:"\u0425\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430 \u04D9\u0440\u0435\u043A\u0435\u0442\u0442\u0435\u0440\u0456",rate:"3-\u0442\u0435\u043D {count} \u0434\u0435\u043F \u0431\u0430\u0493\u0430\u043B\u0430\u0443",ratingError:"\u0411\u0430\u0493\u0430\u043D\u044B \u0441\u0430\u049B\u0442\u0430\u0443 \u043C\u04AF\u043C\u043A\u0456\u043D \u0431\u043E\u043B\u043C\u0430\u0434\u044B",feedbackOpen:"\u041F\u0456\u043A\u0456\u0440 \u049B\u0430\u043B\u0434\u044B\u0440\u0443",feedbackEdit:"\u041F\u0456\u043A\u0456\u0440\u0434\u0456 \u04E9\u0437\u0433\u0435\u0440\u0442\u0443",feedbackLabel:"\u0416\u0430\u0443\u0430\u043F \u0442\u0443\u0440\u0430\u043B\u044B \u043F\u0456\u043A\u0456\u0440",feedbackPlaceholder:"\u0416\u0430\u0443\u0430\u043F \u0442\u0443\u0440\u0430\u043B\u044B \u043F\u0456\u043A\u0456\u0440\u0456\u04A3\u0456\u0437",save:"\u0421\u0430\u049B\u0442\u0430\u0443","branch.label":"\u041D\u04B1\u0441\u049B\u0430\u043B\u0430\u0440","branch.prev":"\u0410\u043B\u0434\u044B\u04A3\u0493\u044B \u043D\u04B1\u0441\u049B\u0430","branch.next":"\u041A\u0435\u043B\u0435\u0441\u0456 \u043D\u04B1\u0441\u049B\u0430","branch.error":"\u041D\u04B1\u0441\u049B\u0430\u043D\u044B \u0430\u0443\u044B\u0441\u0442\u044B\u0440\u0443 \u043C\u04AF\u043C\u043A\u0456\u043D \u0431\u043E\u043B\u043C\u0430\u0434\u044B","limit.remaining":"\u0411\u04AF\u0433\u0456\u043D {limit} \u0445\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430\u043D\u044B\u04A3 {count} \u049B\u0430\u043B\u0434\u044B","limit.exhausted":"\u0411\u04AF\u0433\u0456\u043D\u0433\u0456 \u0445\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430 \u043B\u0438\u043C\u0438\u0442\u0456 \u0442\u0430\u0443\u0441\u044B\u043B\u0434\u044B","limit.until":"\u0425\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430 \u043B\u0438\u043C\u0438\u0442\u0456 \u0442\u0430\u0443\u0441\u044B\u043B\u0434\u044B. \u0416\u0430\u04A3\u0430 \u0445\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430\u043B\u0430\u0440\u0434\u044B {time} \u043A\u0435\u0439\u0456\u043D \u0436\u0456\u0431\u0435\u0440\u0443\u0433\u0435 \u0431\u043E\u043B\u0430\u0434\u044B.","blocks.data":"\u0414\u0435\u0440\u0435\u043A\u0442\u0435\u0440","blocks.hideData":"\u0414\u0435\u0440\u0435\u043A\u0442\u0435\u0440\u0434\u0456 \u0436\u0430\u0441\u044B\u0440\u0443","blocks.methodology":"\u04D8\u0434\u0456\u0441\u0442\u0435\u043C\u0435","blocks.passport":"\u041D\u0435 \u0435\u0441\u0435\u043F\u0442\u0435\u043B\u0434\u0456","blocks.indicator":"\u041A\u04E9\u0440\u0441\u0435\u0442\u043A\u0456\u0448","blocks.territory":"\u0410\u0443\u043C\u0430\u049B","blocks.period":"\u041A\u0435\u0437\u0435\u04A3","blocks.breakdown":"\u049A\u0438\u043C\u0430","blocks.breakdown.sex":"\u0436\u044B\u043D\u044B\u0441\u044B \u0431\u043E\u0439\u044B\u043D\u0448\u0430","blocks.breakdown.age":"\u0436\u0430\u0441\u044B \u0431\u043E\u0439\u044B\u043D\u0448\u0430","blocks.breakdown.urban_rural":"\u049B\u0430\u043B\u0430 \u0436\u04D9\u043D\u0435 \u0430\u0443\u044B\u043B","blocks.breakdown.activity":"\u049B\u044B\u0437\u043C\u0435\u0442 \u0442\u04AF\u0440\u043B\u0435\u0440\u0456 \u0431\u043E\u0439\u044B\u043D\u0448\u0430","blocks.breakdown.item":"\u0442\u0430\u0443\u0430\u0440\u043B\u0430\u0440 \u0431\u043E\u0439\u044B\u043D\u0448\u0430","blocks.substituted":"\u0430\u043B\u043C\u0430\u0441\u0442\u044B\u0440\u044B\u043B\u0434\u044B","blocks.alternatives":"\u04B0\u049B\u0441\u0430\u0441 \u043A\u04E9\u0440\u0441\u0435\u0442\u043A\u0456\u0448\u0442\u0435\u0440","blocks.table":"\u0414\u0435\u0440\u0435\u043A\u0442\u0435\u0440 \u043A\u0435\u0441\u0442\u0435\u0441\u0456","blocks.tableSearch":"\u041A\u0435\u0441\u0442\u0435\u0434\u0435\u043D \u0456\u0437\u0434\u0435\u0443\u2026","blocks.tableEmpty":"\u0414\u0435\u0440\u0435\u043A\u0442\u0435\u0440 \u0436\u043E\u049B","blocks.page":"{b} \u0456\u0448\u0456\u043D\u0435\u043D {a}","blocks.prevPage":"\u0410\u043B\u0434\u044B\u04A3\u0493\u044B \u0431\u0435\u0442","blocks.nextPage":"\u041A\u0435\u043B\u0435\u0441\u0456 \u0431\u0435\u0442","blocks.truncated":"\u0410\u043B\u0493\u0430\u0448\u049B\u044B {n} \u0436\u043E\u043B \u043A\u04E9\u0440\u0441\u0435\u0442\u0456\u043B\u0434\u0456 \u2014 \u0442\u043E\u043B\u044B\u049B \u0434\u0435\u0440\u0435\u043A\u0442\u0435\u0440 Excel-\u0434\u0435","blocks.catalogMore":"\u2026\u0436\u04D9\u043D\u0435 \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0442\u0430 \u0442\u0430\u0493\u044B {count}","blocks.catalogExamples":"\u0421\u04B1\u0440\u0430\u0443\u0493\u0430 \u0431\u043E\u043B\u0430\u0434\u044B","blocks.options":"\u0416\u0430\u0443\u0430\u043F \u043D\u04B1\u0441\u049B\u0430\u043B\u0430\u0440\u044B","blocks.default":"\u04D9\u0434\u0435\u043F\u043A\u0456","blocks.freeTextHint":"\u041D\u04B1\u0441\u049B\u0430\u043D\u044B \u0442\u0430\u04A3\u0434\u0430\u04A3\u044B\u0437 \u043D\u0435\u043C\u0435\u0441\u0435 \u0442\u04E9\u043C\u0435\u043D\u0434\u0435\u0433\u0456 \u04E9\u0440\u0456\u0441\u043A\u0435 \u04E9\u0437\u0456\u04A3\u0456\u0437\u0434\u0456\u043A\u0456\u043D \u0436\u0430\u0437\u044B\u04A3\u044B\u0437","blocks.findOption":"\u0422\u0456\u0437\u0456\u043C\u043D\u0435\u043D \u0456\u0437\u0434\u0435\u0443\u2026","blocks.chosen":"\u0422\u0430\u04A3\u0434\u0430\u043B\u0434\u044B: {label}","blocks.continue":"\u0416\u0430\u043B\u0493\u0430\u0441\u0442\u044B\u0440\u0443","blocks.cancelPlan":"\u0411\u0430\u0441 \u0442\u0430\u0440\u0442\u0443","blocks.expired":"\u041D\u0430\u049B\u0442\u044B\u043B\u0430\u0443\u0434\u044B\u04A3 \u043C\u0435\u0440\u0437\u0456\u043C\u0456 \u04E9\u0442\u0442\u0456","blocks.askAgain":"\u0421\u04B1\u0440\u0430\u049B\u0442\u044B \u049B\u0430\u0439\u0442\u0430 \u049B\u043E\u044E","blocks.dashboard":"\u0414\u0430\u0448\u0431\u043E\u0440\u0434\u0442\u044B \u0430\u0448\u0443","blocks.hideDashboard":"\u0414\u0430\u0448\u0431\u043E\u0440\u0434\u0442\u044B \u0436\u0430\u0441\u044B\u0440\u0443","chart.kinds":"\u0414\u0438\u0430\u0433\u0440\u0430\u043C\u043C\u0430 \u0442\u04AF\u0440\u0456","chart.kind.bar":"\u0416\u043E\u043B\u0430\u049B\u0442\u0430\u0440","chart.kind.column":"\u0411\u0430\u0493\u0430\u043D\u0434\u0430\u0440","chart.kind.pie":"\u0414\u04E9\u04A3\u0433\u0435\u043B\u0435\u043A","chart.kind.line":"\u0421\u044B\u0437\u044B\u049B\u0442\u0430\u0440","chart.kind.area":"\u0410\u0439\u043C\u0430\u049B\u0442\u0430\u0440","chart.national":"\u049A\u0420 {value}","chart.top":"\u04AE\u0437\u0434\u0456\u043A {n}, \u0431\u0430\u0440\u043B\u044B\u0493\u044B {total} \u2014 \u0442\u043E\u043B\u044B\u0493\u044B \u0434\u0430\u0448\u0431\u043E\u0440\u0434\u0442\u0430","chart.label":"{title}, {period}","files.list":"\u0424\u0430\u0439\u043B\u0434\u0430\u0440","files.report":"\u0414\u0430\u0439\u044B\u043D \u0435\u0441\u0435\u043F","files.document":"\u04E8\u04A3\u0434\u0435\u043B\u0435\u0442\u0456\u043D \u049B\u04B1\u0436\u0430\u0442","files.presentation":"\u0422\u0430\u043D\u044B\u0441\u0442\u044B\u0440\u044B\u043B\u044B\u043C","files.excel":"Excel \u0434\u0435\u0440\u0435\u043A\u0442\u0435\u0440\u0456","files.csv":"CSV \u0434\u0435\u0440\u0435\u043A\u0442\u0435\u0440\u0456","files.failed":"\u0424\u0430\u0439\u043B\u0434\u044B \u0436\u04AF\u043A\u0442\u0435\u0443 \u043C\u04AF\u043C\u043A\u0456\u043D \u0431\u043E\u043B\u043C\u0430\u0434\u044B","report.create":"\u0415\u0441\u0435\u043F \u049B\u04B1\u0440\u0443","report.pending":"\u0415\u0441\u0435\u043F \u0444\u0430\u0439\u043B\u0434\u0430\u0440\u044B \u0434\u0430\u0439\u044B\u043D\u0434\u0430\u043B\u0443\u0434\u0430\u2026","report.failed":"\u0415\u0441\u0435\u043F \u0444\u0430\u0439\u043B\u0434\u0430\u0440\u044B\u043D \u049B\u04B1\u0440\u0443 \u043C\u04AF\u043C\u043A\u0456\u043D \u0431\u043E\u043B\u043C\u0430\u0434\u044B","report.retry":"\u049A\u0430\u0439\u0442\u0430\u043B\u0430\u0443","report.expired":"\u0424\u0430\u0439\u043B\u0434\u0430\u0440\u0434\u044B\u04A3 \u043C\u0435\u0440\u0437\u0456\u043C\u0456 \u04E9\u0442\u0442\u0456","dashboard.eyebrow":"\u0422\u0430\u043B\u0434\u0430\u0443","dashboard.label":"\u0414\u0430\u0448\u0431\u043E\u0440\u0434 \u0442\u0430\u049B\u0442\u0430\u0441\u044B","dashboard.sections":"\u0414\u0430\u0448\u0431\u043E\u0440\u0434 \u0431\u04E9\u043B\u0456\u043C\u0434\u0435\u0440\u0456","dashboard.regions":"\u04E9\u04A3\u0456\u0440\u043B\u0435\u0440: {n}","dashboard.items":"\u043F\u043E\u0437\u0438\u0446\u0438\u044F\u043B\u0430\u0440: {n}","dashboard.openSource":"\u0414\u0435\u0440\u0435\u043A\u043A\u04E9\u0437\u0434\u0435 \u0430\u0448\u0443","dashboard.methodology":"\u04D8\u0434\u0456\u0441\u0442\u0435\u043C\u0435","dashboard.fullscreen":"\u0422\u043E\u043B\u044B\u049B \u044D\u043A\u0440\u0430\u043D","dashboard.collapse":"\u041A\u0456\u0448\u0456\u0440\u0435\u0439\u0442\u0443","dashboard.close":"\u0416\u0430\u0431\u0443","dashboard.chatTab":"\u0421\u04B1\u0445\u0431\u0430\u0442","dashboard.dashboardTab":"\u0414\u0430\u0448\u0431\u043E\u0440\u0434 \u0442\u0430\u049B\u0442\u0430\u0441\u044B","dashboard.view":"\u0421\u04B1\u0445\u0431\u0430\u0442 \u043D\u0435\u043C\u0435\u0441\u0435 \u0434\u0430\u0448\u0431\u043E\u0440\u0434","dashboard.region":"\u04E8\u04A3\u0456\u0440","dashboard.allRegions":"\u0411\u0430\u0440\u043B\u044B\u049B \u04E9\u04A3\u0456\u0440\u043B\u0435\u0440","dashboard.period":"\u041A\u0435\u0437\u0435\u04A3","dashboard.mode.label":"\u041A\u04E9\u0440\u0456\u043D\u0456\u0441","dashboard.mode.value":"\u041C\u04D9\u043D","dashboard.mode.deviation":"\u0410\u0443\u044B\u0442\u049B\u0443","dashboard.mode.change":"\u04E8\u0437\u0433\u0435\u0440\u0456\u0441","dashboard.base.label":"\u0410\u0443\u044B\u0442\u049B\u0443 \u0431\u0430\u0437\u0430\u0441\u044B","dashboard.base.median":"\u043C\u0435\u0434\u0438\u0430\u043D\u0430\u0434\u0430\u043D","dashboard.base.national":"\u049A\u0420-\u0434\u0430\u043D","dashboard.noPrevious":"\u0410\u043B\u0434\u044B\u04A3\u0493\u044B \u043A\u0435\u0437\u0435\u04A3 \u0436\u043E\u049B","dashboard.noNational":"\u0411\u04B1\u043B \u043A\u0435\u0437\u0435\u04A3\u0433\u0435 \u0435\u043B \u0431\u043E\u0439\u044B\u043D\u0448\u0430 \u043C\u04D9\u043D \u0436\u043E\u049B","dashboard.fewRegions":"\u041A\u0435\u043C\u0456\u043D\u0434\u0435 \u0435\u043A\u0456 \u043C\u04D9\u043D \u049B\u0430\u0436\u0435\u0442","dashboard.ranking":"\u041E\u0440\u044B\u043D\u0434\u0430\u0440 \u0440\u0435\u0439\u0442\u0438\u043D\u0433\u0456","dashboard.trend":"\u0421\u0435\u0440\u043F\u0456\u043D","dashboard.findings":"\u049A\u043E\u0440\u044B\u0442\u044B\u043D\u0434\u044B\u043B\u0430\u0440","dashboard.data":"\u0414\u0435\u0440\u0435\u043A\u0442\u0435\u0440","dashboard.kpis":"\u041D\u0435\u0433\u0456\u0437\u0433\u0456 \u043A\u04E9\u0440\u0441\u0435\u0442\u043A\u0456\u0448\u0442\u0435\u0440","dashboard.table.rank":"\u2116","dashboard.table.position":"\u0410\u0442\u0430\u0443\u044B","dashboard.table.value":"\u041C\u04D9\u043D\u0456, {unit}","dashboard.table.share":"\u04AE\u043B\u0435\u0441\u0456, %","dashboard.table.deviation":"\u0410\u0443\u044B\u0442\u049B\u0443, {unit}","dashboard.table.change":"\u04E8\u0437\u0433\u0435\u0440\u0456\u0441, {unit}","dashboard.source":"\u0414\u0435\u0440\u0435\u043A\u043A\u04E9\u0437: {name}","dashboard.points":"\u043F.\u0442.","dashboard.kpi.national":"\u049A\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D \u0420\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","dashboard.kpi.max":"\u0415\u04A3 \u0436\u043E\u0493\u0430\u0440\u044B","dashboard.kpi.min":"\u0415\u04A3 \u0442\u04E9\u043C\u0435\u043D","dashboard.kpi.median":"\u04E8\u04A3\u0456\u0440\u043B\u0435\u0440 \u043C\u0435\u0434\u0438\u0430\u043D\u0430\u0441\u044B","dashboard.kpi.spread":"\u049A\u04B1\u043B\u0430\u0448","dashboard.kpi.gap":"\u0410\u043B\u0448\u0430\u049B\u0442\u044B\u049B","dashboard.kpi.last":"\u0421\u043E\u04A3\u0493\u044B \u043C\u04D9\u043D","dashboard.kpi.first":"\u041A\u0435\u0437\u0435\u04A3 \u0431\u0430\u0441\u044B","dashboard.kpi.change":"\u04E8\u0437\u0433\u0435\u0440\u0456\u0441","dashboard.kpi.place":"\u041E\u0440\u044B\u043D","dashboard.kpi.placeOf":"{m} \u0456\u0448\u0456\u043D\u0435\u043D {n}","dashboard.kpi.deviation":"\u041C\u0435\u0434\u0438\u0430\u043D\u0430\u0434\u0430\u043D \u0430\u0443\u044B\u0442\u049B\u0443","dashboard.kpi.previous":"\u0410\u043B\u0434\u044B\u04A3\u0493\u044B \u043A\u0435\u0437\u0435\u04A3\u0433\u0435","steps.counter":"{total} \u0456\u0448\u0456\u043D\u0435\u043D {done}","feedback.reason.wrong_number":"\u0421\u0430\u043D \u049B\u0430\u0442\u0435","feedback.reason.wrong_indicator":"\u041A\u04E9\u0440\u0441\u0435\u0442\u043A\u0456\u0448 \u0431\u0430\u0441\u049B\u0430","feedback.reason.wrong_territory":"\u0410\u0443\u043C\u0430\u049B \u0431\u0430\u0441\u049B\u0430","feedback.reason.wrong_period":"\u041A\u0435\u0437\u0435\u04A3 \u0431\u0430\u0441\u049B\u0430","feedback.reason.not_answered":"\u0421\u04B1\u0440\u0430\u049B\u049B\u0430 \u0436\u0430\u0443\u0430\u043F \u0436\u043E\u049B","feedback.reason.language":"\u0416\u0430\u0443\u0430\u043F \u0442\u0456\u043B\u0456","feedback.reason.slow":"\u0422\u044B\u043C \u04B1\u0437\u0430\u049B","feedback.reason.other":"\u0411\u0430\u0441\u049B\u0430","intro.title":"\u0411\u0430\u0441\u0442\u0430\u043C\u0430\u0441 \u0431\u04B1\u0440\u044B\u043D","intro.continue":"\u0416\u0430\u043B\u0493\u0430\u0441\u0442\u044B\u0440\u0443",source:"\u0414\u0435\u0440\u0435\u043A\u043A\u04E9\u0437: {name}","shell.siteBlocked":"\u0411\u04B1\u043B \u0441\u0430\u0439\u0442\u0442\u0430 \u0447\u0430\u0442 \u049B\u043E\u043B\u0436\u0435\u0442\u0456\u043C\u0441\u0456\u0437","shell.siteBlockedHint":"\u0421\u0430\u0439\u0442 \u0438\u0435\u0441\u0456 AI-Dana-\u043D\u044B \u04D9\u043B\u0456 \u049B\u043E\u0441\u043F\u0430\u0493\u0430\u043D \u043D\u0435\u043C\u0435\u0441\u0435 \u049B\u043E\u043B\u0436\u0435\u0442\u0456\u043C\u0434\u0456\u043B\u0456\u043A \u0442\u043E\u049B\u0442\u0430\u0442\u044B\u043B\u0493\u0430\u043D.","modes.none":"\u0416\u0430\u0443\u0430\u043F \u0440\u0435\u0436\u0438\u043C\u0434\u0435\u0440\u0456 \u049B\u0430\u0437\u0456\u0440 \u049B\u043E\u043B\u0436\u0435\u0442\u0456\u043C\u0441\u0456\u0437. \u041A\u0435\u0439\u0456\u043D\u0456\u0440\u0435\u043A \u049B\u0430\u0439\u0442\u0430\u043B\u0430\u043F \u043A\u04E9\u0440\u0456\u04A3\u0456\u0437.","attachment.sending":"\u0436\u0456\u0431\u0435\u0440\u0456\u043B\u0443\u0434\u0435","agent.steps":"\u049A\u0430\u0434\u0430\u043C\u0434\u0430\u0440","agent.unfinished":"\u0430\u044F\u049B\u0442\u0430\u043B\u043C\u0430\u0434\u044B",rateGroup:"\u0416\u0430\u0443\u0430\u043F\u0442\u044B \u0431\u0430\u0493\u0430\u043B\u0430\u0443","blocks.catalogTitle":"\u041A\u0430\u0442\u0430\u043B\u043E\u0433: {topic}","blocks.catalogSections":"\u0411\u04E9\u043B\u0456\u043C\u0434\u0435\u0440","blocks.catalogIndicators":"\u041A\u04E9\u0440\u0441\u0435\u0442\u043A\u0456\u0448\u0442\u0435\u0440","blocks.catalogSendHint":"\u0421\u04B1\u0440\u0430\u049B \u0442\u0430\u04A3\u0434\u0430\u043B\u0493\u0430\u043D \u0431\u043E\u0439\u0434\u0430 \u0436\u0456\u0431\u0435\u0440\u0456\u043B\u0435\u0434\u0456","blocks.clarification":"\u041D\u0430\u049B\u0442\u044B\u043B\u0430\u0443","files.expired":"\u0424\u0430\u0439\u043B \u043C\u0435\u0440\u0437\u0456\u043C\u0456 \u04E9\u0442\u0442\u0456","files.notFound":"\u0424\u0430\u0439\u043B \u0442\u0430\u0431\u044B\u043B\u043C\u0430\u0434\u044B","files.unavailable":"\u0424\u0430\u0439\u043B \u049B\u043E\u043B\u0436\u0435\u0442\u0456\u043C\u0441\u0456\u0437"},I0={title:"AI-Dana",open:"Open chat",unreadAnswers:"new answers: {count}",ask:"Ask a question",close:"Close",history:"History",closeHistory:"Hide history",newChat:"New chat",untitled:"New chat",historyEmpty:"No chats yet",historyError:"Could not load the history",delete:"Delete",deleteConfirm:"Delete this chat?",deleteYes:"Delete",deleteNo:"Cancel",deleteError:"Could not delete the chat",modeLabel:"Answer mode","health.idle":"Available","health.busy":"Busy","health.unavailable":"Unavailable",placeholder:"Ask your questions",inputLabel:"Message",send:"Send",stop:"Stop",attach:"Attach file",attachOne:"Only one file can be attached",attachHint:"You can attach one file: XLS, XLSX, CSV, TXT or MD, up to {size} MB",disclaimer:"AI can make mistakes \u2014 check important information",removeFile:"Remove file",counter:"{count} / {max}",counterLimit:"Character limit reached",counterOver:"Character limit exceeded",fileTooLarge:"File \u201C{name}\u201D is larger than {size} MB",fileType:"File \u201C{name}\u201D is not supported. You can attach XLS, XLSX, CSV, TXT or MD",modeUnavailable:"This mode is unavailable right now, choose another one",greeting:"How can I help?",loading:"Loading\u2026",configError:"The chat is temporarily unavailable",overloaded:"The service is overloaded right now. Please try again later.",retry:"Retry",dismiss:"Dismiss",scrollDown:"Scroll to bottom",settings:"Settings","settings.language":"Language","settings.theme":"Theme","settings.themeLight":"Light","settings.themeDark":"Dark","settings.themeAuto":"System","settings.model":"Default model","settings.modelHint":"Every new chat starts with it","settings.shortcuts":"Keyboard shortcuts","shortcut.search":"Search chats","shortcut.newChat":"New chat","shortcut.sidebar":"Show or hide the sidebar","shortcut.close":"Close the window",search:"Search chats",searchEmpty:"Nothing found",collapseSidebar:"Hide sidebar",expandSidebar:"Show sidebar",expand:"Expand to the whole page",shrink:"Shrink",examples:"Example queries","examples.whatCanDo":"What you can do","group.pinned":"Pinned","group.today":"Today","group.yesterday":"Yesterday","group.week":"Previous 7 days","group.earlier":"Earlier","errors.thread_busy":"AI-Dana is still answering in this chat. Wait for the answer or stop it.","errors.mode_overloaded":"AI-Dana is overloaded right now, please try again a bit later","errors.daily_limit":"You have used up today's message limit","errors.rate_limit":"Too many messages in a row. Please wait a minute.","errors.ip_limit":"Too many messages from your network today. Please try again tomorrow.","errors.concurrency_limit":"Wait for the previous answer to finish","errors.file_too_large":"The file is too large","errors.file_not_allowed":"This file cannot be attached. XLS, XLSX, CSV, TXT and MD are allowed","errors.invalid_query":"The message is empty or too long","errors.invalid_parent":"This message can no longer be changed","errors.mode_not_found":"The selected mode is unavailable right now. Choose another mode.","errors.thread_not_found":"Chat not found","errors.interrupted":"The answer was interrupted","errors.code":"Could not get an answer (code {code}).","errors.generic":"Something went wrong while sending the message.","errors.network":"No connection to the server. Check your network.","errors.render":"This message could not be shown.","agent.thinking":"Thinking\u2026","agent.done":"Done","agent.stopped":"Stopped","agent.stopping":"Stopping\u2026","agent.interrupted":"Answer interrupted","agent.answerStopped":"Answer stopped. Ask again if needed","agent.seconds":"{value} s","agent.attempt":"attempt {count}","agent.showSteps":"Show steps","agent.hideSteps":"Hide steps","steps.router":"Understanding the question","steps.context_builder":"Looking for the data","steps.sql_architect":"Preparing the calculation","steps.executor":"Calculating the figures","steps.responder":"Preparing the answer","steps.rag":"Looking in reference materials","steps.sql":"Looking for data in open sources","steps.document":"Reading the document","steps.understand":"Understanding the question","steps.search_law":"Searching the law","steps.run_sql":"Calculating the figures","steps.run_query":"Getting the data","steps.data":"Getting the data","steps.lookup_taxpayer":"Looking up the taxpayer","steps.find_taxpayer":"Finding the company by name","steps.ask_clarification":"Clarifying the question","steps.answer":"Preparing the answer","steps.think":"Analysing the findings","steps.file":"Reading the document","waiting.router.1":"Choosing where to look\u2026","waiting.router.2":"Matching the question to data and law\u2026","waiting.responder.1":"Checking the figures against the data\u2026","waiting.responder.2":"Checking the references to the law\u2026","waiting.responder.3":"Tidying up the answer\u2026","waiting.law.1":"Reading the articles found\u2026","waiting.law.2":"Comparing versions of the law\u2026","waiting.data.1":"Calculating the figures\u2026","waiting.data.2":"Checking the totals\u2026","waiting.executor.1":"Checking the totals\u2026","waiting.executor.2":"Tidying up the table\u2026","waiting.taxpayer.1":"Putting the profile together\u2026","waiting.taxpayer.2":"Looking at receipts by year\u2026","waiting.findCompany.1":"Comparing similar names\u2026","waiting.findCompany.2":"Picking the closest match\u2026","waiting.think.1":"Matching the findings to the question\u2026","waiting.think.2":"Deciding what else to look at\u2026","waiting.unknown.1":"Almost there\u2026","waiting.unknown.2":"Checking the result\u2026","steps.unknown":"Working on the answer",copy:"Copy",copied:"Copied",download:"Download",regenerate:"Regenerate",edit:"Edit message",editLabel:"Message text",cancel:"Cancel",actionsLabel:"Message actions",rate:"Rate {count} out of 3",ratingError:"Could not save the rating",feedbackOpen:"Leave feedback",feedbackEdit:"Edit feedback",feedbackLabel:"Feedback on the answer",feedbackPlaceholder:"Your feedback on the answer",save:"Save","branch.label":"Versions","branch.prev":"Previous version","branch.next":"Next version","branch.error":"Could not switch the version","limit.remaining":"{count} of {limit} messages left today","limit.exhausted":"You have used up today's message limit","limit.until":"Message limit reached. You can write again after {time}.","blocks.data":"Data","blocks.hideData":"Hide data","blocks.methodology":"Methodology","blocks.passport":"What was calculated","blocks.indicator":"Indicator","blocks.territory":"Territory","blocks.period":"Period","blocks.breakdown":"Breakdown","blocks.breakdown.sex":"by sex","blocks.breakdown.age":"by age","blocks.breakdown.urban_rural":"urban and rural","blocks.breakdown.activity":"by economic activity","blocks.breakdown.item":"by item","blocks.substituted":"substituted","blocks.alternatives":"Similar indicators","blocks.table":"Data table","blocks.tableSearch":"Search the table\u2026","blocks.tableEmpty":"No data","blocks.page":"{a} of {b}","blocks.prevPage":"Previous page","blocks.nextPage":"Next page","blocks.truncated":"Showing the first {n} rows \u2014 full data in Excel","blocks.catalogMore":"\u2026and {count} more in the catalog","blocks.catalogExamples":"You can ask","blocks.options":"Answer options","blocks.default":"default","blocks.freeTextHint":"Choose an option or type your own below","blocks.findOption":"Find in the list\u2026","blocks.chosen":"Selected: {label}","blocks.continue":"Continue","blocks.cancelPlan":"Cancel","blocks.expired":"This clarification has expired","blocks.askAgain":"Ask the question again","blocks.dashboard":"Dashboard","blocks.hideDashboard":"Hide dashboard","chart.kinds":"Chart type","chart.kind.bar":"Bars","chart.kind.column":"Columns","chart.kind.pie":"Pie","chart.kind.line":"Lines","chart.kind.area":"Areas","chart.national":"KZ {value}","chart.top":"Top {n} of {total} \u2014 all in the dashboard","chart.label":"{title}, {period}","files.list":"Files","files.report":"Final report","files.document":"Editable document","files.presentation":"Presentation","files.excel":"Excel data","files.csv":"CSV data","files.failed":"Could not download the file","report.create":"Generate report","report.pending":"Report files are being prepared\u2026","report.failed":"Could not generate the report files","report.retry":"Retry","report.expired":"The files have expired","dashboard.eyebrow":"Analytics","dashboard.label":"Dashboard","dashboard.sections":"Dashboard sections","dashboard.regions":"regions: {n}","dashboard.items":"items: {n}","dashboard.openSource":"Open in source","dashboard.methodology":"Methodology","dashboard.fullscreen":"Full screen","dashboard.collapse":"Collapse","dashboard.close":"Close","dashboard.chatTab":"Chat","dashboard.dashboardTab":"Dashboard","dashboard.view":"Chat or dashboard","dashboard.region":"Region","dashboard.allRegions":"All regions","dashboard.period":"Period","dashboard.mode.label":"Mode","dashboard.mode.value":"Value","dashboard.mode.deviation":"Deviation","dashboard.mode.change":"Change","dashboard.base.label":"Deviation base","dashboard.base.median":"from median","dashboard.base.national":"from KZ","dashboard.noPrevious":"No previous period","dashboard.noNational":"No national value for this period","dashboard.fewRegions":"At least two values are needed","dashboard.ranking":"Ranking","dashboard.trend":"Trend","dashboard.findings":"Findings","dashboard.data":"Data","dashboard.kpis":"Key figures","dashboard.table.rank":"#","dashboard.table.position":"Item","dashboard.table.value":"Value, {unit}","dashboard.table.share":"Share, %","dashboard.table.deviation":"Deviation, {unit}","dashboard.table.change":"Change, {unit}","dashboard.source":"Source: {name}","dashboard.points":"p.p.","dashboard.kpi.national":"Republic of Kazakhstan","dashboard.kpi.max":"Maximum","dashboard.kpi.min":"Minimum","dashboard.kpi.median":"Regional median","dashboard.kpi.spread":"Range","dashboard.kpi.gap":"Gap","dashboard.kpi.last":"Latest value","dashboard.kpi.first":"Start of period","dashboard.kpi.change":"Change","dashboard.kpi.place":"Rank","dashboard.kpi.placeOf":"{n} of {m}","dashboard.kpi.deviation":"Deviation from median","dashboard.kpi.previous":"vs previous period","steps.counter":"{done} of {total}","feedback.reason.wrong_number":"Wrong number","feedback.reason.wrong_indicator":"Wrong indicator","feedback.reason.wrong_territory":"Wrong territory","feedback.reason.wrong_period":"Wrong period","feedback.reason.not_answered":"Question not answered","feedback.reason.language":"Answer language","feedback.reason.slow":"Too slow","feedback.reason.other":"Other","intro.title":"Before you start","intro.continue":"Continue",source:"Source: {name}","shell.siteBlocked":"The chat is not available on this site","shell.siteBlockedHint":"The site owner has not connected AI-Dana yet or access is suspended.","modes.none":"Answer modes are unavailable right now. Please try again later.","attachment.sending":"sending","agent.steps":"Steps","agent.unfinished":"not finished",rateGroup:"Rate the answer","blocks.catalogTitle":"Catalog: {topic}","blocks.catalogSections":"Sections","blocks.catalogIndicators":"Indicators","blocks.catalogSendHint":"The question is sent as soon as you pick it","blocks.clarification":"Clarification","files.expired":"The file has expired","files.notFound":"File not found","files.unavailable":"File unavailable"},A0={kk:T0,ru:Ip,en:I0},wt=(r,n,o)=>{const s=A0[r][n];return o?s.replace(/\{(\w+)\}/g,(d,p)=>String(o[p]??d)):s},ol=r=>r in Ip,rn=(r,n)=>{if(!r)return"";for(const o of[r[n],r.ru,...Object.values(r)])if(o)return o;return""},Ap="aid_prefs",O0=["light","dark","auto"],Op=r=>{try{const n=JSON.parse(r?.getItem(Ap)??"{}"),o={};return nl.includes(n.lang)&&(o.lang=n.lang),O0.includes(n.scheme)&&(o.scheme=n.scheme),o}catch{return{}}},$0=(r,n)=>{try{r?.setItem(Ap,JSON.stringify(n))}catch{}},$p=({scheme:r})=>r?{scheme:r}:{},F0=(r,n,o)=>n?!o||r.expanded?r:{expanded:!0,byDashboard:!0}:r.byDashboard?{expanded:!1,byDashboard:!1}:r,il=b.createContext(null),sl=()=>{const r=b.useContext(il);if(!r)throw new Error("usePrefs outside PrefsContext");return r},Fp="@dsrcjs/ai-widget",U0=/^https:\/\/cdn\.jsdelivr\.net\/npm\/@dsrcjs\/ai-widget@([^/]+)\/dist\/ai-dana-chat\.js(?:[?#].*)?$/,Up=/^\d+\.\d+\.\d+$/,q0=1500,V0=(r,n)=>{const o=r.split(".").map(Number),s=n.split(".").map(Number);for(let d=0;d<3;d++){const p=(o[d]??0)-(s[d]??0);if(p!==0)return p>0}return!1},B0=r=>`https://cdn.jsdelivr.net/npm/${Fp}@${r}/dist/ai-dana-chat.js`,W0=(r,n,o=typeof document>"u"?null:document.currentScript)=>{const s=o instanceof HTMLScriptElement?o.src:"",d=U0.exec(s)?.[1];if(!d||Up.test(d)||typeof fetch!="function"){r();return}let p=!1;const f=h=>{if(!p){if(p=!0,typeof h=="string"&&Up.test(h)&&V0(h,n)){const m=document.createElement("script");m.src=B0(h),m.async=!0,m.onerror=r,document.head.append(m);return}r()}};window.setTimeout(f,q0),fetch(`https://data.jsdelivr.com/v1/packages/npm/${Fp}/resolved?specifier=${encodeURIComponent(d)}`).then(h=>h.ok?h.json():null).then(h=>{f(h?.version)},()=>{f()})},H0=r=>{let n=r;const o=new Set;return{get:()=>n,set:s=>{n={...n,...s};for(const d of o)d()},subscribe:s=>(o.add(s),()=>o.delete(s))}};class ll extends b.Component{constructor(){super(...arguments),ia(this,"state",{failed:!1})}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}}const X0='*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--aid-c-border)}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:var(--aid-c-font);font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\\!container{width:100%!important;margin-right:auto!important;margin-left:auto!important;padding-right:32px!important;padding-left:32px!important}.container{width:100%;margin-right:auto;margin-left:auto;padding-right:32px;padding-left:32px}@media(min-width:1400px){.\\!container{max-width:1400px!important}.container{max-width:1400px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-\\[3px\\]{inset:3px}.inset-y-0{top:0;bottom:0}.bottom-3{bottom:12px}.bottom-\\[3\\.2rem\\]{bottom:51.2px}.bottom-\\[calc\\(100\\%\\+6px\\)\\]{bottom:calc(100% + 6px)}.left-0{left:0}.left-1\\/2{left:50%}.left-4{left:16px}.left-\\[11px\\]{left:11px}.right-1{right:4px}.right-2{right:8px}.top-0{top:0}.top-1\\/2{top:50%}.top-\\[calc\\(100\\%\\+6px\\)\\]{top:calc(100% + 6px)}.top-full{top:100%}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.m-0{margin:0}.mx-1\\.5{margin-left:6px;margin-right:6px}.mx-auto{margin-left:auto;margin-right:auto}.my-0\\.5{margin-top:2px;margin-bottom:2px}.my-4{margin-top:16px;margin-bottom:16px}.-ml-2{margin-left:-8px}.mb-2{margin-bottom:8px}.ml-0\\.5{margin-left:2px}.ml-1\\.5{margin-left:6px}.mr-1{margin-right:4px}.mr-auto{margin-right:auto}.mt-0\\.5{margin-top:2px}.mt-1{margin-top:4px}.mt-3{margin-top:12px}.mt-4{margin-top:16px}.mt-5{margin-top:20px}.mt-\\[18px\\]{margin-top:18px}.mt-px{margin-top:1px}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.\\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.size-10{width:40px;height:40px}.size-2{width:8px;height:8px}.size-3{width:12px;height:12px}.size-3\\.5{width:14px;height:14px}.size-4{width:16px;height:16px}.size-6{width:24px;height:24px}.size-7{width:28px;height:28px}.size-8{width:32px;height:32px}.size-9{width:36px;height:36px}.size-\\[26px\\]{width:26px;height:26px}.size-\\[30px\\]{width:30px;height:30px}.size-\\[34px\\]{width:34px;height:34px}.size-\\[52px\\]{width:52px;height:52px}.h-10{height:40px}.h-3{height:12px}.h-4{height:16px}.h-5{height:20px}.h-6{height:24px}.h-7{height:28px}.h-8{height:32px}.h-9{height:36px}.h-\\[11px\\]{height:11px}.h-\\[17px\\]{height:17px}.h-\\[18px\\]{height:18px}.h-\\[22px\\]{height:22px}.h-\\[38px\\]{height:38px}.h-full{height:100%}.h-side-head{height:var(--aid-c-side-head-height)}.h-toolbar{height:var(--aid-c-toolbar-height)}.max-h-56{max-height:224px}.max-h-\\[28rem\\]{max-height:448px}.max-h-full{max-height:100%}.min-h-0{min-height:0px}.min-h-10{min-height:40px}.min-h-11{min-height:44px}.min-h-6{min-height:24px}.min-h-7{min-height:28px}.min-h-8{min-height:32px}.min-h-9{min-height:36px}.min-h-\\[30px\\]{min-height:30px}.min-h-\\[34px\\]{min-height:34px}.min-h-\\[76px\\]{min-height:76px}.w-1\\/2{width:50%}.w-10{width:40px}.w-\\[18px\\]{width:18px}.w-\\[340px\\]{width:340px}.w-\\[62\\%\\]{width:62%}.w-\\[7px\\]{width:7px}.w-\\[max-content\\]{width:-moz-max-content;width:max-content}.w-\\[min\\(400px\\,100\\%\\)\\]{width:min(400px,100%)}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.w-side{width:var(--aid-c-side-width)}.w-side-over{width:var(--aid-c-side-over-width)}.min-w-0{min-width:0px}.min-w-16{min-width:64px}.min-w-24{min-width:96px}.min-w-32{min-width:128px}.min-w-4{min-width:16px}.min-w-40{min-width:160px}.min-w-5{min-width:20px}.min-w-\\[220px\\]{min-width:220px}.min-w-\\[22px\\]{min-width:22px}.min-w-\\[30px\\]{min-width:30px}.min-w-\\[480px\\]{min-width:480px}.min-w-full{min-width:100%}.max-w-60{max-width:240px}.max-w-\\[300px\\]{max-width:300px}.max-w-\\[340px\\]{max-width:340px}.max-w-\\[420px\\]{max-width:420px}.max-w-\\[440px\\]{max-width:440px}.max-w-\\[520px\\]{max-width:520px}.max-w-\\[640px\\]{max-width:640px}.max-w-\\[78\\%\\]{max-width:78%}.max-w-\\[820px\\]{max-width:820px}.max-w-\\[844px\\]{max-width:844px}.max-w-\\[calc\\(100\\%-2rem\\)\\]{max-width:calc(100% - 32px)}.max-w-\\[min\\(360px\\,100\\%\\)\\]{max-width:min(360px,100%)}.max-w-\\[min\\(360px\\,80vw\\)\\]{max-width:min(360px,80vw)}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-2{--tw-translate-y: 8px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\\[3px\\]{--tw-translate-y: 3px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize{resize:both}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\\[repeat\\(auto-fit\\,minmax\\(9\\.5rem\\,1fr\\)\\)\\]{grid-template-columns:repeat(auto-fit,minmax(152px,1fr))}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\\.5{gap:2px}.gap-1{gap:4px}.gap-1\\.5{gap:6px}.gap-2{gap:8px}.gap-2\\.5{gap:10px}.gap-3{gap:12px}.gap-3\\.5{gap:14px}.gap-4{gap:16px}.gap-5{gap:20px}.gap-\\[22px\\]{gap:22px}.gap-\\[3px\\]{gap:3px}.gap-\\[7px\\]{gap:7px}.gap-px{gap:1px}.gap-x-3\\.5{-moz-column-gap:14px;column-gap:14px}.gap-y-1{row-gap:4px}.self-start{align-self:flex-start}.self-stretch{align-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.overscroll-x-contain{overscroll-behavior-x:contain}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:var(--aid-c-radius)}.rounded-2xl{border-radius:16px}.rounded-\\[10px\\]{border-radius:10px}.rounded-\\[14px\\]{border-radius:14px}.rounded-\\[18px\\]{border-radius:18px}.rounded-\\[22\\.5\\%\\]{border-radius:22.5%}.rounded-\\[3px\\]{border-radius:3px}.rounded-\\[5px\\]{border-radius:5px}.rounded-\\[7px\\]{border-radius:7px}.rounded-\\[calc\\(var\\(--aid-c-radius\\)\\+6px\\)\\]{border-radius:calc(var(--aid-c-radius) + 6px)}.rounded-aid-field{border-radius:var(--aid-c-radius-field)}.rounded-aid-window{border-radius:var(--aid-c-radius-window)}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--aid-c-radius)}.rounded-md{border-radius:calc(var(--aid-c-radius) - 2px)}.rounded-sm{border-radius:calc(var(--aid-c-radius) - 4px)}.rounded-xl{border-radius:12px}.rounded-br-\\[6px\\]{border-bottom-right-radius:6px}.border{border-width:1px}.border-0{border-width:0px}.border-\\[1\\.5px\\]{border-width:1.5px}.border-\\[3px\\]{border-width:3px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-l-\\[3px\\]{border-left-width:3px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-border{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--aid-c-border) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.border-current{border-color:currentColor}.border-destructive{border-color:hsl(var(--destructive))}.border-destructive\\/30{border-color:hsl(var(--destructive) / .3)}.border-error\\/30{border-color:hsl(var(--error),.3)}.border-error\\/35{border-color:hsl(var(--error),.35)}.border-input{border-color:hsl(var(--input))}.border-muted-foreground{border-color:hsl(var(--muted-foreground))}.border-primary{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--aid-c-primary) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.border-primary-30{border-color:color-mix(in srgb,var(--aid-c-primary) 30%,transparent)}.border-primary-35{border-color:color-mix(in srgb,var(--aid-c-primary) 35%,transparent)}.border-primary-pressed{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--aid-c-primary-pressed) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.border-processing\\/25{border-color:hsl(var(--processing),.25)}.border-warning\\/40{border-color:hsl(var(--warning),.4)}.border-r-transparent{border-right-color:transparent}.bg-\\[\\#F3F5FA\\]{--tw-bg-opacity: 1;background-color:rgb(243 245 250 / var(--tw-bg-opacity, 1))}.bg-\\[hsl\\(var\\(--chart-card\\)\\)\\]{background-color:hsl(var(--chart-card))}.bg-accent{background-color:hsl(var(--accent))}.bg-background{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-background) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-border{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-border) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-card{background-color:hsl(var(--card))}.bg-current{background-color:currentColor}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive-background{background-color:hsla(var(--destructive-background))}.bg-destructive-pressed{background-color:hsl(var(--destructive-pressed))}.bg-error-background{background-color:hsla(var(--error-background))}.bg-file-csv{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--file-csv)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-file-doc{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--file-doc)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-file-other{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--file-other)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-file-pdf{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--file-pdf)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-file-ppt{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--file-ppt)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-file-xls{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--file-xls)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-foreground{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-foreground) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-hl{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--hl)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-mode-busy{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--mode-busy)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-mode-down{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--mode-down)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-mode-idle{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--mode-idle)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-muted{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-muted) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-muted-foreground\\/40{background-color:hsl(var(--muted-foreground) / .4)}.bg-muted\\/60{background-color:color-mix(in srgb,var(--aid-c-muted) 60%,transparent)}.bg-primary{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-primary) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-primary-pressed{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-primary-pressed) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-processing-background{background-color:hsla(var(--processing-background))}.bg-scrim{background-color:var(--scrim)}.bg-secondary{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-secondary) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-transparent{background-color:transparent}.bg-warning-background{background-color:hsla(var(--warning-background))}.fill-current{fill:currentColor}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\\.5{padding:2px}.p-1{padding:4px}.p-1\\.5{padding:6px}.p-2{padding:8px}.p-2\\.5{padding:10px}.p-3{padding:12px}.p-3\\.5{padding:14px}.p-4{padding:16px}.p-6{padding:24px}.p-8{padding:32px}.px-0{padding-left:0;padding-right:0}.px-0\\.5{padding-left:2px;padding-right:2px}.px-1{padding-left:4px;padding-right:4px}.px-1\\.5{padding-left:6px;padding-right:6px}.px-2{padding-left:8px;padding-right:8px}.px-2\\.5{padding-left:10px;padding-right:10px}.px-3{padding-left:12px;padding-right:12px}.px-3\\.5{padding-left:14px;padding-right:14px}.px-4{padding-left:16px;padding-right:16px}.px-5{padding-left:20px;padding-right:20px}.px-\\[18px\\]{padding-left:18px;padding-right:18px}.px-\\[5px\\]{padding-left:5px;padding-right:5px}.px-px{padding-left:1px;padding-right:1px}.py-0{padding-top:0;padding-bottom:0}.py-0\\.5{padding-top:2px;padding-bottom:2px}.py-1{padding-top:4px;padding-bottom:4px}.py-1\\.5{padding-top:6px;padding-bottom:6px}.py-2{padding-top:8px;padding-bottom:8px}.py-2\\.5{padding-top:10px;padding-bottom:10px}.py-3{padding-top:12px;padding-bottom:12px}.py-3\\.5{padding-top:14px;padding-bottom:14px}.py-6{padding-top:24px;padding-bottom:24px}.py-\\[7px\\]{padding-top:7px;padding-bottom:7px}.py-\\[9px\\]{padding-top:9px;padding-bottom:9px}.py-px{padding-top:1px;padding-bottom:1px}.pb-1{padding-bottom:4px}.pb-1\\.5{padding-bottom:6px}.pb-2{padding-bottom:8px}.pb-2\\.5{padding-bottom:10px}.pb-3{padding-bottom:12px}.pb-4{padding-bottom:16px}.pb-5{padding-bottom:20px}.pb-\\[18px\\]{padding-bottom:18px}.pl-0\\.5{padding-left:2px}.pl-2{padding-left:8px}.pl-2\\.5{padding-left:10px}.pl-3{padding-left:12px}.pl-3\\.5{padding-left:14px}.pl-4{padding-left:16px}.pl-5{padding-left:20px}.pl-\\[18px\\]{padding-left:18px}.pl-\\[22px\\]{padding-left:22px}.pl-\\[34px\\]{padding-left:34px}.pr-1\\.5{padding-right:6px}.pr-2{padding-right:8px}.pr-2\\.5{padding-right:10px}.pr-3{padding-right:12px}.pr-3\\.5{padding-right:14px}.pr-4{padding-right:16px}.pr-7{padding-right:28px}.pr-9{padding-right:36px}.pt-0\\.5{padding-top:2px}.pt-1{padding-top:4px}.pt-1\\.5{padding-top:6px}.pt-14{padding-top:56px}.pt-2{padding-top:8px}.pt-3{padding-top:12px}.pt-3\\.5{padding-top:14px}.pt-7{padding-top:28px}.pt-\\[18px\\]{padding-top:18px}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:var(--aid-c-font)}.text-2xl{font-size:20px}.text-2xs{font-size:12px}.text-3xl{font-size:24px}.text-\\[11px\\]{font-size:11px}.text-\\[13\\.5px\\]{font-size:13.5px}.text-\\[13px\\]{font-size:13px}.text-\\[15px\\]{font-size:15px}.text-\\[17px\\]{font-size:17px}.text-\\[9\\.5px\\]{font-size:9.5px}.text-base{font-size:15px}.text-lg{font-size:16px}.text-sm{font-size:14px}.text-xl{font-size:18px}.text-xs{font-size:13px}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-6{line-height:24px}.leading-\\[1\\.35\\]{line-height:1.35}.leading-\\[1\\.3\\]{line-height:1.3}.leading-\\[1\\.55\\]{line-height:1.55}.leading-\\[1\\.65\\]{line-height:1.65}.leading-none{line-height:1}.leading-normal{line-height:1.5}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-\\[0\\.02em\\]{letter-spacing:.02em}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.text-\\[hsl\\(var\\(--foreground\\)\\)\\]{color:hsl(var(--foreground))}.text-background{--tw-text-opacity: 1;color:color-mix(in srgb,var(--aid-c-background) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{--tw-text-opacity: 1;color:color-mix(in srgb,var(--aid-c-foreground) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-inherit{color:inherit}.text-mode-busy{--tw-text-opacity: 1;color:color-mix(in srgb,hsl(var(--mode-busy)) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-mode-down{--tw-text-opacity: 1;color:color-mix(in srgb,hsl(var(--mode-down)) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-mode-idle{--tw-text-opacity: 1;color:color-mix(in srgb,hsl(var(--mode-idle)) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\\/70{color:hsl(var(--muted-foreground) / .7)}.text-primary{--tw-text-opacity: 1;color:color-mix(in srgb,var(--aid-c-primary) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-primary-foreground{--tw-text-opacity: 1;color:color-mix(in srgb,var(--aid-c-primary-foreground) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-warn-text{--tw-text-opacity: 1;color:color-mix(in srgb,hsl(var(--warn-text)) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-warning{--tw-text-opacity: 1;color:hsl(var(--warning),var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_0_0_3px_var\\(--aid-c-secondary\\)\\]{--tw-shadow: 0 0 0 3px var(--aid-c-secondary);--tw-shadow-colored: 0 0 0 3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[inset_0_0_0_1px_var\\(--aid-c-border\\)\\]{--tw-shadow: inset 0 0 0 1px var(--aid-c-border);--tw-shadow-colored: inset 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-panel{--tw-shadow: var(--aid-c-shadow-panel);--tw-shadow-colored: var(--aid-c-shadow-panel);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-pop{--tw-shadow: var(--shadow-pop);--tw-shadow-colored: var(--shadow-pop);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-side{--tw-shadow: var(--aid-c-shadow-side);--tw-shadow-colored: var(--aid-c-shadow-side);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-window{--tw-shadow: var(--aid-c-shadow-window);--tw-shadow-colored: var(--aid-c-shadow-window);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-\\[3px\\]{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-border{--tw-ring-opacity: 1;--tw-ring-color: color-mix(in srgb, var(--aid-c-border) calc(var(--tw-ring-opacity, 1) * 100%), transparent)}.ring-secondary{--tw-ring-opacity: 1;--tw-ring-color: color-mix(in srgb, var(--aid-c-secondary) calc(var(--tw-ring-opacity, 1) * 100%), transparent)}.ring-offset-background{--tw-ring-offset-color: color-mix(in srgb, var(--aid-c-background) 100% , transparent)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in{--tw-enter-opacity: 0}.slide-in-from-left-2{--tw-enter-translate-x: -8px}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.running{animation-play-state:running}.paused{animation-play-state:paused}:host{display:block}:host([hidden]){display:none!important}.aid-root{all:initial;display:block;width:100%;height:100%;box-sizing:border-box;--aid-d-primary-hovered: color-mix(in oklch, var(--aid-primary) 84%, white);--aid-d-primary-pressed: color-mix(in oklch, var(--aid-primary) 80%, black);--aid-d-primary-foreground: oklch(from var(--aid-primary) clamp(0, (.62 - l) * 1000, 1) 0 0);--aid-d-secondary: color-mix(in srgb, var(--aid-primary) 10%, transparent);--aid-d-ring: color-mix(in srgb, var(--aid-primary) 50%, transparent);--aid-c-primary: var(--aid-primary, hsl(var(--primary)));--aid-c-primary-hovered: var(--aid-primary-hovered, var(--aid-d-primary-hovered, hsl(var(--primary-hovered))));--aid-c-primary-pressed: var(--aid-primary-pressed, var(--aid-d-primary-pressed, hsl(var(--primary-pressed))));--aid-c-primary-foreground: var( --aid-primary-foreground, var(--aid-d-primary-foreground, hsl(var(--primary-foreground))) );--aid-c-secondary: var(--aid-secondary, var(--aid-d-secondary, hsl(var(--secondary))));--aid-c-ring: var(--aid-ring, var(--aid-d-ring, hsl(var(--ring))));--aid-c-background: var(--aid-background, hsl(var(--background)));--aid-c-foreground: var(--aid-foreground, hsl(var(--foreground)));--aid-c-muted: var(--aid-muted, hsl(var(--muted)));--aid-c-border: var(--aid-border, hsl(var(--border)));--aid-c-radius: var(--aid-radius, var(--radius));--aid-c-font: var( --aid-font, var( --aid-theme-font, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif ) );--aid-c-z: var(--aid-z-index, 2147483000);font-family:var(--aid-c-font);font-size:15px;line-height:1.5;color:var(--aid-c-foreground);-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%;text-align:left}.aid-root{--warning: 21, 90%, 48%;--warning-background: 27, 96%, 61%, .2;--ring: 201 100% 35%;--chart-1: 201 100% 35%;--chart-2: 174 72% 30%;--chart-3: 27 95% 46%;--chart-4: 330 70% 42%;--chart-5: 252 45% 52%;--chart-ref: 222 47% 11%;--chart-neg: 359 72% 48%;--chart-dim: 201 45% 80%;--chart-grid: 214 32% 88%;--mode-idle: 142 72% 29%;--mode-busy: 32 95% 36%;--mode-down: 359 78% 44%;--file-pdf: 0 72% 45%;--file-doc: 214 80% 44%;--file-ppt: 18 88% 44%;--file-xls: 145 63% 30%;--file-csv: 174 70% 28%;--file-other: 215 16% 42%;--warn-text: 24 90% 30%;--hl: 45 100% 55% / .45;--scrim: rgb(2 6 23 / .48);--persona-ring: 214 32% 88%;--shadow-pop: 0 10px 28px -10px rgb(15 23 42 / .28);--aid-c-radius-window: calc(var(--aid-c-radius) + 6px);--aid-c-radius-field: calc(var(--aid-c-radius) + 4px);--aid-c-radius-bubble-corner: 6px;--aid-c-side-width: 248px;--aid-c-side-over-width: 290px;--aid-c-toolbar-height: 52px;--aid-c-side-head-height: 56px;--aid-c-shadow-launcher: 0 10px 30px -8px rgb(2 6 23 / .45), 0 2px 6px rgb(2 6 23 / .2);--aid-c-shadow-launcher-drag: 0 22px 44px -10px rgb(2 6 23 / .55);--aid-c-shadow-window: 0 30px 70px -20px rgb(2 6 23 / .55);--aid-c-shadow-panel: 0 20px 50px -16px rgb(2 6 23 / .5);--aid-c-shadow-side: 12px 0 30px -12px rgb(2 6 23 / .45)}.aid-root.dark{--ring: 201 90% 60%;--chart-1: 201 90% 60%;--chart-2: 170 60% 52%;--chart-3: 30 95% 62%;--chart-4: 330 75% 70%;--chart-5: 252 75% 76%;--chart-ref: 210 40% 98%;--chart-neg: 359 92% 70%;--chart-dim: 201 30% 32%;--chart-grid: 217 33% 25%;--mode-idle: 142 60% 55%;--mode-busy: 35 95% 62%;--mode-down: 359 95% 72%;--file-pdf: 0 80% 62%;--file-doc: 214 85% 62%;--file-ppt: 20 92% 60%;--file-xls: 145 55% 48%;--file-csv: 172 55% 46%;--file-other: 215 20% 60%;--warn-text: 32 95% 66%;--hl: 45 100% 55% / .35;--scrim: rgb(0 0 0 / .6);--persona-ring: 217 33% 30%;--shadow-pop: 0 12px 32px -10px rgb(0 0 0 / .6)}:where(.aid-root svg.lucide){width:16px;height:16px;flex-shrink:0}:where(.aid-root *),:where(.aid-root *):before,:where(.aid-root *):after{border-color:var(--aid-c-border)}.aid-root[data-mode=launcher]{width:0;height:0}.aid-root{--aid-c-launcher-size: 60px}@media(max-width:639px){.aid-root{--aid-c-launcher-size: 56px}}.aid-launcher{position:fixed;z-index:var(--aid-c-z);isolation:isolate;display:inline-flex;align-items:center;justify-content:center;gap:10px;box-sizing:border-box;min-width:var(--aid-c-launcher-size);height:var(--aid-c-launcher-size);padding:0;border:0;border-radius:9999px;background:var(--aid-c-primary);color:var(--aid-c-primary-foreground);box-shadow:var(--aid-c-shadow-launcher),0 8px 26px -6px color-mix(in srgb,var(--aid-c-primary) 65%,transparent);font:600 15px/1 var(--aid-c-font);cursor:pointer;outline:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;transition:background-color .16s ease-out,transform .26s cubic-bezier(.34,1.56,.64,1),box-shadow .2s ease-out}.aid-launcher:before{content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;background:conic-gradient(var(--aid-c-primary),color-mix(in srgb,var(--aid-c-primary) 40%,#7dd3fc),var(--aid-c-primary) 45%,color-mix(in srgb,var(--aid-c-primary) 55%,#c4b5fd),var(--aid-c-primary))}.aid-launcher[data-shape=circle][data-variant=icon]:before{animation:aid-launcher-spin 7s linear infinite}.aid-launcher[data-variant=icon]:after{content:"";position:absolute;inset:0;z-index:-2;border:2px solid var(--aid-c-primary);border-radius:inherit;opacity:0;pointer-events:none;animation:aid-launcher-ping 2.4s cubic-bezier(0,0,.2,1) 1.2s 3}.aid-launcher[data-unread=true]:after{animation:aid-launcher-ping 2s cubic-bezier(0,0,.2,1) infinite}.aid-launcher[data-open=true]:after,.aid-launcher[data-dragging=true]:after{animation:none}.aid-launcher-face{position:relative;display:block;flex:none;width:calc(var(--aid-c-launcher-size) - 10px);height:calc(var(--aid-c-launcher-size) - 10px);overflow:hidden;border-radius:inherit;background:radial-gradient(circle at 50% 28%,#fff,#dfe8f6 72%);box-shadow:0 0 0 2px #ffffffe6;transition:opacity .18s ease-out,transform .32s cubic-bezier(.34,1.56,.64,1)}.aid-launcher[data-variant=label] .aid-launcher-face{width:44px;height:44px;border-radius:9999px}.aid-launcher-face>.dana-av{width:112%!important;height:112%!important;margin:4% 0 0 -6%;animation:aid-launcher-bob 4.5s ease-in-out infinite;transition:scale .3s cubic-bezier(.34,1.56,.64,1)}.aid-launcher-close{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;opacity:0;transform:rotate(90deg) scale(.4);transition:opacity .18s ease-out,transform .32s cubic-bezier(.34,1.56,.64,1)}.aid-launcher[data-open=true] .aid-launcher-face{opacity:0;transform:rotate(-90deg) scale(.4)}.aid-launcher[data-open=true] .aid-launcher-close{opacity:1;transform:none}.aid-launcher-hint{position:absolute;top:50%;right:calc(100% + 14px);padding:9px 14px;border-radius:12px;background:var(--aid-c-background);color:var(--aid-c-foreground);box-shadow:var(--shadow-pop),0 0 0 1px var(--aid-c-border);font:600 14px/1.2 var(--aid-c-font);white-space:nowrap;opacity:0;transform:translate(8px,-50%) scale(.96);transform-origin:right center;pointer-events:none;transition:opacity .16s ease-out,transform .26s cubic-bezier(.34,1.56,.64,1)}.aid-launcher[data-side=left] .aid-launcher-hint{right:auto;left:calc(100% + 14px);transform:translate(-8px,-50%) scale(.96);transform-origin:left center}.aid-launcher:focus-visible .aid-launcher-hint{opacity:1;transform:translateY(-50%)}.aid-launcher[data-variant=label]{max-width:300px;padding:0 20px 0 8px}.aid-launcher[data-shape=rounded]{border-radius:16px}.aid-launcher[data-shape=square]{border-radius:4px}@media(hover:hover){.aid-launcher:hover{background:var(--aid-c-primary-hovered);transform:translateY(-2px);box-shadow:var(--aid-c-shadow-launcher),0 12px 34px -6px color-mix(in srgb,var(--aid-c-primary) 80%,transparent)}.aid-launcher:hover .aid-launcher-face>.dana-av{scale:1.08}.aid-launcher:hover .aid-launcher-hint{opacity:1;transform:translateY(-50%)}}.aid-launcher:active{transform:scale(.96)}.aid-launcher:focus-visible{outline:3px solid var(--aid-c-ring);outline-offset:3px}.aid-launcher[data-dragging=true]{transform:scale(1.06);box-shadow:var(--aid-c-shadow-launcher-drag)}.aid-launcher[data-dragging=true] .aid-launcher-hint{opacity:0}@keyframes aid-launcher-spin{to{transform:rotate(1turn)}}@keyframes aid-launcher-ping{0%{opacity:.6;transform:scale(1)}to{opacity:0;transform:scale(1.6)}}@keyframes aid-launcher-bob{50%{transform:translateY(-3%)}}@media(prefers-reduced-motion:reduce){.aid-launcher,.aid-launcher:hover,.aid-launcher:active,.aid-launcher[data-dragging=true]{transition:none;transform:none}.aid-launcher:before,.aid-launcher:after,.aid-launcher-face>.dana-av{animation:none!important}}.aid-launcher[data-dragging=true],.aid-window-header[data-dragging=true]{cursor:grabbing}.aid-launcher-origin{position:fixed;z-index:calc(var(--aid-c-z) - 1);box-sizing:border-box;border:1.5px dashed hsl(var(--muted-foreground) / .55);border-radius:9999px;pointer-events:none}.aid-launcher-origin[data-shape=rounded]{border-radius:16px}.aid-launcher-origin[data-shape=square]{border-radius:4px}.aid-root{--aid-c-window-gap: 24px;--aid-c-overlay: var(--aid-overlay, rgb(2 6 23 / .35))}.aid-window{position:fixed;z-index:var(--aid-c-z);display:flex;flex-direction:column;overflow:hidden;transition:opacity .2s ease-out,transform .26s cubic-bezier(.32,.72,0,1),visibility 0s linear 0s}.dana-av{position:relative;display:inline-block;flex-shrink:0;overflow:hidden}.dana-av>*{position:absolute;inset:0;width:100%;height:100%;display:block}.dana-av-body{transform-origin:50% 100%}.dana-av-dot{transform-box:fill-box;transform-origin:50% 50%}.dana-av[data-animated][data-mood=calm] .dana-av-body,.dana-av[data-animated][data-mood=listen] .dana-av-body{animation:dana-breathe 3.6s ease-in-out infinite alternate}.dana-av[data-animated][data-mood=typing] .dana-av-body{animation:dana-bob .34s ease-in-out infinite}.dana-av[data-animated][data-mood=think] .dana-av-body{animation:dana-sway 3.4s ease-in-out infinite alternate}.dana-av[data-animated][data-mood=eureka] .dana-av-body{animation:dana-lift 1.3s cubic-bezier(.3,0,.4,1) infinite}.dana-av[data-animated][data-mood=sorry] .dana-av-body{animation:dana-slump 2.8s ease-in-out infinite}.dana-av[data-animated] .dana-av-bubble,.dana-av[data-animated] .dana-av-dots{animation:dana-float 2.2s ease-in-out infinite alternate}.dana-av[data-animated] .dana-av-dot{animation:dana-dot 1.1s ease-in-out infinite}.dana-av[data-animated] .dana-av-dot:nth-child(3n+2){animation-delay:.18s}.dana-av[data-animated] .dana-av-dot:nth-child(3n){animation-delay:.36s}.dana-av[data-animated] .dana-av-spark{transform-origin:13% 30%;animation:dana-twinkle 1.3s ease-in-out infinite}.dana-av[data-animated] .dana-av-drop{animation:dana-drip 1.8s ease-in infinite}@keyframes dana-breathe{to{transform:translateY(-.5%) scale(1.004,1.01)}}@keyframes dana-bob{50%{transform:translateY(.5%)}}@keyframes dana-sway{0%{transform:rotate(-1.2deg)}to{transform:rotate(1.2deg)}}@keyframes dana-lift{15%{transform:scale(1.02,.98)}42%{transform:translateY(-2.5%) scale(.99,1.015)}65%{transform:scale(1.01,.99)}80%{transform:none}}@keyframes dana-slump{8%{transform:translate(-.7%) rotate(-.6deg)}16%{transform:translate(.7%) rotate(.6deg)}24%{transform:none}60%{transform:translateY(1%) rotate(-.8deg)}}@keyframes dana-float{to{transform:translateY(-1.5%)}}@keyframes dana-dot{0%,60%,to{transform:translateY(0);opacity:.45}30%{transform:translateY(-40%);opacity:1}}@keyframes dana-twinkle{0%,to{transform:scale(.75);opacity:.6}45%{transform:scale(1.08) rotate(12deg);opacity:1}}@keyframes dana-drip{0%{transform:translateY(-1.5%);opacity:0}15%{opacity:1}70%{transform:translateY(3.5%);opacity:1}to{transform:translateY(5.5%);opacity:0}}@media(prefers-reduced-motion:reduce){.dana-av *{animation:none!important}}.aid-overlay{position:fixed;inset:0;z-index:var(--aid-c-z);background:var(--aid-c-overlay);transition:opacity .2s ease-out,visibility 0s linear 0s}.aid-overlay[data-state=closed]{opacity:0;visibility:hidden;transition:opacity .2s ease-in,visibility 0s linear .2s}.aid-root[data-mode=launcher] .aid-window{top:var(--aid-c-window-gap);right:var(--aid-c-window-gap);bottom:var(--aid-c-window-gap);width:min(calc(100vw - 2 * var(--aid-c-window-gap)),max(720px,var(--aid-window-width, 60vw)));transition:opacity .2s ease-out,transform .26s cubic-bezier(.32,.72,0,1),width .26s cubic-bezier(.32,.72,0,1),visibility 0s linear 0s}.aid-root[data-mode=launcher] .aid-window[data-expanded=true]{width:calc(100vw - 2 * var(--aid-c-window-gap))}.aid-root .aid-window[data-state=closed]{opacity:0;transform:translateY(8px);visibility:hidden;pointer-events:none;transition:opacity .16s ease-in,transform .2s ease-in,visibility 0s linear .2s}.aid-root[data-mode=launcher] .aid-window[data-fullscreen=true]{inset:0;width:100%;border-width:0;border-radius:0;box-shadow:none}.aid-root[data-mode=window] .aid-window{position:relative;width:100%;height:100%;box-shadow:none}@media(prefers-reduced-motion:reduce){.aid-root .aid-window,.aid-root .aid-window[data-state=closed],.aid-overlay,.aid-overlay[data-state=closed]{transition:none}}.aid-launcher-badge{position:absolute;top:-4px;right:-4px;box-sizing:content-box;display:flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 5px;border:2px solid var(--aid-c-background);border-radius:9999px;background:hsl(var(--destructive));color:hsl(var(--destructive-foreground));font:700 11px/1 var(--aid-c-font)}.placeholder\\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.first\\:mt-0:first-child{margin-top:0}.last\\:border-b-0:last-child{border-bottom-width:0px}.empty\\:hidden:empty{display:none}.focus-within\\:border-destructive:focus-within{border-color:hsl(var(--destructive))}.focus-within\\:border-primary:focus-within{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--aid-c-primary) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.focus-within\\:ring-\\[3px\\]:focus-within{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-within\\:ring-secondary:focus-within{--tw-ring-opacity: 1;--tw-ring-color: color-mix(in srgb, var(--aid-c-secondary) calc(var(--tw-ring-opacity, 1) * 100%), transparent)}.hover\\:border-primary:hover{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--aid-c-primary) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.hover\\:border-primary\\/50:hover{border-color:color-mix(in srgb,var(--aid-c-primary) 50%,transparent)}.hover\\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\\:bg-background:hover{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-background) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.hover\\:bg-background\\/60:hover{background-color:color-mix(in srgb,var(--aid-c-background) 60%,transparent)}.hover\\:bg-destructive-hovered:hover{background-color:hsl(var(--destructive-hovered))}.hover\\:bg-muted:hover{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-muted) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.hover\\:bg-primary-hovered:hover{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-primary-hovered) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.hover\\:bg-secondary-hovered:hover{--tw-bg-opacity: 1;background-color:hsl(var(--secondary-hovered),var(--tw-bg-opacity, 1))}.hover\\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\\:text-foreground:hover{--tw-text-opacity: 1;color:color-mix(in srgb,var(--aid-c-foreground) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.hover\\:text-primary-foreground:hover{--tw-text-opacity: 1;color:color-mix(in srgb,var(--aid-c-primary-foreground) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.hover\\:text-primary-hovered:hover{--tw-text-opacity: 1;color:color-mix(in srgb,var(--aid-c-primary-hovered) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.hover\\:text-primary\\/80:hover{color:color-mix(in srgb,var(--aid-c-primary) 80%,transparent)}.hover\\:underline:hover{text-decoration-line:underline}.focus\\:border-primary:focus{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--aid-c-primary) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.focus\\:ring-\\[3px\\]:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-secondary:focus{--tw-ring-opacity: 1;--tw-ring-color: color-mix(in srgb, var(--aid-c-secondary) calc(var(--tw-ring-opacity, 1) * 100%), transparent)}.focus-visible\\:border-primary:focus-visible{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--aid-c-primary) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.focus-visible\\:bg-accent:focus-visible{background-color:hsl(var(--accent))}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:ring-\\[3px\\]:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:ring-inset:focus-visible{--tw-ring-inset: inset}.focus-visible\\:ring-destructive:focus-visible{--tw-ring-color: hsl(var(--destructive))}.focus-visible\\:ring-primary:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: color-mix(in srgb, var(--aid-c-primary) calc(var(--tw-ring-opacity, 1) * 100%), transparent)}.focus-visible\\:ring-ring:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: color-mix(in srgb, var(--aid-c-ring) calc(var(--tw-ring-opacity, 1) * 100%), transparent)}.focus-visible\\:ring-secondary:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: color-mix(in srgb, var(--aid-c-secondary) calc(var(--tw-ring-opacity, 1) * 100%), transparent)}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.active\\:border-primary-pressed:active{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--aid-c-primary-pressed) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.active\\:bg-destructive-pressed:active{background-color:hsl(var(--destructive-pressed))}.active\\:bg-primary-pressed:active{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-primary-pressed) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.active\\:bg-secondary-pressed:active{--tw-bg-opacity: 1;background-color:hsl(var(--secondary-pressed),var(--tw-bg-opacity, 1))}.active\\:text-primary-foreground:active{--tw-text-opacity: 1;color:color-mix(in srgb,var(--aid-c-primary-foreground) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.active\\:text-primary-pressed:active{--tw-text-opacity: 1;color:color-mix(in srgb,var(--aid-c-primary-pressed) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-disabled:disabled{background-color:hsl(var(--disabled))}.disabled\\:bg-muted:disabled{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-muted) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.disabled\\:bg-transparent:disabled{background-color:transparent}.disabled\\:text-disabled-foreground:disabled{color:hsl(var(--disabled-foreground))}.disabled\\:text-muted-foreground:disabled{color:hsl(var(--muted-foreground))}.disabled\\:opacity-100:disabled{opacity:1}.disabled\\:opacity-50:disabled{opacity:.5}.disabled\\:opacity-60:disabled{opacity:.6}.group\\/attach:focus-within .group-focus-within\\/attach\\:block{display:block}.group:focus-within .group-focus-within\\:opacity-100{opacity:1}.group\\/attach:hover .group-hover\\/attach\\:block{display:block}.group:hover .group-hover\\:opacity-100{opacity:1}.aria-disabled\\:pointer-events-none[aria-disabled=true]{pointer-events:none}.aria-disabled\\:opacity-50[aria-disabled=true]{opacity:.5}@media(prefers-reduced-motion:reduce){.motion-reduce\\:animate-none{animation:none}.motion-reduce\\:transition-none{transition-property:none}}.\\[\\&\\:\\:-webkit-search-cancel-button\\]\\:hidden::-webkit-search-cancel-button{display:none}.\\[\\&_a\\]\\:no-underline a{text-decoration-line:none}.\\[\\&_li\\+li\\]\\:mt-1 li+li{margin-top:4px}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&_ul\\]\\:mt-1 ul{margin-top:4px}@media(hover:none){.\\[\\@media\\(hover\\:none\\)\\]\\:opacity-100{opacity:1}}',qp=3e3,cl=6*6e4,Vp={phase:"idle"},Bp={phase:"pending"},an={phase:"failed"},Wp={phase:"expired"},K0=new Set(["pdf","docx","pptx","xlsx","csv"]),dl=r=>{switch(r.status){case"queued":case"running":return Bp;case"done":{const n=r.files.filter(o=>K0.has(o.format));return n.length>0?{phase:"done",files:n}:an}case"expired":return Wp;default:return an}},ut=new Map,Io=new Set,Q0=new Set(["done","failed","expired"]),Ao=new Set;let Er=0;const dr=(r,n)=>{const o=ut.get(r)??{view:Vp};ut.set(r,{...o,...n});for(const s of Ao)s()},Y0=r=>{const n=ut.get(r);if(n?.jobId===void 0||n.deadline===void 0||n.api===void 0)return;if(clearTimeout(n.timer),Date.now()+qp>n.deadline){dr(r,{view:an,timer:void 0});return}const{jobId:o,api:s}=n,d=Er,p=setTimeout(()=>{s.reportStatus(o).then(f=>{d===Er&&ut.get(r)?.jobId===o&&ul(r,f)},()=>{d===Er&&ut.get(r)?.jobId===o&&dr(r,{view:an,timer:void 0})})},qp);dr(r,{timer:p})},ul=(r,n)=>{const o=dl(n),s=ut.get(r)?.jobId;s!==void 0&&s!==n.job_id&&Io.add(s);const d=ut.get(r)?.deadline??Date.now()+cl;dr(r,{view:o,jobId:n.job_id,deadline:d,timer:void 0}),o.phase==="pending"&&Y0(r)},nn={subscribe:r=>(Ao.add(r),()=>{Ao.delete(r)}),view:r=>ut.get(r)?.view,adopt:(r,n,o)=>{if(Io.has(n.job_id))return;const s=ut.get(r);if(s!==void 0&&(s.jobId!==void 0||s.view.phase!=="idle")){if(s.view.phase==="pending")return;const d=n.job_id===s.jobId;if(d&&(!Q0.has(n.status)||dl(n).phase===s.view.phase)||d&&s.view.phase==="expired")return}clearTimeout(s?.timer),dr(r,{deadline:Date.now()+cl,timer:void 0,api:o}),ul(r,n)},start:(r,n,o)=>{const s=ut.get(r);if(s?.view.phase==="pending")return;clearTimeout(s?.timer),s?.jobId!==void 0&&Io.add(s.jobId),dr(r,{view:Bp,jobId:void 0,deadline:Date.now()+cl,timer:void 0,api:n});const d=Er;n.createReport(r,o).then(p=>{d===Er&&ul(r,p)},()=>{d===Er&&dr(r,{view:an})})},expire:r=>{ut.get(r)?.view.phase==="done"&&dr(r,{view:Wp})}},Z0=()=>{Er+=1;for(const r of ut.values())clearTimeout(r.timer);ut.clear(),Io.clear();for(const r of Ao)r()},J0={calm:"idle",listen:"idle",think:"thinking",typing:"typing",eureka:"success",sorry:"fail"},G0={think:"bubble",eureka:"spark",sorry:"drop"},ex=(r,n)=>r==="error"?"sorry":r==="streaming"?n?"typing":"think":"calm",Hp=r=>`${r.replace(/\/+$/,"")}/static/avatars/dana`,tx={animated:!0,assetsBase:Hp("")},pl=b.createContext(tx),rx=()=>b.useContext(pl),Xp=({mood:r="calm",size:n=40,animated:o=!0,label:s,className:d,bare:p})=>{const{animated:f,assetsBase:h}=rx(),m=G0[r],v=x=>`${h}/${x}.webp`;return c.jsxs("span",{className:`dana-av ${p?"":"rounded-[22.5%] bg-[#F3F5FA] ring-1 ring-border"} ${d??""}`.trim(),style:{width:n,height:n},"data-mood":r,"data-animated":o&&f?"":void 0,role:s?"img":void 0,"aria-label":s,"aria-hidden":s?void 0:!0,children:[c.jsx("img",{className:"dana-av-body",src:v(J0[r]),alt:"",decoding:"async",draggable:!1}),m&&c.jsx("img",{className:`dana-av-${m}`,src:v(m),alt:"",decoding:"async",draggable:!1}),r==="typing"&&c.jsxs("svg",{className:"dana-av-dots",viewBox:"0 0 240 240","aria-hidden":"true",focusable:"false",children:[c.jsx("rect",{x:"189",y:"32",width:"38.4",height:"18.6",rx:"9.3",fill:"#fff",stroke:"#1F3F75",strokeWidth:"1.3"}),[199.9,208.3,216.6].map(x=>c.jsx("circle",{className:"dana-av-dot",cx:x,cy:"41.3",r:"2.6",fill:"#1F3F75"},x))]}),r==="think"&&c.jsx("svg",{className:"dana-av-dots",viewBox:"0 0 240 240","aria-hidden":"true",focusable:"false",children:[26.1,34.4,43.4].map(x=>c.jsx("circle",{className:"dana-av-dot",cx:x,cy:"31.7",r:"1.8",fill:"#1C2B4A"},x))})]})},ax="data:image/webp;base64,UklGRpYIAABXRUJQVlA4IIoIAADQIwCdASpwAHAAPm0uk0akIqGhK9Y72IANiWQAxuvVyV/S/1j9kvbRsf+g5AVFELnbV+aTzb/S5/gPTA6lr0AOl7/vdBQ6Rfgygp2zwU8AJ5XaBQJV0zyK0e/or6Ffqj2D/16POXfH888gDRu18u1KNmLjeGZLr4ZqVBsgkMVoc7x041yO1f02tSm9bXIEMheVf/RC95sCsVfjmj6ZpRJaU0EfkyhyLIKL+4RI2eN+9oPYg2GHTILNrqgZdg1SBnFHnA1Smd6iSfn5pyVe3ojxs8c/LfQnYkJ+3wLZ9OdUZVABr9W6TXOW8qsrvaf/wRx85mXHieeHFKrMQw2YU2wWKYDYaMHzZ8twg9q12hBQ79ZvuvOBUZuIcnX1p+t0A3fD5ZcoLWFAAP737520S//JE2oOadP/5Q45B1okw2bCtFaM+O748Wjvux3RAtWs04/kNzKk8ppPo7yePNJ+AxmgjXPzjaeUNmvG2UQ2x8TUO0Edi4VSjdmoWQ5Vd4+xsz54cTpxyLUlHuEyUiUyryG+WmSkpXT6mxujFjRjxEG1tCbMQVVOfChvnfC8V1rItnZvA7NfHwOA75r6n02xxiv/qbe70ddBODl041drqrVudxVRWfgEhEd7DIL9ok2TdcacHsGGTrvAybKHdFfgZcykgIEHslkMSmxkTB8IoDiH613vvKir02MksykRXvJZjfut5+2IYL6xf+R4g6GNqXNiXitNngYZj/N+cE+Do2m1y2V03crdiRU/5qSn/6ZodaMpMsd3vy8mI1Q1H7rsg+AR2W8D6KaNKIZjkaeeVaB8Qmp87cnwiN6+7hTmWE37fUEcRazbLbFO748ZXg39mzeY7uTvKvoAIzjSEeGX1FzXUZJ4s3+w1IR7c9uP6ATBaNfRJzexpmKP1QVVLzOYKe2NBz8go9mrf8m9lVcADhUVr8BOXG+fMy46SWi6ny/wuDJNbhSMwtqTxcIUAQjWYa1DAE6M93iSC2DUkjdqrEyaURKLpqbowpeHHcMRqhQ3+AHoCEFi0vLc2nCoxfK4WJtPgpPlEcSKUPm7iyiKvPkL1QRHlfdBXno/05iednD/vQtgcTaL1uOdOjD/Sx6ZDh0RooGvKVW+Vttsz2xXhmKPX6Jd7Kl79psRWr7stM2zgdS8kWReL/lI/1BBTnVRzDYZ6fH+fv9lSMhM0GQW36rKIX+/FhQNOc7VR42UaQkam2KJl7HIQX1dPgJUSfnmJwRb6Uc/TUn0/ZaK6kNKrL04IeBGDGC4498SpKPVhJZJ7sjxmJcq9Eq7JCMIF9ZCBBJhT+xedmBqkQoqRomT9viuclt2H6nOtcrEfkdW1QZXwekmNNztzTFFKyjLGjZ9ZX7T9Y87Nrfq/73NX4R7yVR7uDRHH9Z+0rNEJI+peKTZYzPnz6/36AsVNtSuicFfh1b1v0NFT3j31Du9Jdk2hcaCucJwGEAC0c7IIlMXoj9Z0jIeuAwybKlAhd21JC846LajEuSjwTopQ5S7tto3ON6TVq8z5hg7OUq85HTUjcPVWKKvfJFsBljn03iJ/sfIidkMJ/uVS5CXRYuWpR/bryfsfwWdTJyj2f1uve5+qoieJcituK6wtoOXykZvpDQfJ4U9zlojaU93OYITNLrfN/AYJRQV2jcTLK0nOYgn+kvprvetp9RnfQ0VHs94F6/hng2wbFDm9b6mUAg3Hf5nYhvMlfY/Qbdh3ijqNVigPYfw+ix9GjswaLcejjxDgmhuzd4QyBoLvm7v4VT03vKwBk+Gv7ZuLsx8FaYtIYzJCA7Kl8poIDOBqYkMomDkEP5ievaDin4jO246dw4OlZIq3Y+Wira7W5xiEQeVrkuHwPP2eUM1nADmbNfuYbuP0MnNINp7eKOiznGTEThnhJwTWh0f49LlBXl2oYISvB/+X9BadPoy+evraDwmhC+Z5XYaQ6Tvv4GwsRUcjZdzdJsjJuBME2S62+TihY1X6vZMAgjp5R0d8nIy8+pLivBB0RPrqVnceBl8NMpe6yU2vDGpO0TCRd9/UqYMo6gUaVYrS1l7POCpczA0KZHXLjSV5a/fzt/5Z/LzR3dJSaJn3PsUHgXZ4P7z8M1+VF2KShO0wFRx1IZ7KKNb5S6NOUbIrT6+1pzfjwCY/RVV8O9atS1k/ceAStA4rjXzrrbpPTcd3Lk0WuYYe+U2ZOHaQwCFVPo+l0WCK8y5ihO9ync70xx+C6Lq9Df/2C4hz04w8/YyV0Q+5Wsmz0I5ExOL8f5+ji7XEjEZdPLEBLl8kdWWpuR3A0/cfEY5jr1a2o1O+V41P+m194wHcTICK7bDbBUb+/ICvLe1AcyhQ+9yaV7vYFiTy6awXdJEhy65yekSv6TfowRyEHbtJsJezXehZLybqO9HDGzsdFXRBIiVsqvZiUiPhGUejFZ+lF0nJziqfCpnCtUIC9rSN8M+aFckWUJ8vKCA6NKgGkqqVEEG4+vC40rhqgsUXRJ0H/9+y7C6ZGq1ENXqTTXJRWLD83CI8JN2nwOmAMO25yQ6cXpmxjy0inoyoUOZSVsm7MDvbO5vaSJCSvmcZtv7Uat401+l7V6/LB1RZu+iPnSqam3uw/fO44/eI4mLSfsQ7OLArFZQ1ylKfoB/HcgGo7iD+fB6acnYezP3w2NxJLvjc5UtXTlJPMuvkF0Nxyg1QbcjBtUasNt7rvvCTy9lgz8JV0CcH64235Mn4BoBcntan44xuSr8UN58yw/DcWuMjuFt7A3U8U7g2hfjIhJctCIGyLSiInT3A1rZOBW/bGVCM7U7iSdIkwMKpFvtjl/f1cfTlcmVEJolcZLmJWbYIhDbeLnCcbMt3abT1Krt8aNGIzDpLWS2ExTquZsm1ovhXMZgUce3eGDgDEvKs57tBvAZfoWOxP61pG1esNYGstg70/AoPBegAA==",Kp=({size:r,className:n})=>c.jsx("img",{src:ax,alt:"",width:r,height:r,decoding:"async",draggable:!1,className:`shrink-0 rounded-full object-cover ${n??""}`.trim()}),nx=2500,ox=(r,n)=>{const[o,s]=b.useState(!1),[d,p]=b.useState(r);return d!==r&&(p(r),d&&!r&&n==="done"&&s(!0)),b.useEffect(()=>{if(!o)return;const f=window.setTimeout(()=>{s(!1)},nx);return()=>{window.clearTimeout(f)}},[o]),o},ix=12e3,sx=5e3,Qp="aid_mode",Yp=b.createContext(null),G=()=>{const r=b.useContext(Yp);if(!r)throw new Error("useChat outside ChatProvider");return r},fl=(r,n)=>n.kind==="code"?wt(r,`errors.${n.code}`):n.kind==="status"?n.status===0?wt(r,"errors.network"):wt(r,"errors.code",{code:n.status}):wt(r,"errors.generic"),la="temp-thread",lx=(r=null)=>({config:null,configError:!1,configErrorCode:null,health:{},mode:r,threads:[],threadsError:!1,threadsLoaded:!1,thread:null,loadingThread:null,turn:null,limit:{remaining:null,daily:null,blocked:!1,overloaded:!1},notice:null}),hl=(r,n,o)=>r&&{...r,messages:r.messages.map(s=>s.id===n?o(s):s)},cx=(r,n,o)=>{const s=new Map;for(const d of r?.steps??[])typeof d.id=="string"&&typeof d.startedAt=="number"&&s.set(d.id,d.startedAt);return{...n,steps:n.steps.map(d=>({...d,startedAt:s.get(d.id)??o}))}},dx=(r,n)=>{const o=new Date(n).toISOString();return{id:la,title:r.query.slice(0,80),mode:r.mode,pinned:!1,created_at:o,updated_at:o,current_leaf_id:null,messages:[]}},ux=r=>({id:r.id,title:r.title,mode:r.mode,pinned:r.pinned,created_at:r.created_at,updated_at:r.updated_at}),px=["widget_unauthorized","origin_not_allowed","origin_blocked"],fx=r=>r.configError?r.limit.overloaded?"overloaded":r.configErrorCode!==null&&px.includes(r.configErrorCode)?"siteBlocked":"unavailable":r.config?null:"loading",hx=(r,n)=>{switch(n.type){case"config":{const{config:o}=n,s=o.modes.map(f=>f.slug),d=r.mode&&s.includes(r.mode)?r.mode:s[0]??null,p=o.visitor.remaining_today;return{...r,config:o,configError:!1,configErrorCode:null,mode:d,limit:{remaining:p,daily:o.visitor.daily_limit,blocked:p<=0,overloaded:!1,...p<=0&&(o.visitor.resets_at??r.limit.resetAt)?{resetAt:o.visitor.resets_at??r.limit.resetAt}:{}}}}case"configError":return{...r,configError:!0,configErrorCode:n.code??null,...n.overloaded?{limit:{...r.limit,blocked:!0,overloaded:!0}}:{}};case"health":return{...r,health:n.health};case"mode":return{...r,mode:n.mode};case"threads":return{...r,threads:n.threads,threadsError:!1,threadsLoaded:!0};case"threadsError":return{...r,threadsError:!0,threadsLoaded:!0};case"threadLoading":return{...r,loadingThread:n.id};case"thread":{if(r.turn&&r.thread?.id===n.thread.id||r.loadingThread!==n.thread.id&&r.thread?.id!==n.thread.id)return r;const o=r.config?.modes.map(s=>s.slug)??[];return{...r,thread:n.thread,loadingThread:null,mode:o.includes(n.thread.mode)?n.thread.mode:r.mode}}case"threadFailed":return r.loadingThread===n.id?{...r,loadingThread:null,notice:{kind:"error",reason:n.reason}}:r;case"newChat":return{...r,thread:null,loadingThread:null,turn:null,notice:null};case"threadDeleted":{const o=r.thread?.id===n.id;return{...r,threads:r.threads.filter(s=>s.id!==n.id),...o?{thread:null,turn:null}:{}}}case"turnStart":{const{request:o,token:s,at:d}=n,p=r.thread??dx(o,d),{user:f,assistant:h}=g0(o,p);return{...r,notice:null,thread:{...p,current_leaf_id:h.id,messages:[...p.messages,...f?[f]:[],h]},turn:{token:s,assistantId:h.id,...f?{userId:f.id}:{},startedAt:d,adopted:!1,previousLeaf:p.current_leaf_id,optimisticIds:[h.id,...f?[f.id]:[]]}}}case"resumeStart":return{...r,turn:{token:n.token,assistantId:n.messageId,startedAt:n.at,adopted:!0,previousLeaf:r.thread?.current_leaf_id??null,optimisticIds:[]}};case"adopt":{const{turn:o,thread:s}=r;if(o?.token!==n.token||o.adopted||!s)return r;const{metadata:d}=n,p=s.id===la,f=m0(s,{...o.userId?{userId:o.userId}:{},assistantId:o.assistantId},d),h=r.limit.remaining===null?null:Math.max(0,r.limit.remaining-1);return{...r,thread:f,threads:p?[ux(f),...r.threads.filter(m=>m.id!==f.id)]:r.threads,turn:{...o,adopted:!0,assistantId:d.assistantMessageId,...o.userId?{userId:d.userMessageId}:{}},limit:{...r.limit,remaining:h}}}case"snapshot":{const{turn:o}=r;if(o?.token!==n.token)return r;const s=r.thread?.messages.find(p=>p.id===o.assistantId),d=cx(s,n.snapshot,n.at);return{...r,thread:hl(r.thread,o.assistantId,p=>b0(p,d))}}case"turnEnd":{const{turn:o}=r;if(o?.token!==n.token)return r;const s=n.status==="detached"?r.thread:hl(r.thread,o.assistantId,d=>x0(d,n.status,n.errorText,o.startedAt));return{...r,thread:s,turn:null,limit:{...r.limit,blocked:r.limit.blocked||r.limit.remaining===0}}}case"turnStopping":return r.turn?.token===n.token?{...r,turn:{...r.turn,stopping:!0}}:r;case"turnRejected":{const{turn:o,thread:s}=r;if(o?.token!==n.token)return r;const d=new Set(o.optimisticIds),p=s?.messages.filter(C=>!d.has(C.id))??[],f=s&&(s.id!==la||p.length>0)?{...s,current_leaf_id:o.previousLeaf,messages:p}:null,{error:h}=n,m=h.status===429&&h.code==="daily_limit",v=h.status===503&&h.code==="anon_budget";let x=r.limit;return m?x={...x,remaining:0,blocked:!0,...h.resetAt?{resetAt:h.resetAt}:{}}:v&&(x={...x,blocked:!0,overloaded:!0}),{...r,thread:f,turn:null,notice:m||v?null:{kind:"error",reason:h.reason},limit:x}}case"leaf":return r.thread?{...r,thread:{...r.thread,current_leaf_id:n.leafId}}:r;case"rating":return{...r,thread:hl(r.thread,n.messageId,o=>({...o,rating:n.rating,...n.feedback!==void 0?{feedback:n.feedback}:{},...n.feedbackReason!==void 0?{feedback_reason:n.feedbackReason}:{}}))};case"notice":return{...r,notice:n.notice}}},gl=r=>{const n=r?r.messages.map(Cp):[],o=_p(n),s=Rp(o,r?.current_leaf_id??null);return{index:o,path:s?d0(o,s):[]}},gx=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),mx=r=>r.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,o,s)=>s?s.toUpperCase():o.toLowerCase()),Zp=r=>{const n=mx(r);return n.charAt(0).toUpperCase()+n.slice(1)},Jp=(...r)=>r.filter((n,o,s)=>!!n&&n.trim()!==""&&s.indexOf(n)===o).join(" ").trim(),bx=r=>{for(const n in r)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};var xx={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"};const vx=b.forwardRef(({color:r="currentColor",size:n=24,strokeWidth:o=2,absoluteStrokeWidth:s,className:d="",children:p,iconNode:f,...h},m)=>b.createElement("svg",{ref:m,...xx,width:n,height:n,stroke:r,strokeWidth:s?Number(o)*24/Number(n):o,className:Jp("lucide",d),...!p&&!bx(h)&&{"aria-hidden":"true"},...h},[...f.map(([v,x])=>b.createElement(v,x)),...Array.isArray(p)?p:[p]])),xe=(r,n)=>{const o=b.forwardRef(({className:s,...d},p)=>b.createElement(vx,{ref:p,iconNode:n,className:Jp(`lucide-${gx(Zp(r))}`,`lucide-${r}`,s),...d}));return o.displayName=Zp(r),o},yx=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Gp=xe("arrow-down",yx),wx=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],kx=xe("arrow-up-down",wx),jx=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],ef=xe("arrow-up",jx),Nx=[["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"}]],Oo=xe("book-open",Nx),Cx=[["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"}]],Sx=xe("bot",Cx),Ex=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["rect",{x:"15",y:"5",width:"4",height:"12",rx:"1",key:"q8uenq"}],["rect",{x:"7",y:"8",width:"4",height:"9",rx:"1",key:"sr5ea"}]],_x=xe("chart-column-big",Ex),zx=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],_r=xe("check",zx),Rx=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],on=xe("chevron-down",Rx),Mx=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],tf=xe("chevron-left",Mx),Px=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ml=xe("chevron-right",Px),Lx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],zr=xe("circle-alert",Lx),Dx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]],rf=xe("circle-minus",Dx),Tx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],bl=xe("clock",Tx),Ix=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],xl=xe("copy",Ix),Ax=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],Ox=xe("database",Ax),$x=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],af=xe("download",$x),Fx=[["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"}]],vl=xe("external-link",Fx),Ux=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]],qx=xe("file-down",Ux),Vx=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Bx=xe("file-text",Vx),Wx=[["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"}]],Hx=xe("globe",Wx),Xx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],nf=xe("info",Xx),Kx=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Rr=xe("loader-circle",Kx),Qx=[["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"}]],of=xe("lock",Qx),Yx=[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]],sf=xe("maximize-2",Yx),Zx=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Jx=xe("message-circle-question",Zx),Gx=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],ev=xe("message-circle",Gx),tv=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M13 8H7",key:"14i4kc"}],["path",{d:"M17 12H7",key:"16if0g"}]],lf=xe("message-square-text",tv),rv=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],cf=xe("message-square",rv),av=[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]],df=xe("minimize-2",av),nv=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],ov=xe("panel-left-close",nv),iv=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],sv=xe("panel-left",iv),lv=[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]],cv=xe("paperclip",lv),dv=[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]],uf=xe("pen-line",dv),uv=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],pv=xe("pencil",uv),fv=[["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"}]],pf=xe("rotate-ccw",fv),hv=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],ff=xe("rotate-cw",hv),gv=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],sn=xe("search",gv),mv=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],bv=xe("settings",mv),xv=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],hf=xe("sparkles",xv),vv=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],gf=xe("square",vv),yv=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],wv=xe("star",yv),kv=[["path",{d:"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",key:"gugj83"}]],jv=xe("table-2",kv),Nv=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Cv=xe("trash-2",Nv),Sv=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],yl=xe("triangle-alert",Sv),Ev=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ln=xe("x",Ev);function mf(r){var n,o,s="";if(typeof r=="string"||typeof r=="number")s+=r;else if(typeof r=="object")if(Array.isArray(r))for(n=0;n<r.length;n++)r[n]&&(o=mf(r[n]))&&(s&&(s+=" "),s+=o);else for(n in r)r[n]&&(s&&(s+=" "),s+=n);return s}function _v(){for(var r,n,o=0,s="";o<arguments.length;)(r=arguments[o++])&&(n=mf(r))&&(s&&(s+=" "),s+=n);return s}const wl="-",zv=r=>{const n=Mv(r),{conflictingClassGroups:o,conflictingClassGroupModifiers:s}=r;return{getClassGroupId:d=>{const p=d.split(wl);return p[0]===""&&p.length!==1&&p.shift(),bf(p,n)||Rv(d)},getConflictingClassGroupIds:(d,p)=>{const f=o[d]||[];return p&&s[d]?[...f,...s[d]]:f}}},bf=(r,n)=>{if(r.length===0)return n.classGroupId;const o=r[0],s=n.nextPart.get(o),d=s?bf(r.slice(1),s):void 0;if(d)return d;if(n.validators.length===0)return;const p=r.join(wl);return n.validators.find(({validator:f})=>f(p))?.classGroupId},xf=/^\[(.+)\]$/,Rv=r=>{if(xf.test(r)){const n=xf.exec(r)[1],o=n?.substring(0,n.indexOf(":"));if(o)return"arbitrary.."+o}},Mv=r=>{const{theme:n,prefix:o}=r,s={nextPart:new Map,validators:[]};return Lv(Object.entries(r.classGroups),o).forEach(([d,p])=>{kl(p,s,d,n)}),s},kl=(r,n,o,s)=>{r.forEach(d=>{if(typeof d=="string"){const p=d===""?n:vf(n,d);p.classGroupId=o;return}if(typeof d=="function"){if(Pv(d)){kl(d(s),n,o,s);return}n.validators.push({validator:d,classGroupId:o});return}Object.entries(d).forEach(([p,f])=>{kl(f,vf(n,p),o,s)})})},vf=(r,n)=>{let o=r;return n.split(wl).forEach(s=>{o.nextPart.has(s)||o.nextPart.set(s,{nextPart:new Map,validators:[]}),o=o.nextPart.get(s)}),o},Pv=r=>r.isThemeGetter,Lv=(r,n)=>n?r.map(([o,s])=>{const d=s.map(p=>typeof p=="string"?n+p:typeof p=="object"?Object.fromEntries(Object.entries(p).map(([f,h])=>[n+f,h])):p);return[o,d]}):r,Dv=r=>{if(r<1)return{get:()=>{},set:()=>{}};let n=0,o=new Map,s=new Map;const d=(p,f)=>{o.set(p,f),n++,n>r&&(n=0,s=o,o=new Map)};return{get(p){let f=o.get(p);if(f!==void 0)return f;if((f=s.get(p))!==void 0)return d(p,f),f},set(p,f){o.has(p)?o.set(p,f):d(p,f)}}},yf="!",Tv=r=>{const{separator:n,experimentalParseClassName:o}=r,s=n.length===1,d=n[0],p=n.length,f=h=>{const m=[];let v=0,x=0,C;for(let M=0;M<h.length;M++){let F=h[M];if(v===0){if(F===d&&(s||h.slice(M,M+p)===n)){m.push(h.slice(x,M)),x=M+p;continue}if(F==="/"){C=M;continue}}F==="["?v++:F==="]"&&v--}const k=m.length===0?h:h.substring(x),j=k.startsWith(yf),_=j?k.substring(1):k,E=C&&C>x?C-x:void 0;return{modifiers:m,hasImportantModifier:j,baseClassName:_,maybePostfixModifierPosition:E}};return o?h=>o({className:h,parseClassName:f}):f},Iv=r=>{if(r.length<=1)return r;const n=[];let o=[];return r.forEach(s=>{s[0]==="["?(n.push(...o.sort(),s),o=[]):o.push(s)}),n.push(...o.sort()),n},Av=r=>({cache:Dv(r.cacheSize),parseClassName:Tv(r),...zv(r)}),Ov=/\s+/,$v=(r,n)=>{const{parseClassName:o,getClassGroupId:s,getConflictingClassGroupIds:d}=n,p=[],f=r.trim().split(Ov);let h="";for(let m=f.length-1;m>=0;m-=1){const v=f[m],{modifiers:x,hasImportantModifier:C,baseClassName:k,maybePostfixModifierPosition:j}=o(v);let _=!!j,E=s(_?k.substring(0,j):k);if(!E){if(!_){h=v+(h.length>0?" "+h:h);continue}if(E=s(k),!E){h=v+(h.length>0?" "+h:h);continue}_=!1}const M=Iv(x).join(":"),F=C?M+yf:M,Z=F+E;if(p.includes(Z))continue;p.push(Z);const oe=d(E,_);for(let J=0;J<oe.length;++J){const re=oe[J];p.push(F+re)}h=v+(h.length>0?" "+h:h)}return h};function Fv(){let r=0,n,o,s="";for(;r<arguments.length;)(n=arguments[r++])&&(o=wf(n))&&(s&&(s+=" "),s+=o);return s}const wf=r=>{if(typeof r=="string")return r;let n,o="";for(let s=0;s<r.length;s++)r[s]&&(n=wf(r[s]))&&(o&&(o+=" "),o+=n);return o};function Uv(r,...n){let o,s,d,p=f;function f(m){const v=n.reduce((x,C)=>C(x),r());return o=Av(v),s=o.cache.get,d=o.cache.set,p=h,h(m)}function h(m){const v=s(m);if(v)return v;const x=$v(m,o);return d(m,x),x}return function(){return p(Fv.apply(null,arguments))}}const Pe=r=>{const n=o=>o[r]||[];return n.isThemeGetter=!0,n},kf=/^\[(?:([a-z-]+):)?(.+)\]$/i,qv=/^\d+\/\d+$/,Vv=new Set(["px","full","screen"]),Bv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Wv=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Hv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Xv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Kv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Bt=r=>ca(r)||Vv.has(r)||qv.test(r),ur=r=>da(r,"length",ry),ca=r=>!!r&&!Number.isNaN(Number(r)),jl=r=>da(r,"number",ca),cn=r=>!!r&&Number.isInteger(Number(r)),Qv=r=>r.endsWith("%")&&ca(r.slice(0,-1)),we=r=>kf.test(r),pr=r=>Bv.test(r),Yv=new Set(["length","size","percentage"]),Zv=r=>da(r,Yv,jf),Jv=r=>da(r,"position",jf),Gv=new Set(["image","url"]),ey=r=>da(r,Gv,ny),ty=r=>da(r,"",ay),dn=()=>!0,da=(r,n,o)=>{const s=kf.exec(r);return s?s[1]?typeof n=="string"?s[1]===n:n.has(s[1]):o(s[2]):!1},ry=r=>Wv.test(r)&&!Hv.test(r),jf=()=>!1,ay=r=>Xv.test(r),ny=r=>Kv.test(r),oy=()=>{const r=Pe("colors"),n=Pe("spacing"),o=Pe("blur"),s=Pe("brightness"),d=Pe("borderColor"),p=Pe("borderRadius"),f=Pe("borderSpacing"),h=Pe("borderWidth"),m=Pe("contrast"),v=Pe("grayscale"),x=Pe("hueRotate"),C=Pe("invert"),k=Pe("gap"),j=Pe("gradientColorStops"),_=Pe("gradientColorStopPositions"),E=Pe("inset"),M=Pe("margin"),F=Pe("opacity"),Z=Pe("padding"),oe=Pe("saturate"),J=Pe("scale"),re=Pe("sepia"),$=Pe("skew"),X=Pe("space"),K=Pe("translate"),fe=()=>["auto","contain","none"],ee=()=>["auto","hidden","clip","visible","scroll"],de=()=>["auto",we,n],B=()=>[we,n],Q=()=>["",Bt,ur],me=()=>["auto",ca,we],Se=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ve=()=>["solid","dashed","dotted","double","none"],ye=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>["start","end","center","between","around","evenly","stretch"],D=()=>["","0",we],T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>[ca,we];return{cacheSize:500,separator:":",theme:{colors:[dn],spacing:[Bt,ur],blur:["none","",pr,we],brightness:w(),borderColor:[r],borderRadius:["none","","full",pr,we],borderSpacing:B(),borderWidth:Q(),contrast:w(),grayscale:D(),hueRotate:w(),invert:D(),gap:B(),gradientColorStops:[r],gradientColorStopPositions:[Qv,ur],inset:de(),margin:de(),opacity:w(),padding:B(),saturate:w(),scale:w(),sepia:D(),skew:w(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",we]}],container:["container"],columns:[{columns:[pr]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Se(),we]}],overflow:[{overflow:ee()}],"overflow-x":[{"overflow-x":ee()}],"overflow-y":[{"overflow-y":ee()}],overscroll:[{overscroll:fe()}],"overscroll-x":[{"overscroll-x":fe()}],"overscroll-y":[{"overscroll-y":fe()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[E]}],"inset-x":[{"inset-x":[E]}],"inset-y":[{"inset-y":[E]}],start:[{start:[E]}],end:[{end:[E]}],top:[{top:[E]}],right:[{right:[E]}],bottom:[{bottom:[E]}],left:[{left:[E]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",cn,we]}],basis:[{basis:de()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",we]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",cn,we]}],"grid-cols":[{"grid-cols":[dn]}],"col-start-end":[{col:["auto",{span:["full",cn,we]},we]}],"col-start":[{"col-start":me()}],"col-end":[{"col-end":me()}],"grid-rows":[{"grid-rows":[dn]}],"row-start-end":[{row:["auto",{span:[cn,we]},we]}],"row-start":[{"row-start":me()}],"row-end":[{"row-end":me()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",we]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",we]}],gap:[{gap:[k]}],"gap-x":[{"gap-x":[k]}],"gap-y":[{"gap-y":[k]}],"justify-content":[{justify:["normal",...U()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...U(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...U(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[Z]}],px:[{px:[Z]}],py:[{py:[Z]}],ps:[{ps:[Z]}],pe:[{pe:[Z]}],pt:[{pt:[Z]}],pr:[{pr:[Z]}],pb:[{pb:[Z]}],pl:[{pl:[Z]}],m:[{m:[M]}],mx:[{mx:[M]}],my:[{my:[M]}],ms:[{ms:[M]}],me:[{me:[M]}],mt:[{mt:[M]}],mr:[{mr:[M]}],mb:[{mb:[M]}],ml:[{ml:[M]}],"space-x":[{"space-x":[X]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[X]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",we,n]}],"min-w":[{"min-w":[we,n,"min","max","fit"]}],"max-w":[{"max-w":[we,n,"none","full","min","max","fit","prose",{screen:[pr]},pr]}],h:[{h:[we,n,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[we,n,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[we,n,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[we,n,"auto","min","max","fit"]}],"font-size":[{text:["base",pr,ur]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",jl]}],"font-family":[{font:[dn]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",we]}],"line-clamp":[{"line-clamp":["none",ca,jl]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Bt,we]}],"list-image":[{"list-image":["none",we]}],"list-style-type":[{list:["none","disc","decimal",we]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[r]}],"placeholder-opacity":[{"placeholder-opacity":[F]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[r]}],"text-opacity":[{"text-opacity":[F]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Bt,ur]}],"underline-offset":[{"underline-offset":["auto",Bt,we]}],"text-decoration-color":[{decoration:[r]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",we]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",we]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[F]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Se(),Jv]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Zv]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ey]}],"bg-color":[{bg:[r]}],"gradient-from-pos":[{from:[_]}],"gradient-via-pos":[{via:[_]}],"gradient-to-pos":[{to:[_]}],"gradient-from":[{from:[j]}],"gradient-via":[{via:[j]}],"gradient-to":[{to:[j]}],rounded:[{rounded:[p]}],"rounded-s":[{"rounded-s":[p]}],"rounded-e":[{"rounded-e":[p]}],"rounded-t":[{"rounded-t":[p]}],"rounded-r":[{"rounded-r":[p]}],"rounded-b":[{"rounded-b":[p]}],"rounded-l":[{"rounded-l":[p]}],"rounded-ss":[{"rounded-ss":[p]}],"rounded-se":[{"rounded-se":[p]}],"rounded-ee":[{"rounded-ee":[p]}],"rounded-es":[{"rounded-es":[p]}],"rounded-tl":[{"rounded-tl":[p]}],"rounded-tr":[{"rounded-tr":[p]}],"rounded-br":[{"rounded-br":[p]}],"rounded-bl":[{"rounded-bl":[p]}],"border-w":[{border:[h]}],"border-w-x":[{"border-x":[h]}],"border-w-y":[{"border-y":[h]}],"border-w-s":[{"border-s":[h]}],"border-w-e":[{"border-e":[h]}],"border-w-t":[{"border-t":[h]}],"border-w-r":[{"border-r":[h]}],"border-w-b":[{"border-b":[h]}],"border-w-l":[{"border-l":[h]}],"border-opacity":[{"border-opacity":[F]}],"border-style":[{border:[...ve(),"hidden"]}],"divide-x":[{"divide-x":[h]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[h]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[F]}],"divide-style":[{divide:ve()}],"border-color":[{border:[d]}],"border-color-x":[{"border-x":[d]}],"border-color-y":[{"border-y":[d]}],"border-color-s":[{"border-s":[d]}],"border-color-e":[{"border-e":[d]}],"border-color-t":[{"border-t":[d]}],"border-color-r":[{"border-r":[d]}],"border-color-b":[{"border-b":[d]}],"border-color-l":[{"border-l":[d]}],"divide-color":[{divide:[d]}],"outline-style":[{outline:["",...ve()]}],"outline-offset":[{"outline-offset":[Bt,we]}],"outline-w":[{outline:[Bt,ur]}],"outline-color":[{outline:[r]}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[r]}],"ring-opacity":[{"ring-opacity":[F]}],"ring-offset-w":[{"ring-offset":[Bt,ur]}],"ring-offset-color":[{"ring-offset":[r]}],shadow:[{shadow:["","inner","none",pr,ty]}],"shadow-color":[{shadow:[dn]}],opacity:[{opacity:[F]}],"mix-blend":[{"mix-blend":[...ye(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ye()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[s]}],contrast:[{contrast:[m]}],"drop-shadow":[{"drop-shadow":["","none",pr,we]}],grayscale:[{grayscale:[v]}],"hue-rotate":[{"hue-rotate":[x]}],invert:[{invert:[C]}],saturate:[{saturate:[oe]}],sepia:[{sepia:[re]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[s]}],"backdrop-contrast":[{"backdrop-contrast":[m]}],"backdrop-grayscale":[{"backdrop-grayscale":[v]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[x]}],"backdrop-invert":[{"backdrop-invert":[C]}],"backdrop-opacity":[{"backdrop-opacity":[F]}],"backdrop-saturate":[{"backdrop-saturate":[oe]}],"backdrop-sepia":[{"backdrop-sepia":[re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[f]}],"border-spacing-x":[{"border-spacing-x":[f]}],"border-spacing-y":[{"border-spacing-y":[f]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",we]}],duration:[{duration:w()}],ease:[{ease:["linear","in","out","in-out",we]}],delay:[{delay:w()}],animate:[{animate:["none","spin","ping","pulse","bounce",we]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[J]}],"scale-x":[{"scale-x":[J]}],"scale-y":[{"scale-y":[J]}],rotate:[{rotate:[cn,we]}],"translate-x":[{"translate-x":[K]}],"translate-y":[{"translate-y":[K]}],"skew-x":[{"skew-x":[$]}],"skew-y":[{"skew-y":[$]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",we]}],accent:[{accent:["auto",r]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",we]}],"caret-color":[{caret:[r]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",we]}],fill:[{fill:[r,"none"]}],"stroke-w":[{stroke:[Bt,ur,jl]}],stroke:[{stroke:[r,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},iy=Uv(oy),W=(...r)=>iy(_v(r));b.createContext(!0),b.createContext(!1);const Nl="opacity-0 transition-opacity motion-reduce:transition-none group-focus-within:opacity-100 group-hover:opacity-100 [@media(hover:none)]:opacity-100",Nf=120,sy=200,Cf=".xls,.xlsx,.csv,.txt,.md",Cl=2e3,Sf=["wrong_number","wrong_indicator","wrong_territory","wrong_period","not_answered","language","slow","other"],Ef=[1,2,3],_f=r=>r==null?null:Math.min(r,Ef.length),ua=r=>{const n=r?.trim();if(!n)return null;if(n.startsWith("#"))return n;if(!/^https?:\/\//i.test(n))return null;try{return new URL(n),n}catch{return null}},zf=r=>r.replace(/[\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),Sl=async r=>{try{return await navigator.clipboard.writeText(r),!0}catch{return ly(r)}},ly=r=>{const n=document.createElement("textarea");n.value=r,n.setAttribute("readonly",""),n.style.cssText="position:fixed;top:0;left:0;opacity:0;pointer-events:none",document.body.appendChild(n),n.select();try{return document.execCommand("copy")}catch{return!1}finally{n.remove()}},cy=(r,n)=>{const o=document.createElement("a");o.href=r,o.download=n,o.rel="noopener",o.style.display="none",document.body.append(o),o.click(),o.remove(),window.setTimeout(()=>{URL.revokeObjectURL(r)},6e4)},dy=["group.pinned","group.today","group.yesterday","group.week","group.earlier"],Rf=864e5,uy=(r,n=new Date)=>{const o=new Date(n.getFullYear(),n.getMonth(),n.getDate()).getTime(),s=new Map;for(const d of r){const p=new Date(d.updated_at).getTime();let f;d.pinned?f="group.pinned":p>=o?f="group.today":p>=o-Rf?f="group.yesterday":p>=o-7*Rf?f="group.week":f="group.earlier",s.set(f,[...s.get(f)??[],d])}return dy.flatMap(d=>{const p=s.get(d);return p?[[d,p]]:[]})},$o={text:2e5,steps:500,blocks:100,attachments:50},Mf=r=>r.text.length>$o.text||r.steps.length>$o.steps||r.blocks.length>$o.blocks||r.attachments.length>$o.attachments,py=r=>r.code==="ip_limit"?{kind:"code",code:"ip_limit"}:Po(r),Pf=()=>{try{return window.localStorage}catch{return null}},fy=()=>{try{return Pf()?.getItem(Qp)??null}catch{return null}},hy=r=>r instanceof TypeError,gy=({api:r,lang:n,open:o,onAdminTheme:s,children:d})=>{const[p,f]=b.useReducer(hx,null,()=>lx(fy())),h=b.useRef(p),m=b.useRef(null),v=b.useRef(0),x=b.useRef(n),C=b.useRef(s);b.useLayoutEffect(()=>{h.current=p,x.current=n,C.current=s});const k=b.useCallback(()=>{r.threads().then(D=>{f({type:"threads",threads:D})},()=>{f({type:"threadsError"})})},[r]),j=b.useCallback(()=>{r.config().then(D=>{f({type:"config",config:D}),C.current(P0(D.site.theme)),r.adoptVisitor(D.visitor.token)&&k()},D=>{const T=D instanceof Ge&&D.status===503,w=D instanceof Ge?D.code:null;f({type:"configError",...T?{overloaded:T}:{},...w?{code:w}:{}})})},[r,k]),_=b.useCallback(D=>{r.thread(D).then(T=>{f({type:"thread",thread:T})},()=>{})},[r]);b.useEffect(()=>{j(),k()},[j,k]);const E=p.config!==null;b.useEffect(()=>{if(!o||!E)return;const D=()=>{typeof document<"u"&&document.visibilityState==="hidden"||r.health().then(w=>{f({type:"health",health:w})},()=>{})};D();const T=window.setInterval(D,ix);return window.addEventListener("focus",D),()=>{window.clearInterval(T),window.removeEventListener("focus",D)}},[r,o,E]);const M=b.useCallback(()=>{m.current?.controller.abort(),m.current=null},[]);b.useEffect(()=>M,[M]);const F=D=>{const T={token:++v.current,controller:new AbortController,stopRequested:!1,...D?{assistantId:D}:{}};return m.current=T,T},Z=(D,T)=>D.stopRequested?"stopped":D.tooBig?"error":D.controller.signal.aborted?"detached":T?"error":"done",oe=D=>{m.current===D&&(m.current=null)},J=(D,T,w)=>{oe(D),k(),w&&T&&T!==la&&_(T)},re=b.useCallback(async D=>{const T=h.current;if(T.turn||m.current||T.limit.blocked)return"busy";const w=T.thread&&T.thread.id!==la?T.thread.id:void 0,L=F(),{token:H}=L;f({type:"turnStart",token:H,request:D,at:Date.now()});let V=w;const ue=be=>{if(Mf(be)){L.tooBig=!0,L.controller.abort();return}be.metadata&&L.assistantId===void 0&&(L.assistantId=be.metadata.assistantMessageId,V=be.metadata.threadId,f({type:"adopt",token:H,metadata:be.metadata})),f({type:"snapshot",token:H,snapshot:be,at:Date.now()})};let pe,Ne=!1;try{const{streamChatAnswer:be}=await import("./stream-entry-CRMaTL9v.js");await be({transport:r.transport,request:D,...w?{threadId:w}:{},signal:L.controller.signal,onSnapshot:ue})}catch(be){Ne=!0,pe=be}if(L.assistantId===void 0&&(pe instanceof Ge||hy(pe))){const be=pe instanceof Ge?pe:new Ge(0,"network",null);return f({type:"turnRejected",token:H,error:{status:be.status,code:be.code,resetAt:be.resetAt,reason:py(be)}}),oe(L),be.status===429&&j(),"rejected"}const ke=Z(L,Ne);return f({type:"turnEnd",token:H,status:ke,errorText:ke==="error"?fl(x.current,Po(pe)):""}),J(L,V,ke==="done"||ke==="stopped"),"sent"},[r,j,k,_]),$=b.useCallback(async(D,T)=>{if(m.current)return;const w=F(T),{token:L}=w;f({type:"resumeStart",token:L,messageId:T,at:Date.now()});let H,V=!1;try{const{resumeChatAnswer:pe}=await import("./stream-entry-CRMaTL9v.js");await pe(r.transport,T,w.controller.signal,Ne=>{if(Mf(Ne)){w.tooBig=!0,w.controller.abort();return}f({type:"snapshot",token:L,snapshot:Ne,at:Date.now()})})}catch(pe){V=!0,H=pe}if(H instanceof Ge){f({type:"turnEnd",token:L,status:"detached",errorText:""}),J(w,D.id,!0);return}const ue=Z(w,V);f({type:"turnEnd",token:L,status:ue,errorText:ue==="error"?fl(x.current,Po(H)):""}),J(w,D.id,ue==="done"||ue==="stopped")},[r,k,_]),X=b.useCallback(()=>{const D=m.current;if(!D)return;if(D.stopRequested=!0,f({type:"turnStopping",token:D.token}),D.assistantId===void 0){D.controller.abort();return}const T=window.setTimeout(()=>{D.controller.abort()},sx);D.controller.signal.addEventListener("abort",()=>{window.clearTimeout(T)},{once:!0}),r.stop(D.assistantId).catch(()=>{D.controller.abort()})},[r]),K=b.useCallback(D=>{h.current.thread?.id!==D&&(M(),f({type:"newChat"}),f({type:"threadLoading",id:D}),r.thread(D).then(T=>{f({type:"thread",thread:T});const{path:w}=gl(T),L=w[w.length-1];L?.role==="assistant"&&L.status==="streaming"&&$(T,L.id)},T=>{f({type:"threadFailed",id:D,reason:Po(T)})}))},[r,M,$]),fe=b.useCallback(()=>{M(),f({type:"newChat"})},[M]),ee=b.useCallback(async D=>{try{await r.deleteThread(D),h.current.thread?.id===D&&M(),f({type:"threadDeleted",id:D})}catch{f({type:"notice",notice:{kind:"text",key:"deleteError"}})}},[r,M]),de=b.useMemo(()=>gl(p.thread),[p.thread]),B=b.useCallback(D=>{const{thread:T}=h.current;if(!T||h.current.turn)return;const w=zp(gl(T).index,D),L=T.current_leaf_id;!w||w===L||(f({type:"leaf",leafId:w}),r.setLeaf(T.id,w).catch(()=>{f({type:"leaf",leafId:L}),f({type:"notice",notice:{kind:"text",key:"branch.error"}})}))},[r]),Q=b.useCallback((D,T)=>{const w=h.current.thread?.messages.find(V=>V.id===D);if(!w)return;const L=w.rating,H=T===_f(L)?null:T;f({type:"rating",messageId:D,rating:H}),r.rate(D,H).catch(()=>{f({type:"rating",messageId:D,rating:L}),f({type:"notice",notice:{kind:"text",key:"ratingError"}})})},[r]),me=b.useCallback(async(D,T,w)=>{const L=h.current.thread?.messages.find(H=>H.id===D);try{return await r.feedback(D,T,w),f({type:"rating",messageId:D,rating:L?.rating??null,feedback:T,feedbackReason:w??""}),!0}catch{return!1}},[r]),Se=b.useCallback(D=>{f({type:"mode",mode:D});try{Pf()?.setItem(Qp,D)}catch{}},[]),ve=b.useCallback(()=>{f({type:"notice",notice:null})},[]),ye=b.useCallback((D,T)=>wt(n,D,T),[n]),U=b.useMemo(()=>({state:p,lang:n,api:r,t:ye,path:de.path,index:de.index,send:re,stop:X,openThread:K,newChat:fe,deleteThread:ee,refreshThreads:k,switchBranch:B,rate:Q,saveFeedback:me,selectMode:Se,reload:()=>{j(),k()},dismissNotice:ve}),[p,n,r,ye,de,re,X,K,fe,ee,k,B,Q,me,Se,j,ve]);return c.jsx(Yp.Provider,{value:U,children:d})},El=r=>b.useSyncExternalStore(n=>{if(typeof matchMedia>"u")return()=>{};const o=matchMedia(r);return o.addEventListener("change",n),()=>{o.removeEventListener("change",n)}},()=>typeof matchMedia<"u"&&matchMedia(r).matches,()=>!1),my=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),by=(r,n)=>{if(r.getAttribute("tabindex")==="-1"||r.getAttribute("aria-hidden")==="true"||getComputedStyle(r).visibility==="hidden")return!1;for(let o=r;o;o=o.parentElement){if(o.hasAttribute("inert")||o.hasAttribute("hidden")||getComputedStyle(o).display==="none")return!1;if(o===n)break}return!n.closest("[inert]")},Lf=r=>Array.from(r.querySelectorAll(my)).filter(n=>by(n,r)),Mr=(r,n)=>{b.useLayoutEffect(()=>{r.current?.toggleAttribute("inert",n)},[r,n])},Df=r=>{const n=r.getRootNode();return n instanceof ShadowRoot||n instanceof Document?n.activeElement:null},Fo=(r,n,o)=>{const s=b.useRef(o);b.useEffect(()=>{s.current=o}),b.useEffect(()=>{const d=r.current;if(!n||!d)return;const p=Df(d);(d.querySelector("[data-autofocus]")??Lf(d)[0])?.focus({preventScroll:!0});const f=h=>{if(h.key!=="Tab")return;const m=Lf(d),v=m[0],x=m[m.length-1];if(!v||!x){h.preventDefault();return}const C=Df(d);h.shiftKey&&(C===v||!d.contains(C))?(h.preventDefault(),x.focus()):!h.shiftKey&&(C===x||!d.contains(C))&&(h.preventDefault(),v.focus())};return d.addEventListener("keydown",f),()=>{d.removeEventListener("keydown",f),((p instanceof HTMLElement&&p.tagName!=="BODY"&&p.isConnected&&!d.contains(p)?p:null)??s.current?.())?.focus({preventScroll:!0})}},[r,n])},xy=8,vy=9,fr=(r,n)=>r.find(o=>o.kind===n),Tf=r=>r.filter(n=>n.kind==="report").at(-1),yy=r=>r.filter(n=>n.kind==="export").flatMap(n=>n.files),wy=(r,n)=>{const o=r.findIndex(p=>p.id===n),s=o>0?r[o-1]:void 0,d=o>=0?r[o+1]:void 0;return{question:s?.role==="user"?s.content:"",reply:d?.role==="user"?d.content:""}},ky=500,jy=(r,n,o)=>{const s=n.trim();if(s.length<1||s.length>ky)return;const d=r[r.length-1];if(d?.role!=="assistant")return;const p=fr(d.blocks,"clarification");if(p?.allow_free_text&&gp(p,{isLastInBranch:!0,now:o})==="open")return{clarification_id:p.id,slot:p.slot,value:null,free_text:s}},Ny=r=>{if(!(r instanceof HTMLElement))return!1;if(r.isContentEditable)return!0;const n=r.tagName;return n==="TEXTAREA"||n==="SELECT"||n==="INPUT"&&!["button","checkbox","radio"].includes(r.type)},Cy=r=>typeof r=="number"&&Number.isFinite(r)?r:null,_l=r=>typeof r=="string"?r:typeof r=="number"&&Number.isFinite(r)?String(r):"",un={messageId:null,sectionId:null,fullscreen:!1,view:"chat"},zl=(r,n=null)=>({messageId:r,sectionId:n,fullscreen:!1,view:"dashboard"}),If=b.createContext(null),Pr=()=>{},Sy={state:un,open:Pr,toggle:Pr,autoOpen:Pr,close:Pr,setSection:Pr,setFullscreen:Pr,setView:Pr},Lr=()=>b.useContext(If)??Sy,Ey=1200;function _y(r){const{state:n,setFullscreen:o,close:s}=Lr(),d=b.useRef({fullscreen:n.fullscreen,setFullscreen:o,close:s});b.useEffect(()=>{d.current={fullscreen:n.fullscreen,setFullscreen:o,close:s}}),b.useEffect(()=>{if(!r)return;const p=f=>{if(f.key!=="Escape"||f.defaultPrevented)return;f.preventDefault();const h=d.current;h.fullscreen?h.setFullscreen(!1):h.close()};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p)}},[r])}const zy=(r,n,o)=>r&&!n&&!o,Ry=()=>{const{t:r}=G(),{state:n,setView:o}=Lr(),s=(d,p)=>c.jsx("button",{type:"button",role:"tab","aria-selected":n.view===d,onClick:()=>{o(d)},className:W("inline-flex h-7 items-center whitespace-nowrap rounded-[7px] px-2.5 text-[13px] font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",n.view===d?"bg-secondary text-secondary-foreground":"text-muted-foreground hover:text-foreground"),children:p});return c.jsxs("div",{part:"dashboard-tabs",role:"tablist","aria-label":r("dashboard.view"),className:"inline-flex shrink-0 gap-0.5 rounded-md border bg-background p-0.5",children:[s("chat",r("dashboard.chatTab")),s("dashboard",r("dashboard.dashboardTab"))]})},My=({wide:r,chat:n,panel:o,onPanelFocusChange:s})=>{const{state:d}=Lr(),{view:p,fullscreen:f}=d,h=o!=null,m=h&&!r&&p==="dashboard",v=h&&!r&&p==="chat"&&!f,x=b.useRef(null);return Mr(x,h&&f),c.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1",children:[c.jsx("div",{ref:x,hidden:m,className:W("relative min-h-0 min-w-0 flex-1 flex-col",m?"hidden":"flex"),children:n}),h?c.jsx("aside",{part:"dashboard","data-fullscreen":f,hidden:v,onFocus:()=>{s?.(!0)},onBlur:C=>{C.currentTarget.contains(C.relatedTarget)||s?.(!1)},className:W("min-h-0 min-w-0 flex-col bg-background",v?"hidden":"flex",f&&"absolute inset-0 z-30",!f&&r&&"w-1/2 min-w-[480px] shrink-0 border-l",!f&&!r&&"flex-1 border-t"),children:o}):null]})};var Py=Object.defineProperty,Rl=(r,n)=>Py(r,"name",{value:n,configurable:!0});function Ml(r,n){if(typeof r=="function")return r(n);r!=null&&(r.current=n)}Rl(Ml,"setRef");function Af(...r){return n=>{let o=!1;const s=r.map(d=>{const p=Ml(d,n);return!o&&typeof p=="function"&&(o=!0),p});if(o)return()=>{for(let d=0;d<s.length;d++){const p=s[d];typeof p=="function"?p():Ml(r[d],null)}}}}Rl(Af,"composeRefs");function Of(...r){return b.useCallback(Af(...r),r)}Rl(Of,"useComposedRefs");var Ly=Object.defineProperty,pt=(r,n)=>Ly(r,"name",{value:n,configurable:!0});function $f(r){const n=b.forwardRef((o,s)=>{let{children:d,...p}=o,f=null,h=!1;const m=[];d=Wf(d),b.Children.forEach(d,k=>{if(Vf(k)){h=!0;const j=k;let _="child"in j.props?j.props.child:j.props.children;for(;Pl(_)&&typeof Uo=="function";)_=Uo(_._payload);f=Iy(j,_),m.push(f?.props?.children)}else m.push(k)}),f?f=b.cloneElement(f,void 0,m):!h&&b.Children.count(d)===1&&b.isValidElement(d)&&(f=d);const v=f?qf(f):void 0,x=Of(s,v);if(!f){if(d||d===0)throw new Error(h?$y(r):Oy(r));return d}const C=Uf(p,f.props??{});return f.type!==b.Fragment&&(C.ref=s?x:v),b.cloneElement(f,C)});return n.displayName=`${r}.Slot`,n}pt($f,"createSlot");var Dy=$f("Slot"),Ff=Symbol.for("radix.slottable");function Ty(r){const n=pt(o=>"child"in o?o.children(o.child):o.children,"Slottable");return n.displayName=`${r}.Slottable`,n.__radixId=Ff,n}pt(Ty,"createSlottable");var Iy=pt((r,n)=>"child"in r.props?b.isValidElement(n)?b.cloneElement(n,void 0,r.props.children(n.props.children)):null:b.isValidElement(n)?n:null,"getSlottableElementFromSlottable");function Uf(r,n){const o={...n};for(const s in n){const d=r[s],p=n[s];/^on[A-Z]/.test(s)?d&&p?o[s]=(...f)=>{const h=p(...f);return d(...f),h}:d&&(o[s]=d):s==="style"?o[s]={...d,...p}:s==="className"?o[s]=[d,p].filter(Boolean).join(" "):s==="aria-describedby"&&(o[s]=Hf(p,d))}return{...r,...o}}pt(Uf,"mergeProps");function qf(r){let n=Object.getOwnPropertyDescriptor(r.props,"ref")?.get,o=n&&"isReactWarning"in n&&n.isReactWarning;return o?r.ref:(n=Object.getOwnPropertyDescriptor(r,"ref")?.get,o=n&&"isReactWarning"in n&&n.isReactWarning,o?r.props.ref:r.props.ref||r.ref)}pt(qf,"getElementRef");function Vf(r){return b.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===Ff}pt(Vf,"isSlottable");var Ay=Symbol.for("react.lazy");function Pl(r){return r!=null&&typeof r=="object"&&"$$typeof"in r&&r.$$typeof===Ay&&"_payload"in r&&Bf(r._payload)}pt(Pl,"isLazyComponent");function Bf(r){return typeof r=="object"&&r!==null&&"then"in r}pt(Bf,"isPromiseLike");function Wf(r){let n=r;for(;Pl(n)&&typeof Uo=="function";)n=Uo(n._payload);return n}pt(Wf,"useUnwrappedLazy");function Hf(...r){const n=new Set;for(const o of r)if(typeof o=="string")for(const s of String(o).trim().split(/\s+/))s&&n.add(s);return n.size>0?Array.from(n).join(" "):void 0}pt(Hf,"concatAriaDescribedby");var Oy=pt(r=>`${r} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),$y=pt(r=>`${r} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Uo=hb[" use ".trim().toString()];function Xf(r){var n,o,s="";if(typeof r=="string"||typeof r=="number")s+=r;else if(typeof r=="object")if(Array.isArray(r)){var d=r.length;for(n=0;n<d;n++)r[n]&&(o=Xf(r[n]))&&(s&&(s+=" "),s+=o)}else for(o in r)r[o]&&(s&&(s+=" "),s+=o);return s}function Fy(){for(var r,n,o=0,s="",d=arguments.length;o<d;o++)(r=arguments[o])&&(n=Xf(r))&&(s&&(s+=" "),s+=n);return s}const Kf=r=>typeof r=="boolean"?`${r}`:r===0?"0":r,Qf=Fy,Uy=(r,n)=>o=>{var s;if(n?.variants==null)return Qf(r,o?.class,o?.className);const{variants:d,defaultVariants:p}=n,f=Object.keys(d).map(v=>{const x=o?.[v],C=p?.[v];if(x===null)return null;const k=Kf(x)||Kf(C);return d[v][k]}),h=o&&Object.entries(o).reduce((v,x)=>{let[C,k]=x;return k===void 0||(v[C]=k),v},{}),m=n==null||(s=n.compoundVariants)===null||s===void 0?void 0:s.reduce((v,x)=>{let{class:C,className:k,...j}=x;return Object.entries(j).every(_=>{let[E,M]=_;return Array.isArray(M)?M.includes({...p,...h}[E]):{...p,...h}[E]===M})?[...v,C,k]:v},[]);return Qf(r,f,m,o?.class,o?.className)},Yf=Uy("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 w-[max-content] disabled:bg-disabled disabled:text-disabled-foreground overflow-hidden shrink-0 whitespace-nowrap [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary-hovered focus-visible:ring-primary active:bg-primary-pressed",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive-hovered focus-visible:ring-destructive active:bg-destructive-pressed",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary-hovered focus-visible:ring-primary active:bg-secondary-pressed hover:text-primary-foreground active:text-primary-foreground",ghost:"hover:bg-accent hover:text-accent-foreground focus-visible:ring-primary disabled:bg-transparent",link:"overflow-visible text-primary underline-offset-4 hover:text-primary-hovered focus-visible:ring-primary active:text-primary-pressed disabled:bg-transparent",outline:"bg-secondary text-secondary-foreground hover:bg-secondary-hovered focus-visible:ring-primary active:bg-secondary-pressed hover:text-primary-foreground active:text-primary-foreground",input:"bg-background border border-input focus-visible:ring-primary hover:border-primary active:border-primary-pressed"},size:{default:"h-10 px-4 text-base",xsm:"h-5 px-1 text-xs",xs:"h-6 px-3",sm:"h-8 px-3",md:"h-9 px-4",icon:"size-8 text-base",smIcon:"size-6 rounded-full text-base",lgIcon:"size-10 text-base"},isMenu:{true:"w-full justify-start"}},defaultVariants:{variant:"default",size:"default",isMenu:!1}}),ge=b.forwardRef(({className:r,variant:n,size:o,asChild:s=!1,loading:d=!1,isMenu:p=!1,type:f,...h},m)=>{const v=s?{}:{type:f??"button"};return c.jsx(s?Dy:"button",d?{className:W(Yf({variant:n,size:o,className:r,isMenu:p})),ref:m,...v,...h,disabled:!0,children:c.jsx(Rr,{className:"size-4 animate-spin min-w-16"})}:{className:W(Yf({variant:n,size:o,className:r,isMenu:p})),ref:m,...v,...h})});ge.displayName="Button";function Ll(r,n,o){if(r===null)return zt(null,n);const s=zt(r,n,o);return r>0?`+${s}`:s}function Zf(r){return[r.territory_code??r.territory_name,r.item].filter(Boolean).join("|")}function Jf(r,n){return r.national?.period===n?r.national.value:null}function qy(r,n,o){const s=Ga(r);return pn(r,{period:n,mode:"value",base:"median"}).filter(d=>d.value!==null).slice(0,o).map(d=>{const p=new Map(r.data.filter(f=>Zf(f)===d.key).map(f=>[f.period,f.value]));return{key:d.key,name:d.name,points:s.map(f=>({period:f,value:p.get(f)??null}))}})}function Vy(r,n){if(new Set(r.data.map(s=>s.territory_code??s.territory_name??"")).size!==1||!r.data.every(s=>s.item!=null&&s.item!==""))return n;const o=new Map(r.data.map(s=>[Zf(s),s.item??""]));return n.map(s=>({...s,name:o.get(s.key)??s.name}))}function pn(r,n){return Vy(r,Pb(r,n))}function Gf(r,n,o){const s=Jf(r,n);if(s===null||r.value_kind!=="level")return s;const d=o.filter(p=>p!==null&&Number.isFinite(p));return d.length===0?null:s<=Math.max(...d)*1.05?s:null}const By=["12 76% 61%","173 58% 39%","197 37% 24%","43 74% 66%","27 87% 67%"],Dl=r=>r.clientWidth>0&&r.clientWidth<Wy,Wy=360;function Tl(r){const n=document.createElement("span");r.appendChild(n);const o=d=>(n.style.color=d,getComputedStyle(n).color),s={series:By.map((d,p)=>o(`hsl(var(--chart-${p+1}, ${d}))`)),text:o("hsl(var(--foreground))"),muted:o("hsl(var(--muted-foreground))"),border:o("hsl(var(--chart-grid, var(--border)))"),negative:o("hsl(var(--chart-neg, var(--destructive)))"),reference:o("hsl(var(--chart-ref, var(--foreground)))"),font:getComputedStyle(r).fontFamily,narrow:Dl(r)};return n.remove(),s}function Hy({option:r,signature:n,label:o,height:s}){const d=b.useRef(null),p=b.useRef(null),f=b.useRef(r);return b.useEffect(()=>{f.current=r}),b.useEffect(()=>{const h=d.current;if(!h)return;let m=!0,v;return import("./echarts-3nlHlFS7.js").then(({init:x})=>{if(!m)return;p.current=x(h),p.current.setOption(f.current(Tl(h)));let C=Dl(h);v=new ResizeObserver(()=>{Dl(h)!==C&&(C=!C,p.current?.setOption(f.current(Tl(h)),!0)),p.current?.resize()}),v.observe(h)}).catch(()=>{}),()=>{m=!1,v?.disconnect(),p.current?.dispose(),p.current=null}},[]),b.useEffect(()=>{const h=d.current;h&&p.current&&p.current.setOption(f.current(Tl(h)),!0)},[n]),c.jsx("div",{ref:d,role:"img","aria-label":o,style:{height:s},className:"w-full min-w-0"})}const Xy=[[/товариществ[оа] с ограниченной ответственностью/giu,"\u0422\u041E\u041E"],[/республиканско(е|го) государственно(е|го) учреждени[ея]/giu,"\u0420\u0413\u0423"],[/республиканско(е|го) государственно(е|го) предприяти[ея]/giu,"\u0420\u0413\u041F"],[/государственно(е|го) учреждени[ея]/giu,"\u0413\u0423"],[/акционерно(е|го) обществ[оа]/giu,"\u0410\u041E"],[/индивидуальный предприниматель/giu,"\u0418\u041F"]],eh=r=>Xy.reduce((n,[o,s])=>n.replace(o,s),r).replace(/\s+/g," ").trim(),Ky=7.6,Qy=56,Yy=160,Zy=r=>Math.min(Yy,Math.max(Qy,Math.ceil(r.reduce((n,o)=>Math.max(n,o.length),0)*Ky)));function Jy(r){if(r.trend)return["line","area","column"];const n=["bar","column"],o=r.rows.map(s=>s.value).filter(s=>s!==null);return!r.signed&&o.length>1&&o.every(s=>s>0)&&n.push("pie"),!r.signed&&r.periods.length>1&&r.series.length>0&&n.push("line"),n}const Gy=.3;function e1(r,n,o,s){const{lang:d,decimals:p}=s,f=$=>typeof $=="number"?n.signed?Ll($,d,p):zt($,d,p):"\u2014",h=new Intl.NumberFormat(d,{notation:"compact",maximumFractionDigits:1}),m={color:o.muted,formatter:$=>h.format($)},v={lineStyle:{color:o.border}},x=$=>X=>{const K=eh(X);return K.length>$?`${K.slice(0,$-1)}\u2026`:K},C={color:o.muted,formatter:x(o.narrow?12:22)},k={animationDuration:400,color:o.series,textStyle:{fontFamily:o.font,color:o.text},tooltip:{trigger:r==="pie"?"item":"axis",confine:!0,valueFormatter:f}},j=n.rows.map($=>$.value).filter($=>$!==null),_=!n.signed&&j.every($=>$>0)&&!Tb(j);if(r==="pie")return{...k,legend:{type:"scroll",bottom:0,textStyle:{color:o.muted},formatter:eh,tooltip:{show:!0}},series:[{type:"pie",radius:["40%","68%"],center:["50%","44%"],itemStyle:{borderColor:"transparent",borderRadius:4},label:{show:!1},data:n.rows.filter($=>$.value!==null).map($=>({name:$.name,value:$.value}))}]};if(n.trend||r==="line"||r==="area")return{...k,legend:{type:"scroll",bottom:0,textStyle:{color:o.muted}},grid:{left:8,right:16,top:12,bottom:32,containLabel:!0},xAxis:{type:"category",data:n.periods,axisLabel:{color:o.muted},boundaryGap:r==="column"},yAxis:{type:"value",scale:r!=="column",axisLabel:m,splitLine:v},series:n.series.map($=>({type:r==="column"?"bar":"line",name:$.name,data:n.periods.map(X=>$.points.find(K=>K.period===X)?.value??null),symbolSize:6,...r==="area"?{areaStyle:{opacity:.15}}:{}}))};const E=r==="bar",M=E?[...n.rows].reverse():n.rows,F=M.map($=>$.name),Z=n.national??null,oe=Zy(M.map($=>$.value===null?"\u2014":f($.value))),J={type:"value",scale:_,axisLabel:m,splitLine:v,...o.narrow?{splitNumber:2}:{}},re={type:"category",data:F,axisTick:{show:!1},axisLabel:E?C:{...C,formatter:x(14),rotate:30,interval:0}};return{...k,tooltip:{...k.tooltip,axisPointer:{type:"shadow"}},grid:{left:8,right:E?oe:16,top:Z===null?12:24,bottom:8,containLabel:!0},xAxis:E?J:re,yAxis:E?re:J,series:[{type:"bar",barMaxWidth:28,data:M.map($=>({value:$.value,itemStyle:{color:$.value!==null&&$.value<0?o.negative:o.series[0],opacity:n.highlightKey!==void 0&&$.key!==n.highlightKey?Gy:1,borderRadius:E?[0,4,4,0]:[4,4,0,0]}})),label:{show:E,position:"right",color:o.text,formatter:$=>f($.value)},...Z===null?{}:{markLine:{symbol:"none",silent:!0,lineStyle:{type:"dashed",color:o.reference},label:{formatter:s.nationalLabel(f(Z)),color:o.reference,position:E?"end":"insideEndTop"},data:[E?{xAxis:Z}:{yAxis:Z}]}}}]}}const t1=5,th=({section:r,period:n,rows:o,national:s=null,signed:d=!1,highlightKey:p,compact:f=!1,label:h})=>{const{lang:m,t:v}=G(),x={rows:o,series:qy(r,n,t1),periods:Ga(r),trend:r.shape==="trend",national:s,signed:d,highlightKey:p},C=Jy(x),[k,j]=b.useState(C[0]),_=C.includes(k)?k:C[0],E=_==="bar"&&!x.trend?Math.max(f?180:240,o.length*24+40):f?240:320;return c.jsxs("div",{part:"section-chart",className:"flex min-w-0 flex-col gap-2",children:[C.length>1?c.jsx("div",{role:"group","aria-label":v("chart.kinds"),className:"inline-flex flex-wrap gap-0.5 self-start rounded-md border bg-background p-0.5",children:C.map(M=>c.jsx("button",{type:"button","aria-pressed":M===_,onClick:()=>{j(M)},className:W("inline-flex h-7 items-center whitespace-nowrap rounded-[7px] px-2.5 text-[13px] font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",M===_?"bg-secondary text-secondary-foreground":"text-muted-foreground hover:text-foreground"),children:v(`chart.kind.${M}`)},M))}):null,c.jsx(Hy,{label:h,height:E,signature:JSON.stringify([_,m,x]),option:M=>e1(_,x,M,{lang:m,decimals:r.decimals,nationalLabel:F=>v("chart.national",{value:F})})})]})},rh=(r,n)=>{const{api:o,lang:s}=G(),d=b.useSyncExternalStore(nn.subscribe,()=>nn.view(r))??(n?dl(n):Vp);b.useEffect(()=>{n&&nn.adopt(r,n,o)},[r,n,o]);const p=b.useCallback(()=>{nn.start(r,o,s)},[r,o,s]),f=b.useCallback(()=>{nn.expire(r)},[r]);return{view:d,start:p,expire:f}},ah=({messageId:r,block:n,disabled:o=!1,className:s})=>{const{t:d}=G(),{view:p,start:f}=rh(r,n);return p.phase!=="idle"?null:c.jsxs(ge,{part:"report",variant:"input",size:"sm",className:W("gap-1.5 text-[13px]",s),disabled:o,onClick:f,children:[c.jsx(qx,{"aria-hidden":"true"}),d("report.create")]})},nh={pdf:"pdf",doc:"doc",docx:"doc",ppt:"ppt",pptx:"ppt",xls:"xls",xlsx:"xls",csv:"csv"},Il=r=>{const n=r.lastIndexOf(".");return n<0?"":r.slice(n+1).toLowerCase()},oh=r=>Object.hasOwn(nh,r)?nh[r]??"other":"other",r1={pdf:"bg-file-pdf",doc:"bg-file-doc",ppt:"bg-file-ppt",xls:"bg-file-xls",csv:"bg-file-csv",other:"bg-file-other"},Al=({ext:r,className:n})=>c.jsx("span",{part:"file-type","data-kind":oh(r),"aria-hidden":"true",className:W("flex size-[34px] shrink-0 items-center justify-center rounded-lg text-[9.5px] font-bold leading-none tracking-[0.02em] text-background",r1[oh(r)],n),children:r?r.slice(0,4).toUpperCase():"FILE"}),ih=["byte","kilobyte","megabyte","gigabyte"];function Ol(r,n){let o=r,s=0;for(;o>=1024&&s<ih.length-1;)o/=1024,s+=1;return new Intl.NumberFormat(n,{style:"unit",unit:ih[s]??"byte",unitDisplay:"short",maximumFractionDigits:s===0?0:1}).format(o)}const a1=/^\/api\/v1\/((?:report-jobs|messages)\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\/files\/\d{1,4})$/i,sh=r=>{const n=a1.exec(r);return n?.[1]?`${Gs}/${n[1]}`:null},n1=1e3,o1=async(r,n,o,s)=>{const d=sh(n);if(!d)return"unavailable";let p;try{p=await(await r.request(d.slice(Gs.length))).blob()}catch(m){return m instanceof Ge&&m.status===410?"expired":m instanceof Ge&&m.status===404?"notFound":"unavailable"}const f=URL.createObjectURL(p),h=document.createElement("a");h.href=f,h.download=zf(o),h.hidden=!0,s.appendChild(h);try{h.click()}finally{h.remove(),window.setTimeout(()=>{URL.revokeObjectURL(f)},n1)}return"ok"},i1=["pdf","docx","pptx","xlsx","csv"],s1=r=>{const n=r.getRootNode();return n instanceof ShadowRoot?n:r.parentElement??r},lh=({files:r,onExpired:n,className:o})=>{const{api:s,lang:d,t:p}=G(),[f,h]=b.useState(null),[m,v]=b.useState({}),x=b.useRef(m);b.useEffect(()=>{x.current=m});const C=r.filter(j=>i1.includes(j.format)&&sh(j.download_url)!==null);if(C.length===0)return null;const k=(j,_)=>{f===null&&(h(j.download_url),v(E=>Object.fromEntries(Object.entries(E).filter(([M])=>M!==j.download_url))),o1(s,j.download_url,j.filename,s1(_.currentTarget)).then(E=>{if(h(null),E==="ok")return;const M={...x.current,[j.download_url]:E};v(M),C.every(F=>M[F.download_url]==="expired")&&n?.()}))};return c.jsxs("div",{part:"files",role:"group","aria-label":p("files.list"),className:W("flex flex-col gap-1.5",o),children:[c.jsx("div",{className:"text-2xs text-muted-foreground",children:p("files.list")}),c.jsx("ul",{"aria-label":p("files.list"),className:"m-0 flex list-none flex-col gap-1.5 p-0",children:C.map(j=>{const _=f===j.download_url,E=m[j.download_url];return c.jsxs("li",{"data-state":m[j.download_url]??void 0,className:W("flex min-w-0 items-center gap-3 rounded-xl border bg-card p-2",m[j.download_url]&&"border-error/35 bg-error-background"),children:[c.jsx(Al,{ext:j.format}),c.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[c.jsx("span",{className:"truncate text-sm font-medium leading-tight",title:j.filename,children:p(`files.${yp(j.format)}`)}),c.jsxs("span",{className:"text-2xs leading-tight text-muted-foreground",children:[j.format.toUpperCase(),j.size_bytes>0?` \xB7 ${Ol(j.size_bytes,d)}`:null]})]}),E?c.jsxs("span",{role:"alert",className:"flex shrink-0 items-center gap-1.5 text-[13px]",children:[c.jsx(zr,{className:"text-destructive","aria-hidden":"true"}),p(`files.${E}`)]}):c.jsxs(ge,{variant:"ghost",size:"sm",className:"gap-1.5",title:j.filename,"aria-busy":_,disabled:f!==null,"aria-label":`${p("download")}: ${p(`files.${yp(j.format)}`)}`,onClick:M=>{k(j,M)},children:[_?c.jsx(Rr,{className:"animate-spin motion-reduce:animate-none","aria-hidden":"true"}):c.jsx(af,{"aria-hidden":"true"}),p("download")]})]},`${j.format}-${j.download_url}`)})})]})},$l="flex items-center gap-2.5 rounded-xl border px-3 py-2.5 text-sm",ch=({messageId:r,block:n,className:o})=>{const{t:s}=G(),{view:d,start:p,expire:f}=rh(r,n);switch(d.phase){case"idle":return null;case"pending":return c.jsxs("div",{part:"report",role:"status","data-state":"pending",className:W($l,"border-processing/25 bg-processing-background",o),children:[c.jsx(Rr,{className:"shrink-0 animate-spin text-primary-text motion-reduce:animate-none","aria-hidden":"true"}),c.jsx("span",{className:"min-w-0 flex-1",children:s("report.pending")})]});case"done":return c.jsx(lh,{files:d.files,onExpired:f,className:o});case"expired":return c.jsxs("div",{part:"report",role:"status","data-state":"expired",className:W($l,"bg-card",o),children:[c.jsx(bl,{className:"shrink-0 text-muted-foreground","aria-hidden":"true"}),c.jsx("span",{className:"min-w-0 flex-1",children:s("report.expired")}),c.jsx(ge,{variant:"input",size:"sm",className:"gap-1.5 text-[13px]",onClick:p,children:s("report.create")})]});case"failed":return c.jsxs("div",{part:"report",role:"alert","data-state":"failed",className:W($l,"border-error/30 bg-error-background",o),children:[c.jsx(zr,{className:"shrink-0 text-destructive","aria-hidden":"true"}),c.jsx("span",{className:"min-w-0 flex-1",children:s("report.failed")}),c.jsx(ge,{variant:"input",size:"sm",className:"gap-1.5 text-[13px]",onClick:p,children:s("report.retry")})]})}},l1=4;function qo(r,n,o){const s=Db(r,n);return s==="\u043F.\u043F."?o("dashboard.points"):s}function dh(r){if(r.length===0)return null;const n=[...r].sort((s,d)=>s-d),o=Math.floor(n.length/2);return n.length%2?n[o]??null:((n[o-1]??0)+(n[o]??0))/2}function fn(r){const n=new Set;return r.filter(o=>!n.has(o.label)&&n.add(o.label)).slice(0,l1)}function c1(r,{period:n,region:o,lang:s,t:d}){if(o===void 0&&n===r.latest_period&&r.kpis.length>0)return fn(r.kpis.map(_=>({label:_.label,value:_.value,sub:_.sub??null})));const p=_=>`${zt(_,s,r.decimals)} ${r.unit.label}`,f=(_,E)=>_===null?zt(null,s):`${Ll(_,s,r.decimals)} ${E}`,h=pn(r,{period:n,mode:"value",base:"median"}).filter(_=>_.value!==null),m=h.map(_=>_.value??0),v=h[0],x=h[h.length-1];if(v===void 0||x===void 0)return[];if(o!==void 0){const _=h.findIndex(F=>F.key===o),E=h[_];if(E===void 0)return[];const M=dh(m);return fn([{label:E.name,value:p(E.value),sub:n},{label:d("dashboard.kpi.place"),value:d("dashboard.kpi.placeOf",{n:_+1,m:h.length})},{label:d("dashboard.kpi.deviation"),value:f(M===null||E.value===null?null:E.value-M,qo(r,"deviation",d))},{label:d("dashboard.kpi.previous"),value:f(E.delta,qo(r,"change",d))}])}if(r.shape==="trend"){const _=Ga(r).filter(J=>J<=n),E=J=>r.data.find(re=>re.period===J&&re.value!==null)?.value??null,M=_[0],F=E(n),Z=M===void 0?null:E(M);let oe=null;return F!==null&&Z!==null&&M!==n&&(oe=r.value_kind==="level"?Z>0?(F/Z-1)*100:null:F-Z),fn([{label:d("dashboard.kpi.last"),value:p(F),sub:n},...M!==void 0&&M!==n?[{label:d("dashboard.kpi.first"),value:p(Z),sub:M},{label:d("dashboard.kpi.change"),value:f(oe,qo(r,"change",d))}]:[]])}if(r.shape==="breakdown")return fn([...h.slice(0,3).map(_=>({label:_.name,value:p(_.value),sub:_.share===null?n:`${zt(_.share,s,1)} %`})),...h.length>1?[{label:d("dashboard.kpi.gap"),value:p((v.value??0)-(x.value??0)),sub:`${v.name} \u2212 ${x.name}`}]:[]]);const C=Jf(r,n),k=dh(m),j=[{label:d("dashboard.kpi.max"),value:p(v.value),sub:v.name},{label:d("dashboard.kpi.min"),value:p(x.value),sub:x.name},{label:d("dashboard.kpi.median"),value:p(k),sub:n}];return fn(C!==null?[{label:d("dashboard.kpi.national"),value:p(C),sub:n},...j]:[...j,{label:d("dashboard.kpi.spread"),value:p((v.value??0)-(x.value??0)),sub:`${v.name} \u2212 ${x.name}`}])}const d1=({kpis:r})=>{const{t:n}=G();return r.length===0?null:c.jsx("ul",{"aria-label":n("dashboard.kpis"),className:"m-0 grid list-none grid-cols-[repeat(auto-fit,minmax(9.5rem,1fr))] gap-2.5 p-0",children:r.map((o,s)=>c.jsxs("li",{className:"flex min-w-0 flex-col gap-0.5 rounded-xl border bg-card px-3.5 py-3",children:[c.jsx("span",{"data-kpi-label":"",className:"truncate text-2xs text-muted-foreground",title:o.label,children:o.label}),c.jsx("span",{className:"text-xl font-semibold tabular-nums leading-snug",children:o.value}),o.sub!=null&&o.sub!==""?c.jsx("span",{className:"truncate text-2xs text-muted-foreground",title:o.sub,children:o.sub}):null]},s))})};function uh({label:r,value:n,options:o,onChange:s}){return c.jsx("div",{role:"group","aria-label":r,className:"inline-flex gap-0.5 rounded-md border bg-background p-0.5",children:o.map(d=>{const p=d.value===n,f=d.disabledHint!==void 0;return c.jsx("button",{type:"button","aria-pressed":p,"aria-disabled":f||void 0,title:d.disabledHint,onClick:()=>{f||s(d.value)},className:W("h-7 whitespace-nowrap rounded-[7px] px-2.5 text-[13px] font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",p?"bg-secondary text-secondary-foreground":"text-muted-foreground",f?"cursor-not-allowed opacity-50":!p&&"hover:text-foreground"),children:d.label},d.value)})})}const hn="whitespace-nowrap px-3 py-[7px] text-[13px] font-semibold text-foreground",pa="whitespace-nowrap text-right tabular-nums",u1=({section:r,rows:n,mode:o,lang:s,highlightKey:d})=>{const{t:p}=G(),f=r.value_kind==="level",h=o==="value"?null:p(o==="change"?"dashboard.table.change":"dashboard.table.deviation",{unit:qo(r,o,p)});return c.jsx("div",{className:"max-h-[28rem] overflow-auto overscroll-contain rounded-[10px] border bg-card",children:c.jsxs("table",{className:"w-full border-collapse text-[13.5px]",children:[c.jsx("thead",{className:"sticky top-0 bg-muted",children:c.jsxs("tr",{className:"border-b",children:[c.jsx("th",{scope:"col",className:W(hn,"w-10 text-right"),children:p("dashboard.table.rank")}),c.jsx("th",{scope:"col",className:W(hn,"text-left"),children:p("dashboard.table.position")}),c.jsx("th",{scope:"col",className:W(hn,pa),children:p("dashboard.table.value",{unit:r.unit.label})}),h!==null?c.jsx("th",{scope:"col",className:W(hn,pa),children:h}):null,f?c.jsx("th",{scope:"col",className:W(hn,pa),children:p("dashboard.table.share")}):null]})}),c.jsx("tbody",{children:n.map((m,v)=>c.jsxs("tr",{className:W("h-9 border-b last:border-b-0",m.key===d&&"bg-accent"),children:[c.jsx("td",{className:"px-3 text-right tabular-nums text-muted-foreground",children:v+1}),c.jsx("td",{className:"px-3",children:m.name}),c.jsx("td",{className:W("px-3",pa),children:zt(m.value,s,r.decimals)}),h!==null?c.jsx("td",{className:W("px-3",pa),children:Ll(m.display,s,r.decimals)}):null,f?c.jsx("td",{className:W("px-3",pa),children:zt(m.share,s,1)}):null]},m.key))})]})})},Fl="__all__",Ul="size-8 text-muted-foreground hover:text-foreground",p1=({message:r})=>{const{t:n}=G(),{state:o,setSection:s}=Lr(),d=fr(r.blocks,"dashboard")?.sections??[],p=d.find(h=>h.id===o.sectionId)??d[0];if(p===void 0)return null;const f=d.length>1?c.jsx("div",{role:"tablist","aria-label":n("dashboard.sections"),className:"flex gap-1 self-start overflow-x-auto rounded-md bg-secondary p-1",children:d.map(h=>{const m=h.id===p.id;return c.jsx("button",{type:"button",role:"tab","aria-selected":m,onClick:()=>{s(h.id)},className:W("min-h-8 shrink-0 rounded-lg px-3 py-1.5 text-left text-sm font-medium leading-snug transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",m?"bg-background text-foreground shadow-sm":"text-secondary-foreground hover:text-foreground"),children:h.title},h.id)})}):null;return c.jsx("section",{"aria-label":n("dashboard.label"),className:"flex h-full min-h-0 min-w-0 flex-1 flex-col bg-background",children:c.jsx(f1,{section:p,message:r,tabs:f},p.id)})},ph=({label:r,value:n,onChange:o,children:s,className:d})=>c.jsxs("div",{className:W("flex flex-col gap-1",d),children:[c.jsx("span",{className:"text-2xs text-muted-foreground","aria-hidden":"true",children:r}),c.jsxs("span",{className:"relative inline-flex",children:[c.jsx("select",{"aria-label":r,value:n,onChange:p=>{o(p.target.value)},className:"h-8 w-full min-w-0 appearance-none truncate rounded-md border border-input bg-background py-0 pl-2.5 pr-7 text-sm text-foreground transition-colors hover:bg-muted focus-visible:border-primary focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-secondary motion-reduce:transition-none",children:s}),c.jsx(on,{className:"pointer-events-none absolute right-2 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"})]})]}),fh=({label:r,children:n})=>c.jsxs("div",{className:"flex flex-col gap-1",children:[c.jsx("span",{className:"text-2xs text-muted-foreground","aria-hidden":"true",children:r}),n]}),f1=({section:r,message:n,tabs:o})=>{const{lang:s,t:d}=G(),{state:p,setFullscreen:f,close:h}=Lr(),{fullscreen:m}=p,v=Ga(r),[x,C]=b.useState(()=>v.includes(r.latest_period)?r.latest_period:v.at(-1)??r.latest_period),[k,j]=b.useState(),[_,E]=b.useState("value"),[M,F]=b.useState("median"),Z=Lb(r,x),oe=r.shape==="trend",J=oe||_==="change"&&!Z.change||_==="deviation"&&!Z.deviation?"value":_,re=M==="national"&&Z.national?"national":"median",$=pn(r,{period:x,mode:J,base:re}),X=J==="value"?$:pn(r,{period:x,mode:"value",base:re}),K=[...X].sort((w,L)=>w.name.localeCompare(L.name,s)),fe=k!==void 0&&K.some(w=>w.key===k)?k:void 0,ee=c1(r,{period:x,region:fe,lang:s,t:d}),de=x===r.latest_period&&fe===void 0?r.findings:[],B=r.shape==="regional",Q=X.filter(w=>w.value!==null).length,me=[x,r.unit.label,d(B?"dashboard.regions":"dashboard.items",{n:Q})].join(" \xB7 "),Se=ua(r.source_url),ve=r.methodology?.editions,ye=ve?.[s]??ve?.ru,U=ua(ye?.url),D=`${d(oe?"dashboard.trend":"dashboard.ranking")}: ${r.title}, ${x}`,T=Tf(n.blocks);return c.jsxs(c.Fragment,{children:[c.jsxs("header",{className:"flex shrink-0 flex-col gap-2 border-b py-3.5 pl-5 pr-4",children:[c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"min-w-0 flex-1 text-2xs font-semibold uppercase tracking-wide text-primary-text",children:d("dashboard.eyebrow")}),U!==null?c.jsx(ge,{variant:"ghost",size:"icon",className:Ul,asChild:!0,children:c.jsx("a",{href:U,target:"_blank",rel:"noopener noreferrer","aria-label":d("dashboard.methodology"),title:ye?.title??d("dashboard.methodology"),children:c.jsx(Oo,{"aria-hidden":"true"})})}):null,Se!==null?c.jsx(ge,{variant:"ghost",size:"icon",className:Ul,asChild:!0,children:c.jsx("a",{href:Se,target:"_blank",rel:"noopener noreferrer","aria-label":d("dashboard.openSource"),title:d("dashboard.openSource"),children:c.jsx(vl,{"aria-hidden":"true"})})}):null,c.jsxs(ge,{variant:"ghost",size:"sm",className:"gap-1.5 text-muted-foreground hover:text-foreground","aria-pressed":m,onClick:()=>{f(!m)},children:[m?c.jsx(df,{"aria-hidden":"true"}):c.jsx(sf,{"aria-hidden":"true"}),d(m?"dashboard.collapse":"dashboard.fullscreen")]}),c.jsx(ge,{variant:"ghost",size:"icon",className:Ul,"aria-label":d("dashboard.close"),title:d("dashboard.close"),onClick:h,children:c.jsx(ln,{"aria-hidden":"true"})})]}),c.jsx("h2",{className:"m-0 text-xl font-semibold leading-snug",children:r.title}),c.jsx("span",{className:"text-xs text-muted-foreground",children:me})]}),c.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-3.5 overflow-y-auto overscroll-contain px-5 pb-5 pt-3.5",children:[o,c.jsxs("div",{className:"flex flex-wrap items-end gap-3",children:[B&&K.length>1?c.jsxs(ph,{label:d("dashboard.region"),value:fe??Fl,onChange:w=>{j(w===Fl?void 0:w)},className:"min-w-40 max-w-60",children:[c.jsx("option",{value:Fl,children:d("dashboard.allRegions")}),K.map(w=>c.jsx("option",{value:w.key,children:w.name},w.key))]}):null,v.length>1?c.jsx(ph,{label:d("dashboard.period"),value:x,onChange:C,className:"min-w-24",children:[...v].reverse().map(w=>c.jsx("option",{value:w,children:w},w))}):null,oe?null:c.jsx(fh,{label:d("dashboard.mode.label"),children:c.jsx(uh,{label:d("dashboard.mode.label"),value:J,onChange:E,options:[{value:"value",label:d("dashboard.mode.value")},{value:"deviation",label:d("dashboard.mode.deviation"),disabledHint:Z.deviation?void 0:d("dashboard.fewRegions")},{value:"change",label:d("dashboard.mode.change"),disabledHint:Z.change?void 0:d("dashboard.noPrevious")}]})}),J==="deviation"?c.jsx(fh,{label:d("dashboard.base.label"),children:c.jsx(uh,{label:d("dashboard.base.label"),value:re,onChange:F,options:[{value:"median",label:d("dashboard.base.median")},{value:"national",label:d("dashboard.base.national"),disabledHint:Z.national?void 0:d("dashboard.noNational")}]})}):null]}),c.jsx(d1,{kpis:ee}),c.jsx(ql,{title:d(oe?"dashboard.trend":"dashboard.ranking"),card:!0,children:c.jsx(th,{section:r,period:x,label:D,rows:$.map(w=>({key:w.key,name:w.name,value:w.display})),national:J==="value"?Gf(r,x,$.map(w=>w.value)):null,signed:J!=="value",highlightKey:fe})}),de.length>0?c.jsx(ql,{title:d("dashboard.findings"),children:c.jsx("ul",{className:"flex list-disc flex-col gap-1 pl-5 text-sm",children:de.map((w,L)=>c.jsx("li",{children:w},L))})}):null,c.jsx(ql,{title:d("dashboard.data"),children:c.jsx(u1,{section:r,rows:$,mode:J,lang:s,highlightKey:fe})}),c.jsxs("footer",{className:"flex flex-col gap-3 border-t pt-3.5",children:[r.source_name!=null&&r.source_name!==""?c.jsx("p",{className:"text-xs text-muted-foreground",children:d("dashboard.source",{name:r.source_name})}):null,c.jsx("div",{className:"-ml-2 empty:hidden",children:c.jsx(ah,{messageId:n.id,block:T})}),c.jsx(ch,{messageId:n.id,block:T})]})]})]})},ql=({title:r,children:n,card:o=!1})=>c.jsxs("section",{className:"flex flex-col gap-2",children:[c.jsx("h3",{className:"m-0 text-sm font-semibold",children:r}),o?c.jsx("div",{className:"rounded-xl bg-[hsl(var(--chart-card))] px-4 py-3.5",children:n}):n]}),h1=({threadId:r,children:n})=>{const[o,s]=b.useState(un),[d,p]=b.useState(r);d!==r&&(p(r),d!==void 0&&s(un));const f=b.useRef(new Set),h=b.useCallback((E,M)=>{s(zl(E,M??null))},[]),m=b.useCallback(E=>{s(M=>M.messageId===E?un:zl(E))},[]),v=b.useCallback(E=>{f.current.has(E)||(f.current.add(E),s(zl(E)))},[]),x=b.useCallback(()=>{s(un)},[]),C=b.useCallback(E=>{s(M=>({...M,sectionId:E}))},[]),k=b.useCallback(E=>{s(M=>({...M,fullscreen:E}))},[]),j=b.useCallback(E=>{s(M=>({...M,view:E}))},[]),_=b.useMemo(()=>({state:o,open:h,toggle:m,autoOpen:v,close:x,setSection:C,setFullscreen:k,setView:j}),[o,h,m,v,x,C,k,j]);return c.jsx(If.Provider,{value:_,children:n})},hh="aid_intro_ack",g1=()=>{try{return window.localStorage.getItem(hh)!==null}catch{return!1}},m1=({active:r=!0})=>{const{state:n,lang:o,t:s}=G(),d=rn(n.config?.intro_notice??void 0,o).trim(),[p,f]=b.useState(g1),h=r&&d!==""&&!p,m=b.useId(),v=d.split(`
|
|
17
|
+
`).filter(k=>k.trim()!==""),x=b.useRef(null);Mr(x,!h),Fo(x,h,()=>{const k=x.current?.getRootNode();return k instanceof ShadowRoot||k instanceof Document?k.querySelector('[part="input"]'):null});const C=b.useCallback(()=>{f(!0);try{window.localStorage.setItem(hh,"1")}catch{}},[]);return b.useEffect(()=>{if(!h)return;const k=j=>{j.key==="Escape"&&(j.preventDefault(),C())};return window.addEventListener("keydown",k,!0),()=>{window.removeEventListener("keydown",k,!0)}},[h,C]),d===""?null:c.jsxs("div",{ref:x,className:W("absolute inset-0 z-50 flex items-center justify-center p-4 transition-opacity duration-150 motion-reduce:transition-none",h?"opacity-100":"pointer-events-none opacity-0"),"aria-hidden":!h,children:[c.jsx("div",{"aria-hidden":"true",className:"absolute inset-0 bg-scrim"}),c.jsxs("div",{part:"intro",role:"dialog","aria-modal":"true","aria-labelledby":m,className:W("relative flex max-h-full w-[min(400px,100%)] flex-col overflow-hidden rounded-aid-field border bg-background shadow-panel transition-transform duration-200 motion-reduce:transition-none",h?"translate-y-0":"translate-y-2"),children:[c.jsx("h2",{id:m,className:"m-0 py-3.5 pl-[18px] pr-3 pb-2.5 text-lg font-semibold",children:s("intro.title")}),c.jsx("div",{className:"flex min-h-0 flex-col gap-2.5 overflow-y-auto px-[18px] pt-1",children:v.map((k,j)=>c.jsx("p",{className:"text-[13px] leading-[1.55]",children:k},`${j}-${k}`))}),c.jsx("footer",{className:"flex shrink-0 justify-end px-[18px] pb-[18px] pt-3.5",children:c.jsx(ge,{"data-autofocus":!0,size:"md",onClick:C,children:s("intro.continue")})})]})]})},gn=r=>r?!r.available||r.status==="down"||r.status==="overloaded"?"unavailable":r.status==="idle"?"idle":r.status==="busy"||r.status==="degraded"?"busy":"unknown":"unknown",b1={idle:"text-mode-idle",busy:"text-mode-busy",unavailable:"text-mode-down",unknown:"text-muted-foreground"},x1={idle:"health.idle",busy:"health.busy",unavailable:"health.unavailable"},gh=r=>x1[r],v1={bot:Sx,"book-open":Oo,database:Ox,"file-text":Bx,globe:Hx,lock:of,"message-circle":ev,"message-square":cf,search:sn,sparkles:hf},Vl=({name:r,className:n})=>{const o=v1[r]??hf;return c.jsx(o,{className:W("size-4 shrink-0",n),"aria-hidden":"true"})},Bl=({level:r,lang:n})=>r==="unknown"?null:c.jsxs("span",{part:"mode-health","data-level":r,className:W("inline-flex shrink-0 items-center gap-1.5 text-2xs font-semibold",b1[r]),children:[c.jsx("span",{"aria-hidden":"true",className:"size-2 shrink-0 rounded-full bg-current"}),wt(n,gh(r))]}),mh="inline-flex h-8 min-w-0 max-w-[min(360px,100%)] items-center gap-[7px] rounded-full border bg-background pl-2.5 pr-2 text-[13px] font-medium text-foreground",bh=(r,n)=>rn(r.title,n)||r.slug,xh=({modes:r,health:n,value:o,onChange:s,lang:d,label:p,variant:f="field",placement:h="top"})=>{const m=f==="pill",[v,x]=b.useState(!1),C=Math.max(0,r.findIndex(ee=>ee.slug===o)),[k,j]=b.useState(C),_=b.useId(),E=b.useRef(null),M=b.useRef(null),F=r[C],Z=gn(F?n[F.slug]:void 0),oe=b.useRef(null);b.useEffect(()=>{v&&M.current?.focus()},[v]),b.useEffect(()=>{if(!v)return;const ee=B=>{B.key==="Escape"&&(B.preventDefault(),B.stopPropagation(),x(!1),E.current?.focus())},de=B=>{oe.current&&!B.composedPath().includes(oe.current)&&x(!1)};return window.addEventListener("keydown",ee,!0),window.addEventListener("pointerdown",de,!0),()=>{window.removeEventListener("keydown",ee,!0),window.removeEventListener("pointerdown",de,!0)}},[v]);const J=ee=>{x(!1),ee&&E.current?.focus()},re=()=>{j(C),x(!0)},$=ee=>{const de=r[ee];de&&s(de.slug),J(!0)},X=ee=>{switch(ee.key){case"ArrowDown":ee.preventDefault(),j(de=>Math.min(r.length-1,de+1));break;case"ArrowUp":ee.preventDefault(),j(de=>Math.max(0,de-1));break;case"Home":ee.preventDefault(),j(0);break;case"End":ee.preventDefault(),j(r.length-1);break;case"Enter":case" ":ee.preventDefault(),$(k);break;case"Tab":J(!1);break}},K=F?bh(F,d):"",fe=Z==="unknown"?"":wt(d,gh(Z));return c.jsxs("div",{ref:oe,className:W(m?"min-w-0":"flex flex-col gap-1.5"),onBlur:ee=>{v&&ee.relatedTarget instanceof Node&&!ee.currentTarget.contains(ee.relatedTarget)&&x(!1)},children:[c.jsxs("button",{ref:E,part:m?"mode-select":void 0,type:"button","aria-haspopup":"listbox","aria-expanded":v,"aria-controls":v?`${_}-list`:void 0,"aria-label":`${p}: ${K}${m&&fe?`, ${fe}`:""}`,onClick:()=>{v?J(!1):re()},onKeyDown:ee=>{ee.key==="ArrowDown"&&!v&&(ee.preventDefault(),re())},className:W(m?W(mh,"transition-colors hover:bg-muted motion-reduce:transition-none"):"inline-flex h-8 w-full items-center justify-between gap-2 rounded-md border bg-background pl-2.5 pr-2 text-xs","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",v&&"border-primary shadow-[0_0_0_3px_var(--aid-c-secondary)]"),children:[m&&F?c.jsx(Vl,{name:F.icon}):null,c.jsx("span",{className:W("truncate",m&&"min-w-0"),children:K}),m?c.jsx(Bl,{level:Z,lang:d}):null,c.jsx(on,{className:W("size-3.5 shrink-0 text-muted-foreground transition-transform motion-reduce:transition-none",(m?h==="top"!==v:v)&&"rotate-180"),"aria-hidden":"true"})]}),v?c.jsxs("ul",{ref:M,id:`${_}-list`,part:m?"mode-list":void 0,role:"listbox",tabIndex:-1,"aria-label":p,"aria-activedescendant":`${_}-${k}`,onKeyDown:X,className:W("flex max-h-56 flex-col overflow-y-auto rounded-md border bg-background p-1 shadow-pop focus-visible:outline-none",m&&W("absolute left-0 z-20 w-[340px] max-w-full duration-150 animate-in fade-in motion-reduce:animate-none",h==="top"?"bottom-[calc(100%+6px)]":"top-[calc(100%+6px)]")),children:[m?c.jsx("li",{role:"presentation",className:"px-2.5 pb-1 pt-1.5 text-2xs text-muted-foreground",children:p}):null,r.map((ee,de)=>{const B=gn(n[ee.slug]),Q=rn(ee.description,d);return c.jsxs("li",{id:`${_}-${de}`,part:m?"mode-option":void 0,role:"option","aria-selected":de===C,onMouseDown:me=>{me.preventDefault()},onMouseEnter:()=>{j(de)},onClick:()=>{$(de)},className:W("flex cursor-pointer items-start gap-2.5 rounded-lg px-2.5 py-2",de===k&&"bg-accent",de===C&&"bg-secondary"),children:[c.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-lg bg-muted",children:c.jsx(Vl,{name:ee.icon})}),c.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[c.jsx("span",{className:"truncate text-sm font-medium leading-[1.35]",children:bh(ee,d)}),Q?c.jsx("span",{className:"line-clamp-2 text-2xs leading-[1.35] text-muted-foreground",children:Q}):null,c.jsx(Bl,{level:B,lang:d})]}),c.jsx(_r,{className:W("mt-1 size-4 shrink-0 text-primary",de!==C&&"invisible"),"aria-hidden":"true"})]},ee.slug)})]}):null]})},vh=(r,n)=>r===(n>=0?n:0)?0:-1,y1={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1,Home:"start",End:"end"},yh=(r,n=!1)=>{const o=y1[r.key];if(o===void 0)return;const s=Array.from(r.currentTarget.querySelectorAll('[role="radio"]:not(:disabled)')),d=r.currentTarget.getRootNode(),p=s.findIndex(h=>h===d.activeElement);if(s.length===0)return;r.preventDefault();const f=o==="start"?0:o==="end"?s.length-1:(Math.max(p,0)+o+s.length)%s.length;s[f]?.focus(),n&&s[f]?.click()},w1=({label:r,className:n,children:o})=>c.jsx("div",{role:"radiogroup","aria-label":r,className:n,onKeyDown:s=>{yh(s,!0)},children:o}),k1=()=>typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.userAgent),j1=["search","newChat","sidebar","close"],N1=r=>{const n=r?"\u2318":"Ctrl",o=r?"\u21E7":"Shift",s=d=>r?[o,n,d]:[n,o,d];return{search:[n,"K"],newChat:s("O"),sidebar:s("S"),close:["Esc"]}},C1={kk:"\u049A\u0430\u0437\u0430\u049B\u0448\u0430",ru:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439",en:"English"},Vo=({title:r,hint:n,children:o})=>c.jsxs("section",{className:"flex flex-col gap-2",children:[c.jsx("h3",{className:"text-xs font-semibold text-muted-foreground",children:r}),o,n?c.jsx("p",{className:"text-xs text-muted-foreground",children:n}):null]}),wh=({value:r,options:n,onChange:o,label:s})=>{const d=n.findIndex(p=>p.value===r);return c.jsx(w1,{label:s,className:"grid grid-cols-3 gap-2",children:n.map((p,f)=>{const h=p.value===r;return c.jsxs("button",{type:"button",role:"radio","aria-checked":h,tabIndex:vh(f,d),lang:p.lang,onClick:()=>{o(p.value)},className:W("flex min-w-0 items-center gap-2.5 rounded-md border px-3 py-2.5 text-left text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",h?"border-primary bg-secondary":"bg-background hover:border-primary/50"),children:[c.jsx("span",{"aria-hidden":"true",className:W("relative size-4 shrink-0 rounded-full border-[1.5px] bg-background",h?"border-primary":"border-muted-foreground"),children:h?c.jsx("span",{className:"absolute inset-[3px] rounded-full bg-primary"}):null}),c.jsx("span",{className:"truncate",children:p.label})]},p.value)})})},S1=({children:r})=>c.jsx("kbd",{className:"inline-flex h-5 min-w-5 items-center justify-center rounded border bg-background px-[5px] font-sans text-[11px] font-medium leading-none text-muted-foreground",children:r}),E1=({open:r,onClose:n})=>{const{state:o,lang:s,t:d,selectMode:p}=G(),f=sl(),h=b.useRef(null);Mr(h,!r),Fo(h,r),b.useEffect(()=>{if(!r)return;const k=j=>{j.key==="Escape"&&(h.current?.querySelector('[aria-haspopup="listbox"][aria-expanded="true"]')||(j.preventDefault(),n()))};return window.addEventListener("keydown",k,!0),()=>{window.removeEventListener("keydown",k,!0)}},[r,n]);const m=o.config?.modes??[],v=[{value:"light",label:d("settings.themeLight")},{value:"dark",label:d("settings.themeDark")},{value:"auto",label:d("settings.themeAuto")}],x=N1(k1()),C={search:d("shortcut.search"),newChat:d("shortcut.newChat"),sidebar:d("shortcut.sidebar"),close:d("shortcut.close")};return c.jsxs("div",{ref:h,className:W("absolute inset-0 z-40 flex items-start justify-center p-6 transition-opacity duration-150 motion-reduce:transition-none",r?"opacity-100":"pointer-events-none opacity-0"),"aria-hidden":!r,children:[c.jsx("button",{type:"button",tabIndex:-1,"aria-hidden":"true",className:"absolute inset-0 bg-scrim",onClick:n}),c.jsxs("div",{part:"settings",role:"dialog","aria-modal":"true","aria-label":d("settings"),className:W("relative flex max-h-full w-full max-w-[520px] flex-col overflow-hidden rounded-aid-field border bg-background shadow-panel transition-transform duration-200 motion-reduce:transition-none",r?"translate-y-0":"translate-y-2"),children:[c.jsxs("header",{className:"flex shrink-0 items-center justify-between pb-2.5 pl-[18px] pr-3 pt-3.5",children:[c.jsx("h2",{className:"text-lg font-semibold",children:d("settings")}),c.jsx(ge,{"data-autofocus":!0,variant:"ghost",size:"icon","aria-label":d("close"),onClick:n,children:c.jsx(ln,{"aria-hidden":"true"})})]}),c.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-[18px] pb-[18px] pt-1",children:[c.jsx(Vo,{title:d("settings.language"),children:c.jsx(wh,{label:d("settings.language"),value:s,options:nl.map(k=>({value:k,label:C1[k],lang:k})),onChange:k=>{f.update({lang:k})}})}),c.jsx(Vo,{title:d("settings.theme"),children:c.jsx(wh,{label:d("settings.theme"),value:f.scheme,options:v,onChange:k=>{f.update({scheme:k})}})}),m.length>0?c.jsx(Vo,{title:d("settings.model"),hint:d("settings.modelHint"),children:c.jsx(xh,{modes:m,health:o.health,value:o.mode,onChange:p,lang:s,label:d("settings.model")})}):null,c.jsx(Vo,{title:d("settings.shortcuts"),children:c.jsx("div",{className:"flex flex-col",children:j1.map(k=>c.jsxs("div",{className:"flex items-center justify-between py-1 text-xs",children:[c.jsx("span",{children:C[k]}),c.jsx("span",{className:"flex gap-[3px]",children:x[k].map(j=>c.jsx(S1,{children:j},j))})]},k))})})]})]})]})},_1={muted:"rounded-[10px] border bg-muted px-3 py-2",blocked:"rounded-[10px] border border-processing/25 bg-processing-background px-3 py-2",overloaded:"rounded-[10px] border border-warning/40 bg-warning-background px-3 py-2",hint:"px-1 pb-2 text-warn-text"},Bo=({tone:r,icon:n,children:o,role:s="status",part:d,state:p})=>c.jsxs("div",{part:d,role:s,"data-tone":r,"data-state":p,className:W("mb-2 flex items-center gap-2.5 text-xs leading-snug",_1[r]),children:[c.jsx("span",{className:"flex shrink-0",children:n}),c.jsx("span",{className:"min-w-0 flex-1",children:o})]}),kh=({children:r,onDismiss:n,dismissLabel:o,part:s})=>c.jsxs("div",{part:s,role:"alert",className:"mb-2 flex items-center gap-2.5 rounded-[10px] border border-error/30 bg-error-background py-2 pl-3 pr-2 text-xs leading-snug text-[hsl(var(--foreground))]",children:[c.jsx(zr,{className:"shrink-0 text-destructive","aria-hidden":"true"}),c.jsx("span",{className:"min-w-0 flex-1",children:r}),c.jsx(ge,{variant:"ghost",size:"xs",onClick:n,children:o})]}),z1=r=>new Intl.DateTimeFormat(r,{hour:"2-digit",minute:"2-digit"}),R1=()=>{const{state:r,lang:n,t:o}=G(),{remaining:s,daily:d,blocked:p,resetAt:f,overloaded:h}=r.limit;if(h&&r.config)return c.jsx(Bo,{tone:"overloaded",part:"limit-banner",state:"overloaded",icon:c.jsx(yl,{"aria-hidden":"true"}),children:o("overloaded")});if(p){const m=f?new Date(f):null,v=m&&!Number.isNaN(m.getTime())?o("limit.until",{time:z1(n).format(m)}):o("limit.exhausted");return c.jsx(Bo,{tone:"blocked",part:"limit-banner",state:"blocked",icon:c.jsx(bl,{"aria-hidden":"true"}),children:v})}return s===null||d===null||s>3?null:c.jsx(Bo,{tone:"muted",part:"limit-banner",state:"low",icon:c.jsx(nf,{"aria-hidden":"true"}),children:o("limit.remaining",{count:s,limit:d})})},M1=()=>{const{state:r,lang:n,t:o,dismissNotice:s}=G(),{notice:d}=r;if(!d)return null;const p=d.kind==="error"?fl(n,d.reason):o(d.key);return c.jsx(kh,{part:"notice",onDismiss:s,dismissLabel:o("dismiss"),children:p})},Wl=({value:r,onChange:n,onSubmit:o,maxHeight:s=sy,className:d,onKeyDown:p,...f})=>{const h=b.useRef(null),m=b.useCallback(()=>{const x=h.current;x&&(x.style.height="auto",x.style.height=`${Math.min(x.scrollHeight,s)}px`,x.style.overflowY=x.scrollHeight>s?"auto":"hidden")},[s]);b.useLayoutEffect(m,[r,m]),b.useEffect(()=>{const x=h.current;if(!x||typeof ResizeObserver>"u")return;let C=x.clientWidth;const k=new ResizeObserver(()=>{x.clientWidth!==C&&(C=x.clientWidth,m())});return k.observe(x),()=>{k.disconnect()}},[m]);const v=x=>{p?.(x),!(x.defaultPrevented||!o)&&x.key==="Enter"&&!x.shiftKey&&!x.nativeEvent.isComposing&&(x.preventDefault(),o())};return c.jsx("textarea",{ref:h,rows:1,value:r,onChange:x=>{n(x.target.value)},onKeyDown:v,className:W("block w-full resize-none bg-transparent text-foreground outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-60",d),...f})},P1=({file:r,onRemove:n})=>{const{lang:o,t:s}=G();return c.jsxs("div",{part:"composer-file",className:"flex w-fit max-w-full items-center gap-2.5 self-start rounded-xl border bg-muted p-1.5",children:[c.jsx(Al,{ext:Il(r.name)}),c.jsxs("span",{className:"flex min-w-0 flex-col",children:[c.jsx("span",{className:"max-w-[420px] truncate text-[13px] font-medium leading-tight max-sm:max-w-[190px]",title:r.name,children:r.name}),c.jsx("span",{className:"text-2xs leading-tight text-muted-foreground",children:Ol(r.size,o)})]}),c.jsx(ge,{variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":s("removeFile"),onClick:n,children:c.jsx(ln,{"aria-hidden":"true"})})]})},L1=({children:r,text:n,id:o})=>c.jsxs("span",{className:"group/attach inline-flex",children:[r,c.jsx("span",{id:o,role:"tooltip",className:"pointer-events-none absolute bottom-[3.2rem] left-4 z-10 hidden w-max max-w-[calc(100%-2rem)] rounded-md bg-foreground px-2 py-1 text-2xs font-medium leading-snug text-background shadow-pop group-focus-within/attach:block group-hover/attach:block",children:n})]}),D1=({message:r,onDismiss:n})=>{const{t:o}=G();return r===null?null:c.jsx(kh,{part:"notice",dismissLabel:o("dismiss"),onDismiss:n,children:r})},T1=.9,I1=(r,n)=>r>n?"over":r===n?"limit":r>=n*T1?"near":"hidden",jh=({count:r,max:n,id:o,part:s,className:d})=>{const{t:p}=G(),f=I1(r,n);return c.jsxs(c.Fragment,{children:[c.jsx("span",{id:o,part:s,className:W("shrink-0 whitespace-nowrap px-1 text-2xs tabular-nums text-muted-foreground",f==="hidden"&&"hidden",f==="limit"&&"font-semibold text-warn-text",f==="over"&&"font-semibold text-destructive",d),children:p("counter",{count:r,max:n})}),c.jsx("span",{"aria-live":"polite",className:"sr-only",children:f==="limit"?p("counterLimit"):f==="over"?p("counterOver"):""})]})},A1=()=>{const{state:r,t:n}=G(),{config:o}=r;if(!o)return null;const s=o.modes.find(p=>p.slug===r.mode),d=o.modes.length===0?n("modes.none"):s&&gn(r.health[s.slug])==="unavailable"?n("modeUnavailable"):null;return d===null?null:c.jsx(Bo,{tone:"hint",part:"composer-hint",icon:c.jsx(yl,{"aria-hidden":"true"}),children:d})},O1=500,$1=(r=!0)=>{const n=G().t("placeholder"),o=El("(prefers-reduced-motion: reduce)"),s=r&&!o,[d,p]=b.useState(0);return b.useEffect(()=>{if(!s)return;const f=window.setInterval(()=>{p(h=>h+1)},O1);return()=>{window.clearInterval(f)}},[s]),n+".".repeat(s?d%3+1:3)},F1=({placement:r="top"})=>{const{state:n,lang:o,t:s,selectMode:d}=G(),p=n.config?.modes??[],f=p.find(h=>h.slug===n.mode);if(!f)return null;if(p.length<2){const h=gn(n.health[f.slug]),m=rn(f.title,o)||f.slug,v=h==="unknown"?"":s(`health.${h}`),x=`${s("modeLabel")}: ${m}${v?`, ${v}`:""}`;return c.jsxs("div",{part:"mode-select",role:"group","aria-label":x,className:mh,children:[c.jsx(Vl,{name:f.icon}),c.jsx("span",{className:"min-w-0 truncate",children:m}),c.jsx(Bl,{level:h,lang:o})]})}return c.jsx(xh,{variant:"pill",placement:r,modes:p,health:n.health,value:n.mode,onChange:d,lang:o,label:s("modeLabel")})},Nh="{name}",U1=(r,n)=>{const[o="",s=""]=r.split(Nh);return c.jsxs(c.Fragment,{children:[o,n,s]})},Ch=b.forwardRef(({onDraftChange:r},n)=>{const{state:o,lang:s,path:d,t:p,send:f,stop:h}=G(),[m,v]=b.useState(""),x=$1(m===""),C=b.useRef(null),k=b.useId(),j=b.useRef(!1),_=b.useId();b.useImperativeHandle(n,()=>({setText:V=>{v(V),setTimeout(()=>C.current?.querySelector("textarea")?.focus(),0)}}));const E=m.trim()!=="";b.useEffect(()=>{r?.(E)},[E,r]);const[M,F]=b.useState(null),[Z,oe]=b.useState(null),J=b.useRef(null),{config:re,turn:$,limit:X}=o,K=re?.modes.find(V=>V.slug===o.mode),fe=re?.max_query_chars??Pp,ee=K?gn(o.health[K.slug])==="unavailable":!1,de=!!(re?.site.allow_files&&K?.allow_files),B=$!==null,Q=$?.stopping===!0,me=!re||X.blocked||o.loadingThread!==null,Se=m.trim(),ve=m.length>fe,ye=!me&&!B&&!ee&&!!K&&Se.length>0&&!ve;b.useEffect(()=>{if(B)return;const V=C.current?.getRootNode(),ue=V instanceof ShadowRoot||V instanceof Document?V.activeElement:null,pe=ue===null||ue===document.body;(j.current||pe)&&C.current?.querySelector("textarea")?.focus({preventScroll:!0}),j.current=!1},[B]);const U=()=>{if(!ye||!K)return;const V=Se,ue=M,pe=jy(d,V,new Date);v(""),F(null),f({query:V,mode:K.slug,...ue?{file:ue}:{},...pe?{clarification:pe}:{}}).then(Ne=>{Ne==="rejected"&&(v(ke=>ke||V),F(ke=>ke??ue))})},D=V=>{if(oe(null),!(!V||!K)){if(!Cf.split(",").includes(`.${Il(V.name)}`)){oe(p("fileType",{name:V.name}));return}if(V.size>K.max_file_mb*1024*1024){oe(p("fileTooLarge",{name:V.name,size:K.max_file_mb}));return}F(V)}},T=re?.answer_source,w=T?.[s]??T?.ru??Object.values(T??{})[0],L=ua(w?.url),H=L?c.jsxs("a",{href:L,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-primary-text hover:underline",children:[w?.name,c.jsx(vl,{className:"size-3","aria-hidden":"true"})]}):w?.name;return c.jsxs("div",{part:"composer",className:"flex w-full shrink-0 flex-col",children:[c.jsx(A1,{}),c.jsx(D1,{message:Z,onDismiss:()=>{oe(null)}}),c.jsxs("div",{ref:C,className:W("relative flex flex-col gap-2.5 rounded-aid-field border border-input bg-background py-3 pl-4 pr-2.5 shadow-sm transition-colors motion-reduce:transition-none","focus-within:border-primary focus-within:ring-[3px] focus-within:ring-secondary",ve&&"border-destructive focus-within:border-destructive",me&&"bg-muted"),children:[M?c.jsx(P1,{file:M,onRemove:()=>{F(null)}}):null,c.jsx(Wl,{part:"input","data-autofocus":!0,value:m,onChange:v,onSubmit:U,disabled:me,placeholder:x,"aria-label":p("inputLabel"),"aria-invalid":ve||void 0,"aria-describedby":k,className:"block min-h-6 w-full pr-1.5 text-lg leading-6 disabled:text-muted-foreground disabled:opacity-100"}),c.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[c.jsx(F1,{placement:"top"}),de?c.jsxs(c.Fragment,{children:[c.jsx(L1,{id:_,text:M?p("attachOne"):p("attachHint",{size:K?.max_file_mb??0}),children:c.jsx(ge,{part:"attach",variant:"ghost",size:"icon",className:"size-8 rounded-full text-muted-foreground","aria-label":p(M?"attachOne":"attach"),"aria-describedby":_,disabled:me||B||M!==null,onClick:()=>J.current?.click(),children:c.jsx(cv,{"aria-hidden":"true"})})}),c.jsx("input",{ref:J,type:"file",hidden:!0,accept:Cf,onChange:V=>{D(V.target.files?.[0]),V.target.value=""}})]}):null,c.jsx("span",{className:"flex-1"}),c.jsx(jh,{id:k,part:"counter",count:m.length,max:fe}),B?c.jsx(ge,{part:"stop",size:"icon",className:"size-9 rounded-full aria-disabled:pointer-events-none aria-disabled:opacity-50","aria-label":p(Q?"agent.stopping":"stop"),title:p(Q?"agent.stopping":"stop"),"aria-disabled":Q||void 0,onFocus:()=>{j.current=!0},onBlur:V=>{V.relatedTarget&&(j.current=!1)},onClick:()=>{Q||h()},children:c.jsx(gf,{className:"size-3.5 fill-current","aria-hidden":"true"})}):c.jsx(ge,{part:"send",size:"icon",className:"size-9 rounded-full","aria-label":p("send"),title:p("send"),disabled:!ye,onClick:U,children:c.jsx(ef,{"aria-hidden":"true"})})]})]}),c.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-x-3.5 gap-y-1 pt-2 text-center text-2xs leading-snug text-muted-foreground",children:[c.jsx("p",{part:"disclaimer",className:"text-2xs",children:p("disclaimer")}),w?.name?c.jsx("p",{part:"source",className:"text-2xs",children:U1(p("source",{name:Nh}),H)}):null]})]})});Ch.displayName="Composer";const q1=({composerRef:r,onDraftChange:n})=>{const{state:o}=G();return c.jsxs("div",{className:"mx-auto w-full max-w-[844px] shrink-0 px-3 pb-2.5",children:[c.jsx(R1,{}),c.jsx(M1,{}),o.config&&!o.configError?c.jsx(Ch,{ref:r,onDraftChange:n}):null]})},Sh=(r,n)=>r?.[n]??r?.ru??Object.values(r??{})[0],V1=({onPick:r})=>{const{state:n,lang:o,t:s}=G();b.useId();const[d,p]=b.useState(null),f=Sh(n.config?.prompt_examples,o)??[];return(Sh(n.config?.prompt_categories,o)??[]).filter(h=>f.some(m=>m.category===h.key)),null},B1=({wide:r,onPick:n})=>{const{state:o,lang:s,t:d}=G(),p=rn(o.config?.site.welcome,s),f=p?p.split(`
|
|
18
|
+
`).filter(h=>h.trim()!==""):[];return c.jsxs("div",{part:"empty",className:W("mx-auto flex w-full max-w-[640px] flex-col gap-5 px-4 pb-3",r?"pt-14":"pt-7"),children:[c.jsxs("div",{className:"flex flex-col items-center gap-2.5 text-center",children:[c.jsx("div",{part:"avatar",children:c.jsx(Kp,{size:56})}),f.length>0?c.jsx("div",{part:"welcome",className:"flex max-w-[340px] flex-col gap-1 text-[15px] leading-normal",children:f.map((h,m)=>c.jsx("p",{className:W(m===0&&"text-xl font-semibold"),children:h},`${m}-${h}`))}):c.jsx("h2",{className:"m-0 text-2xl font-semibold tracking-tight",children:d("greeting")})]}),c.jsx(V1,{onPick:n})]})},Eh=()=>{const{t:r}=G();return n=>{const o=`steps.${n.node}`;return r(ol(o)?o:"steps.unknown")}},_h=r=>{const n=r?.trim();return n===""?void 0:n},Hl=r=>_h(r.detail),W1=r=>_h(r.result),H1={router:"router",understand:"router",responder:"responder",answer:"responder",search_law:"law",data:"data",run_query:"data",executor:"executor",run_sql:"executor",lookup_taxpayer:"taxpayer",find_taxpayer:"findCompany",think:"think"},X1=6e3,K1=4e3,Q1=2500,zh=r=>`${r.id??r.node}#${r.attempt}`,Rh=(r,n)=>{const o=[];for(let s=1;n(`waiting.${r}.${s}`);s+=1)o.push(`waiting.${r}.${s}`);return o},Y1=(r,n)=>{const{t:o}=G(),s=r==null?"":zh(r),[d,p]=b.useState({key:"",tick:-1});b.useEffect(()=>{if(!n||s==="")return;let x;const C=setTimeout(()=>{p({key:s,tick:0}),x=setInterval(()=>{p(k=>({key:s,tick:k.key===s?k.tick+1:0}))},K1)},X1);return()=>{clearTimeout(C),x!==void 0&&clearInterval(x)}},[s,n]);const f=n&&d.key===s?d.tick:-1;if(f<0||r==null)return null;const h=Rh(H1[r.node]??"unknown",ol),m=h.length>0?h:Rh("unknown",ol),v=m[f%m.length];return v?o(v):null},Z1=(r,n)=>{const o=r.map(zh).join("|"),s=n&&r.length>1,[d,p]=b.useState({key:"",index:0});b.useEffect(()=>{if(!s)return;const h=setInterval(()=>{p(m=>({key:o,index:m.key===o?m.index+1:1}))},Q1);return()=>{clearInterval(h)}},[o,s]);const f=s&&d.key===o?d.index%r.length:0;return r[f]},Xl=({step:r,position:n})=>{const{t:o}=G(),s=Eh();return c.jsxs(c.Fragment,{children:[s(r),Hl(r)!=null?c.jsxs("span",{className:"text-muted-foreground/70",children:[" \xB7 ",Hl(r)]}):null,n!=null&&r.total!=null?c.jsxs("span",{className:"text-muted-foreground/70",children:[" \xB7 ",o("steps.counter",{done:n,total:r.total})]}):null,r.attempt>1?c.jsxs("span",{className:"text-muted-foreground/70",children:[" \xB7 ",o("agent.attempt",{count:r.attempt})]}):null]})},Mh=()=>c.jsx(Rr,{className:"size-3 shrink-0 animate-spin text-primary motion-reduce:animate-none","aria-hidden":"true","data-testid":"step-spinner"}),J1=({steps:r,status:n,stopping:o})=>{const{t:s}=G(),d=r.filter(m=>m.status==="running"),p=n==="streaming"&&!o,f=Z1(d,p),h=Y1(f,p&&d.length===1&&f!=null&&Hl(f)==null);return n==="streaming"?c.jsxs(c.Fragment,{children:[c.jsx(Mh,{}),c.jsx("span",{className:"min-w-0 truncate font-medium text-foreground",children:o?s("agent.stopping"):f==null?s("agent.thinking"):h!=null?c.jsxs(c.Fragment,{children:[c.jsx("span",{"aria-hidden":"true",children:h}),c.jsx("span",{className:"sr-only",children:c.jsx(Xl,{step:f,position:r.indexOf(f)+1})})]}):c.jsx(Xl,{step:f,position:r.indexOf(f)+1})})]}):n==="stopped"?c.jsxs(c.Fragment,{children:[c.jsx(gf,{className:"size-3.5 shrink-0","aria-hidden":"true"}),c.jsx("span",{className:"min-w-0 truncate font-medium text-foreground",children:s("agent.stopped")})]}):n==="error"?c.jsxs(c.Fragment,{children:[c.jsx(rf,{className:"size-3.5 shrink-0 text-destructive","aria-hidden":"true"}),c.jsx("span",{className:"min-w-0 truncate font-medium text-foreground",children:s("agent.interrupted")})]}):c.jsxs(c.Fragment,{children:[c.jsx(_r,{className:"size-3.5 shrink-0 text-mode-idle","aria-hidden":"true"}),c.jsx("span",{className:"min-w-0 truncate font-medium text-foreground",children:s("agent.done")})]})},G1=({steps:r,status:n,stopping:o})=>{const{t:s}=G(),d=Eh();if(n==="streaming"){if(o)return s("agent.stopping");const p=r.find(f=>f.status==="running");return p?d(p):s("agent.thinking")}return s(n==="stopped"?"agent.stopped":n==="error"?"agent.interrupted":"agent.done")},Ph="inline-flex min-h-[30px] max-w-full items-center gap-2 self-start rounded-full border bg-background py-1 pl-2 pr-2.5 text-left text-[13px] text-muted-foreground",ew=b.memo(function(r){const{t:n}=G(),[o,s]=b.useState(!1),{steps:d,status:p}=r,f=p==="streaming",h=G1(r),m=c.jsx(c.Fragment,{children:c.jsx(J1,{...r})});return c.jsxs("div",{part:"steps",className:"flex flex-col gap-2 text-[13px] text-muted-foreground",children:[d.length>0?c.jsxs("button",{type:"button","aria-expanded":o,"aria-label":`${n(o?"agent.hideSteps":"agent.showSteps")}: ${h}`,onClick:()=>{s(!o)},className:W(Ph,"hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",f&&"border-primary-35"),children:[m,o?c.jsx(on,{className:"size-3.5 shrink-0 rotate-180","aria-hidden":"true"}):c.jsx(on,{className:"size-3.5 shrink-0","aria-hidden":"true"})]}):c.jsx("div",{className:W(Ph,f&&"border-primary-35"),role:"status",children:m}),o&&d.length>0?c.jsx("ol",{"aria-label":n("agent.steps"),className:"m-0 flex list-none flex-col self-stretch rounded-xl border bg-background px-3.5 py-1.5",children:d.map((v,x)=>{const C=v.status==="running",k=C&&!f,j=W1(v);return c.jsxs("li",{className:"flex min-h-[34px] items-center gap-2.5 border-b border-dashed last:border-b-0",children:[c.jsx("span",{className:"flex w-[18px] shrink-0 justify-center",children:C&&f?c.jsx(Mh,{}):k?c.jsx(rf,{className:"size-3.5","aria-hidden":"true"}):c.jsx(_r,{className:"size-3.5 text-mode-idle","aria-hidden":"true"})}),c.jsxs("span",{className:W("min-w-0 flex-1 break-words py-1",k?"text-muted-foreground":"text-foreground"),children:[c.jsx(Xl,{step:v}),j!=null?c.jsxs("span",{className:"text-muted-foreground/70",children:[" \u2014 ",j]}):null]}),k?c.jsx("span",{className:"shrink-0 whitespace-nowrap",children:n("agent.unfinished")}):null]},v.id??`${v.node}-${x}`)})}):null]})}),tw=(r,n)=>{const o=(r.split(/[?#]/)[0]??"").split("/").filter(Boolean).pop();if(!o||/^[0-9a-f-]{36}$/i.test(o))return n;try{return decodeURIComponent(o)}catch{return o}},rw=r=>{try{return new URL(r,window.location.href).host}catch{return null}},Lh=({url:r,name:n,className:o,children:s})=>{const{api:d}=G(),[p,f]=b.useState(!1);if(Do(r,d.apiUrl)===null){const h=ua(r);return h?c.jsx("a",{href:h,target:"_blank",rel:"noopener noreferrer",className:o,children:s}):c.jsx("span",{className:o,children:s})}return c.jsx("button",{type:"button",part:"attachment",className:W(o,p&&"opacity-70"),disabled:p,onClick:()=>{f(!0),d.attachment(r).then(h=>{cy(h,n)}).catch(()=>{}).finally(()=>{f(!1)})},children:s})},Dh=({attachment:r})=>{const{api:n,lang:o,t:s}=G(),d=zf(r.name||tw(r.url,"file")),p=r.url&&Do(r.url,n.apiUrl)===null?rw(r.url):null,f="inline-flex max-w-full items-center gap-2.5 rounded-xl border bg-muted p-1.5 text-left text-foreground",h=c.jsxs(c.Fragment,{children:[c.jsx(Al,{ext:Il(d)}),c.jsxs("span",{className:"flex min-w-0 flex-col",children:[c.jsx("span",{className:"truncate text-[13px] font-medium leading-tight",children:d}),c.jsxs("span",{className:"flex items-center gap-1.5 text-2xs leading-tight text-muted-foreground",children:[p??(r.size?Ol(r.size,o):null),r.url?null:c.jsxs(c.Fragment,{children:[r.size?c.jsx("span",{"aria-hidden":"true",children:"\xB7"}):null,c.jsx("span",{children:s("attachment.sending")}),c.jsx(Rr,{className:"size-3 animate-spin motion-reduce:animate-none","aria-hidden":"true"})]})]})]}),r.url&&p?c.jsx(vl,{className:"mr-1 size-4 shrink-0 text-muted-foreground","aria-hidden":"true"}):r.url?c.jsx(af,{className:"mr-1 size-4 shrink-0 text-muted-foreground","aria-hidden":"true"}):null]});return r.url?c.jsxs(Lh,{url:r.url,name:d,className:W(f,"transition-colors hover:bg-accent"),children:[p?null:c.jsxs("span",{className:"sr-only",children:[s("download"),": "]}),h]}):c.jsx("span",{className:f,children:h})},aw=({url:r,alt:n})=>{const{api:o}=G(),[s,d]=b.useState(null),[p,f]=b.useState(!1);return b.useEffect(()=>{let h=null,m=!1;return o.attachment(r).then(v=>{m?URL.revokeObjectURL(v):(h=v,d(v))},()=>{m||f(!0)}),()=>{m=!0,h&&URL.revokeObjectURL(h)}},[o,r]),p?c.jsx("span",{className:"text-muted-foreground",children:n||r}):s?c.jsx("img",{src:s,alt:n,className:"max-w-full rounded-lg"}):c.jsx(Rr,{className:"size-4 animate-spin text-muted-foreground","aria-label":n})},nw=8,Kl=({children:r})=>c.jsx("div",{className:"text-2xs text-muted-foreground",children:r}),ow=({block:r,onAsk:n})=>{const{lang:o,t:s}=G(),d=Array.isArray(r.sections)?r.sections:[],p=(Array.isArray(r.indicators)?r.indicators:[]).slice(0,nw),f=Math.max(0,r.total-p.length),h=Array.isArray(r.examples)?r.examples.filter(m=>typeof m=="string"&&m):[];return c.jsxs("section",{part:"catalog",className:"flex min-w-0 flex-col rounded-xl border bg-card",children:[r.topic?c.jsxs("h3",{className:"m-0 flex items-center gap-2 border-b px-3.5 py-2.5 text-sm font-semibold",children:[c.jsx(Oo,{className:"shrink-0 text-muted-foreground","aria-hidden":"true"}),s("blocks.catalogTitle",{topic:r.topic})]}):null,c.jsxs("div",{className:"flex flex-col gap-2.5 px-3.5 py-3",children:[d.length>0?c.jsxs("div",{children:[c.jsx(Kl,{children:s("blocks.catalogSections")}),c.jsx("ul",{className:"m-0 list-none p-0",children:d.map(m=>c.jsxs("li",{className:"flex items-center gap-2 border-b py-[7px] text-[13px] last:border-b-0",children:[c.jsx(ml,{className:"shrink-0 text-muted-foreground","aria-hidden":"true"}),c.jsx("span",{className:"min-w-0 flex-1 leading-snug",children:m.path.join(" \u203A ")}),c.jsx("span",{className:"whitespace-nowrap tabular-nums text-muted-foreground",children:zt(m.count,o)})]},m.id))})]}):null,p.length>0?c.jsxs("div",{children:[c.jsx(Kl,{children:s("blocks.catalogIndicators")}),c.jsx("ul",{className:"m-0 list-none p-0",children:p.map(m=>c.jsxs("li",{className:"flex flex-col border-b py-1.5 last:border-b-0",children:[c.jsx("span",{className:"text-[13px] font-medium leading-snug",children:m.name}),m.unit||m.years?c.jsx("span",{className:"text-2xs text-muted-foreground",children:[_l(m.unit),_l(m.years)].filter(Boolean).join(" \xB7 ")}):null]},m.entity_id))}),f>0?c.jsx("p",{className:"m-0 pt-1 text-[13px] text-muted-foreground",children:s("blocks.catalogMore",{count:zt(f,o)})}):null]}):null,h.length>0?c.jsxs("div",{className:"flex flex-col gap-1.5",children:[c.jsx(Kl,{children:s("blocks.catalogExamples")}),h.map(m=>c.jsxs("button",{type:"button",className:"flex w-full items-center gap-2.5 rounded-[10px] border bg-background px-2.5 py-2 text-left text-[13px] leading-snug transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",onClick:()=>{n(m)},children:[c.jsx(Jx,{className:"shrink-0 text-primary","aria-hidden":"true"}),c.jsx("span",{className:"min-w-0 flex-1",children:m})]},m)),c.jsx("div",{className:"text-2xs text-muted-foreground",children:s("blocks.catalogSendHint")})]}):null]})]})},Wo=({rootRef:r,question:n,tone:o,children:s})=>{const{t:d}=G();return c.jsxs("section",{part:"clarification",ref:r,role:"group","aria-label":d("blocks.clarification"),"data-state":o,className:W("overflow-hidden rounded-[14px] border",o==="open"&&"border-primary-30 bg-card",o==="done"&&"bg-card",o==="expired"&&"bg-muted"),children:[c.jsx("div",{className:"flex items-center gap-2 px-3.5 pb-1 pt-3",children:c.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-secondary px-2 py-0.5 text-2xs font-medium text-secondary-foreground",children:[c.jsx(lf,{className:"size-3","aria-hidden":"true"}),d("blocks.clarification")]})}),c.jsx("p",{className:"m-0 px-3.5 pb-2.5 text-[15px] font-medium leading-snug",children:n}),s]})},Th=({children:r})=>c.jsx("kbd",{className:"inline-flex h-4 min-w-4 items-center justify-center rounded border border-current/40 px-1 font-sans text-2xs leading-none opacity-80",children:r}),Ql=({children:r})=>c.jsx("div",{className:"flex items-center gap-2 border-t px-3.5 py-2.5 text-[13px] text-muted-foreground",children:r}),iw=2**31-1,sw=(r,n)=>{const[o,s]=b.useState(()=>new Date);return b.useEffect(()=>{if(!n)return;const d=Date.parse(r)-Date.now();if(!(d>0))return;const p=window.setTimeout(()=>{s(new Date)},Math.min(d+50,iw));return()=>{window.clearTimeout(p)}},[r,n]),o},lw=({block:r,isLastInBranch:n,question:o,reply:s,disabled:d,onAsk:p})=>{const{t:f}=G(),h=b.useRef(null),m=sw(r.expires_at,n),v=gp(r,{isLastInBranch:n,now:m}),[x,C]=b.useState(""),k=b.useRef(!1),[j,_]=b.useState(!1),E=r.options,M=d||j,F=(Q,me=Q.label)=>{if(k.current||d)return;k.current=!0,_(!0);const Se=p(me,{clarification_id:r.id,slot:r.slot,value:Q.value,free_text:null});Promise.resolve(Se).then(ve=>{ve===!1&&(k.current=!1,_(!1))})},Z=b.useRef(F);b.useEffect(()=>{Z.current=F});const oe=r.type==="plan_confirm",J=E.find(Q=>Q.value===r.default)??E[0],re=E.find(Q=>Q!==J),$=oe?[...J?[{option:J,text:f("blocks.continue")}]:[],...re?[{option:re,text:f("blocks.cancelPlan")}]:[]]:E.slice(0,vy).map(Q=>({option:Q,text:Q.label})),X=b.useRef($);b.useEffect(()=>{X.current=$});const K=v==="open"&&!M,fe=$.length;b.useEffect(()=>{if(!K||fe===0)return;const Q=h.current?.getRootNode();if(!Q)return;const me=Se=>{const ve=Se;if(ve.defaultPrevented||ve.ctrlKey||ve.metaKey||ve.altKey||ve.repeat||Ny(ve.composedPath()[0]))return;const ye=Number(ve.key),U=Number.isInteger(ye)&&ye>=1?X.current[ye-1]:void 0;U&&(ve.preventDefault(),Z.current(U.option,U.text))};return Q.addEventListener("keydown",me),()=>{Q.removeEventListener("keydown",me)}},[K,fe]);const ee=v==="answered"&&o!==""&&s===o;if(v==="answered"&&!ee)return c.jsx(Wo,{rootRef:h,question:r.question,tone:"done",children:s?c.jsxs(Ql,{children:[c.jsx(_r,{className:"shrink-0","aria-hidden":"true"}),c.jsx("span",{className:"min-w-0 flex-1",children:f("blocks.chosen",{label:s})})]}):null});if(v==="expired"||ee)return c.jsx(Wo,{rootRef:h,question:r.question,tone:"expired",children:c.jsxs(Ql,{children:[c.jsx(bl,{className:"shrink-0","aria-hidden":"true"}),c.jsx("span",{className:"min-w-0 flex-1",children:f("blocks.expired")}),o&&!ee?c.jsxs(ge,{variant:"input",size:"sm",className:"gap-1.5",disabled:d,onClick:()=>{p(o)},children:[c.jsx(ff,{"aria-hidden":"true"}),f("blocks.askAgain")]}):null]})});if(oe){const[Q,me]=$;return c.jsx(Wo,{rootRef:h,question:r.question,tone:"open",children:c.jsxs("div",{className:"flex flex-wrap gap-2 px-2.5 pb-2.5",children:[Q?c.jsxs(ge,{size:"sm",disabled:M,onClick:()=>{F(Q.option,Q.text)},children:[c.jsx(Th,{children:"1"}),Q.text]}):null,me?c.jsxs(ge,{variant:"input",size:"sm",disabled:M,onClick:()=>{F(me.option,me.text)},children:[c.jsx(Th,{children:"2"}),me.text]}):null]})})}const de=E.length>=xy,B=de?Eb(E,x):E;return c.jsxs(Wo,{rootRef:h,question:r.question,tone:"open",children:[c.jsxs("div",{className:"flex flex-col gap-1.5 px-2.5 pb-2.5",children:[de?c.jsxs("label",{className:"flex h-8 items-center gap-2 rounded-md border border-input bg-background px-2.5 text-sm focus-within:border-primary focus-within:ring-[3px] focus-within:ring-secondary",children:[c.jsx(sn,{className:"shrink-0 text-muted-foreground","aria-hidden":"true"}),c.jsx("input",{type:"search",value:x,placeholder:f("blocks.findOption"),"aria-label":f("blocks.findOption"),className:"min-w-0 flex-1 bg-transparent outline-none placeholder:text-muted-foreground",onChange:Q=>{C(Q.target.value)}})]}):null,B.length>0?c.jsx("ul",{"aria-label":f("blocks.options"),className:"m-0 flex list-none flex-col gap-1.5 p-0",children:B.map(Q=>{const me=E.indexOf(Q)+1;return c.jsx("li",{children:c.jsxs("button",{type:"button",disabled:M,className:W("flex w-full items-start gap-3 rounded-[10px] border bg-background px-3 py-[9px] text-left transition-colors motion-reduce:transition-none","hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:bg-muted disabled:text-disabled-foreground"),onClick:()=>{F(Q)},children:[c.jsx("span",{className:"mt-px flex h-[22px] min-w-[22px] shrink-0 items-center justify-center rounded-md border text-2xs font-semibold tabular-nums text-muted-foreground",children:me}),c.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[c.jsxs("span",{className:"text-sm font-medium leading-snug",children:[Q.label,Q.value===r.default?c.jsx("span",{className:"ml-1.5 whitespace-nowrap rounded-full bg-muted px-1.5 py-px text-2xs font-normal text-muted-foreground",children:f("blocks.default")}):null]}),Q.hint?c.jsx("span",{className:"text-[13px] leading-snug text-muted-foreground",children:Q.hint}):null]})]})},Q.value)})}):c.jsx("p",{className:"px-1 py-2 text-sm text-muted-foreground",children:f("searchEmpty")})]}),r.allow_free_text?c.jsxs(Ql,{children:[c.jsx(lf,{className:"shrink-0","aria-hidden":"true"}),c.jsx("span",{className:"min-w-0 flex-1",children:f("blocks.freeTextHint")})]}):null]})},cw=10,dw=({section:r})=>{const{t:n}=G(),o=r.latest_period,s=r.shape==="trend",d=s?[]:pn(r,{period:o,mode:"value",base:"median"}),p=d.slice(0,cw);return c.jsxs("div",{part:"dashboard-preview",className:"flex min-w-0 flex-col gap-3 rounded-xl bg-[hsl(var(--chart-card))] px-4 py-3.5",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("p",{className:"text-sm font-semibold leading-snug",children:r.title}),s?null:c.jsxs("p",{className:"text-2xs text-muted-foreground",children:[o,", ",r.unit.label]})]}),c.jsx(th,{compact:!0,section:r,period:o,label:n("chart.label",{title:r.title,period:o}),rows:p,national:Gf(r,o,p.map(f=>f.value))}),d.length>p.length?c.jsx("p",{className:"text-2xs text-muted-foreground",children:n("chart.top",{n:p.length,total:d.length})}):null]})},Ho=r=>r.type==="number"||r.type==="integer",uw=(r,n,o)=>Ho(r)?zt(Cy(n),o,r.type==="integer"?0:void 0):_l(n)||"\u2014",pw={asc:ef,desc:Gp},fw=({block:r})=>{const{lang:n,t:o}=G(),[s,d]=b.useState(),[p,f]=b.useState("asc"),[h,m]=b.useState(1),[v,x]=b.useState(""),C=Array.isArray(r.columns)?r.columns:[],k=Nb({...r,columns:C,data:Array.isArray(r.data)?r.data:[]},{...s?{sortKey:s,dir:p}:{},page:h,query:v}),j=C.some(E=>E.type==="string"),_=E=>{E===s?f(M=>M==="asc"?"desc":"asc"):(d(E),f("asc")),m(1)};return c.jsxs("div",{part:"data-table",className:"flex min-w-0 flex-col gap-2",children:[j?c.jsxs("label",{className:"flex h-8 items-center gap-2 rounded-md border border-input bg-background px-2.5 text-sm focus-within:border-primary focus-within:ring-[3px] focus-within:ring-secondary",children:[c.jsx(sn,{className:"shrink-0 text-muted-foreground","aria-hidden":"true"}),c.jsx("input",{type:"search",value:v,placeholder:o("blocks.tableSearch"),"aria-label":o("blocks.tableSearch"),className:"min-w-0 flex-1 bg-transparent outline-none placeholder:text-muted-foreground",onChange:E=>{x(E.target.value),m(1)}})]}):null,c.jsxs("div",{className:"max-w-full overflow-x-auto overscroll-x-contain rounded-[10px] border bg-background",children:[c.jsxs("table",{className:"w-full border-collapse text-[13.5px]","aria-label":o("blocks.table"),children:[c.jsx("thead",{children:c.jsx("tr",{className:"border-b bg-muted",children:C.map(E=>{const M=E.key===s,F=M?pw[p]:kx;return c.jsx("th",{scope:"col","aria-sort":M?p==="asc"?"ascending":"descending":"none",className:W("p-0 font-semibold",Ho(E)?"text-right":"text-left"),children:c.jsxs("button",{type:"button",className:W("inline-flex w-full items-center gap-1 whitespace-nowrap px-3 py-[7px] text-[13.5px] font-semibold text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",Ho(E)&&"flex-row-reverse"),onClick:()=>{_(E.key)},children:[c.jsx("span",{children:E.title}),E.unit?c.jsxs("span",{className:"font-normal",children:[", ",E.unit]}):null,c.jsx(F,{className:W("shrink-0 text-muted-foreground",!M&&"opacity-50"),"aria-hidden":"true"})]})},E.key)})})}),c.jsx("tbody",{children:k.rows.map((E,M)=>c.jsx("tr",{className:"border-b last:border-b-0",children:C.map(F=>c.jsx("td",{className:W("px-3 py-[7px] align-top",Ho(F)?"whitespace-nowrap text-right tabular-nums":"min-w-32"),children:uw(F,E[F.key],n)},F.key))},k.from+M))})]}),k.total===0?c.jsx("p",{className:"px-3 py-3 text-center text-sm text-muted-foreground",children:o(v?"searchEmpty":"blocks.tableEmpty")}):null]}),k.pages>1?c.jsxs("div",{className:"flex items-center justify-end gap-1 text-2xs tabular-nums text-muted-foreground",children:[c.jsx(ge,{variant:"ghost",size:"icon",className:"size-7",disabled:k.page<=1,"aria-label":o("blocks.prevPage"),onClick:()=>{m(k.page-1)},children:c.jsx(tf,{"aria-hidden":"true"})}),c.jsx("span",{"aria-live":"polite",children:o("blocks.page",{a:k.page,b:k.pages})}),c.jsx(ge,{variant:"ghost",size:"icon",className:"size-7",disabled:k.page>=k.pages,"aria-label":o("blocks.nextPage"),onClick:()=>{m(k.page+1)},children:c.jsx(ml,{"aria-hidden":"true"})})]}):null,r.truncated?c.jsx("p",{className:"text-2xs text-muted-foreground",children:o("blocks.truncated",{n:Array.isArray(r.data)?r.data.length:0})}):null]})},Yl="inline-flex min-h-[30px] max-w-full items-center gap-1.5 rounded-lg bg-muted px-2.5 py-1 text-[13px]",hw=["sex","age","urban_rural","activity","item"],gw=r=>hw.includes(r),Zl=({label:r,children:n,title:o})=>c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"shrink-0 whitespace-nowrap text-muted-foreground",children:r}),c.jsx("span",{className:"min-w-0 truncate font-medium",title:o,children:n})]}),Jl=({label:r,children:n,className:o})=>c.jsx("li",{className:W(Yl,o),title:r,children:c.jsx(Zl,{label:r,children:n})}),mw=({block:r,question:n,onAsk:o})=>{const{t:s}=G(),[d,p]=b.useState(!1),f=b.useId(),h=r.indicators.map(C=>C.name).join(", "),m=r.territories.map(C=>C.name).join(", "),v=r.breakdown&&gw(r.breakdown)?s(`blocks.breakdown.${r.breakdown}`):"",x=r.alternatives.length>0&&n!=="";return c.jsxs("div",{part:"plan",role:"group","aria-label":s("blocks.passport"),className:"flex flex-col gap-1.5",children:[c.jsx("div",{className:"text-2xs text-muted-foreground",children:s("blocks.passport")}),c.jsxs("ul",{"aria-label":s("blocks.passport"),className:"m-0 flex list-none flex-wrap items-center gap-1.5 p-0",children:[h?x?c.jsxs("li",{className:"relative max-w-full",children:[c.jsxs("button",{type:"button",className:W(Yl,"border border-border bg-background transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",d&&"border-primary ring-[3px] ring-secondary"),title:h,"aria-haspopup":"menu","aria-expanded":d,"aria-controls":f,onClick:()=>{p(C=>!C)},children:[c.jsx(Zl,{label:s("blocks.indicator"),children:h}),c.jsx(on,{className:W("shrink-0 text-muted-foreground transition-transform motion-reduce:transition-none",d&&"rotate-180"),"aria-hidden":"true"})]}),d?c.jsxs("div",{id:f,role:"menu","aria-label":s("blocks.alternatives"),className:"absolute left-0 top-full z-20 mt-1 flex min-w-[220px] max-w-[min(360px,80vw)] flex-col rounded-md border bg-background p-1 shadow-pop",children:[c.jsx("div",{className:"px-2.5 pb-1 pt-1.5 text-2xs text-muted-foreground",children:s("blocks.alternatives")}),r.alternatives.map(C=>c.jsx("button",{type:"button",role:"menuitem",className:"flex min-h-9 w-full items-center rounded-md px-2.5 py-1.5 text-left text-sm transition-colors hover:bg-accent focus-visible:bg-accent focus-visible:outline-none motion-reduce:transition-none",onClick:()=>{p(!1),o(`${n} \u2014 ${C.name}`)},children:C.name},C.id))]}):null]}):c.jsx(Jl,{label:s("blocks.indicator"),children:h}):null,m?c.jsx(Jl,{label:s("blocks.territory"),children:m}):null,r.period.label?c.jsxs("li",{className:W(Yl,r.period.substituted&&"border border-warning/40"),title:r.period.reason??s("blocks.period"),children:[c.jsx(Zl,{label:s("blocks.period"),children:r.period.label}),r.period.substituted?c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"\xB7"}),c.jsx("span",{className:"text-warn-text",children:s("blocks.substituted")})]}):null]}):null,v?c.jsx(Jl,{label:s("blocks.breakdown"),children:v}):null]})]})},Ih="gap-1.5 text-[13px]",Ah="gap-1.5 text-[13px] text-muted-foreground hover:text-foreground",bw=({text:r})=>{const{t:n}=G(),[o,s]=b.useState(!1),d=b.useRef(void 0);return b.useEffect(()=>()=>{window.clearTimeout(d.current)},[]),c.jsxs(ge,{part:"copy",variant:"ghost",size:"sm",className:Ah,onClick:()=>{Sl(r).then(p=>{p&&(s(!0),window.clearTimeout(d.current),d.current=window.setTimeout(()=>{s(!1)},2e3))})},children:[o?c.jsx(_r,{"aria-hidden":"true"}):c.jsx(xl,{"aria-hidden":"true"}),n(o?"copied":"copy")]})},xw=({message:r,isLastInBranch:n,onAsk:o,children:s,dashboardOpen:d=!1,onToggleDashboard:p})=>{const{path:f,t:h}=G(),[m,v]=b.useState(!1),{blocks:x}=r,C=fr(x,"plan"),k=fr(x,"table"),j=fr(x,"catalog"),_=fr(x,"clarification"),{question:E,reply:M}=wy(f,r.id),F=r.status==="streaming",Z=C?.methodology?ua(C.methodology.url):null,oe=x.length>0&&!F?Sb(r):"",J=!F&&r.status!=="error"&&Sp(r.id),re=fr(x,"dashboard"),$=re?.sections[0],X=J&&re!==void 0,K=X?p:void 0,fe=Tf(x),ee=F?[]:yy(x);return c.jsxs(c.Fragment,{children:[C?c.jsx(mw,{block:C,question:E,onAsk:o}):null,s,j?c.jsx(ow,{block:j,onAsk:o}):null,_?c.jsx(lw,{block:_,isLastInBranch:n,question:E,reply:M,disabled:F,onAsk:o}):null,$?c.jsx(dw,{section:$}):null,k&&m?c.jsx(fw,{block:k}):null,ee.length>0?c.jsx(lh,{files:ee}):null,J?c.jsx(ch,{messageId:r.id,block:fe}):null,x.length>0&&!F?c.jsxs("div",{part:"answer-actions",role:"group",className:"flex flex-wrap items-center gap-1.5",children:[k?c.jsxs(ge,{part:"data-toggle",variant:"input",size:"sm",className:Ih,"aria-expanded":m,onClick:()=>{v(de=>!de)},children:[c.jsx(jv,{"aria-hidden":"true"}),h(m?"blocks.hideData":"blocks.data")]}):null,K?c.jsxs(ge,{part:"dashboard-toggle","data-message-id":r.id,variant:"input",size:"sm",className:W(Ih,d&&"border-primary bg-secondary text-secondary-foreground"),"aria-expanded":d,onClick:()=>{K(r.id)},children:[c.jsx(_x,{"aria-hidden":"true"}),h(d?"blocks.hideDashboard":"blocks.dashboard")]}):null,X?c.jsx(ah,{messageId:r.id,block:fe}):null,C?.methodology&&Z?c.jsx(ge,{part:"methodology",variant:"ghost",size:"sm",className:Ah,asChild:!0,children:c.jsxs("a",{href:Z,target:"_blank",rel:"noopener noreferrer",title:C.methodology.title,children:[c.jsx(Oo,{"aria-hidden":"true"}),h("blocks.methodology")]})}):null,oe?c.jsx(bw,{text:oe}):null]}):null]})},vw=5e4,Oh=2e5,yw=b.lazy(()=>import("./markdown-impl-CUBecG9k.js").then(r=>({default:r.MarkdownImpl}))),ww=b.memo(function({children:r,streaming:n=!1,className:o}){const s=c.jsx("span",{className:"whitespace-pre-wrap",children:r.length>Oh?`${r.slice(0,Oh)}\u2026`:r});return c.jsxs("div",{part:"markdown",className:W("min-w-0 break-words text-[15px] leading-[1.65] text-foreground",o),children:[r.length>vw?s:c.jsx(ll,{fallback:s,children:c.jsx(b.Suspense,{fallback:s,children:c.jsx(yw,{children:r})})}),n?c.jsx("span",{"aria-hidden":"true",className:"ml-0.5 inline-block h-[17px] w-[7px] translate-y-[3px] rounded-sm bg-primary animate-pulse motion-reduce:animate-none"}):null]})}),mn="size-7 shrink-0 text-muted-foreground hover:text-foreground",$h=({messageId:r,disabled:n})=>{const{index:o,switchBranch:s,t:d}=G(),{list:p,position:f}=u0(o,r);if(p.length<2||f<0)return null;const h=p[f-1],m=p[f+1];return c.jsxs("div",{part:"branch",className:"flex items-center text-[13px] tabular-nums text-muted-foreground",role:"group","aria-label":d("branch.label"),children:[c.jsx(ge,{variant:"ghost",size:"icon",className:mn,disabled:n||!h,"aria-label":d("branch.prev"),onClick:()=>{h&&s(h.id)},children:c.jsx(tf,{"aria-hidden":"true"})}),c.jsxs("span",{"aria-live":"polite",className:"min-w-[30px] text-center",children:[f+1,"/",p.length]}),c.jsx(ge,{variant:"ghost",size:"icon",className:mn,disabled:n||!m,"aria-label":d("branch.next"),onClick:()=>{m&&s(m.id)},children:c.jsx(ml,{"aria-hidden":"true"})})]})},kw=({text:r})=>{const{t:n}=G(),[o,s]=b.useState(!1),d=b.useRef(void 0);b.useEffect(()=>()=>{window.clearTimeout(d.current)},[]);const p=n(o?"copied":"copy");return c.jsx(ge,{part:"copy",variant:"ghost",size:"icon",className:mn,"aria-label":p,title:p,onClick:()=>{Sl(r).then(f=>{f&&(s(!0),window.clearTimeout(d.current),d.current=window.setTimeout(()=>{s(!1)},2e3))})},children:o?c.jsx(_r,{"aria-hidden":"true"}):c.jsx(xl,{"aria-hidden":"true"})})},jw=({message:r})=>{const{rate:n,t:o}=G(),[s,d]=b.useState(),p=_f(r.rating)??0;return c.jsx("span",{part:"rating",role:"radiogroup","aria-label":o("rateGroup"),className:"inline-flex items-center",onKeyDown:yh,onMouseLeave:()=>{d(void 0)},children:Ef.map((f,h)=>{const m=f<=p,v=!m&&p===0&&s!==void 0&&f<=s;return c.jsx("button",{type:"button",role:"radio",tabIndex:vh(h,p-1),"aria-checked":p===f,"aria-label":o("rate",{count:f}),className:W("inline-flex size-[30px] items-center justify-center rounded-md text-muted-foreground transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",(m||v)&&"text-warning"),onMouseEnter:()=>{d(f)},onClick:()=>{n(r.id,f)},children:c.jsx(wv,{className:W("size-4",m&&"fill-current"),"aria-hidden":"true"})},f)})})},Nw=({message:r,isLast:n,busy:o,ready:s,persisted:d,canFeedback:p,feedbackOpen:f,onOpenFeedback:h})=>{const{send:m,state:v,t:x}=G(),C=r.status==="error",k=n&&s&&!o&&!v.limit.blocked;if(C&&!k)return null;const j=Sf.find(F=>F===r.feedbackReason),_=!!(r.feedback||j),E=r.blocks.length>0,M=()=>{m({query:"",mode:v.mode??r.mode,regenerateOf:r.id})};return c.jsxs("div",{part:"actions",role:"toolbar","aria-label":x("actionsLabel"),className:W("flex min-h-8 flex-wrap items-center gap-0.5",!C&&r.rating==null&&!_&&Nl),children:[s&&!C&&r.content&&!E?c.jsx(kw,{text:r.content}):null,k?C?c.jsxs(ge,{part:"regenerate",variant:"input",size:"sm",className:"gap-1.5",onClick:M,children:[c.jsx(pf,{"aria-hidden":"true"}),x("regenerate")]}):c.jsxs(ge,{part:"regenerate",variant:"ghost",size:"icon",className:W(mn,"max-sm:h-8 max-sm:w-auto max-sm:gap-1.5 max-sm:px-2.5 max-sm:text-[13px]"),"aria-label":x("regenerate"),title:x("regenerate"),onClick:M,children:[c.jsx(pf,{"aria-hidden":"true"}),c.jsx("span",{className:"hidden max-sm:inline",children:x("regenerate")})]}):null,s&&!C?c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"mx-1.5 h-[18px] w-px bg-border","aria-hidden":"true"}),c.jsx(jw,{message:r})]}):null,c.jsx($h,{messageId:r.id,disabled:o||!d}),p&&!f?c.jsx(ge,{variant:"link",size:"sm",onClick:h,children:x(_?"feedbackEdit":"feedbackOpen")}):null]})},Cw=({message:r,onClose:n})=>{const{saveFeedback:o,t:s}=G(),[d,p]=b.useState(r.feedback),[f,h]=b.useState(!1),[m,v]=b.useState(!1),x=()=>{h(!0),v(!1),o(r.id,d.trim()).then(C=>{h(!1),C?n():v(!0)})};return c.jsxs("form",{part:"feedback","aria-label":s("feedbackLabel"),onSubmit:C=>{C.preventDefault()},className:"flex flex-col gap-3 rounded-[14px] border bg-background p-3.5",children:[c.jsx(Wl,{autoFocus:!0,value:d,onChange:p,placeholder:s("feedbackPlaceholder"),"aria-label":s("feedbackLabel"),maxLength:Cl,disabled:f,className:"min-h-[76px] rounded-md border border-input bg-background px-3 py-2.5 text-[15px] leading-normal focus:border-primary focus:ring-[3px] focus:ring-secondary"}),m?c.jsxs("div",{role:"alert",className:"flex items-start gap-1.5 text-[13px] text-destructive",children:[c.jsx(zr,{className:"mt-0.5 size-3.5 shrink-0","aria-hidden":"true"}),c.jsx("span",{children:s("ratingError")})]}):null,c.jsxs("div",{className:"flex items-center justify-end gap-2",children:[c.jsxs("span",{className:W("mr-auto text-2xs tabular-nums text-muted-foreground",d.length>=Cl&&"font-semibold text-warn-text"),children:[d.length,"/",Cl]}),c.jsx(ge,{variant:"ghost",size:"sm",onClick:n,disabled:f,children:s("cancel")}),c.jsxs(ge,{size:"sm",disabled:f,onClick:x,children:[f?c.jsx(Rr,{className:"size-3 animate-spin motion-reduce:animate-none","aria-hidden":"true"}):null,s("save")]})]})]})},Sw=({message:r})=>{const{t:n}=G(),o=Sf.find(s=>s===r.feedbackReason);return!o&&!r.feedback?null:c.jsxs("div",{part:"feedback-saved",className:"flex flex-col gap-1 rounded-xl bg-muted px-3 py-2.5 text-sm",children:[o?c.jsx("span",{className:"font-semibold",children:n(`feedback.reason.${o}`)}):null,r.feedback?c.jsx("span",{className:"whitespace-pre-line break-words",children:r.feedback}):null]})},Ew=60,_w=3,zw=.1,Rw=()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;function Mw(r,n){const o=r.charCodeAt(n-1);return o>=55296&&o<=56319?n+1:n}function Pw(r,n){const[o]=b.useState(Rw),[s,d]=b.useState(!1);n&&!s&&!o&&d(!0);const[p,f]=b.useState(r.length),h=b.useRef(p),m=b.useRef(r);return b.useLayoutEffect(()=>{m.current=r},[r]),b.useEffect(()=>{if(!s)return;h.current>r.length&&(h.current=r.length,f(r.length));let v=0,x=null;const C=k=>{const j=m.current,_=x==null?1/60:Math.min((k-x)/1e3,zw);x=k;const E=j.length-h.current;if(E<=0)return;const M=Math.max(1,Math.round(Math.max(Ew*_,E*Math.min(1,_w*_))));h.current=Math.min(j.length,Mw(j,h.current+M)),f(h.current),v=requestAnimationFrame(C)};return v=requestAnimationFrame(C),()=>{cancelAnimationFrame(v)}},[r,s]),!s||p>=r.length?r:r.slice(0,p)}const Lw=({message:r,isLast:n,busy:o,persisted:s,dashboardOpen:d,onToggleDashboard:p})=>{const{send:f,state:h,t:m}=G(),[v,x]=b.useState(!1),C=r.status==="streaming",k=r.status==="error",j=Pw(r.content,C),_=C||j.length<r.content.length,E=ox(C,r.status),M=!C&&s,F=M&&!k,Z=!k&&(C||r.steps.length>0),oe=Date.parse(r.createdAt)||0,J=E?"eureka":ex(r.status,r.content.length>0),re=($,X)=>f({query:$,mode:h.mode??r.mode,...X?{clarification:X}:{}}).then(K=>K==="sent");return c.jsxs("article",{part:"message","data-role":"assistant","data-status":r.status,"aria-busy":C,className:"group flex items-start gap-3",children:[c.jsx("div",{part:"avatar",className:"w-10 shrink-0 max-sm:hidden",children:c.jsx(Xp,{mood:J,size:40,animated:C||E})}),c.jsxs("div",{part:k?"bubble assistant-bubble error-bubble":"bubble assistant-bubble",className:"flex min-w-0 flex-1 flex-col gap-3",children:[Z?c.jsx(ew,{steps:r.steps,status:r.status,startedAt:oe,durationMs:r.durationMs,stopping:h.turn?.stopping===!0&&h.turn.assistantId===r.id}):null,k?c.jsxs("div",{role:"alert",className:"flex items-start gap-2.5 rounded-xl border border-error/30 bg-destructive-background px-3.5 py-3 text-sm",children:[c.jsx(zr,{className:"mt-0.5 size-4 shrink-0 text-destructive","aria-hidden":"true"}),c.jsx("span",{children:r.content||m("errors.generic")})]}):null,c.jsx(xw,{message:r,isLastInBranch:n,onAsk:re,dashboardOpen:d,onToggleDashboard:p,children:r.content&&!k?c.jsx(ww,{streaming:_,children:j}):null}),r.attachments.length>0?c.jsx("div",{className:"flex flex-wrap gap-1.5",children:r.attachments.map(($,X)=>c.jsx(Dh,{attachment:$},$.id??`${$.name}-${X}`))}):null,r.status==="stopped"?c.jsxs("div",{className:"flex items-center gap-2 text-[13px] text-muted-foreground",children:[c.jsx(nf,{className:"size-4 shrink-0","aria-hidden":"true"}),c.jsx("span",{children:m("agent.answerStopped")})]}):null,C?null:c.jsx(Nw,{message:r,isLast:n,busy:o,ready:M,persisted:s,canFeedback:F,feedbackOpen:v,onOpenFeedback:()=>{x(!0)}}),F&&v?c.jsx(Cw,{message:r,onClose:()=>{x(!1)}}):null,F&&!v?c.jsx(Sw,{message:r}):null]})]})},Dw=({message:r,onClose:n})=>{const{send:o,state:s,t:d}=G(),p=b.useId(),[f,h]=b.useState(r.content),m=s.mode??r.mode,v=s.config?.max_query_chars??Pp,x=f.trim(),C=x!==r.content.trim(),k=f.length>v,j=x.length>0&&C&&!k&&!s.turn&&!s.limit.blocked,_=()=>{j&&(n(),o({query:x,mode:m,parentId:r.parentId??""}))};return c.jsxs("div",{part:"edit",onKeyDown:E=>{E.key==="Escape"&&(E.preventDefault(),E.stopPropagation(),n())},className:"flex w-full max-w-[640px] flex-col gap-2 rounded-2xl border border-primary bg-background px-3 py-2.5 ring-[3px] ring-secondary",children:[c.jsx(Wl,{autoFocus:!0,value:f,onChange:h,"aria-label":d("editLabel"),"aria-invalid":k||void 0,"aria-describedby":p,className:"py-0.5 text-lg",onSubmit:_}),c.jsxs("div",{className:"flex items-center justify-end gap-2",children:[c.jsx(jh,{id:p,count:f.length,max:v,className:"mr-auto px-0"}),c.jsx(ge,{variant:"ghost",size:"sm",onClick:n,children:d("cancel")}),c.jsx(ge,{size:"sm",disabled:!j,onClick:_,children:d("send")})]})]})},Tw=({message:r,busy:n,persisted:o})=>{const{t:s}=G(),[d,p]=b.useState(!1);return c.jsx("div",{part:"message","data-role":"user",className:"group flex flex-col items-end gap-1.5",children:d?c.jsx(Dw,{message:r,onClose:()=>{p(!1)}}):c.jsxs(c.Fragment,{children:[r.attachments.length>0?c.jsx("div",{className:"flex max-w-[78%] flex-wrap justify-end gap-1.5 max-sm:max-w-[88%]",children:r.attachments.map((f,h)=>c.jsx(Dh,{attachment:f},f.id??`${f.name}-${h}`))}):null,c.jsx("div",{part:"bubble user-bubble",className:"max-w-[78%] whitespace-pre-wrap break-words rounded-[calc(var(--aid-c-radius)+6px)] rounded-br-[6px] bg-primary px-3.5 py-2.5 text-[15px] leading-normal text-primary-foreground max-sm:max-w-[88%]",children:r.content}),c.jsxs("div",{className:"flex min-h-7 items-center gap-0.5",children:[o?c.jsx(ge,{part:"edit-button",variant:"ghost",size:"icon",className:W(mn,Nl),disabled:n,"aria-label":s("edit"),title:s("edit"),onClick:()=>{p(!0)},children:c.jsx(pv,{"aria-hidden":"true"})}):null,c.jsx($h,{messageId:r.id,disabled:n||!o})]})]})})},Iw=b.memo(function({message:r,isLast:n,busy:o,dashboardOpen:s,onToggleDashboard:d}){const{t:p}=G(),f=Sp(r.id),h=c.jsx("p",{part:"message-error",className:"text-sm text-muted-foreground",children:p("errors.render")});return c.jsx(ll,{fallback:h,children:r.role==="user"?c.jsx(Tw,{message:r,busy:o,persisted:f}):c.jsx(Lw,{message:r,isLast:n,busy:o,persisted:f,dashboardOpen:s,onToggleDashboard:d})})}),Fh=r=>r.scrollHeight-r.scrollTop-r.clientHeight,Aw=16,Ow=({resetKey:r,followKey:n})=>{const o=b.useRef(null),s=b.useRef(null),d=b.useRef(!0),p=b.useRef(0),f=b.useRef(!1),h=b.useRef(null),[m,v]=b.useState(!0),x=b.useCallback(()=>{const j=o.current;if(!j)return;const _=j.querySelectorAll('[data-role="user"]'),E=_[_.length-1];if(!f.current&&E){const M=j.scrollTop+E.getBoundingClientRect().top-j.getBoundingClientRect().top-Aw;if(M<j.scrollHeight-j.clientHeight){f.current=!0,d.current=!1,j.scrollTop=Math.max(0,M),h.current=j.scrollTop;return}}j.scrollTop=j.scrollHeight},[]),C=b.useCallback(()=>{const j=o.current;if(!j)return;d.current=!0;const _=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;j.scrollTo({top:j.scrollHeight,behavior:_?"auto":"smooth"})},[]),k=b.useCallback(()=>{const j=o.current;if(!j)return;const _=Fh(j)<Nf,E=h.current!==null&&Math.abs(j.scrollTop-h.current)<1;E||(h.current=null),_&&!E?d.current=!0:j.scrollTop<p.current-1&&(d.current=!1),p.current=j.scrollTop,v(_)},[]);return b.useLayoutEffect(()=>{d.current=!0,f.current=!1,h.current=null,x()},[r,n,x]),b.useEffect(()=>{const j=s.current,_=o.current;if(!j||!_||typeof ResizeObserver>"u")return;const E=new ResizeObserver(()=>{d.current&&x(),v(Fh(_)<Nf)});return E.observe(j),()=>{E.disconnect()}},[x]),{scrollRef:o,contentRef:s,onScroll:k,atBottom:m,scrollToBottom:C}},$w=()=>{const{state:r,path:n,t:o}=G(),{state:s,toggle:d}=Lr(),p=n.filter(j=>j.role==="user").length,{scrollRef:f,contentRef:h,onScroll:m,atBottom:v,scrollToBottom:x}=Ow({resetKey:r.thread?.id??null,followKey:p}),C=r.turn!==null,k=n[n.length-1];return c.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col",children:[c.jsx("div",{ref:f,part:"messages",onScroll:m,"aria-live":"polite","aria-busy":C,className:"min-h-0 flex-1 overflow-y-auto overscroll-contain",children:c.jsx("div",{ref:h,className:"mx-auto flex w-full max-w-[820px] flex-col gap-[22px] px-4 pb-4 pt-[18px]",children:n.map(j=>c.jsx(Iw,{message:j,isLast:j===k,busy:C,dashboardOpen:j.id===s.messageId,onToggleDashboard:d},j.id))})}),v?null:c.jsxs("button",{part:"scroll-down",type:"button",className:"absolute bottom-3 left-1/2 inline-flex h-9 -translate-x-1/2 items-center gap-1.5 whitespace-nowrap rounded-full border bg-background pl-3 pr-3.5 text-[13px] font-medium text-foreground shadow-pop transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",onClick:x,children:[c.jsx(Gp,{"aria-hidden":"true"}),o("scrollDown")]})]})},Fw={error:"bg-error-background text-destructive",warning:"bg-warning-background text-warn-text",lock:"bg-muted text-muted-foreground"},Uh=({tone:r,children:n})=>c.jsx("span",{className:W("flex size-[52px] items-center justify-center rounded-full",Fw[r]),children:n}),Uw=({kind:r,onRetry:n})=>{const{t:o}=G();if(r==="loading")return c.jsxs("div",{part:"shell-status","data-state":"loading","aria-busy":"true",className:"flex min-h-0 flex-1 flex-col items-center justify-center gap-4 p-8 text-center",children:[c.jsx("span",{"aria-hidden":"true",className:"size-[26px] animate-spin rounded-full border-[3px] border-current border-r-transparent text-primary motion-reduce:animate-none"}),c.jsx("span",{role:"status",className:"text-xs text-muted-foreground",children:o("loading")})]});if(r==="siteBlocked")return c.jsxs("div",{part:"shell-status","data-state":"siteBlocked",role:"alert",className:"flex min-h-0 flex-1 flex-col items-center justify-center gap-4 p-8 text-center",children:[c.jsx(Uh,{tone:"lock",children:c.jsx(of,{className:"size-6","aria-hidden":"true"})}),c.jsx("p",{className:"max-w-[300px] text-lg font-semibold",children:o("shell.siteBlocked")}),c.jsx("p",{className:"max-w-[440px] text-xs text-muted-foreground",children:o("shell.siteBlockedHint")})]});const s=r==="overloaded";return c.jsxs("div",{part:"shell-status","data-state":s?"overloaded":"unavailable",role:"alert",className:"flex min-h-0 flex-1 flex-col items-center justify-center gap-4 p-8 text-center",children:[c.jsx(Uh,{tone:s?"warning":"error",children:s?c.jsx(yl,{className:"size-6","aria-hidden":"true"}):c.jsx(zr,{className:"size-6","aria-hidden":"true"})}),c.jsx("p",{className:"max-w-[300px] text-lg font-semibold",children:o(s?"overloaded":"configError")}),n?c.jsxs(ge,{variant:"input",size:"sm",onClick:n,children:[c.jsx(ff,{"aria-hidden":"true"}),o("retry")]}):null]})},qw=()=>{const{state:r,reload:n}=G(),o=fx(r);return o===null?null:c.jsx(Uw,{kind:o,onRetry:o==="siteBlocked"?void 0:n})},Vw="h-3 rounded-md bg-muted animate-pulse motion-reduce:animate-none",Bw=()=>{const{t:r}=G();return c.jsxs("div",{"aria-busy":"true",className:"min-h-0 flex-1 overflow-hidden",children:[c.jsxs("div",{className:"mx-auto flex w-full max-w-[820px] flex-col gap-[22px] px-4 pb-4 pt-[18px]",children:[c.jsx("div",{className:"flex justify-end",children:c.jsx("div",{className:"h-[38px] w-[62%] rounded-[18px] rounded-br-[6px] bg-muted animate-pulse motion-reduce:animate-none"})}),c.jsx("div",{className:"flex flex-col gap-2.5",children:[90,76,84,40].map(n=>c.jsx("div",{className:Vw,style:{width:`${n}%`}},n))})]}),c.jsx("span",{role:"status",className:"sr-only",children:r("loading")})]})},Ww=({composerRef:r,wide:n})=>{const{state:o,path:s}=G(),d=!!o.config&&!o.loadingThread&&!o.configError,p=d&&s.length===0,f=m=>{r&&"current"in r&&r.current?.setText(m)};let h;return d?p?h=c.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto overscroll-contain",children:c.jsx(B1,{wide:n,onPick:f})}):h=c.jsx($w,{}):h=o.loadingThread&&o.config&&!o.configError?c.jsx(Bw,{}):c.jsx(qw,{}),c.jsxs(c.Fragment,{children:[h,c.jsx(q1,{composerRef:r})]})},bn="size-8 shrink-0 text-muted-foreground hover:text-foreground",Hw=({historyHidden:r,onShowHistory:n,onOpenSettings:o,title:s,logoUrl:d,threadTitle:p,tabs:f,inert:h=!1})=>{const{t:m,newChat:v}=G(),x=sl(),C=b.useRef(null);Mr(C,h);const k=p!==void 0&&p!==""?p:r?s:"";return c.jsxs("div",{ref:C,part:"toolbar",className:"flex h-toolbar shrink-0 items-center gap-1 border-b py-0 pl-2.5 pr-2",children:[r?c.jsx(ge,{part:"history-toggle",variant:"ghost",size:"icon",className:bn,"aria-expanded":!1,"aria-label":m("history"),title:m("history"),onClick:n,children:c.jsx(sv,{"aria-hidden":"true"})}):null,r&&d?c.jsx("img",{part:"logo",src:d,alt:"",referrerPolicy:"no-referrer",className:"size-6 shrink-0 rounded-md object-contain"}):null,c.jsx("span",{className:"min-w-0 flex-1 truncate px-1.5 text-sm font-semibold",children:k}),f,c.jsx(ge,{variant:"ghost",size:"icon",className:bn,"aria-label":m("newChat"),title:m("newChat"),onClick:v,children:c.jsx(uf,{"aria-hidden":"true"})}),x.canExpand?c.jsx(ge,{part:"expand",variant:"ghost",size:"icon",className:bn,"aria-label":x.expanded?m("shrink"):m("expand"),title:x.expanded?m("shrink"):m("expand"),onClick:()=>{x.setExpanded(!x.expanded)},children:x.expanded?c.jsx(df,{"aria-hidden":"true"}):c.jsx(sf,{"aria-hidden":"true"})}):null,c.jsx(ge,{part:"settings-button",variant:"ghost",size:"icon",className:bn,"aria-label":m("settings"),title:m("settings"),onClick:o,children:c.jsx(bv,{"aria-hidden":"true"})}),x.close?c.jsx(ge,{part:"close",variant:"ghost",size:"icon",className:bn,"aria-label":m("close"),title:m("close"),onClick:x.close,children:c.jsx(ln,{"aria-hidden":"true"})}):null]})},Xw="flex shrink-0 flex-col border-r duration-200 animate-in fade-in slide-in-from-left-2 motion-reduce:animate-none",Kw="w-side bg-muted",Qw="absolute inset-y-0 left-0 z-30 w-side-over max-w-full bg-muted shadow-side",Yw=({title:r,logoUrl:n,onHide:o})=>{const{t:s}=G();return c.jsxs("div",{part:"header",className:"flex h-side-head shrink-0 items-center gap-2.5 pl-3.5 pr-2",children:[n?c.jsx("img",{part:"logo",src:n,alt:"",referrerPolicy:"no-referrer",className:"size-7 shrink-0 rounded-lg object-cover"}):c.jsx(Kp,{size:28}),c.jsx("span",{part:"title",className:"min-w-0 flex-1 truncate text-[15px] font-bold",children:r}),c.jsx(ge,{variant:"ghost",size:"icon",className:"size-8 text-muted-foreground hover:text-foreground","aria-label":s("closeHistory"),title:s("closeHistory"),onClick:o,children:c.jsx(ov,{"aria-hidden":"true"})})]})},Zw=({onClick:r})=>{const{t:n}=G();return c.jsxs("button",{part:"new-chat",type:"button",onClick:r,className:"flex h-9 w-full items-center gap-2.5 rounded-md border bg-background pl-3 pr-2.5 text-left text-sm font-medium transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",children:[c.jsx(uf,{className:"size-4","aria-hidden":"true"}),n("newChat")]})},Jw=({name:r,onConfirm:n,onCancel:o})=>{const{t:s}=G(),d=b.useRef(null);return b.useEffect(()=>{d.current?.querySelector("[data-cancel]")?.focus()},[]),c.jsxs("div",{ref:d,role:"alertdialog","aria-label":s("deleteConfirm"),onKeyDown:p=>{p.key==="Escape"&&(p.preventDefault(),p.stopPropagation(),o())},className:"my-0.5 flex flex-col gap-2 rounded-[10px] border border-error/35 bg-destructive-background p-2.5",children:[c.jsx("div",{className:"text-[13px] font-semibold",children:s("deleteConfirm")}),c.jsx("div",{className:"truncate text-2xs text-muted-foreground",children:r}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(ge,{variant:"destructive",size:"xs",onClick:n,children:s("deleteYes")}),c.jsx(ge,{variant:"ghost",size:"xs","data-cancel":!0,onClick:o,children:s("deleteNo")})]})]})},Gw=(r,n)=>{let o="";const s=[];let d=0;for(const h of r){const m=h.toLowerCase();s.push(...Array.from({length:m.length},()=>d)),o+=m,d+=h.length}s.push(d);const p=o.indexOf(n);if(p<0)return null;let f=p+n.length;for(;f<s.length&&s[f]===s[f-1];)f+=1;return[s[p]??0,s[f]??r.length]},ek=({text:r,query:n})=>{const o=n.trim().toLowerCase(),s=o?Gw(r,o):null;if(!s)return c.jsx(c.Fragment,{children:r});const[d,p]=s;return c.jsxs(b.Fragment,{children:[r.slice(0,d),c.jsx("mark",{className:"rounded-[3px] bg-hl px-px text-inherit",children:r.slice(d,p)}),r.slice(p)]})},tk=({groups:r,query:n,activeId:o,confirmId:s,onOpen:d,onAskDelete:p,onCancelDelete:f,onDelete:h})=>{const{t:m}=G();return c.jsx(c.Fragment,{children:r.map(([v,x])=>c.jsxs("section",{className:"pb-1","aria-label":m(v),children:[c.jsx("h3",{className:"px-2 pb-1 pt-3.5 text-2xs font-medium text-muted-foreground",children:m(v)}),c.jsx("ul",{className:"flex flex-col gap-px",children:x.map(C=>{const k=C.id===o,j=C.title||m("untitled");return s===C.id?c.jsx("li",{children:c.jsx(Jw,{name:j,onConfirm:()=>{h(C.id)},onCancel:f})},C.id):c.jsxs("li",{className:"group relative",children:[c.jsx("button",{part:"thread-item",type:"button","aria-current":k?"page":void 0,title:j,onClick:()=>{d(C.id)},className:W("flex min-h-9 w-full items-center rounded-lg py-1 pl-2.5 pr-9 text-left text-sm transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",k&&"bg-background font-medium shadow-[inset_0_0_0_1px_var(--aid-c-border)] hover:bg-background"),children:c.jsx("span",{className:"min-w-0 truncate",children:c.jsx(ek,{text:j,query:n})})}),c.jsx(ge,{variant:"ghost",size:"icon",className:W("absolute right-1 top-1/2 size-7 -translate-y-1/2 text-muted-foreground",!k&&Nl),"aria-label":`${m("delete")}: ${j}`,onClick:()=>{p(C.id)},children:c.jsx(Cv,{"aria-hidden":"true"})})]},C.id)})})]},v))})},Gl=({icon:r,children:n})=>c.jsxs("div",{className:"flex flex-col items-center gap-1.5 px-3 py-6 text-center text-sm text-muted-foreground",children:[r,n]}),rk=[82,64,90,58,76,70],ak=({query:r})=>{const{state:n,t:o,refreshThreads:s}=G();return n.threadsLoaded?r.trim()!==""?c.jsx(Gl,{icon:c.jsx(sn,{"aria-hidden":"true"}),children:c.jsx("span",{children:o("searchEmpty")})}):n.threadsError?c.jsxs(Gl,{icon:c.jsx(zr,{"aria-hidden":"true"}),children:[c.jsx("span",{children:o("historyError")}),c.jsx(ge,{variant:"input",size:"xs",onClick:s,children:o("retry")})]}):c.jsx(Gl,{icon:c.jsx(cf,{"aria-hidden":"true"}),children:c.jsx("span",{children:o("historyEmpty")})}):c.jsxs("div",{"aria-busy":"true",className:"flex flex-col",children:[rk.map(d=>c.jsx("div",{className:"flex min-h-9 items-center px-2.5",children:c.jsx("span",{className:"h-[11px] animate-pulse rounded-md bg-border motion-reduce:animate-none",style:{width:`${d}%`}})},d)),c.jsx("span",{role:"status",className:"sr-only",children:o("loading")})]})},nk=(r,n,o)=>{Fo(r,n);const s=b.useRef(o);b.useEffect(()=>{s.current=o}),b.useEffect(()=>{if(!n)return;const p=f=>{if(f.key!=="Escape"||f.defaultPrevented)return;const h=f.composedPath(),m=h[0];m instanceof HTMLInputElement&&m.type==="search"&&m.value!==""||h.some(v=>v instanceof HTMLElement&&v.getAttribute("role")==="alertdialog")||(f.preventDefault(),f.stopPropagation(),s.current())};return window.addEventListener("keydown",p,!0),()=>{window.removeEventListener("keydown",p,!0)}},[n]);const d=b.useRef(!1);b.useEffect(()=>{const p=r.current?.getRootNode();if(d.current&&!n){const f=window.setTimeout(()=>{p?.querySelector('[part~="history-toggle"]')?.focus()},0);return d.current=!1,()=>{window.clearTimeout(f)}}d.current=n},[n,r])},ok=({query:r,onQuery:n,inputRef:o,autoFocus:s})=>{const{t:d}=G();return c.jsxs("label",{className:"relative flex items-center",children:[c.jsx(sn,{className:"pointer-events-none absolute left-[11px] size-4 text-muted-foreground","aria-hidden":"true"}),c.jsx("input",{ref:o,part:"search",type:"search",value:r,"data-autofocus":s?"":void 0,onChange:p=>{n(p.target.value)},onKeyDown:p=>{p.key==="Escape"&&r&&(p.preventDefault(),n(""))},placeholder:d("search"),"aria-label":d("search"),className:"h-8 w-full rounded-md border border-input bg-background pl-[34px] pr-9 text-sm outline-none placeholder:text-muted-foreground focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-secondary [&::-webkit-search-cancel-button]:hidden"}),r?c.jsx("button",{type:"button","aria-label":d("dismiss"),className:"absolute right-2 rounded p-0.5 text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",onClick:()=>{n(""),o.current?.focus()},children:c.jsx(ln,{className:"size-3.5","aria-hidden":"true"})}):null]})},ik=({collapsed:r,onCollapsedChange:n,searchRef:o,searchSignal:s,overlay:d=!1,title:p,logoUrl:f,inert:h=!1})=>{const m=b.useRef(null);Mr(m,h);const{state:v,t:x,openThread:C,newChat:k,deleteThread:j}=G(),[_,E]=b.useState(""),[M,F]=b.useState(null),Z=d&&!r;nk(m,Z,()=>{n(!0)});const oe=b.useMemo(()=>{const re=_.trim().toLowerCase(),$=re?v.threads.filter(X=>(X.title||x("untitled")).toLowerCase().includes(re)):v.threads;return uy($)},[v.threads,_,x]);b.useEffect(()=>{s>0&&!r&&o.current?.focus()},[s,r,o]);const J=re=>()=>{re(),d&&n(!0)};return r?c.jsx("nav",{ref:m,part:"sidebar","data-state":"collapsed","aria-label":x("history"),hidden:!0}):c.jsxs("nav",{ref:m,part:"sidebar","data-state":"expanded","aria-label":x("history"),className:W(Xw,d?Qw:Kw),children:[c.jsx(Yw,{title:p,logoUrl:f,onHide:()=>{n(!0)}}),c.jsxs("div",{className:"flex shrink-0 flex-col gap-2 px-2.5 pb-2",children:[c.jsx(Zw,{onClick:J(k)}),c.jsx(ok,{query:_,onQuery:E,inputRef:o,autoFocus:Z})]}),c.jsxs("div",{part:"history",className:"min-h-0 flex-1 overflow-y-auto overscroll-contain px-2 pb-2",children:[oe.length===0?c.jsx(ak,{query:_}):null,c.jsx(tk,{groups:oe,query:_,activeId:v.thread?.id,confirmId:M,onOpen:re=>{J(()=>{C(re)})()},onAskDelete:F,onCancelDelete:()=>{F(null)},onDelete:re=>{F(null),j(re)}})]})]})};function sk(r){const n=b.useRef(null),[o,s]=b.useState(r);return b.useLayoutEffect(()=>{const d=n.current;if(!d)return;const p=Math.round(d.getBoundingClientRect().width);if(p>0&&s(p),typeof ResizeObserver>"u")return;const f=new ResizeObserver(([h])=>{const m=Math.round(h?.contentRect.width??0);m>0&&s(m)});return f.observe(d),()=>{f.disconnect()}},[]),[n,o]}const qh="aid_sidebar",lk=720,ck=r=>{try{const n=window.localStorage.getItem(qh);return n===null?r:n==="collapsed"}catch{return r}},dk=r=>{const{state:n}=G(),o=n.thread?.id,s=o!==void 0&&o!==la?o:void 0;return c.jsx(h1,{threadId:s,children:c.jsx(uk,{...r})})},uk=({open:r,title:n,logoUrl:o,compact:s})=>{const{state:d,path:p,newChat:f}=G(),h=sl(),{expandForDashboard:m}=h,[v,x]=sk(0),C=(h.canExpand&&h.expanded?Math.max(x,window.innerWidth):x)>=Ey,k=Lr(),j=s||x>0&&x<lk,[_,E]=b.useState(()=>j||ck(!1)),[M,F]=b.useState(j);j!==M&&(F(j),j&&E(!0));const[Z,oe]=b.useState(!1),J=b.useRef(null),[re,$]=b.useState(0),X=()=>{fe(!1),$(H=>H+1)},K=b.useRef(null),fe=H=>{if(E(H),!j)try{window.localStorage.setItem(qh,H?"collapsed":"expanded")}catch{}},ee=b.useRef({collapsed:_,newChat:f,setCollapsed:fe,focusSearch:X});b.useEffect(()=>{ee.current={collapsed:_,newChat:f,setCollapsed:fe,focusSearch:X}}),b.useEffect(()=>{if(!r)return;const H=V=>{if(!(V.metaKey||V.ctrlKey)||V.altKey)return;const{collapsed:ue,newChat:pe,setCollapsed:Ne,focusSearch:ke}=ee.current,be=V.key.toLowerCase();if(be==="k"&&!V.shiftKey)ke();else if(be==="o"&&V.shiftKey)pe(),setTimeout(()=>K.current?.setText(""),0);else if(be==="s"&&V.shiftKey)Ne(!ue);else return;V.preventDefault()};return window.addEventListener("keydown",H),()=>{window.removeEventListener("keydown",H)}},[r]);const de=p.find(H=>H.id===k.state.messageId&&fr(H.blocks,"dashboard")!==void 0),B=de!==void 0;b.useEffect(()=>{if(B)return m(!0),()=>{m(!1)}},[B,m]);const Q=b.useRef(null),me=b.useRef(!1),Se=de?.id??null,ve=b.useRef(null);b.useEffect(()=>{const H=ve.current;if(ve.current=Se,H===null||Se!==null||!me.current)return;me.current=!1;const V=Q.current;(Array.from(V?.querySelectorAll('[part="dashboard-toggle"]')??[]).find(ue=>ue.dataset.messageId===H)??V?.querySelector('[part="composer"] textarea'))?.focus()},[Se]);const ye=B&&k.state.fullscreen;Mr(Q,j&&!_);const[U,D]=b.useState(r);r!==U&&(D(r),!r&&j&&E(!0));const T=zy(B,C,k.state.fullscreen);_y(r&&B&&(!T||k.state.view==="dashboard"));const w=d.thread?d.threads.find(H=>H.id===d.thread?.id)?.title:void 0,L=d.config&&!d.loadingThread&&!d.configError;return c.jsxs("div",{ref:v,className:"relative flex min-h-0 flex-1",children:[c.jsx(ik,{collapsed:_,onCollapsedChange:fe,overlay:j,searchRef:J,searchSignal:re,title:n,logoUrl:o,inert:ye}),c.jsxs("div",{ref:Q,className:"flex min-w-0 flex-1 flex-col",children:[c.jsx(Hw,{historyHidden:_,onShowHistory:()=>{fe(!1)},onOpenSettings:()=>{oe(!0)},title:n,logoUrl:o,threadTitle:w,tabs:T?c.jsx(Ry,{}):null,inert:ye}),c.jsx(My,{wide:C,onPanelFocusChange:H=>{me.current=H},panel:de?c.jsx(p1,{message:de}):null,chat:c.jsx(Ww,{composerRef:K,wide:x>=720})})]}),j&&!_?c.jsx("button",{type:"button",tabIndex:-1,"aria-hidden":"true",className:"absolute inset-0 z-20 bg-scrim",onClick:()=>{fe(!0)}}):null,c.jsx(m1,{active:r&&!!L}),c.jsx(E1,{open:Z,onClose:()=>{oe(!1)}})]})},Vh=({open:r,title:n,logoUrl:o,fullscreen:s,expanded:d=!1,style:p,onClose:f})=>{const h=b.useRef(null);return Mr(h,!r),Fo(h,r),b.useEffect(()=>{if(!r)return;const m=v=>{v.key==="Escape"&&!v.defaultPrevented&&f()};return window.addEventListener("keydown",m),()=>{window.removeEventListener("keydown",m)}},[r,f]),c.jsx("div",{ref:h,part:"window",role:"dialog","aria-modal":s,"aria-label":n,"aria-hidden":!r,"data-state":r?"open":"closed","data-fullscreen":s,"data-expanded":d,className:"aid-window rounded-aid-window border bg-background text-foreground shadow-window",style:p,children:c.jsx(dk,{open:r,title:n,logoUrl:o,compact:s})})},ec=60,pk=6,fk=8,Bh={x:20,y:20},hk=639,Wh="aid_pos",gk=(r,n,o=pk)=>r*r+n*n>=o*o,Xo=(r,n,o=ec,s=fk)=>{const d=typeof o=="number"?{width:o,height:o}:o,p=(f,h)=>Math.round(Math.min(Math.max(f,s),Math.max(s,h)));return{x:p(r.x,n.width-d.width-s),y:p(r.y,n.height-d.height-s)}},Hh=(r,n,o,s)=>({x:s==="bottom-right"?r.x-n:r.x+n,y:r.y-o}),mk=r=>{try{const n=r?.getItem(Wh);if(!n)return null;const o=JSON.parse(n);if(typeof o=="object"&&o!==null&&typeof o.x=="number"&&typeof o.y=="number"&&Number.isFinite(o.x)&&Number.isFinite(o.y))return{x:o.x,y:o.y}}catch{}return null},bk=(r,n)=>{try{r?.setItem(Wh,JSON.stringify(n))}catch{}},xk={width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},vk=({size:r=24})=>c.jsx("svg",{...xk,width:r,height:r,children:c.jsx("path",{d:"M18 6 6 18M6 6l12 12"})}),Xh=()=>({width:window.innerWidth,height:window.innerHeight}),tc=r=>({width:r.offsetWidth,height:r.offsetHeight}),yk=()=>{try{return window.localStorage}catch{return null}},Kh=b.forwardRef(({open:r,lang:n,corner:o,offset:s,draggable:d,unread:p=0,variant:f,label:h,shape:m,onOffsetChange:v,onToggle:x},C)=>{const k=b.useRef(null),j=b.useRef(!1),[_,E]=b.useState(null),M=_!==null,F=X=>{!d||X.button!==0||(k.current={pointerX:X.clientX,pointerY:X.clientY,offset:s,moved:!1},X.currentTarget.setPointerCapture(X.pointerId))},Z=X=>{const K=k.current;if(!K)return;const fe=X.clientX-K.pointerX,ee=X.clientY-K.pointerY;!K.moved&&!gk(fe,ee)||(K.moved||(K.moved=!0,E({offset:K.offset,...tc(X.currentTarget)})),v(Xo(Hh(K.offset,fe,ee,o),Xh(),tc(X.currentTarget))))},oe=X=>{const K=k.current;if(k.current=null,X.currentTarget.hasPointerCapture(X.pointerId)&&X.currentTarget.releasePointerCapture(X.pointerId),!K?.moved)return;E(null),j.current=!0;const fe=X.clientX-K.pointerX,ee=X.clientY-K.pointerY;bk(yk(),Xo(Hh(K.offset,fe,ee,o),Xh(),tc(X.currentTarget)))},J=()=>{if(j.current){j.current=!1;return}x()},re=o==="bottom-right"?"right":"left",$=f==="label"&&!r?h??wt(n,"ask"):null;return c.jsxs(c.Fragment,{children:[_?c.jsx("span",{"data-testid":"launcher-origin","aria-hidden":"true","data-shape":m??"circle",className:"aid-launcher-origin",style:{[re]:_.offset.x,bottom:_.offset.y,width:_.width,height:_.height}}):null,c.jsxs("button",{ref:C,part:"launcher",type:"button","aria-label":`${$??wt(n,r?"close":"open")}${p>0&&!r?`, ${wt(n,"unreadAnswers",{count:p})}`:""}`,"aria-expanded":r,"data-dragging":M,"data-variant":$?"label":"icon","data-shape":m??"circle","data-open":r,"data-side":re,"data-unread":p>0&&!r,className:"aid-launcher",style:{[re]:s.x,bottom:s.y},onPointerDown:F,onPointerMove:Z,onPointerUp:oe,onPointerCancel:oe,onClick:J,children:[c.jsx("span",{className:"aid-launcher-face","aria-hidden":"true",children:c.jsx(Xp,{size:52,animated:!1,bare:!0})}),c.jsx("span",{className:"aid-launcher-close","aria-hidden":"true",children:c.jsx(vk,{})}),!$&&!r?c.jsx("span",{part:"launcher-hint",className:"aid-launcher-hint","aria-hidden":"true",children:h??wt(n,"ask")}):null,$?c.jsx("span",{part:"launcher-label",className:"truncate",children:$}):null,p>0&&!r?c.jsx("span",{part:"badge",className:"aid-launcher-badge",children:p>9?"9+":p}):null]})]})});Kh.displayName="Launcher";const wk=r=>{const{state:n}=G(),{turn:o,thread:s}=n,[d,p]=b.useState({turn:o,open:r}),[f,h]=b.useState(0);return(d.turn!==o||d.open!==r)&&(p({turn:o,open:r}),r?f!==0&&h(0):d.turn&&!o&&s?.messages.find(m=>m.id===d.turn?.assistantId)?.status==="done"&&h(f+1)),f},Qh=b.forwardRef((r,n)=>{const o=wk(r.open);return c.jsx(Kh,{ref:n,...r,unread:o})});Qh.displayName="UnreadLauncher";const xn=(r,n,o)=>Math.min(o,Math.max(n,r)),kk={black:"#000000",white:"#ffffff",red:"#ff0000",green:"#008000",blue:"#0000ff",orange:"#ffa500",purple:"#800080",teal:"#008080",navy:"#000080",gray:"#808080",grey:"#808080"},Yh=r=>{if(!/^[0-9a-f]+$/i.test(r)||![3,4,6,8].includes(r.length))return null;const n=r.length<=4?r.replace(/./g,s=>s+s):r,o=s=>parseInt(n.slice(s,s+2),16);return{r:o(0),g:o(2),b:o(4),a:n.length===8?o(6)/255:1}},Zh=r=>{const n=r.replace(/\//g," ").replace(/,/g," ").trim().split(/\s+/).filter(Boolean);return n.length===3||n.length===4?n:null},Ko=r=>{const n=Number(r);return r!==""&&Number.isFinite(n)?n:null},jk=r=>{if(r===void 0)return 1;const n=Ko(r.endsWith("%")?r.slice(0,-1):r);return n===null?null:xn(r.endsWith("%")?n/100:n,0,1)},rc=r=>{const n=Ko(r.endsWith("%")?r.slice(0,-1):r);return n===null?null:xn(r.endsWith("%")?n/100*255:n,0,255)},Jh=r=>{const n=/^(-?[\d.]+)(deg|turn|rad|grad)?$/.exec(r);if(!n?.[1])return null;const o=Ko(n[1]);if(o===null)return null;const s=n[2]??"deg";return((s==="turn"?o*360:s==="rad"?o*180/Math.PI:s==="grad"?o*.9:o)%360+360)%360},Qo=r=>{const n=Ko(r.endsWith("%")?r.slice(0,-1):r);return n===null?null:xn(n,0,100)},Yo=({h:r,s:n,l:o,a:s})=>{const d=n/100,p=o/100,f=m=>(m+r/30)%12,h=m=>p-d*Math.min(p,1-p)*Math.max(-1,Math.min(f(m)-3,9-f(m),1));return{r:Math.round(h(0)*255),g:Math.round(h(8)*255),b:Math.round(h(4)*255),a:s}},Nk=({r,g:n,b:o,a:s})=>{const d=r/255,p=n/255,f=o/255,h=Math.max(d,p,f),m=Math.min(d,p,f),v=(h+m)/2,x=h-m;if(x===0)return{h:0,s:0,l:v*100,a:s};const C=x/(1-Math.abs(2*v-1));let k;return h===d?k=(p-f)/x%6:h===p?k=(f-d)/x+2:k=(d-p)/x+4,{h:(k*60+360)%360,s:C*100,l:v*100,a:s}},Gh=r=>{const n=Ck(r);if(!n)return null;const o=/^hsla?\((.*)\)$/.exec(r.trim().toLowerCase()),s=o?.[1]!==void 0?Zh(o[1]):null;if(s){const[d,p,f]=[Jh(s[0]??""),Qo(s[1]??""),Qo(s[2]??"")];if(d!==null&&p!==null&&f!==null)return{h:d,s:p,l:f,a:n.a}}return Nk(n)},Ck=r=>{const n=r.trim().toLowerCase(),o=kk[n];if(o)return Yh(o.slice(1));if(n.startsWith("#"))return Yh(n.slice(1));const s=/^(rgba?|hsla?)\((.*)\)$/.exec(n);if(!s?.[1]||s[2]===void 0)return null;const d=Zh(s[2]);if(!d)return null;const[p="",f="",h="",m]=d,v=jk(m);if(v===null)return null;if(s[1].startsWith("rgb")){const[j,_,E]=[rc(p),rc(f),rc(h)];return j===null||_===null||E===null?null:{r:Math.round(j),g:Math.round(_),b:Math.round(E),a:v}}const[x,C,k]=[Jh(p),Qo(f),Qo(h)];return x===null||C===null||k===null?null:Yo({h:x,s:C,l:k,a:v})},eg=({r,g:n,b:o})=>{const s=d=>{const p=d/255;return p<=.03928?p/12.92:((p+.055)/1.055)**2.4};return .2126*s(r)+.7152*s(n)+.0722*s(o)},tg=(r,n)=>{const[o,s]=[eg(r),eg(n)].sort((d,p)=>p-d);return(o+.05)/(s+.05)},Zo=r=>Math.round(r*10)/10,Dr=({h:r,s:n,l:o,a:s})=>`${Zo(r)}, ${Zo(n)}%, ${Zo(o)}%${s<1?`, ${Zo(s*100)/100}`:""}`,rg={h:210,s:40,l:98,a:1},ag={h:222.2,s:47.4,l:11.2,a:1},Sk=r=>{const n=Gh(r);if(!n)return null;const o={...n,a:1},s={...o,l:xn(o.l>70?o.l-6:o.l+8,0,100)},d={...o,l:xn(o.l-10,0,100)},p=Yo(o),f=tg(p,Yo(rg)),h=f>=4.5||f>=tg(p,Yo(ag))?rg:ag;return{primary:Dr(o),primaryHovered:Dr(s),primaryPressed:Dr(d),primaryForeground:Dr(h),secondary:Dr({...o,a:.1}),ring:Dr({...o,a:.5})}},Ek=(...r)=>{const n={};for(const o of r)if(o)for(const[s,d]of Object.entries(o))d===void 0||d===""||(n[s]=d);return n},_k=r=>{const n={},o=r.primary?Sk(r.primary):null;o&&(n["--primary"]=o.primary,n["--primary-text"]=o.primary,n["--primary-hovered"]=o.primaryHovered,n["--primary-pressed"]=o.primaryPressed,n["--primary-foreground"]=o.primaryForeground,n["--secondary"]=o.secondary,n["--secondary-foreground"]=o.primary,n["--ring"]=o.ring),r.radius!==void 0&&r.radius!==""&&(n["--radius"]=typeof r.radius=="number"?`${r.radius}px`:r.radius),r.font&&(n["--aid-theme-font"]=r.font);const s=v=>{const x=v?Gh(v):null;return x?Dr(x):null},d=s(r.background);if(d)for(const v of["--background","--card","--popover"])n[v]=d;const p=s(r.foreground);if(p)for(const v of["--foreground","--card-foreground","--popover-foreground","--secondary-foreground"])n[v]=p;const f=s(r.bubble);if(f)for(const v of["--secondary","--muted","--accent"])n[v]=f;const h=s(r.border);if(h)for(const v of["--border","--input"])n[v]=h;const m=(v,x)=>{typeof x=="number"&&Number.isFinite(x)&&(n[v]=`${x}px`)};return m("--aid-t-window-width",r.windowWidth),m("--aid-t-window-height",r.windowHeight),m("--aid-t-offset-x",r.offsetX),m("--aid-t-offset-y",r.offsetY),n},zk=(r,n)=>r==="dark"||r==="auto"&&n?"dark":"light",Rk=(r,n,o={})=>{for(const s of Object.keys(o))s in n||r.style.removeProperty(s);for(const[s,d]of Object.entries(n))r.style.setProperty(s,d)},Mk=(r,n)=>{r.classList.toggle("dark",n==="dark"),r.dataset.scheme=n},ng=(r,n)=>{const o=parseFloat(r);return Number.isFinite(o)?o:n},ac=()=>{try{return window.localStorage}catch{return null}},og=(r,n,o)=>ng(r.getPropertyValue(`--aid-${n}`),ng(r.getPropertyValue(`--aid-t-${n}`),o)),Pk=r=>{const n=getComputedStyle(r);return{x:og(n,"offset-x",Bh.x),y:og(n,"offset-y",Bh.y)}},ig=()=>({width:window.innerWidth,height:window.innerHeight}),Lk={scheme:"auto"},Dk=(r,n)=>{const o=b.useSyncExternalStore(r.subscribe,()=>r.get().theme),s=b.useSyncExternalStore(r.subscribe,()=>r.get().adminTheme),d=El("(prefers-color-scheme: dark)"),p=Ek(Lk,s,o),f=zk(p.scheme,d),h=b.useRef({}),m=JSON.stringify(_k(p));return b.useLayoutEffect(()=>{const v=JSON.parse(m);Rk(n,v,h.current),h.current=v},[n,m]),b.useLayoutEffect(()=>{Mk(n,f)},[n,f]),p},Tk=r=>{const{store:n,api:o}=r,s=b.useSyncExternalStore(n.subscribe,()=>n.get().open),d=b.useSyncExternalStore(n.subscribe,()=>n.get().lang),p=b.useCallback(f=>{n.set({adminTheme:f})},[n]);return c.jsx(gy,{api:o,lang:d,open:s,onAdminTheme:p,children:c.jsx(Ik,{...r})})},Ik=({store:r,root:n,mode:o,corner:s,draggable:d,api:p})=>{const f=b.useSyncExternalStore(r.subscribe,()=>r.get().open),h=b.useSyncExternalStore(r.subscribe,()=>r.get().lang),m=Dk(r,n),v=s??m.position??"bottom-right",x=El(`(max-width: ${hk}px)`),C=b.useRef(null),[k,j]=b.useState(()=>Xo(mk(ac())??Pk(n),ig(),ec));b.useEffect(()=>{if(o!=="launcher")return;const B=()=>{const Q=C.current,me=Q?{width:Q.offsetWidth,height:Q.offsetHeight}:ec;j(Se=>Xo(Se,ig(),me))};return window.addEventListener("resize",B),()=>{window.removeEventListener("resize",B)}},[o]);const _=b.useCallback(()=>{r.set({open:!1})},[r]),E=b.useCallback(()=>{r.set({open:!r.get().open})},[r]),M=b.useRef(f);b.useEffect(()=>{M.current&&!f&&C.current?.focus({preventScroll:!0}),M.current=f},[f]);const F=m.title??wt(h,"title"),Z=Hp(p.apiUrl),oe=b.useMemo(()=>({animated:f,assetsBase:Z}),[f,Z]),[J,re]=b.useState({expanded:!1,byDashboard:!1}),{expanded:$}=J,X=o==="launcher"&&!x,K=b.useCallback(B=>{re({expanded:B,byDashboard:!1})},[]),fe=b.useCallback(B=>{re(Q=>F0(Q,B,X))},[X]),ee=m.scheme??"auto",de=b.useMemo(()=>({lang:h,scheme:ee,expanded:$,canExpand:X,setExpanded:K,expandForDashboard:fe,close:o==="launcher"?_:void 0,update:B=>{const Q={...Op(ac()),...B};$0(ac(),Q),r.set({...B.lang?{lang:B.lang}:{},theme:{...r.get().theme,...$p(B)}})}}),[h,ee,$,X,K,fe,o,_,r]);return o==="window"?c.jsx(il.Provider,{value:de,children:c.jsx(pl.Provider,{value:oe,children:c.jsx(Vh,{open:f,title:F,logoUrl:al(m.logoUrl),fullscreen:!1,onClose:_})})}):c.jsx(il.Provider,{value:de,children:c.jsxs(pl.Provider,{value:oe,children:[c.jsx("div",{part:"overlay",className:"aid-overlay","data-state":f?"open":"closed","aria-hidden":!0,onClick:_}),c.jsx(Vh,{open:f,title:F,logoUrl:al(m.logoUrl),fullscreen:x,expanded:$&&!x,onClose:_}),f?null:c.jsx(Qh,{ref:C,open:f,lang:h,corner:v,offset:k,draggable:d&&!x,variant:m.launcher,label:m.launcherLabel,shape:m.launcherShape,onOffsetChange:j,onToggle:E})]})})},sg="https://dev-ai.kgd.gov.kz",Ak=`${wb}
|
|
19
|
+
${X0}`,nc=(r,n,o,s)=>{const d=r.shadowRoot??r.attachShadow({mode:"open"});d.replaceChildren();const p=document.createElement("style");p.textContent=Ak;const f=document.createElement("div");f.className="aid-root",f.dataset.mode=o,d.append(p,f);let h=null;try{h=window.localStorage}catch{}const m=Op(h),v=H0({open:n.defaultOpen??o==="window",lang:m.lang??Tp(n.lang),theme:{...n.theme,...$p(m)},adminTheme:null});let x=v.get().open;const C=v.subscribe(()=>{const{open:E}=v.get();E!==x&&(x=E,n.onOpenChange?.(E))}),k=L0({apiUrl:n.apiUrl??sg,siteKey:n.siteKey,visitorId:_0(n.visitorId,h),rememberVisitor:E=>{try{h?.setItem(el,E)}catch{}}}),j=yb.createRoot(f);j.render(c.jsx(b.StrictMode,{children:c.jsx(ll,{fallback:null,children:c.jsx(Tk,{store:v,root:f,mode:o,corner:n.position,draggable:n.draggable??!0,api:k})})}));let _=!0;return{open:()=>{v.set({open:!0})},close:()=>{v.set({open:!1})},setTheme:E=>{v.set({theme:{...v.get().theme,...E}})},setLang:E=>{v.set({lang:Tp(E)})},unmount:()=>{_&&(_=!1,C(),j.unmount(),Z0(),d.replaceChildren(),s?.())}}};function lg(r,n){const o=r instanceof HTMLElement?n:n??r;if(!o)throw new TypeError("AiDanaChat.mountLauncher: options are required");if(r instanceof HTMLElement)return nc(r,o,"launcher");const s=document.createElement("div");return s.setAttribute("data-ai-dana-chat",""),s.style.setProperty("all","initial"),document.body.append(s),nc(s,o,"launcher",()=>{s.remove()})}const cg=(r,n)=>nc(r,n,"window"),dg=["light","dark","auto"];class oc extends HTMLElement{constructor(){super(...arguments),ia(this,"handle")}connectedCallback(){const n=this.getAttribute("theme"),o=this.getAttribute("position"),s=this.getAttribute("site-key"),d=this.getAttribute("api-url"),p={...s?{siteKey:s}:{},...d===null?{}:{apiUrl:d},...this.getAttribute("lang")?{lang:this.getAttribute("lang")}:{},...n&&dg.includes(n)?{theme:{scheme:n}}:{},...o==="bottom-left"||o==="bottom-right"?{position:o}:{},draggable:this.getAttribute("draggable")!=="false",defaultOpen:this.hasAttribute("open"),onOpenChange:f=>this.dispatchEvent(new CustomEvent("openchange",{detail:{open:f}}))};this.handle=this.hasAttribute("launcher")?lg(this,p):cg(this,p)}disconnectedCallback(){this.handle?.unmount(),this.handle=void 0}attributeChangedCallback(n,o,s){!this.handle||o===s||(n==="lang"&&s&&this.handle.setLang(s),n==="theme"&&s&&dg.includes(s)&&this.handle.setTheme({scheme:s}))}open(){this.handle?.open()}close(){this.handle?.close()}setTheme(n){this.handle?.setTheme(n)}setLang(n){this.handle?.setLang(n)}}ia(oc,"observedAttributes",["lang","theme"]),typeof customElements<"u"&&!customElements.get("ai-dana-chat")&&W0(()=>{customElements.get("ai-dana-chat")||customElements.define("ai-dana-chat",oc)},"1.0.13");export{aw as A,_r as C,sg as D,Ep as S,e0 as a,S0 as b,k0 as c,b as d,ua as e,Lh as f,tp as g,xl as h,Sl as i,c as j,oc as k,lg as l,cg as m,j0 as o,N0 as r,tn as s,jp as t,G as u,W as v,Do as w};
|