@dsrcjs/ai-widget 1.0.5 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,19 @@
1
+ var Jm=Object.defineProperty,eb=(r,a,o)=>a in r?Jm(r,a,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[a]=o,ln=(r,a,o)=>eb(r,typeof a!="symbol"?a+"":a,o);function tb(r,a){for(var o=0;o<a.length;o++){const l=a[o];if(typeof l!="string"&&!Array.isArray(l)){for(const d in l)if(d!=="default"&&!(d in r)){const p=Object.getOwnPropertyDescriptor(l,d);p&&Object.defineProperty(r,d,p.get?p:{enumerable:!0,get:()=>l[d]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}function op(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var ip={exports:{}},ea={},lp={exports:{}},Se={},sp;function rb(){if(sp)return Se;sp=1;var r=Symbol.for("react.element"),a=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),f=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),S=Symbol.iterator;function w(k){return k===null||typeof k!="object"?null:(k=S&&k[S]||k["@@iterator"],typeof k=="function"?k:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,E={};function R(k,L,ie){this.props=k,this.context=L,this.refs=E,this.updater=ie||C}R.prototype.isReactComponent={},R.prototype.setState=function(k,L){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,L,"setState")},R.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function $(){}$.prototype=R.prototype;function X(k,L,ie){this.props=k,this.context=L,this.refs=E,this.updater=ie||C}var ae=X.prototype=new $;ae.constructor=X,_(ae,R.prototype),ae.isPureReactComponent=!0;var G=Array.isArray,D=Object.prototype.hasOwnProperty,te={current:null},Z={key:!0,ref:!0,__self:!0,__source:!0};function re(k,L,ie){var V,le={},de=null,je=null;if(L!=null)for(V in L.ref!==void 0&&(je=L.ref),L.key!==void 0&&(de=""+L.key),L)D.call(L,V)&&!Z.hasOwnProperty(V)&&(le[V]=L[V]);var ke=arguments.length-2;if(ke===1)le.children=ie;else if(1<ke){for(var ve=Array(ke),We=0;We<ke;We++)ve[We]=arguments[We+2];le.children=ve}if(k&&k.defaultProps)for(V in ke=k.defaultProps,ke)le[V]===void 0&&(le[V]=ke[V]);return{$$typeof:r,type:k,key:de,ref:je,props:le,_owner:te.current}}function be(k,L){return{$$typeof:r,type:k.type,key:L,ref:k.ref,props:k.props,_owner:k._owner}}function Q(k){return typeof k=="object"&&k!==null&&k.$$typeof===r}function fe(k){var L={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(ie){return L[ie]})}var W=/\/+/g;function H(k,L){return typeof k=="object"&&k!==null&&k.key!=null?fe(""+k.key):L.toString(36)}function me(k,L,ie,V,le){var de=typeof k;(de==="undefined"||de==="boolean")&&(k=null);var je=!1;if(k===null)je=!0;else switch(de){case"string":case"number":je=!0;break;case"object":switch(k.$$typeof){case r:case a:je=!0}}if(je)return je=k,le=le(je),k=V===""?"."+H(je,0):V,G(le)?(ie="",k!=null&&(ie=k.replace(W,"$&/")+"/"),me(le,L,ie,"",function(We){return We})):le!=null&&(Q(le)&&(le=be(le,ie+(!le.key||je&&je.key===le.key?"":(""+le.key).replace(W,"$&/")+"/")+k)),L.push(le)),1;if(je=0,V=V===""?".":V+":",G(k))for(var ke=0;ke<k.length;ke++){de=k[ke];var ve=V+H(de,ke);je+=me(de,L,ie,ve,le)}else if(ve=w(k),typeof ve=="function")for(k=ve.call(k),ke=0;!(de=k.next()).done;)de=de.value,ve=V+H(de,ke++),je+=me(de,L,ie,ve,le);else if(de==="object")throw L=String(k),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.");return je}function Ce(k,L,ie){if(k==null)return k;var V=[],le=0;return me(k,V,"","",function(de){return L.call(ie,de,le++)}),V}function xe(k){if(k._status===-1){var L=k._result;L=L(),L.then(function(ie){(k._status===0||k._status===-1)&&(k._status=1,k._result=ie)},function(ie){(k._status===0||k._status===-1)&&(k._status=2,k._result=ie)}),k._status===-1&&(k._status=0,k._result=L)}if(k._status===1)return k._result.default;throw k._result}var ye={current:null},q={transition:null},P={ReactCurrentDispatcher:ye,ReactCurrentBatchConfig:q,ReactCurrentOwner:te};function T(){throw Error("act(...) is not supported in production builds of React.")}return Se.Children={map:Ce,forEach:function(k,L,ie){Ce(k,function(){L.apply(this,arguments)},ie)},count:function(k){var L=0;return Ce(k,function(){L++}),L},toArray:function(k){return Ce(k,function(L){return L})||[]},only:function(k){if(!Q(k))throw Error("React.Children.only expected to receive a single React element child.");return k}},Se.Component=R,Se.Fragment=o,Se.Profiler=d,Se.PureComponent=X,Se.StrictMode=l,Se.Suspense=m,Se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=P,Se.act=T,Se.cloneElement=function(k,L,ie){if(k==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+k+".");var V=_({},k.props),le=k.key,de=k.ref,je=k._owner;if(L!=null){if(L.ref!==void 0&&(de=L.ref,je=te.current),L.key!==void 0&&(le=""+L.key),k.type&&k.type.defaultProps)var ke=k.type.defaultProps;for(ve in L)D.call(L,ve)&&!Z.hasOwnProperty(ve)&&(V[ve]=L[ve]===void 0&&ke!==void 0?ke[ve]:L[ve])}var ve=arguments.length-2;if(ve===1)V.children=ie;else if(1<ve){ke=Array(ve);for(var We=0;We<ve;We++)ke[We]=arguments[We+2];V.children=ke}return{$$typeof:r,type:k.type,key:le,ref:de,props:V,_owner:je}},Se.createContext=function(k){return k={$$typeof:f,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},k.Provider={$$typeof:p,_context:k},k.Consumer=k},Se.createElement=re,Se.createFactory=function(k){var L=re.bind(null,k);return L.type=k,L},Se.createRef=function(){return{current:null}},Se.forwardRef=function(k){return{$$typeof:g,render:k}},Se.isValidElement=Q,Se.lazy=function(k){return{$$typeof:v,_payload:{_status:-1,_result:k},_init:xe}},Se.memo=function(k,L){return{$$typeof:b,type:k,compare:L===void 0?null:L}},Se.startTransition=function(k){var L=q.transition;q.transition={};try{k()}finally{q.transition=L}},Se.unstable_act=T,Se.useCallback=function(k,L){return ye.current.useCallback(k,L)},Se.useContext=function(k){return ye.current.useContext(k)},Se.useDebugValue=function(){},Se.useDeferredValue=function(k){return ye.current.useDeferredValue(k)},Se.useEffect=function(k,L){return ye.current.useEffect(k,L)},Se.useId=function(){return ye.current.useId()},Se.useImperativeHandle=function(k,L,ie){return ye.current.useImperativeHandle(k,L,ie)},Se.useInsertionEffect=function(k,L){return ye.current.useInsertionEffect(k,L)},Se.useLayoutEffect=function(k,L){return ye.current.useLayoutEffect(k,L)},Se.useMemo=function(k,L){return ye.current.useMemo(k,L)},Se.useReducer=function(k,L,ie){return ye.current.useReducer(k,L,ie)},Se.useRef=function(k){return ye.current.useRef(k)},Se.useState=function(k){return ye.current.useState(k)},Se.useSyncExternalStore=function(k,L,ie){return ye.current.useSyncExternalStore(k,L,ie)},Se.useTransition=function(){return ye.current.useTransition()},Se.version="18.3.1",Se}var cp;function Kl(){return cp||(cp=1,lp.exports=rb()),lp.exports}var dp;function nb(){if(dp)return ea;dp=1;var r=Kl(),a=Symbol.for("react.element"),o=Symbol.for("react.fragment"),l=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(g,m,b){var v,S={},w=null,C=null;b!==void 0&&(w=""+b),m.key!==void 0&&(w=""+m.key),m.ref!==void 0&&(C=m.ref);for(v in m)l.call(m,v)&&!p.hasOwnProperty(v)&&(S[v]=m[v]);if(g&&g.defaultProps)for(v in m=g.defaultProps,m)S[v]===void 0&&(S[v]=m[v]);return{$$typeof:a,type:g,key:w,ref:C,props:S,_owner:d.current}}return ea.Fragment=o,ea.jsx=f,ea.jsxs=f,ea}var up;function ab(){return up||(up=1,ip.exports=nb()),ip.exports}var s=ab(),x=Kl();const ob=op(x),ib=tb({__proto__:null,default:ob},[x]);var Mo={},Xl={exports:{}},it={},pp={exports:{}},fp={},hp;function lb(){return hp||(hp=1,(function(r){function a(q,P){var T=q.length;q.push(P);e:for(;0<T;){var k=T-1>>>1,L=q[k];if(0<d(L,P))q[k]=P,q[T]=L,T=k;else break e}}function o(q){return q.length===0?null:q[0]}function l(q){if(q.length===0)return null;var P=q[0],T=q.pop();if(T!==P){q[0]=T;e:for(var k=0,L=q.length,ie=L>>>1;k<ie;){var V=2*(k+1)-1,le=q[V],de=V+1,je=q[de];if(0>d(le,T))de<L&&0>d(je,le)?(q[k]=je,q[de]=T,k=de):(q[k]=le,q[V]=T,k=V);else if(de<L&&0>d(je,T))q[k]=je,q[de]=T,k=de;else break e}}return P}function d(q,P){var T=q.sortIndex-P.sortIndex;return T!==0?T:q.id-P.id}if(typeof performance=="object"&&typeof performance.now=="function"){var p=performance;r.unstable_now=function(){return p.now()}}else{var f=Date,g=f.now();r.unstable_now=function(){return f.now()-g}}var m=[],b=[],v=1,S=null,w=3,C=!1,_=!1,E=!1,R=typeof setTimeout=="function"?setTimeout:null,$=typeof clearTimeout=="function"?clearTimeout:null,X=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function ae(q){for(var P=o(b);P!==null;){if(P.callback===null)l(b);else if(P.startTime<=q)l(b),P.sortIndex=P.expirationTime,a(m,P);else break;P=o(b)}}function G(q){if(E=!1,ae(q),!_)if(o(m)!==null)_=!0,xe(D);else{var P=o(b);P!==null&&ye(G,P.startTime-q)}}function D(q,P){_=!1,E&&(E=!1,$(re),re=-1),C=!0;var T=w;try{for(ae(P),S=o(m);S!==null&&(!(S.expirationTime>P)||q&&!fe());){var k=S.callback;if(typeof k=="function"){S.callback=null,w=S.priorityLevel;var L=k(S.expirationTime<=P);P=r.unstable_now(),typeof L=="function"?S.callback=L:S===o(m)&&l(m),ae(P)}else l(m);S=o(m)}if(S!==null)var ie=!0;else{var V=o(b);V!==null&&ye(G,V.startTime-P),ie=!1}return ie}finally{S=null,w=T,C=!1}}var te=!1,Z=null,re=-1,be=5,Q=-1;function fe(){return!(r.unstable_now()-Q<be)}function W(){if(Z!==null){var q=r.unstable_now();Q=q;var P=!0;try{P=Z(!0,q)}finally{P?H():(te=!1,Z=null)}}else te=!1}var H;if(typeof X=="function")H=function(){X(W)};else if(typeof MessageChannel<"u"){var me=new MessageChannel,Ce=me.port2;me.port1.onmessage=W,H=function(){Ce.postMessage(null)}}else H=function(){R(W,0)};function xe(q){Z=q,te||(te=!0,H())}function ye(q,P){re=R(function(){q(r.unstable_now())},P)}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(q){q.callback=null},r.unstable_continueExecution=function(){_||C||(_=!0,xe(D))},r.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):be=0<q?Math.floor(1e3/q):5},r.unstable_getCurrentPriorityLevel=function(){return w},r.unstable_getFirstCallbackNode=function(){return o(m)},r.unstable_next=function(q){switch(w){case 1:case 2:case 3:var P=3;break;default:P=w}var T=w;w=P;try{return q()}finally{w=T}},r.unstable_pauseExecution=function(){},r.unstable_requestPaint=function(){},r.unstable_runWithPriority=function(q,P){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var T=w;w=q;try{return P()}finally{w=T}},r.unstable_scheduleCallback=function(q,P,T){var k=r.unstable_now();switch(typeof T=="object"&&T!==null?(T=T.delay,T=typeof T=="number"&&0<T?k+T:k):T=k,q){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,q={id:v++,callback:P,priorityLevel:q,startTime:T,expirationTime:L,sortIndex:-1},T>k?(q.sortIndex=T,a(b,q),o(m)===null&&q===o(b)&&(E?($(re),re=-1):E=!0,ye(G,T-k))):(q.sortIndex=L,a(m,q),_||C||(_=!0,xe(D))),q},r.unstable_shouldYield=fe,r.unstable_wrapCallback=function(q){var P=w;return function(){var T=w;w=P;try{return q.apply(this,arguments)}finally{w=T}}}})(fp)),fp}var gp;function sb(){return gp||(gp=1,pp.exports=lb()),pp.exports}var mp;function cb(){if(mp)return it;mp=1;var r=Kl(),a=sb();function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var l=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++)l.add(t[e])}var g=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),m=Object.prototype.hasOwnProperty,b=/^[: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]*$/,v={},S={};function w(e){return m.call(S,e)?!0:m.call(v,e)?!1:b.test(e)?S[e]=!0:(v[e]=!0,!1)}function C(e,t,n,i){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function _(e,t,n,i){if(t===null||typeof t>"u"||C(e,t,n,i))return!0;if(i)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function E(e,t,n,i,c,u,h){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=c,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=u,this.removeEmptyString=h}var R={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){R[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];R[t]=new E(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){R[e]=new E(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){R[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){R[e]=new E(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){R[e]=new E(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){R[e]=new E(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){R[e]=new E(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){R[e]=new E(e,5,!1,e.toLowerCase(),null,!1,!1)});var $=/[\-:]([a-z])/g;function X(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($,X);R[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($,X);R[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($,X);R[t]=new E(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){R[e]=new E(e,1,!1,e.toLowerCase(),null,!1,!1)}),R.xlinkHref=new E("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){R[e]=new E(e,1,!1,e.toLowerCase(),null,!0,!0)});function ae(e,t,n,i){var c=R.hasOwnProperty(t)?R[t]:null;(c!==null?c.type!==0:i||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(_(t,n,c,i)&&(n=null),i||c===null?w(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):c.mustUseProperty?e[c.propertyName]=n===null?c.type===3?!1:"":n:(t=c.attributeName,i=c.attributeNamespace,n===null?e.removeAttribute(t):(c=c.type,n=c===3||c===4&&n===!0?"":""+n,i?e.setAttributeNS(i,t,n):e.setAttribute(t,n))))}var G=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,D=Symbol.for("react.element"),te=Symbol.for("react.portal"),Z=Symbol.for("react.fragment"),re=Symbol.for("react.strict_mode"),be=Symbol.for("react.profiler"),Q=Symbol.for("react.provider"),fe=Symbol.for("react.context"),W=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),me=Symbol.for("react.suspense_list"),Ce=Symbol.for("react.memo"),xe=Symbol.for("react.lazy"),ye=Symbol.for("react.offscreen"),q=Symbol.iterator;function P(e){return e===null||typeof e!="object"?null:(e=q&&e[q]||e["@@iterator"],typeof e=="function"?e:null)}var T=Object.assign,k;function L(e){if(k===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);k=t&&t[1]||""}return`
2
+ `+k+e}var ie=!1;function V(e,t){if(!e||ie)return"";ie=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(I){var i=I}Reflect.construct(e,[],t)}else{try{t.call()}catch(I){i=I}e.call(t.prototype)}else{try{throw Error()}catch(I){i=I}e()}}catch(I){if(I&&i&&typeof I.stack=="string"){for(var c=I.stack.split(`
3
+ `),u=i.stack.split(`
4
+ `),h=c.length-1,y=u.length-1;1<=h&&0<=y&&c[h]!==u[y];)y--;for(;1<=h&&0<=y;h--,y--)if(c[h]!==u[y]){if(h!==1||y!==1)do if(h--,y--,0>y||c[h]!==u[y]){var j=`
5
+ `+c[h].replace(" at new "," at ");return e.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",e.displayName)),j}while(1<=h&&0<=y);break}}}finally{ie=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?L(e):""}function le(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 de(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 Z:return"Fragment";case te:return"Portal";case be:return"Profiler";case re:return"StrictMode";case H:return"Suspense";case me:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case fe:return(e.displayName||"Context")+".Consumer";case Q:return(e._context.displayName||"Context")+".Provider";case W:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ce:return t=e.displayName||null,t!==null?t:de(e.type)||"Memo";case xe:t=e._payload,e=e._init;try{return de(e(t))}catch{}}return null}function je(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 de(t);case 8:return t===re?"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 ve(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function We(e){var t=ve(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var c=n.get,u=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(h){i=""+h,u.call(this,h)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(h){i=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function va(e){e._valueTracker||(e._valueTracker=We(e))}function dc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=ve(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function ya(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 ri(e,t){var n=t.checked;return T({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function uc(e,t){var n=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;n=ke(t.value!=null?t.value:n),e._wrapperState={initialChecked:i,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function pc(e,t){t=t.checked,t!=null&&ae(e,"checked",t,!1)}function ni(e,t){pc(e,t);var n=ke(t.value),i=t.type;if(n!=null)i==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ai(e,t.type,n):t.hasOwnProperty("defaultValue")&&ai(e,t.type,ke(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function fc(e,t,n){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,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ai(e,t,n){(t!=="number"||ya(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var gn=Array.isArray;function Tr(e,t,n,i){if(e=e.options,t){t={};for(var c=0;c<n.length;c++)t["$"+n[c]]=!0;for(n=0;n<e.length;n++)c=t.hasOwnProperty("$"+e[n].value),e[n].selected!==c&&(e[n].selected=c),c&&i&&(e[n].defaultSelected=!0)}else{for(n=""+ke(n),t=null,c=0;c<e.length;c++){if(e[c].value===n){e[c].selected=!0,i&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function oi(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(o(91));return T({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function hc(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(o(92));if(gn(n)){if(1<n.length)throw Error(o(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ke(n)}}function gc(e,t){var n=ke(t.value),i=ke(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),i!=null&&(e.defaultValue=""+i)}function mc(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function bc(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 ii(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?bc(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var wa,xc=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,i,c){MSApp.execUnsafeLocalFunction(function(){return e(t,n,i,c)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(wa=wa||document.createElement("div"),wa.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=wa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function mn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var bn={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},ng=["Webkit","ms","Moz","O"];Object.keys(bn).forEach(function(e){ng.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),bn[t]=bn[e]})});function vc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||bn.hasOwnProperty(e)&&bn[e]?(""+t).trim():t+"px"}function yc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var i=n.indexOf("--")===0,c=vc(n,t[n],i);n==="float"&&(n="cssFloat"),i?e.setProperty(n,c):e[n]=c}}var ag=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 li(e,t){if(t){if(ag[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 si(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 ci=null;function di(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ui=null,Ar=null,Fr=null;function wc(e){if(e=On(e)){if(typeof ui!="function")throw Error(o(280));var t=e.stateNode;t&&(t=Ba(t),ui(e.stateNode,e.type,t))}}function kc(e){Ar?Fr?Fr.push(e):Fr=[e]:Ar=e}function Sc(){if(Ar){var e=Ar,t=Fr;if(Fr=Ar=null,wc(e),t)for(e=0;e<t.length;e++)wc(t[e])}}function jc(e,t){return e(t)}function Nc(){}var pi=!1;function Cc(e,t,n){if(pi)return e(t,n);pi=!0;try{return jc(e,t,n)}finally{pi=!1,(Ar!==null||Fr!==null)&&(Nc(),Sc())}}function xn(e,t){var n=e.stateNode;if(n===null)return null;var i=Ba(n);if(i===null)return null;n=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(n&&typeof n!="function")throw Error(o(231,t,typeof n));return n}var fi=!1;if(g)try{var vn={};Object.defineProperty(vn,"passive",{get:function(){fi=!0}}),window.addEventListener("test",vn,vn),window.removeEventListener("test",vn,vn)}catch{fi=!1}function og(e,t,n,i,c,u,h,y,j){var I=Array.prototype.slice.call(arguments,3);try{t.apply(n,I)}catch(F){this.onError(F)}}var yn=!1,ka=null,Sa=!1,hi=null,ig={onError:function(e){yn=!0,ka=e}};function lg(e,t,n,i,c,u,h,y,j){yn=!1,ka=null,og.apply(ig,arguments)}function sg(e,t,n,i,c,u,h,y,j){if(lg.apply(this,arguments),yn){if(yn){var I=ka;yn=!1,ka=null}else throw Error(o(198));Sa||(Sa=!0,hi=I)}}function gr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Ec(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 _c(e){if(gr(e)!==e)throw Error(o(188))}function cg(e){var t=e.alternate;if(!t){if(t=gr(e),t===null)throw Error(o(188));return t!==e?null:e}for(var n=e,i=t;;){var c=n.return;if(c===null)break;var u=c.alternate;if(u===null){if(i=c.return,i!==null){n=i;continue}break}if(c.child===u.child){for(u=c.child;u;){if(u===n)return _c(c),e;if(u===i)return _c(c),t;u=u.sibling}throw Error(o(188))}if(n.return!==i.return)n=c,i=u;else{for(var h=!1,y=c.child;y;){if(y===n){h=!0,n=c,i=u;break}if(y===i){h=!0,i=c,n=u;break}y=y.sibling}if(!h){for(y=u.child;y;){if(y===n){h=!0,n=u,i=c;break}if(y===i){h=!0,i=u,n=c;break}y=y.sibling}if(!h)throw Error(o(189))}}if(n.alternate!==i)throw Error(o(190))}if(n.tag!==3)throw Error(o(188));return n.stateNode.current===n?e:t}function zc(e){return e=cg(e),e!==null?Mc(e):null}function Mc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Mc(e);if(t!==null)return t;e=e.sibling}return null}var Rc=a.unstable_scheduleCallback,Ic=a.unstable_cancelCallback,dg=a.unstable_shouldYield,ug=a.unstable_requestPaint,Fe=a.unstable_now,pg=a.unstable_getCurrentPriorityLevel,gi=a.unstable_ImmediatePriority,Lc=a.unstable_UserBlockingPriority,ja=a.unstable_NormalPriority,fg=a.unstable_LowPriority,Pc=a.unstable_IdlePriority,Na=null,Mt=null;function hg(e){if(Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(Na,e,void 0,(e.current.flags&128)===128)}catch{}}var wt=Math.clz32?Math.clz32:bg,gg=Math.log,mg=Math.LN2;function bg(e){return e>>>=0,e===0?32:31-(gg(e)/mg|0)|0}var Ca=64,Ea=4194304;function wn(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 _a(e,t){var n=e.pendingLanes;if(n===0)return 0;var i=0,c=e.suspendedLanes,u=e.pingedLanes,h=n&268435455;if(h!==0){var y=h&~c;y!==0?i=wn(y):(u&=h,u!==0&&(i=wn(u)))}else h=n&~c,h!==0?i=wn(h):u!==0&&(i=wn(u));if(i===0)return 0;if(t!==0&&t!==i&&(t&c)===0&&(c=i&-i,u=t&-t,c>=u||c===16&&(u&4194240)!==0))return t;if((i&4)!==0&&(i|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0<t;)n=31-wt(t),c=1<<n,i|=e[n],t&=~c;return i}function xg(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 vg(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,c=e.expirationTimes,u=e.pendingLanes;0<u;){var h=31-wt(u),y=1<<h,j=c[h];j===-1?((y&n)===0||(y&i)!==0)&&(c[h]=xg(y,t)):j<=t&&(e.expiredLanes|=y),u&=~y}}function mi(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Tc(){var e=Ca;return Ca<<=1,(Ca&4194240)===0&&(Ca=64),e}function bi(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function kn(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-wt(t),e[t]=n}function yg(e,t){var n=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<n;){var c=31-wt(n),u=1<<c;t[c]=0,i[c]=-1,e[c]=-1,n&=~u}}function xi(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var i=31-wt(n),c=1<<i;c&t|e[i]&t&&(e[i]|=t),n&=~c}}var _e=0;function Ac(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Fc,vi,Dc,Oc,$c,yi=!1,za=[],Ht=null,Qt=null,Kt=null,Sn=new Map,jn=new Map,Xt=[],wg="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 qc(e,t){switch(e){case"focusin":case"focusout":Ht=null;break;case"dragenter":case"dragleave":Qt=null;break;case"mouseover":case"mouseout":Kt=null;break;case"pointerover":case"pointerout":Sn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":jn.delete(t.pointerId)}}function Nn(e,t,n,i,c,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:n,eventSystemFlags:i,nativeEvent:u,targetContainers:[c]},t!==null&&(t=On(t),t!==null&&vi(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function kg(e,t,n,i,c){switch(t){case"focusin":return Ht=Nn(Ht,e,t,n,i,c),!0;case"dragenter":return Qt=Nn(Qt,e,t,n,i,c),!0;case"mouseover":return Kt=Nn(Kt,e,t,n,i,c),!0;case"pointerover":var u=c.pointerId;return Sn.set(u,Nn(Sn.get(u)||null,e,t,n,i,c)),!0;case"gotpointercapture":return u=c.pointerId,jn.set(u,Nn(jn.get(u)||null,e,t,n,i,c)),!0}return!1}function Uc(e){var t=mr(e.target);if(t!==null){var n=gr(t);if(n!==null){if(t=n.tag,t===13){if(t=Ec(n),t!==null){e.blockedOn=t,$c(e.priority,function(){Dc(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ma(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=ki(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var i=new n.constructor(n.type,n);ci=i,n.target.dispatchEvent(i),ci=null}else return t=On(n),t!==null&&vi(t),e.blockedOn=n,!1;t.shift()}return!0}function Vc(e,t,n){Ma(e)&&n.delete(t)}function Sg(){yi=!1,Ht!==null&&Ma(Ht)&&(Ht=null),Qt!==null&&Ma(Qt)&&(Qt=null),Kt!==null&&Ma(Kt)&&(Kt=null),Sn.forEach(Vc),jn.forEach(Vc)}function Cn(e,t){e.blockedOn===t&&(e.blockedOn=null,yi||(yi=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,Sg)))}function En(e){function t(c){return Cn(c,e)}if(0<za.length){Cn(za[0],e);for(var n=1;n<za.length;n++){var i=za[n];i.blockedOn===e&&(i.blockedOn=null)}}for(Ht!==null&&Cn(Ht,e),Qt!==null&&Cn(Qt,e),Kt!==null&&Cn(Kt,e),Sn.forEach(t),jn.forEach(t),n=0;n<Xt.length;n++)i=Xt[n],i.blockedOn===e&&(i.blockedOn=null);for(;0<Xt.length&&(n=Xt[0],n.blockedOn===null);)Uc(n),n.blockedOn===null&&Xt.shift()}var Dr=G.ReactCurrentBatchConfig,Ra=!0;function jg(e,t,n,i){var c=_e,u=Dr.transition;Dr.transition=null;try{_e=1,wi(e,t,n,i)}finally{_e=c,Dr.transition=u}}function Ng(e,t,n,i){var c=_e,u=Dr.transition;Dr.transition=null;try{_e=4,wi(e,t,n,i)}finally{_e=c,Dr.transition=u}}function wi(e,t,n,i){if(Ra){var c=ki(e,t,n,i);if(c===null)Oi(e,t,i,Ia,n),qc(e,i);else if(kg(c,e,t,n,i))i.stopPropagation();else if(qc(e,i),t&4&&-1<wg.indexOf(e)){for(;c!==null;){var u=On(c);if(u!==null&&Fc(u),u=ki(e,t,n,i),u===null&&Oi(e,t,i,Ia,n),u===c)break;c=u}c!==null&&i.stopPropagation()}else Oi(e,t,i,null,n)}}var Ia=null;function ki(e,t,n,i){if(Ia=null,e=di(i),e=mr(e),e!==null)if(t=gr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Ec(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ia=e,null}function Bc(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(pg()){case gi:return 1;case Lc:return 4;case ja:case fg:return 16;case Pc:return 536870912;default:return 16}default:return 16}}var Gt=null,Si=null,La=null;function Wc(){if(La)return La;var e,t=Si,n=t.length,i,c="value"in Gt?Gt.value:Gt.textContent,u=c.length;for(e=0;e<n&&t[e]===c[e];e++);var h=n-e;for(i=1;i<=h&&t[n-i]===c[u-i];i++);return La=c.slice(e,1<i?1-i:void 0)}function Pa(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 Ta(){return!0}function Hc(){return!1}function lt(e){function t(n,i,c,u,h){this._reactName=n,this._targetInst=c,this.type=i,this.nativeEvent=u,this.target=h,this.currentTarget=null;for(var y in e)e.hasOwnProperty(y)&&(n=e[y],this[y]=n?n(u):u[y]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Ta:Hc,this.isPropagationStopped=Hc,this}return T(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ta)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ta)},persist:function(){},isPersistent:Ta}),t}var Or={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ji=lt(Or),_n=T({},Or,{view:0,detail:0}),Cg=lt(_n),Ni,Ci,zn,Aa=T({},_n,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_i,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!==zn&&(zn&&e.type==="mousemove"?(Ni=e.screenX-zn.screenX,Ci=e.screenY-zn.screenY):Ci=Ni=0,zn=e),Ni)},movementY:function(e){return"movementY"in e?e.movementY:Ci}}),Qc=lt(Aa),Eg=T({},Aa,{dataTransfer:0}),_g=lt(Eg),zg=T({},_n,{relatedTarget:0}),Ei=lt(zg),Mg=T({},Or,{animationName:0,elapsedTime:0,pseudoElement:0}),Rg=lt(Mg),Ig=T({},Or,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Lg=lt(Ig),Pg=T({},Or,{data:0}),Kc=lt(Pg),Tg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ag={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"},Fg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Dg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Fg[e])?!!t[e]:!1}function _i(){return Dg}var Og=T({},_n,{key:function(e){if(e.key){var t=Tg[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Pa(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ag[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_i,charCode:function(e){return e.type==="keypress"?Pa(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Pa(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),$g=lt(Og),qg=T({},Aa,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Xc=lt(qg),Ug=T({},_n,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_i}),Vg=lt(Ug),Bg=T({},Or,{propertyName:0,elapsedTime:0,pseudoElement:0}),Wg=lt(Bg),Hg=T({},Aa,{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}),Qg=lt(Hg),Kg=[9,13,27,32],zi=g&&"CompositionEvent"in window,Mn=null;g&&"documentMode"in document&&(Mn=document.documentMode);var Xg=g&&"TextEvent"in window&&!Mn,Gc=g&&(!zi||Mn&&8<Mn&&11>=Mn),Zc=" ",Yc=!1;function Jc(e,t){switch(e){case"keyup":return Kg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ed(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var $r=!1;function Gg(e,t){switch(e){case"compositionend":return ed(t);case"keypress":return t.which!==32?null:(Yc=!0,Zc);case"textInput":return e=t.data,e===Zc&&Yc?null:e;default:return null}}function Zg(e,t){if($r)return e==="compositionend"||!zi&&Jc(e,t)?(e=Wc(),La=Si=Gt=null,$r=!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 Gc&&t.locale!=="ko"?null:t.data;default:return null}}var Yg={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 td(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Yg[e.type]:t==="textarea"}function rd(e,t,n,i){kc(i),t=qa(t,"onChange"),0<t.length&&(n=new ji("onChange","change",null,n,i),e.push({event:n,listeners:t}))}var Rn=null,In=null;function Jg(e){yd(e,0)}function Fa(e){var t=Wr(e);if(dc(t))return e}function em(e,t){if(e==="change")return t}var nd=!1;if(g){var Mi;if(g){var Ri="oninput"in document;if(!Ri){var ad=document.createElement("div");ad.setAttribute("oninput","return;"),Ri=typeof ad.oninput=="function"}Mi=Ri}else Mi=!1;nd=Mi&&(!document.documentMode||9<document.documentMode)}function od(){Rn&&(Rn.detachEvent("onpropertychange",id),In=Rn=null)}function id(e){if(e.propertyName==="value"&&Fa(In)){var t=[];rd(t,In,e,di(e)),Cc(Jg,t)}}function tm(e,t,n){e==="focusin"?(od(),Rn=t,In=n,Rn.attachEvent("onpropertychange",id)):e==="focusout"&&od()}function rm(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Fa(In)}function nm(e,t){if(e==="click")return Fa(t)}function am(e,t){if(e==="input"||e==="change")return Fa(t)}function om(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kt=typeof Object.is=="function"?Object.is:om;function Ln(e,t){if(kt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var c=n[i];if(!m.call(t,c)||!kt(e[c],t[c]))return!1}return!0}function ld(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function sd(e,t){var n=ld(e);e=0;for(var i;n;){if(n.nodeType===3){if(i=e+n.textContent.length,e<=t&&i>=t)return{node:n,offset:t-e};e=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ld(n)}}function cd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?cd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function dd(){for(var e=window,t=ya();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ya(e.document)}return t}function Ii(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 im(e){var t=dd(),n=e.focusedElem,i=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&cd(n.ownerDocument.documentElement,n)){if(i!==null&&Ii(n)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var c=n.textContent.length,u=Math.min(i.start,c);i=i.end===void 0?u:Math.min(i.end,c),!e.extend&&u>i&&(c=i,i=u,u=c),c=sd(n,u);var h=sd(n,i);c&&h&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==h.node||e.focusOffset!==h.offset)&&(t=t.createRange(),t.setStart(c.node,c.offset),e.removeAllRanges(),u>i?(e.addRange(t),e.extend(h.node,h.offset)):(t.setEnd(h.node,h.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var lm=g&&"documentMode"in document&&11>=document.documentMode,qr=null,Li=null,Pn=null,Pi=!1;function ud(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Pi||qr==null||qr!==ya(i)||(i=qr,"selectionStart"in i&&Ii(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}),Pn&&Ln(Pn,i)||(Pn=i,i=qa(Li,"onSelect"),0<i.length&&(t=new ji("onSelect","select",null,t,n),e.push({event:t,listeners:i}),t.target=qr)))}function Da(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ur={animationend:Da("Animation","AnimationEnd"),animationiteration:Da("Animation","AnimationIteration"),animationstart:Da("Animation","AnimationStart"),transitionend:Da("Transition","TransitionEnd")},Ti={},pd={};g&&(pd=document.createElement("div").style,"AnimationEvent"in window||(delete Ur.animationend.animation,delete Ur.animationiteration.animation,delete Ur.animationstart.animation),"TransitionEvent"in window||delete Ur.transitionend.transition);function Oa(e){if(Ti[e])return Ti[e];if(!Ur[e])return e;var t=Ur[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in pd)return Ti[e]=t[n];return e}var fd=Oa("animationend"),hd=Oa("animationiteration"),gd=Oa("animationstart"),md=Oa("transitionend"),bd=new Map,xd="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 Zt(e,t){bd.set(e,t),p(t,[e])}for(var Ai=0;Ai<xd.length;Ai++){var Fi=xd[Ai],sm=Fi.toLowerCase(),cm=Fi[0].toUpperCase()+Fi.slice(1);Zt(sm,"on"+cm)}Zt(fd,"onAnimationEnd"),Zt(hd,"onAnimationIteration"),Zt(gd,"onAnimationStart"),Zt("dblclick","onDoubleClick"),Zt("focusin","onFocus"),Zt("focusout","onBlur"),Zt(md,"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 Tn="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(" "),dm=new Set("cancel close invalid load scroll toggle".split(" ").concat(Tn));function vd(e,t,n){var i=e.type||"unknown-event";e.currentTarget=n,sg(i,t,void 0,e),e.currentTarget=null}function yd(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var i=e[n],c=i.event;i=i.listeners;e:{var u=void 0;if(t)for(var h=i.length-1;0<=h;h--){var y=i[h],j=y.instance,I=y.currentTarget;if(y=y.listener,j!==u&&c.isPropagationStopped())break e;vd(c,y,I),u=j}else for(h=0;h<i.length;h++){if(y=i[h],j=y.instance,I=y.currentTarget,y=y.listener,j!==u&&c.isPropagationStopped())break e;vd(c,y,I),u=j}}}if(Sa)throw e=hi,Sa=!1,hi=null,e}function Me(e,t){var n=t[Wi];n===void 0&&(n=t[Wi]=new Set);var i=e+"__bubble";n.has(i)||(wd(t,e,2,!1),n.add(i))}function Di(e,t,n){var i=0;t&&(i|=4),wd(n,e,i,t)}var $a="_reactListening"+Math.random().toString(36).slice(2);function An(e){if(!e[$a]){e[$a]=!0,l.forEach(function(n){n!=="selectionchange"&&(dm.has(n)||Di(n,!1,e),Di(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[$a]||(t[$a]=!0,Di("selectionchange",!1,t))}}function wd(e,t,n,i){switch(Bc(t)){case 1:var c=jg;break;case 4:c=Ng;break;default:c=wi}n=c.bind(null,t,n,e),c=void 0,!fi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),i?c!==void 0?e.addEventListener(t,n,{capture:!0,passive:c}):e.addEventListener(t,n,!0):c!==void 0?e.addEventListener(t,n,{passive:c}):e.addEventListener(t,n,!1)}function Oi(e,t,n,i,c){var u=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var h=i.tag;if(h===3||h===4){var y=i.stateNode.containerInfo;if(y===c||y.nodeType===8&&y.parentNode===c)break;if(h===4)for(h=i.return;h!==null;){var j=h.tag;if((j===3||j===4)&&(j=h.stateNode.containerInfo,j===c||j.nodeType===8&&j.parentNode===c))return;h=h.return}for(;y!==null;){if(h=mr(y),h===null)return;if(j=h.tag,j===5||j===6){i=u=h;continue e}y=y.parentNode}}i=i.return}Cc(function(){var I=u,F=di(n),O=[];e:{var A=bd.get(e);if(A!==void 0){var K=ji,ee=e;switch(e){case"keypress":if(Pa(n)===0)break e;case"keydown":case"keyup":K=$g;break;case"focusin":ee="focus",K=Ei;break;case"focusout":ee="blur",K=Ei;break;case"beforeblur":case"afterblur":K=Ei;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":K=Qc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":K=_g;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":K=Vg;break;case fd:case hd:case gd:K=Rg;break;case md:K=Wg;break;case"scroll":K=Cg;break;case"wheel":K=Qg;break;case"copy":case"cut":case"paste":K=Lg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":K=Xc}var ne=(t&4)!==0,De=!ne&&e==="scroll",z=ne?A!==null?A+"Capture":null:A;ne=[];for(var N=I,M;N!==null;){M=N;var U=M.stateNode;if(M.tag===5&&U!==null&&(M=U,z!==null&&(U=xn(N,z),U!=null&&ne.push(Fn(N,U,M)))),De)break;N=N.return}0<ne.length&&(A=new K(A,ee,null,n,F),O.push({event:A,listeners:ne}))}}if((t&7)===0){e:{if(A=e==="mouseover"||e==="pointerover",K=e==="mouseout"||e==="pointerout",A&&n!==ci&&(ee=n.relatedTarget||n.fromElement)&&(mr(ee)||ee[Tt]))break e;if((K||A)&&(A=F.window===F?F:(A=F.ownerDocument)?A.defaultView||A.parentWindow:window,K?(ee=n.relatedTarget||n.toElement,K=I,ee=ee?mr(ee):null,ee!==null&&(De=gr(ee),ee!==De||ee.tag!==5&&ee.tag!==6)&&(ee=null)):(K=null,ee=I),K!==ee)){if(ne=Qc,U="onMouseLeave",z="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(ne=Xc,U="onPointerLeave",z="onPointerEnter",N="pointer"),De=K==null?A:Wr(K),M=ee==null?A:Wr(ee),A=new ne(U,N+"leave",K,n,F),A.target=De,A.relatedTarget=M,U=null,mr(F)===I&&(ne=new ne(z,N+"enter",ee,n,F),ne.target=M,ne.relatedTarget=De,U=ne),De=U,K&&ee)t:{for(ne=K,z=ee,N=0,M=ne;M;M=Vr(M))N++;for(M=0,U=z;U;U=Vr(U))M++;for(;0<N-M;)ne=Vr(ne),N--;for(;0<M-N;)z=Vr(z),M--;for(;N--;){if(ne===z||z!==null&&ne===z.alternate)break t;ne=Vr(ne),z=Vr(z)}ne=null}else ne=null;K!==null&&kd(O,A,K,ne,!1),ee!==null&&De!==null&&kd(O,De,ee,ne,!0)}}e:{if(A=I?Wr(I):window,K=A.nodeName&&A.nodeName.toLowerCase(),K==="select"||K==="input"&&A.type==="file")var oe=em;else if(td(A))if(nd)oe=am;else{oe=rm;var ue=tm}else(K=A.nodeName)&&K.toLowerCase()==="input"&&(A.type==="checkbox"||A.type==="radio")&&(oe=nm);if(oe&&(oe=oe(e,I))){rd(O,oe,n,F);break e}ue&&ue(e,A,I),e==="focusout"&&(ue=A._wrapperState)&&ue.controlled&&A.type==="number"&&ai(A,"number",A.value)}switch(ue=I?Wr(I):window,e){case"focusin":(td(ue)||ue.contentEditable==="true")&&(qr=ue,Li=I,Pn=null);break;case"focusout":Pn=Li=qr=null;break;case"mousedown":Pi=!0;break;case"contextmenu":case"mouseup":case"dragend":Pi=!1,ud(O,n,F);break;case"selectionchange":if(lm)break;case"keydown":case"keyup":ud(O,n,F)}var pe;if(zi)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 $r?Jc(e,n)&&(he="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(he="onCompositionStart");he&&(Gc&&n.locale!=="ko"&&($r||he!=="onCompositionStart"?he==="onCompositionEnd"&&$r&&(pe=Wc()):(Gt=F,Si="value"in Gt?Gt.value:Gt.textContent,$r=!0)),ue=qa(I,he),0<ue.length&&(he=new Kc(he,e,null,n,F),O.push({event:he,listeners:ue}),pe?he.data=pe:(pe=ed(n),pe!==null&&(he.data=pe)))),(pe=Xg?Gg(e,n):Zg(e,n))&&(I=qa(I,"onBeforeInput"),0<I.length&&(F=new Kc("onBeforeInput","beforeinput",null,n,F),O.push({event:F,listeners:I}),F.data=pe))}yd(O,t)})}function Fn(e,t,n){return{instance:e,listener:t,currentTarget:n}}function qa(e,t){for(var n=t+"Capture",i=[];e!==null;){var c=e,u=c.stateNode;c.tag===5&&u!==null&&(c=u,u=xn(e,n),u!=null&&i.unshift(Fn(e,u,c)),u=xn(e,t),u!=null&&i.push(Fn(e,u,c))),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 kd(e,t,n,i,c){for(var u=t._reactName,h=[];n!==null&&n!==i;){var y=n,j=y.alternate,I=y.stateNode;if(j!==null&&j===i)break;y.tag===5&&I!==null&&(y=I,c?(j=xn(n,u),j!=null&&h.unshift(Fn(n,j,y))):c||(j=xn(n,u),j!=null&&h.push(Fn(n,j,y)))),n=n.return}h.length!==0&&e.push({event:t,listeners:h})}var um=/\r\n?/g,pm=/\u0000|\uFFFD/g;function Sd(e){return(typeof e=="string"?e:""+e).replace(um,`
6
+ `).replace(pm,"")}function Ua(e,t,n){if(t=Sd(t),Sd(e)!==t&&n)throw Error(o(425))}function Va(){}var $i=null,qi=null;function Ui(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 Vi=typeof setTimeout=="function"?setTimeout:void 0,fm=typeof clearTimeout=="function"?clearTimeout:void 0,jd=typeof Promise=="function"?Promise:void 0,hm=typeof queueMicrotask=="function"?queueMicrotask:typeof jd<"u"?function(e){return jd.resolve(null).then(e).catch(gm)}:Vi;function gm(e){setTimeout(function(){throw e})}function Bi(e,t){var n=t,i=0;do{var c=n.nextSibling;if(e.removeChild(n),c&&c.nodeType===8)if(n=c.data,n==="/$"){if(i===0){e.removeChild(c),En(t);return}i--}else n!=="$"&&n!=="$?"&&n!=="$!"||i++;n=c}while(n);En(t)}function Yt(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 Nd(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Br=Math.random().toString(36).slice(2),Rt="__reactFiber$"+Br,Dn="__reactProps$"+Br,Tt="__reactContainer$"+Br,Wi="__reactEvents$"+Br,mm="__reactListeners$"+Br,bm="__reactHandles$"+Br;function mr(e){var t=e[Rt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Tt]||n[Rt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Nd(e);e!==null;){if(n=e[Rt])return n;e=Nd(e)}return t}e=n,n=e.parentNode}return null}function On(e){return e=e[Rt]||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 Ba(e){return e[Dn]||null}var Hi=[],Hr=-1;function Jt(e){return{current:e}}function Re(e){0>Hr||(e.current=Hi[Hr],Hi[Hr]=null,Hr--)}function ze(e,t){Hr++,Hi[Hr]=e.current,e.current=t}var er={},Ke=Jt(er),tt=Jt(!1),br=er;function Qr(e,t){var n=e.type.contextTypes;if(!n)return er;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var c={},u;for(u in n)c[u]=t[u];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=c),c}function rt(e){return e=e.childContextTypes,e!=null}function Wa(){Re(tt),Re(Ke)}function Cd(e,t,n){if(Ke.current!==er)throw Error(o(168));ze(Ke,t),ze(tt,n)}function Ed(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return n;i=i.getChildContext();for(var c in i)if(!(c in t))throw Error(o(108,je(e)||"Unknown",c));return T({},n,i)}function Ha(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||er,br=Ke.current,ze(Ke,e),ze(tt,tt.current),!0}function _d(e,t,n){var i=e.stateNode;if(!i)throw Error(o(169));n?(e=Ed(e,t,br),i.__reactInternalMemoizedMergedChildContext=e,Re(tt),Re(Ke),ze(Ke,e)):Re(tt),ze(tt,n)}var At=null,Qa=!1,Qi=!1;function zd(e){At===null?At=[e]:At.push(e)}function xm(e){Qa=!0,zd(e)}function tr(){if(!Qi&&At!==null){Qi=!0;var e=0,t=_e;try{var n=At;for(_e=1;e<n.length;e++){var i=n[e];do i=i(!0);while(i!==null)}At=null,Qa=!1}catch(c){throw At!==null&&(At=At.slice(e+1)),Rc(gi,tr),c}finally{_e=t,Qi=!1}}return null}var Kr=[],Xr=0,Ka=null,Xa=0,ft=[],ht=0,xr=null,Ft=1,Dt="";function vr(e,t){Kr[Xr++]=Xa,Kr[Xr++]=Ka,Ka=e,Xa=t}function Md(e,t,n){ft[ht++]=Ft,ft[ht++]=Dt,ft[ht++]=xr,xr=e;var i=Ft;e=Dt;var c=32-wt(i)-1;i&=~(1<<c),n+=1;var u=32-wt(t)+c;if(30<u){var h=c-c%5;u=(i&(1<<h)-1).toString(32),i>>=h,c-=h,Ft=1<<32-wt(t)+c|n<<c|i,Dt=u+e}else Ft=1<<u|n<<c|i,Dt=e}function Ki(e){e.return!==null&&(vr(e,1),Md(e,1,0))}function Xi(e){for(;e===Ka;)Ka=Kr[--Xr],Kr[Xr]=null,Xa=Kr[--Xr],Kr[Xr]=null;for(;e===xr;)xr=ft[--ht],ft[ht]=null,Dt=ft[--ht],ft[ht]=null,Ft=ft[--ht],ft[ht]=null}var st=null,ct=null,Le=!1,St=null;function Rd(e,t){var n=xt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Id(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,st=e,ct=Yt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,st=e,ct=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=xr!==null?{id:Ft,overflow:Dt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=xt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,st=e,ct=null,!0):!1;default:return!1}}function Gi(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Zi(e){if(Le){var t=ct;if(t){var n=t;if(!Id(e,t)){if(Gi(e))throw Error(o(418));t=Yt(n.nextSibling);var i=st;t&&Id(e,t)?Rd(i,n):(e.flags=e.flags&-4097|2,Le=!1,st=e)}}else{if(Gi(e))throw Error(o(418));e.flags=e.flags&-4097|2,Le=!1,st=e}}}function Ld(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;st=e}function Ga(e){if(e!==st)return!1;if(!Le)return Ld(e),Le=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ui(e.type,e.memoizedProps)),t&&(t=ct)){if(Gi(e))throw Pd(),Error(o(418));for(;t;)Rd(e,t),t=Yt(t.nextSibling)}if(Ld(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 n=e.data;if(n==="/$"){if(t===0){ct=Yt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}ct=null}}else ct=st?Yt(e.stateNode.nextSibling):null;return!0}function Pd(){for(var e=ct;e;)e=Yt(e.nextSibling)}function Gr(){ct=st=null,Le=!1}function Yi(e){St===null?St=[e]:St.push(e)}var vm=G.ReactCurrentBatchConfig;function $n(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(o(309));var i=n.stateNode}if(!i)throw Error(o(147,e));var c=i,u=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===u?t.ref:(t=function(h){var y=c.refs;h===null?delete y[u]:y[u]=h},t._stringRef=u,t)}if(typeof e!="string")throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function Za(e,t){throw e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Td(e){var t=e._init;return t(e._payload)}function Ad(e){function t(z,N){if(e){var M=z.deletions;M===null?(z.deletions=[N],z.flags|=16):M.push(N)}}function n(z,N){if(!e)return null;for(;N!==null;)t(z,N),N=N.sibling;return null}function i(z,N){for(z=new Map;N!==null;)N.key!==null?z.set(N.key,N):z.set(N.index,N),N=N.sibling;return z}function c(z,N){return z=cr(z,N),z.index=0,z.sibling=null,z}function u(z,N,M){return z.index=M,e?(M=z.alternate,M!==null?(M=M.index,M<N?(z.flags|=2,N):M):(z.flags|=2,N)):(z.flags|=1048576,N)}function h(z){return e&&z.alternate===null&&(z.flags|=2),z}function y(z,N,M,U){return N===null||N.tag!==6?(N=Ul(M,z.mode,U),N.return=z,N):(N=c(N,M),N.return=z,N)}function j(z,N,M,U){var oe=M.type;return oe===Z?F(z,N,M.props.children,U,M.key):N!==null&&(N.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===xe&&Td(oe)===N.type)?(U=c(N,M.props),U.ref=$n(z,N,M),U.return=z,U):(U=ko(M.type,M.key,M.props,null,z.mode,U),U.ref=$n(z,N,M),U.return=z,U)}function I(z,N,M,U){return N===null||N.tag!==4||N.stateNode.containerInfo!==M.containerInfo||N.stateNode.implementation!==M.implementation?(N=Vl(M,z.mode,U),N.return=z,N):(N=c(N,M.children||[]),N.return=z,N)}function F(z,N,M,U,oe){return N===null||N.tag!==7?(N=Er(M,z.mode,U,oe),N.return=z,N):(N=c(N,M),N.return=z,N)}function O(z,N,M){if(typeof N=="string"&&N!==""||typeof N=="number")return N=Ul(""+N,z.mode,M),N.return=z,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case D:return M=ko(N.type,N.key,N.props,null,z.mode,M),M.ref=$n(z,null,N),M.return=z,M;case te:return N=Vl(N,z.mode,M),N.return=z,N;case xe:var U=N._init;return O(z,U(N._payload),M)}if(gn(N)||P(N))return N=Er(N,z.mode,M,null),N.return=z,N;Za(z,N)}return null}function A(z,N,M,U){var oe=N!==null?N.key:null;if(typeof M=="string"&&M!==""||typeof M=="number")return oe!==null?null:y(z,N,""+M,U);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case D:return M.key===oe?j(z,N,M,U):null;case te:return M.key===oe?I(z,N,M,U):null;case xe:return oe=M._init,A(z,N,oe(M._payload),U)}if(gn(M)||P(M))return oe!==null?null:F(z,N,M,U,null);Za(z,M)}return null}function K(z,N,M,U,oe){if(typeof U=="string"&&U!==""||typeof U=="number")return z=z.get(M)||null,y(N,z,""+U,oe);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case D:return z=z.get(U.key===null?M:U.key)||null,j(N,z,U,oe);case te:return z=z.get(U.key===null?M:U.key)||null,I(N,z,U,oe);case xe:var ue=U._init;return K(z,N,M,ue(U._payload),oe)}if(gn(U)||P(U))return z=z.get(M)||null,F(N,z,U,oe,null);Za(N,U)}return null}function ee(z,N,M,U){for(var oe=null,ue=null,pe=N,he=N=0,Be=null;pe!==null&&he<M.length;he++){pe.index>he?(Be=pe,pe=null):Be=pe.sibling;var Ee=A(z,pe,M[he],U);if(Ee===null){pe===null&&(pe=Be);break}e&&pe&&Ee.alternate===null&&t(z,pe),N=u(Ee,N,he),ue===null?oe=Ee:ue.sibling=Ee,ue=Ee,pe=Be}if(he===M.length)return n(z,pe),Le&&vr(z,he),oe;if(pe===null){for(;he<M.length;he++)pe=O(z,M[he],U),pe!==null&&(N=u(pe,N,he),ue===null?oe=pe:ue.sibling=pe,ue=pe);return Le&&vr(z,he),oe}for(pe=i(z,pe);he<M.length;he++)Be=K(pe,z,he,M[he],U),Be!==null&&(e&&Be.alternate!==null&&pe.delete(Be.key===null?he:Be.key),N=u(Be,N,he),ue===null?oe=Be:ue.sibling=Be,ue=Be);return e&&pe.forEach(function(dr){return t(z,dr)}),Le&&vr(z,he),oe}function ne(z,N,M,U){var oe=P(M);if(typeof oe!="function")throw Error(o(150));if(M=oe.call(M),M==null)throw Error(o(151));for(var ue=oe=null,pe=N,he=N=0,Be=null,Ee=M.next();pe!==null&&!Ee.done;he++,Ee=M.next()){pe.index>he?(Be=pe,pe=null):Be=pe.sibling;var dr=A(z,pe,Ee.value,U);if(dr===null){pe===null&&(pe=Be);break}e&&pe&&dr.alternate===null&&t(z,pe),N=u(dr,N,he),ue===null?oe=dr:ue.sibling=dr,ue=dr,pe=Be}if(Ee.done)return n(z,pe),Le&&vr(z,he),oe;if(pe===null){for(;!Ee.done;he++,Ee=M.next())Ee=O(z,Ee.value,U),Ee!==null&&(N=u(Ee,N,he),ue===null?oe=Ee:ue.sibling=Ee,ue=Ee);return Le&&vr(z,he),oe}for(pe=i(z,pe);!Ee.done;he++,Ee=M.next())Ee=K(pe,z,he,Ee.value,U),Ee!==null&&(e&&Ee.alternate!==null&&pe.delete(Ee.key===null?he:Ee.key),N=u(Ee,N,he),ue===null?oe=Ee:ue.sibling=Ee,ue=Ee);return e&&pe.forEach(function(Ym){return t(z,Ym)}),Le&&vr(z,he),oe}function De(z,N,M,U){if(typeof M=="object"&&M!==null&&M.type===Z&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case D:e:{for(var oe=M.key,ue=N;ue!==null;){if(ue.key===oe){if(oe=M.type,oe===Z){if(ue.tag===7){n(z,ue.sibling),N=c(ue,M.props.children),N.return=z,z=N;break e}}else if(ue.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===xe&&Td(oe)===ue.type){n(z,ue.sibling),N=c(ue,M.props),N.ref=$n(z,ue,M),N.return=z,z=N;break e}n(z,ue);break}else t(z,ue);ue=ue.sibling}M.type===Z?(N=Er(M.props.children,z.mode,U,M.key),N.return=z,z=N):(U=ko(M.type,M.key,M.props,null,z.mode,U),U.ref=$n(z,N,M),U.return=z,z=U)}return h(z);case te:e:{for(ue=M.key;N!==null;){if(N.key===ue)if(N.tag===4&&N.stateNode.containerInfo===M.containerInfo&&N.stateNode.implementation===M.implementation){n(z,N.sibling),N=c(N,M.children||[]),N.return=z,z=N;break e}else{n(z,N);break}else t(z,N);N=N.sibling}N=Vl(M,z.mode,U),N.return=z,z=N}return h(z);case xe:return ue=M._init,De(z,N,ue(M._payload),U)}if(gn(M))return ee(z,N,M,U);if(P(M))return ne(z,N,M,U);Za(z,M)}return typeof M=="string"&&M!==""||typeof M=="number"?(M=""+M,N!==null&&N.tag===6?(n(z,N.sibling),N=c(N,M),N.return=z,z=N):(n(z,N),N=Ul(M,z.mode,U),N.return=z,z=N),h(z)):n(z,N)}return De}var Zr=Ad(!0),Fd=Ad(!1),Ya=Jt(null),Ja=null,Yr=null,Ji=null;function el(){Ji=Yr=Ja=null}function tl(e){var t=Ya.current;Re(Ya),e._currentValue=t}function rl(e,t,n){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===n)break;e=e.return}}function Jr(e,t){Ja=e,Ji=Yr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(nt=!0),e.firstContext=null)}function gt(e){var t=e._currentValue;if(Ji!==e)if(e={context:e,memoizedValue:t,next:null},Yr===null){if(Ja===null)throw Error(o(308));Yr=e,Ja.dependencies={lanes:0,firstContext:e}}else Yr=Yr.next=e;return t}var yr=null;function nl(e){yr===null?yr=[e]:yr.push(e)}function Dd(e,t,n,i){var c=t.interleaved;return c===null?(n.next=n,nl(t)):(n.next=c.next,c.next=n),t.interleaved=n,Ot(e,i)}function Ot(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var rr=!1;function al(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Od(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 $t(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function nr(e,t,n){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(Ne&2)!==0){var c=i.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),i.pending=t,Ot(e,n)}return c=i.interleaved,c===null?(t.next=t,nl(i)):(t.next=c.next,c.next=t),i.interleaved=t,Ot(e,n)}function eo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,xi(e,n)}}function $d(e,t){var n=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var c=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var h={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};u===null?c=u=h:u=u.next=h,n=n.next}while(n!==null);u===null?c=u=t:u=u.next=t}else c=u=t;n={baseState:i.baseState,firstBaseUpdate:c,lastBaseUpdate:u,shared:i.shared,effects:i.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function to(e,t,n,i){var c=e.updateQueue;rr=!1;var u=c.firstBaseUpdate,h=c.lastBaseUpdate,y=c.shared.pending;if(y!==null){c.shared.pending=null;var j=y,I=j.next;j.next=null,h===null?u=I:h.next=I,h=j;var F=e.alternate;F!==null&&(F=F.updateQueue,y=F.lastBaseUpdate,y!==h&&(y===null?F.firstBaseUpdate=I:y.next=I,F.lastBaseUpdate=j))}if(u!==null){var O=c.baseState;h=0,F=I=j=null,y=u;do{var A=y.lane,K=y.eventTime;if((i&A)===A){F!==null&&(F=F.next={eventTime:K,lane:0,tag:y.tag,payload:y.payload,callback:y.callback,next:null});e:{var ee=e,ne=y;switch(A=t,K=n,ne.tag){case 1:if(ee=ne.payload,typeof ee=="function"){O=ee.call(K,O,A);break e}O=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=ne.payload,A=typeof ee=="function"?ee.call(K,O,A):ee,A==null)break e;O=T({},O,A);break e;case 2:rr=!0}}y.callback!==null&&y.lane!==0&&(e.flags|=64,A=c.effects,A===null?c.effects=[y]:A.push(y))}else K={eventTime:K,lane:A,tag:y.tag,payload:y.payload,callback:y.callback,next:null},F===null?(I=F=K,j=O):F=F.next=K,h|=A;if(y=y.next,y===null){if(y=c.shared.pending,y===null)break;A=y,y=A.next,A.next=null,c.lastBaseUpdate=A,c.shared.pending=null}}while(!0);if(F===null&&(j=O),c.baseState=j,c.firstBaseUpdate=I,c.lastBaseUpdate=F,t=c.shared.interleaved,t!==null){c=t;do h|=c.lane,c=c.next;while(c!==t)}else u===null&&(c.shared.lanes=0);Sr|=h,e.lanes=h,e.memoizedState=O}}function qd(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],c=i.callback;if(c!==null){if(i.callback=null,i=n,typeof c!="function")throw Error(o(191,c));c.call(i)}}}var qn={},It=Jt(qn),Un=Jt(qn),Vn=Jt(qn);function wr(e){if(e===qn)throw Error(o(174));return e}function ol(e,t){switch(ze(Vn,t),ze(Un,e),ze(It,qn),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ii(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ii(t,e)}Re(It),ze(It,t)}function en(){Re(It),Re(Un),Re(Vn)}function Ud(e){wr(Vn.current);var t=wr(It.current),n=ii(t,e.type);t!==n&&(ze(Un,e),ze(It,n))}function il(e){Un.current===e&&(Re(It),Re(Un))}var Pe=Jt(0);function ro(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.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 ll=[];function sl(){for(var e=0;e<ll.length;e++)ll[e]._workInProgressVersionPrimary=null;ll.length=0}var no=G.ReactCurrentDispatcher,cl=G.ReactCurrentBatchConfig,kr=0,Te=null,$e=null,Ue=null,ao=!1,Bn=!1,Wn=0,ym=0;function Xe(){throw Error(o(321))}function dl(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!kt(e[n],t[n]))return!1;return!0}function ul(e,t,n,i,c,u){if(kr=u,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,no.current=e===null||e.memoizedState===null?jm:Nm,e=n(i,c),Bn){u=0;do{if(Bn=!1,Wn=0,25<=u)throw Error(o(301));u+=1,Ue=$e=null,t.updateQueue=null,no.current=Cm,e=n(i,c)}while(Bn)}if(no.current=lo,t=$e!==null&&$e.next!==null,kr=0,Ue=$e=Te=null,ao=!1,t)throw Error(o(300));return e}function pl(){var e=Wn!==0;return Wn=0,e}function Lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ue===null?Te.memoizedState=Ue=e:Ue=Ue.next=e,Ue}function mt(){if($e===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=$e.next;var t=Ue===null?Te.memoizedState:Ue.next;if(t!==null)Ue=t,$e=e;else{if(e===null)throw Error(o(310));$e=e,e={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},Ue===null?Te.memoizedState=Ue=e:Ue=Ue.next=e}return Ue}function Hn(e,t){return typeof t=="function"?t(e):t}function fl(e){var t=mt(),n=t.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=e;var i=$e,c=i.baseQueue,u=n.pending;if(u!==null){if(c!==null){var h=c.next;c.next=u.next,u.next=h}i.baseQueue=c=u,n.pending=null}if(c!==null){u=c.next,i=i.baseState;var y=h=null,j=null,I=u;do{var F=I.lane;if((kr&F)===F)j!==null&&(j=j.next={lane:0,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null}),i=I.hasEagerState?I.eagerState:e(i,I.action);else{var O={lane:F,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null};j===null?(y=j=O,h=i):j=j.next=O,Te.lanes|=F,Sr|=F}I=I.next}while(I!==null&&I!==u);j===null?h=i:j.next=y,kt(i,t.memoizedState)||(nt=!0),t.memoizedState=i,t.baseState=h,t.baseQueue=j,n.lastRenderedState=i}if(e=n.interleaved,e!==null){c=e;do u=c.lane,Te.lanes|=u,Sr|=u,c=c.next;while(c!==e)}else c===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function hl(e){var t=mt(),n=t.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=e;var i=n.dispatch,c=n.pending,u=t.memoizedState;if(c!==null){n.pending=null;var h=c=c.next;do u=e(u,h.action),h=h.next;while(h!==c);kt(u,t.memoizedState)||(nt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),n.lastRenderedState=u}return[u,i]}function Vd(){}function Bd(e,t){var n=Te,i=mt(),c=t(),u=!kt(i.memoizedState,c);if(u&&(i.memoizedState=c,nt=!0),i=i.queue,gl(Qd.bind(null,n,i,e),[e]),i.getSnapshot!==t||u||Ue!==null&&Ue.memoizedState.tag&1){if(n.flags|=2048,Qn(9,Hd.bind(null,n,i,c,t),void 0,null),Ve===null)throw Error(o(349));(kr&30)!==0||Wd(n,t,c)}return c}function Wd(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Te.updateQueue,t===null?(t={lastEffect:null,stores:null},Te.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Hd(e,t,n,i){t.value=n,t.getSnapshot=i,Kd(t)&&Xd(e)}function Qd(e,t,n){return n(function(){Kd(t)&&Xd(e)})}function Kd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!kt(e,n)}catch{return!0}}function Xd(e){var t=Ot(e,1);t!==null&&Et(t,e,1,-1)}function Gd(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:Hn,lastRenderedState:e},t.queue=e,e=e.dispatch=Sm.bind(null,Te,e),[t.memoizedState,e]}function Qn(e,t,n,i){return e={tag:e,create:t,destroy:n,deps:i,next:null},t=Te.updateQueue,t===null?(t={lastEffect:null,stores:null},Te.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(i=n.next,n.next=e,e.next=i,t.lastEffect=e)),e}function Zd(){return mt().memoizedState}function oo(e,t,n,i){var c=Lt();Te.flags|=e,c.memoizedState=Qn(1|t,n,void 0,i===void 0?null:i)}function io(e,t,n,i){var c=mt();i=i===void 0?null:i;var u=void 0;if($e!==null){var h=$e.memoizedState;if(u=h.destroy,i!==null&&dl(i,h.deps)){c.memoizedState=Qn(t,n,u,i);return}}Te.flags|=e,c.memoizedState=Qn(1|t,n,u,i)}function Yd(e,t){return oo(8390656,8,e,t)}function gl(e,t){return io(2048,8,e,t)}function Jd(e,t){return io(4,2,e,t)}function eu(e,t){return io(4,4,e,t)}function tu(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 ru(e,t,n){return n=n!=null?n.concat([e]):null,io(4,4,tu.bind(null,t,e),n)}function ml(){}function nu(e,t){var n=mt();t=t===void 0?null:t;var i=n.memoizedState;return i!==null&&t!==null&&dl(t,i[1])?i[0]:(n.memoizedState=[e,t],e)}function au(e,t){var n=mt();t=t===void 0?null:t;var i=n.memoizedState;return i!==null&&t!==null&&dl(t,i[1])?i[0]:(e=e(),n.memoizedState=[e,t],e)}function ou(e,t,n){return(kr&21)===0?(e.baseState&&(e.baseState=!1,nt=!0),e.memoizedState=n):(kt(n,t)||(n=Tc(),Te.lanes|=n,Sr|=n,e.baseState=!0),t)}function wm(e,t){var n=_e;_e=n!==0&&4>n?n:4,e(!0);var i=cl.transition;cl.transition={};try{e(!1),t()}finally{_e=n,cl.transition=i}}function iu(){return mt().memoizedState}function km(e,t,n){var i=lr(e);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},lu(e))su(t,n);else if(n=Dd(e,t,n,i),n!==null){var c=Je();Et(n,e,i,c),cu(n,t,i)}}function Sm(e,t,n){var i=lr(e),c={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(lu(e))su(t,c);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var h=t.lastRenderedState,y=u(h,n);if(c.hasEagerState=!0,c.eagerState=y,kt(y,h)){var j=t.interleaved;j===null?(c.next=c,nl(t)):(c.next=j.next,j.next=c),t.interleaved=c;return}}catch{}n=Dd(e,t,c,i),n!==null&&(c=Je(),Et(n,e,i,c),cu(n,t,i))}}function lu(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function su(e,t){Bn=ao=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function cu(e,t,n){if((n&4194240)!==0){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,xi(e,n)}}var lo={readContext:gt,useCallback:Xe,useContext:Xe,useEffect:Xe,useImperativeHandle:Xe,useInsertionEffect:Xe,useLayoutEffect:Xe,useMemo:Xe,useReducer:Xe,useRef:Xe,useState:Xe,useDebugValue:Xe,useDeferredValue:Xe,useTransition:Xe,useMutableSource:Xe,useSyncExternalStore:Xe,useId:Xe,unstable_isNewReconciler:!1},jm={readContext:gt,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:gt,useEffect:Yd,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,oo(4194308,4,tu.bind(null,t,e),n)},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 n=Lt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var i=Lt();return t=n!==void 0?n(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=km.bind(null,Te,e),[i.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:Gd,useDebugValue:ml,useDeferredValue:function(e){return Lt().memoizedState=e},useTransition:function(){var e=Gd(!1),t=e[0];return e=wm.bind(null,e[1]),Lt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=Te,c=Lt();if(Le){if(n===void 0)throw Error(o(407));n=n()}else{if(n=t(),Ve===null)throw Error(o(349));(kr&30)!==0||Wd(i,t,n)}c.memoizedState=n;var u={value:n,getSnapshot:t};return c.queue=u,Yd(Qd.bind(null,i,u,e),[e]),i.flags|=2048,Qn(9,Hd.bind(null,i,u,n,t),void 0,null),n},useId:function(){var e=Lt(),t=Ve.identifierPrefix;if(Le){var n=Dt,i=Ft;n=(i&~(1<<32-wt(i)-1)).toString(32)+n,t=":"+t+"R"+n,n=Wn++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=ym++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Nm={readContext:gt,useCallback:nu,useContext:gt,useEffect:gl,useImperativeHandle:ru,useInsertionEffect:Jd,useLayoutEffect:eu,useMemo:au,useReducer:fl,useRef:Zd,useState:function(){return fl(Hn)},useDebugValue:ml,useDeferredValue:function(e){var t=mt();return ou(t,$e.memoizedState,e)},useTransition:function(){var e=fl(Hn)[0],t=mt().memoizedState;return[e,t]},useMutableSource:Vd,useSyncExternalStore:Bd,useId:iu,unstable_isNewReconciler:!1},Cm={readContext:gt,useCallback:nu,useContext:gt,useEffect:gl,useImperativeHandle:ru,useInsertionEffect:Jd,useLayoutEffect:eu,useMemo:au,useReducer:hl,useRef:Zd,useState:function(){return hl(Hn)},useDebugValue:ml,useDeferredValue:function(e){var t=mt();return $e===null?t.memoizedState=e:ou(t,$e.memoizedState,e)},useTransition:function(){var e=hl(Hn)[0],t=mt().memoizedState;return[e,t]},useMutableSource:Vd,useSyncExternalStore:Bd,useId:iu,unstable_isNewReconciler:!1};function jt(e,t){if(e&&e.defaultProps){t=T({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function bl(e,t,n,i){t=e.memoizedState,n=n(i,t),n=n==null?t:T({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var so={isMounted:function(e){return(e=e._reactInternals)?gr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var i=Je(),c=lr(e),u=$t(i,c);u.payload=t,n!=null&&(u.callback=n),t=nr(e,u,c),t!==null&&(Et(t,e,c,i),eo(t,e,c))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var i=Je(),c=lr(e),u=$t(i,c);u.tag=1,u.payload=t,n!=null&&(u.callback=n),t=nr(e,u,c),t!==null&&(Et(t,e,c,i),eo(t,e,c))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Je(),i=lr(e),c=$t(n,i);c.tag=2,t!=null&&(c.callback=t),t=nr(e,c,i),t!==null&&(Et(t,e,i,n),eo(t,e,i))}};function du(e,t,n,i,c,u,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,u,h):t.prototype&&t.prototype.isPureReactComponent?!Ln(n,i)||!Ln(c,u):!0}function uu(e,t,n){var i=!1,c=er,u=t.contextType;return typeof u=="object"&&u!==null?u=gt(u):(c=rt(t)?br:Ke.current,i=t.contextTypes,u=(i=i!=null)?Qr(e,c):er),t=new t(n,u),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=so,e.stateNode=t,t._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=c,e.__reactInternalMemoizedMaskedChildContext=u),t}function pu(e,t,n,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==e&&so.enqueueReplaceState(t,t.state,null)}function xl(e,t,n,i){var c=e.stateNode;c.props=n,c.state=e.memoizedState,c.refs={},al(e);var u=t.contextType;typeof u=="object"&&u!==null?c.context=gt(u):(u=rt(t)?br:Ke.current,c.context=Qr(e,u)),c.state=e.memoizedState,u=t.getDerivedStateFromProps,typeof u=="function"&&(bl(e,t,u,n),c.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(t=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),t!==c.state&&so.enqueueReplaceState(c,c.state,null),to(e,n,c,i),c.state=e.memoizedState),typeof c.componentDidMount=="function"&&(e.flags|=4194308)}function tn(e,t){try{var n="",i=t;do n+=le(i),i=i.return;while(i);var c=n}catch(u){c=`
7
+ Error generating stack: `+u.message+`
8
+ `+u.stack}return{value:e,source:t,stack:c,digest:null}}function vl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function yl(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Em=typeof WeakMap=="function"?WeakMap:Map;function fu(e,t,n){n=$t(-1,n),n.tag=3,n.payload={element:null};var i=t.value;return n.callback=function(){mo||(mo=!0,Pl=i),yl(e,t)},n}function hu(e,t,n){n=$t(-1,n),n.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var c=t.value;n.payload=function(){return i(c)},n.callback=function(){yl(e,t)}}var u=e.stateNode;return u!==null&&typeof u.componentDidCatch=="function"&&(n.callback=function(){yl(e,t),typeof i!="function"&&(or===null?or=new Set([this]):or.add(this));var h=t.stack;this.componentDidCatch(t.value,{componentStack:h!==null?h:""})}),n}function gu(e,t,n){var i=e.pingCache;if(i===null){i=e.pingCache=new Em;var c=new Set;i.set(t,c)}else c=i.get(t),c===void 0&&(c=new Set,i.set(t,c));c.has(n)||(c.add(n),e=qm.bind(null,e,t,n),t.then(e,e))}function mu(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 bu(e,t,n,i,c){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=$t(-1,1),t.tag=2,nr(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=c,e)}var _m=G.ReactCurrentOwner,nt=!1;function Ye(e,t,n,i){t.child=e===null?Fd(t,null,n,i):Zr(t,e.child,n,i)}function xu(e,t,n,i,c){n=n.render;var u=t.ref;return Jr(t,c),i=ul(e,t,n,i,u,c),n=pl(),e!==null&&!nt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~c,qt(e,t,c)):(Le&&n&&Ki(t),t.flags|=1,Ye(e,t,i,c),t.child)}function vu(e,t,n,i,c){if(e===null){var u=n.type;return typeof u=="function"&&!ql(u)&&u.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=u,yu(e,t,u,i,c)):(e=ko(n.type,null,i,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,(e.lanes&c)===0){var h=u.memoizedProps;if(n=n.compare,n=n!==null?n:Ln,n(h,i)&&e.ref===t.ref)return qt(e,t,c)}return t.flags|=1,e=cr(u,i),e.ref=t.ref,e.return=t,t.child=e}function yu(e,t,n,i,c){if(e!==null){var u=e.memoizedProps;if(Ln(u,i)&&e.ref===t.ref)if(nt=!1,t.pendingProps=i=u,(e.lanes&c)!==0)(e.flags&131072)!==0&&(nt=!0);else return t.lanes=e.lanes,qt(e,t,c)}return wl(e,t,n,i,c)}function wu(e,t,n){var i=t.pendingProps,c=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(nn,dt),dt|=n;else{if((n&1073741824)===0)return e=u!==null?u.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ze(nn,dt),dt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=u!==null?u.baseLanes:n,ze(nn,dt),dt|=i}else u!==null?(i=u.baseLanes|n,t.memoizedState=null):i=n,ze(nn,dt),dt|=i;return Ye(e,t,c,n),t.child}function ku(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function wl(e,t,n,i,c){var u=rt(n)?br:Ke.current;return u=Qr(t,u),Jr(t,c),n=ul(e,t,n,i,u,c),i=pl(),e!==null&&!nt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~c,qt(e,t,c)):(Le&&i&&Ki(t),t.flags|=1,Ye(e,t,n,c),t.child)}function Su(e,t,n,i,c){if(rt(n)){var u=!0;Ha(t)}else u=!1;if(Jr(t,c),t.stateNode===null)uo(e,t),uu(t,n,i),xl(t,n,i,c),i=!0;else if(e===null){var h=t.stateNode,y=t.memoizedProps;h.props=y;var j=h.context,I=n.contextType;typeof I=="object"&&I!==null?I=gt(I):(I=rt(n)?br:Ke.current,I=Qr(t,I));var F=n.getDerivedStateFromProps,O=typeof F=="function"||typeof h.getSnapshotBeforeUpdate=="function";O||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(y!==i||j!==I)&&pu(t,h,i,I),rr=!1;var A=t.memoizedState;h.state=A,to(t,i,h,c),j=t.memoizedState,y!==i||A!==j||tt.current||rr?(typeof F=="function"&&(bl(t,n,F,i),j=t.memoizedState),(y=rr||du(t,n,y,i,A,j,I))?(O||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(t.flags|=4194308)):(typeof h.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=j),h.props=i,h.state=j,h.context=I,i=y):(typeof h.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{h=t.stateNode,Od(e,t),y=t.memoizedProps,I=t.type===t.elementType?y:jt(t.type,y),h.props=I,O=t.pendingProps,A=h.context,j=n.contextType,typeof j=="object"&&j!==null?j=gt(j):(j=rt(n)?br:Ke.current,j=Qr(t,j));var K=n.getDerivedStateFromProps;(F=typeof K=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(y!==O||A!==j)&&pu(t,h,i,j),rr=!1,A=t.memoizedState,h.state=A,to(t,i,h,c);var ee=t.memoizedState;y!==O||A!==ee||tt.current||rr?(typeof K=="function"&&(bl(t,n,K,i),ee=t.memoizedState),(I=rr||du(t,n,I,i,A,ee,j)||!1)?(F||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(i,ee,j),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(i,ee,j)),typeof h.componentDidUpdate=="function"&&(t.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof h.componentDidUpdate!="function"||y===e.memoizedProps&&A===e.memoizedState||(t.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&A===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=ee),h.props=i,h.state=ee,h.context=j,i=I):(typeof h.componentDidUpdate!="function"||y===e.memoizedProps&&A===e.memoizedState||(t.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&A===e.memoizedState||(t.flags|=1024),i=!1)}return kl(e,t,n,i,u,c)}function kl(e,t,n,i,c,u){ku(e,t);var h=(t.flags&128)!==0;if(!i&&!h)return c&&_d(t,n,!1),qt(e,t,u);i=t.stateNode,_m.current=t;var y=h&&typeof n.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&h?(t.child=Zr(t,e.child,null,u),t.child=Zr(t,null,y,u)):Ye(e,t,y,u),t.memoizedState=i.state,c&&_d(t,n,!0),t.child}function ju(e){var t=e.stateNode;t.pendingContext?Cd(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Cd(e,t.context,!1),ol(e,t.containerInfo)}function Nu(e,t,n,i,c){return Gr(),Yi(c),t.flags|=256,Ye(e,t,n,i),t.child}var Sl={dehydrated:null,treeContext:null,retryLane:0};function jl(e){return{baseLanes:e,cachePool:null,transitions:null}}function Cu(e,t,n){var i=t.pendingProps,c=Pe.current,u=!1,h=(t.flags&128)!==0,y;if((y=h)||(y=e!==null&&e.memoizedState===null?!1:(c&2)!==0),y?(u=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(c|=1),ze(Pe,c&1),e===null)return Zi(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):(h=i.children,e=i.fallback,u?(i=t.mode,u=t.child,h={mode:"hidden",children:h},(i&1)===0&&u!==null?(u.childLanes=0,u.pendingProps=h):u=So(h,i,0,null),e=Er(e,i,n,null),u.return=t,e.return=t,u.sibling=e,t.child=u,t.child.memoizedState=jl(n),t.memoizedState=Sl,e):Nl(t,h));if(c=e.memoizedState,c!==null&&(y=c.dehydrated,y!==null))return zm(e,t,h,i,y,c,n);if(u){u=i.fallback,h=t.mode,c=e.child,y=c.sibling;var j={mode:"hidden",children:i.children};return(h&1)===0&&t.child!==c?(i=t.child,i.childLanes=0,i.pendingProps=j,t.deletions=null):(i=cr(c,j),i.subtreeFlags=c.subtreeFlags&14680064),y!==null?u=cr(y,u):(u=Er(u,h,n,null),u.flags|=2),u.return=t,i.return=t,i.sibling=u,t.child=i,i=u,u=t.child,h=e.child.memoizedState,h=h===null?jl(n):{baseLanes:h.baseLanes|n,cachePool:null,transitions:h.transitions},u.memoizedState=h,u.childLanes=e.childLanes&~n,t.memoizedState=Sl,i}return u=e.child,e=u.sibling,i=cr(u,{mode:"visible",children:i.children}),(t.mode&1)===0&&(i.lanes=n),i.return=t,i.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Nl(e,t){return t=So({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function co(e,t,n,i){return i!==null&&Yi(i),Zr(t,e.child,null,n),e=Nl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zm(e,t,n,i,c,u,h){if(n)return t.flags&256?(t.flags&=-257,i=vl(Error(o(422))),co(e,t,h,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(u=i.fallback,c=t.mode,i=So({mode:"visible",children:i.children},c,0,null),u=Er(u,c,h,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,h),t.child.memoizedState=jl(h),t.memoizedState=Sl,u);if((t.mode&1)===0)return co(e,t,h,null);if(c.data==="$!"){if(i=c.nextSibling&&c.nextSibling.dataset,i)var y=i.dgst;return i=y,u=Error(o(419)),i=vl(u,i,void 0),co(e,t,h,i)}if(y=(h&e.childLanes)!==0,nt||y){if(i=Ve,i!==null){switch(h&-h){case 4:c=2;break;case 16:c=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:c=32;break;case 536870912:c=268435456;break;default:c=0}c=(c&(i.suspendedLanes|h))!==0?0:c,c!==0&&c!==u.retryLane&&(u.retryLane=c,Ot(e,c),Et(i,e,c,-1))}return $l(),i=vl(Error(o(421))),co(e,t,h,i)}return c.data==="$?"?(t.flags|=128,t.child=e.child,t=Um.bind(null,e),c._reactRetry=t,null):(e=u.treeContext,ct=Yt(c.nextSibling),st=t,Le=!0,St=null,e!==null&&(ft[ht++]=Ft,ft[ht++]=Dt,ft[ht++]=xr,Ft=e.id,Dt=e.overflow,xr=t),t=Nl(t,i.children),t.flags|=4096,t)}function Eu(e,t,n){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),rl(e.return,t,n)}function Cl(e,t,n,i,c){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:c}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=i,u.tail=n,u.tailMode=c)}function _u(e,t,n){var i=t.pendingProps,c=i.revealOrder,u=i.tail;if(Ye(e,t,i.children,n),i=Pe.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&&Eu(e,n,t);else if(e.tag===19)Eu(e,n,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(Pe,i),(t.mode&1)===0)t.memoizedState=null;else switch(c){case"forwards":for(n=t.child,c=null;n!==null;)e=n.alternate,e!==null&&ro(e)===null&&(c=n),n=n.sibling;n=c,n===null?(c=t.child,t.child=null):(c=n.sibling,n.sibling=null),Cl(t,!1,c,n,u);break;case"backwards":for(n=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&ro(e)===null){t.child=c;break}e=c.sibling,c.sibling=n,n=c,c=e}Cl(t,!0,n,null,u);break;case"together":Cl(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 qt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Sr|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,n=cr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=cr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Mm(e,t,n){switch(t.tag){case 3:ju(t),Gr();break;case 5:Ud(t);break;case 1:rt(t.type)&&Ha(t);break;case 4:ol(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,c=t.memoizedProps.value;ze(Ya,i._currentValue),i._currentValue=c;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(ze(Pe,Pe.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?Cu(e,t,n):(ze(Pe,Pe.current&1),e=qt(e,t,n),e!==null?e.sibling:null);ze(Pe,Pe.current&1);break;case 19:if(i=(n&t.childLanes)!==0,(e.flags&128)!==0){if(i)return _u(e,t,n);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),ze(Pe,Pe.current),i)break;return null;case 22:case 23:return t.lanes=0,wu(e,t,n)}return qt(e,t,n)}var zu,El,Mu,Ru;zu=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},El=function(){},Mu=function(e,t,n,i){var c=e.memoizedProps;if(c!==i){e=t.stateNode,wr(It.current);var u=null;switch(n){case"input":c=ri(e,c),i=ri(e,i),u=[];break;case"select":c=T({},c,{value:void 0}),i=T({},i,{value:void 0}),u=[];break;case"textarea":c=oi(e,c),i=oi(e,i),u=[];break;default:typeof c.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=Va)}li(n,i);var h;n=null;for(I in c)if(!i.hasOwnProperty(I)&&c.hasOwnProperty(I)&&c[I]!=null)if(I==="style"){var y=c[I];for(h in y)y.hasOwnProperty(h)&&(n||(n={}),n[h]="")}else I!=="dangerouslySetInnerHTML"&&I!=="children"&&I!=="suppressContentEditableWarning"&&I!=="suppressHydrationWarning"&&I!=="autoFocus"&&(d.hasOwnProperty(I)?u||(u=[]):(u=u||[]).push(I,null));for(I in i){var j=i[I];if(y=c?.[I],i.hasOwnProperty(I)&&j!==y&&(j!=null||y!=null))if(I==="style")if(y){for(h in y)!y.hasOwnProperty(h)||j&&j.hasOwnProperty(h)||(n||(n={}),n[h]="");for(h in j)j.hasOwnProperty(h)&&y[h]!==j[h]&&(n||(n={}),n[h]=j[h])}else n||(u||(u=[]),u.push(I,n)),n=j;else I==="dangerouslySetInnerHTML"?(j=j?j.__html:void 0,y=y?y.__html:void 0,j!=null&&y!==j&&(u=u||[]).push(I,j)):I==="children"?typeof j!="string"&&typeof j!="number"||(u=u||[]).push(I,""+j):I!=="suppressContentEditableWarning"&&I!=="suppressHydrationWarning"&&(d.hasOwnProperty(I)?(j!=null&&I==="onScroll"&&Me("scroll",e),u||y===j||(u=[])):(u=u||[]).push(I,j))}n&&(u=u||[]).push("style",n);var I=u;(t.updateQueue=I)&&(t.flags|=4)}},Ru=function(e,t,n,i){n!==i&&(t.flags|=4)};function Kn(e,t){if(!Le)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Ge(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,i=0;if(t)for(var c=e.child;c!==null;)n|=c.lanes|c.childLanes,i|=c.subtreeFlags&14680064,i|=c.flags&14680064,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)n|=c.lanes|c.childLanes,i|=c.subtreeFlags,i|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function Rm(e,t,n){var i=t.pendingProps;switch(Xi(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ge(t),null;case 1:return rt(t.type)&&Wa(),Ge(t),null;case 3:return i=t.stateNode,en(),Re(tt),Re(Ke),sl(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Ga(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,St!==null&&(Fl(St),St=null))),El(e,t),Ge(t),null;case 5:il(t);var c=wr(Vn.current);if(n=t.type,e!==null&&t.stateNode!=null)Mu(e,t,n,i,c),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(o(166));return Ge(t),null}if(e=wr(It.current),Ga(t)){i=t.stateNode,n=t.type;var u=t.memoizedProps;switch(i[Rt]=t,i[Dn]=u,e=(t.mode&1)!==0,n){case"dialog":Me("cancel",i),Me("close",i);break;case"iframe":case"object":case"embed":Me("load",i);break;case"video":case"audio":for(c=0;c<Tn.length;c++)Me(Tn[c],i);break;case"source":Me("error",i);break;case"img":case"image":case"link":Me("error",i),Me("load",i);break;case"details":Me("toggle",i);break;case"input":uc(i,u),Me("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!u.multiple},Me("invalid",i);break;case"textarea":hc(i,u),Me("invalid",i)}li(n,u),c=null;for(var h in u)if(u.hasOwnProperty(h)){var y=u[h];h==="children"?typeof y=="string"?i.textContent!==y&&(u.suppressHydrationWarning!==!0&&Ua(i.textContent,y,e),c=["children",y]):typeof y=="number"&&i.textContent!==""+y&&(u.suppressHydrationWarning!==!0&&Ua(i.textContent,y,e),c=["children",""+y]):d.hasOwnProperty(h)&&y!=null&&h==="onScroll"&&Me("scroll",i)}switch(n){case"input":va(i),fc(i,u,!0);break;case"textarea":va(i),mc(i);break;case"select":case"option":break;default:typeof u.onClick=="function"&&(i.onclick=Va)}i=c,t.updateQueue=i,i!==null&&(t.flags|=4)}else{h=c.nodeType===9?c:c.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=bc(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=h.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=h.createElement(n,{is:i.is}):(e=h.createElement(n),n==="select"&&(h=e,i.multiple?h.multiple=!0:i.size&&(h.size=i.size))):e=h.createElementNS(e,n),e[Rt]=t,e[Dn]=i,zu(e,t,!1,!1),t.stateNode=e;e:{switch(h=si(n,i),n){case"dialog":Me("cancel",e),Me("close",e),c=i;break;case"iframe":case"object":case"embed":Me("load",e),c=i;break;case"video":case"audio":for(c=0;c<Tn.length;c++)Me(Tn[c],e);c=i;break;case"source":Me("error",e),c=i;break;case"img":case"image":case"link":Me("error",e),Me("load",e),c=i;break;case"details":Me("toggle",e),c=i;break;case"input":uc(e,i),c=ri(e,i),Me("invalid",e);break;case"option":c=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},c=T({},i,{value:void 0}),Me("invalid",e);break;case"textarea":hc(e,i),c=oi(e,i),Me("invalid",e);break;default:c=i}li(n,c),y=c;for(u in y)if(y.hasOwnProperty(u)){var j=y[u];u==="style"?yc(e,j):u==="dangerouslySetInnerHTML"?(j=j?j.__html:void 0,j!=null&&xc(e,j)):u==="children"?typeof j=="string"?(n!=="textarea"||j!=="")&&mn(e,j):typeof j=="number"&&mn(e,""+j):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(d.hasOwnProperty(u)?j!=null&&u==="onScroll"&&Me("scroll",e):j!=null&&ae(e,u,j,h))}switch(n){case"input":va(e),fc(e,i,!1);break;case"textarea":va(e),mc(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 c.onClick=="function"&&(e.onclick=Va)}switch(n){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 Ge(t),null;case 6:if(e&&t.stateNode!=null)Ru(e,t,e.memoizedProps,i);else{if(typeof i!="string"&&t.stateNode===null)throw Error(o(166));if(n=wr(Vn.current),wr(It.current),Ga(t)){if(i=t.stateNode,n=t.memoizedProps,i[Rt]=t,(u=i.nodeValue!==n)&&(e=st,e!==null))switch(e.tag){case 3:Ua(i.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ua(i.nodeValue,n,(e.mode&1)!==0)}u&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Rt]=t,t.stateNode=i}return Ge(t),null;case 13:if(Re(Pe),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Le&&ct!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Pd(),Gr(),t.flags|=98560,u=!1;else if(u=Ga(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[Rt]=t}else Gr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ge(t),u=!1}else St!==null&&(Fl(St),St=null),u=!0;if(!u)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Pe.current&1)!==0?qe===0&&(qe=3):$l())),t.updateQueue!==null&&(t.flags|=4),Ge(t),null);case 4:return en(),El(e,t),e===null&&An(t.stateNode.containerInfo),Ge(t),null;case 10:return tl(t.type._context),Ge(t),null;case 17:return rt(t.type)&&Wa(),Ge(t),null;case 19:if(Re(Pe),u=t.memoizedState,u===null)return Ge(t),null;if(i=(t.flags&128)!==0,h=u.rendering,h===null)if(i)Kn(u,!1);else{if(qe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(h=ro(e),h!==null){for(t.flags|=128,Kn(u,!1),i=h.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)u=n,e=i,u.flags&=14680066,h=u.alternate,h===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=h.childLanes,u.lanes=h.lanes,u.child=h.child,u.subtreeFlags=0,u.deletions=null,u.memoizedProps=h.memoizedProps,u.memoizedState=h.memoizedState,u.updateQueue=h.updateQueue,u.type=h.type,e=h.dependencies,u.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ze(Pe,Pe.current&1|2),t.child}e=e.sibling}u.tail!==null&&Fe()>an&&(t.flags|=128,i=!0,Kn(u,!1),t.lanes=4194304)}else{if(!i)if(e=ro(h),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Kn(u,!0),u.tail===null&&u.tailMode==="hidden"&&!h.alternate&&!Le)return Ge(t),null}else 2*Fe()-u.renderingStartTime>an&&n!==1073741824&&(t.flags|=128,i=!0,Kn(u,!1),t.lanes=4194304);u.isBackwards?(h.sibling=t.child,t.child=h):(n=u.last,n!==null?n.sibling=h:t.child=h,u.last=h)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Fe(),t.sibling=null,n=Pe.current,ze(Pe,i?n&1|2:n&1),t):(Ge(t),null);case 22:case 23:return Ol(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&(t.mode&1)!==0?(dt&1073741824)!==0&&(Ge(t),t.subtreeFlags&6&&(t.flags|=8192)):Ge(t),null;case 24:return null;case 25:return null}throw Error(o(156,t.tag))}function Im(e,t){switch(Xi(t),t.tag){case 1:return rt(t.type)&&Wa(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return en(),Re(tt),Re(Ke),sl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return il(t),null;case 13:if(Re(Pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Gr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Re(Pe),null;case 4:return en(),null;case 10:return tl(t.type._context),null;case 22:case 23:return Ol(),null;case 24:return null;default:return null}}var po=!1,Ze=!1,Lm=typeof WeakSet=="function"?WeakSet:Set,J=null;function rn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(i){Ae(e,t,i)}else n.current=null}function Iu(e,t,n){try{n()}catch(i){Ae(e,t,i)}}var Lu=!1;function Pm(e,t){if($i=Ra,e=dd(),Ii(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var c=i.anchorOffset,u=i.focusNode;i=i.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var h=0,y=-1,j=-1,I=0,F=0,O=e,A=null;t:for(;;){for(var K;O!==n||c!==0&&O.nodeType!==3||(y=h+c),O!==u||i!==0&&O.nodeType!==3||(j=h+i),O.nodeType===3&&(h+=O.nodeValue.length),(K=O.firstChild)!==null;)A=O,O=K;for(;;){if(O===e)break t;if(A===n&&++I===c&&(y=h),A===u&&++F===i&&(j=h),(K=O.nextSibling)!==null)break;O=A,A=O.parentNode}O=K}n=y===-1||j===-1?null:{start:y,end:j}}else n=null}n=n||{start:0,end:0}}else n=null;for(qi={focusedElem:e,selectionRange:n},Ra=!1,J=t;J!==null;)if(t=J,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,J=e;else for(;J!==null;){t=J;try{var ee=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(ee!==null){var ne=ee.memoizedProps,De=ee.memoizedState,z=t.stateNode,N=z.getSnapshotBeforeUpdate(t.elementType===t.type?ne:jt(t.type,ne),De);z.__reactInternalSnapshotBeforeUpdate=N}break;case 3:var M=t.stateNode.containerInfo;M.nodeType===1?M.textContent="":M.nodeType===9&&M.documentElement&&M.removeChild(M.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(U){Ae(t,t.return,U)}if(e=t.sibling,e!==null){e.return=t.return,J=e;break}J=t.return}return ee=Lu,Lu=!1,ee}function Xn(e,t,n){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var c=i=i.next;do{if((c.tag&e)===e){var u=c.destroy;c.destroy=void 0,u!==void 0&&Iu(t,n,u)}c=c.next}while(c!==i)}}function fo(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var i=n.create;n.destroy=i()}n=n.next}while(n!==t)}}function _l(e){var t=e.ref;if(t!==null){var n=e.stateNode;e.tag,e=n,typeof t=="function"?t(e):t.current=e}}function Pu(e){var t=e.alternate;t!==null&&(e.alternate=null,Pu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Rt],delete t[Dn],delete t[Wi],delete t[mm],delete t[bm])),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 Tu(e){return e.tag===5||e.tag===3||e.tag===4}function Au(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Tu(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 zl(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Va));else if(i!==4&&(e=e.child,e!==null))for(zl(e,t,n),e=e.sibling;e!==null;)zl(e,t,n),e=e.sibling}function Ml(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(Ml(e,t,n),e=e.sibling;e!==null;)Ml(e,t,n),e=e.sibling}var He=null,Nt=!1;function ar(e,t,n){for(n=n.child;n!==null;)Fu(e,t,n),n=n.sibling}function Fu(e,t,n){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(Na,n)}catch{}switch(n.tag){case 5:Ze||rn(n,t);case 6:var i=He,c=Nt;He=null,ar(e,t,n),He=i,Nt=c,He!==null&&(Nt?(e=He,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):He.removeChild(n.stateNode));break;case 18:He!==null&&(Nt?(e=He,n=n.stateNode,e.nodeType===8?Bi(e.parentNode,n):e.nodeType===1&&Bi(e,n),En(e)):Bi(He,n.stateNode));break;case 4:i=He,c=Nt,He=n.stateNode.containerInfo,Nt=!0,ar(e,t,n),He=i,Nt=c;break;case 0:case 11:case 14:case 15:if(!Ze&&(i=n.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){c=i=i.next;do{var u=c,h=u.destroy;u=u.tag,h!==void 0&&((u&2)!==0||(u&4)!==0)&&Iu(n,t,h),c=c.next}while(c!==i)}ar(e,t,n);break;case 1:if(!Ze&&(rn(n,t),i=n.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(y){Ae(n,t,y)}ar(e,t,n);break;case 21:ar(e,t,n);break;case 22:n.mode&1?(Ze=(i=Ze)||n.memoizedState!==null,ar(e,t,n),Ze=i):ar(e,t,n);break;default:ar(e,t,n)}}function Du(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Lm),t.forEach(function(i){var c=Vm.bind(null,e,i);n.has(i)||(n.add(i),i.then(c,c))})}}function Ct(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var c=n[i];try{var u=e,h=t,y=h;e:for(;y!==null;){switch(y.tag){case 5:He=y.stateNode,Nt=!1;break e;case 3:He=y.stateNode.containerInfo,Nt=!0;break e;case 4:He=y.stateNode.containerInfo,Nt=!0;break e}y=y.return}if(He===null)throw Error(o(160));Fu(u,h,c),He=null,Nt=!1;var j=c.alternate;j!==null&&(j.return=null),c.return=null}catch(I){Ae(c,t,I)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ou(t,e),t=t.sibling}function Ou(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ct(t,e),Pt(e),i&4){try{Xn(3,e,e.return),fo(3,e)}catch(ne){Ae(e,e.return,ne)}try{Xn(5,e,e.return)}catch(ne){Ae(e,e.return,ne)}}break;case 1:Ct(t,e),Pt(e),i&512&&n!==null&&rn(n,n.return);break;case 5:if(Ct(t,e),Pt(e),i&512&&n!==null&&rn(n,n.return),e.flags&32){var c=e.stateNode;try{mn(c,"")}catch(ne){Ae(e,e.return,ne)}}if(i&4&&(c=e.stateNode,c!=null)){var u=e.memoizedProps,h=n!==null?n.memoizedProps:u,y=e.type,j=e.updateQueue;if(e.updateQueue=null,j!==null)try{y==="input"&&u.type==="radio"&&u.name!=null&&pc(c,u),si(y,h);var I=si(y,u);for(h=0;h<j.length;h+=2){var F=j[h],O=j[h+1];F==="style"?yc(c,O):F==="dangerouslySetInnerHTML"?xc(c,O):F==="children"?mn(c,O):ae(c,F,O,I)}switch(y){case"input":ni(c,u);break;case"textarea":gc(c,u);break;case"select":var A=c._wrapperState.wasMultiple;c._wrapperState.wasMultiple=!!u.multiple;var K=u.value;K!=null?Tr(c,!!u.multiple,K,!1):A!==!!u.multiple&&(u.defaultValue!=null?Tr(c,!!u.multiple,u.defaultValue,!0):Tr(c,!!u.multiple,u.multiple?[]:"",!1))}c[Dn]=u}catch(ne){Ae(e,e.return,ne)}}break;case 6:if(Ct(t,e),Pt(e),i&4){if(e.stateNode===null)throw Error(o(162));c=e.stateNode,u=e.memoizedProps;try{c.nodeValue=u}catch(ne){Ae(e,e.return,ne)}}break;case 3:if(Ct(t,e),Pt(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{En(t.containerInfo)}catch(ne){Ae(e,e.return,ne)}break;case 4:Ct(t,e),Pt(e);break;case 13:Ct(t,e),Pt(e),c=e.child,c.flags&8192&&(u=c.memoizedState!==null,c.stateNode.isHidden=u,!u||c.alternate!==null&&c.alternate.memoizedState!==null||(Ll=Fe())),i&4&&Du(e);break;case 22:if(F=n!==null&&n.memoizedState!==null,e.mode&1?(Ze=(I=Ze)||F,Ct(t,e),Ze=I):Ct(t,e),Pt(e),i&8192){if(I=e.memoizedState!==null,(e.stateNode.isHidden=I)&&!F&&(e.mode&1)!==0)for(J=e,F=e.child;F!==null;){for(O=J=F;J!==null;){switch(A=J,K=A.child,A.tag){case 0:case 11:case 14:case 15:Xn(4,A,A.return);break;case 1:rn(A,A.return);var ee=A.stateNode;if(typeof ee.componentWillUnmount=="function"){i=A,n=A.return;try{t=i,ee.props=t.memoizedProps,ee.state=t.memoizedState,ee.componentWillUnmount()}catch(ne){Ae(i,n,ne)}}break;case 5:rn(A,A.return);break;case 22:if(A.memoizedState!==null){Uu(O);continue}}K!==null?(K.return=A,J=K):Uu(O)}F=F.sibling}e:for(F=null,O=e;;){if(O.tag===5){if(F===null){F=O;try{c=O.stateNode,I?(u=c.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none"):(y=O.stateNode,j=O.memoizedProps.style,h=j!=null&&j.hasOwnProperty("display")?j.display:null,y.style.display=vc("display",h))}catch(ne){Ae(e,e.return,ne)}}}else if(O.tag===6){if(F===null)try{O.stateNode.nodeValue=I?"":O.memoizedProps}catch(ne){Ae(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;F===O&&(F=null),O=O.return}F===O&&(F=null),O.sibling.return=O.return,O=O.sibling}}break;case 19:Ct(t,e),Pt(e),i&4&&Du(e);break;case 21:break;default:Ct(t,e),Pt(e)}}function Pt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Tu(n)){var i=n;break e}n=n.return}throw Error(o(160))}switch(i.tag){case 5:var c=i.stateNode;i.flags&32&&(mn(c,""),i.flags&=-33);var u=Au(e);Ml(e,u,c);break;case 3:case 4:var h=i.stateNode.containerInfo,y=Au(e);zl(e,y,h);break;default:throw Error(o(161))}}catch(j){Ae(e,e.return,j)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Tm(e,t,n){J=e,$u(e)}function $u(e,t,n){for(var i=(e.mode&1)!==0;J!==null;){var c=J,u=c.child;if(c.tag===22&&i){var h=c.memoizedState!==null||po;if(!h){var y=c.alternate,j=y!==null&&y.memoizedState!==null||Ze;y=po;var I=Ze;if(po=h,(Ze=j)&&!I)for(J=c;J!==null;)h=J,j=h.child,h.tag===22&&h.memoizedState!==null?Vu(c):j!==null?(j.return=h,J=j):Vu(c);for(;u!==null;)J=u,$u(u),u=u.sibling;J=c,po=y,Ze=I}qu(e)}else(c.subtreeFlags&8772)!==0&&u!==null?(u.return=c,J=u):qu(e)}}function qu(e){for(;J!==null;){var t=J;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Ze||fo(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!Ze)if(n===null)i.componentDidMount();else{var c=t.elementType===t.type?n.memoizedProps:jt(t.type,n.memoizedProps);i.componentDidUpdate(c,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var u=t.updateQueue;u!==null&&qd(t,u,i);break;case 3:var h=t.updateQueue;if(h!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}qd(t,h,n)}break;case 5:var y=t.stateNode;if(n===null&&t.flags&4){n=y;var j=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":j.autoFocus&&n.focus();break;case"img":j.src&&(n.src=j.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var I=t.alternate;if(I!==null){var F=I.memoizedState;if(F!==null){var O=F.dehydrated;O!==null&&En(O)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(o(163))}Ze||t.flags&512&&_l(t)}catch(A){Ae(t,t.return,A)}}if(t===e){J=null;break}if(n=t.sibling,n!==null){n.return=t.return,J=n;break}J=t.return}}function Uu(e){for(;J!==null;){var t=J;if(t===e){J=null;break}var n=t.sibling;if(n!==null){n.return=t.return,J=n;break}J=t.return}}function Vu(e){for(;J!==null;){var t=J;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{fo(4,t)}catch(j){Ae(t,n,j)}break;case 1:var i=t.stateNode;if(typeof i.componentDidMount=="function"){var c=t.return;try{i.componentDidMount()}catch(j){Ae(t,c,j)}}var u=t.return;try{_l(t)}catch(j){Ae(t,u,j)}break;case 5:var h=t.return;try{_l(t)}catch(j){Ae(t,h,j)}}}catch(j){Ae(t,t.return,j)}if(t===e){J=null;break}var y=t.sibling;if(y!==null){y.return=t.return,J=y;break}J=t.return}}var Am=Math.ceil,ho=G.ReactCurrentDispatcher,Rl=G.ReactCurrentOwner,bt=G.ReactCurrentBatchConfig,Ne=0,Ve=null,Oe=null,Qe=0,dt=0,nn=Jt(0),qe=0,Gn=null,Sr=0,go=0,Il=0,Zn=null,at=null,Ll=0,an=1/0,Ut=null,mo=!1,Pl=null,or=null,bo=!1,ir=null,xo=0,Yn=0,Tl=null,vo=-1,yo=0;function Je(){return(Ne&6)!==0?Fe():vo!==-1?vo:vo=Fe()}function lr(e){return(e.mode&1)===0?1:(Ne&2)!==0&&Qe!==0?Qe&-Qe:vm.transition!==null?(yo===0&&(yo=Tc()),yo):(e=_e,e!==0||(e=window.event,e=e===void 0?16:Bc(e.type)),e)}function Et(e,t,n,i){if(50<Yn)throw Yn=0,Tl=null,Error(o(185));kn(e,n,i),((Ne&2)===0||e!==Ve)&&(e===Ve&&((Ne&2)===0&&(go|=n),qe===4&&sr(e,Qe)),ot(e,i),n===1&&Ne===0&&(t.mode&1)===0&&(an=Fe()+500,Qa&&tr()))}function ot(e,t){var n=e.callbackNode;vg(e,t);var i=_a(e,e===Ve?Qe:0);if(i===0)n!==null&&Ic(n),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(n!=null&&Ic(n),t===1)e.tag===0?xm(Wu.bind(null,e)):zd(Wu.bind(null,e)),hm(function(){(Ne&6)===0&&tr()}),n=null;else{switch(Ac(i)){case 1:n=gi;break;case 4:n=Lc;break;case 16:n=ja;break;case 536870912:n=Pc;break;default:n=ja}n=Ju(n,Bu.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Bu(e,t){if(vo=-1,yo=0,(Ne&6)!==0)throw Error(o(327));var n=e.callbackNode;if(on()&&e.callbackNode!==n)return null;var i=_a(e,e===Ve?Qe:0);if(i===0)return null;if((i&30)!==0||(i&e.expiredLanes)!==0||t)t=wo(e,i);else{t=i;var c=Ne;Ne|=2;var u=Qu();(Ve!==e||Qe!==t)&&(Ut=null,an=Fe()+500,Nr(e,t));do try{Om();break}catch(y){Hu(e,y)}while(!0);el(),ho.current=u,Ne=c,Oe!==null?t=0:(Ve=null,Qe=0,t=qe)}if(t!==0){if(t===2&&(c=mi(e),c!==0&&(i=c,t=Al(e,c))),t===1)throw n=Gn,Nr(e,0),sr(e,i),ot(e,Fe()),n;if(t===6)sr(e,i);else{if(c=e.current.alternate,(i&30)===0&&!Fm(c)&&(t=wo(e,i),t===2&&(u=mi(e),u!==0&&(i=u,t=Al(e,u))),t===1))throw n=Gn,Nr(e,0),sr(e,i),ot(e,Fe()),n;switch(e.finishedWork=c,e.finishedLanes=i,t){case 0:case 1:throw Error(o(345));case 2:Cr(e,at,Ut);break;case 3:if(sr(e,i),(i&130023424)===i&&(t=Ll+500-Fe(),10<t)){if(_a(e,0)!==0)break;if(c=e.suspendedLanes,(c&i)!==i){Je(),e.pingedLanes|=e.suspendedLanes&c;break}e.timeoutHandle=Vi(Cr.bind(null,e,at,Ut),t);break}Cr(e,at,Ut);break;case 4:if(sr(e,i),(i&4194240)===i)break;for(t=e.eventTimes,c=-1;0<i;){var h=31-wt(i);u=1<<h,h=t[h],h>c&&(c=h),i&=~u}if(i=c,i=Fe()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Am(i/1960))-i,10<i){e.timeoutHandle=Vi(Cr.bind(null,e,at,Ut),i);break}Cr(e,at,Ut);break;case 5:Cr(e,at,Ut);break;default:throw Error(o(329))}}}return ot(e,Fe()),e.callbackNode===n?Bu.bind(null,e):null}function Al(e,t){var n=Zn;return e.current.memoizedState.isDehydrated&&(Nr(e,t).flags|=256),e=wo(e,t),e!==2&&(t=at,at=n,t!==null&&Fl(t)),e}function Fl(e){at===null?at=e:at.push.apply(at,e)}function Fm(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var i=0;i<n.length;i++){var c=n[i],u=c.getSnapshot;c=c.value;try{if(!kt(u(),c))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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&=~Il,t&=~go,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-wt(t),i=1<<n;e[n]=-1,t&=~i}}function Wu(e){if((Ne&6)!==0)throw Error(o(327));on();var t=_a(e,0);if((t&1)===0)return ot(e,Fe()),null;var n=wo(e,t);if(e.tag!==0&&n===2){var i=mi(e);i!==0&&(t=i,n=Al(e,i))}if(n===1)throw n=Gn,Nr(e,0),sr(e,t),ot(e,Fe()),n;if(n===6)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Cr(e,at,Ut),ot(e,Fe()),null}function Dl(e,t){var n=Ne;Ne|=1;try{return e(t)}finally{Ne=n,Ne===0&&(an=Fe()+500,Qa&&tr())}}function jr(e){ir!==null&&ir.tag===0&&(Ne&6)===0&&on();var t=Ne;Ne|=1;var n=bt.transition,i=_e;try{if(bt.transition=null,_e=1,e)return e()}finally{_e=i,bt.transition=n,Ne=t,(Ne&6)===0&&tr()}}function Ol(){dt=nn.current,Re(nn)}function Nr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,fm(n)),Oe!==null)for(n=Oe.return;n!==null;){var i=n;switch(Xi(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&Wa();break;case 3:en(),Re(tt),Re(Ke),sl();break;case 5:il(i);break;case 4:en();break;case 13:Re(Pe);break;case 19:Re(Pe);break;case 10:tl(i.type._context);break;case 22:case 23:Ol()}n=n.return}if(Ve=e,Oe=e=cr(e.current,null),Qe=dt=t,qe=0,Gn=null,Il=go=Sr=0,at=Zn=null,yr!==null){for(t=0;t<yr.length;t++)if(n=yr[t],i=n.interleaved,i!==null){n.interleaved=null;var c=i.next,u=n.pending;if(u!==null){var h=u.next;u.next=c,i.next=h}n.pending=i}yr=null}return e}function Hu(e,t){do{var n=Oe;try{if(el(),no.current=lo,ao){for(var i=Te.memoizedState;i!==null;){var c=i.queue;c!==null&&(c.pending=null),i=i.next}ao=!1}if(kr=0,Ue=$e=Te=null,Bn=!1,Wn=0,Rl.current=null,n===null||n.return===null){qe=1,Gn=t,Oe=null;break}e:{var u=e,h=n.return,y=n,j=t;if(t=Qe,y.flags|=32768,j!==null&&typeof j=="object"&&typeof j.then=="function"){var I=j,F=y,O=F.tag;if((F.mode&1)===0&&(O===0||O===11||O===15)){var A=F.alternate;A?(F.updateQueue=A.updateQueue,F.memoizedState=A.memoizedState,F.lanes=A.lanes):(F.updateQueue=null,F.memoizedState=null)}var K=mu(h);if(K!==null){K.flags&=-257,bu(K,h,y,u,t),K.mode&1&&gu(u,I,t),t=K,j=I;var ee=t.updateQueue;if(ee===null){var ne=new Set;ne.add(j),t.updateQueue=ne}else ee.add(j);break e}else{if((t&1)===0){gu(u,I,t),$l();break e}j=Error(o(426))}}else if(Le&&y.mode&1){var De=mu(h);if(De!==null){(De.flags&65536)===0&&(De.flags|=256),bu(De,h,y,u,t),Yi(tn(j,y));break e}}u=j=tn(j,y),qe!==4&&(qe=2),Zn===null?Zn=[u]:Zn.push(u),u=h;do{switch(u.tag){case 3:u.flags|=65536,t&=-t,u.lanes|=t;var z=fu(u,j,t);$d(u,z);break e;case 1:y=j;var N=u.type,M=u.stateNode;if((u.flags&128)===0&&(typeof N.getDerivedStateFromError=="function"||M!==null&&typeof M.componentDidCatch=="function"&&(or===null||!or.has(M)))){u.flags|=65536,t&=-t,u.lanes|=t;var U=hu(u,y,t);$d(u,U);break e}}u=u.return}while(u!==null)}Xu(n)}catch(oe){t=oe,Oe===n&&n!==null&&(Oe=n=n.return);continue}break}while(!0)}function Qu(){var e=ho.current;return ho.current=lo,e===null?lo:e}function $l(){(qe===0||qe===3||qe===2)&&(qe=4),Ve===null||(Sr&268435455)===0&&(go&268435455)===0||sr(Ve,Qe)}function wo(e,t){var n=Ne;Ne|=2;var i=Qu();(Ve!==e||Qe!==t)&&(Ut=null,Nr(e,t));do try{Dm();break}catch(c){Hu(e,c)}while(!0);if(el(),Ne=n,ho.current=i,Oe!==null)throw Error(o(261));return Ve=null,Qe=0,qe}function Dm(){for(;Oe!==null;)Ku(Oe)}function Om(){for(;Oe!==null&&!dg();)Ku(Oe)}function Ku(e){var t=Yu(e.alternate,e,dt);e.memoizedProps=e.pendingProps,t===null?Xu(e):Oe=t,Rl.current=null}function Xu(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=Rm(n,t,dt),n!==null){Oe=n;return}}else{if(n=Im(n,t),n!==null){n.flags&=32767,Oe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{qe=6,Oe=null;return}}if(t=t.sibling,t!==null){Oe=t;return}Oe=t=e}while(t!==null);qe===0&&(qe=5)}function Cr(e,t,n){var i=_e,c=bt.transition;try{bt.transition=null,_e=1,$m(e,t,n,i)}finally{bt.transition=c,_e=i}return null}function $m(e,t,n,i){do on();while(ir!==null);if((Ne&6)!==0)throw Error(o(327));n=e.finishedWork;var c=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var u=n.lanes|n.childLanes;if(yg(e,u),e===Ve&&(Oe=Ve=null,Qe=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||bo||(bo=!0,Ju(ja,function(){return on(),null})),u=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||u){u=bt.transition,bt.transition=null;var h=_e;_e=1;var y=Ne;Ne|=4,Rl.current=null,Pm(e,n),Ou(n,e),im(qi),Ra=!!$i,qi=$i=null,e.current=n,Tm(n),ug(),Ne=y,_e=h,bt.transition=u}else e.current=n;if(bo&&(bo=!1,ir=e,xo=c),u=e.pendingLanes,u===0&&(or=null),hg(n.stateNode),ot(e,Fe()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)c=t[n],i(c.value,{componentStack:c.stack,digest:c.digest});if(mo)throw mo=!1,e=Pl,Pl=null,e;return(xo&1)!==0&&e.tag!==0&&on(),u=e.pendingLanes,(u&1)!==0?e===Tl?Yn++:(Yn=0,Tl=e):Yn=0,tr(),null}function on(){if(ir!==null){var e=Ac(xo),t=bt.transition,n=_e;try{if(bt.transition=null,_e=16>e?16:e,ir===null)var i=!1;else{if(e=ir,ir=null,xo=0,(Ne&6)!==0)throw Error(o(331));var c=Ne;for(Ne|=4,J=e.current;J!==null;){var u=J,h=u.child;if((J.flags&16)!==0){var y=u.deletions;if(y!==null){for(var j=0;j<y.length;j++){var I=y[j];for(J=I;J!==null;){var F=J;switch(F.tag){case 0:case 11:case 15:Xn(8,F,u)}var O=F.child;if(O!==null)O.return=F,J=O;else for(;J!==null;){F=J;var A=F.sibling,K=F.return;if(Pu(F),F===I){J=null;break}if(A!==null){A.return=K,J=A;break}J=K}}}var ee=u.alternate;if(ee!==null){var ne=ee.child;if(ne!==null){ee.child=null;do{var De=ne.sibling;ne.sibling=null,ne=De}while(ne!==null)}}J=u}}if((u.subtreeFlags&2064)!==0&&h!==null)h.return=u,J=h;else e:for(;J!==null;){if(u=J,(u.flags&2048)!==0)switch(u.tag){case 0:case 11:case 15:Xn(9,u,u.return)}var z=u.sibling;if(z!==null){z.return=u.return,J=z;break e}J=u.return}}var N=e.current;for(J=N;J!==null;){h=J;var M=h.child;if((h.subtreeFlags&2064)!==0&&M!==null)M.return=h,J=M;else e:for(h=N;J!==null;){if(y=J,(y.flags&2048)!==0)try{switch(y.tag){case 0:case 11:case 15:fo(9,y)}}catch(oe){Ae(y,y.return,oe)}if(y===h){J=null;break e}var U=y.sibling;if(U!==null){U.return=y.return,J=U;break e}J=y.return}}if(Ne=c,tr(),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(Na,e)}catch{}i=!0}return i}finally{_e=n,bt.transition=t}}return!1}function Gu(e,t,n){t=tn(n,t),t=fu(e,t,1),e=nr(e,t,1),t=Je(),e!==null&&(kn(e,1,t),ot(e,t))}function Ae(e,t,n){if(e.tag===3)Gu(e,e,n);else for(;t!==null;){if(t.tag===3){Gu(t,e,n);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(or===null||!or.has(i))){e=tn(n,e),e=hu(t,e,1),t=nr(t,e,1),e=Je(),t!==null&&(kn(t,1,e),ot(t,e));break}}t=t.return}}function qm(e,t,n){var i=e.pingCache;i!==null&&i.delete(t),t=Je(),e.pingedLanes|=e.suspendedLanes&n,Ve===e&&(Qe&n)===n&&(qe===4||qe===3&&(Qe&130023424)===Qe&&500>Fe()-Ll?Nr(e,0):Il|=n),ot(e,t)}function Zu(e,t){t===0&&((e.mode&1)===0?t=1:(t=Ea,Ea<<=1,(Ea&130023424)===0&&(Ea=4194304)));var n=Je();e=Ot(e,t),e!==null&&(kn(e,t,n),ot(e,n))}function Um(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Zu(e,n)}function Vm(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,c=e.memoizedState;c!==null&&(n=c.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(o(314))}i!==null&&i.delete(t),Zu(e,n)}var Yu;Yu=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||tt.current)nt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return nt=!1,Mm(e,t,n);nt=(e.flags&131072)!==0}else nt=!1,Le&&(t.flags&1048576)!==0&&Md(t,Xa,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;uo(e,t),e=t.pendingProps;var c=Qr(t,Ke.current);Jr(t,n),c=ul(null,t,i,e,c,n);var u=pl();return t.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,rt(i)?(u=!0,Ha(t)):u=!1,t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,al(t),c.updater=so,t.stateNode=c,c._reactInternals=t,xl(t,i,e,n),t=kl(null,t,i,!0,u,n)):(t.tag=0,Le&&u&&Ki(t),Ye(null,t,c,n),t=t.child),t;case 16:i=t.elementType;e:{switch(uo(e,t),e=t.pendingProps,c=i._init,i=c(i._payload),t.type=i,c=t.tag=Wm(i),e=jt(i,e),c){case 0:t=wl(null,t,i,e,n);break e;case 1:t=Su(null,t,i,e,n);break e;case 11:t=xu(null,t,i,e,n);break e;case 14:t=vu(null,t,i,jt(i.type,e),n);break e}throw Error(o(306,i,""))}return t;case 0:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:jt(i,c),wl(e,t,i,c,n);case 1:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:jt(i,c),Su(e,t,i,c,n);case 3:e:{if(ju(t),e===null)throw Error(o(387));i=t.pendingProps,u=t.memoizedState,c=u.element,Od(e,t),to(t,i,null,n);var h=t.memoizedState;if(i=h.element,u.isDehydrated)if(u={element:i,isDehydrated:!1,cache:h.cache,pendingSuspenseBoundaries:h.pendingSuspenseBoundaries,transitions:h.transitions},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){c=tn(Error(o(423)),t),t=Nu(e,t,i,n,c);break e}else if(i!==c){c=tn(Error(o(424)),t),t=Nu(e,t,i,n,c);break e}else for(ct=Yt(t.stateNode.containerInfo.firstChild),st=t,Le=!0,St=null,n=Fd(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Gr(),i===c){t=qt(e,t,n);break e}Ye(e,t,i,n)}t=t.child}return t;case 5:return Ud(t),e===null&&Zi(t),i=t.type,c=t.pendingProps,u=e!==null?e.memoizedProps:null,h=c.children,Ui(i,c)?h=null:u!==null&&Ui(i,u)&&(t.flags|=32),ku(e,t),Ye(e,t,h,n),t.child;case 6:return e===null&&Zi(t),null;case 13:return Cu(e,t,n);case 4:return ol(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Zr(t,null,i,n):Ye(e,t,i,n),t.child;case 11:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:jt(i,c),xu(e,t,i,c,n);case 7:return Ye(e,t,t.pendingProps,n),t.child;case 8:return Ye(e,t,t.pendingProps.children,n),t.child;case 12:return Ye(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(i=t.type._context,c=t.pendingProps,u=t.memoizedProps,h=c.value,ze(Ya,i._currentValue),i._currentValue=h,u!==null)if(kt(u.value,h)){if(u.children===c.children&&!tt.current){t=qt(e,t,n);break e}}else for(u=t.child,u!==null&&(u.return=t);u!==null;){var y=u.dependencies;if(y!==null){h=u.child;for(var j=y.firstContext;j!==null;){if(j.context===i){if(u.tag===1){j=$t(-1,n&-n),j.tag=2;var I=u.updateQueue;if(I!==null){I=I.shared;var F=I.pending;F===null?j.next=j:(j.next=F.next,F.next=j),I.pending=j}}u.lanes|=n,j=u.alternate,j!==null&&(j.lanes|=n),rl(u.return,n,t),y.lanes|=n;break}j=j.next}}else if(u.tag===10)h=u.type===t.type?null:u.child;else if(u.tag===18){if(h=u.return,h===null)throw Error(o(341));h.lanes|=n,y=h.alternate,y!==null&&(y.lanes|=n),rl(h,n,t),h=u.sibling}else h=u.child;if(h!==null)h.return=u;else for(h=u;h!==null;){if(h===t){h=null;break}if(u=h.sibling,u!==null){u.return=h.return,h=u;break}h=h.return}u=h}Ye(e,t,c.children,n),t=t.child}return t;case 9:return c=t.type,i=t.pendingProps.children,Jr(t,n),c=gt(c),i=i(c),t.flags|=1,Ye(e,t,i,n),t.child;case 14:return i=t.type,c=jt(i,t.pendingProps),c=jt(i.type,c),vu(e,t,i,c,n);case 15:return yu(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:jt(i,c),uo(e,t),t.tag=1,rt(i)?(e=!0,Ha(t)):e=!1,Jr(t,n),uu(t,i,c),xl(t,i,c,n),kl(null,t,i,!0,e,n);case 19:return _u(e,t,n);case 22:return wu(e,t,n)}throw Error(o(156,t.tag))};function Ju(e,t){return Rc(e,t)}function Bm(e,t,n,i){this.tag=e,this.key=n,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,n,i){return new Bm(e,t,n,i)}function ql(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Wm(e){if(typeof e=="function")return ql(e)?1:0;if(e!=null){if(e=e.$$typeof,e===W)return 11;if(e===Ce)return 14}return 2}function cr(e,t){var n=e.alternate;return n===null?(n=xt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ko(e,t,n,i,c,u){var h=2;if(i=e,typeof e=="function")ql(e)&&(h=1);else if(typeof e=="string")h=5;else e:switch(e){case Z:return Er(n.children,c,u,t);case re:h=8,c|=8;break;case be:return e=xt(12,n,t,c|2),e.elementType=be,e.lanes=u,e;case H:return e=xt(13,n,t,c),e.elementType=H,e.lanes=u,e;case me:return e=xt(19,n,t,c),e.elementType=me,e.lanes=u,e;case ye:return So(n,c,u,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Q:h=10;break e;case fe:h=9;break e;case W:h=11;break e;case Ce:h=14;break e;case xe:h=16,i=null;break e}throw Error(o(130,e==null?e:typeof e,""))}return t=xt(h,n,t,c),t.elementType=e,t.type=i,t.lanes=u,t}function Er(e,t,n,i){return e=xt(7,e,i,t),e.lanes=n,e}function So(e,t,n,i){return e=xt(22,e,i,t),e.elementType=ye,e.lanes=n,e.stateNode={isHidden:!1},e}function Ul(e,t,n){return e=xt(6,e,null,t),e.lanes=n,e}function Vl(e,t,n){return t=xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Hm(e,t,n,i,c){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=bi(0),this.expirationTimes=bi(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bi(0),this.identifierPrefix=i,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function Bl(e,t,n,i,c,u,h,y,j){return e=new Hm(e,t,n,y,j),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:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},al(u),e}function Qm(e,t,n){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:te,key:i==null?null:""+i,children:e,containerInfo:t,implementation:n}}function ep(e){if(!e)return er;e=e._reactInternals;e:{if(gr(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(rt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(o(171))}if(e.tag===1){var n=e.type;if(rt(n))return Ed(e,n,t)}return t}function tp(e,t,n,i,c,u,h,y,j){return e=Bl(n,i,!0,e,c,u,h,y,j),e.context=ep(null),n=e.current,i=Je(),c=lr(n),u=$t(i,c),u.callback=t??null,nr(n,u,c),e.current.lanes=c,kn(e,c,i),ot(e,i),e}function jo(e,t,n,i){var c=t.current,u=Je(),h=lr(c);return n=ep(n),t.context===null?t.context=n:t.pendingContext=n,t=$t(u,h),t.payload={element:e},i=i===void 0?null:i,i!==null&&(t.callback=i),e=nr(c,t,h),e!==null&&(Et(e,c,h,u),eo(e,c,h)),h}function No(e){return e=e.current,e.child?(e.child.tag,e.child.stateNode):null}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Wl(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function Km(){return null}var np=typeof reportError=="function"?reportError:function(e){console.error(e)};function Hl(e){this._internalRoot=e}Co.prototype.render=Hl.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));jo(e,t,null,null)},Co.prototype.unmount=Hl.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;jr(function(){jo(null,e,null,null)}),t[Tt]=null}};function Co(e){this._internalRoot=e}Co.prototype.unstable_scheduleHydration=function(e){if(e){var t=Oc();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Xt.length&&t!==0&&t<Xt[n].priority;n++);Xt.splice(n,0,e),n===0&&Uc(e)}};function Ql(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 ap(){}function Xm(e,t,n,i,c){if(c){if(typeof i=="function"){var u=i;i=function(){var I=No(h);u.call(I)}}var h=tp(t,i,e,0,null,!1,!1,"",ap);return e._reactRootContainer=h,e[Tt]=h.current,An(e.nodeType===8?e.parentNode:e),jr(),h}for(;c=e.lastChild;)e.removeChild(c);if(typeof i=="function"){var y=i;i=function(){var I=No(j);y.call(I)}}var j=Bl(e,0,!1,null,null,!1,!1,"",ap);return e._reactRootContainer=j,e[Tt]=j.current,An(e.nodeType===8?e.parentNode:e),jr(function(){jo(t,j,n,i)}),j}function _o(e,t,n,i,c){var u=n._reactRootContainer;if(u){var h=u;if(typeof c=="function"){var y=c;c=function(){var j=No(h);y.call(j)}}jo(t,h,e,c)}else h=Xm(n,t,e,c,i);return No(h)}Fc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=wn(t.pendingLanes);n!==0&&(xi(t,n|1),ot(t,Fe()),(Ne&6)===0&&(an=Fe()+500,tr()))}break;case 13:jr(function(){var i=Ot(e,1);if(i!==null){var c=Je();Et(i,e,1,c)}}),Wl(e,1)}},vi=function(e){if(e.tag===13){var t=Ot(e,134217728);if(t!==null){var n=Je();Et(t,e,134217728,n)}Wl(e,134217728)}},Dc=function(e){if(e.tag===13){var t=lr(e),n=Ot(e,t);if(n!==null){var i=Je();Et(n,e,t,i)}Wl(e,t)}},Oc=function(){return _e},$c=function(e,t){var n=_e;try{return _e=e,t()}finally{_e=n}},ui=function(e,t,n){switch(t){case"input":if(ni(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var c=Ba(i);if(!c)throw Error(o(90));dc(i),ni(i,c)}}}break;case"textarea":gc(e,n);break;case"select":t=n.value,t!=null&&Tr(e,!!n.multiple,t,!1)}},jc=Dl,Nc=jr;var Gm={usingClientEntryPoint:!1,Events:[On,Wr,Ba,kc,Sc,Dl]},Jn={findFiberByHostInstance:mr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Zm={bundleType:Jn.bundleType,version:Jn.version,rendererPackageName:Jn.rendererPackageName,rendererConfig:Jn.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:G.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=zc(e),e===null?null:e.stateNode},findFiberByHostInstance:Jn.findFiberByHostInstance||Km,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{Na=zo.inject(Zm),Mt=zo}catch{}}return it.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Gm,it.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ql(t))throw Error(o(200));return Qm(e,t,null,n)},it.createRoot=function(e,t){if(!Ql(e))throw Error(o(299));var n=!1,i="",c=np;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=Bl(e,1,!1,null,null,n,!1,i,c),e[Tt]=t.current,An(e.nodeType===8?e.parentNode:e),new Hl(t)},it.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=zc(t),e=e===null?null:e.stateNode,e},it.flushSync=function(e){return jr(e)},it.hydrate=function(e,t,n){if(!Eo(t))throw Error(o(200));return _o(null,e,t,!0,n)},it.hydrateRoot=function(e,t,n){if(!Ql(e))throw Error(o(405));var i=n!=null&&n.hydratedSources||null,c=!1,u="",h=np;if(n!=null&&(n.unstable_strictMode===!0&&(c=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onRecoverableError!==void 0&&(h=n.onRecoverableError)),t=tp(t,null,e,1,n??null,c,!1,u,h),e[Tt]=t.current,An(e),i)for(e=0;e<i.length;e++)n=i[e],c=n._getVersion,c=c(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,c]:t.mutableSourceEagerHydrationData.push(n,c);return new Co(t)},it.render=function(e,t,n){if(!Eo(t))throw Error(o(200));return _o(null,e,t,!1,n)},it.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},it.unstable_batchedUpdates=Dl,it.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!Eo(n))throw Error(o(200));if(e==null||e._reactInternals===void 0)throw Error(o(38));return _o(e,t,n,!1,i)},it.version="18.3.1-next-f1338f8080-20240426",it}var bp;function db(){if(bp)return Xl.exports;bp=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(a){console.error(a)}}return r(),Xl.exports=cb(),Xl.exports}var xp;function ub(){if(xp)return Mo;xp=1;var r=db();return Mo.createRoot=r.createRoot,Mo.hydrateRoot=r.hydrateRoot,Mo}var pb=ub();const fb=".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%}",Gl=25,hb={ru:"ru-RU",kk:"kk-KZ",en:"en-US"};function _t(r,a,o){return r===null?"\u2014":new Intl.NumberFormat(hb[a],{minimumFractionDigits:o,maximumFractionDigits:o}).format(r).replace(new RegExp("\\u202F","g"),"\xA0")}const Zl=r=>typeof r=="number"&&Number.isFinite(r)?r:null;function gb(r,a,o){const l=o==="asc"?1:-1,d=a.type==="number"||a.type==="integer",p=[],f=[];for(const g of r){const m=g[a.key];((d?Zl(m)===null:m==null)?f:p).push(g)}return p.sort((g,m)=>d?l*((Zl(g[a.key])??0)-(Zl(m[a.key])??0)):l*String(g[a.key]).localeCompare(String(m[a.key]))),[...p,...f]}function mb(r,a){let o=r.data;const l=a.query?.trim().toLowerCase();if(l){const v=r.columns.filter(S=>S.type==="string").map(S=>S.key);o=o.filter(S=>v.some(w=>String(S[w]??"").toLowerCase().includes(l)))}const d=r.columns.find(v=>v.key===a.sortKey);d&&(o=gb(o,d,a.dir??"asc"));const p=o.length,f=Math.max(1,Math.ceil(p/Gl)),g=Math.min(Math.max(1,Math.trunc(a.page)||1),f),m=(g-1)*Gl,b=o.slice(m,m+Gl);return{rows:b,page:g,pages:f,from:p===0?0:m+1,to:m+b.length,total:p}}function bb(r){return r.split(`
9
+ `).map(a=>{const o=a.trim();return o.startsWith("|")?/^\|[\s:|-]+\|?$/.test(o)?null:o.replace(/^\||\|$/g,"").split("|").map(l=>l.trim()).join(" \u2014 "):a}).filter(a=>a!==null).join(`
10
+ `).replace(/^\s{0,3}#+\s*/gm,"").replace(/[*_`]/g,"").trim()}function xb(r){const a=r.blocks.find(l=>l.kind==="plan"),o=[];return a&&a.passport.length>0&&o.push(a.passport.join(`
11
+ `)),o.push(bb(r.content)),a?.source&&o.push(`\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A: ${a.source.name}`),o.join(`
12
+
13
+ `)}function vp(r,a){return a.isLastInBranch?a.now.getTime()>Date.parse(r.expires_at)?"expired":"open":"answered"}function vb(r,a){const o=a.trim().toLowerCase();return o?r.filter(l=>l.label.toLowerCase().includes(o)):r}function ta(r){return[...new Set(r.data.map(a=>a.period))].sort((a,o)=>a.localeCompare(o,void 0,{numeric:!0}))}const yp=r=>r.value_kind!=="level",wp=(r,a)=>{const o=ta(r),l=o.indexOf(a);return l>0?o[l-1]:void 0},kp=(r,a)=>r.national?.period===a?r.national.value:null,yb=r=>{if(r.length===0)return null;const a=[...r].sort((l,d)=>l-d),o=Math.floor(a.length/2);return a.length%2?a[o]:(a[o-1]+a[o])/2},wb=r=>[r.territory_code??r.territory_name,r.item].filter(a=>!!a).join("|"),kb=r=>[r.territory_name??r.territory_code,r.item].filter(a=>!!a).join(", ");function Yl(r,a){const o=new Map;for(const l of r.data)l.period===a&&o.set(wb(l),{name:kb(l),value:l.value});return o}function Sb(r,a,o){return a===null||o===null||o===void 0?null:yp(r)?a-o:o<=0?null:(a/o-1)*100}const Sp=r=>r!==null&&Number.isFinite(r)?r:null;function jb(r,a){const o=Yl(r,a.period),l=wp(r,a.period),d=l?Yl(r,l):void 0,p=[...o.values()].map(m=>m.value).filter(m=>m!==null),f=p.reduce((m,b)=>m+b,0),g=a.base==="national"?kp(r,a.period):yb(p);return[...o].map(([m,{name:b,value:v}])=>{const S=Sp(d?Sb(r,v,d.get(m)?.value):null);let w=v;a.mode==="deviation"?w=v===null||g===null?null:v-g:a.mode==="change"&&(w=S);const C=r.value_kind==="level"&&v!==null&&f!==0?v/f*100:null;return{key:m,name:b,value:v,display:Sp(w),share:C,delta:S}}).sort((m,b)=>m.display===null||b.display===null?+(m.display===null)-+(b.display===null):b.display-m.display)}function Nb(r,a){return{deviation:[...Yl(r,a).values()].filter(o=>o.value!==null).length>=2,national:kp(r,a)!==null,change:wp(r,a)!==void 0}}function Cb(r,a){return a==="value"?r.unit.label:yp(r)?"\u043F.\u043F.":a==="deviation"?r.unit.label:"%"}function Eb(r){const a=r.filter(Number.isFinite);if(a.length<2)return!0;const o=Math.max(...a),l=Math.min(...a);return o<=0||o===l?!0:(o-l)/o>=.2}function jp(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),Jl=r=>r===null||se(r),yt=(r,a)=>Array.isArray(r)&&r.every(o=>vt(o)&&a(o)),Ro=r=>Array.isArray(r)&&r.every(se),_b=["self","regions","districts"],zb=["string","number","integer","period"],Mb=["indicator","territory","topic","period","scope","plan_confirm"];function Rb(r){const{period:a}=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)&&_b.includes(r.scope)&&vt(a)&&se(a.label)&&typeof a.substituted=="boolean"&&Jl(a.reason)&&se(r.breakdown)&&Ro(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 Ib(r){return se(r.section_id)&&yt(r.columns,a=>se(a.key)&&se(a.title)&&se(a.type)&&zb.includes(a.type))&&yt(r.data,()=>!0)&&typeof r.truncated=="boolean"&&Vt(r.total_rows)}function Lb(r){return se(r.topic)&&yt(r.sections,a=>se(a.id)&&Ro(a.path)&&Vt(a.count))&&yt(r.indicators,a=>se(a.entity_id)&&se(a.name)&&se(a.unit)&&se(a.years)&&se(a.section))&&Vt(r.total)&&Ro(r.examples)}function Pb(r){return se(r.id)&&se(r.type)&&Mb.includes(r.type)&&se(r.slot)&&se(r.question)&&yt(r.options,a=>se(a.value)&&se(a.label)&&Jl(a.hint))&&Jl(r.default)&&typeof r.allow_free_text=="boolean"&&Vt(r.round)&&se(r.expires_at)}const Tb=["regional","trend","breakdown","multi"],Ab=["level","percent","index","rate"],Fb=["pdf","docx","pptx","xlsx","csv"],Db=["queued","running","done","failed","expired"],Np=["territory_code","territory_name","item"],ra=r=>r==null,sn=r=>ra(r)||se(r),Ob=r=>se(r.period)&&(r.value===null||Vt(r.value))&&Np.every(a=>sn(r[a])),$b=r=>vt(r)&&se(r.title)&&se(r.url);function qb(r){return ra(r)?!0:!vt(r)||!sn(r.label)?!1:ra(r.editions)?!0:vt(r.editions)&&Object.values(r.editions).every($b)}function Ub(r){const{unit:a,national:o}=r;return se(r.id)&&se(r.title)&&se(r.shape)&&Tb.includes(r.shape)&&vt(a)&&se(a.code)&&se(a.label)&&se(r.value_kind)&&Ab.includes(r.value_kind)&&Vt(r.decimals)&&se(r.freq)&&se(r.period)&&se(r.latest_period)&&yt(r.data,Ob)&&(ra(o)||vt(o)&&se(o.period)&&Vt(o.value))&&yt(r.kpis,l=>se(l.label)&&se(l.value)&&sn(l.sub)&&sn(l.tone))&&Ro(r.findings)&&typeof r.truncated=="boolean"&&Vt(r.total_rows)&&qb(r.methodology)&&sn(r.source_url)&&sn(r.source_name)}function Vb(r){const a={...r};for(const o of Np)a[o]===null&&delete a[o];return a}function Bb(r){if(!se(r.title)||!Array.isArray(r.sections))return;const a=r.sections.filter(o=>vt(o)&&Ub(o)).map(o=>({...o,national:o.national??null,data:o.data.map(Vb)}));if(a.length!==0)return{kind:"dashboard",title:r.title,auto_open:r.auto_open===!0,sections:a}}const Cp=r=>se(r.format)&&Fb.includes(r.format)&&se(r.filename)&&se(r.title)&&se(r.download_url)&&Vt(r.size_bytes);function Wb(r){const{error:a}=r;return se(r.job_id)&&se(r.status)&&Db.includes(r.status)&&yt(r.files,Cp)&&(ra(a)||vt(a)&&se(a.code)&&se(a.message))}function Ep(r){if(vt(r))switch(r.kind){case"plan":return Rb(r)?r:void 0;case"table":return Ib(r)?r:void 0;case"catalog":return Lb(r)?r:void 0;case"clarification":return Pb(r)?r:void 0;case"dashboard":return Bb(r);case"export":return yt(r.files,Cp)?r:void 0;case"report":return Wb(r)?r:void 0;default:return}}const es="/chat/stream",Hb=100;class et extends Error{constructor(a,o,l=null){super(o),ln(this,"status"),ln(this,"code"),ln(this,"body"),this.name="ApiError",this.status=a,this.code=o,this.body=l}get resetAt(){const a=this.body;if(a&&typeof a=="object"&&"reset_at"in a&&typeof a.reset_at=="string")return a.reset_at}}function Qb(r,a){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_${a}`}async function Kb(r){const a=await r.text();if(!a)return null;try{return JSON.parse(a)}catch{return null}}async function ts(r){const a=await Kb(r);return new et(r.status,Qb(a,r.status),a)}const Xb=["\u041E \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0435: ","\u041A\u0430\u043A \u043E\u0442\u0432\u0435\u0447\u0430\u0442\u044C: "],Gb="\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u0434\u0438\u0430\u043B\u043E\u0433:",_p=`
14
+ \u041D\u043E\u0432\u044B\u0439 \u0432\u043E\u043F\u0440\u043E\u0441: `;function Zb(r){let a=r;if(Xb.some(o=>a.startsWith(o))){const o=a.indexOf(`
15
+
16
+ `);o!==-1&&(a=a.slice(o+2))}if(a.startsWith(Gb)){const o=a.lastIndexOf(_p);o!==-1&&(a=a.slice(o+_p.length))}return a}const Yb=["streaming","done","stopped","error"];function Jb(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}:{},...typeof r.startedAt=="number"?{startedAt:r.startedAt}:{}}}function zp(r){return{id:r.id,parentId:r.parent_id,role:r.role==="user"?"user":"assistant",content:r.role==="user"?Zb(r.content):r.content,mode:r.mode,status:Yb.find(a=>a===r.status)??"done",steps:r.steps.map(Jb),durationMs:r.duration_ms,rating:r.rating,feedback:r.feedback,feedbackReason:r.feedback_reason??"",attachments:r.attachments??[],blocks:(r.blocks??[]).flatMap(a=>{const o=Ep(a);return o!=null?[o]:[]}),createdAt:r.created_at}}const e0=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,Io=r=>e0.test(r);class Mp extends Error{constructor(a){super(a),this.name="StreamFailure"}}const t0=(r,a)=>Date.parse(r.createdAt)-Date.parse(a.createdAt)||(r.id<a.id?-1:r.id>a.id?1:0);function Rp(r){const a=new Map,o=new Map;for(const l of r){a.set(l.id,l);const d=o.get(l.parentId);d?d.push(l):o.set(l.parentId,[l])}for(const l of o.values())l.sort(t0);return{byId:a,children:o}}function r0(r,a){const o=[],l=new Set;let d=r.byId.get(a);for(;d&&!l.has(d.id);)l.add(d.id),o.push(d),d=d.parentId===null?void 0:r.byId.get(d.parentId);return o.reverse()}function Ip(r,a){if(!r.byId.has(a))return null;let o=a;for(;;){const l=r.children.get(o),d=l?.[l.length-1];if(!d)return o;o=d.id}}function n0(r,a){const o=r.byId.get(a);if(!o)return{list:[],position:-1};const l=r.children.get(o.parentId)??[];return{list:l,position:l.findIndex(d=>d.id===a)}}function Lp(r,a){if(a&&r.byId.has(a))return a;const o=r.children.get(null),l=o?.[o.length-1];return l?Ip(r,l.id):null}let a0=0;const o0=r=>`temp-${r}-${Date.now().toString(36)}-${(a0++).toString(36)}`;function rs(r,a,o){return{id:o0(r==="user"?"user":"stream"),parent_id:o,role:r,content:"",mode:a,status:r==="user"?"done":"streaming",steps:[],duration_ms:null,rating:null,feedback:"",created_at:new Date().toISOString()}}function i0(r){return!r||r.messages.length===0?null:Lp(Rp(r.messages.map(zp)),r.current_leaf_id)}function l0(r,a){if(r.regenerateOf!=null){const d=a?.messages.find(p=>p.id===r.regenerateOf);return{assistant:rs("assistant",r.mode,d?.parent_id??null)}}const o=r.parentId===void 0?i0(a):r.parentId||null,l={...rs("user",r.mode,o),content:r.query,...r.file?{attachments:[{name:r.file.name,url:""}]}:{}};return{user:l,assistant:rs("assistant",r.mode,l.id)}}function s0(r,a,o){const l=new Map([[a.assistantId,o.assistantMessageId]]);a.userId!=null&&l.set(a.userId,o.userMessageId);const d=p=>p!=null?l.get(p)??p:p;return{...r,id:o.threadId,current_leaf_id:d(r.current_leaf_id),messages:r.messages.map(p=>l.has(p.id)||p.parent_id!=null&&l.has(p.parent_id)?{...p,id:d(p.id)??p.id,parent_id:d(p.parent_id)}:p)}}function c0(r,a){return{...r,content:a.text,steps:a.steps.map(o=>({...o})),...a.attachments.length>0?{attachments:a.attachments}:{},...a.blocks.length>0?{blocks:a.blocks.map(o=>({...o}))}:{}}}function d0(r,a,o,l){const d={...r,status:a,duration_ms:Date.now()-l};return a==="error"&&!r.content?{...d,content:o}:d}const u0=["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"],p0=r=>u0.includes(r);function f0(r){if(r instanceof et)return r.code;if(r instanceof Mp)return r.message}function Lo(r){const a=f0(r);return a!=null&&p0(a)?{kind:"code",code:a}:r instanceof et?{kind:"status",status:r.status}:{kind:"generic"}}async function Po(r,a,o={}){const l=o.method??"GET",d=new Headers(o.headers),p=await r.headers?.({method:l})??{};for(const[f,g]of Object.entries(p))d.set(f,g);return(r.fetch??fetch)(`${r.baseUrl}${a}`,{...o,method:l,headers:d,...r.credentials?{credentials:r.credentials}:{}})}const Pp="text/event-stream";function h0({query:r,mode:a,file:o,parentId:l,regenerateOf:d,clarification:p},f){const g=new FormData;return g.set("mode",a),d==null&&g.set("query",r),f!=null&&g.set("thread_id",f),l!==void 0&&g.set("parent_id",l),d!=null&&g.set("regenerate_of",d),o&&g.set("file",o),p&&g.set("clarification",JSON.stringify(p)),g}function g0(r,a,o){return Po(r,es,{method:"POST",body:a,headers:{Accept:Pp},signal:o})}function m0(r,a,o){return Po(r,`${es}/${a}`,{headers:{Accept:Pp},signal:o})}async function b0(r,a){const o=await Po(r,`${es}/${a}/stop`,{method:"POST"});if(!o.ok)throw await ts(o)}async function x0(r){if(!r.ok)throw await ts(r);if(r.body==null)throw new Error("empty_stream");return r.body}const v0=45,y0=7,w0=.1,k0=()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;function S0(r,a){const o=r.charCodeAt(a-1);return o>=55296&&o<=56319?a+1:a}function j0(r,a){const[o,l]=x.useState(()=>r.length),d=x.useRef(o),p=x.useRef(r),f=x.useRef(null),g=x.useRef(null),[m]=x.useState(k0),b=a&&!m;return x.useLayoutEffect(()=>{p.current=r},[r]),x.useEffect(()=>{if(!b){d.current=p.current.length;return}if(d.current>r.length&&(d.current=r.length,l(r.length)),f.current!=null||d.current>=r.length)return;const v=S=>{const w=p.current,C=g.current;g.current=S;const _=C==null?1/60:Math.min((S-C)/1e3,w0),E=w.length-d.current;if(E<=0){f.current=null,g.current=null;return}const R=Math.max(1,Math.round(Math.max(v0*_,E*Math.min(1,y0*_)))),$=Math.min(w.length,S0(w,d.current+R));d.current=$,l($),f.current=requestAnimationFrame(v)};f.current=requestAnimationFrame(v)},[r,b]),x.useEffect(()=>()=>{f.current!=null&&cancelAnimationFrame(f.current),f.current=null},[]),x.useEffect(()=>{b||f.current==null||(cancelAnimationFrame(f.current),f.current=null,g.current=null)},[b]),b?o>=r.length?r:r.slice(0,o):r}const ns="/api/v1/widget",as="aid_visitor",Tp=4e3,os=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,Ap=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}:[\w-]{10,100}$/i,N0=()=>{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 a=Array.from(r,o=>o.toString(16).padStart(2,"0")).join("");return`${a.slice(0,8)}-${a.slice(8,12)}-${a.slice(12,16)}-${a.slice(16,20)}-${a.slice(20)}`},C0=(r,a)=>{if(r&&os.test(r))return r;try{const l=a?.getItem(as);if(l&&(os.test(l)||Ap.test(l)))return l}catch{}const o=N0();try{a?.setItem(as,o)}catch{}return o},E0=/\/api\/v1\/attachments\/([0-9a-f-]{36})\/?(?:[?#].*)?$/i,To=(r,a)=>{const o=E0.exec(r);if(!o?.[1]){const l=/\/api\/v1\/widget\/attachments\/([0-9a-f-]{36})\/?$/i.exec(r);return l?.[1]?`${is(a)}/attachments/${l[1]}`:null}return`${is(a)}/attachments/${o[1]}`},is=r=>`${r.replace(/\/+$/,"")}${ns}`,_0=r=>{if(r==="")return r;let a;try{a=new URL(r)}catch{throw new TypeError(`AiDanaChat: api-url must be an absolute http(s) URL, got "${r}"`)}if(a.protocol!=="https:"&&a.protocol!=="http:")throw new TypeError(`AiDanaChat: api-url must be an http(s) URL, got "${r}"`);return r},ls=r=>r&&(/^https:\/\//i.test(r)||/^\/(?!\/)/.test(r)||/^data:image\/(?:png|jpeg|webp|gif);/i.test(r))?r:void 0,Ao=r=>typeof r=="object"&&r!==null&&!Array.isArray(r),z0=r=>{if(!Ao(r)||!Ao(r.site)||!Array.isArray(r.modes)||!r.modes.every(a=>Ao(a)&&typeof a.slug=="string")||!Ao(r.visitor))throw new Error("bad config");return r},M0=r=>{const a={};if(!r||typeof r!="object")return a;const o=C=>{const _=r[C];return typeof _=="string"&&_?_:void 0},l=o("primary"),d=o("font"),p=ls(o("logoUrl")),f=o("title"),g=o("scheme");l&&(a.primary=l),d&&(a.font=d),p&&(a.logoUrl=p),f&&(a.title=f),(g==="light"||g==="dark"||g==="auto")&&(a.scheme=g);const m=o("launcher");(m==="icon"||m==="label")&&(a.launcher=m);const b=o("launcherLabel");b&&(a.launcherLabel=b);const v=o("launcherShape");(v==="circle"||v==="rounded"||v==="square")&&(a.launcherShape=v),(typeof r.radius=="number"||typeof r.radius=="string"&&r.radius)&&(a.radius=r.radius);for(const C of["background","foreground","bubble","border"]){const _=o(C);_&&(a[C]=_)}const S=C=>{const _=r[C],E=typeof _=="number"?_:typeof _=="string"&&_?Number(_):NaN;return Number.isFinite(E)?E:void 0};for(const C of["windowWidth","windowHeight","offsetX","offsetY"]){const _=S(C);_!==void 0&&(a[C]=_)}const w=o("position");return(w==="bottom-right"||w==="bottom-left")&&(a.position=w),a},Fp=r=>{throw r instanceof et||r instanceof Error&&r.name==="AbortError"?r:new et(0,"network",null)},R0=({apiUrl:r,siteKey:a,visitorId:o,rememberVisitor:l,fetch:d})=>{let p=o;const f=_0(r),g=encodeURIComponent,m={baseUrl:is(f),headers:()=>({"X-Visitor-Id":p,...a?{"X-Widget-Key":a}:{}}),credentials:"omit",...d?{fetch:d}:{}},b=async(w,C={})=>{const _=await Po(m,w,C).catch(Fp);if(!_.ok)throw await ts(_);return _},v=async(w,C)=>(await b(w,C)).json(),S=(w,C)=>({method:w,headers:{"Content-Type":"application/json"},body:JSON.stringify(C)});return{transport:m,apiUrl:f,config:async()=>z0(await v("/config")),health:()=>v("/modes/health"),threads:()=>v("/threads?limit=50"),thread:w=>v(`/threads/${g(w)}`),setLeaf:async(w,C)=>{await b(`/threads/${g(w)}`,S("PATCH",{current_leaf_id:C}))},deleteThread:async w=>{await b(`/threads/${g(w)}`,{method:"DELETE"})},rate:async(w,C)=>{await b(`/messages/${g(w)}/rating`,S("POST",{rating:C}))},feedback:async(w,C,_)=>{await b(`/messages/${g(w)}/feedback`,S("POST",_?{feedback:C,reason:_}:{feedback:C}))},stop:w=>b0(m,g(w)).catch(Fp),createReport:(w,C)=>v(`/messages/${g(w)}/report`,S("POST",{language:C})),reportStatus:w=>os.test(w)?v(`/report-jobs/${w}`):Promise.reject(new et(0,"bad_job_id",null)),request:w=>b(w),attachment:async w=>{const C=To(w,f);if(!C)throw new et(0,"not_attachment",null);const _=C.slice(m.baseUrl.length),E=await(await b(_)).blob();return URL.createObjectURL(E)},adoptVisitor:w=>!w||!Ap.test(w)||w===p?!1:(p=w,l?.(w),!0)}},ss=["kk","ru","en"],I0=r=>ss.includes(r),Dp=r=>{const a=[r,typeof document<"u"?document.documentElement.lang:void 0,typeof navigator<"u"?navigator.language:void 0];for(const o of a){const l=o?.toLowerCase().split("-")[0];if(I0(l))return l}return"ru"},Op={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:"\u0421\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0447\u0442\u043E \u0443\u0433\u043E\u0434\u043D\u043E",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.failed":"\u043D\u0435 \u0441\u043C\u043E\u0433\u043B\u0430","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.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 5",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:"\u0427\u0442\u043E \u0431\u044B\u043B\u043E \u043D\u0435 \u0442\u0430\u043A \u0441 \u043E\u0442\u0432\u0435\u0442\u043E\u043C?",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.reasonsLabel":"\u0427\u0442\u043E \u043D\u0435 \u0442\u0430\u043A?","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"},L0={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:"\u041A\u0435\u0437 \u043A\u0435\u043B\u0433\u0435\u043D \u043D\u04D9\u0440\u0441\u0435\u043D\u0456 \u0441\u04B1\u0440\u0430\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.failed":"\u0430\u043B\u043C\u0430\u0434\u044B","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.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:"5-\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\u044B\u04A3 \u049B\u0430\u0439 \u0436\u0435\u0440\u0456 \u0434\u04B1\u0440\u044B\u0441 \u0435\u043C\u0435\u0441?",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.reasonsLabel":"\u041D\u0435 \u049B\u0430\u0442\u0435 \u0431\u043E\u043B\u0434\u044B?","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"},P0={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 anything",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.failed":"couldn\u2019t","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.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 5",ratingError:"Could not save the rating",feedbackOpen:"Leave feedback",feedbackEdit:"Edit feedback",feedbackLabel:"Feedback on the answer",feedbackPlaceholder:"What was wrong with 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.reasonsLabel":"What went wrong?","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"},T0={kk:L0,ru:Op,en:P0},zt=(r,a,o)=>{const l=T0[r][a];return o?l.replace(/\{(\w+)\}/g,(d,p)=>String(o[p]??d)):l},A0=r=>r in Op,na=(r,a)=>{if(!r)return"";for(const o of[r[a],r.ru,...Object.values(r)])if(o)return o;return""},$p="aid_prefs",F0=["light","dark","auto"],qp=r=>{try{const a=JSON.parse(r?.getItem($p)??"{}"),o={};return ss.includes(a.lang)&&(o.lang=a.lang),F0.includes(a.scheme)&&(o.scheme=a.scheme),o}catch{return{}}},D0=(r,a)=>{try{r?.setItem($p,JSON.stringify(a))}catch{}},Up=({scheme:r})=>r?{scheme:r}:{},O0=(r,a,o)=>a?!o||r.expanded?r:{expanded:!0,byDashboard:!0}:r.byDashboard?{expanded:!1,byDashboard:!1}:r,cs=x.createContext(null),ds=()=>{const r=x.useContext(cs);if(!r)throw new Error("usePrefs outside PrefsContext");return r},$0=r=>{let a=r;const o=new Set;return{get:()=>a,set:l=>{a={...a,...l};for(const d of o)d()},subscribe:l=>(o.add(l),()=>o.delete(l))}};class us extends x.Component{constructor(){super(...arguments),ln(this,"state",{failed:!1})}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}}const q0='*,: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-\\[30px\\]{height:30px}.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-8{width:32px}.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-50{border-color:color-mix(in srgb,var(--aid-c-primary) 50%,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);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);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 .12s ease-out,transform .12s ease-out,box-shadow .12s ease-out}.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)}}.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)}@media(prefers-reduced-motion:reduce){.aid-launcher,.aid-launcher:hover,.aid-launcher:active,.aid-launcher[data-dragging=true]{transition:none;transform:none}}.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}}',Vp=3e3,ps=6*6e4,Bp={phase:"idle"},Wp={phase:"pending"},aa={phase:"failed"},Hp={phase:"expired"},U0=new Set(["pdf","docx","pptx","xlsx","csv"]),fs=r=>{switch(r.status){case"queued":case"running":return Wp;case"done":{const a=r.files.filter(o=>U0.has(o.format));return a.length>0?{phase:"done",files:a}:aa}case"expired":return Hp;default:return aa}},ut=new Map,Fo=new Set,V0=new Set(["done","failed","expired"]),Do=new Set;let _r=0;const ur=(r,a)=>{const o=ut.get(r)??{view:Bp};ut.set(r,{...o,...a});for(const l of Do)l()},B0=r=>{const a=ut.get(r);if(a?.jobId===void 0||a.deadline===void 0||a.api===void 0)return;if(clearTimeout(a.timer),Date.now()+Vp>a.deadline){ur(r,{view:aa,timer:void 0});return}const{jobId:o,api:l}=a,d=_r,p=setTimeout(()=>{l.reportStatus(o).then(f=>{d===_r&&ut.get(r)?.jobId===o&&hs(r,f)},()=>{d===_r&&ut.get(r)?.jobId===o&&ur(r,{view:aa,timer:void 0})})},Vp);ur(r,{timer:p})},hs=(r,a)=>{const o=fs(a),l=ut.get(r)?.jobId;l!==void 0&&l!==a.job_id&&Fo.add(l);const d=ut.get(r)?.deadline??Date.now()+ps;ur(r,{view:o,jobId:a.job_id,deadline:d,timer:void 0}),o.phase==="pending"&&B0(r)},oa={subscribe:r=>(Do.add(r),()=>{Do.delete(r)}),view:r=>ut.get(r)?.view,adopt:(r,a,o)=>{if(Fo.has(a.job_id))return;const l=ut.get(r);if(l!==void 0&&(l.jobId!==void 0||l.view.phase!=="idle")){if(l.view.phase==="pending")return;const d=a.job_id===l.jobId;if(d&&(!V0.has(a.status)||fs(a).phase===l.view.phase)||d&&l.view.phase==="expired")return}clearTimeout(l?.timer),ur(r,{deadline:Date.now()+ps,timer:void 0,api:o}),hs(r,a)},start:(r,a,o)=>{const l=ut.get(r);if(l?.view.phase==="pending")return;clearTimeout(l?.timer),l?.jobId!==void 0&&Fo.add(l.jobId),ur(r,{view:Wp,jobId:void 0,deadline:Date.now()+ps,timer:void 0,api:a});const d=_r;a.createReport(r,o).then(p=>{d===_r&&hs(r,p)},()=>{d===_r&&ur(r,{view:aa})})},expire:r=>{ut.get(r)?.view.phase==="done"&&ur(r,{view:Hp})}},W0=()=>{_r+=1;for(const r of ut.values())clearTimeout(r.timer);ut.clear(),Fo.clear();for(const r of Do)r()},H0={calm:"idle",listen:"idle",think:"thinking",typing:"typing",eureka:"success",sorry:"fail"},Q0={think:"bubble",eureka:"spark",sorry:"drop"},K0=(r,a)=>r==="error"?"sorry":r==="streaming"?a?"typing":"think":"calm",Qp=r=>`${r.replace(/\/+$/,"")}/static/avatars/dana`,X0={animated:!0,assetsBase:Qp("")},gs=x.createContext(X0),G0=()=>x.useContext(gs),Oo=({mood:r="calm",size:a=40,animated:o=!0,label:l,className:d,bare:p})=>{const{animated:f,assetsBase:g}=G0(),m=Q0[r],b=v=>`${g}/${v}.webp`;return s.jsxs("span",{className:`dana-av ${p?"":"rounded-[22.5%] bg-[#F3F5FA] ring-1 ring-border"} ${d??""}`.trim(),style:{width:a,height:a},"data-mood":r,"data-animated":o&&f?"":void 0,role:l?"img":void 0,"aria-label":l,"aria-hidden":l?void 0:!0,children:[s.jsx("img",{className:"dana-av-body",src:b(H0[r]),alt:"",decoding:"async",draggable:!1}),m&&s.jsx("img",{className:`dana-av-${m}`,src:b(m),alt:"",decoding:"async",draggable:!1}),r==="typing"&&s.jsxs("svg",{className:"dana-av-dots",viewBox:"0 0 240 240","aria-hidden":"true",focusable:"false",children:[s.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(v=>s.jsx("circle",{className:"dana-av-dot",cx:v,cy:"41.3",r:"2.6",fill:"#1F3F75"},v))]}),r==="think"&&s.jsx("svg",{className:"dana-av-dots",viewBox:"0 0 240 240","aria-hidden":"true",focusable:"false",children:[26.1,34.4,43.4].map(v=>s.jsx("circle",{className:"dana-av-dot",cx:v,cy:"31.7",r:"1.8",fill:"#1C2B4A"},v))})]})},Z0=2500,Y0=(r,a)=>{const[o,l]=x.useState(!1),[d,p]=x.useState(r);return d!==r&&(p(r),d&&!r&&a==="done"&&l(!0)),x.useEffect(()=>{if(!o)return;const f=window.setTimeout(()=>{l(!1)},Z0);return()=>{window.clearTimeout(f)}},[o]),o},J0=12e3,ex=5e3,Kp="aid_mode",Xp=x.createContext(null),Y=()=>{const r=x.useContext(Xp);if(!r)throw new Error("useChat outside ChatProvider");return r},ms=(r,a)=>a.kind==="code"?zt(r,`errors.${a.code}`):a.kind==="status"?a.status===0?zt(r,"errors.network"):zt(r,"errors.code",{code:a.status}):zt(r,"errors.generic"),cn="temp-thread",tx=(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}),bs=(r,a,o)=>r&&{...r,messages:r.messages.map(l=>l.id===a?o(l):l)},rx=(r,a,o)=>{const l=new Map;for(const d of r?.steps??[])typeof d.id=="string"&&typeof d.startedAt=="number"&&l.set(d.id,d.startedAt);return{...a,steps:a.steps.map(d=>({...d,startedAt:l.get(d.id)??o}))}},nx=(r,a)=>{const o=new Date(a).toISOString();return{id:cn,title:r.query.slice(0,80),mode:r.mode,pinned:!1,created_at:o,updated_at:o,current_leaf_id:null,messages:[]}},ax=r=>({id:r.id,title:r.title,mode:r.mode,pinned:r.pinned,created_at:r.created_at,updated_at:r.updated_at}),ox=["widget_unauthorized","origin_not_allowed","origin_blocked"],ix=r=>r.configError?r.limit.overloaded?"overloaded":r.configErrorCode!==null&&ox.includes(r.configErrorCode)?"siteBlocked":"unavailable":r.config?null:"loading",lx=(r,a)=>{switch(a.type){case"config":{const{config:o}=a,l=o.modes.map(f=>f.slug),d=r.mode&&l.includes(r.mode)?r.mode:l[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:a.code??null,...a.overloaded?{limit:{...r.limit,blocked:!0,overloaded:!0}}:{}};case"health":return{...r,health:a.health};case"mode":return{...r,mode:a.mode};case"threads":return{...r,threads:a.threads,threadsError:!1,threadsLoaded:!0};case"threadsError":return{...r,threadsError:!0,threadsLoaded:!0};case"threadLoading":return{...r,loadingThread:a.id};case"thread":{if(r.turn&&r.thread?.id===a.thread.id||r.loadingThread!==a.thread.id&&r.thread?.id!==a.thread.id)return r;const o=r.config?.modes.map(l=>l.slug)??[];return{...r,thread:a.thread,loadingThread:null,mode:o.includes(a.thread.mode)?a.thread.mode:r.mode}}case"threadFailed":return r.loadingThread===a.id?{...r,loadingThread:null,notice:{kind:"error",reason:a.reason}}:r;case"newChat":return{...r,thread:null,loadingThread:null,turn:null,notice:null};case"threadDeleted":{const o=r.thread?.id===a.id;return{...r,threads:r.threads.filter(l=>l.id!==a.id),...o?{thread:null,turn:null}:{}}}case"turnStart":{const{request:o,token:l,at:d}=a,p=r.thread??nx(o,d),{user:f,assistant:g}=l0(o,p);return{...r,notice:null,thread:{...p,current_leaf_id:g.id,messages:[...p.messages,...f?[f]:[],g]},turn:{token:l,assistantId:g.id,...f?{userId:f.id}:{},startedAt:d,adopted:!1,previousLeaf:p.current_leaf_id,optimisticIds:[g.id,...f?[f.id]:[]]}}}case"resumeStart":return{...r,turn:{token:a.token,assistantId:a.messageId,startedAt:a.at,adopted:!0,previousLeaf:r.thread?.current_leaf_id??null,optimisticIds:[]}};case"adopt":{const{turn:o,thread:l}=r;if(o?.token!==a.token||o.adopted||!l)return r;const{metadata:d}=a,p=l.id===cn,f=s0(l,{...o.userId?{userId:o.userId}:{},assistantId:o.assistantId},d),g=r.limit.remaining===null?null:Math.max(0,r.limit.remaining-1);return{...r,thread:f,threads:p?[ax(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:g}}}case"snapshot":{const{turn:o}=r;if(o?.token!==a.token)return r;const l=r.thread?.messages.find(p=>p.id===o.assistantId),d=rx(l,a.snapshot,a.at);return{...r,thread:bs(r.thread,o.assistantId,p=>c0(p,d))}}case"turnEnd":{const{turn:o}=r;if(o?.token!==a.token)return r;const l=a.status==="detached"?r.thread:bs(r.thread,o.assistantId,d=>d0(d,a.status,a.errorText,o.startedAt));return{...r,thread:l,turn:null,limit:{...r.limit,blocked:r.limit.blocked||r.limit.remaining===0}}}case"turnStopping":return r.turn?.token===a.token?{...r,turn:{...r.turn,stopping:!0}}:r;case"turnRejected":{const{turn:o,thread:l}=r;if(o?.token!==a.token)return r;const d=new Set(o.optimisticIds),p=l?.messages.filter(S=>!d.has(S.id))??[],f=l&&(l.id!==cn||p.length>0)?{...l,current_leaf_id:o.previousLeaf,messages:p}:null,{error:g}=a,m=g.status===429&&g.code==="daily_limit",b=g.status===503&&g.code==="anon_budget";let v=r.limit;return m?v={...v,remaining:0,blocked:!0,...g.resetAt?{resetAt:g.resetAt}:{}}:b&&(v={...v,blocked:!0,overloaded:!0}),{...r,thread:f,turn:null,notice:m||b?null:{kind:"error",reason:g.reason},limit:v}}case"leaf":return r.thread?{...r,thread:{...r.thread,current_leaf_id:a.leafId}}:r;case"rating":return{...r,thread:bs(r.thread,a.messageId,o=>({...o,rating:a.rating,...a.feedback!==void 0?{feedback:a.feedback}:{},...a.feedbackReason!==void 0?{feedback_reason:a.feedbackReason}:{}}))};case"notice":return{...r,notice:a.notice}}},xs=r=>{const a=r?r.messages.map(zp):[],o=Rp(a),l=Lp(o,r?.current_leaf_id??null);return{index:o,path:l?r0(o,l):[]}},$o={text:2e5,steps:500,blocks:100,attachments:50},Gp=r=>r.text.length>$o.text||r.steps.length>$o.steps||r.blocks.length>$o.blocks||r.attachments.length>$o.attachments,sx=r=>r.code==="ip_limit"?{kind:"code",code:"ip_limit"}:Lo(r),Zp=()=>{try{return window.localStorage}catch{return null}},cx=()=>{try{return Zp()?.getItem(Kp)??null}catch{return null}},dx=r=>r instanceof TypeError,ux=({api:r,lang:a,open:o,onAdminTheme:l,children:d})=>{const[p,f]=x.useReducer(lx,null,()=>tx(cx())),g=x.useRef(p),m=x.useRef(null),b=x.useRef(0),v=x.useRef(a),S=x.useRef(l);x.useLayoutEffect(()=>{g.current=p,v.current=a,S.current=l});const w=x.useCallback(()=>{r.threads().then(P=>{f({type:"threads",threads:P})},()=>{f({type:"threadsError"})})},[r]),C=x.useCallback(()=>{r.config().then(P=>{f({type:"config",config:P}),S.current(M0(P.site.theme)),r.adoptVisitor(P.visitor.token)&&w()},P=>{const T=P instanceof et&&P.status===503,k=P instanceof et?P.code:null;f({type:"configError",...T?{overloaded:T}:{},...k?{code:k}:{}})})},[r,w]),_=x.useCallback(P=>{r.thread(P).then(T=>{f({type:"thread",thread:T})},()=>{})},[r]);x.useEffect(()=>{C(),w()},[C,w]);const E=p.config!==null;x.useEffect(()=>{if(!o||!E)return;const P=()=>{typeof document<"u"&&document.visibilityState==="hidden"||r.health().then(k=>{f({type:"health",health:k})},()=>{})};P();const T=window.setInterval(P,J0);return window.addEventListener("focus",P),()=>{window.clearInterval(T),window.removeEventListener("focus",P)}},[r,o,E]);const R=x.useCallback(()=>{m.current?.controller.abort(),m.current=null},[]);x.useEffect(()=>R,[R]);const $=P=>{const T={token:++b.current,controller:new AbortController,stopRequested:!1,...P?{assistantId:P}:{}};return m.current=T,T},X=(P,T)=>P.stopRequested?"stopped":P.tooBig?"error":P.controller.signal.aborted?"detached":T?"error":"done",ae=P=>{m.current===P&&(m.current=null)},G=(P,T,k)=>{ae(P),w(),k&&T&&T!==cn&&_(T)},D=x.useCallback(async P=>{const T=g.current;if(T.turn||m.current||T.limit.blocked)return"busy";const k=T.thread&&T.thread.id!==cn?T.thread.id:void 0,L=$(),{token:ie}=L;f({type:"turnStart",token:ie,request:P,at:Date.now()});let V=k;const le=ve=>{if(Gp(ve)){L.tooBig=!0,L.controller.abort();return}ve.metadata&&L.assistantId===void 0&&(L.assistantId=ve.metadata.assistantMessageId,V=ve.metadata.threadId,f({type:"adopt",token:ie,metadata:ve.metadata})),f({type:"snapshot",token:ie,snapshot:ve,at:Date.now()})};let de,je=!1;try{const{streamChatAnswer:ve}=await import("./stream-entry-Cqex_Oyn.js");await ve({transport:r.transport,request:P,...k?{threadId:k}:{},signal:L.controller.signal,onSnapshot:le})}catch(ve){je=!0,de=ve}if(L.assistantId===void 0&&(de instanceof et||dx(de))){const ve=de instanceof et?de:new et(0,"network",null);return f({type:"turnRejected",token:ie,error:{status:ve.status,code:ve.code,resetAt:ve.resetAt,reason:sx(ve)}}),ae(L),ve.status===429&&C(),"rejected"}const ke=X(L,je);return f({type:"turnEnd",token:ie,status:ke,errorText:ke==="error"?ms(v.current,Lo(de)):""}),G(L,V,ke==="done"||ke==="stopped"),"sent"},[r,C,w,_]),te=x.useCallback(async(P,T)=>{if(m.current)return;const k=$(T),{token:L}=k;f({type:"resumeStart",token:L,messageId:T,at:Date.now()});let ie,V=!1;try{const{resumeChatAnswer:de}=await import("./stream-entry-Cqex_Oyn.js");await de(r.transport,T,k.controller.signal,je=>{if(Gp(je)){k.tooBig=!0,k.controller.abort();return}f({type:"snapshot",token:L,snapshot:je,at:Date.now()})})}catch(de){V=!0,ie=de}if(ie instanceof et){f({type:"turnEnd",token:L,status:"detached",errorText:""}),G(k,P.id,!0);return}const le=X(k,V);f({type:"turnEnd",token:L,status:le,errorText:le==="error"?ms(v.current,Lo(ie)):""}),G(k,P.id,le==="done"||le==="stopped")},[r,w,_]),Z=x.useCallback(()=>{const P=m.current;if(!P)return;if(P.stopRequested=!0,f({type:"turnStopping",token:P.token}),P.assistantId===void 0){P.controller.abort();return}const T=window.setTimeout(()=>{P.controller.abort()},ex);P.controller.signal.addEventListener("abort",()=>{window.clearTimeout(T)},{once:!0}),r.stop(P.assistantId).catch(()=>{P.controller.abort()})},[r]),re=x.useCallback(P=>{g.current.thread?.id!==P&&(R(),f({type:"newChat"}),f({type:"threadLoading",id:P}),r.thread(P).then(T=>{f({type:"thread",thread:T});const{path:k}=xs(T),L=k[k.length-1];L?.role==="assistant"&&L.status==="streaming"&&te(T,L.id)},T=>{f({type:"threadFailed",id:P,reason:Lo(T)})}))},[r,R,te]),be=x.useCallback(()=>{R(),f({type:"newChat"})},[R]),Q=x.useCallback(async P=>{try{await r.deleteThread(P),g.current.thread?.id===P&&R(),f({type:"threadDeleted",id:P})}catch{f({type:"notice",notice:{kind:"text",key:"deleteError"}})}},[r,R]),fe=x.useMemo(()=>xs(p.thread),[p.thread]),W=x.useCallback(P=>{const{thread:T}=g.current;if(!T||g.current.turn)return;const k=Ip(xs(T).index,P),L=T.current_leaf_id;!k||k===L||(f({type:"leaf",leafId:k}),r.setLeaf(T.id,k).catch(()=>{f({type:"leaf",leafId:L}),f({type:"notice",notice:{kind:"text",key:"branch.error"}})}))},[r]),H=x.useCallback((P,T)=>{const k=g.current.thread?.messages.find(V=>V.id===P);if(!k)return;const L=k.rating,ie=T===L?null:T;f({type:"rating",messageId:P,rating:ie}),r.rate(P,ie).catch(()=>{f({type:"rating",messageId:P,rating:L}),f({type:"notice",notice:{kind:"text",key:"ratingError"}})})},[r]),me=x.useCallback(async(P,T,k)=>{const L=g.current.thread?.messages.find(ie=>ie.id===P);try{return await r.feedback(P,T,k),f({type:"rating",messageId:P,rating:L?.rating??null,feedback:T,feedbackReason:k??""}),!0}catch{return!1}},[r]),Ce=x.useCallback(P=>{f({type:"mode",mode:P});try{Zp()?.setItem(Kp,P)}catch{}},[]),xe=x.useCallback(()=>{f({type:"notice",notice:null})},[]),ye=x.useCallback((P,T)=>zt(a,P,T),[a]),q=x.useMemo(()=>({state:p,lang:a,api:r,t:ye,path:fe.path,index:fe.index,send:D,stop:Z,openThread:re,newChat:be,deleteThread:Q,refreshThreads:w,switchBranch:W,rate:H,saveFeedback:me,selectMode:Ce,reload:()=>{C(),w()},dismissNotice:xe}),[p,a,r,ye,fe,D,Z,re,be,Q,w,W,H,me,Ce,C,xe]);return s.jsx(Xp.Provider,{value:q,children:d})},Yp=r=>x.useSyncExternalStore(a=>{if(typeof matchMedia>"u")return()=>{};const o=matchMedia(r);return o.addEventListener("change",a),()=>{o.removeEventListener("change",a)}},()=>typeof matchMedia<"u"&&matchMedia(r).matches,()=>!1),px=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),fx=(r,a)=>{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===a)break}return!a.closest("[inert]")},Jp=r=>Array.from(r.querySelectorAll(px)).filter(a=>fx(a,r)),zr=(r,a)=>{x.useLayoutEffect(()=>{r.current?.toggleAttribute("inert",a)},[r,a])},ef=r=>{const a=r.getRootNode();return a instanceof ShadowRoot||a instanceof Document?a.activeElement:null},qo=(r,a,o)=>{const l=x.useRef(o);x.useEffect(()=>{l.current=o}),x.useEffect(()=>{const d=r.current;if(!a||!d)return;const p=ef(d);(d.querySelector("[data-autofocus]")??Jp(d)[0])?.focus({preventScroll:!0});const f=g=>{if(g.key!=="Tab")return;const m=Jp(d),b=m[0],v=m[m.length-1];if(!b||!v){g.preventDefault();return}const S=ef(d);g.shiftKey&&(S===b||!d.contains(S))?(g.preventDefault(),v.focus()):!g.shiftKey&&(S===v||!d.contains(S))&&(g.preventDefault(),b.focus())};return d.addEventListener("keydown",f),()=>{d.removeEventListener("keydown",f),((p instanceof HTMLElement&&p.tagName!=="BODY"&&p.isConnected&&!d.contains(p)?p:null)??l.current?.())?.focus({preventScroll:!0})}},[r,a])},hx=8,gx=9,Bt=(r,a)=>r.find(o=>o.kind===a),tf=r=>r.filter(a=>a.kind==="report").at(-1),mx=r=>r.filter(a=>a.kind==="export").flatMap(a=>a.files),bx=(r,a)=>{const o=r.findIndex(p=>p.id===a),l=o>0?r[o-1]:void 0,d=o>=0?r[o+1]:void 0;return{question:l?.role==="user"?l.content:"",reply:d?.role==="user"?d.content:""}},xx=500,vx=(r,a,o)=>{const l=a.trim();if(l.length<1||l.length>xx)return;const d=r[r.length-1];if(d?.role!=="assistant")return;const p=Bt(d.blocks,"clarification");if(p?.allow_free_text&&vp(p,{isLastInBranch:!0,now:o})==="open")return{clarification_id:p.id,slot:p.slot,value:null,free_text:l}},yx=r=>{if(!(r instanceof HTMLElement))return!1;if(r.isContentEditable)return!0;const a=r.tagName;return a==="TEXTAREA"||a==="SELECT"||a==="INPUT"&&!["button","checkbox","radio"].includes(r.type)},wx=r=>typeof r=="number"&&Number.isFinite(r)?r:null,vs=r=>typeof r=="string"?r:typeof r=="number"&&Number.isFinite(r)?String(r):"",ia={messageId:null,sectionId:null,fullscreen:!1,view:"chat"},ys=(r,a=null)=>({messageId:r,sectionId:a,fullscreen:!1,view:"dashboard"}),rf=x.createContext(null),Mr=()=>{},kx={state:ia,open:Mr,toggle:Mr,autoOpen:Mr,close:Mr,setSection:Mr,setFullscreen:Mr,setView:Mr},pr=()=>x.useContext(rf)??kx,Sx=1200;function jx(r){const{state:a,setFullscreen:o,close:l}=pr(),d=x.useRef({fullscreen:a.fullscreen,setFullscreen:o,close:l});x.useEffect(()=>{d.current={fullscreen:a.fullscreen,setFullscreen:o,close:l}}),x.useEffect(()=>{if(!r)return;const p=f=>{if(f.key!=="Escape"||f.defaultPrevented)return;f.preventDefault();const g=d.current;g.fullscreen?g.setFullscreen(!1):g.close()};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p)}},[r])}const Nx=(r,a,o)=>r&&!a&&!o,Cx=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ex=r=>r.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,o,l)=>l?l.toUpperCase():o.toLowerCase()),nf=r=>{const a=Ex(r);return a.charAt(0).toUpperCase()+a.slice(1)},af=(...r)=>r.filter((a,o,l)=>!!a&&a.trim()!==""&&l.indexOf(a)===o).join(" ").trim(),_x=r=>{for(const a in r)if(a.startsWith("aria-")||a==="role"||a==="title")return!0};var zx={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 Mx=x.forwardRef(({color:r="currentColor",size:a=24,strokeWidth:o=2,absoluteStrokeWidth:l,className:d="",children:p,iconNode:f,...g},m)=>x.createElement("svg",{ref:m,...zx,width:a,height:a,stroke:r,strokeWidth:l?Number(o)*24/Number(a):o,className:af("lucide",d),...!p&&!_x(g)&&{"aria-hidden":"true"},...g},[...f.map(([b,v])=>x.createElement(b,v)),...Array.isArray(p)?p:[p]])),ce=(r,a)=>{const o=x.forwardRef(({className:l,...d},p)=>x.createElement(Mx,{ref:p,iconNode:a,className:af(`lucide-${Cx(nf(r))}`,`lucide-${r}`,l),...d}));return o.displayName=nf(r),o},Rx=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],of=ce("arrow-down",Rx),Ix=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Lx=ce("arrow-right",Ix),Px=[["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"}]],Tx=ce("arrow-up-down",Px),Ax=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],lf=ce("arrow-up",Ax),Fx=[["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"}]],Uo=ce("book-open",Fx),Dx=[["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"}]],Ox=ce("bot",Dx),$x=[["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"}]],qx=ce("chart-column-big",$x),Ux=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Rr=ce("check",Ux),Vx=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],dn=ce("chevron-down",Vx),Bx=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],sf=ce("chevron-left",Bx),Wx=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Vo=ce("chevron-right",Wx),Hx=[["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"}]],Ir=ce("circle-alert",Hx),Qx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]],cf=ce("circle-minus",Qx),Kx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],ws=ce("clock",Kx),Xx=[["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"}]],ks=ce("copy",Xx),Gx=[["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"}]],Zx=ce("database",Gx),Yx=[["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"}]],df=ce("download",Yx),Jx=[["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"}]],Ss=ce("external-link",Jx),ev=[["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:"M8 18v-2",key:"qcmpov"}],["path",{d:"M12 18v-4",key:"q1q25u"}],["path",{d:"M16 18v-6",key:"15y0np"}]],tv=ce("file-chart-column-increasing",ev),rv=[["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"}]],nv=ce("file-down",rv),av=[["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"}]],ov=ce("file-text",av),iv=[["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"}]],lv=ce("globe",iv),sv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],uf=ce("info",sv),cv=[["line",{x1:"3",x2:"21",y1:"22",y2:"22",key:"j8o0r"}],["line",{x1:"6",x2:"6",y1:"18",y2:"11",key:"10tf0k"}],["line",{x1:"10",x2:"10",y1:"18",y2:"11",key:"54lgf6"}],["line",{x1:"14",x2:"14",y1:"18",y2:"11",key:"380y"}],["line",{x1:"18",x2:"18",y1:"18",y2:"11",key:"1kevvc"}],["polygon",{points:"12 2 20 7 4 7",key:"jkujk7"}]],dv=ce("landmark",cv),uv=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Lr=ce("loader-circle",uv),pv=[["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"}]],pf=ce("lock",pv),fv=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],hv=ce("map",fv),gv=[["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"}]],ff=ce("maximize-2",gv),mv=[["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"}]],bv=ce("message-circle-question",mv),xv=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],vv=ce("message-circle",xv),yv=[["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"}]],hf=ce("message-square-text",yv),wv=[["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"}]],gf=ce("message-square",wv),kv=[["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"}]],mf=ce("minimize-2",kv),Sv=[["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"}]],jv=ce("panel-left-close",Sv),Nv=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],Cv=ce("panel-left",Nv),Ev=[["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"}]],_v=ce("paperclip",Ev),zv=[["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"}]],bf=ce("pen-line",zv),Mv=[["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"}]],Rv=ce("pencil",Mv),Iv=[["path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z",key:"q3az6g"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 17.5v-11",key:"1jc1ny"}]],Lv=ce("receipt",Iv),Pv=[["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"}]],xf=ce("rotate-ccw",Pv),Tv=[["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"}]],vf=ce("rotate-cw",Tv),Av=[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]],Fv=ce("scale",Av),Dv=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],la=ce("search",Dv),Ov=[["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"}]],$v=ce("settings",Ov),qv=[["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"}]],js=ce("sparkles",qv),Uv=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],yf=ce("square",Uv),Vv=[["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"}]],Bv=ce("star",Vv),Wv=[["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"}]],Hv=ce("table-2",Wv),Qv=[["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"}]],Kv=ce("trash-2",Qv),Xv=[["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"}]],Bo=ce("triangle-alert",Xv),Gv=[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]],Zv=ce("trending-up",Gv),Yv=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],Jv=ce("users",Yv),e1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],sa=ce("x",e1);function wf(r){var a,o,l="";if(typeof r=="string"||typeof r=="number")l+=r;else if(typeof r=="object")if(Array.isArray(r))for(a=0;a<r.length;a++)r[a]&&(o=wf(r[a]))&&(l&&(l+=" "),l+=o);else for(a in r)r[a]&&(l&&(l+=" "),l+=a);return l}function t1(){for(var r,a,o=0,l="";o<arguments.length;)(r=arguments[o++])&&(a=wf(r))&&(l&&(l+=" "),l+=a);return l}const Ns="-",r1=r=>{const a=a1(r),{conflictingClassGroups:o,conflictingClassGroupModifiers:l}=r;return{getClassGroupId:d=>{const p=d.split(Ns);return p[0]===""&&p.length!==1&&p.shift(),kf(p,a)||n1(d)},getConflictingClassGroupIds:(d,p)=>{const f=o[d]||[];return p&&l[d]?[...f,...l[d]]:f}}},kf=(r,a)=>{if(r.length===0)return a.classGroupId;const o=r[0],l=a.nextPart.get(o),d=l?kf(r.slice(1),l):void 0;if(d)return d;if(a.validators.length===0)return;const p=r.join(Ns);return a.validators.find(({validator:f})=>f(p))?.classGroupId},Sf=/^\[(.+)\]$/,n1=r=>{if(Sf.test(r)){const a=Sf.exec(r)[1],o=a?.substring(0,a.indexOf(":"));if(o)return"arbitrary.."+o}},a1=r=>{const{theme:a,prefix:o}=r,l={nextPart:new Map,validators:[]};return i1(Object.entries(r.classGroups),o).forEach(([d,p])=>{Cs(p,l,d,a)}),l},Cs=(r,a,o,l)=>{r.forEach(d=>{if(typeof d=="string"){const p=d===""?a:jf(a,d);p.classGroupId=o;return}if(typeof d=="function"){if(o1(d)){Cs(d(l),a,o,l);return}a.validators.push({validator:d,classGroupId:o});return}Object.entries(d).forEach(([p,f])=>{Cs(f,jf(a,p),o,l)})})},jf=(r,a)=>{let o=r;return a.split(Ns).forEach(l=>{o.nextPart.has(l)||o.nextPart.set(l,{nextPart:new Map,validators:[]}),o=o.nextPart.get(l)}),o},o1=r=>r.isThemeGetter,i1=(r,a)=>a?r.map(([o,l])=>{const d=l.map(p=>typeof p=="string"?a+p:typeof p=="object"?Object.fromEntries(Object.entries(p).map(([f,g])=>[a+f,g])):p);return[o,d]}):r,l1=r=>{if(r<1)return{get:()=>{},set:()=>{}};let a=0,o=new Map,l=new Map;const d=(p,f)=>{o.set(p,f),a++,a>r&&(a=0,l=o,o=new Map)};return{get(p){let f=o.get(p);if(f!==void 0)return f;if((f=l.get(p))!==void 0)return d(p,f),f},set(p,f){o.has(p)?o.set(p,f):d(p,f)}}},Nf="!",s1=r=>{const{separator:a,experimentalParseClassName:o}=r,l=a.length===1,d=a[0],p=a.length,f=g=>{const m=[];let b=0,v=0,S;for(let R=0;R<g.length;R++){let $=g[R];if(b===0){if($===d&&(l||g.slice(R,R+p)===a)){m.push(g.slice(v,R)),v=R+p;continue}if($==="/"){S=R;continue}}$==="["?b++:$==="]"&&b--}const w=m.length===0?g:g.substring(v),C=w.startsWith(Nf),_=C?w.substring(1):w,E=S&&S>v?S-v:void 0;return{modifiers:m,hasImportantModifier:C,baseClassName:_,maybePostfixModifierPosition:E}};return o?g=>o({className:g,parseClassName:f}):f},c1=r=>{if(r.length<=1)return r;const a=[];let o=[];return r.forEach(l=>{l[0]==="["?(a.push(...o.sort(),l),o=[]):o.push(l)}),a.push(...o.sort()),a},d1=r=>({cache:l1(r.cacheSize),parseClassName:s1(r),...r1(r)}),u1=/\s+/,p1=(r,a)=>{const{parseClassName:o,getClassGroupId:l,getConflictingClassGroupIds:d}=a,p=[],f=r.trim().split(u1);let g="";for(let m=f.length-1;m>=0;m-=1){const b=f[m],{modifiers:v,hasImportantModifier:S,baseClassName:w,maybePostfixModifierPosition:C}=o(b);let _=!!C,E=l(_?w.substring(0,C):w);if(!E){if(!_){g=b+(g.length>0?" "+g:g);continue}if(E=l(w),!E){g=b+(g.length>0?" "+g:g);continue}_=!1}const R=c1(v).join(":"),$=S?R+Nf:R,X=$+E;if(p.includes(X))continue;p.push(X);const ae=d(E,_);for(let G=0;G<ae.length;++G){const D=ae[G];p.push($+D)}g=b+(g.length>0?" "+g:g)}return g};function f1(){let r=0,a,o,l="";for(;r<arguments.length;)(a=arguments[r++])&&(o=Cf(a))&&(l&&(l+=" "),l+=o);return l}const Cf=r=>{if(typeof r=="string")return r;let a,o="";for(let l=0;l<r.length;l++)r[l]&&(a=Cf(r[l]))&&(o&&(o+=" "),o+=a);return o};function h1(r,...a){let o,l,d,p=f;function f(m){const b=a.reduce((v,S)=>S(v),r());return o=d1(b),l=o.cache.get,d=o.cache.set,p=g,g(m)}function g(m){const b=l(m);if(b)return b;const v=p1(m,o);return d(m,v),v}return function(){return p(f1.apply(null,arguments))}}const Ie=r=>{const a=o=>o[r]||[];return a.isThemeGetter=!0,a},Ef=/^\[(?:([a-z-]+):)?(.+)\]$/i,g1=/^\d+\/\d+$/,m1=new Set(["px","full","screen"]),b1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,x1=/\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$/,v1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,y1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,w1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Wt=r=>un(r)||m1.has(r)||g1.test(r),fr=r=>pn(r,"length",z1),un=r=>!!r&&!Number.isNaN(Number(r)),Es=r=>pn(r,"number",un),ca=r=>!!r&&Number.isInteger(Number(r)),k1=r=>r.endsWith("%")&&un(r.slice(0,-1)),we=r=>Ef.test(r),hr=r=>b1.test(r),S1=new Set(["length","size","percentage"]),j1=r=>pn(r,S1,_f),N1=r=>pn(r,"position",_f),C1=new Set(["image","url"]),E1=r=>pn(r,C1,R1),_1=r=>pn(r,"",M1),da=()=>!0,pn=(r,a,o)=>{const l=Ef.exec(r);return l?l[1]?typeof a=="string"?l[1]===a:a.has(l[1]):o(l[2]):!1},z1=r=>x1.test(r)&&!v1.test(r),_f=()=>!1,M1=r=>y1.test(r),R1=r=>w1.test(r),I1=()=>{const r=Ie("colors"),a=Ie("spacing"),o=Ie("blur"),l=Ie("brightness"),d=Ie("borderColor"),p=Ie("borderRadius"),f=Ie("borderSpacing"),g=Ie("borderWidth"),m=Ie("contrast"),b=Ie("grayscale"),v=Ie("hueRotate"),S=Ie("invert"),w=Ie("gap"),C=Ie("gradientColorStops"),_=Ie("gradientColorStopPositions"),E=Ie("inset"),R=Ie("margin"),$=Ie("opacity"),X=Ie("padding"),ae=Ie("saturate"),G=Ie("scale"),D=Ie("sepia"),te=Ie("skew"),Z=Ie("space"),re=Ie("translate"),be=()=>["auto","contain","none"],Q=()=>["auto","hidden","clip","visible","scroll"],fe=()=>["auto",we,a],W=()=>[we,a],H=()=>["",Wt,fr],me=()=>["auto",un,we],Ce=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],xe=()=>["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"],q=()=>["start","end","center","between","around","evenly","stretch"],P=()=>["","0",we],T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>[un,we];return{cacheSize:500,separator:":",theme:{colors:[da],spacing:[Wt,fr],blur:["none","",hr,we],brightness:k(),borderColor:[r],borderRadius:["none","","full",hr,we],borderSpacing:W(),borderWidth:H(),contrast:k(),grayscale:P(),hueRotate:k(),invert:P(),gap:W(),gradientColorStops:[r],gradientColorStopPositions:[k1,fr],inset:fe(),margin:fe(),opacity:k(),padding:W(),saturate:k(),scale:k(),sepia:P(),skew:k(),space:W(),translate:W()},classGroups:{aspect:[{aspect:["auto","square","video",we]}],container:["container"],columns:[{columns:[hr]}],"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:[...Ce(),we]}],overflow:[{overflow:Q()}],"overflow-x":[{"overflow-x":Q()}],"overflow-y":[{"overflow-y":Q()}],overscroll:[{overscroll:be()}],"overscroll-x":[{"overscroll-x":be()}],"overscroll-y":[{"overscroll-y":be()}],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",ca,we]}],basis:[{basis:fe()}],"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:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",ca,we]}],"grid-cols":[{"grid-cols":[da]}],"col-start-end":[{col:["auto",{span:["full",ca,we]},we]}],"col-start":[{"col-start":me()}],"col-end":[{"col-end":me()}],"grid-rows":[{"grid-rows":[da]}],"row-start-end":[{row:["auto",{span:[ca,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:[w]}],"gap-x":[{"gap-x":[w]}],"gap-y":[{"gap-y":[w]}],"justify-content":[{justify:["normal",...q()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...q(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...q(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[X]}],px:[{px:[X]}],py:[{py:[X]}],ps:[{ps:[X]}],pe:[{pe:[X]}],pt:[{pt:[X]}],pr:[{pr:[X]}],pb:[{pb:[X]}],pl:[{pl:[X]}],m:[{m:[R]}],mx:[{mx:[R]}],my:[{my:[R]}],ms:[{ms:[R]}],me:[{me:[R]}],mt:[{mt:[R]}],mr:[{mr:[R]}],mb:[{mb:[R]}],ml:[{ml:[R]}],"space-x":[{"space-x":[Z]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Z]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",we,a]}],"min-w":[{"min-w":[we,a,"min","max","fit"]}],"max-w":[{"max-w":[we,a,"none","full","min","max","fit","prose",{screen:[hr]},hr]}],h:[{h:[we,a,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[we,a,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[we,a,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[we,a,"auto","min","max","fit"]}],"font-size":[{text:["base",hr,fr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Es]}],"font-family":[{font:[da]}],"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",un,Es]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Wt,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":[$]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[r]}],"text-opacity":[{"text-opacity":[$]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...xe(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Wt,fr]}],"underline-offset":[{"underline-offset":["auto",Wt,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:W()}],"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":[$]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Ce(),N1]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",j1]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},E1]}],"bg-color":[{bg:[r]}],"gradient-from-pos":[{from:[_]}],"gradient-via-pos":[{via:[_]}],"gradient-to-pos":[{to:[_]}],"gradient-from":[{from:[C]}],"gradient-via":[{via:[C]}],"gradient-to":[{to:[C]}],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:[g]}],"border-w-x":[{"border-x":[g]}],"border-w-y":[{"border-y":[g]}],"border-w-s":[{"border-s":[g]}],"border-w-e":[{"border-e":[g]}],"border-w-t":[{"border-t":[g]}],"border-w-r":[{"border-r":[g]}],"border-w-b":[{"border-b":[g]}],"border-w-l":[{"border-l":[g]}],"border-opacity":[{"border-opacity":[$]}],"border-style":[{border:[...xe(),"hidden"]}],"divide-x":[{"divide-x":[g]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[g]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[$]}],"divide-style":[{divide:xe()}],"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:["",...xe()]}],"outline-offset":[{"outline-offset":[Wt,we]}],"outline-w":[{outline:[Wt,fr]}],"outline-color":[{outline:[r]}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[r]}],"ring-opacity":[{"ring-opacity":[$]}],"ring-offset-w":[{"ring-offset":[Wt,fr]}],"ring-offset-color":[{"ring-offset":[r]}],shadow:[{shadow:["","inner","none",hr,_1]}],"shadow-color":[{shadow:[da]}],opacity:[{opacity:[$]}],"mix-blend":[{"mix-blend":[...ye(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ye()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[l]}],contrast:[{contrast:[m]}],"drop-shadow":[{"drop-shadow":["","none",hr,we]}],grayscale:[{grayscale:[b]}],"hue-rotate":[{"hue-rotate":[v]}],invert:[{invert:[S]}],saturate:[{saturate:[ae]}],sepia:[{sepia:[D]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[l]}],"backdrop-contrast":[{"backdrop-contrast":[m]}],"backdrop-grayscale":[{"backdrop-grayscale":[b]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[v]}],"backdrop-invert":[{"backdrop-invert":[S]}],"backdrop-opacity":[{"backdrop-opacity":[$]}],"backdrop-saturate":[{"backdrop-saturate":[ae]}],"backdrop-sepia":[{"backdrop-sepia":[D]}],"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:k()}],ease:[{ease:["linear","in","out","in-out",we]}],delay:[{delay:k()}],animate:[{animate:["none","spin","ping","pulse","bounce",we]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[G]}],"scale-x":[{"scale-x":[G]}],"scale-y":[{"scale-y":[G]}],rotate:[{rotate:[ca,we]}],"translate-x":[{"translate-x":[re]}],"translate-y":[{"translate-y":[re]}],"skew-x":[{"skew-x":[te]}],"skew-y":[{"skew-y":[te]}],"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":W()}],"scroll-mx":[{"scroll-mx":W()}],"scroll-my":[{"scroll-my":W()}],"scroll-ms":[{"scroll-ms":W()}],"scroll-me":[{"scroll-me":W()}],"scroll-mt":[{"scroll-mt":W()}],"scroll-mr":[{"scroll-mr":W()}],"scroll-mb":[{"scroll-mb":W()}],"scroll-ml":[{"scroll-ml":W()}],"scroll-p":[{"scroll-p":W()}],"scroll-px":[{"scroll-px":W()}],"scroll-py":[{"scroll-py":W()}],"scroll-ps":[{"scroll-ps":W()}],"scroll-pe":[{"scroll-pe":W()}],"scroll-pt":[{"scroll-pt":W()}],"scroll-pr":[{"scroll-pr":W()}],"scroll-pb":[{"scroll-pb":W()}],"scroll-pl":[{"scroll-pl":W()}],"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:[Wt,fr,Es]}],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"]}}},L1=h1(I1),B=(...r)=>L1(t1(r));x.createContext(!0),x.createContext(!1);const _s="opacity-0 transition-opacity motion-reduce:transition-none group-focus-within:opacity-100 group-hover:opacity-100 [@media(hover:none)]:opacity-100",zf=120,P1=200,Mf=".xls,.xlsx,.csv,.txt,.md",zs=2e3,T1=4,ua=["wrong_number","wrong_indicator","wrong_territory","wrong_period","not_answered","language","slow","other"],A1=[1,2,3,4,5],fn=r=>{const a=r?.trim();if(!a)return null;if(a.startsWith("#"))return a;if(!/^https?:\/\//i.test(a))return null;try{return new URL(a),a}catch{return null}},Rf=r=>r.replace(/[\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),Ms=async r=>{try{return await navigator.clipboard.writeText(r),!0}catch{return F1(r)}},F1=r=>{const a=document.createElement("textarea");a.value=r,a.setAttribute("readonly",""),a.style.cssText="position:fixed;top:0;left:0;opacity:0;pointer-events:none",document.body.appendChild(a),a.select();try{return document.execCommand("copy")}catch{return!1}finally{a.remove()}},D1=(r,a)=>{const o=document.createElement("a");o.href=r,o.download=a,o.rel="noopener",o.style.display="none",document.body.append(o),o.click(),o.remove(),window.setTimeout(()=>{URL.revokeObjectURL(r)},6e4)},O1=["group.pinned","group.today","group.yesterday","group.week","group.earlier"],If=864e5,$1=(r,a=new Date)=>{const o=new Date(a.getFullYear(),a.getMonth(),a.getDate()).getTime(),l=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-If?f="group.yesterday":p>=o-7*If?f="group.week":f="group.earlier",l.set(f,[...l.get(f)??[],d])}return O1.flatMap(d=>{const p=l.get(d);return p?[[d,p]]:[]})},q1=()=>{const{t:r}=Y(),{state:a,setView:o}=pr(),l=(d,p)=>s.jsx("button",{type:"button",role:"tab","aria-selected":a.view===d,onClick:()=>{o(d)},className:B("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",a.view===d?"bg-secondary text-secondary-foreground":"text-muted-foreground hover:text-foreground"),children:p});return s.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:[l("chat",r("dashboard.chatTab")),l("dashboard",r("dashboard.dashboardTab"))]})},U1=({wide:r,chat:a,panel:o,onPanelFocusChange:l})=>{const{state:d}=pr(),{view:p,fullscreen:f}=d,g=o!=null,m=g&&!r&&p==="dashboard",b=g&&!r&&p==="chat"&&!f,v=x.useRef(null);return zr(v,g&&f),s.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1",children:[s.jsx("div",{ref:v,hidden:m,className:B("relative min-h-0 min-w-0 flex-1 flex-col",m?"hidden":"flex"),children:a}),g?s.jsx("aside",{part:"dashboard","data-fullscreen":f,hidden:b,onFocus:()=>{l?.(!0)},onBlur:S=>{S.currentTarget.contains(S.relatedTarget)||l?.(!1)},className:B("min-h-0 min-w-0 flex-col bg-background",b?"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 V1=Object.defineProperty,Rs=(r,a)=>V1(r,"name",{value:a,configurable:!0});function Is(r,a){if(typeof r=="function")return r(a);r!=null&&(r.current=a)}Rs(Is,"setRef");function Lf(...r){return a=>{let o=!1;const l=r.map(d=>{const p=Is(d,a);return!o&&typeof p=="function"&&(o=!0),p});if(o)return()=>{for(let d=0;d<l.length;d++){const p=l[d];typeof p=="function"?p():Is(r[d],null)}}}}Rs(Lf,"composeRefs");function Pf(...r){return x.useCallback(Lf(...r),r)}Rs(Pf,"useComposedRefs");var B1=Object.defineProperty,pt=(r,a)=>B1(r,"name",{value:a,configurable:!0});function Tf(r){const a=x.forwardRef((o,l)=>{let{children:d,...p}=o,f=null,g=!1;const m=[];d=qf(d),x.Children.forEach(d,w=>{if(Of(w)){g=!0;const C=w;let _="child"in C.props?C.props.child:C.props.children;for(;Ls(_)&&typeof Wo=="function";)_=Wo(_._payload);f=Q1(C,_),m.push(f?.props?.children)}else m.push(w)}),f?f=x.cloneElement(f,void 0,m):!g&&x.Children.count(d)===1&&x.isValidElement(d)&&(f=d);const b=f?Df(f):void 0,v=Pf(l,b);if(!f){if(d||d===0)throw new Error(g?G1(r):X1(r));return d}const S=Ff(p,f.props??{});return f.type!==x.Fragment&&(S.ref=l?v:b),x.cloneElement(f,S)});return a.displayName=`${r}.Slot`,a}pt(Tf,"createSlot");var W1=Tf("Slot"),Af=Symbol.for("radix.slottable");function H1(r){const a=pt(o=>"child"in o?o.children(o.child):o.children,"Slottable");return a.displayName=`${r}.Slottable`,a.__radixId=Af,a}pt(H1,"createSlottable");var Q1=pt((r,a)=>"child"in r.props?x.isValidElement(a)?x.cloneElement(a,void 0,r.props.children(a.props.children)):null:x.isValidElement(a)?a:null,"getSlottableElementFromSlottable");function Ff(r,a){const o={...a};for(const l in a){const d=r[l],p=a[l];/^on[A-Z]/.test(l)?d&&p?o[l]=(...f)=>{const g=p(...f);return d(...f),g}:d&&(o[l]=d):l==="style"?o[l]={...d,...p}:l==="className"?o[l]=[d,p].filter(Boolean).join(" "):l==="aria-describedby"&&(o[l]=Uf(p,d))}return{...r,...o}}pt(Ff,"mergeProps");function Df(r){let a=Object.getOwnPropertyDescriptor(r.props,"ref")?.get,o=a&&"isReactWarning"in a&&a.isReactWarning;return o?r.ref:(a=Object.getOwnPropertyDescriptor(r,"ref")?.get,o=a&&"isReactWarning"in a&&a.isReactWarning,o?r.props.ref:r.props.ref||r.ref)}pt(Df,"getElementRef");function Of(r){return x.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===Af}pt(Of,"isSlottable");var K1=Symbol.for("react.lazy");function Ls(r){return r!=null&&typeof r=="object"&&"$$typeof"in r&&r.$$typeof===K1&&"_payload"in r&&$f(r._payload)}pt(Ls,"isLazyComponent");function $f(r){return typeof r=="object"&&r!==null&&"then"in r}pt($f,"isPromiseLike");function qf(r){let a=r;for(;Ls(a)&&typeof Wo=="function";)a=Wo(a._payload);return a}pt(qf,"useUnwrappedLazy");function Uf(...r){const a=new Set;for(const o of r)if(typeof o=="string")for(const l of String(o).trim().split(/\s+/))l&&a.add(l);return a.size>0?Array.from(a).join(" "):void 0}pt(Uf,"concatAriaDescribedby");var X1=pt(r=>`${r} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),G1=pt(r=>`${r} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Wo=ib[" use ".trim().toString()];function Vf(r){var a,o,l="";if(typeof r=="string"||typeof r=="number")l+=r;else if(typeof r=="object")if(Array.isArray(r)){var d=r.length;for(a=0;a<d;a++)r[a]&&(o=Vf(r[a]))&&(l&&(l+=" "),l+=o)}else for(o in r)r[o]&&(l&&(l+=" "),l+=o);return l}function Z1(){for(var r,a,o=0,l="",d=arguments.length;o<d;o++)(r=arguments[o])&&(a=Vf(r))&&(l&&(l+=" "),l+=a);return l}const Bf=r=>typeof r=="boolean"?`${r}`:r===0?"0":r,Wf=Z1,Y1=(r,a)=>o=>{var l;if(a?.variants==null)return Wf(r,o?.class,o?.className);const{variants:d,defaultVariants:p}=a,f=Object.keys(d).map(b=>{const v=o?.[b],S=p?.[b];if(v===null)return null;const w=Bf(v)||Bf(S);return d[b][w]}),g=o&&Object.entries(o).reduce((b,v)=>{let[S,w]=v;return w===void 0||(b[S]=w),b},{}),m=a==null||(l=a.compoundVariants)===null||l===void 0?void 0:l.reduce((b,v)=>{let{class:S,className:w,...C}=v;return Object.entries(C).every(_=>{let[E,R]=_;return Array.isArray(R)?R.includes({...p,...g}[E]):{...p,...g}[E]===R})?[...b,S,w]:b},[]);return Wf(r,f,m,o?.class,o?.className)},Hf=Y1("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=x.forwardRef(({className:r,variant:a,size:o,asChild:l=!1,loading:d=!1,isMenu:p=!1,type:f,...g},m)=>{const b=l?{}:{type:f??"button"};return s.jsx(l?W1:"button",d?{className:B(Hf({variant:a,size:o,className:r,isMenu:p})),ref:m,...b,...g,disabled:!0,children:s.jsx(Lr,{className:"size-4 animate-spin min-w-16"})}:{className:B(Hf({variant:a,size:o,className:r,isMenu:p})),ref:m,...b,...g})});ge.displayName="Button";function Ps(r,a,o){if(r===null)return _t(null,a);const l=_t(r,a,o);return r>0?`+${l}`:l}function Qf(r){return[r.territory_code??r.territory_name,r.item].filter(Boolean).join("|")}function Kf(r,a){return r.national?.period===a?r.national.value:null}function J1(r,a,o){const l=ta(r);return pa(r,{period:a,mode:"value",base:"median"}).filter(d=>d.value!==null).slice(0,o).map(d=>{const p=new Map(r.data.filter(f=>Qf(f)===d.key).map(f=>[f.period,f.value]));return{key:d.key,name:d.name,points:l.map(f=>({period:f,value:p.get(f)??null}))}})}function ey(r,a){if(new Set(r.data.map(l=>l.territory_code??l.territory_name??"")).size!==1||!r.data.every(l=>l.item!=null&&l.item!==""))return a;const o=new Map(r.data.map(l=>[Qf(l),l.item??""]));return a.map(l=>({...l,name:o.get(l.key)??l.name}))}function pa(r,a){return ey(r,jb(r,a))}function Xf(r,a,o){const l=Kf(r,a);if(l===null||r.value_kind!=="level")return l;const d=o.filter(p=>p!==null&&Number.isFinite(p));return d.length===0?null:l<=Math.max(...d)*1.05?l:null}const ty=["12 76% 61%","173 58% 39%","197 37% 24%","43 74% 66%","27 87% 67%"],Ts=r=>r.clientWidth>0&&r.clientWidth<ry,ry=360;function As(r){const a=document.createElement("span");r.appendChild(a);const o=d=>(a.style.color=d,getComputedStyle(a).color),l={series:ty.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:Ts(r)};return a.remove(),l}function ny({option:r,signature:a,label:o,height:l}){const d=x.useRef(null),p=x.useRef(null),f=x.useRef(r);return x.useEffect(()=>{f.current=r}),x.useEffect(()=>{const g=d.current;if(!g)return;let m=!0,b;return import("./echarts-3nlHlFS7.js").then(({init:v})=>{if(!m)return;p.current=v(g),p.current.setOption(f.current(As(g)));let S=Ts(g);b=new ResizeObserver(()=>{Ts(g)!==S&&(S=!S,p.current?.setOption(f.current(As(g)),!0)),p.current?.resize()}),b.observe(g)}).catch(()=>{}),()=>{m=!1,b?.disconnect(),p.current?.dispose(),p.current=null}},[]),x.useEffect(()=>{const g=d.current;g&&p.current&&p.current.setOption(f.current(As(g)),!0)},[a]),s.jsx("div",{ref:d,role:"img","aria-label":o,style:{height:l},className:"w-full min-w-0"})}const ay=[[/товариществ[оа] с ограниченной ответственностью/giu,"\u0422\u041E\u041E"],[/республиканско(е|го) государственно(е|го) учреждени[ея]/giu,"\u0420\u0413\u0423"],[/республиканско(е|го) государственно(е|го) предприяти[ея]/giu,"\u0420\u0413\u041F"],[/государственно(е|го) учреждени[ея]/giu,"\u0413\u0423"],[/акционерно(е|го) обществ[оа]/giu,"\u0410\u041E"],[/индивидуальный предприниматель/giu,"\u0418\u041F"]],oy=r=>ay.reduce((a,[o,l])=>a.replace(o,l),r).replace(/\s+/g," ").trim();function iy(r){if(r.trend)return["line","area","column"];const a=["bar","column"],o=r.rows.map(l=>l.value).filter(l=>l!==null);return!r.signed&&o.length>1&&o.every(l=>l>0)&&a.push("pie"),!r.signed&&r.periods.length>1&&r.series.length>0&&a.push("line"),a}const ly=.3;function sy(r,a,o,l){const{lang:d,decimals:p}=l,f=D=>typeof D=="number"?a.signed?Ps(D,d,p):_t(D,d,p):"\u2014",g=new Intl.NumberFormat(d,{notation:"compact",maximumFractionDigits:1}),m={color:o.muted,formatter:D=>g.format(D)},b={lineStyle:{color:o.border}},v=D=>te=>{const Z=oy(te);return Z.length>D?`${Z.slice(0,D-1)}\u2026`:Z},S={color:o.muted,formatter:v(o.narrow?12:22)},w={animationDuration:400,color:o.series,textStyle:{fontFamily:o.font,color:o.text},tooltip:{trigger:r==="pie"?"item":"axis",confine:!0,valueFormatter:f}},C=a.rows.map(D=>D.value).filter(D=>D!==null),_=!a.signed&&C.every(D=>D>0)&&!Eb(C);if(r==="pie")return{...w,legend:{type:"scroll",bottom:0,textStyle:{color:o.muted}},series:[{type:"pie",radius:["40%","68%"],center:["50%","44%"],itemStyle:{borderColor:"transparent",borderRadius:4},label:{show:!1},data:a.rows.filter(D=>D.value!==null).map(D=>({name:D.name,value:D.value}))}]};if(a.trend||r==="line"||r==="area")return{...w,legend:{type:"scroll",bottom:0,textStyle:{color:o.muted}},grid:{left:8,right:16,top:12,bottom:32,containLabel:!0},xAxis:{type:"category",data:a.periods,axisLabel:{color:o.muted},boundaryGap:r==="column"},yAxis:{type:"value",scale:r!=="column",axisLabel:m,splitLine:b},series:a.series.map(D=>({type:r==="column"?"bar":"line",name:D.name,data:a.periods.map(te=>D.points.find(Z=>Z.period===te)?.value??null),symbolSize:6,...r==="area"?{areaStyle:{opacity:.15}}:{}}))};const E=r==="bar",R=E?[...a.rows].reverse():a.rows,$=R.map(D=>D.name),X=a.national??null,ae={type:"value",scale:_,axisLabel:m,splitLine:b,...o.narrow?{splitNumber:2}:{}},G={type:"category",data:$,axisTick:{show:!1},axisLabel:E?S:{...S,formatter:v(14),rotate:30,interval:0}};return{...w,tooltip:{...w.tooltip,axisPointer:{type:"shadow"}},grid:{left:8,right:E?56:16,top:X===null?12:24,bottom:8,containLabel:!0},xAxis:E?ae:G,yAxis:E?G:ae,series:[{type:"bar",barMaxWidth:28,data:R.map(D=>({value:D.value,itemStyle:{color:D.value!==null&&D.value<0?o.negative:o.series[0],opacity:a.highlightKey!==void 0&&D.key!==a.highlightKey?ly:1,borderRadius:E?[0,4,4,0]:[4,4,0,0]}})),label:{show:E,position:"right",color:o.text,formatter:D=>f(D.value)},...X===null?{}:{markLine:{symbol:"none",silent:!0,lineStyle:{type:"dashed",color:o.reference},label:{formatter:l.nationalLabel(f(X)),color:o.reference,position:E?"end":"insideEndTop"},data:[E?{xAxis:X}:{yAxis:X}]}}}]}}const cy=5,Gf=({section:r,period:a,rows:o,national:l=null,signed:d=!1,highlightKey:p,compact:f=!1,label:g})=>{const{lang:m,t:b}=Y(),v={rows:o,series:J1(r,a,cy),periods:ta(r),trend:r.shape==="trend",national:l,signed:d,highlightKey:p},S=iy(v),[w,C]=x.useState(S[0]),_=S.includes(w)?w:S[0],E=_==="bar"&&!v.trend?Math.max(f?180:240,o.length*24+40):f?240:320;return s.jsxs("div",{part:"section-chart",className:"flex min-w-0 flex-col gap-2",children:[S.length>1?s.jsx("div",{role:"group","aria-label":b("chart.kinds"),className:"inline-flex flex-wrap gap-0.5 self-start rounded-md border bg-background p-0.5",children:S.map(R=>s.jsx("button",{type:"button","aria-pressed":R===_,onClick:()=>{C(R)},className:B("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",R===_?"bg-secondary text-secondary-foreground":"text-muted-foreground hover:text-foreground"),children:b(`chart.kind.${R}`)},R))}):null,s.jsx(ny,{label:g,height:E,signature:JSON.stringify([_,m,v]),option:R=>sy(_,v,R,{lang:m,decimals:r.decimals,nationalLabel:$=>b("chart.national",{value:$})})})]})},Zf=(r,a)=>{const{api:o,lang:l}=Y(),d=x.useSyncExternalStore(oa.subscribe,()=>oa.view(r))??(a?fs(a):Bp);x.useEffect(()=>{a&&oa.adopt(r,a,o)},[r,a,o]);const p=x.useCallback(()=>{oa.start(r,o,l)},[r,o,l]),f=x.useCallback(()=>{oa.expire(r)},[r]);return{view:d,start:p,expire:f}},Yf=({messageId:r,block:a,disabled:o=!1,className:l})=>{const{t:d}=Y(),{view:p,start:f}=Zf(r,a);return p.phase!=="idle"?null:s.jsxs(ge,{part:"report",variant:"input",size:"sm",className:B("gap-1.5 text-[13px]",l),disabled:o,onClick:f,children:[s.jsx(nv,{"aria-hidden":"true"}),d("report.create")]})},Jf={pdf:"pdf",doc:"doc",docx:"doc",ppt:"ppt",pptx:"ppt",xls:"xls",xlsx:"xls",csv:"csv"},Fs=r=>{const a=r.lastIndexOf(".");return a<0?"":r.slice(a+1).toLowerCase()},eh=r=>Object.hasOwn(Jf,r)?Jf[r]??"other":"other",dy={pdf:"bg-file-pdf",doc:"bg-file-doc",ppt:"bg-file-ppt",xls:"bg-file-xls",csv:"bg-file-csv",other:"bg-file-other"},Ds=({ext:r,className:a})=>s.jsx("span",{part:"file-type","data-kind":eh(r),"aria-hidden":"true",className:B("flex size-[34px] shrink-0 items-center justify-center rounded-lg text-[9.5px] font-bold leading-none tracking-[0.02em] text-background",dy[eh(r)],a),children:r?r.slice(0,4).toUpperCase():"FILE"}),th=["byte","kilobyte","megabyte","gigabyte"];function Os(r,a){let o=r,l=0;for(;o>=1024&&l<th.length-1;)o/=1024,l+=1;return new Intl.NumberFormat(a,{style:"unit",unit:th[l]??"byte",unitDisplay:"short",maximumFractionDigits:l===0?0:1}).format(o)}const uy=/^\/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,rh=r=>{const a=uy.exec(r);return a?.[1]?`${ns}/${a[1]}`:null},py=1e3,fy=async(r,a,o,l)=>{const d=rh(a);if(!d)return"unavailable";let p;try{p=await(await r.request(d.slice(ns.length))).blob()}catch(m){return m instanceof et&&m.status===410?"expired":m instanceof et&&m.status===404?"notFound":"unavailable"}const f=URL.createObjectURL(p),g=document.createElement("a");g.href=f,g.download=Rf(o),g.hidden=!0,l.appendChild(g);try{g.click()}finally{g.remove(),window.setTimeout(()=>{URL.revokeObjectURL(f)},py)}return"ok"},hy=["pdf","docx","pptx","xlsx","csv"],gy=r=>{const a=r.getRootNode();return a instanceof ShadowRoot?a:r.parentElement??r},nh=({files:r,onExpired:a,className:o})=>{const{api:l,lang:d,t:p}=Y(),[f,g]=x.useState(null),[m,b]=x.useState({}),v=x.useRef(m);x.useEffect(()=>{v.current=m});const S=r.filter(C=>hy.includes(C.format)&&rh(C.download_url)!==null);if(S.length===0)return null;const w=(C,_)=>{f===null&&(g(C.download_url),b(E=>Object.fromEntries(Object.entries(E).filter(([R])=>R!==C.download_url))),fy(l,C.download_url,C.filename,gy(_.currentTarget)).then(E=>{if(g(null),E==="ok")return;const R={...v.current,[C.download_url]:E};b(R),S.every($=>R[$.download_url]==="expired")&&a?.()}))};return s.jsxs("div",{part:"files",role:"group","aria-label":p("files.list"),className:B("flex flex-col gap-1.5",o),children:[s.jsx("div",{className:"text-2xs text-muted-foreground",children:p("files.list")}),s.jsx("ul",{"aria-label":p("files.list"),className:"m-0 flex list-none flex-col gap-1.5 p-0",children:S.map(C=>{const _=f===C.download_url,E=m[C.download_url];return s.jsxs("li",{"data-state":m[C.download_url]??void 0,className:B("flex min-w-0 items-center gap-3 rounded-xl border bg-card p-2",m[C.download_url]&&"border-error/35 bg-error-background"),children:[s.jsx(Ds,{ext:C.format}),s.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[s.jsx("span",{className:"truncate text-sm font-medium leading-tight",title:C.filename,children:p(`files.${jp(C.format)}`)}),s.jsxs("span",{className:"text-2xs leading-tight text-muted-foreground",children:[C.format.toUpperCase(),C.size_bytes>0?` \xB7 ${Os(C.size_bytes,d)}`:null]})]}),E?s.jsxs("span",{role:"alert",className:"flex shrink-0 items-center gap-1.5 text-[13px]",children:[s.jsx(Ir,{className:"text-destructive","aria-hidden":"true"}),p(`files.${E}`)]}):s.jsxs(ge,{variant:"ghost",size:"sm",className:"gap-1.5",title:C.filename,"aria-busy":_,disabled:f!==null,"aria-label":`${p("download")}: ${p(`files.${jp(C.format)}`)}`,onClick:R=>{w(C,R)},children:[_?s.jsx(Lr,{className:"animate-spin motion-reduce:animate-none","aria-hidden":"true"}):s.jsx(df,{"aria-hidden":"true"}),p("download")]})]},`${C.format}-${C.download_url}`)})})]})},$s="flex items-center gap-2.5 rounded-xl border px-3 py-2.5 text-sm",ah=({messageId:r,block:a,className:o})=>{const{t:l}=Y(),{view:d,start:p,expire:f}=Zf(r,a);switch(d.phase){case"idle":return null;case"pending":return s.jsxs("div",{part:"report",role:"status","data-state":"pending",className:B($s,"border-processing/25 bg-processing-background",o),children:[s.jsx(Lr,{className:"shrink-0 animate-spin text-primary-text motion-reduce:animate-none","aria-hidden":"true"}),s.jsx("span",{className:"min-w-0 flex-1",children:l("report.pending")})]});case"done":return s.jsx(nh,{files:d.files,onExpired:f,className:o});case"expired":return s.jsxs("div",{part:"report",role:"status","data-state":"expired",className:B($s,"bg-card",o),children:[s.jsx(ws,{className:"shrink-0 text-muted-foreground","aria-hidden":"true"}),s.jsx("span",{className:"min-w-0 flex-1",children:l("report.expired")}),s.jsx(ge,{variant:"input",size:"sm",className:"gap-1.5 text-[13px]",onClick:p,children:l("report.create")})]});case"failed":return s.jsxs("div",{part:"report",role:"alert","data-state":"failed",className:B($s,"border-error/30 bg-error-background",o),children:[s.jsx(Ir,{className:"shrink-0 text-destructive","aria-hidden":"true"}),s.jsx("span",{className:"min-w-0 flex-1",children:l("report.failed")}),s.jsx(ge,{variant:"input",size:"sm",className:"gap-1.5 text-[13px]",onClick:p,children:l("report.retry")})]})}},my=4;function Ho(r,a,o){const l=Cb(r,a);return l==="\u043F.\u043F."?o("dashboard.points"):l}function oh(r){if(r.length===0)return null;const a=[...r].sort((l,d)=>l-d),o=Math.floor(a.length/2);return a.length%2?a[o]??null:((a[o-1]??0)+(a[o]??0))/2}function fa(r){const a=new Set;return r.filter(o=>!a.has(o.label)&&a.add(o.label)).slice(0,my)}function by(r,{period:a,region:o,lang:l,t:d}){if(o===void 0&&a===r.latest_period&&r.kpis.length>0)return fa(r.kpis.map(_=>({label:_.label,value:_.value,sub:_.sub??null})));const p=_=>`${_t(_,l,r.decimals)} ${r.unit.label}`,f=(_,E)=>_===null?_t(null,l):`${Ps(_,l,r.decimals)} ${E}`,g=pa(r,{period:a,mode:"value",base:"median"}).filter(_=>_.value!==null),m=g.map(_=>_.value??0),b=g[0],v=g[g.length-1];if(b===void 0||v===void 0)return[];if(o!==void 0){const _=g.findIndex($=>$.key===o),E=g[_];if(E===void 0)return[];const R=oh(m);return fa([{label:E.name,value:p(E.value),sub:a},{label:d("dashboard.kpi.place"),value:d("dashboard.kpi.placeOf",{n:_+1,m:g.length})},{label:d("dashboard.kpi.deviation"),value:f(R===null||E.value===null?null:E.value-R,Ho(r,"deviation",d))},{label:d("dashboard.kpi.previous"),value:f(E.delta,Ho(r,"change",d))}])}if(r.shape==="trend"){const _=ta(r).filter(G=>G<=a),E=G=>r.data.find(D=>D.period===G&&D.value!==null)?.value??null,R=_[0],$=E(a),X=R===void 0?null:E(R);let ae=null;return $!==null&&X!==null&&R!==a&&(ae=r.value_kind==="level"?X>0?($/X-1)*100:null:$-X),fa([{label:d("dashboard.kpi.last"),value:p($),sub:a},...R!==void 0&&R!==a?[{label:d("dashboard.kpi.first"),value:p(X),sub:R},{label:d("dashboard.kpi.change"),value:f(ae,Ho(r,"change",d))}]:[]])}if(r.shape==="breakdown")return fa([...g.slice(0,3).map(_=>({label:_.name,value:p(_.value),sub:_.share===null?a:`${_t(_.share,l,1)} %`})),...g.length>1?[{label:d("dashboard.kpi.gap"),value:p((b.value??0)-(v.value??0)),sub:`${b.name} \u2212 ${v.name}`}]:[]]);const S=Kf(r,a),w=oh(m),C=[{label:d("dashboard.kpi.max"),value:p(b.value),sub:b.name},{label:d("dashboard.kpi.min"),value:p(v.value),sub:v.name},{label:d("dashboard.kpi.median"),value:p(w),sub:a}];return fa(S!==null?[{label:d("dashboard.kpi.national"),value:p(S),sub:a},...C]:[...C,{label:d("dashboard.kpi.spread"),value:p((b.value??0)-(v.value??0)),sub:`${b.name} \u2212 ${v.name}`}])}const xy=({kpis:r})=>{const{t:a}=Y();return r.length===0?null:s.jsx("ul",{"aria-label":a("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,l)=>s.jsxs("li",{className:"flex min-w-0 flex-col gap-0.5 rounded-xl border bg-card px-3.5 py-3",children:[s.jsx("span",{"data-kpi-label":"",className:"truncate text-2xs text-muted-foreground",title:o.label,children:o.label}),s.jsx("span",{className:"text-xl font-semibold tabular-nums leading-snug",children:o.value}),o.sub!=null&&o.sub!==""?s.jsx("span",{className:"truncate text-2xs text-muted-foreground",title:o.sub,children:o.sub}):null]},l))})};function ih({label:r,value:a,options:o,onChange:l}){return s.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===a,f=d.disabledHint!==void 0;return s.jsx("button",{type:"button","aria-pressed":p,"aria-disabled":f||void 0,title:d.disabledHint,onClick:()=>{f||l(d.value)},className:B("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 ha="whitespace-nowrap px-3 py-[7px] text-[13px] font-semibold text-foreground",hn="whitespace-nowrap text-right tabular-nums",vy=({section:r,rows:a,mode:o,lang:l,highlightKey:d})=>{const{t:p}=Y(),f=r.value_kind==="level",g=o==="value"?null:p(o==="change"?"dashboard.table.change":"dashboard.table.deviation",{unit:Ho(r,o,p)});return s.jsx("div",{className:"max-h-[28rem] overflow-auto overscroll-contain rounded-[10px] border bg-card",children:s.jsxs("table",{className:"w-full border-collapse text-[13.5px]",children:[s.jsx("thead",{className:"sticky top-0 bg-muted",children:s.jsxs("tr",{className:"border-b",children:[s.jsx("th",{scope:"col",className:B(ha,"w-10 text-right"),children:p("dashboard.table.rank")}),s.jsx("th",{scope:"col",className:B(ha,"text-left"),children:p("dashboard.table.position")}),s.jsx("th",{scope:"col",className:B(ha,hn),children:p("dashboard.table.value",{unit:r.unit.label})}),g!==null?s.jsx("th",{scope:"col",className:B(ha,hn),children:g}):null,f?s.jsx("th",{scope:"col",className:B(ha,hn),children:p("dashboard.table.share")}):null]})}),s.jsx("tbody",{children:a.map((m,b)=>s.jsxs("tr",{className:B("h-9 border-b last:border-b-0",m.key===d&&"bg-accent"),children:[s.jsx("td",{className:"px-3 text-right tabular-nums text-muted-foreground",children:b+1}),s.jsx("td",{className:"px-3",children:m.name}),s.jsx("td",{className:B("px-3",hn),children:_t(m.value,l,r.decimals)}),g!==null?s.jsx("td",{className:B("px-3",hn),children:Ps(m.display,l,r.decimals)}):null,f?s.jsx("td",{className:B("px-3",hn),children:_t(m.share,l,1)}):null]},m.key))})]})})},qs="__all__",Us="size-8 text-muted-foreground hover:text-foreground",yy=({message:r})=>{const{t:a}=Y(),{state:o,setSection:l}=pr(),d=Bt(r.blocks,"dashboard")?.sections??[],p=d.find(g=>g.id===o.sectionId)??d[0];if(p===void 0)return null;const f=d.length>1?s.jsx("div",{role:"tablist","aria-label":a("dashboard.sections"),className:"flex gap-1 self-start overflow-x-auto rounded-md bg-secondary p-1",children:d.map(g=>{const m=g.id===p.id;return s.jsx("button",{type:"button",role:"tab","aria-selected":m,onClick:()=>{l(g.id)},className:B("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:g.title},g.id)})}):null;return s.jsx("section",{"aria-label":a("dashboard.label"),className:"flex h-full min-h-0 min-w-0 flex-1 flex-col bg-background",children:s.jsx(wy,{section:p,message:r,tabs:f},p.id)})},lh=({label:r,value:a,onChange:o,children:l,className:d})=>s.jsxs("div",{className:B("flex flex-col gap-1",d),children:[s.jsx("span",{className:"text-2xs text-muted-foreground","aria-hidden":"true",children:r}),s.jsxs("span",{className:"relative inline-flex",children:[s.jsx("select",{"aria-label":r,value:a,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:l}),s.jsx(dn,{className:"pointer-events-none absolute right-2 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"})]})]}),sh=({label:r,children:a})=>s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-2xs text-muted-foreground","aria-hidden":"true",children:r}),a]}),wy=({section:r,message:a,tabs:o})=>{const{lang:l,t:d}=Y(),{state:p,setFullscreen:f,close:g}=pr(),{fullscreen:m}=p,b=ta(r),[v,S]=x.useState(()=>b.includes(r.latest_period)?r.latest_period:b.at(-1)??r.latest_period),[w,C]=x.useState(),[_,E]=x.useState("value"),[R,$]=x.useState("median"),X=Nb(r,v),ae=r.shape==="trend",G=ae||_==="change"&&!X.change||_==="deviation"&&!X.deviation?"value":_,D=R==="national"&&X.national?"national":"median",te=pa(r,{period:v,mode:G,base:D}),Z=G==="value"?te:pa(r,{period:v,mode:"value",base:D}),re=[...Z].sort((k,L)=>k.name.localeCompare(L.name,l)),be=w!==void 0&&re.some(k=>k.key===w)?w:void 0,Q=by(r,{period:v,region:be,lang:l,t:d}),fe=v===r.latest_period&&be===void 0?r.findings:[],W=r.shape==="regional",H=Z.filter(k=>k.value!==null).length,me=[v,r.unit.label,d(W?"dashboard.regions":"dashboard.items",{n:H})].join(" \xB7 "),Ce=fn(r.source_url),xe=r.methodology?.editions,ye=xe?.[l]??xe?.ru,q=fn(ye?.url),P=`${d(ae?"dashboard.trend":"dashboard.ranking")}: ${r.title}, ${v}`,T=tf(a.blocks);return s.jsxs(s.Fragment,{children:[s.jsxs("header",{className:"flex shrink-0 flex-col gap-2 border-b py-3.5 pl-5 pr-4",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("span",{className:"min-w-0 flex-1 text-2xs font-semibold uppercase tracking-wide text-primary-text",children:d("dashboard.eyebrow")}),q!==null?s.jsx(ge,{variant:"ghost",size:"icon",className:Us,asChild:!0,children:s.jsx("a",{href:q,target:"_blank",rel:"noopener noreferrer","aria-label":d("dashboard.methodology"),title:ye?.title??d("dashboard.methodology"),children:s.jsx(Uo,{"aria-hidden":"true"})})}):null,Ce!==null?s.jsx(ge,{variant:"ghost",size:"icon",className:Us,asChild:!0,children:s.jsx("a",{href:Ce,target:"_blank",rel:"noopener noreferrer","aria-label":d("dashboard.openSource"),title:d("dashboard.openSource"),children:s.jsx(Ss,{"aria-hidden":"true"})})}):null,s.jsxs(ge,{variant:"ghost",size:"sm",className:"gap-1.5 text-muted-foreground hover:text-foreground","aria-pressed":m,onClick:()=>{f(!m)},children:[m?s.jsx(mf,{"aria-hidden":"true"}):s.jsx(ff,{"aria-hidden":"true"}),d(m?"dashboard.collapse":"dashboard.fullscreen")]}),s.jsx(ge,{variant:"ghost",size:"icon",className:Us,"aria-label":d("dashboard.close"),title:d("dashboard.close"),onClick:g,children:s.jsx(sa,{"aria-hidden":"true"})})]}),s.jsx("h2",{className:"m-0 text-xl font-semibold leading-snug",children:r.title}),s.jsx("span",{className:"text-xs text-muted-foreground",children:me})]}),s.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,s.jsxs("div",{className:"flex flex-wrap items-end gap-3",children:[W&&re.length>1?s.jsxs(lh,{label:d("dashboard.region"),value:be??qs,onChange:k=>{C(k===qs?void 0:k)},className:"min-w-40 max-w-60",children:[s.jsx("option",{value:qs,children:d("dashboard.allRegions")}),re.map(k=>s.jsx("option",{value:k.key,children:k.name},k.key))]}):null,b.length>1?s.jsx(lh,{label:d("dashboard.period"),value:v,onChange:S,className:"min-w-24",children:[...b].reverse().map(k=>s.jsx("option",{value:k,children:k},k))}):null,ae?null:s.jsx(sh,{label:d("dashboard.mode.label"),children:s.jsx(ih,{label:d("dashboard.mode.label"),value:G,onChange:E,options:[{value:"value",label:d("dashboard.mode.value")},{value:"deviation",label:d("dashboard.mode.deviation"),disabledHint:X.deviation?void 0:d("dashboard.fewRegions")},{value:"change",label:d("dashboard.mode.change"),disabledHint:X.change?void 0:d("dashboard.noPrevious")}]})}),G==="deviation"?s.jsx(sh,{label:d("dashboard.base.label"),children:s.jsx(ih,{label:d("dashboard.base.label"),value:D,onChange:$,options:[{value:"median",label:d("dashboard.base.median")},{value:"national",label:d("dashboard.base.national"),disabledHint:X.national?void 0:d("dashboard.noNational")}]})}):null]}),s.jsx(xy,{kpis:Q}),s.jsx(Vs,{title:d(ae?"dashboard.trend":"dashboard.ranking"),card:!0,children:s.jsx(Gf,{section:r,period:v,label:P,rows:te.map(k=>({key:k.key,name:k.name,value:k.display})),national:G==="value"?Xf(r,v,te.map(k=>k.value)):null,signed:G!=="value",highlightKey:be})}),fe.length>0?s.jsx(Vs,{title:d("dashboard.findings"),children:s.jsx("ul",{className:"flex list-disc flex-col gap-1 pl-5 text-sm",children:fe.map((k,L)=>s.jsx("li",{children:k},L))})}):null,s.jsx(Vs,{title:d("dashboard.data"),children:s.jsx(vy,{section:r,rows:te,mode:G,lang:l,highlightKey:be})}),s.jsxs("footer",{className:"flex flex-col gap-3 border-t pt-3.5",children:[r.source_name!=null&&r.source_name!==""?s.jsx("p",{className:"text-xs text-muted-foreground",children:d("dashboard.source",{name:r.source_name})}):null,s.jsx("div",{className:"-ml-2 empty:hidden",children:s.jsx(Yf,{messageId:a.id,block:T})}),s.jsx(ah,{messageId:a.id,block:T})]})]})]})},Vs=({title:r,children:a,card:o=!1})=>s.jsxs("section",{className:"flex flex-col gap-2",children:[s.jsx("h3",{className:"m-0 text-sm font-semibold",children:r}),o?s.jsx("div",{className:"rounded-xl bg-[hsl(var(--chart-card))] px-4 py-3.5",children:a}):a]}),ky=({threadId:r,children:a})=>{const[o,l]=x.useState(ia),[d,p]=x.useState(r);d!==r&&(p(r),d!==void 0&&l(ia));const f=x.useRef(new Set),g=x.useCallback((E,R)=>{l(ys(E,R??null))},[]),m=x.useCallback(E=>{l(R=>R.messageId===E?ia:ys(E))},[]),b=x.useCallback(E=>{f.current.has(E)||(f.current.add(E),l(ys(E)))},[]),v=x.useCallback(()=>{l(ia)},[]),S=x.useCallback(E=>{l(R=>({...R,sectionId:E}))},[]),w=x.useCallback(E=>{l(R=>({...R,fullscreen:E}))},[]),C=x.useCallback(E=>{l(R=>({...R,view:E}))},[]),_=x.useMemo(()=>({state:o,open:g,toggle:m,autoOpen:b,close:v,setSection:S,setFullscreen:w,setView:C}),[o,g,m,b,v,S,w,C]);return s.jsx(rf.Provider,{value:_,children:a})};function Sy(r,a,o){const{autoOpen:l}=pr(),[d,p]=x.useState(null);d?.threadId===void 0&&d!==null&&a===void 0?d.active!==o.streaming&&p({...d,active:o.streaming}):d?.threadId===void 0&&d!==null?d.active||o.streaming||r.some(b=>!Io(b.id))?p({threadId:a,ids:d.ids,active:!0}):o.loaded&&p({threadId:a,ids:new Set(r.map(b=>b.id)),active:!1}):o.loaded&&(d===null||d.threadId!==a)&&p({threadId:a,ids:new Set(r.map(b=>b.id)),active:!1});const f=r.at(-1),g=f?.id,m=d!==null&&d.threadId===a&&f?.role==="assistant"&&!d.ids.has(f.id)&&f.status!=="streaming"&&Io(f.id)&&Bt(f.blocks,"dashboard")?.auto_open===!0;x.useEffect(()=>{m&&g!=null&&l(g)},[m,g,l])}const ch="aid_intro_ack",jy=()=>{try{return window.localStorage.getItem(ch)!==null}catch{return!1}},Ny=({active:r=!0})=>{const{state:a,lang:o,t:l}=Y(),d=na(a.config?.intro_notice??void 0,o).trim(),[p,f]=x.useState(jy),g=r&&d!==""&&!p,m=x.useId(),b=d.split(`
17
+ `).filter(w=>w.trim()!==""),v=x.useRef(null);zr(v,!g),qo(v,g,()=>{const w=v.current?.getRootNode();return w instanceof ShadowRoot||w instanceof Document?w.querySelector('[part="input"]'):null});const S=x.useCallback(()=>{f(!0);try{window.localStorage.setItem(ch,"1")}catch{}},[]);return x.useEffect(()=>{if(!g)return;const w=C=>{C.key==="Escape"&&(C.preventDefault(),S())};return window.addEventListener("keydown",w,!0),()=>{window.removeEventListener("keydown",w,!0)}},[g,S]),d===""?null:s.jsxs("div",{ref:v,className:B("absolute inset-0 z-50 flex items-center justify-center p-4 transition-opacity duration-150 motion-reduce:transition-none",g?"opacity-100":"pointer-events-none opacity-0"),"aria-hidden":!g,children:[s.jsx("div",{"aria-hidden":"true",className:"absolute inset-0 bg-scrim"}),s.jsxs("div",{part:"intro",role:"dialog","aria-modal":"true","aria-labelledby":m,className:B("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",g?"translate-y-0":"translate-y-2"),children:[s.jsx("h2",{id:m,className:"m-0 py-3.5 pl-[18px] pr-3 pb-2.5 text-lg font-semibold",children:l("intro.title")}),s.jsx("div",{className:"flex min-h-0 flex-col gap-2.5 overflow-y-auto px-[18px] pt-1",children:b.map((w,C)=>s.jsx("p",{className:"text-[13px] leading-[1.55]",children:w},`${C}-${w}`))}),s.jsx("footer",{className:"flex shrink-0 justify-end px-[18px] pb-[18px] pt-3.5",children:s.jsx(ge,{"data-autofocus":!0,size:"md",onClick:S,children:l("intro.continue")})})]})]})},ga=r=>r?!r.available||r.status==="down"||r.status==="overloaded"?"unavailable":r.status==="idle"?"idle":r.status==="busy"||r.status==="degraded"?"busy":"unknown":"unknown",Cy={idle:"text-mode-idle",busy:"text-mode-busy",unavailable:"text-mode-down",unknown:"text-muted-foreground"},Ey={idle:"health.idle",busy:"health.busy",unavailable:"health.unavailable"},dh=r=>Ey[r],_y={bot:Ox,"book-open":Uo,database:Zx,"file-text":ov,globe:lv,lock:pf,"message-circle":vv,"message-square":gf,search:la,sparkles:js},Bs=({name:r,className:a})=>{const o=_y[r]??js;return s.jsx(o,{className:B("size-4 shrink-0",a),"aria-hidden":"true"})},Ws=({level:r,lang:a})=>r==="unknown"?null:s.jsxs("span",{part:"mode-health","data-level":r,className:B("inline-flex shrink-0 items-center gap-1.5 text-2xs font-semibold",Cy[r]),children:[s.jsx("span",{"aria-hidden":"true",className:"size-2 shrink-0 rounded-full bg-current"}),zt(a,dh(r))]}),uh="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",ph=(r,a)=>na(r.title,a)||r.slug,fh=({modes:r,health:a,value:o,onChange:l,lang:d,label:p,variant:f="field",placement:g="top"})=>{const m=f==="pill",[b,v]=x.useState(!1),S=Math.max(0,r.findIndex(Q=>Q.slug===o)),[w,C]=x.useState(S),_=x.useId(),E=x.useRef(null),R=x.useRef(null),$=r[S],X=ga($?a[$.slug]:void 0),ae=x.useRef(null);x.useEffect(()=>{b&&R.current?.focus()},[b]),x.useEffect(()=>{if(!b)return;const Q=W=>{W.key==="Escape"&&(W.preventDefault(),W.stopPropagation(),v(!1),E.current?.focus())},fe=W=>{ae.current&&!W.composedPath().includes(ae.current)&&v(!1)};return window.addEventListener("keydown",Q,!0),window.addEventListener("pointerdown",fe,!0),()=>{window.removeEventListener("keydown",Q,!0),window.removeEventListener("pointerdown",fe,!0)}},[b]);const G=Q=>{v(!1),Q&&E.current?.focus()},D=()=>{C(S),v(!0)},te=Q=>{const fe=r[Q];fe&&l(fe.slug),G(!0)},Z=Q=>{switch(Q.key){case"ArrowDown":Q.preventDefault(),C(fe=>Math.min(r.length-1,fe+1));break;case"ArrowUp":Q.preventDefault(),C(fe=>Math.max(0,fe-1));break;case"Home":Q.preventDefault(),C(0);break;case"End":Q.preventDefault(),C(r.length-1);break;case"Enter":case" ":Q.preventDefault(),te(w);break;case"Tab":G(!1);break}},re=$?ph($,d):"",be=X==="unknown"?"":zt(d,dh(X));return s.jsxs("div",{ref:ae,className:B(m?"min-w-0":"flex flex-col gap-1.5"),onBlur:Q=>{b&&Q.relatedTarget instanceof Node&&!Q.currentTarget.contains(Q.relatedTarget)&&v(!1)},children:[s.jsxs("button",{ref:E,part:m?"mode-select":void 0,type:"button","aria-haspopup":"listbox","aria-expanded":b,"aria-controls":b?`${_}-list`:void 0,"aria-label":`${p}: ${re}${m&&be?`, ${be}`:""}`,onClick:()=>{b?G(!1):D()},onKeyDown:Q=>{Q.key==="ArrowDown"&&!b&&(Q.preventDefault(),D())},className:B(m?B(uh,"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",b&&"border-primary shadow-[0_0_0_3px_var(--aid-c-secondary)]"),children:[m&&$?s.jsx(Bs,{name:$.icon}):null,s.jsx("span",{className:B("truncate",m&&"min-w-0"),children:re}),m?s.jsx(Ws,{level:X,lang:d}):null,s.jsx(dn,{className:B("size-3.5 shrink-0 text-muted-foreground transition-transform motion-reduce:transition-none",(m?g==="top"!==b:b)&&"rotate-180"),"aria-hidden":"true"})]}),b?s.jsxs("ul",{ref:R,id:`${_}-list`,part:m?"mode-list":void 0,role:"listbox",tabIndex:-1,"aria-label":p,"aria-activedescendant":`${_}-${w}`,onKeyDown:Z,className:B("flex max-h-56 flex-col overflow-y-auto rounded-md border bg-background p-1 shadow-pop focus-visible:outline-none",m&&B("absolute left-0 z-20 w-[340px] max-w-full duration-150 animate-in fade-in motion-reduce:animate-none",g==="top"?"bottom-[calc(100%+6px)]":"top-[calc(100%+6px)]")),children:[m?s.jsx("li",{role:"presentation",className:"px-2.5 pb-1 pt-1.5 text-2xs text-muted-foreground",children:p}):null,r.map((Q,fe)=>{const W=ga(a[Q.slug]),H=na(Q.description,d);return s.jsxs("li",{id:`${_}-${fe}`,part:m?"mode-option":void 0,role:"option","aria-selected":fe===S,onMouseDown:me=>{me.preventDefault()},onMouseEnter:()=>{C(fe)},onClick:()=>{te(fe)},className:B("flex cursor-pointer items-start gap-2.5 rounded-lg px-2.5 py-2",fe===w&&"bg-accent",fe===S&&"bg-secondary"),children:[s.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-lg bg-muted",children:s.jsx(Bs,{name:Q.icon})}),s.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[s.jsx("span",{className:"truncate text-sm font-medium leading-[1.35]",children:ph(Q,d)}),H?s.jsx("span",{className:"line-clamp-2 text-2xs leading-[1.35] text-muted-foreground",children:H}):null,s.jsx(Ws,{level:W,lang:d})]}),s.jsx(Rr,{className:B("mt-1 size-4 shrink-0 text-primary",fe!==S&&"invisible"),"aria-hidden":"true"})]},Q.slug)})]}):null]})},Hs=(r,a)=>r===(a>=0?a:0)?0:-1,zy={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1,Home:"start",End:"end"},Qs=(r,a=!1)=>{const o=zy[r.key];if(o===void 0)return;const l=Array.from(r.currentTarget.querySelectorAll('[role="radio"]:not(:disabled)')),d=r.currentTarget.getRootNode(),p=l.findIndex(g=>g===d.activeElement);if(l.length===0)return;r.preventDefault();const f=o==="start"?0:o==="end"?l.length-1:(Math.max(p,0)+o+l.length)%l.length;l[f]?.focus(),a&&l[f]?.click()},My=({label:r,className:a,children:o})=>s.jsx("div",{role:"radiogroup","aria-label":r,className:a,onKeyDown:l=>{Qs(l,!0)},children:o}),Ry=()=>typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.userAgent),Iy=["search","newChat","sidebar","close"],Ly=r=>{const a=r?"\u2318":"Ctrl",o=r?"\u21E7":"Shift",l=d=>r?[o,a,d]:[a,o,d];return{search:[a,"K"],newChat:l("O"),sidebar:l("S"),close:["Esc"]}},Py={kk:"\u049A\u0430\u0437\u0430\u049B\u0448\u0430",ru:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439",en:"English"},Qo=({title:r,hint:a,children:o})=>s.jsxs("section",{className:"flex flex-col gap-2",children:[s.jsx("h3",{className:"text-xs font-semibold text-muted-foreground",children:r}),o,a?s.jsx("p",{className:"text-xs text-muted-foreground",children:a}):null]}),hh=({value:r,options:a,onChange:o,label:l})=>{const d=a.findIndex(p=>p.value===r);return s.jsx(My,{label:l,className:"grid grid-cols-3 gap-2",children:a.map((p,f)=>{const g=p.value===r;return s.jsxs("button",{type:"button",role:"radio","aria-checked":g,tabIndex:Hs(f,d),lang:p.lang,onClick:()=>{o(p.value)},className:B("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",g?"border-primary bg-secondary":"bg-background hover:border-primary/50"),children:[s.jsx("span",{"aria-hidden":"true",className:B("relative size-4 shrink-0 rounded-full border-[1.5px] bg-background",g?"border-primary":"border-muted-foreground"),children:g?s.jsx("span",{className:"absolute inset-[3px] rounded-full bg-primary"}):null}),s.jsx("span",{className:"truncate",children:p.label})]},p.value)})})},Ty=({children:r})=>s.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}),Ay=({open:r,onClose:a})=>{const{state:o,lang:l,t:d,selectMode:p}=Y(),f=ds(),g=x.useRef(null);zr(g,!r),qo(g,r),x.useEffect(()=>{if(!r)return;const w=C=>{C.key==="Escape"&&(g.current?.querySelector('[aria-haspopup="listbox"][aria-expanded="true"]')||(C.preventDefault(),a()))};return window.addEventListener("keydown",w,!0),()=>{window.removeEventListener("keydown",w,!0)}},[r,a]);const m=o.config?.modes??[],b=[{value:"light",label:d("settings.themeLight")},{value:"dark",label:d("settings.themeDark")},{value:"auto",label:d("settings.themeAuto")}],v=Ly(Ry()),S={search:d("shortcut.search"),newChat:d("shortcut.newChat"),sidebar:d("shortcut.sidebar"),close:d("shortcut.close")};return s.jsxs("div",{ref:g,className:B("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:[s.jsx("button",{type:"button",tabIndex:-1,"aria-hidden":"true",className:"absolute inset-0 bg-scrim",onClick:a}),s.jsxs("div",{part:"settings",role:"dialog","aria-modal":"true","aria-label":d("settings"),className:B("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:[s.jsxs("header",{className:"flex shrink-0 items-center justify-between pb-2.5 pl-[18px] pr-3 pt-3.5",children:[s.jsx("h2",{className:"text-lg font-semibold",children:d("settings")}),s.jsx(ge,{"data-autofocus":!0,variant:"ghost",size:"icon","aria-label":d("close"),onClick:a,children:s.jsx(sa,{"aria-hidden":"true"})})]}),s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-[18px] pb-[18px] pt-1",children:[s.jsx(Qo,{title:d("settings.language"),children:s.jsx(hh,{label:d("settings.language"),value:l,options:ss.map(w=>({value:w,label:Py[w],lang:w})),onChange:w=>{f.update({lang:w})}})}),s.jsx(Qo,{title:d("settings.theme"),children:s.jsx(hh,{label:d("settings.theme"),value:f.scheme,options:b,onChange:w=>{f.update({scheme:w})}})}),m.length>0?s.jsx(Qo,{title:d("settings.model"),hint:d("settings.modelHint"),children:s.jsx(fh,{modes:m,health:o.health,value:o.mode,onChange:p,lang:l,label:d("settings.model")})}):null,s.jsx(Qo,{title:d("settings.shortcuts"),children:s.jsx("div",{className:"flex flex-col",children:Iy.map(w=>s.jsxs("div",{className:"flex items-center justify-between py-1 text-xs",children:[s.jsx("span",{children:S[w]}),s.jsx("span",{className:"flex gap-[3px]",children:v[w].map(C=>s.jsx(Ty,{children:C},C))})]},w))})})]})]})]})},Fy={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"},Ko=({tone:r,icon:a,children:o,role:l="status",part:d,state:p})=>s.jsxs("div",{part:d,role:l,"data-tone":r,"data-state":p,className:B("mb-2 flex items-center gap-2.5 text-xs leading-snug",Fy[r]),children:[s.jsx("span",{className:"flex shrink-0",children:a}),s.jsx("span",{className:"min-w-0 flex-1",children:o})]}),gh=({children:r,onDismiss:a,dismissLabel:o,part:l})=>s.jsxs("div",{part:l,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:[s.jsx(Ir,{className:"shrink-0 text-destructive","aria-hidden":"true"}),s.jsx("span",{className:"min-w-0 flex-1",children:r}),s.jsx(ge,{variant:"ghost",size:"xs",onClick:a,children:o})]}),Dy=r=>new Intl.DateTimeFormat(r,{hour:"2-digit",minute:"2-digit"}),Oy=()=>{const{state:r,lang:a,t:o}=Y(),{remaining:l,daily:d,blocked:p,resetAt:f,overloaded:g}=r.limit;if(g&&r.config)return s.jsx(Ko,{tone:"overloaded",part:"limit-banner",state:"overloaded",icon:s.jsx(Bo,{"aria-hidden":"true"}),children:o("overloaded")});if(p){const m=f?new Date(f):null,b=m&&!Number.isNaN(m.getTime())?o("limit.until",{time:Dy(a).format(m)}):o("limit.exhausted");return s.jsx(Ko,{tone:"blocked",part:"limit-banner",state:"blocked",icon:s.jsx(ws,{"aria-hidden":"true"}),children:b})}return l===null||d===null||l>3?null:s.jsx(Ko,{tone:"muted",part:"limit-banner",state:"low",icon:s.jsx(uf,{"aria-hidden":"true"}),children:o("limit.remaining",{count:l,limit:d})})},$y=()=>{const{state:r,lang:a,t:o,dismissNotice:l}=Y(),{notice:d}=r;if(!d)return null;const p=d.kind==="error"?ms(a,d.reason):o(d.key);return s.jsx(gh,{part:"notice",onDismiss:l,dismissLabel:o("dismiss"),children:p})},Ks=({value:r,onChange:a,onSubmit:o,maxHeight:l=P1,className:d,onKeyDown:p,...f})=>{const g=x.useRef(null),m=x.useCallback(()=>{const v=g.current;v&&(v.style.height="auto",v.style.height=`${Math.min(v.scrollHeight,l)}px`,v.style.overflowY=v.scrollHeight>l?"auto":"hidden")},[l]);x.useLayoutEffect(m,[r,m]),x.useEffect(()=>{const v=g.current;if(!v||typeof ResizeObserver>"u")return;let S=v.clientWidth;const w=new ResizeObserver(()=>{v.clientWidth!==S&&(S=v.clientWidth,m())});return w.observe(v),()=>{w.disconnect()}},[m]);const b=v=>{p?.(v),!(v.defaultPrevented||!o)&&v.key==="Enter"&&!v.shiftKey&&!v.nativeEvent.isComposing&&(v.preventDefault(),o())};return s.jsx("textarea",{ref:g,rows:1,value:r,onChange:v=>{a(v.target.value)},onKeyDown:b,className:B("block w-full resize-none bg-transparent text-foreground outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-60",d),...f})},qy=({file:r,onRemove:a})=>{const{lang:o,t:l}=Y();return s.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:[s.jsx(Ds,{ext:Fs(r.name)}),s.jsxs("span",{className:"flex min-w-0 flex-col",children:[s.jsx("span",{className:"max-w-[420px] truncate text-[13px] font-medium leading-tight max-sm:max-w-[190px]",title:r.name,children:r.name}),s.jsx("span",{className:"text-2xs leading-tight text-muted-foreground",children:Os(r.size,o)})]}),s.jsx(ge,{variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":l("removeFile"),onClick:a,children:s.jsx(sa,{"aria-hidden":"true"})})]})},Uy=({children:r,text:a,id:o})=>s.jsxs("span",{className:"group/attach inline-flex",children:[r,s.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:a})]}),Vy=({message:r,onDismiss:a})=>{const{t:o}=Y();return r===null?null:s.jsx(gh,{part:"notice",dismissLabel:o("dismiss"),onDismiss:a,children:r})},By=.9,Wy=(r,a)=>r>a?"over":r===a?"limit":r>=a*By?"near":"hidden",mh=({count:r,max:a,id:o,part:l,className:d})=>{const{t:p}=Y(),f=Wy(r,a);return s.jsxs(s.Fragment,{children:[s.jsx("span",{id:o,part:l,className:B("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:a})}),s.jsx("span",{"aria-live":"polite",className:"sr-only",children:f==="limit"?p("counterLimit"):f==="over"?p("counterOver"):""})]})},Hy=()=>{const{state:r,t:a}=Y(),{config:o}=r;if(!o)return null;const l=o.modes.find(p=>p.slug===r.mode),d=o.modes.length===0?a("modes.none"):l&&ga(r.health[l.slug])==="unavailable"?a("modeUnavailable"):null;return d===null?null:s.jsx(Ko,{tone:"hint",part:"composer-hint",icon:s.jsx(Bo,{"aria-hidden":"true"}),children:d})},Qy=()=>Y().t("placeholder"),Ky=({placement:r="top"})=>{const{state:a,lang:o,t:l,selectMode:d}=Y(),p=a.config?.modes??[],f=p.find(g=>g.slug===a.mode);if(!f)return null;if(p.length<2){const g=ga(a.health[f.slug]),m=na(f.title,o)||f.slug,b=g==="unknown"?"":l(`health.${g}`),v=`${l("modeLabel")}: ${m}${b?`, ${b}`:""}`;return s.jsxs("div",{part:"mode-select",role:"group","aria-label":v,className:uh,children:[s.jsx(Bs,{name:f.icon}),s.jsx("span",{className:"min-w-0 truncate",children:m}),s.jsx(Ws,{level:g,lang:o})]})}return s.jsx(fh,{variant:"pill",placement:r,modes:p,health:a.health,value:a.mode,onChange:d,lang:o,label:l("modeLabel")})},bh="{name}",Xy=(r,a)=>{const[o="",l=""]=r.split(bh);return s.jsxs(s.Fragment,{children:[o,a,l]})},xh=x.forwardRef(({onDraftChange:r},a)=>{const{state:o,lang:l,path:d,t:p,send:f,stop:g}=Y(),m=Qy(),[b,v]=x.useState(""),S=x.useRef(null),w=x.useId(),C=x.useRef(!1),_=x.useId();x.useImperativeHandle(a,()=>({setText:V=>{v(V),setTimeout(()=>S.current?.querySelector("textarea")?.focus(),0)}}));const E=b.trim()!=="";x.useEffect(()=>{r?.(E)},[E,r]);const[R,$]=x.useState(null),[X,ae]=x.useState(null),G=x.useRef(null),{config:D,turn:te,limit:Z}=o,re=D?.modes.find(V=>V.slug===o.mode),be=D?.max_query_chars??Tp,Q=re?ga(o.health[re.slug])==="unavailable":!1,fe=!!(D?.site.allow_files&&re?.allow_files),W=te!==null,H=te?.stopping===!0,me=!D||Z.blocked||o.loadingThread!==null,Ce=b.trim(),xe=b.length>be,ye=!me&&!W&&!Q&&!!re&&Ce.length>0&&!xe;x.useEffect(()=>{if(W)return;const V=S.current?.getRootNode(),le=V instanceof ShadowRoot||V instanceof Document?V.activeElement:null,de=le===null||le===document.body;(C.current||de)&&S.current?.querySelector("textarea")?.focus({preventScroll:!0}),C.current=!1},[W]);const q=()=>{if(!ye||!re)return;const V=Ce,le=R,de=vx(d,V,new Date);v(""),$(null),f({query:V,mode:re.slug,...le?{file:le}:{},...de?{clarification:de}:{}}).then(je=>{je==="rejected"&&(v(ke=>ke||V),$(ke=>ke??le))})},P=V=>{if(ae(null),!(!V||!re)){if(!Mf.split(",").includes(`.${Fs(V.name)}`)){ae(p("fileType",{name:V.name}));return}if(V.size>re.max_file_mb*1024*1024){ae(p("fileTooLarge",{name:V.name,size:re.max_file_mb}));return}$(V)}},T=D?.answer_source,k=T?.[l]??T?.ru??Object.values(T??{})[0],L=fn(k?.url),ie=L?s.jsxs("a",{href:L,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-primary-text hover:underline",children:[k?.name,s.jsx(Ss,{className:"size-3","aria-hidden":"true"})]}):k?.name;return s.jsxs("div",{part:"composer",className:"flex w-full shrink-0 flex-col",children:[s.jsx(Hy,{}),s.jsx(Vy,{message:X,onDismiss:()=>{ae(null)}}),s.jsxs("div",{ref:S,className:B("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",xe&&"border-destructive focus-within:border-destructive",me&&"bg-muted"),children:[R?s.jsx(qy,{file:R,onRemove:()=>{$(null)}}):null,s.jsx(Ks,{part:"input","data-autofocus":!0,value:b,onChange:v,onSubmit:q,disabled:me,placeholder:m,"aria-label":p("inputLabel"),"aria-invalid":xe||void 0,"aria-describedby":w,className:"block min-h-6 w-full pr-1.5 text-lg leading-6 disabled:text-muted-foreground disabled:opacity-100"}),s.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[s.jsx(Ky,{placement:"top"}),fe?s.jsxs(s.Fragment,{children:[s.jsx(Uy,{id:_,text:R?p("attachOne"):p("attachHint",{size:re?.max_file_mb??0}),children:s.jsx(ge,{part:"attach",variant:"ghost",size:"icon",className:"size-8 rounded-full text-muted-foreground","aria-label":p(R?"attachOne":"attach"),"aria-describedby":_,disabled:me||W||R!==null,onClick:()=>G.current?.click(),children:s.jsx(_v,{"aria-hidden":"true"})})}),s.jsx("input",{ref:G,type:"file",hidden:!0,accept:Mf,onChange:V=>{P(V.target.files?.[0]),V.target.value=""}})]}):null,s.jsx("span",{className:"flex-1"}),s.jsx(mh,{id:w,part:"counter",count:b.length,max:be}),W?s.jsx(ge,{part:"stop",size:"icon",className:"size-9 rounded-full aria-disabled:pointer-events-none aria-disabled:opacity-50","aria-label":p(H?"agent.stopping":"stop"),title:p(H?"agent.stopping":"stop"),"aria-disabled":H||void 0,onFocus:()=>{C.current=!0},onBlur:V=>{V.relatedTarget&&(C.current=!1)},onClick:()=>{H||g()},children:s.jsx(yf,{className:"size-3.5 fill-current","aria-hidden":"true"})}):s.jsx(ge,{part:"send",size:"icon",className:"size-9 rounded-full","aria-label":p("send"),title:p("send"),disabled:!ye,onClick:q,children:s.jsx(lf,{"aria-hidden":"true"})})]})]}),s.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:[s.jsx("p",{part:"disclaimer",className:"text-2xs",children:p("disclaimer")}),k?.name?s.jsx("p",{part:"source",className:"text-2xs",children:Xy(p("source",{name:bh}),ie)}):null]})]})});xh.displayName="Composer";const Gy=({composerRef:r,onDraftChange:a})=>{const{state:o}=Y();return s.jsxs("div",{className:"mx-auto w-full max-w-[844px] shrink-0 px-3 pb-2.5",children:[s.jsx(Oy,{}),s.jsx($y,{}),o.config&&!o.configError?s.jsx(xh,{ref:r,onDraftChange:a}):null]})},vh={receipt:Lv,landmark:dv,map:hv,"trending-up":Zv,scale:Fv,users:Jv,"file-chart":tv,"alert-triangle":Bo},Zy=({name:r})=>{const a=(Object.hasOwn(vh,r)?vh[r]:void 0)??js;return s.jsx(a,{className:"size-4 shrink-0 text-primary","aria-hidden":"true"})},Yy=4,Jy=6,ew=10,yh=(r,a)=>r?.[a]??r?.ru??Object.values(r??{})[0],Xs=({children:r,id:a})=>s.jsx("h2",{id:a,className:"m-0 px-0.5 text-2xs font-semibold text-muted-foreground",children:r}),Gs=({example:r,onPick:a,sub:o})=>s.jsx("li",{className:"min-w-0",children:s.jsxs("button",{part:"example",type:"button",title:r.title,onClick:()=>{a(r.prompt)},className:B("flex w-full items-center gap-2.5 rounded-lg border bg-background px-3 py-2 text-left leading-snug text-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",o?"min-h-9 border-dashed text-[13px]":"min-h-10 text-sm"),children:[s.jsx("span",{className:"min-w-0 flex-1",children:r.prompt}),s.jsx(Lx,{className:"text-muted-foreground","aria-hidden":"true"})]})}),Zs=r=>`${r.title}-${r.prompt}`,tw=({onPick:r})=>{const{state:a,lang:o,t:l}=Y(),d=x.useId(),[p,f]=x.useState(null),g=yh(a.config?.prompt_examples,o)??[],m=(yh(a.config?.prompt_categories,o)??[]).filter(S=>g.some(w=>w.category===S.key));if(g.length===0)return null;if(m.length===0)return s.jsxs("section",{className:"flex flex-col gap-1.5",children:[s.jsx(Xs,{children:l("examples")}),s.jsx("ul",{"aria-label":l("examples"),className:"m-0 flex w-full list-none flex-col gap-1.5 p-0",children:g.slice(0,Yy).map(S=>s.jsx(Gs,{example:S,onPick:r,sub:!1},Zs(S)))})]});const b=m.find(S=>S.key===p),v=b?g.filter(S=>S.category===b.key).slice(0,ew):[];return s.jsxs("div",{className:"flex flex-col gap-5",children:[s.jsxs("section",{className:"flex flex-col gap-1.5",children:[s.jsx(Xs,{id:d,children:l("examples.whatCanDo")}),s.jsx("div",{role:"group","aria-labelledby":d,className:"flex flex-col gap-1.5",children:m.map(S=>{const w=S.key===b?.key,C=w?dn:Vo;return s.jsxs(x.Fragment,{children:[s.jsxs("button",{part:"category",type:"button","aria-expanded":w,onClick:()=>{f(w?null:S.key)},className:B("flex min-h-11 w-full items-center gap-2.5 rounded-lg border bg-background px-2.5 py-1.5 text-left text-sm font-medium text-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",w&&"border-primary"),children:[s.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-lg bg-secondary",children:s.jsx(Zy,{name:S.icon})}),s.jsx("span",{className:"min-w-0 flex-1 truncate",children:S.title}),s.jsx(C,{className:"text-muted-foreground","aria-hidden":"true"})]}),w&&v.length>0?s.jsx("ul",{"aria-label":S.title,className:"m-0 flex w-full list-none flex-col gap-1.5 pb-1.5 pl-[18px] pt-0.5",children:v.map(_=>s.jsx(Gs,{example:_,onPick:r,sub:!0},Zs(_)))}):null]},S.key)})})]}),b?null:s.jsxs("section",{className:"flex flex-col gap-1.5",children:[s.jsx(Xs,{children:l("examples")}),s.jsx("ul",{"aria-label":l("examples"),className:"m-0 flex w-full list-none flex-col gap-1.5 p-0",children:g.slice(0,Jy).map(S=>s.jsx(Gs,{example:S,onPick:r,sub:!1},Zs(S)))})]})]})},rw=({listening:r,wide:a,onPick:o})=>{const{state:l,lang:d,t:p}=Y(),f=na(l.config?.site.welcome,d),g=f?f.split(`
18
+ `).filter(m=>m.trim()!==""):[];return s.jsxs("div",{part:"empty",className:B("mx-auto flex w-full max-w-[640px] flex-col gap-5 px-4 pb-3",a?"pt-14":"pt-7"),children:[s.jsxs("div",{className:"flex flex-col items-center gap-2.5 text-center",children:[s.jsx("div",{part:"avatar",children:s.jsx(Oo,{size:56,mood:r?"listen":"calm"})}),g.length>0?s.jsx("div",{part:"welcome",className:"flex max-w-[340px] flex-col gap-1 text-[15px] leading-normal",children:g.map((m,b)=>s.jsx("p",{className:B(b===0&&"text-xl font-semibold"),children:m},`${b}-${m}`))}):s.jsx("h2",{className:"m-0 text-2xl font-semibold tracking-tight",children:p("greeting")})]}),s.jsx(tw,{onPick:o})]})},wh=()=>{const{t:r}=Y();return a=>{const o=`steps.${a.node}`;return r(A0(o)?o:"steps.unknown")}},kh=({step:r,position:a})=>{const{t:o}=Y(),l=wh();return s.jsxs(s.Fragment,{children:[l(r),a!=null&&r.total!=null?s.jsxs("span",{className:"text-muted-foreground/70",children:[" \xB7 ",o("steps.counter",{done:a,total:r.total})]}):null,r.attempt>1?s.jsxs("span",{className:"text-muted-foreground/70",children:[" \xB7 ",o("agent.attempt",{count:r.attempt})]}):null]})},Sh=()=>s.jsx(Lr,{className:"size-3 shrink-0 animate-spin text-primary motion-reduce:animate-none","aria-hidden":"true","data-testid":"step-spinner"}),nw=({steps:r,status:a,stopping:o})=>{const{t:l}=Y(),d=r.find(p=>p.status==="running");return a==="streaming"?s.jsxs(s.Fragment,{children:[s.jsx(Sh,{}),s.jsx("span",{className:"min-w-0 truncate font-medium text-foreground",children:o?l("agent.stopping"):d?s.jsx(kh,{step:d,position:r.indexOf(d)+1}):l("agent.thinking")})]}):a==="stopped"?s.jsxs(s.Fragment,{children:[s.jsx(yf,{className:"size-3.5 shrink-0","aria-hidden":"true"}),s.jsx("span",{className:"min-w-0 truncate font-medium text-foreground",children:l("agent.stopped")})]}):a==="error"?s.jsxs(s.Fragment,{children:[s.jsx(cf,{className:"size-3.5 shrink-0 text-destructive","aria-hidden":"true"}),s.jsx("span",{className:"min-w-0 truncate font-medium text-foreground",children:l("agent.interrupted")})]}):s.jsxs(s.Fragment,{children:[s.jsx(Rr,{className:"size-3.5 shrink-0 text-mode-idle","aria-hidden":"true"}),s.jsx("span",{className:"min-w-0 truncate font-medium text-foreground",children:l("agent.done")})]})},aw=({steps:r,status:a,stopping:o})=>{const{t:l}=Y(),d=wh();if(a==="streaming"){if(o)return l("agent.stopping");const p=r.find(f=>f.status==="running");return p?d(p):l("agent.thinking")}return l(a==="stopped"?"agent.stopped":a==="error"?"agent.interrupted":"agent.done")},jh="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",ow=x.memo(function(r){const{t:a}=Y(),[o,l]=x.useState(!1),{steps:d,status:p}=r,f=p==="streaming",g=aw(r),m=s.jsx(s.Fragment,{children:s.jsx(nw,{...r})});return s.jsxs("div",{part:"steps",className:"flex flex-col gap-2 text-[13px] text-muted-foreground",children:[d.length>0?s.jsxs("button",{type:"button","aria-expanded":o,"aria-label":`${a(o?"agent.hideSteps":"agent.showSteps")}: ${g}`,onClick:()=>{l(!o)},className:B(jh,"hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",f&&"border-primary-35"),children:[m,o?s.jsx(dn,{className:"size-3.5 shrink-0 rotate-180","aria-hidden":"true"}):s.jsx(dn,{className:"size-3.5 shrink-0","aria-hidden":"true"})]}):s.jsx("div",{className:B(jh,f&&"border-primary-35"),role:"status",children:m}),o&&d.length>0?s.jsx("ol",{"aria-label":a("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((b,v)=>{const S=b.status==="running",w=S&&!f;return s.jsxs("li",{className:"flex min-h-[34px] items-center gap-2.5 border-b border-dashed last:border-b-0",children:[s.jsx("span",{className:"flex w-[18px] shrink-0 justify-center",children:S&&f?s.jsx(Sh,{}):w?s.jsx(cf,{className:"size-3.5","aria-hidden":"true"}):s.jsx(Rr,{className:"size-3.5 text-mode-idle","aria-hidden":"true"})}),s.jsx("span",{className:B("min-w-0 flex-1 truncate",w?"text-muted-foreground":"text-foreground"),children:s.jsx(kh,{step:b})}),w?s.jsx("span",{className:"shrink-0 whitespace-nowrap",children:a("agent.unfinished")}):null]},b.id??`${b.node}-${v}`)})}):null]})}),iw=(r,a)=>{const o=(r.split(/[?#]/)[0]??"").split("/").filter(Boolean).pop();if(!o||/^[0-9a-f-]{36}$/i.test(o))return a;try{return decodeURIComponent(o)}catch{return o}},lw=r=>{try{return new URL(r,window.location.href).host}catch{return null}},Nh=({url:r,name:a,className:o,children:l})=>{const{api:d}=Y(),[p,f]=x.useState(!1);if(To(r,d.apiUrl)===null){const g=fn(r);return g?s.jsx("a",{href:g,target:"_blank",rel:"noopener noreferrer",className:o,children:l}):s.jsx("span",{className:o,children:l})}return s.jsx("button",{type:"button",part:"attachment",className:B(o,p&&"opacity-70"),disabled:p,onClick:()=>{f(!0),d.attachment(r).then(g=>{D1(g,a)}).catch(()=>{}).finally(()=>{f(!1)})},children:l})},Ch=({attachment:r})=>{const{api:a,lang:o,t:l}=Y(),d=Rf(r.name||iw(r.url,"file")),p=r.url&&To(r.url,a.apiUrl)===null?lw(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",g=s.jsxs(s.Fragment,{children:[s.jsx(Ds,{ext:Fs(d)}),s.jsxs("span",{className:"flex min-w-0 flex-col",children:[s.jsx("span",{className:"truncate text-[13px] font-medium leading-tight",children:d}),s.jsxs("span",{className:"flex items-center gap-1.5 text-2xs leading-tight text-muted-foreground",children:[p??(r.size?Os(r.size,o):null),r.url?null:s.jsxs(s.Fragment,{children:[r.size?s.jsx("span",{"aria-hidden":"true",children:"\xB7"}):null,s.jsx("span",{children:l("attachment.sending")}),s.jsx(Lr,{className:"size-3 animate-spin motion-reduce:animate-none","aria-hidden":"true"})]})]})]}),r.url&&p?s.jsx(Ss,{className:"mr-1 size-4 shrink-0 text-muted-foreground","aria-hidden":"true"}):r.url?s.jsx(df,{className:"mr-1 size-4 shrink-0 text-muted-foreground","aria-hidden":"true"}):null]});return r.url?s.jsxs(Nh,{url:r.url,name:d,className:B(f,"transition-colors hover:bg-accent"),children:[p?null:s.jsxs("span",{className:"sr-only",children:[l("download"),": "]}),g]}):s.jsx("span",{className:f,children:g})},sw=({url:r,alt:a})=>{const{api:o}=Y(),[l,d]=x.useState(null),[p,f]=x.useState(!1);return x.useEffect(()=>{let g=null,m=!1;return o.attachment(r).then(b=>{m?URL.revokeObjectURL(b):(g=b,d(b))},()=>{m||f(!0)}),()=>{m=!0,g&&URL.revokeObjectURL(g)}},[o,r]),p?s.jsx("span",{className:"text-muted-foreground",children:a||r}):l?s.jsx("img",{src:l,alt:a,className:"max-w-full rounded-lg"}):s.jsx(Lr,{className:"size-4 animate-spin text-muted-foreground","aria-label":a})},cw=8,Ys=({children:r})=>s.jsx("div",{className:"text-2xs text-muted-foreground",children:r}),dw=({block:r,onAsk:a})=>{const{lang:o,t:l}=Y(),d=Array.isArray(r.sections)?r.sections:[],p=(Array.isArray(r.indicators)?r.indicators:[]).slice(0,cw),f=Math.max(0,r.total-p.length),g=Array.isArray(r.examples)?r.examples.filter(m=>typeof m=="string"&&m):[];return s.jsxs("section",{part:"catalog",className:"flex min-w-0 flex-col rounded-xl border bg-card",children:[r.topic?s.jsxs("h3",{className:"m-0 flex items-center gap-2 border-b px-3.5 py-2.5 text-sm font-semibold",children:[s.jsx(Uo,{className:"shrink-0 text-muted-foreground","aria-hidden":"true"}),l("blocks.catalogTitle",{topic:r.topic})]}):null,s.jsxs("div",{className:"flex flex-col gap-2.5 px-3.5 py-3",children:[d.length>0?s.jsxs("div",{children:[s.jsx(Ys,{children:l("blocks.catalogSections")}),s.jsx("ul",{className:"m-0 list-none p-0",children:d.map(m=>s.jsxs("li",{className:"flex items-center gap-2 border-b py-[7px] text-[13px] last:border-b-0",children:[s.jsx(Vo,{className:"shrink-0 text-muted-foreground","aria-hidden":"true"}),s.jsx("span",{className:"min-w-0 flex-1 leading-snug",children:m.path.join(" \u203A ")}),s.jsx("span",{className:"whitespace-nowrap tabular-nums text-muted-foreground",children:_t(m.count,o)})]},m.id))})]}):null,p.length>0?s.jsxs("div",{children:[s.jsx(Ys,{children:l("blocks.catalogIndicators")}),s.jsx("ul",{className:"m-0 list-none p-0",children:p.map(m=>s.jsxs("li",{className:"flex flex-col border-b py-1.5 last:border-b-0",children:[s.jsx("span",{className:"text-[13px] font-medium leading-snug",children:m.name}),m.unit||m.years?s.jsx("span",{className:"text-2xs text-muted-foreground",children:[vs(m.unit),vs(m.years)].filter(Boolean).join(" \xB7 ")}):null]},m.entity_id))}),f>0?s.jsx("p",{className:"m-0 pt-1 text-[13px] text-muted-foreground",children:l("blocks.catalogMore",{count:_t(f,o)})}):null]}):null,g.length>0?s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(Ys,{children:l("blocks.catalogExamples")}),g.map(m=>s.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:()=>{a(m)},children:[s.jsx(bv,{className:"shrink-0 text-primary","aria-hidden":"true"}),s.jsx("span",{className:"min-w-0 flex-1",children:m})]},m)),s.jsx("div",{className:"text-2xs text-muted-foreground",children:l("blocks.catalogSendHint")})]}):null]})]})},Xo=({rootRef:r,question:a,tone:o,children:l})=>{const{t:d}=Y();return s.jsxs("section",{part:"clarification",ref:r,role:"group","aria-label":d("blocks.clarification"),"data-state":o,className:B("overflow-hidden rounded-[14px] border",o==="open"&&"border-primary-30 bg-card",o==="done"&&"bg-card",o==="expired"&&"bg-muted"),children:[s.jsx("div",{className:"flex items-center gap-2 px-3.5 pb-1 pt-3",children:s.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:[s.jsx(hf,{className:"size-3","aria-hidden":"true"}),d("blocks.clarification")]})}),s.jsx("p",{className:"m-0 px-3.5 pb-2.5 text-[15px] font-medium leading-snug",children:a}),l]})},Eh=({children:r})=>s.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}),Js=({children:r})=>s.jsx("div",{className:"flex items-center gap-2 border-t px-3.5 py-2.5 text-[13px] text-muted-foreground",children:r}),uw=2**31-1,pw=(r,a)=>{const[o,l]=x.useState(()=>new Date);return x.useEffect(()=>{if(!a)return;const d=Date.parse(r)-Date.now();if(!(d>0))return;const p=window.setTimeout(()=>{l(new Date)},Math.min(d+50,uw));return()=>{window.clearTimeout(p)}},[r,a]),o},fw=({block:r,isLastInBranch:a,question:o,reply:l,disabled:d,onAsk:p})=>{const{t:f}=Y(),g=x.useRef(null),m=pw(r.expires_at,a),b=vp(r,{isLastInBranch:a,now:m}),[v,S]=x.useState(""),w=x.useRef(!1),[C,_]=x.useState(!1),E=r.options,R=d||C,$=(H,me=H.label)=>{if(w.current||d)return;w.current=!0,_(!0);const Ce=p(me,{clarification_id:r.id,slot:r.slot,value:H.value,free_text:null});Promise.resolve(Ce).then(xe=>{xe===!1&&(w.current=!1,_(!1))})},X=x.useRef($);x.useEffect(()=>{X.current=$});const ae=r.type==="plan_confirm",G=E.find(H=>H.value===r.default)??E[0],D=E.find(H=>H!==G),te=ae?[...G?[{option:G,text:f("blocks.continue")}]:[],...D?[{option:D,text:f("blocks.cancelPlan")}]:[]]:E.slice(0,gx).map(H=>({option:H,text:H.label})),Z=x.useRef(te);x.useEffect(()=>{Z.current=te});const re=b==="open"&&!R,be=te.length;x.useEffect(()=>{if(!re||be===0)return;const H=g.current?.getRootNode();if(!H)return;const me=Ce=>{const xe=Ce;if(xe.defaultPrevented||xe.ctrlKey||xe.metaKey||xe.altKey||xe.repeat||yx(xe.composedPath()[0]))return;const ye=Number(xe.key),q=Number.isInteger(ye)&&ye>=1?Z.current[ye-1]:void 0;q&&(xe.preventDefault(),X.current(q.option,q.text))};return H.addEventListener("keydown",me),()=>{H.removeEventListener("keydown",me)}},[re,be]);const Q=b==="answered"&&o!==""&&l===o;if(b==="answered"&&!Q)return s.jsx(Xo,{rootRef:g,question:r.question,tone:"done",children:l?s.jsxs(Js,{children:[s.jsx(Rr,{className:"shrink-0","aria-hidden":"true"}),s.jsx("span",{className:"min-w-0 flex-1",children:f("blocks.chosen",{label:l})})]}):null});if(b==="expired"||Q)return s.jsx(Xo,{rootRef:g,question:r.question,tone:"expired",children:s.jsxs(Js,{children:[s.jsx(ws,{className:"shrink-0","aria-hidden":"true"}),s.jsx("span",{className:"min-w-0 flex-1",children:f("blocks.expired")}),o&&!Q?s.jsxs(ge,{variant:"input",size:"sm",className:"gap-1.5",disabled:d,onClick:()=>{p(o)},children:[s.jsx(vf,{"aria-hidden":"true"}),f("blocks.askAgain")]}):null]})});if(ae){const[H,me]=te;return s.jsx(Xo,{rootRef:g,question:r.question,tone:"open",children:s.jsxs("div",{className:"flex flex-wrap gap-2 px-2.5 pb-2.5",children:[H?s.jsxs(ge,{size:"sm",disabled:R,onClick:()=>{$(H.option,H.text)},children:[s.jsx(Eh,{children:"1"}),H.text]}):null,me?s.jsxs(ge,{variant:"input",size:"sm",disabled:R,onClick:()=>{$(me.option,me.text)},children:[s.jsx(Eh,{children:"2"}),me.text]}):null]})})}const fe=E.length>=hx,W=fe?vb(E,v):E;return s.jsxs(Xo,{rootRef:g,question:r.question,tone:"open",children:[s.jsxs("div",{className:"flex flex-col gap-1.5 px-2.5 pb-2.5",children:[fe?s.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:[s.jsx(la,{className:"shrink-0 text-muted-foreground","aria-hidden":"true"}),s.jsx("input",{type:"search",value:v,placeholder:f("blocks.findOption"),"aria-label":f("blocks.findOption"),className:"min-w-0 flex-1 bg-transparent outline-none placeholder:text-muted-foreground",onChange:H=>{S(H.target.value)}})]}):null,W.length>0?s.jsx("ul",{"aria-label":f("blocks.options"),className:"m-0 flex list-none flex-col gap-1.5 p-0",children:W.map(H=>{const me=E.indexOf(H)+1;return s.jsx("li",{children:s.jsxs("button",{type:"button",disabled:R,className:B("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:()=>{$(H)},children:[s.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}),s.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[s.jsxs("span",{className:"text-sm font-medium leading-snug",children:[H.label,H.value===r.default?s.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]}),H.hint?s.jsx("span",{className:"text-[13px] leading-snug text-muted-foreground",children:H.hint}):null]})]})},H.value)})}):s.jsx("p",{className:"px-1 py-2 text-sm text-muted-foreground",children:f("searchEmpty")})]}),r.allow_free_text?s.jsxs(Js,{children:[s.jsx(hf,{className:"shrink-0","aria-hidden":"true"}),s.jsx("span",{className:"min-w-0 flex-1",children:f("blocks.freeTextHint")})]}):null]})},hw=10,gw=({section:r})=>{const{t:a}=Y(),o=r.latest_period,l=r.shape==="trend",d=l?[]:pa(r,{period:o,mode:"value",base:"median"}),p=d.slice(0,hw);return s.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:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"text-sm font-semibold leading-snug",children:r.title}),l?null:s.jsxs("p",{className:"text-2xs text-muted-foreground",children:[o,", ",r.unit.label]})]}),s.jsx(Gf,{compact:!0,section:r,period:o,label:a("chart.label",{title:r.title,period:o}),rows:p,national:Xf(r,o,p.map(f=>f.value))}),d.length>p.length?s.jsx("p",{className:"text-2xs text-muted-foreground",children:a("chart.top",{n:p.length,total:d.length})}):null]})},Go=r=>r.type==="number"||r.type==="integer",mw=(r,a,o)=>Go(r)?_t(wx(a),o,r.type==="integer"?0:void 0):vs(a)||"\u2014",bw={asc:lf,desc:of},xw=({block:r})=>{const{lang:a,t:o}=Y(),[l,d]=x.useState(),[p,f]=x.useState("asc"),[g,m]=x.useState(1),[b,v]=x.useState(""),S=Array.isArray(r.columns)?r.columns:[],w=mb({...r,columns:S,data:Array.isArray(r.data)?r.data:[]},{...l?{sortKey:l,dir:p}:{},page:g,query:b}),C=S.some(E=>E.type==="string"),_=E=>{E===l?f(R=>R==="asc"?"desc":"asc"):(d(E),f("asc")),m(1)};return s.jsxs("div",{part:"data-table",className:"flex min-w-0 flex-col gap-2",children:[C?s.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:[s.jsx(la,{className:"shrink-0 text-muted-foreground","aria-hidden":"true"}),s.jsx("input",{type:"search",value:b,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=>{v(E.target.value),m(1)}})]}):null,s.jsxs("div",{className:"max-w-full overflow-x-auto overscroll-x-contain rounded-[10px] border bg-background",children:[s.jsxs("table",{className:"w-full border-collapse text-[13.5px]","aria-label":o("blocks.table"),children:[s.jsx("thead",{children:s.jsx("tr",{className:"border-b bg-muted",children:S.map(E=>{const R=E.key===l,$=R?bw[p]:Tx;return s.jsx("th",{scope:"col","aria-sort":R?p==="asc"?"ascending":"descending":"none",className:B("p-0 font-semibold",Go(E)?"text-right":"text-left"),children:s.jsxs("button",{type:"button",className:B("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",Go(E)&&"flex-row-reverse"),onClick:()=>{_(E.key)},children:[s.jsx("span",{children:E.title}),E.unit?s.jsxs("span",{className:"font-normal",children:[", ",E.unit]}):null,s.jsx($,{className:B("shrink-0 text-muted-foreground",!R&&"opacity-50"),"aria-hidden":"true"})]})},E.key)})})}),s.jsx("tbody",{children:w.rows.map((E,R)=>s.jsx("tr",{className:"border-b last:border-b-0",children:S.map($=>s.jsx("td",{className:B("px-3 py-[7px] align-top",Go($)?"whitespace-nowrap text-right tabular-nums":"min-w-32"),children:mw($,E[$.key],a)},$.key))},w.from+R))})]}),w.total===0?s.jsx("p",{className:"px-3 py-3 text-center text-sm text-muted-foreground",children:o(b?"searchEmpty":"blocks.tableEmpty")}):null]}),w.pages>1?s.jsxs("div",{className:"flex items-center justify-end gap-1 text-2xs tabular-nums text-muted-foreground",children:[s.jsx(ge,{variant:"ghost",size:"icon",className:"size-7",disabled:w.page<=1,"aria-label":o("blocks.prevPage"),onClick:()=>{m(w.page-1)},children:s.jsx(sf,{"aria-hidden":"true"})}),s.jsx("span",{"aria-live":"polite",children:o("blocks.page",{a:w.page,b:w.pages})}),s.jsx(ge,{variant:"ghost",size:"icon",className:"size-7",disabled:w.page>=w.pages,"aria-label":o("blocks.nextPage"),onClick:()=>{m(w.page+1)},children:s.jsx(Vo,{"aria-hidden":"true"})})]}):null,r.truncated?s.jsx("p",{className:"text-2xs text-muted-foreground",children:o("blocks.truncated",{n:Array.isArray(r.data)?r.data.length:0})}):null]})},ec="inline-flex min-h-[30px] max-w-full items-center gap-1.5 rounded-lg bg-muted px-2.5 py-1 text-[13px]",vw=["sex","age","urban_rural","activity","item"],yw=r=>vw.includes(r),tc=({label:r,children:a,title:o})=>s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"shrink-0 whitespace-nowrap text-muted-foreground",children:r}),s.jsx("span",{className:"min-w-0 truncate font-medium",title:o,children:a})]}),rc=({label:r,children:a,className:o})=>s.jsx("li",{className:B(ec,o),title:r,children:s.jsx(tc,{label:r,children:a})}),ww=({block:r,question:a,onAsk:o})=>{const{t:l}=Y(),[d,p]=x.useState(!1),f=x.useId(),g=r.indicators.map(S=>S.name).join(", "),m=r.territories.map(S=>S.name).join(", "),b=r.breakdown&&yw(r.breakdown)?l(`blocks.breakdown.${r.breakdown}`):"",v=r.alternatives.length>0&&a!=="";return s.jsxs("div",{part:"plan",role:"group","aria-label":l("blocks.passport"),className:"flex flex-col gap-1.5",children:[s.jsx("div",{className:"text-2xs text-muted-foreground",children:l("blocks.passport")}),s.jsxs("ul",{"aria-label":l("blocks.passport"),className:"m-0 flex list-none flex-wrap items-center gap-1.5 p-0",children:[g?v?s.jsxs("li",{className:"relative max-w-full",children:[s.jsxs("button",{type:"button",className:B(ec,"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:g,"aria-haspopup":"menu","aria-expanded":d,"aria-controls":f,onClick:()=>{p(S=>!S)},children:[s.jsx(tc,{label:l("blocks.indicator"),children:g}),s.jsx(dn,{className:B("shrink-0 text-muted-foreground transition-transform motion-reduce:transition-none",d&&"rotate-180"),"aria-hidden":"true"})]}),d?s.jsxs("div",{id:f,role:"menu","aria-label":l("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:[s.jsx("div",{className:"px-2.5 pb-1 pt-1.5 text-2xs text-muted-foreground",children:l("blocks.alternatives")}),r.alternatives.map(S=>s.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(`${a} \u2014 ${S.name}`)},children:S.name},S.id))]}):null]}):s.jsx(rc,{label:l("blocks.indicator"),children:g}):null,m?s.jsx(rc,{label:l("blocks.territory"),children:m}):null,r.period.label?s.jsxs("li",{className:B(ec,r.period.substituted&&"border border-warning/40"),title:r.period.reason??l("blocks.period"),children:[s.jsx(tc,{label:l("blocks.period"),children:r.period.label}),r.period.substituted?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"\xB7"}),s.jsx("span",{className:"text-warn-text",children:l("blocks.substituted")})]}):null]}):null,b?s.jsx(rc,{label:l("blocks.breakdown"),children:b}):null]})]})},_h="gap-1.5 text-[13px]",zh="gap-1.5 text-[13px] text-muted-foreground hover:text-foreground",kw=({text:r})=>{const{t:a}=Y(),[o,l]=x.useState(!1),d=x.useRef(void 0);return x.useEffect(()=>()=>{window.clearTimeout(d.current)},[]),s.jsxs(ge,{part:"copy",variant:"ghost",size:"sm",className:zh,onClick:()=>{Ms(r).then(p=>{p&&(l(!0),window.clearTimeout(d.current),d.current=window.setTimeout(()=>{l(!1)},2e3))})},children:[o?s.jsx(Rr,{"aria-hidden":"true"}):s.jsx(ks,{"aria-hidden":"true"}),a(o?"copied":"copy")]})},Sw=({message:r,isLastInBranch:a,onAsk:o,children:l,dashboardOpen:d=!1,onToggleDashboard:p})=>{const{path:f,t:g}=Y(),[m,b]=x.useState(!1),{blocks:v}=r,S=Bt(v,"plan"),w=Bt(v,"table"),C=Bt(v,"catalog"),_=Bt(v,"clarification"),{question:E,reply:R}=bx(f,r.id),$=r.status==="streaming",X=S?.methodology?fn(S.methodology.url):null,ae=v.length>0&&!$?xb(r):"",G=!$&&r.status!=="error"&&Io(r.id),D=Bt(v,"dashboard"),te=D?.sections[0],Z=G&&D!==void 0,re=Z?p:void 0,be=tf(v),Q=$?[]:mx(v);return s.jsxs(s.Fragment,{children:[S?s.jsx(ww,{block:S,question:E,onAsk:o}):null,l,C?s.jsx(dw,{block:C,onAsk:o}):null,_?s.jsx(fw,{block:_,isLastInBranch:a,question:E,reply:R,disabled:$,onAsk:o}):null,te?s.jsx(gw,{section:te}):null,w&&m?s.jsx(xw,{block:w}):null,Q.length>0?s.jsx(nh,{files:Q}):null,G?s.jsx(ah,{messageId:r.id,block:be}):null,v.length>0&&!$?s.jsxs("div",{part:"answer-actions",role:"group",className:"flex flex-wrap items-center gap-1.5",children:[w?s.jsxs(ge,{part:"data-toggle",variant:"input",size:"sm",className:_h,"aria-expanded":m,onClick:()=>{b(fe=>!fe)},children:[s.jsx(Hv,{"aria-hidden":"true"}),g(m?"blocks.hideData":"blocks.data")]}):null,re?s.jsxs(ge,{part:"dashboard-toggle","data-message-id":r.id,variant:"input",size:"sm",className:B(_h,d&&"border-primary bg-secondary text-secondary-foreground"),"aria-expanded":d,onClick:()=>{re(r.id)},children:[s.jsx(qx,{"aria-hidden":"true"}),g(d?"blocks.hideDashboard":"blocks.dashboard")]}):null,Z?s.jsx(Yf,{messageId:r.id,block:be}):null,S?.methodology&&X?s.jsx(ge,{part:"methodology",variant:"ghost",size:"sm",className:zh,asChild:!0,children:s.jsxs("a",{href:X,target:"_blank",rel:"noopener noreferrer",title:S.methodology.title,children:[s.jsx(Uo,{"aria-hidden":"true"}),g("blocks.methodology")]})}):null,ae?s.jsx(kw,{text:ae}):null]}):null]})},jw=5e4,Mh=2e5,Nw=x.lazy(()=>import("./markdown-impl-DeMW_FqG.js").then(r=>({default:r.MarkdownImpl}))),Cw=x.memo(function({children:r,streaming:a=!1,className:o}){const l=s.jsx("span",{className:"whitespace-pre-wrap",children:r.length>Mh?`${r.slice(0,Mh)}\u2026`:r});return s.jsxs("div",{part:"markdown",className:B("min-w-0 break-words text-[15px] leading-[1.65] text-foreground",o),children:[r.length>jw?l:s.jsx(us,{fallback:l,children:s.jsx(x.Suspense,{fallback:l,children:s.jsx(Nw,{children:r})})}),a?s.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]})}),ma="size-7 shrink-0 text-muted-foreground hover:text-foreground",Rh=({messageId:r,disabled:a})=>{const{index:o,switchBranch:l,t:d}=Y(),{list:p,position:f}=n0(o,r);if(p.length<2||f<0)return null;const g=p[f-1],m=p[f+1];return s.jsxs("div",{part:"branch",className:"flex items-center text-[13px] tabular-nums text-muted-foreground",role:"group","aria-label":d("branch.label"),children:[s.jsx(ge,{variant:"ghost",size:"icon",className:ma,disabled:a||!g,"aria-label":d("branch.prev"),onClick:()=>{g&&l(g.id)},children:s.jsx(sf,{"aria-hidden":"true"})}),s.jsxs("span",{"aria-live":"polite",className:"min-w-[30px] text-center",children:[f+1,"/",p.length]}),s.jsx(ge,{variant:"ghost",size:"icon",className:ma,disabled:a||!m,"aria-label":d("branch.next"),onClick:()=>{m&&l(m.id)},children:s.jsx(Vo,{"aria-hidden":"true"})})]})},Ew=({text:r})=>{const{t:a}=Y(),[o,l]=x.useState(!1),d=x.useRef(void 0);x.useEffect(()=>()=>{window.clearTimeout(d.current)},[]);const p=a(o?"copied":"copy");return s.jsx(ge,{part:"copy",variant:"ghost",size:"icon",className:ma,"aria-label":p,title:p,onClick:()=>{Ms(r).then(f=>{f&&(l(!0),window.clearTimeout(d.current),d.current=window.setTimeout(()=>{l(!1)},2e3))})},children:o?s.jsx(Rr,{"aria-hidden":"true"}):s.jsx(ks,{"aria-hidden":"true"})})},_w=({message:r})=>{const{rate:a,t:o}=Y(),[l,d]=x.useState(),p=r.rating??0;return s.jsx("span",{part:"rating",role:"radiogroup","aria-label":o("rateGroup"),className:"inline-flex items-center",onKeyDown:Qs,onMouseLeave:()=>{d(void 0)},children:A1.map((f,g)=>{const m=f<=p,b=!m&&p===0&&l!==void 0&&f<=l;return s.jsx("button",{type:"button",role:"radio",tabIndex:Hs(g,p-1),"aria-checked":p===f,"aria-label":o("rate",{count:f}),className:B("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||b)&&"text-warning"),onMouseEnter:()=>{d(f)},onClick:()=>{a(r.id,f)},children:s.jsx(Bv,{className:B("size-4",m&&"fill-current"),"aria-hidden":"true"})},f)})})},zw=({message:r,isLast:a,busy:o,ready:l,persisted:d,canFeedback:p,feedbackOpen:f,onOpenFeedback:g})=>{const{send:m,state:b,t:v}=Y(),S=r.status==="error",w=a&&l&&!o&&!b.limit.blocked;if(S&&!w)return null;const C=ua.find(R=>R===r.feedbackReason),_=r.blocks.length>0,E=()=>{m({query:"",mode:b.mode??r.mode,regenerateOf:r.id})};return s.jsxs("div",{part:"actions",role:"toolbar","aria-label":v("actionsLabel"),className:B("flex min-h-8 flex-wrap items-center gap-0.5",!S&&r.rating==null&&_s),children:[l&&!S&&r.content&&!_?s.jsx(Ew,{text:r.content}):null,w?S?s.jsxs(ge,{part:"regenerate",variant:"input",size:"sm",className:"gap-1.5",onClick:E,children:[s.jsx(xf,{"aria-hidden":"true"}),v("regenerate")]}):s.jsxs(ge,{part:"regenerate",variant:"ghost",size:"icon",className:B(ma,"max-sm:h-8 max-sm:w-auto max-sm:gap-1.5 max-sm:px-2.5 max-sm:text-[13px]"),"aria-label":v("regenerate"),title:v("regenerate"),onClick:E,children:[s.jsx(xf,{"aria-hidden":"true"}),s.jsx("span",{className:"hidden max-sm:inline",children:v("regenerate")})]}):null,l&&!S?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"mx-1.5 h-[18px] w-px bg-border","aria-hidden":"true"}),s.jsx(_w,{message:r})]}):null,s.jsx(Rh,{messageId:r.id,disabled:o||!d}),p&&!f?s.jsx(ge,{variant:"link",size:"sm",onClick:g,children:r.feedback||C?v("feedbackEdit"):v("feedbackOpen")}):null]})},Mw=({message:r,onClose:a})=>{const{saveFeedback:o,t:l}=Y(),[d,p]=x.useState(r.feedback),[f,g]=x.useState(!1),[m,b]=x.useState(!1),[v,S]=x.useState(()=>ua.find(C=>C===r.feedbackReason)),w=()=>{g(!0),b(!1),o(r.id,d.trim(),v).then(C=>{g(!1),C?a():b(!0)})};return s.jsxs("form",{part:"feedback","aria-label":l("feedbackLabel"),onSubmit:C=>{C.preventDefault()},className:"flex flex-col gap-3 rounded-[14px] border bg-background p-3.5",children:[s.jsx("div",{className:"text-sm font-medium",children:l("feedback.reasonsLabel")}),s.jsx("div",{role:"radiogroup","aria-label":l("feedback.reasonsLabel"),className:"flex flex-wrap gap-1.5",onKeyDown:Qs,children:ua.map((C,_)=>{const E=C===v;return s.jsx("button",{type:"button",role:"radio",tabIndex:Hs(_,v?ua.indexOf(v):-1),"aria-checked":E,disabled:f,onClick:()=>{S(E?void 0:C)},className:B("inline-flex h-[30px] items-center whitespace-nowrap rounded-full border px-3 text-[13px] transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-60 motion-reduce:transition-none",E?"border-primary-50 bg-secondary font-medium text-secondary-foreground":"bg-background text-foreground hover:bg-muted"),children:l(`feedback.reason.${C}`)},C)})}),s.jsx(Ks,{autoFocus:!0,value:d,onChange:p,placeholder:l("feedbackPlaceholder"),"aria-label":l("feedbackLabel"),maxLength:zs,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?s.jsxs("div",{role:"alert",className:"flex items-start gap-1.5 text-[13px] text-destructive",children:[s.jsx(Ir,{className:"mt-0.5 size-3.5 shrink-0","aria-hidden":"true"}),s.jsx("span",{children:l("ratingError")})]}):null,s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[s.jsxs("span",{className:B("mr-auto text-2xs tabular-nums text-muted-foreground",d.length>=zs&&"font-semibold text-warn-text"),children:[d.length,"/",zs]}),s.jsx(ge,{variant:"ghost",size:"sm",onClick:a,disabled:f,children:l("cancel")}),s.jsxs(ge,{size:"sm",disabled:f,onClick:w,children:[f?s.jsx(Lr,{className:"size-3 animate-spin motion-reduce:animate-none","aria-hidden":"true"}):null,l("save")]})]})]})},Rw=({message:r})=>{const{t:a}=Y(),o=ua.find(l=>l===r.feedbackReason);return!o&&!r.feedback?null:s.jsxs("div",{part:"feedback-saved",className:"flex flex-col gap-1 rounded-xl bg-muted px-3 py-2.5 text-sm",children:[o?s.jsx("span",{className:"font-semibold",children:a(`feedback.reason.${o}`)}):null,r.feedback?s.jsx("span",{className:"whitespace-pre-line break-words",children:r.feedback}):null]})},Iw=({message:r,isLast:a,busy:o,persisted:l,dashboardOpen:d,onToggleDashboard:p})=>{const{send:f,state:g,t:m}=Y(),[b,v]=x.useState(!1),S=r.status==="streaming",w=r.status==="error",C=j0(r.content,S),_=Y0(S,r.status),E=!S&&l,R=E&&!w&&r.rating!=null&&r.rating<T1,$=!w&&(S||r.steps.length>0),X=Date.parse(r.createdAt)||0,ae=_?"eureka":K0(r.status,r.content.length>0),G=(D,te)=>f({query:D,mode:g.mode??r.mode,...te?{clarification:te}:{}}).then(Z=>Z==="sent");return s.jsxs("article",{part:"message","data-role":"assistant","data-status":r.status,"aria-busy":S,className:"group flex items-start gap-3",children:[s.jsxs("div",{part:"avatar",className:"relative w-8 shrink-0 max-sm:hidden",children:[s.jsx(Oo,{mood:ae,size:32,animated:S||_}),w?s.jsx("span",{"data-testid":"avatar-caption",className:"absolute left-0 top-full mt-1 whitespace-nowrap text-2xs leading-none text-muted-foreground",children:m("agent.failed")}):null]}),s.jsxs("div",{part:w?"bubble assistant-bubble error-bubble":"bubble assistant-bubble",className:"flex min-w-0 flex-1 flex-col gap-3",children:[$?s.jsx(ow,{steps:r.steps,status:r.status,startedAt:X,durationMs:r.durationMs,stopping:g.turn?.stopping===!0&&g.turn.assistantId===r.id}):null,w?s.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:[s.jsx(Ir,{className:"mt-0.5 size-4 shrink-0 text-destructive","aria-hidden":"true"}),s.jsx("span",{children:r.content||m("errors.generic")})]}):null,s.jsx(Sw,{message:r,isLastInBranch:a,onAsk:G,dashboardOpen:d,onToggleDashboard:p,children:r.content&&!w?s.jsx(Cw,{streaming:S,children:C}):null}),r.attachments.length>0?s.jsx("div",{className:"flex flex-wrap gap-1.5",children:r.attachments.map((D,te)=>s.jsx(Ch,{attachment:D},D.id??`${D.name}-${te}`))}):null,r.status==="stopped"?s.jsxs("div",{className:"flex items-center gap-2 text-[13px] text-muted-foreground",children:[s.jsx(uf,{className:"size-4 shrink-0","aria-hidden":"true"}),s.jsx("span",{children:m("agent.answerStopped")})]}):null,S?null:s.jsx(zw,{message:r,isLast:a,busy:o,ready:E,persisted:l,canFeedback:R,feedbackOpen:b,onOpenFeedback:()=>{v(!0)}}),R&&b?s.jsx(Mw,{message:r,onClose:()=>{v(!1)}}):null,R&&!b?s.jsx(Rw,{message:r}):null]})]})},Lw=({message:r,onClose:a})=>{const{send:o,state:l,t:d}=Y(),p=x.useId(),[f,g]=x.useState(r.content),m=l.mode??r.mode,b=l.config?.max_query_chars??Tp,v=f.trim(),S=v!==r.content.trim(),w=f.length>b,C=v.length>0&&S&&!w&&!l.turn&&!l.limit.blocked,_=()=>{C&&(a(),o({query:v,mode:m,parentId:r.parentId??""}))};return s.jsxs("div",{part:"edit",onKeyDown:E=>{E.key==="Escape"&&(E.preventDefault(),E.stopPropagation(),a())},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:[s.jsx(Ks,{autoFocus:!0,value:f,onChange:g,"aria-label":d("editLabel"),"aria-invalid":w||void 0,"aria-describedby":p,className:"py-0.5 text-lg",onSubmit:_}),s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[s.jsx(mh,{id:p,count:f.length,max:b,className:"mr-auto px-0"}),s.jsx(ge,{variant:"ghost",size:"sm",onClick:a,children:d("cancel")}),s.jsx(ge,{size:"sm",disabled:!C,onClick:_,children:d("send")})]})]})},Pw=({message:r,busy:a,persisted:o})=>{const{t:l}=Y(),[d,p]=x.useState(!1);return s.jsx("div",{part:"message","data-role":"user",className:"group flex flex-col items-end gap-1.5",children:d?s.jsx(Lw,{message:r,onClose:()=>{p(!1)}}):s.jsxs(s.Fragment,{children:[r.attachments.length>0?s.jsx("div",{className:"flex max-w-[78%] flex-wrap justify-end gap-1.5 max-sm:max-w-[88%]",children:r.attachments.map((f,g)=>s.jsx(Ch,{attachment:f},f.id??`${f.name}-${g}`))}):null,s.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}),s.jsxs("div",{className:"flex min-h-7 items-center gap-0.5",children:[o?s.jsx(ge,{part:"edit-button",variant:"ghost",size:"icon",className:B(ma,_s),disabled:a,"aria-label":l("edit"),title:l("edit"),onClick:()=>{p(!0)},children:s.jsx(Rv,{"aria-hidden":"true"})}):null,s.jsx(Rh,{messageId:r.id,disabled:a||!o})]})]})})},Tw=x.memo(function({message:r,isLast:a,busy:o,dashboardOpen:l,onToggleDashboard:d}){const{t:p}=Y(),f=Io(r.id),g=s.jsx("p",{part:"message-error",className:"text-sm text-muted-foreground",children:p("errors.render")});return s.jsx(us,{fallback:g,children:r.role==="user"?s.jsx(Pw,{message:r,busy:o,persisted:f}):s.jsx(Iw,{message:r,isLast:a,busy:o,persisted:f,dashboardOpen:l,onToggleDashboard:d})})}),Ih=r=>r.scrollHeight-r.scrollTop-r.clientHeight,Aw=({resetKey:r,followKey:a})=>{const o=x.useRef(null),l=x.useRef(null),d=x.useRef(!0),p=x.useRef(0),[f,g]=x.useState(!0),m=x.useCallback(()=>{const S=o.current;S&&(S.scrollTop=S.scrollHeight)},[]),b=x.useCallback(()=>{const S=o.current;if(!S)return;d.current=!0;const w=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;S.scrollTo({top:S.scrollHeight,behavior:w?"auto":"smooth"})},[]),v=x.useCallback(()=>{const S=o.current;if(!S)return;const w=Ih(S)<zf;w?d.current=!0:S.scrollTop<p.current-1&&(d.current=!1),p.current=S.scrollTop,g(w)},[]);return x.useLayoutEffect(()=>{d.current=!0,m()},[r,a,m]),x.useEffect(()=>{const S=l.current,w=o.current;if(!S||!w||typeof ResizeObserver>"u")return;const C=new ResizeObserver(()=>{d.current&&m(),g(Ih(w)<zf)});return C.observe(S),()=>{C.disconnect()}},[m]),{scrollRef:o,contentRef:l,onScroll:v,atBottom:f,scrollToBottom:b}},Fw=()=>{const{state:r,path:a,t:o}=Y(),{state:l,toggle:d}=pr(),p=a.filter(C=>C.role==="user").length,{scrollRef:f,contentRef:g,onScroll:m,atBottom:b,scrollToBottom:v}=Aw({resetKey:r.thread?.id??null,followKey:p}),S=r.turn!==null,w=a[a.length-1];return s.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col",children:[s.jsx("div",{ref:f,part:"messages",onScroll:m,"aria-live":"polite","aria-busy":S,className:"min-h-0 flex-1 overflow-y-auto overscroll-contain",children:s.jsx("div",{ref:g,className:"mx-auto flex w-full max-w-[820px] flex-col gap-[22px] px-4 pb-4 pt-[18px]",children:a.map(C=>s.jsx(Tw,{message:C,isLast:C===w,busy:S,dashboardOpen:C.id===l.messageId,onToggleDashboard:d},C.id))})}),b?null:s.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:v,children:[s.jsx(of,{"aria-hidden":"true"}),o("scrollDown")]})]})},Dw={error:"bg-error-background text-destructive",warning:"bg-warning-background text-warn-text",lock:"bg-muted text-muted-foreground"},Lh=({tone:r,children:a})=>s.jsx("span",{className:B("flex size-[52px] items-center justify-center rounded-full",Dw[r]),children:a}),Ow=({kind:r,onRetry:a})=>{const{t:o}=Y();if(r==="loading")return s.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:[s.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"}),s.jsx("span",{role:"status",className:"text-xs text-muted-foreground",children:o("loading")})]});if(r==="siteBlocked")return s.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:[s.jsx(Lh,{tone:"lock",children:s.jsx(pf,{className:"size-6","aria-hidden":"true"})}),s.jsx("p",{className:"max-w-[300px] text-lg font-semibold",children:o("shell.siteBlocked")}),s.jsx("p",{className:"max-w-[440px] text-xs text-muted-foreground",children:o("shell.siteBlockedHint")})]});const l=r==="overloaded";return s.jsxs("div",{part:"shell-status","data-state":l?"overloaded":"unavailable",role:"alert",className:"flex min-h-0 flex-1 flex-col items-center justify-center gap-4 p-8 text-center",children:[s.jsx(Lh,{tone:l?"warning":"error",children:l?s.jsx(Bo,{className:"size-6","aria-hidden":"true"}):s.jsx(Ir,{className:"size-6","aria-hidden":"true"})}),s.jsx("p",{className:"max-w-[300px] text-lg font-semibold",children:o(l?"overloaded":"configError")}),a?s.jsxs(ge,{variant:"input",size:"sm",onClick:a,children:[s.jsx(vf,{"aria-hidden":"true"}),o("retry")]}):null]})},$w=()=>{const{state:r,reload:a}=Y(),o=ix(r);return o===null?null:s.jsx(Ow,{kind:o,onRetry:o==="siteBlocked"?void 0:a})},qw="h-3 rounded-md bg-muted animate-pulse motion-reduce:animate-none",Uw=()=>{const{t:r}=Y();return s.jsxs("div",{"aria-busy":"true",className:"min-h-0 flex-1 overflow-hidden",children:[s.jsxs("div",{className:"mx-auto flex w-full max-w-[820px] flex-col gap-[22px] px-4 pb-4 pt-[18px]",children:[s.jsx("div",{className:"flex justify-end",children:s.jsx("div",{className:"h-[38px] w-[62%] rounded-[18px] rounded-br-[6px] bg-muted animate-pulse motion-reduce:animate-none"})}),s.jsx("div",{className:"flex flex-col gap-2.5",children:[90,76,84,40].map(a=>s.jsx("div",{className:qw,style:{width:`${a}%`}},a))})]}),s.jsx("span",{role:"status",className:"sr-only",children:r("loading")})]})},Vw=({composerRef:r,wide:a})=>{const{state:o,path:l}=Y(),[d,p]=x.useState(!1),f=!!o.config&&!o.loadingThread&&!o.configError,g=f&&l.length===0,m=v=>{r&&"current"in r&&r.current?.setText(v)};let b;return f?g?b=s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto overscroll-contain",children:s.jsx(rw,{listening:d,wide:a,onPick:m})}):b=s.jsx(Fw,{}):b=o.loadingThread&&o.config&&!o.configError?s.jsx(Uw,{}):s.jsx($w,{}),s.jsxs(s.Fragment,{children:[b,s.jsx(Gy,{composerRef:r,onDraftChange:p})]})},ba="size-8 shrink-0 text-muted-foreground hover:text-foreground",Bw=({historyHidden:r,onShowHistory:a,onOpenSettings:o,title:l,logoUrl:d,threadTitle:p,tabs:f,inert:g=!1})=>{const{t:m,newChat:b}=Y(),v=ds(),S=x.useRef(null);zr(S,g);const w=p!==void 0&&p!==""?p:r?l:"";return s.jsxs("div",{ref:S,part:"toolbar",className:"flex h-toolbar shrink-0 items-center gap-1 border-b py-0 pl-2.5 pr-2",children:[r?s.jsx(ge,{part:"history-toggle",variant:"ghost",size:"icon",className:ba,"aria-expanded":!1,"aria-label":m("history"),title:m("history"),onClick:a,children:s.jsx(Cv,{"aria-hidden":"true"})}):null,r&&d?s.jsx("img",{part:"logo",src:d,alt:"",referrerPolicy:"no-referrer",className:"size-6 shrink-0 rounded-md object-contain"}):null,s.jsx("span",{className:"min-w-0 flex-1 truncate px-1.5 text-sm font-semibold",children:w}),f,s.jsx(ge,{variant:"ghost",size:"icon",className:ba,"aria-label":m("newChat"),title:m("newChat"),onClick:b,children:s.jsx(bf,{"aria-hidden":"true"})}),v.canExpand?s.jsx(ge,{part:"expand",variant:"ghost",size:"icon",className:ba,"aria-label":v.expanded?m("shrink"):m("expand"),title:v.expanded?m("shrink"):m("expand"),onClick:()=>{v.setExpanded(!v.expanded)},children:v.expanded?s.jsx(mf,{"aria-hidden":"true"}):s.jsx(ff,{"aria-hidden":"true"})}):null,s.jsx(ge,{part:"settings-button",variant:"ghost",size:"icon",className:ba,"aria-label":m("settings"),title:m("settings"),onClick:o,children:s.jsx($v,{"aria-hidden":"true"})}),v.close?s.jsx(ge,{part:"close",variant:"ghost",size:"icon",className:ba,"aria-label":m("close"),title:m("close"),onClick:v.close,children:s.jsx(sa,{"aria-hidden":"true"})}):null]})},Ww="flex shrink-0 flex-col border-r duration-200 animate-in fade-in slide-in-from-left-2 motion-reduce:animate-none",Hw="w-side bg-muted",Qw="absolute inset-y-0 left-0 z-30 w-side-over max-w-full bg-muted shadow-side",Kw=({title:r,logoUrl:a,onHide:o})=>{const{t:l}=Y();return s.jsxs("div",{part:"header",className:"flex h-side-head shrink-0 items-center gap-2.5 pl-3.5 pr-2",children:[a?s.jsx("img",{part:"logo",src:a,alt:"",referrerPolicy:"no-referrer",className:"size-7 shrink-0 rounded-lg object-cover"}):s.jsx(Oo,{size:28,animated:!1}),s.jsx("span",{part:"title",className:"min-w-0 flex-1 truncate text-[15px] font-bold",children:r}),s.jsx(ge,{variant:"ghost",size:"icon",className:"size-8 text-muted-foreground hover:text-foreground","aria-label":l("closeHistory"),title:l("closeHistory"),onClick:o,children:s.jsx(jv,{"aria-hidden":"true"})})]})},Xw=({onClick:r})=>{const{t:a}=Y();return s.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:[s.jsx(bf,{className:"size-4","aria-hidden":"true"}),a("newChat")]})},Gw=({name:r,onConfirm:a,onCancel:o})=>{const{t:l}=Y(),d=x.useRef(null);return x.useEffect(()=>{d.current?.querySelector("[data-cancel]")?.focus()},[]),s.jsxs("div",{ref:d,role:"alertdialog","aria-label":l("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:[s.jsx("div",{className:"text-[13px] font-semibold",children:l("deleteConfirm")}),s.jsx("div",{className:"truncate text-2xs text-muted-foreground",children:r}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(ge,{variant:"destructive",size:"xs",onClick:a,children:l("deleteYes")}),s.jsx(ge,{variant:"ghost",size:"xs","data-cancel":!0,onClick:o,children:l("deleteNo")})]})]})},Zw=(r,a)=>{let o="";const l=[];let d=0;for(const g of r){const m=g.toLowerCase();l.push(...Array.from({length:m.length},()=>d)),o+=m,d+=g.length}l.push(d);const p=o.indexOf(a);if(p<0)return null;let f=p+a.length;for(;f<l.length&&l[f]===l[f-1];)f+=1;return[l[p]??0,l[f]??r.length]},Yw=({text:r,query:a})=>{const o=a.trim().toLowerCase(),l=o?Zw(r,o):null;if(!l)return s.jsx(s.Fragment,{children:r});const[d,p]=l;return s.jsxs(x.Fragment,{children:[r.slice(0,d),s.jsx("mark",{className:"rounded-[3px] bg-hl px-px text-inherit",children:r.slice(d,p)}),r.slice(p)]})},Jw=({groups:r,query:a,activeId:o,confirmId:l,onOpen:d,onAskDelete:p,onCancelDelete:f,onDelete:g})=>{const{t:m}=Y();return s.jsx(s.Fragment,{children:r.map(([b,v])=>s.jsxs("section",{className:"pb-1","aria-label":m(b),children:[s.jsx("h3",{className:"px-2 pb-1 pt-3.5 text-2xs font-medium text-muted-foreground",children:m(b)}),s.jsx("ul",{className:"flex flex-col gap-px",children:v.map(S=>{const w=S.id===o,C=S.title||m("untitled");return l===S.id?s.jsx("li",{children:s.jsx(Gw,{name:C,onConfirm:()=>{g(S.id)},onCancel:f})},S.id):s.jsxs("li",{className:"group relative",children:[s.jsx("button",{part:"thread-item",type:"button","aria-current":w?"page":void 0,title:C,onClick:()=>{d(S.id)},className:B("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",w&&"bg-background font-medium shadow-[inset_0_0_0_1px_var(--aid-c-border)] hover:bg-background"),children:s.jsx("span",{className:"min-w-0 truncate",children:s.jsx(Yw,{text:C,query:a})})}),s.jsx(ge,{variant:"ghost",size:"icon",className:B("absolute right-1 top-1/2 size-7 -translate-y-1/2 text-muted-foreground",!w&&_s),"aria-label":`${m("delete")}: ${C}`,onClick:()=>{p(S.id)},children:s.jsx(Kv,{"aria-hidden":"true"})})]},S.id)})})]},b))})},nc=({icon:r,children:a})=>s.jsxs("div",{className:"flex flex-col items-center gap-1.5 px-3 py-6 text-center text-sm text-muted-foreground",children:[r,a]}),ek=[82,64,90,58,76,70],tk=({query:r})=>{const{state:a,t:o,refreshThreads:l}=Y();return a.threadsLoaded?r.trim()!==""?s.jsx(nc,{icon:s.jsx(la,{"aria-hidden":"true"}),children:s.jsx("span",{children:o("searchEmpty")})}):a.threadsError?s.jsxs(nc,{icon:s.jsx(Ir,{"aria-hidden":"true"}),children:[s.jsx("span",{children:o("historyError")}),s.jsx(ge,{variant:"input",size:"xs",onClick:l,children:o("retry")})]}):s.jsx(nc,{icon:s.jsx(gf,{"aria-hidden":"true"}),children:s.jsx("span",{children:o("historyEmpty")})}):s.jsxs("div",{"aria-busy":"true",className:"flex flex-col",children:[ek.map(d=>s.jsx("div",{className:"flex min-h-9 items-center px-2.5",children:s.jsx("span",{className:"h-[11px] animate-pulse rounded-md bg-border motion-reduce:animate-none",style:{width:`${d}%`}})},d)),s.jsx("span",{role:"status",className:"sr-only",children:o("loading")})]})},rk=(r,a,o)=>{qo(r,a);const l=x.useRef(o);x.useEffect(()=>{l.current=o}),x.useEffect(()=>{if(!a)return;const p=f=>{if(f.key!=="Escape"||f.defaultPrevented)return;const g=f.composedPath(),m=g[0];m instanceof HTMLInputElement&&m.type==="search"&&m.value!==""||g.some(b=>b instanceof HTMLElement&&b.getAttribute("role")==="alertdialog")||(f.preventDefault(),f.stopPropagation(),l.current())};return window.addEventListener("keydown",p,!0),()=>{window.removeEventListener("keydown",p,!0)}},[a]);const d=x.useRef(!1);x.useEffect(()=>{const p=r.current?.getRootNode();if(d.current&&!a){const f=window.setTimeout(()=>{p?.querySelector('[part~="history-toggle"]')?.focus()},0);return d.current=!1,()=>{window.clearTimeout(f)}}d.current=a},[a,r])},nk=({query:r,onQuery:a,inputRef:o,autoFocus:l})=>{const{t:d}=Y();return s.jsxs("label",{className:"relative flex items-center",children:[s.jsx(la,{className:"pointer-events-none absolute left-[11px] size-4 text-muted-foreground","aria-hidden":"true"}),s.jsx("input",{ref:o,part:"search",type:"search",value:r,"data-autofocus":l?"":void 0,onChange:p=>{a(p.target.value)},onKeyDown:p=>{p.key==="Escape"&&r&&(p.preventDefault(),a(""))},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?s.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:()=>{a(""),o.current?.focus()},children:s.jsx(sa,{className:"size-3.5","aria-hidden":"true"})}):null]})},ak=({collapsed:r,onCollapsedChange:a,searchRef:o,searchSignal:l,overlay:d=!1,title:p,logoUrl:f,inert:g=!1})=>{const m=x.useRef(null);zr(m,g);const{state:b,t:v,openThread:S,newChat:w,deleteThread:C}=Y(),[_,E]=x.useState(""),[R,$]=x.useState(null),X=d&&!r;rk(m,X,()=>{a(!0)});const ae=x.useMemo(()=>{const D=_.trim().toLowerCase(),te=D?b.threads.filter(Z=>(Z.title||v("untitled")).toLowerCase().includes(D)):b.threads;return $1(te)},[b.threads,_,v]);x.useEffect(()=>{l>0&&!r&&o.current?.focus()},[l,r,o]);const G=D=>()=>{D(),d&&a(!0)};return r?s.jsx("nav",{ref:m,part:"sidebar","data-state":"collapsed","aria-label":v("history"),hidden:!0}):s.jsxs("nav",{ref:m,part:"sidebar","data-state":"expanded","aria-label":v("history"),className:B(Ww,d?Qw:Hw),children:[s.jsx(Kw,{title:p,logoUrl:f,onHide:()=>{a(!0)}}),s.jsxs("div",{className:"flex shrink-0 flex-col gap-2 px-2.5 pb-2",children:[s.jsx(Xw,{onClick:G(w)}),s.jsx(nk,{query:_,onQuery:E,inputRef:o,autoFocus:X})]}),s.jsxs("div",{part:"history",className:"min-h-0 flex-1 overflow-y-auto overscroll-contain px-2 pb-2",children:[ae.length===0?s.jsx(tk,{query:_}):null,s.jsx(Jw,{groups:ae,query:_,activeId:b.thread?.id,confirmId:R,onOpen:D=>{G(()=>{S(D)})()},onAskDelete:$,onCancelDelete:()=>{$(null)},onDelete:D=>{$(null),C(D)}})]})]})};function ok(r){const a=x.useRef(null),[o,l]=x.useState(r);return x.useLayoutEffect(()=>{const d=a.current;if(!d)return;const p=Math.round(d.getBoundingClientRect().width);if(p>0&&l(p),typeof ResizeObserver>"u")return;const f=new ResizeObserver(([g])=>{const m=Math.round(g?.contentRect.width??0);m>0&&l(m)});return f.observe(d),()=>{f.disconnect()}},[]),[a,o]}const Ph="aid_sidebar",ik=720,lk=r=>{try{const a=window.localStorage.getItem(Ph);return a===null?r:a==="collapsed"}catch{return r}},sk=r=>{const{state:a}=Y(),o=a.thread?.id,l=o!==void 0&&o!==cn?o:void 0;return s.jsx(ky,{threadId:l,children:s.jsx(ck,{...r,threadId:l})})},ck=({open:r,title:a,logoUrl:o,compact:l,threadId:d})=>{const{state:p,path:f,newChat:g}=Y(),m=ds(),{expandForDashboard:b}=m,[v,S]=ok(0),w=(m.canExpand&&m.expanded?Math.max(S,window.innerWidth):S)>=Sx,C=pr(),_=l||S>0&&S<ik,[E,R]=x.useState(()=>_||lk(!1)),[$,X]=x.useState(_);_!==$&&(X(_),_&&R(!0));const[ae,G]=x.useState(!1),D=x.useRef(null),[te,Z]=x.useState(0),re=()=>{Q(!1),Z(V=>V+1)},be=x.useRef(null),Q=V=>{if(R(V),!_)try{window.localStorage.setItem(Ph,V?"collapsed":"expanded")}catch{}},fe=x.useRef({collapsed:E,newChat:g,setCollapsed:Q,focusSearch:re});x.useEffect(()=>{fe.current={collapsed:E,newChat:g,setCollapsed:Q,focusSearch:re}}),x.useEffect(()=>{if(!r)return;const V=le=>{if(!(le.metaKey||le.ctrlKey)||le.altKey)return;const{collapsed:de,newChat:je,setCollapsed:ke,focusSearch:ve}=fe.current,We=le.key.toLowerCase();if(We==="k"&&!le.shiftKey)ve();else if(We==="o"&&le.shiftKey)je(),setTimeout(()=>be.current?.setText(""),0);else if(We==="s"&&le.shiftKey)ke(!de);else return;le.preventDefault()};return window.addEventListener("keydown",V),()=>{window.removeEventListener("keydown",V)}},[r]),Sy(f,d,{loaded:d===void 0||p.thread!==null&&p.loadingThread===null,streaming:(p.turn?.optimisticIds.length??0)>0});const W=f.find(V=>V.id===C.state.messageId&&Bt(V.blocks,"dashboard")!==void 0),H=W!==void 0;x.useEffect(()=>{if(H)return b(!0),()=>{b(!1)}},[H,b]);const me=x.useRef(null),Ce=x.useRef(!1),xe=W?.id??null,ye=x.useRef(null);x.useEffect(()=>{const V=ye.current;if(ye.current=xe,V===null||xe!==null||!Ce.current)return;Ce.current=!1;const le=me.current;(Array.from(le?.querySelectorAll('[part="dashboard-toggle"]')??[]).find(de=>de.dataset.messageId===V)??le?.querySelector('[part="composer"] textarea'))?.focus()},[xe]);const q=H&&C.state.fullscreen;zr(me,_&&!E);const[P,T]=x.useState(r);r!==P&&(T(r),!r&&_&&R(!0));const k=Nx(H,w,C.state.fullscreen);jx(r&&H&&(!k||C.state.view==="dashboard"));const L=p.thread?p.threads.find(V=>V.id===p.thread?.id)?.title:void 0,ie=p.config&&!p.loadingThread&&!p.configError;return s.jsxs("div",{ref:v,className:"relative flex min-h-0 flex-1",children:[s.jsx(ak,{collapsed:E,onCollapsedChange:Q,overlay:_,searchRef:D,searchSignal:te,title:a,logoUrl:o,inert:q}),s.jsxs("div",{ref:me,className:"flex min-w-0 flex-1 flex-col",children:[s.jsx(Bw,{historyHidden:E,onShowHistory:()=>{Q(!1)},onOpenSettings:()=>{G(!0)},title:a,logoUrl:o,threadTitle:L,tabs:k?s.jsx(q1,{}):null,inert:q}),s.jsx(U1,{wide:w,onPanelFocusChange:V=>{Ce.current=V},panel:W?s.jsx(yy,{message:W}):null,chat:s.jsx(Vw,{composerRef:be,wide:S>=720})})]}),_&&!E?s.jsx("button",{type:"button",tabIndex:-1,"aria-hidden":"true",className:"absolute inset-0 z-20 bg-scrim",onClick:()=>{Q(!0)}}):null,s.jsx(Ny,{active:r&&!!ie}),s.jsx(Ay,{open:ae,onClose:()=>{G(!1)}})]})},Th=({open:r,title:a,logoUrl:o,fullscreen:l,expanded:d=!1,style:p,onClose:f})=>{const g=x.useRef(null);return zr(g,!r),qo(g,r),x.useEffect(()=>{if(!r)return;const m=b=>{b.key==="Escape"&&!b.defaultPrevented&&f()};return window.addEventListener("keydown",m),()=>{window.removeEventListener("keydown",m)}},[r,f]),s.jsx("div",{ref:g,part:"window",role:"dialog","aria-modal":l,"aria-label":a,"aria-hidden":!r,"data-state":r?"open":"closed","data-fullscreen":l,"data-expanded":d,className:"aid-window rounded-aid-window border bg-background text-foreground shadow-window",style:p,children:s.jsx(sk,{open:r,title:a,logoUrl:o,compact:l})})},ac=60,dk=6,uk=8,Ah={x:20,y:20},pk=639,Fh="aid_pos",fk=(r,a,o=dk)=>r*r+a*a>=o*o,Zo=(r,a,o=ac,l=uk)=>{const d=typeof o=="number"?{width:o,height:o}:o,p=(f,g)=>Math.round(Math.min(Math.max(f,l),Math.max(l,g)));return{x:p(r.x,a.width-d.width-l),y:p(r.y,a.height-d.height-l)}},Dh=(r,a,o,l)=>({x:l==="bottom-right"?r.x-a:r.x+a,y:r.y-o}),hk=r=>{try{const a=r?.getItem(Fh);if(!a)return null;const o=JSON.parse(a);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},gk=(r,a)=>{try{r?.setItem(Fh,JSON.stringify(a))}catch{}},mk={width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},bk=({size:r=24})=>s.jsx("svg",{...mk,width:r,height:r,children:s.jsx("path",{d:"M18 6 6 18M6 6l12 12"})}),Oh=()=>({width:window.innerWidth,height:window.innerHeight}),oc=r=>({width:r.offsetWidth,height:r.offsetHeight}),xk=()=>{try{return window.localStorage}catch{return null}},$h=x.forwardRef(({open:r,lang:a,corner:o,offset:l,draggable:d,unread:p=0,variant:f,label:g,shape:m,onOffsetChange:b,onToggle:v},S)=>{const w=x.useRef(null),C=x.useRef(!1),[_,E]=x.useState(null),R=_!==null,$=Z=>{!d||Z.button!==0||(w.current={pointerX:Z.clientX,pointerY:Z.clientY,offset:l,moved:!1},Z.currentTarget.setPointerCapture(Z.pointerId))},X=Z=>{const re=w.current;if(!re)return;const be=Z.clientX-re.pointerX,Q=Z.clientY-re.pointerY;!re.moved&&!fk(be,Q)||(re.moved||(re.moved=!0,E({offset:re.offset,...oc(Z.currentTarget)})),b(Zo(Dh(re.offset,be,Q,o),Oh(),oc(Z.currentTarget))))},ae=Z=>{const re=w.current;if(w.current=null,Z.currentTarget.hasPointerCapture(Z.pointerId)&&Z.currentTarget.releasePointerCapture(Z.pointerId),!re?.moved)return;E(null),C.current=!0;const be=Z.clientX-re.pointerX,Q=Z.clientY-re.pointerY;gk(xk(),Zo(Dh(re.offset,be,Q,o),Oh(),oc(Z.currentTarget)))},G=()=>{if(C.current){C.current=!1;return}v()},D=o==="bottom-right"?"right":"left",te=f==="label"&&!r?g??zt(a,"ask"):null;return s.jsxs(s.Fragment,{children:[_?s.jsx("span",{"data-testid":"launcher-origin","aria-hidden":"true","data-shape":m??"circle",className:"aid-launcher-origin",style:{[D]:_.offset.x,bottom:_.offset.y,width:_.width,height:_.height}}):null,s.jsxs("button",{ref:S,part:"launcher",type:"button","aria-label":`${te??zt(a,r?"close":"open")}${p>0&&!r?`, ${zt(a,"unreadAnswers",{count:p})}`:""}`,"aria-expanded":r,"data-dragging":R,"data-variant":te?"label":"icon","data-shape":m??"circle",className:"aid-launcher",style:{[D]:l.x,bottom:l.y},onPointerDown:$,onPointerMove:X,onPointerUp:ae,onPointerCancel:ae,onClick:G,children:[r?s.jsx(bk,{}):s.jsx(Oo,{size:te?44:40,animated:!1,bare:!0}),te?s.jsx("span",{part:"launcher-label",className:"truncate",children:te}):null,p>0&&!r?s.jsx("span",{part:"badge",className:"aid-launcher-badge",children:p>9?"9+":p}):null]})]})});$h.displayName="Launcher";const vk=r=>{const{state:a}=Y(),{turn:o,thread:l}=a,[d,p]=x.useState({turn:o,open:r}),[f,g]=x.useState(0);return(d.turn!==o||d.open!==r)&&(p({turn:o,open:r}),r?f!==0&&g(0):d.turn&&!o&&l?.messages.find(m=>m.id===d.turn?.assistantId)?.status==="done"&&g(f+1)),f},qh=x.forwardRef((r,a)=>{const o=vk(r.open);return s.jsx($h,{ref:a,...r,unread:o})});qh.displayName="UnreadLauncher";const xa=(r,a,o)=>Math.min(o,Math.max(a,r)),yk={black:"#000000",white:"#ffffff",red:"#ff0000",green:"#008000",blue:"#0000ff",orange:"#ffa500",purple:"#800080",teal:"#008080",navy:"#000080",gray:"#808080",grey:"#808080"},Uh=r=>{if(!/^[0-9a-f]+$/i.test(r)||![3,4,6,8].includes(r.length))return null;const a=r.length<=4?r.replace(/./g,l=>l+l):r,o=l=>parseInt(a.slice(l,l+2),16);return{r:o(0),g:o(2),b:o(4),a:a.length===8?o(6)/255:1}},Vh=r=>{const a=r.replace(/\//g," ").replace(/,/g," ").trim().split(/\s+/).filter(Boolean);return a.length===3||a.length===4?a:null},Yo=r=>{const a=Number(r);return r!==""&&Number.isFinite(a)?a:null},wk=r=>{if(r===void 0)return 1;const a=Yo(r.endsWith("%")?r.slice(0,-1):r);return a===null?null:xa(r.endsWith("%")?a/100:a,0,1)},ic=r=>{const a=Yo(r.endsWith("%")?r.slice(0,-1):r);return a===null?null:xa(r.endsWith("%")?a/100*255:a,0,255)},Bh=r=>{const a=/^(-?[\d.]+)(deg|turn|rad|grad)?$/.exec(r);if(!a?.[1])return null;const o=Yo(a[1]);if(o===null)return null;const l=a[2]??"deg";return((l==="turn"?o*360:l==="rad"?o*180/Math.PI:l==="grad"?o*.9:o)%360+360)%360},Jo=r=>{const a=Yo(r.endsWith("%")?r.slice(0,-1):r);return a===null?null:xa(a,0,100)},ei=({h:r,s:a,l:o,a:l})=>{const d=a/100,p=o/100,f=m=>(m+r/30)%12,g=m=>p-d*Math.min(p,1-p)*Math.max(-1,Math.min(f(m)-3,9-f(m),1));return{r:Math.round(g(0)*255),g:Math.round(g(8)*255),b:Math.round(g(4)*255),a:l}},kk=({r,g:a,b:o,a:l})=>{const d=r/255,p=a/255,f=o/255,g=Math.max(d,p,f),m=Math.min(d,p,f),b=(g+m)/2,v=g-m;if(v===0)return{h:0,s:0,l:b*100,a:l};const S=v/(1-Math.abs(2*b-1));let w;return g===d?w=(p-f)/v%6:g===p?w=(f-d)/v+2:w=(d-p)/v+4,{h:(w*60+360)%360,s:S*100,l:b*100,a:l}},Wh=r=>{const a=Sk(r);if(!a)return null;const o=/^hsla?\((.*)\)$/.exec(r.trim().toLowerCase()),l=o?.[1]!==void 0?Vh(o[1]):null;if(l){const[d,p,f]=[Bh(l[0]??""),Jo(l[1]??""),Jo(l[2]??"")];if(d!==null&&p!==null&&f!==null)return{h:d,s:p,l:f,a:a.a}}return kk(a)},Sk=r=>{const a=r.trim().toLowerCase(),o=yk[a];if(o)return Uh(o.slice(1));if(a.startsWith("#"))return Uh(a.slice(1));const l=/^(rgba?|hsla?)\((.*)\)$/.exec(a);if(!l?.[1]||l[2]===void 0)return null;const d=Vh(l[2]);if(!d)return null;const[p="",f="",g="",m]=d,b=wk(m);if(b===null)return null;if(l[1].startsWith("rgb")){const[C,_,E]=[ic(p),ic(f),ic(g)];return C===null||_===null||E===null?null:{r:Math.round(C),g:Math.round(_),b:Math.round(E),a:b}}const[v,S,w]=[Bh(p),Jo(f),Jo(g)];return v===null||S===null||w===null?null:ei({h:v,s:S,l:w,a:b})},Hh=({r,g:a,b:o})=>{const l=d=>{const p=d/255;return p<=.03928?p/12.92:((p+.055)/1.055)**2.4};return .2126*l(r)+.7152*l(a)+.0722*l(o)},Qh=(r,a)=>{const[o,l]=[Hh(r),Hh(a)].sort((d,p)=>p-d);return(o+.05)/(l+.05)},ti=r=>Math.round(r*10)/10,Pr=({h:r,s:a,l:o,a:l})=>`${ti(r)}, ${ti(a)}%, ${ti(o)}%${l<1?`, ${ti(l*100)/100}`:""}`,Kh={h:210,s:40,l:98,a:1},Xh={h:222.2,s:47.4,l:11.2,a:1},jk=r=>{const a=Wh(r);if(!a)return null;const o={...a,a:1},l={...o,l:xa(o.l>70?o.l-6:o.l+8,0,100)},d={...o,l:xa(o.l-10,0,100)},p=ei(o),f=Qh(p,ei(Kh)),g=f>=4.5||f>=Qh(p,ei(Xh))?Kh:Xh;return{primary:Pr(o),primaryHovered:Pr(l),primaryPressed:Pr(d),primaryForeground:Pr(g),secondary:Pr({...o,a:.1}),ring:Pr({...o,a:.5})}},Nk=(...r)=>{const a={};for(const o of r)if(o)for(const[l,d]of Object.entries(o))d===void 0||d===""||(a[l]=d);return a},Ck=r=>{const a={},o=r.primary?jk(r.primary):null;o&&(a["--primary"]=o.primary,a["--primary-text"]=o.primary,a["--primary-hovered"]=o.primaryHovered,a["--primary-pressed"]=o.primaryPressed,a["--primary-foreground"]=o.primaryForeground,a["--secondary"]=o.secondary,a["--secondary-foreground"]=o.primary,a["--ring"]=o.ring),r.radius!==void 0&&r.radius!==""&&(a["--radius"]=typeof r.radius=="number"?`${r.radius}px`:r.radius),r.font&&(a["--aid-theme-font"]=r.font);const l=b=>{const v=b?Wh(b):null;return v?Pr(v):null},d=l(r.background);if(d)for(const b of["--background","--card","--popover"])a[b]=d;const p=l(r.foreground);if(p)for(const b of["--foreground","--card-foreground","--popover-foreground","--secondary-foreground"])a[b]=p;const f=l(r.bubble);if(f)for(const b of["--secondary","--muted","--accent"])a[b]=f;const g=l(r.border);if(g)for(const b of["--border","--input"])a[b]=g;const m=(b,v)=>{typeof v=="number"&&Number.isFinite(v)&&(a[b]=`${v}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),a},Ek=(r,a)=>r==="dark"||r==="auto"&&a?"dark":"light",_k=(r,a,o={})=>{for(const l of Object.keys(o))l in a||r.style.removeProperty(l);for(const[l,d]of Object.entries(a))r.style.setProperty(l,d)},zk=(r,a)=>{r.classList.toggle("dark",a==="dark"),r.dataset.scheme=a},Gh=(r,a)=>{const o=parseFloat(r);return Number.isFinite(o)?o:a},lc=()=>{try{return window.localStorage}catch{return null}},Zh=(r,a,o)=>Gh(r.getPropertyValue(`--aid-${a}`),Gh(r.getPropertyValue(`--aid-t-${a}`),o)),Mk=r=>{const a=getComputedStyle(r);return{x:Zh(a,"offset-x",Ah.x),y:Zh(a,"offset-y",Ah.y)}},Yh=()=>({width:window.innerWidth,height:window.innerHeight}),Rk={scheme:"auto"},Ik=(r,a)=>{const o=x.useSyncExternalStore(r.subscribe,()=>r.get().theme),l=x.useSyncExternalStore(r.subscribe,()=>r.get().adminTheme),d=Yp("(prefers-color-scheme: dark)"),p=Nk(Rk,l,o),f=Ek(p.scheme,d),g=x.useRef({}),m=JSON.stringify(Ck(p));return x.useLayoutEffect(()=>{const b=JSON.parse(m);_k(a,b,g.current),g.current=b},[a,m]),x.useLayoutEffect(()=>{zk(a,f)},[a,f]),p},Lk=r=>{const{store:a,api:o}=r,l=x.useSyncExternalStore(a.subscribe,()=>a.get().open),d=x.useSyncExternalStore(a.subscribe,()=>a.get().lang),p=x.useCallback(f=>{a.set({adminTheme:f})},[a]);return s.jsx(ux,{api:o,lang:d,open:l,onAdminTheme:p,children:s.jsx(Pk,{...r})})},Pk=({store:r,root:a,mode:o,corner:l,draggable:d,api:p})=>{const f=x.useSyncExternalStore(r.subscribe,()=>r.get().open),g=x.useSyncExternalStore(r.subscribe,()=>r.get().lang),m=Ik(r,a),b=l??m.position??"bottom-right",v=Yp(`(max-width: ${pk}px)`),S=x.useRef(null),[w,C]=x.useState(()=>Zo(hk(lc())??Mk(a),Yh(),ac));x.useEffect(()=>{if(o!=="launcher")return;const W=()=>{const H=S.current,me=H?{width:H.offsetWidth,height:H.offsetHeight}:ac;C(Ce=>Zo(Ce,Yh(),me))};return window.addEventListener("resize",W),()=>{window.removeEventListener("resize",W)}},[o]);const _=x.useCallback(()=>{r.set({open:!1})},[r]),E=x.useCallback(()=>{r.set({open:!r.get().open})},[r]),R=x.useRef(f);x.useEffect(()=>{R.current&&!f&&S.current?.focus({preventScroll:!0}),R.current=f},[f]);const $=m.title??zt(g,"title"),X=Qp(p.apiUrl),ae=x.useMemo(()=>({animated:f,assetsBase:X}),[f,X]),[G,D]=x.useState({expanded:!1,byDashboard:!1}),{expanded:te}=G,Z=o==="launcher"&&!v,re=x.useCallback(W=>{D({expanded:W,byDashboard:!1})},[]),be=x.useCallback(W=>{D(H=>O0(H,W,Z))},[Z]),Q=m.scheme??"auto",fe=x.useMemo(()=>({lang:g,scheme:Q,expanded:te,canExpand:Z,setExpanded:re,expandForDashboard:be,close:o==="launcher"?_:void 0,update:W=>{const H={...qp(lc()),...W};D0(lc(),H),r.set({...W.lang?{lang:W.lang}:{},theme:{...r.get().theme,...Up(W)}})}}),[g,Q,te,Z,re,be,o,_,r]);return o==="window"?s.jsx(cs.Provider,{value:fe,children:s.jsx(gs.Provider,{value:ae,children:s.jsx(Th,{open:f,title:$,logoUrl:ls(m.logoUrl),fullscreen:!1,onClose:_})})}):s.jsx(cs.Provider,{value:fe,children:s.jsxs(gs.Provider,{value:ae,children:[s.jsx("div",{part:"overlay",className:"aid-overlay","data-state":f?"open":"closed","aria-hidden":!0,onClick:_}),s.jsx(Th,{open:f,title:$,logoUrl:ls(m.logoUrl),fullscreen:v,expanded:te&&!v,onClose:_}),f?null:s.jsx(qh,{ref:S,open:f,lang:g,corner:b,offset:w,draggable:d&&!v,variant:m.launcher,label:m.launcherLabel,shape:m.launcherShape,onOffsetChange:C,onToggle:E})]})})},Jh="https://dev-ai.kgd.gov.kz",Tk=`${fb}
19
+ ${q0}`,sc=(r,a,o,l)=>{const d=r.shadowRoot??r.attachShadow({mode:"open"});d.replaceChildren();const p=document.createElement("style");p.textContent=Tk;const f=document.createElement("div");f.className="aid-root",f.dataset.mode=o,d.append(p,f);let g=null;try{g=window.localStorage}catch{}const m=qp(g),b=$0({open:a.defaultOpen??o==="window",lang:m.lang??Dp(a.lang),theme:{...a.theme,...Up(m)},adminTheme:null});let v=b.get().open;const S=b.subscribe(()=>{const{open:E}=b.get();E!==v&&(v=E,a.onOpenChange?.(E))}),w=R0({apiUrl:a.apiUrl??Jh,siteKey:a.siteKey,visitorId:C0(a.visitorId,g),rememberVisitor:E=>{try{g?.setItem(as,E)}catch{}}}),C=pb.createRoot(f);C.render(s.jsx(x.StrictMode,{children:s.jsx(us,{fallback:null,children:s.jsx(Lk,{store:b,root:f,mode:o,corner:a.position,draggable:a.draggable??!0,api:w})})}));let _=!0;return{open:()=>{b.set({open:!0})},close:()=>{b.set({open:!1})},setTheme:E=>{b.set({theme:{...b.get().theme,...E}})},setLang:E=>{b.set({lang:Dp(E)})},unmount:()=>{_&&(_=!1,S(),C.unmount(),W0(),d.replaceChildren(),l?.())}}};function eg(r,a){const o=r instanceof HTMLElement?a:a??r;if(!o)throw new TypeError("AiDanaChat.mountLauncher: options are required");if(r instanceof HTMLElement)return sc(r,o,"launcher");const l=document.createElement("div");return l.setAttribute("data-ai-dana-chat",""),l.style.setProperty("all","initial"),document.body.append(l),sc(l,o,"launcher",()=>{l.remove()})}const tg=(r,a)=>sc(r,a,"window"),rg=["light","dark","auto"];class cc extends HTMLElement{constructor(){super(...arguments),ln(this,"handle")}connectedCallback(){const a=this.getAttribute("theme"),o=this.getAttribute("position"),l=this.getAttribute("site-key"),d=this.getAttribute("api-url"),p={...l?{siteKey:l}:{},...d===null?{}:{apiUrl:d},...this.getAttribute("lang")?{lang:this.getAttribute("lang")}:{},...a&&rg.includes(a)?{theme:{scheme:a}}:{},...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")?eg(this,p):tg(this,p)}disconnectedCallback(){this.handle?.unmount(),this.handle=void 0}attributeChangedCallback(a,o,l){!this.handle||o===l||(a==="lang"&&l&&this.handle.setLang(l),a==="theme"&&l&&rg.includes(l)&&this.handle.setTheme({scheme:l}))}open(){this.handle?.open()}close(){this.handle?.close()}setTheme(a){this.handle?.setTheme(a)}setLang(a){this.handle?.setLang(a)}}ln(cc,"observedAttributes",["lang","theme"]),typeof customElements<"u"&&!customElements.get("ai-dana-chat")&&customElements.define("ai-dana-chat",cc);export{sw as A,Rr as C,Jh as D,Mp as S,Hb as a,x0 as b,h0 as c,x as d,Nh as e,ks as f,op as g,Ms as h,cc as i,s as j,eg as k,tg as m,g0 as o,m0 as r,fn as s,Ep as t,Y as u,B as v,To as w};