diff --git "a/py_backend/static/assets/index-BgIwneLV.js" "b/py_backend/static/assets/index-BgIwneLV.js" deleted file mode 100644--- "a/py_backend/static/assets/index-BgIwneLV.js" +++ /dev/null @@ -1,175 +0,0 @@ -function p0(e,n){for(var i=0;ia[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const c of s)if(c.type==="childList")for(const f of c.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&a(f)}).observe(document,{childList:!0,subtree:!0});function i(s){const c={};return s.integrity&&(c.integrity=s.integrity),s.referrerPolicy&&(c.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?c.credentials="include":s.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function a(s){if(s.ep)return;s.ep=!0;const c=i(s);fetch(s.href,c)}})();var J4=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function m0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nd={exports:{}},Po={},rd={exports:{}},It={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var jm;function bx(){if(jm)return It;jm=1;var e=Symbol.for("react.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),_=Symbol.iterator;function v(E){return E===null||typeof E!="object"?null:(E=_&&E[_]||E["@@iterator"],typeof E=="function"?E:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,b={};function j(E,V,fe){this.props=E,this.context=V,this.refs=b,this.updater=fe||x}j.prototype.isReactComponent={},j.prototype.setState=function(E,V){if(typeof E!="object"&&typeof E!="function"&&E!=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,E,V,"setState")},j.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function N(){}N.prototype=j.prototype;function I(E,V,fe){this.props=E,this.context=V,this.refs=b,this.updater=fe||x}var F=I.prototype=new N;F.constructor=I,S(F,j.prototype),F.isPureReactComponent=!0;var O=Array.isArray,Z=Object.prototype.hasOwnProperty,ye={current:null},D={key:!0,ref:!0,__self:!0,__source:!0};function re(E,V,fe){var De,ce={},ve=null,we=null;if(V!=null)for(De in V.ref!==void 0&&(we=V.ref),V.key!==void 0&&(ve=""+V.key),V)Z.call(V,De)&&!D.hasOwnProperty(De)&&(ce[De]=V[De]);var je=arguments.length-2;if(je===1)ce.children=fe;else if(1>>1,fe=X[V];if(0>>1;Vs(ve,E))wes(je,ve)?(X[V]=je,X[we]=E,V=we):(X[V]=ve,X[ce]=E,V=ce);else if(wes(je,E))X[V]=je,X[we]=E,V=we;else break e}}return se}function s(X,se){var E=X.sortIndex-se.sortIndex;return E!==0?E:X.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var f=Date,d=f.now();e.unstable_now=function(){return f.now()-d}}var g=[],y=[],w=1,_=null,v=3,x=!1,S=!1,b=!1,j=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function F(X){for(var se=i(y);se!==null;){if(se.callback===null)a(y);else if(se.startTime<=X)a(y),se.sortIndex=se.expirationTime,n(g,se);else break;se=i(y)}}function O(X){if(b=!1,F(X),!S)if(i(g)!==null)S=!0,Ne(Z);else{var se=i(y);se!==null&&ne(O,se.startTime-X)}}function Z(X,se){S=!1,b&&(b=!1,N(re),re=-1),x=!0;var E=v;try{for(F(se),_=i(g);_!==null&&(!(_.expirationTime>se)||X&&!R());){var V=_.callback;if(typeof V=="function"){_.callback=null,v=_.priorityLevel;var fe=V(_.expirationTime<=se);se=e.unstable_now(),typeof fe=="function"?_.callback=fe:_===i(g)&&a(g),F(se)}else a(g);_=i(g)}if(_!==null)var De=!0;else{var ce=i(y);ce!==null&&ne(O,ce.startTime-se),De=!1}return De}finally{_=null,v=E,x=!1}}var ye=!1,D=null,re=-1,le=5,oe=-1;function R(){return!(e.unstable_now()-oeX||125V?(X.sortIndex=E,n(y,X),i(g)===null&&X===i(y)&&(b?(N(re),re=-1):b=!0,ne(O,E-V))):(X.sortIndex=fe,n(g,X),S||x||(S=!0,Ne(Z))),X},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(X){var se=v;return function(){var E=v;v=se;try{return X.apply(this,arguments)}finally{v=E}}}}(od)),od}var Lm;function jx(){return Lm||(Lm=1,ad.exports=kx()),ad.exports}/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Dm;function Tx(){if(Dm)return Zn;Dm=1;var e=sf(),n=jx();function i(t){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+t,o=1;o"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),g=Object.prototype.hasOwnProperty,y=/^[: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]*$/,w={},_={};function v(t){return g.call(_,t)?!0:g.call(w,t)?!1:y.test(t)?_[t]=!0:(w[t]=!0,!1)}function x(t,r,o,l){if(o!==null&&o.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return l?!1:o!==null?!o.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function S(t,r,o,l){if(r===null||typeof r>"u"||x(t,r,o,l))return!0;if(l)return!1;if(o!==null)switch(o.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function b(t,r,o,l,h,m,C){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=l,this.attributeNamespace=h,this.mustUseProperty=o,this.propertyName=t,this.type=r,this.sanitizeURL=m,this.removeEmptyString=C}var j={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){j[t]=new b(t,0,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var r=t[0];j[r]=new b(r,1,!1,t[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){j[t]=new b(t,2,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){j[t]=new b(t,2,!1,t,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(t){j[t]=new b(t,3,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(t){j[t]=new b(t,3,!0,t,null,!1,!1)}),["capture","download"].forEach(function(t){j[t]=new b(t,4,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(function(t){j[t]=new b(t,6,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(function(t){j[t]=new b(t,5,!1,t.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function I(t){return t[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(t){var r=t.replace(N,I);j[r]=new b(r,1,!1,t,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var r=t.replace(N,I);j[r]=new b(r,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(t){var r=t.replace(N,I);j[r]=new b(r,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(t){j[t]=new b(t,1,!1,t.toLowerCase(),null,!1,!1)}),j.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(t){j[t]=new b(t,1,!1,t.toLowerCase(),null,!0,!0)});function F(t,r,o,l){var h=j.hasOwnProperty(r)?j[r]:null;(h!==null?h.type!==0:l||!(2k||h[C]!==m[k]){var P=` -`+h[C].replace(" at new "," at ");return t.displayName&&P.includes("")&&(P=P.replace("",t.displayName)),P}while(1<=C&&0<=k);break}}}finally{De=!1,Error.prepareStackTrace=o}return(t=t?t.displayName||t.name:"")?fe(t):""}function ve(t){switch(t.tag){case 5:return fe(t.type);case 16:return fe("Lazy");case 13:return fe("Suspense");case 19:return fe("SuspenseList");case 0:case 2:case 15:return t=ce(t.type,!1),t;case 11:return t=ce(t.type.render,!1),t;case 1:return t=ce(t.type,!0),t;default:return""}}function we(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case D:return"Fragment";case ye:return"Portal";case le:return"Profiler";case re:return"StrictMode";case J:return"Suspense";case Y:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case R:return(t.displayName||"Context")+".Consumer";case oe:return(t._context.displayName||"Context")+".Provider";case U:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case xe:return r=t.displayName||null,r!==null?r:we(t.type)||"Memo";case Ne:r=t._payload,t=t._init;try{return we(t(r))}catch{}}return null}function je(t){var r=t.type;switch(t.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=r.render,t=t.displayName||t.name||"",r.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return we(r);case 8:return r===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 r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function Re(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Pe(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function H(t){var r=Pe(t)?"checked":"value",o=Object.getOwnPropertyDescriptor(t.constructor.prototype,r),l=""+t[r];if(!t.hasOwnProperty(r)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var h=o.get,m=o.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return h.call(this)},set:function(C){l=""+C,m.call(this,C)}}),Object.defineProperty(t,r,{enumerable:o.enumerable}),{getValue:function(){return l},setValue:function(C){l=""+C},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function Te(t){t._valueTracker||(t._valueTracker=H(t))}function Ye(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var o=r.getValue(),l="";return t&&(l=Pe(t)?t.checked?"true":"false":t.value),t=l,t!==o?(r.setValue(t),!0):!1}function Je(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function jt(t,r){var o=r.checked;return E({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??t._wrapperState.initialChecked})}function gt(t,r){var o=r.defaultValue==null?"":r.defaultValue,l=r.checked!=null?r.checked:r.defaultChecked;o=Re(r.value!=null?r.value:o),t._wrapperState={initialChecked:l,initialValue:o,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function Tt(t,r){r=r.checked,r!=null&&F(t,"checked",r,!1)}function ht(t,r){Tt(t,r);var o=Re(r.value),l=r.type;if(o!=null)l==="number"?(o===0&&t.value===""||t.value!=o)&&(t.value=""+o):t.value!==""+o&&(t.value=""+o);else if(l==="submit"||l==="reset"){t.removeAttribute("value");return}r.hasOwnProperty("value")?Oe(t,r.type,o):r.hasOwnProperty("defaultValue")&&Oe(t,r.type,Re(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(t.defaultChecked=!!r.defaultChecked)}function z(t,r,o){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var l=r.type;if(!(l!=="submit"&&l!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+t._wrapperState.initialValue,o||r===t.value||(t.value=r),t.defaultValue=r}o=t.name,o!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,o!==""&&(t.name=o)}function Oe(t,r,o){(r!=="number"||Je(t.ownerDocument)!==t)&&(o==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+o&&(t.defaultValue=""+o))}var lt=Array.isArray;function M(t,r,o,l){if(t=t.options,r){r={};for(var h=0;h"+r.valueOf().toString()+"",r=Ze.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;r.firstChild;)t.appendChild(r.firstChild)}});function ue(t,r){if(r){var o=t.firstChild;if(o&&o===t.lastChild&&o.nodeType===3){o.nodeValue=r;return}}t.textContent=r}var pt={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},Mt=["Webkit","ms","Moz","O"];Object.keys(pt).forEach(function(t){Mt.forEach(function(r){r=r+t.charAt(0).toUpperCase()+t.substring(1),pt[r]=pt[t]})});function _e(t,r,o){return r==null||typeof r=="boolean"||r===""?"":o||typeof r!="number"||r===0||pt.hasOwnProperty(t)&&pt[t]?(""+r).trim():r+"px"}function Bt(t,r){t=t.style;for(var o in r)if(r.hasOwnProperty(o)){var l=o.indexOf("--")===0,h=_e(o,r[o],l);o==="float"&&(o="cssFloat"),l?t.setProperty(o,h):t[o]=h}}var ot=E({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 nn(t,r){if(r){if(ot[t]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(i(137,t));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(i(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(i(61))}if(r.style!=null&&typeof r.style!="object")throw Error(i(62))}}function W(t,r){if(t.indexOf("-")===-1)return typeof r.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Se=null;function at(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Ge=null,Xe=null,Ie=null;function ee(t){if(t=go(t)){if(typeof Ge!="function")throw Error(i(280));var r=t.stateNode;r&&(r=Os(r),Ge(t.stateNode,t.type,r))}}function ut(t){Xe?Ie?Ie.push(t):Ie=[t]:Xe=t}function mt(){if(Xe){var t=Xe,r=Ie;if(Ie=Xe=null,ee(t),r)for(t=0;t>>=0,t===0?32:31-(Ln(t)/Br|0)|0}var Pi=64,sa=4194304;function ai(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function la(t,r){var o=t.pendingLanes;if(o===0)return 0;var l=0,h=t.suspendedLanes,m=t.pingedLanes,C=o&268435455;if(C!==0){var k=C&~h;k!==0?l=ai(k):(m&=C,m!==0&&(l=ai(m)))}else C=o&~h,C!==0?l=ai(C):m!==0&&(l=ai(m));if(l===0)return 0;if(r!==0&&r!==l&&(r&h)===0&&(h=l&-l,m=r&-r,h>=m||h===16&&(m&4194240)!==0))return r;if((l&4)!==0&&(l|=o&16),r=t.entangledLanes,r!==0)for(t=t.entanglements,r&=l;0o;o++)r.push(t);return r}function wt(t,r,o){t.pendingLanes|=r,r!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,r=31-Ot(r),t[r]=o}function Ht(t,r){var o=t.pendingLanes&~r;t.pendingLanes=r,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=r,t.mutableReadLanes&=r,t.entangledLanes&=r,r=t.entanglements;var l=t.eventTimes;for(t=t.expirationTimes;0=oo),wh=" ",_h=!1;function Ch(t,r){switch(t){case"keyup":return y1.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bh(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var da=!1;function w1(t,r){switch(t){case"compositionend":return bh(r);case"keypress":return r.which!==32?null:(_h=!0,wh);case"textInput":return t=r.data,t===wh&&_h?null:t;default:return null}}function _1(t,r){if(da)return t==="compositionend"||!Oc&&Ch(t,r)?(t=ph(),Ns=Mc=ui=null,da=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1=r)return{node:o,offset:r-t};t=l}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Mh(o)}}function Ih(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?Ih(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function Lh(){for(var t=window,r=Je();r instanceof t.HTMLIFrameElement;){try{var o=typeof r.contentWindow.location.href=="string"}catch{o=!1}if(o)t=r.contentWindow;else break;r=Je(t.document)}return r}function Fc(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}function M1(t){var r=Lh(),o=t.focusedElem,l=t.selectionRange;if(r!==o&&o&&o.ownerDocument&&Ih(o.ownerDocument.documentElement,o)){if(l!==null&&Fc(o)){if(r=l.start,t=l.end,t===void 0&&(t=r),"selectionStart"in o)o.selectionStart=r,o.selectionEnd=Math.min(t,o.value.length);else if(t=(r=o.ownerDocument||document)&&r.defaultView||window,t.getSelection){t=t.getSelection();var h=o.textContent.length,m=Math.min(l.start,h);l=l.end===void 0?m:Math.min(l.end,h),!t.extend&&m>l&&(h=l,l=m,m=h),h=Ph(o,m);var C=Ph(o,l);h&&C&&(t.rangeCount!==1||t.anchorNode!==h.node||t.anchorOffset!==h.offset||t.focusNode!==C.node||t.focusOffset!==C.offset)&&(r=r.createRange(),r.setStart(h.node,h.offset),t.removeAllRanges(),m>l?(t.addRange(r),t.extend(C.node,C.offset)):(r.setEnd(C.node,C.offset),t.addRange(r)))}}for(r=[],t=o;t=t.parentNode;)t.nodeType===1&&r.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o=document.documentMode,fa=null,zc=null,uo=null,Bc=!1;function Dh(t,r,o){var l=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Bc||fa==null||fa!==Je(l)||(l=fa,"selectionStart"in l&&Fc(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),uo&&co(uo,l)||(uo=l,l=Ls(zc,"onSelect"),0va||(t.current=Xc[va],Xc[va]=null,va--)}function Xt(t,r){va++,Xc[va]=t.current,t.current=r}var pi={},Dn=hi(pi),Hn=hi(!1),Li=pi;function ya(t,r){var o=t.type.contextTypes;if(!o)return pi;var l=t.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===r)return l.__reactInternalMemoizedMaskedChildContext;var h={},m;for(m in o)h[m]=r[m];return l&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=r,t.__reactInternalMemoizedMaskedChildContext=h),h}function qn(t){return t=t.childContextTypes,t!=null}function As(){tn(Hn),tn(Dn)}function Qh(t,r,o){if(Dn.current!==pi)throw Error(i(168));Xt(Dn,r),Xt(Hn,o)}function Jh(t,r,o){var l=t.stateNode;if(r=r.childContextTypes,typeof l.getChildContext!="function")return o;l=l.getChildContext();for(var h in l)if(!(h in r))throw Error(i(108,je(t)||"Unknown",h));return E({},o,l)}function $s(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||pi,Li=Dn.current,Xt(Dn,t),Xt(Hn,Hn.current),!0}function Kh(t,r,o){var l=t.stateNode;if(!l)throw Error(i(169));o?(t=Jh(t,r,Li),l.__reactInternalMemoizedMergedChildContext=t,tn(Hn),tn(Dn),Xt(Dn,t)):tn(Hn),Xt(Hn,o)}var Hr=null,Fs=!1,eu=!1;function Yh(t){Hr===null?Hr=[t]:Hr.push(t)}function U1(t){Fs=!0,Yh(t)}function mi(){if(!eu&&Hr!==null){eu=!0;var t=0,r=_t;try{var o=Hr;for(_t=1;t>=C,h-=C,qr=1<<32-Ot(r)+h|o<dt?(Cn=rt,rt=null):Cn=rt.sibling;var zt=de(B,rt,q[dt],Ce);if(zt===null){rt===null&&(rt=Cn);break}t&&rt&&zt.alternate===null&&r(B,rt),A=m(zt,A,dt),nt===null?We=zt:nt.sibling=zt,nt=zt,rt=Cn}if(dt===q.length)return o(B,rt),an&&Ri(B,dt),We;if(rt===null){for(;dtdt?(Cn=rt,rt=null):Cn=rt.sibling;var Si=de(B,rt,zt.value,Ce);if(Si===null){rt===null&&(rt=Cn);break}t&&rt&&Si.alternate===null&&r(B,rt),A=m(Si,A,dt),nt===null?We=Si:nt.sibling=Si,nt=Si,rt=Cn}if(zt.done)return o(B,rt),an&&Ri(B,dt),We;if(rt===null){for(;!zt.done;dt++,zt=q.next())zt=me(B,zt.value,Ce),zt!==null&&(A=m(zt,A,dt),nt===null?We=zt:nt.sibling=zt,nt=zt);return an&&Ri(B,dt),We}for(rt=l(B,rt);!zt.done;dt++,zt=q.next())zt=Fe(rt,B,dt,zt.value,Ce),zt!==null&&(t&&zt.alternate!==null&&rt.delete(zt.key===null?dt:zt.key),A=m(zt,A,dt),nt===null?We=zt:nt.sibling=zt,nt=zt);return t&&rt.forEach(function(Cx){return r(B,Cx)}),an&&Ri(B,dt),We}function hn(B,A,q,Ce){if(typeof q=="object"&&q!==null&&q.type===D&&q.key===null&&(q=q.props.children),typeof q=="object"&&q!==null){switch(q.$$typeof){case Z:e:{for(var We=q.key,nt=A;nt!==null;){if(nt.key===We){if(We=q.type,We===D){if(nt.tag===7){o(B,nt.sibling),A=h(nt,q.props.children),A.return=B,B=A;break e}}else if(nt.elementType===We||typeof We=="object"&&We!==null&&We.$$typeof===Ne&&fp(We)===nt.type){o(B,nt.sibling),A=h(nt,q.props),A.ref=vo(B,nt,q),A.return=B,B=A;break e}o(B,nt);break}else r(B,nt);nt=nt.sibling}q.type===D?(A=Hi(q.props.children,B.mode,Ce,q.key),A.return=B,B=A):(Ce=hl(q.type,q.key,q.props,null,B.mode,Ce),Ce.ref=vo(B,A,q),Ce.return=B,B=Ce)}return C(B);case ye:e:{for(nt=q.key;A!==null;){if(A.key===nt)if(A.tag===4&&A.stateNode.containerInfo===q.containerInfo&&A.stateNode.implementation===q.implementation){o(B,A.sibling),A=h(A,q.children||[]),A.return=B,B=A;break e}else{o(B,A);break}else r(B,A);A=A.sibling}A=Ku(q,B.mode,Ce),A.return=B,B=A}return C(B);case Ne:return nt=q._init,hn(B,A,nt(q._payload),Ce)}if(lt(q))return qe(B,A,q,Ce);if(se(q))return Ve(B,A,q,Ce);Zs(B,q)}return typeof q=="string"&&q!==""||typeof q=="number"?(q=""+q,A!==null&&A.tag===6?(o(B,A.sibling),A=h(A,q),A.return=B,B=A):(o(B,A),A=Ju(q,B.mode,Ce),A.return=B,B=A),C(B)):o(B,A)}return hn}var Sa=hp(!0),pp=hp(!1),yo={},Tr=hi(yo),xo=hi(yo),wo=hi(yo);function Ai(t){if(t===yo)throw Error(i(174));return t}function pu(t,r){switch(Xt(wo,r),Xt(xo,t),Xt(Tr,yo),t=r.nodeType,t){case 9:case 11:r=(r=r.documentElement)?r.namespaceURI:Zt(null,"");break;default:t=t===8?r.parentNode:r,r=t.namespaceURI||null,t=t.tagName,r=Zt(r,t)}tn(Tr),Xt(Tr,r)}function Na(){tn(Tr),tn(xo),tn(wo)}function mp(t){Ai(wo.current);var r=Ai(Tr.current),o=Zt(r,t.type);r!==o&&(Xt(xo,t),Xt(Tr,o))}function mu(t){xo.current===t&&(tn(Tr),tn(xo))}var cn=hi(0);function Qs(t){for(var r=t;r!==null;){if(r.tag===13){var o=r.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||o.data==="$!"))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var gu=[];function vu(){for(var t=0;to?o:4,t(!0);var l=yu.transition;yu.transition={};try{t(!1),r()}finally{_t=o,yu.transition=l}}function Lp(){return hr().memoizedState}function W1(t,r,o){var l=_i(t);if(o={lane:l,action:o,hasEagerState:!1,eagerState:null,next:null},Dp(t))Rp(r,o);else if(o=ip(t,r,o,l),o!==null){var h=zn();Nr(o,t,l,h),Op(o,r,l)}}function G1(t,r,o){var l=_i(t),h={lane:l,action:o,hasEagerState:!1,eagerState:null,next:null};if(Dp(t))Rp(r,h);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=r.lastRenderedReducer,m!==null))try{var C=r.lastRenderedState,k=m(C,o);if(h.hasEagerState=!0,h.eagerState=k,wr(k,C)){var P=r.interleaved;P===null?(h.next=h,uu(r)):(h.next=P.next,P.next=h),r.interleaved=h;return}}catch{}finally{}o=ip(t,r,h,l),o!==null&&(h=zn(),Nr(o,t,l,h),Op(o,r,l))}}function Dp(t){var r=t.alternate;return t===un||r!==null&&r===un}function Rp(t,r){_o=Ks=!0;var o=t.pending;o===null?r.next=r:(r.next=o.next,o.next=r),t.pending=r}function Op(t,r,o){if((o&4194240)!==0){var l=r.lanes;l&=t.pendingLanes,o|=l,r.lanes=o,tt(t,o)}}var el={readContext:fr,useCallback:Rn,useContext:Rn,useEffect:Rn,useImperativeHandle:Rn,useInsertionEffect:Rn,useLayoutEffect:Rn,useMemo:Rn,useReducer:Rn,useRef:Rn,useState:Rn,useDebugValue:Rn,useDeferredValue:Rn,useTransition:Rn,useMutableSource:Rn,useSyncExternalStore:Rn,useId:Rn,unstable_isNewReconciler:!1},Z1={readContext:fr,useCallback:function(t,r){return Mr().memoizedState=[t,r===void 0?null:r],t},useContext:fr,useEffect:Np,useImperativeHandle:function(t,r,o){return o=o!=null?o.concat([t]):null,Ys(4194308,4,jp.bind(null,r,t),o)},useLayoutEffect:function(t,r){return Ys(4194308,4,t,r)},useInsertionEffect:function(t,r){return Ys(4,2,t,r)},useMemo:function(t,r){var o=Mr();return r=r===void 0?null:r,t=t(),o.memoizedState=[t,r],t},useReducer:function(t,r,o){var l=Mr();return r=o!==void 0?o(r):r,l.memoizedState=l.baseState=r,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:r},l.queue=t,t=t.dispatch=W1.bind(null,un,t),[l.memoizedState,t]},useRef:function(t){var r=Mr();return t={current:t},r.memoizedState=t},useState:bp,useDebugValue:Nu,useDeferredValue:function(t){return Mr().memoizedState=t},useTransition:function(){var t=bp(!1),r=t[0];return t=V1.bind(null,t[1]),Mr().memoizedState=t,[r,t]},useMutableSource:function(){},useSyncExternalStore:function(t,r,o){var l=un,h=Mr();if(an){if(o===void 0)throw Error(i(407));o=o()}else{if(o=r(),_n===null)throw Error(i(349));($i&30)!==0||yp(l,r,o)}h.memoizedState=o;var m={value:o,getSnapshot:r};return h.queue=m,Np(wp.bind(null,l,m,t),[t]),l.flags|=2048,So(9,xp.bind(null,l,m,o,r),void 0,null),o},useId:function(){var t=Mr(),r=_n.identifierPrefix;if(an){var o=Vr,l=qr;o=(l&~(1<<32-Ot(l)-1)).toString(32)+o,r=":"+r+"R"+o,o=Co++,0<\/script>",t=t.removeChild(t.firstChild)):typeof l.is=="string"?t=C.createElement(o,{is:l.is}):(t=C.createElement(o),o==="select"&&(C=t,l.multiple?C.multiple=!0:l.size&&(C.size=l.size))):t=C.createElementNS(t,o),t[jr]=r,t[mo]=l,Xp(t,r,!1,!1),r.stateNode=t;e:{switch(C=W(o,l),o){case"dialog":en("cancel",t),en("close",t),h=l;break;case"iframe":case"object":case"embed":en("load",t),h=l;break;case"video":case"audio":for(h=0;hTa&&(r.flags|=128,l=!0,No(m,!1),r.lanes=4194304)}else{if(!l)if(t=Qs(C),t!==null){if(r.flags|=128,l=!0,o=t.updateQueue,o!==null&&(r.updateQueue=o,r.flags|=4),No(m,!0),m.tail===null&&m.tailMode==="hidden"&&!C.alternate&&!an)return On(r),null}else 2*Rt()-m.renderingStartTime>Ta&&o!==1073741824&&(r.flags|=128,l=!0,No(m,!1),r.lanes=4194304);m.isBackwards?(C.sibling=r.child,r.child=C):(o=m.last,o!==null?o.sibling=C:r.child=C,m.last=C)}return m.tail!==null?(r=m.tail,m.rendering=r,m.tail=r.sibling,m.renderingStartTime=Rt(),r.sibling=null,o=cn.current,Xt(cn,l?o&1|2:o&1),r):(On(r),null);case 22:case 23:return Gu(),l=r.memoizedState!==null,t!==null&&t.memoizedState!==null!==l&&(r.flags|=8192),l&&(r.mode&1)!==0?(ir&1073741824)!==0&&(On(r),r.subtreeFlags&6&&(r.flags|=8192)):On(r),null;case 24:return null;case 25:return null}throw Error(i(156,r.tag))}function nx(t,r){switch(nu(r),r.tag){case 1:return qn(r.type)&&As(),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return Na(),tn(Hn),tn(Dn),vu(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 5:return mu(r),null;case 13:if(tn(cn),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(i(340));_a()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return tn(cn),null;case 4:return Na(),null;case 10:return lu(r.type._context),null;case 22:case 23:return Gu(),null;case 24:return null;default:return null}}var rl=!1,An=!1,rx=typeof WeakSet=="function"?WeakSet:Set,Ue=null;function ka(t,r){var o=t.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(l){fn(t,r,l)}else o.current=null}function Ru(t,r,o){try{o()}catch(l){fn(t,r,l)}}var nm=!1;function ix(t,r){if(Gc=bs,t=Lh(),Fc(t)){if("selectionStart"in t)var o={start:t.selectionStart,end:t.selectionEnd};else e:{o=(o=t.ownerDocument)&&o.defaultView||window;var l=o.getSelection&&o.getSelection();if(l&&l.rangeCount!==0){o=l.anchorNode;var h=l.anchorOffset,m=l.focusNode;l=l.focusOffset;try{o.nodeType,m.nodeType}catch{o=null;break e}var C=0,k=-1,P=-1,G=0,pe=0,me=t,de=null;t:for(;;){for(var Fe;me!==o||h!==0&&me.nodeType!==3||(k=C+h),me!==m||l!==0&&me.nodeType!==3||(P=C+l),me.nodeType===3&&(C+=me.nodeValue.length),(Fe=me.firstChild)!==null;)de=me,me=Fe;for(;;){if(me===t)break t;if(de===o&&++G===h&&(k=C),de===m&&++pe===l&&(P=C),(Fe=me.nextSibling)!==null)break;me=de,de=me.parentNode}me=Fe}o=k===-1||P===-1?null:{start:k,end:P}}else o=null}o=o||{start:0,end:0}}else o=null;for(Zc={focusedElem:t,selectionRange:o},bs=!1,Ue=r;Ue!==null;)if(r=Ue,t=r.child,(r.subtreeFlags&1028)!==0&&t!==null)t.return=r,Ue=t;else for(;Ue!==null;){r=Ue;try{var qe=r.alternate;if((r.flags&1024)!==0)switch(r.tag){case 0:case 11:case 15:break;case 1:if(qe!==null){var Ve=qe.memoizedProps,hn=qe.memoizedState,B=r.stateNode,A=B.getSnapshotBeforeUpdate(r.elementType===r.type?Ve:Cr(r.type,Ve),hn);B.__reactInternalSnapshotBeforeUpdate=A}break;case 3:var q=r.stateNode.containerInfo;q.nodeType===1?q.textContent="":q.nodeType===9&&q.documentElement&&q.removeChild(q.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(Ce){fn(r,r.return,Ce)}if(t=r.sibling,t!==null){t.return=r.return,Ue=t;break}Ue=r.return}return qe=nm,nm=!1,qe}function Eo(t,r,o){var l=r.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var h=l=l.next;do{if((h.tag&t)===t){var m=h.destroy;h.destroy=void 0,m!==void 0&&Ru(r,o,m)}h=h.next}while(h!==l)}}function il(t,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&t)===t){var l=o.create;o.destroy=l()}o=o.next}while(o!==r)}}function Ou(t){var r=t.ref;if(r!==null){var o=t.stateNode;switch(t.tag){case 5:t=o;break;default:t=o}typeof r=="function"?r(t):r.current=t}}function rm(t){var r=t.alternate;r!==null&&(t.alternate=null,rm(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&(delete r[jr],delete r[mo],delete r[Yc],delete r[z1],delete r[B1])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function im(t){return t.tag===5||t.tag===3||t.tag===4}function am(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||im(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Au(t,r,o){var l=t.tag;if(l===5||l===6)t=t.stateNode,r?o.nodeType===8?o.parentNode.insertBefore(t,r):o.insertBefore(t,r):(o.nodeType===8?(r=o.parentNode,r.insertBefore(t,o)):(r=o,r.appendChild(t)),o=o._reactRootContainer,o!=null||r.onclick!==null||(r.onclick=Rs));else if(l!==4&&(t=t.child,t!==null))for(Au(t,r,o),t=t.sibling;t!==null;)Au(t,r,o),t=t.sibling}function $u(t,r,o){var l=t.tag;if(l===5||l===6)t=t.stateNode,r?o.insertBefore(t,r):o.appendChild(t);else if(l!==4&&(t=t.child,t!==null))for($u(t,r,o),t=t.sibling;t!==null;)$u(t,r,o),t=t.sibling}var kn=null,br=!1;function yi(t,r,o){for(o=o.child;o!==null;)om(t,r,o),o=o.sibling}function om(t,r,o){if(vn&&typeof vn.onCommitFiberUnmount=="function")try{vn.onCommitFiberUnmount(Gt,o)}catch{}switch(o.tag){case 5:An||ka(o,r);case 6:var l=kn,h=br;kn=null,yi(t,r,o),kn=l,br=h,kn!==null&&(br?(t=kn,o=o.stateNode,t.nodeType===8?t.parentNode.removeChild(o):t.removeChild(o)):kn.removeChild(o.stateNode));break;case 18:kn!==null&&(br?(t=kn,o=o.stateNode,t.nodeType===8?Kc(t.parentNode,o):t.nodeType===1&&Kc(t,o),ro(t)):Kc(kn,o.stateNode));break;case 4:l=kn,h=br,kn=o.stateNode.containerInfo,br=!0,yi(t,r,o),kn=l,br=h;break;case 0:case 11:case 14:case 15:if(!An&&(l=o.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){h=l=l.next;do{var m=h,C=m.destroy;m=m.tag,C!==void 0&&((m&2)!==0||(m&4)!==0)&&Ru(o,r,C),h=h.next}while(h!==l)}yi(t,r,o);break;case 1:if(!An&&(ka(o,r),l=o.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=o.memoizedProps,l.state=o.memoizedState,l.componentWillUnmount()}catch(k){fn(o,r,k)}yi(t,r,o);break;case 21:yi(t,r,o);break;case 22:o.mode&1?(An=(l=An)||o.memoizedState!==null,yi(t,r,o),An=l):yi(t,r,o);break;default:yi(t,r,o)}}function sm(t){var r=t.updateQueue;if(r!==null){t.updateQueue=null;var o=t.stateNode;o===null&&(o=t.stateNode=new rx),r.forEach(function(l){var h=hx.bind(null,t,l);o.has(l)||(o.add(l),l.then(h,h))})}}function Sr(t,r){var o=r.deletions;if(o!==null)for(var l=0;lh&&(h=C),l&=~m}if(l=h,l=Rt()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*ox(l/1960))-l,10t?16:t,wi===null)var l=!1;else{if(t=wi,wi=null,cl=0,(Ft&6)!==0)throw Error(i(331));var h=Ft;for(Ft|=4,Ue=t.current;Ue!==null;){var m=Ue,C=m.child;if((Ue.flags&16)!==0){var k=m.deletions;if(k!==null){for(var P=0;PRt()-Bu?Bi(t,0):zu|=o),Gn(t,r)}function wm(t,r){r===0&&((t.mode&1)===0?r=1:(r=sa,sa<<=1,(sa&130023424)===0&&(sa=4194304)));var o=zn();t=Wr(t,r),t!==null&&(wt(t,r,o),Gn(t,o))}function fx(t){var r=t.memoizedState,o=0;r!==null&&(o=r.retryLane),wm(t,o)}function hx(t,r){var o=0;switch(t.tag){case 13:var l=t.stateNode,h=t.memoizedState;h!==null&&(o=h.retryLane);break;case 19:l=t.stateNode;break;default:throw Error(i(314))}l!==null&&l.delete(r),wm(t,o)}var _m;_m=function(t,r,o){if(t!==null)if(t.memoizedProps!==r.pendingProps||Hn.current)Vn=!0;else{if((t.lanes&o)===0&&(r.flags&128)===0)return Vn=!1,ex(t,r,o);Vn=(t.flags&131072)!==0}else Vn=!1,an&&(r.flags&1048576)!==0&&Xh(r,Bs,r.index);switch(r.lanes=0,r.tag){case 2:var l=r.type;nl(t,r),t=r.pendingProps;var h=ya(r,Dn.current);ba(r,o),h=wu(null,r,l,t,h,o);var m=_u();return r.flags|=1,typeof h=="object"&&h!==null&&typeof h.render=="function"&&h.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,qn(l)?(m=!0,$s(r)):m=!1,r.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,du(r),h.updater=Gs,r.stateNode=h,h._reactInternals=r,hu(r,l,t,o),r=Tu(null,r,l,!0,m,o)):(r.tag=0,an&&m&&tu(r),Fn(null,r,h,o),r=r.child),r;case 16:l=r.elementType;e:{switch(nl(t,r),t=r.pendingProps,h=l._init,l=h(l._payload),r.type=l,h=r.tag=mx(l),t=Cr(l,t),h){case 0:r=ju(null,r,l,t,o);break e;case 1:r=Gp(null,r,l,t,o);break e;case 11:r=Up(null,r,l,t,o);break e;case 14:r=Hp(null,r,l,Cr(l.type,t),o);break e}throw Error(i(306,l,""))}return r;case 0:return l=r.type,h=r.pendingProps,h=r.elementType===l?h:Cr(l,h),ju(t,r,l,h,o);case 1:return l=r.type,h=r.pendingProps,h=r.elementType===l?h:Cr(l,h),Gp(t,r,l,h,o);case 3:e:{if(Zp(r),t===null)throw Error(i(387));l=r.pendingProps,m=r.memoizedState,h=m.element,ap(t,r),Ws(r,l,null,o);var C=r.memoizedState;if(l=C.element,m.isDehydrated)if(m={element:l,isDehydrated:!1,cache:C.cache,pendingSuspenseBoundaries:C.pendingSuspenseBoundaries,transitions:C.transitions},r.updateQueue.baseState=m,r.memoizedState=m,r.flags&256){h=Ea(Error(i(423)),r),r=Qp(t,r,l,o,h);break e}else if(l!==h){h=Ea(Error(i(424)),r),r=Qp(t,r,l,o,h);break e}else for(rr=fi(r.stateNode.containerInfo.firstChild),nr=r,an=!0,_r=null,o=pp(r,null,l,o),r.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(_a(),l===h){r=Zr(t,r,o);break e}Fn(t,r,l,o)}r=r.child}return r;case 5:return mp(r),t===null&&iu(r),l=r.type,h=r.pendingProps,m=t!==null?t.memoizedProps:null,C=h.children,Qc(l,h)?C=null:m!==null&&Qc(l,m)&&(r.flags|=32),Wp(t,r),Fn(t,r,C,o),r.child;case 6:return t===null&&iu(r),null;case 13:return Jp(t,r,o);case 4:return pu(r,r.stateNode.containerInfo),l=r.pendingProps,t===null?r.child=Sa(r,null,l,o):Fn(t,r,l,o),r.child;case 11:return l=r.type,h=r.pendingProps,h=r.elementType===l?h:Cr(l,h),Up(t,r,l,h,o);case 7:return Fn(t,r,r.pendingProps,o),r.child;case 8:return Fn(t,r,r.pendingProps.children,o),r.child;case 12:return Fn(t,r,r.pendingProps.children,o),r.child;case 10:e:{if(l=r.type._context,h=r.pendingProps,m=r.memoizedProps,C=h.value,Xt(Hs,l._currentValue),l._currentValue=C,m!==null)if(wr(m.value,C)){if(m.children===h.children&&!Hn.current){r=Zr(t,r,o);break e}}else for(m=r.child,m!==null&&(m.return=r);m!==null;){var k=m.dependencies;if(k!==null){C=m.child;for(var P=k.firstContext;P!==null;){if(P.context===l){if(m.tag===1){P=Gr(-1,o&-o),P.tag=2;var G=m.updateQueue;if(G!==null){G=G.shared;var pe=G.pending;pe===null?P.next=P:(P.next=pe.next,pe.next=P),G.pending=P}}m.lanes|=o,P=m.alternate,P!==null&&(P.lanes|=o),cu(m.return,o,r),k.lanes|=o;break}P=P.next}}else if(m.tag===10)C=m.type===r.type?null:m.child;else if(m.tag===18){if(C=m.return,C===null)throw Error(i(341));C.lanes|=o,k=C.alternate,k!==null&&(k.lanes|=o),cu(C,o,r),C=m.sibling}else C=m.child;if(C!==null)C.return=m;else for(C=m;C!==null;){if(C===r){C=null;break}if(m=C.sibling,m!==null){m.return=C.return,C=m;break}C=C.return}m=C}Fn(t,r,h.children,o),r=r.child}return r;case 9:return h=r.type,l=r.pendingProps.children,ba(r,o),h=fr(h),l=l(h),r.flags|=1,Fn(t,r,l,o),r.child;case 14:return l=r.type,h=Cr(l,r.pendingProps),h=Cr(l.type,h),Hp(t,r,l,h,o);case 15:return qp(t,r,r.type,r.pendingProps,o);case 17:return l=r.type,h=r.pendingProps,h=r.elementType===l?h:Cr(l,h),nl(t,r),r.tag=1,qn(l)?(t=!0,$s(r)):t=!1,ba(r,o),up(r,l,h),hu(r,l,h,o),Tu(null,r,l,!0,t,o);case 19:return Yp(t,r,o);case 22:return Vp(t,r,o)}throw Error(i(156,r.tag))};function Cm(t,r){return Wt(t,r)}function px(t,r,o,l){this.tag=t,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function mr(t,r,o,l){return new px(t,r,o,l)}function Qu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function mx(t){if(typeof t=="function")return Qu(t)?1:0;if(t!=null){if(t=t.$$typeof,t===U)return 11;if(t===xe)return 14}return 2}function bi(t,r){var o=t.alternate;return o===null?(o=mr(t.tag,r,t.key,t.mode),o.elementType=t.elementType,o.type=t.type,o.stateNode=t.stateNode,o.alternate=t,t.alternate=o):(o.pendingProps=r,o.type=t.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=t.flags&14680064,o.childLanes=t.childLanes,o.lanes=t.lanes,o.child=t.child,o.memoizedProps=t.memoizedProps,o.memoizedState=t.memoizedState,o.updateQueue=t.updateQueue,r=t.dependencies,o.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},o.sibling=t.sibling,o.index=t.index,o.ref=t.ref,o}function hl(t,r,o,l,h,m){var C=2;if(l=t,typeof t=="function")Qu(t)&&(C=1);else if(typeof t=="string")C=5;else e:switch(t){case D:return Hi(o.children,h,m,r);case re:C=8,h|=8;break;case le:return t=mr(12,o,r,h|2),t.elementType=le,t.lanes=m,t;case J:return t=mr(13,o,r,h),t.elementType=J,t.lanes=m,t;case Y:return t=mr(19,o,r,h),t.elementType=Y,t.lanes=m,t;case ne:return pl(o,h,m,r);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case oe:C=10;break e;case R:C=9;break e;case U:C=11;break e;case xe:C=14;break e;case Ne:C=16,l=null;break e}throw Error(i(130,t==null?t:typeof t,""))}return r=mr(C,o,r,h),r.elementType=t,r.type=l,r.lanes=m,r}function Hi(t,r,o,l){return t=mr(7,t,l,r),t.lanes=o,t}function pl(t,r,o,l){return t=mr(22,t,l,r),t.elementType=ne,t.lanes=o,t.stateNode={isHidden:!1},t}function Ju(t,r,o){return t=mr(6,t,null,r),t.lanes=o,t}function Ku(t,r,o){return r=mr(4,t.children!==null?t.children:[],t.key,r),r.lanes=o,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}function gx(t,r,o,l,h){this.tag=r,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ct(0),this.expirationTimes=Ct(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ct(0),this.identifierPrefix=l,this.onRecoverableError=h,this.mutableSourceEagerHydrationData=null}function Yu(t,r,o,l,h,m,C,k,P){return t=new gx(t,r,o,k,P),r===1?(r=1,m===!0&&(r|=8)):r=0,m=mr(3,null,null,r),t.current=m,m.stateNode=t,m.memoizedState={element:l,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},du(m),t}function vx(t,r,o){var l=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),id.exports=Tx(),id.exports}var Om;function Mx(){if(Om)return _l;Om=1;var e=g0();return _l.createRoot=e.createRoot,_l.hydrateRoot=e.hydrateRoot,_l}var Px=Mx(),lf=g0();const Ix=m0(lf),Lx=p0({__proto__:null,default:Ix},[lf]);/** - * @remix-run/router v1.23.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function sn(){return sn=Object.assign?Object.assign.bind():function(e){for(var n=1;n"u")throw new Error(n)}function Xi(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function Rx(){return Math.random().toString(36).substr(2,8)}function $m(e,n){return{usr:e.state,key:e.key,idx:n}}function es(e,n,i,a){return i===void 0&&(i=null),sn({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof n=="string"?ri(n):n,{state:i,key:n&&n.key||a||Rx()})}function ea(e){let{pathname:n="/",search:i="",hash:a=""}=e;return i&&i!=="?"&&(n+=i.charAt(0)==="?"?i:"?"+i),a&&a!=="#"&&(n+=a.charAt(0)==="#"?a:"#"+a),n}function ri(e){let n={};if(e){let i=e.indexOf("#");i>=0&&(n.hash=e.substr(i),e=e.substr(0,i));let a=e.indexOf("?");a>=0&&(n.search=e.substr(a),e=e.substr(0,a)),e&&(n.pathname=e)}return n}function Ox(e,n,i,a){a===void 0&&(a={});let{window:s=document.defaultView,v5Compat:c=!1}=a,f=s.history,d=mn.Pop,g=null,y=w();y==null&&(y=0,f.replaceState(sn({},f.state,{idx:y}),""));function w(){return(f.state||{idx:null}).idx}function _(){d=mn.Pop;let j=w(),N=j==null?null:j-y;y=j,g&&g({action:d,location:b.location,delta:N})}function v(j,N){d=mn.Push;let I=es(b.location,j,N);i&&i(I,j),y=w()+1;let F=$m(I,y),O=b.createHref(I);try{f.pushState(F,"",O)}catch(Z){if(Z instanceof DOMException&&Z.name==="DataCloneError")throw Z;s.location.assign(O)}c&&g&&g({action:d,location:b.location,delta:1})}function x(j,N){d=mn.Replace;let I=es(b.location,j,N);i&&i(I,j),y=w();let F=$m(I,y),O=b.createHref(I);f.replaceState(F,"",O),c&&g&&g({action:d,location:b.location,delta:0})}function S(j){let N=s.location.origin!=="null"?s.location.origin:s.location.href,I=typeof j=="string"?j:ea(j);return I=I.replace(/ $/,"%20"),Dt(N,"No window.location.(origin|href) available to create URL for href: "+I),new URL(I,N)}let b={get action(){return d},get location(){return e(s,f)},listen(j){if(g)throw new Error("A history only accepts one active listener");return s.addEventListener(Am,_),g=j,()=>{s.removeEventListener(Am,_),g=null}},createHref(j){return n(s,j)},createURL:S,encodeLocation(j){let N=S(j);return{pathname:N.pathname,search:N.search,hash:N.hash}},push:v,replace:x,go(j){return f.go(j)}};return b}var Qt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Qt||(Qt={}));const Ax=new Set(["lazy","caseSensitive","path","id","index","children"]);function $x(e){return e.index===!0}function Ql(e,n,i,a){return i===void 0&&(i=[]),a===void 0&&(a={}),e.map((s,c)=>{let f=[...i,String(c)],d=typeof s.id=="string"?s.id:f.join("-");if(Dt(s.index!==!0||!s.children,"Cannot specify children on an index route"),Dt(!a[d],'Found a route id collision on id "'+d+`". Route id's must be globally unique within Data Router usages`),$x(s)){let g=sn({},s,n(s),{id:d});return a[d]=g,g}else{let g=sn({},s,n(s),{id:d,children:void 0});return a[d]=g,s.children&&(g.children=Ql(s.children,n,f,a)),g}})}function Gi(e,n,i){return i===void 0&&(i="/"),Ul(e,n,i,!1)}function Ul(e,n,i,a){let s=typeof n=="string"?ri(n):n,c=Qa(s.pathname||"/",i);if(c==null)return null;let f=v0(e);zx(f);let d=null;for(let g=0;d==null&&g{let g={relativePath:d===void 0?c.path||"":d,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};g.relativePath.startsWith("/")&&(Dt(g.relativePath.startsWith(a),'Absolute route path "'+g.relativePath+'" nested under path '+('"'+a+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),g.relativePath=g.relativePath.slice(a.length));let y=ei([a,g.relativePath]),w=i.concat(g);c.children&&c.children.length>0&&(Dt(c.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+y+'".')),v0(c.children,n,w,y)),!(c.path==null&&!c.index)&&n.push({path:y,score:Gx(y,c.index),routesMeta:w})};return e.forEach((c,f)=>{var d;if(c.path===""||!((d=c.path)!=null&&d.includes("?")))s(c,f);else for(let g of y0(c.path))s(c,f,g)}),n}function y0(e){let n=e.split("/");if(n.length===0)return[];let[i,...a]=n,s=i.endsWith("?"),c=i.replace(/\?$/,"");if(a.length===0)return s?[c,""]:[c];let f=y0(a.join("/")),d=[];return d.push(...f.map(g=>g===""?c:[c,g].join("/"))),s&&d.push(...f),d.map(g=>e.startsWith("/")&&g===""?"/":g)}function zx(e){e.sort((n,i)=>n.score!==i.score?i.score-n.score:Zx(n.routesMeta.map(a=>a.childrenIndex),i.routesMeta.map(a=>a.childrenIndex)))}const Bx=/^:[\w-]+$/,Ux=3,Hx=2,qx=1,Vx=10,Wx=-2,Fm=e=>e==="*";function Gx(e,n){let i=e.split("/"),a=i.length;return i.some(Fm)&&(a+=Wx),n&&(a+=Hx),i.filter(s=>!Fm(s)).reduce((s,c)=>s+(Bx.test(c)?Ux:c===""?qx:Vx),a)}function Zx(e,n){return e.length===n.length&&e.slice(0,-1).every((a,s)=>a===n[s])?e[e.length-1]-n[n.length-1]:0}function Qx(e,n,i){i===void 0&&(i=!1);let{routesMeta:a}=e,s={},c="/",f=[];for(let d=0;d{let{paramName:v,isOptional:x}=w;if(v==="*"){let b=d[_]||"";f=c.slice(0,c.length-b.length).replace(/(.)\/+$/,"$1")}const S=d[_];return x&&!S?y[v]=void 0:y[v]=(S||"").replace(/%2F/g,"/"),y},{}),pathname:c,pathnameBase:f,pattern:e}}function Jx(e,n,i){n===void 0&&(n=!1),i===void 0&&(i=!0),Xi(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let a=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,d,g)=>(a.push({paramName:d,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(a.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,n?void 0:"i"),a]}function Kx(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return Xi(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+n+").")),e}}function Qa(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let i=n.endsWith("/")?n.length-1:n.length,a=e.charAt(i);return a&&a!=="/"?null:e.slice(i)||"/"}function Yx(e,n){n===void 0&&(n="/");let{pathname:i,search:a="",hash:s=""}=typeof e=="string"?ri(e):e;return{pathname:i?i.startsWith("/")?i:Xx(i,n):n,search:tw(a),hash:nw(s)}}function Xx(e,n){let i=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?i.length>1&&i.pop():s!=="."&&i.push(s)}),i.length>1?i.join("/"):"/"}function sd(e,n,i,a){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+n+"` field ["+JSON.stringify(a)+"]. Please separate it out to the ")+("`to."+i+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function x0(e){return e.filter((n,i)=>i===0||n.route.path&&n.route.path.length>0)}function cf(e,n){let i=x0(e);return n?i.map((a,s)=>s===i.length-1?a.pathname:a.pathnameBase):i.map(a=>a.pathnameBase)}function uf(e,n,i,a){a===void 0&&(a=!1);let s;typeof e=="string"?s=ri(e):(s=sn({},e),Dt(!s.pathname||!s.pathname.includes("?"),sd("?","pathname","search",s)),Dt(!s.pathname||!s.pathname.includes("#"),sd("#","pathname","hash",s)),Dt(!s.search||!s.search.includes("#"),sd("#","search","hash",s)));let c=e===""||s.pathname==="",f=c?"/":s.pathname,d;if(f==null)d=i;else{let _=n.length-1;if(!a&&f.startsWith("..")){let v=f.split("/");for(;v[0]==="..";)v.shift(),_-=1;s.pathname=v.join("/")}d=_>=0?n[_]:"/"}let g=Yx(s,d),y=f&&f!=="/"&&f.endsWith("/"),w=(c||f===".")&&i.endsWith("/");return!g.pathname.endsWith("/")&&(y||w)&&(g.pathname+="/"),g}const ei=e=>e.join("/").replace(/\/\/+/g,"/"),ew=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),tw=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,nw=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Jl{constructor(n,i,a,s){s===void 0&&(s=!1),this.status=n,this.statusText=i||"",this.internal=s,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}}function ts(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const w0=["post","put","patch","delete"],rw=new Set(w0),iw=["get",...w0],aw=new Set(iw),ow=new Set([301,302,303,307,308]),sw=new Set([307,308]),ld={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},lw={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Io={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},df=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,cw=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),_0="remix-router-transitions";function uw(e){const n=e.window?e.window:typeof window<"u"?window:void 0,i=typeof n<"u"&&typeof n.document<"u"&&typeof n.document.createElement<"u",a=!i;Dt(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let s;if(e.mapRouteProperties)s=e.mapRouteProperties;else if(e.detectErrorBoundary){let T=e.detectErrorBoundary;s=L=>({hasErrorBoundary:T(L)})}else s=cw;let c={},f=Ql(e.routes,s,void 0,c),d,g=e.basename||"/",y=e.dataStrategy||pw,w=e.patchRoutesOnNavigation,_=sn({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),v=null,x=new Set,S=null,b=null,j=null,N=e.hydrationData!=null,I=Gi(f,e.history.location,g),F=!1,O=null;if(I==null&&!w){let T=Qn(404,{pathname:e.history.location.pathname}),{matches:L,route:Q}=Km(f);I=L,O={[Q.id]:T}}I&&!e.hydrationData&&rn(I,f,e.history.location.pathname).active&&(I=null);let Z;if(I)if(I.some(T=>T.route.lazy))Z=!1;else if(!I.some(T=>T.route.loader))Z=!0;else if(_.v7_partialHydration){let T=e.hydrationData?e.hydrationData.loaderData:null,L=e.hydrationData?e.hydrationData.errors:null;if(L){let Q=I.findIndex(ae=>L[ae.route.id]!==void 0);Z=I.slice(0,Q+1).every(ae=>!Id(ae.route,T,L))}else Z=I.every(Q=>!Id(Q.route,T,L))}else Z=e.hydrationData!=null;else if(Z=!1,I=[],_.v7_partialHydration){let T=rn(null,f,e.history.location.pathname);T.active&&T.matches&&(F=!0,I=T.matches)}let ye,D={historyAction:e.history.action,location:e.history.location,matches:I,initialized:Z,navigation:ld,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||O,fetchers:new Map,blockers:new Map},re=mn.Pop,le=!1,oe,R=!1,U=new Map,J=null,Y=!1,xe=!1,Ne=[],ne=new Set,X=new Map,se=0,E=-1,V=new Map,fe=new Set,De=new Map,ce=new Map,ve=new Set,we=new Map,je=new Map,Re;function Pe(){if(v=e.history.listen(T=>{let{action:L,location:Q,delta:ae}=T;if(Re){Re(),Re=void 0;return}Xi(je.size===0||ae!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ke=Ge({currentLocation:D.location,nextLocation:Q,historyAction:L});if(ke&&ae!=null){let He=new Promise(et=>{Re=et});e.history.go(ae*-1),at(ke,{state:"blocked",location:Q,proceed(){at(ke,{state:"proceeding",proceed:void 0,reset:void 0,location:Q}),He.then(()=>e.history.go(ae))},reset(){let et=new Map(D.blockers);et.set(ke,Io),Ye({blockers:et})}});return}return Tt(L,Q)}),i){jw(n,U);let T=()=>Tw(n,U);n.addEventListener("pagehide",T),J=()=>n.removeEventListener("pagehide",T)}return D.initialized||Tt(mn.Pop,D.location,{initialHydration:!0}),ye}function H(){v&&v(),J&&J(),x.clear(),oe&&oe.abort(),D.fetchers.forEach((T,L)=>pt(L)),D.blockers.forEach((T,L)=>Se(L))}function Te(T){return x.add(T),()=>x.delete(T)}function Ye(T,L){L===void 0&&(L={}),D=sn({},D,T);let Q=[],ae=[];_.v7_fetcherPersist&&D.fetchers.forEach((ke,He)=>{ke.state==="idle"&&(ve.has(He)?ae.push(He):Q.push(He))}),ve.forEach(ke=>{!D.fetchers.has(ke)&&!X.has(ke)&&ae.push(ke)}),[...x].forEach(ke=>ke(D,{deletedFetchers:ae,viewTransitionOpts:L.viewTransitionOpts,flushSync:L.flushSync===!0})),_.v7_fetcherPersist?(Q.forEach(ke=>D.fetchers.delete(ke)),ae.forEach(ke=>pt(ke))):ae.forEach(ke=>ve.delete(ke))}function Je(T,L,Q){var ae,ke;let{flushSync:He}=Q===void 0?{}:Q,et=D.actionData!=null&&D.navigation.formMethod!=null&&Er(D.navigation.formMethod)&&D.navigation.state==="loading"&&((ae=T.state)==null?void 0:ae._isRedirect)!==!0,Ae;L.actionData?Object.keys(L.actionData).length>0?Ae=L.actionData:Ae=null:et?Ae=D.actionData:Ae=null;let Be=L.loaderData?Qm(D.loaderData,L.loaderData,L.matches||[],L.errors):D.loaderData,$e=D.blockers;$e.size>0&&($e=new Map($e),$e.forEach((St,ln)=>$e.set(ln,Io)));let ze=le===!0||D.navigation.formMethod!=null&&Er(D.navigation.formMethod)&&((ke=T.state)==null?void 0:ke._isRedirect)!==!0;d&&(f=d,d=void 0),Y||re===mn.Pop||(re===mn.Push?e.history.push(T,T.state):re===mn.Replace&&e.history.replace(T,T.state));let st;if(re===mn.Pop){let St=U.get(D.location.pathname);St&&St.has(T.pathname)?st={currentLocation:D.location,nextLocation:T}:U.has(T.pathname)&&(st={currentLocation:T,nextLocation:D.location})}else if(R){let St=U.get(D.location.pathname);St?St.add(T.pathname):(St=new Set([T.pathname]),U.set(D.location.pathname,St)),st={currentLocation:D.location,nextLocation:T}}Ye(sn({},L,{actionData:Ae,loaderData:Be,historyAction:re,location:T,initialized:!0,navigation:ld,revalidation:"idle",restoreScrollPosition:dn(T,L.matches||D.matches),preventScrollReset:ze,blockers:$e}),{viewTransitionOpts:st,flushSync:He===!0}),re=mn.Pop,le=!1,R=!1,Y=!1,xe=!1,Ne=[]}async function jt(T,L){if(typeof T=="number"){e.history.go(T);return}let Q=Pd(D.location,D.matches,g,_.v7_prependBasename,T,_.v7_relativeSplatPath,L?.fromRouteId,L?.relative),{path:ae,submission:ke,error:He}=Bm(_.v7_normalizeFormMethod,!1,Q,L),et=D.location,Ae=es(D.location,ae,L&&L.state);Ae=sn({},Ae,e.history.encodeLocation(Ae));let Be=L&&L.replace!=null?L.replace:void 0,$e=mn.Push;Be===!0?$e=mn.Replace:Be===!1||ke!=null&&Er(ke.formMethod)&&ke.formAction===D.location.pathname+D.location.search&&($e=mn.Replace);let ze=L&&"preventScrollReset"in L?L.preventScrollReset===!0:void 0,st=(L&&L.flushSync)===!0,St=Ge({currentLocation:et,nextLocation:Ae,historyAction:$e});if(St){at(St,{state:"blocked",location:Ae,proceed(){at(St,{state:"proceeding",proceed:void 0,reset:void 0,location:Ae}),jt(T,L)},reset(){let ln=new Map(D.blockers);ln.set(St,Io),Ye({blockers:ln})}});return}return await Tt($e,Ae,{submission:ke,pendingError:He,preventScrollReset:ze,replace:L&&L.replace,enableViewTransition:L&&L.viewTransition,flushSync:st})}function gt(){if(Zt(),Ye({revalidation:"loading"}),D.navigation.state!=="submitting"){if(D.navigation.state==="idle"){Tt(D.historyAction,D.location,{startUninterruptedRevalidation:!0});return}Tt(re||D.historyAction,D.navigation.location,{overrideNavigation:D.navigation,enableViewTransition:R===!0})}}async function Tt(T,L,Q){oe&&oe.abort(),oe=null,re=T,Y=(Q&&Q.startUninterruptedRevalidation)===!0,mt(D.location,D.matches),le=(Q&&Q.preventScrollReset)===!0,R=(Q&&Q.enableViewTransition)===!0;let ae=d||f,ke=Q&&Q.overrideNavigation,He=Q!=null&&Q.initialHydration&&D.matches&&D.matches.length>0&&!F?D.matches:Gi(ae,L,g),et=(Q&&Q.flushSync)===!0;if(He&&D.initialized&&!xe&&ww(D.location,L)&&!(Q&&Q.submission&&Er(Q.submission.formMethod))){Je(L,{matches:He},{flushSync:et});return}let Ae=rn(He,ae,L.pathname);if(Ae.active&&Ae.matches&&(He=Ae.matches),!He){let{error:Ut,notFoundMatches:Et,route:Wt}=Xe(L.pathname);Je(L,{matches:Et,loaderData:{},errors:{[Wt.id]:Ut}},{flushSync:et});return}oe=new AbortController;let Be=Pa(e.history,L,oe.signal,Q&&Q.submission),$e;if(Q&&Q.pendingError)$e=[Zi(He).route.id,{type:Qt.error,error:Q.pendingError}];else if(Q&&Q.submission&&Er(Q.submission.formMethod)){let Ut=await ht(Be,L,Q.submission,He,Ae.active,{replace:Q.replace,flushSync:et});if(Ut.shortCircuited)return;if(Ut.pendingActionResult){let[Et,Wt]=Ut.pendingActionResult;if(or(Wt)&&ts(Wt.error)&&Wt.error.status===404){oe=null,Je(L,{matches:Ut.matches,loaderData:{},errors:{[Et]:Wt.error}});return}}He=Ut.matches||He,$e=Ut.pendingActionResult,ke=cd(L,Q.submission),et=!1,Ae.active=!1,Be=Pa(e.history,Be.url,Be.signal)}let{shortCircuited:ze,matches:st,loaderData:St,errors:ln}=await z(Be,L,He,Ae.active,ke,Q&&Q.submission,Q&&Q.fetcherSubmission,Q&&Q.replace,Q&&Q.initialHydration===!0,et,$e);ze||(oe=null,Je(L,sn({matches:st||He},Jm($e),{loaderData:St,errors:ln})))}async function ht(T,L,Q,ae,ke,He){He===void 0&&(He={}),Zt();let et=Ew(L,Q);if(Ye({navigation:et},{flushSync:He.flushSync===!0}),ke){let $e=await qt(ae,L.pathname,T.signal);if($e.type==="aborted")return{shortCircuited:!0};if($e.type==="error"){let ze=Zi($e.partialMatches).route.id;return{matches:$e.partialMatches,pendingActionResult:[ze,{type:Qt.error,error:$e.error}]}}else if($e.matches)ae=$e.matches;else{let{notFoundMatches:ze,error:st,route:St}=Xe(L.pathname);return{matches:ze,pendingActionResult:[St.id,{type:Qt.error,error:st}]}}}let Ae,Be=Qo(ae,L);if(!Be.route.action&&!Be.route.lazy)Ae={type:Qt.error,error:Qn(405,{method:T.method,pathname:L.pathname,routeId:Be.route.id})};else if(Ae=(await he("action",D,T,[Be],ae,null))[Be.route.id],T.signal.aborted)return{shortCircuited:!0};if(Ji(Ae)){let $e;return He&&He.replace!=null?$e=He.replace:$e=Wm(Ae.response.headers.get("Location"),new URL(T.url),g)===D.location.pathname+D.location.search,await K(T,Ae,!0,{submission:Q,replace:$e}),{shortCircuited:!0}}if(ji(Ae))throw Qn(400,{type:"defer-action"});if(or(Ae)){let $e=Zi(ae,Be.route.id);return(He&&He.replace)!==!0&&(re=mn.Push),{matches:ae,pendingActionResult:[$e.route.id,Ae]}}return{matches:ae,pendingActionResult:[Be.route.id,Ae]}}async function z(T,L,Q,ae,ke,He,et,Ae,Be,$e,ze){let st=ke||cd(L,He),St=He||et||Xm(st),ln=!Y&&(!_.v7_partialHydration||!Be);if(ae){if(ln){let Gt=Oe(ze);Ye(sn({navigation:st},Gt!==void 0?{actionData:Gt}:{}),{flushSync:$e})}let Pt=await qt(Q,L.pathname,T.signal);if(Pt.type==="aborted")return{shortCircuited:!0};if(Pt.type==="error"){let Gt=Zi(Pt.partialMatches).route.id;return{matches:Pt.partialMatches,loaderData:{},errors:{[Gt]:Pt.error}}}else if(Pt.matches)Q=Pt.matches;else{let{error:Gt,notFoundMatches:vn,route:zr}=Xe(L.pathname);return{matches:vn,loaderData:{},errors:{[zr.id]:Gt}}}}let Ut=d||f,[Et,Wt]=Hm(e.history,D,Q,St,L,_.v7_partialHydration&&Be===!0,_.v7_skipActionErrorRevalidation,xe,Ne,ne,ve,De,fe,Ut,g,ze);if(Ie(Pt=>!(Q&&Q.some(Gt=>Gt.route.id===Pt))||Et&&Et.some(Gt=>Gt.route.id===Pt)),E=++se,Et.length===0&&Wt.length===0){let Pt=ot();return Je(L,sn({matches:Q,loaderData:{},errors:ze&&or(ze[1])?{[ze[0]]:ze[1].error}:null},Jm(ze),Pt?{fetchers:new Map(D.fetchers)}:{}),{flushSync:$e}),{shortCircuited:!0}}if(ln){let Pt={};if(!ae){Pt.navigation=st;let Gt=Oe(ze);Gt!==void 0&&(Pt.actionData=Gt)}Wt.length>0&&(Pt.fetchers=lt(Wt)),Ye(Pt,{flushSync:$e})}Wt.forEach(Pt=>{_e(Pt.key),Pt.controller&&X.set(Pt.key,Pt.controller)});let er=()=>Wt.forEach(Pt=>_e(Pt.key));oe&&oe.signal.addEventListener("abort",er);let{loaderResults:Fr,fetcherResults:En}=await Ee(D,Q,Et,Wt,T);if(T.signal.aborted)return{shortCircuited:!0};oe&&oe.signal.removeEventListener("abort",er),Wt.forEach(Pt=>X.delete(Pt.key));let Rt=Cl(Fr);if(Rt)return await K(T,Rt.result,!0,{replace:Ae}),{shortCircuited:!0};if(Rt=Cl(En),Rt)return fe.add(Rt.key),await K(T,Rt.result,!0,{replace:Ae}),{shortCircuited:!0};let{loaderData:vr,errors:yr}=Zm(D,Q,Fr,ze,Wt,En,we);we.forEach((Pt,Gt)=>{Pt.subscribe(vn=>{(vn||Pt.done)&&we.delete(Gt)})}),_.v7_partialHydration&&Be&&D.errors&&(yr=sn({},D.errors,yr));let Pn=ot(),xr=nn(E),In=Pn||xr||Wt.length>0;return sn({matches:Q,loaderData:vr,errors:yr},In?{fetchers:new Map(D.fetchers)}:{})}function Oe(T){if(T&&!or(T[1]))return{[T[0]]:T[1].data};if(D.actionData)return Object.keys(D.actionData).length===0?null:D.actionData}function lt(T){return T.forEach(L=>{let Q=D.fetchers.get(L.key),ae=Lo(void 0,Q?Q.data:void 0);D.fetchers.set(L.key,ae)}),new Map(D.fetchers)}function M(T,L,Q,ae){if(a)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");_e(T);let ke=(ae&&ae.flushSync)===!0,He=d||f,et=Pd(D.location,D.matches,g,_.v7_prependBasename,Q,_.v7_relativeSplatPath,L,ae?.relative),Ae=Gi(He,et,g),Be=rn(Ae,He,et);if(Be.active&&Be.matches&&(Ae=Be.matches),!Ae){vt(T,L,Qn(404,{pathname:et}),{flushSync:ke});return}let{path:$e,submission:ze,error:st}=Bm(_.v7_normalizeFormMethod,!0,et,ae);if(st){vt(T,L,st,{flushSync:ke});return}let St=Qo(Ae,$e),ln=(ae&&ae.preventScrollReset)===!0;if(ze&&Er(ze.formMethod)){ie(T,L,$e,St,Ae,Be.active,ke,ln,ze);return}De.set(T,{routeId:L,path:$e}),te(T,L,$e,St,Ae,Be.active,ke,ln,ze)}async function ie(T,L,Q,ae,ke,He,et,Ae,Be){Zt(),De.delete(T);function $e(Ot){if(!Ot.route.action&&!Ot.route.lazy){let Ln=Qn(405,{method:Be.formMethod,pathname:Q,routeId:L});return vt(T,L,Ln,{flushSync:et}),!0}return!1}if(!He&&$e(ae))return;let ze=D.fetchers.get(T);Ze(T,kw(Be,ze),{flushSync:et});let st=new AbortController,St=Pa(e.history,Q,st.signal,Be);if(He){let Ot=await qt(ke,new URL(St.url).pathname,St.signal,T);if(Ot.type==="aborted")return;if(Ot.type==="error"){vt(T,L,Ot.error,{flushSync:et});return}else if(Ot.matches){if(ke=Ot.matches,ae=Qo(ke,Q),$e(ae))return}else{vt(T,L,Qn(404,{pathname:Q}),{flushSync:et});return}}X.set(T,st);let ln=se,Et=(await he("action",D,St,[ae],ke,T))[ae.route.id];if(St.signal.aborted){X.get(T)===st&&X.delete(T);return}if(_.v7_fetcherPersist&&ve.has(T)){if(Ji(Et)||or(Et)){Ze(T,ki(void 0));return}}else{if(Ji(Et))if(X.delete(T),E>ln){Ze(T,ki(void 0));return}else return fe.add(T),Ze(T,Lo(Be)),K(St,Et,!1,{fetcherSubmission:Be,preventScrollReset:Ae});if(or(Et)){vt(T,L,Et.error);return}}if(ji(Et))throw Qn(400,{type:"defer-action"});let Wt=D.navigation.location||D.location,er=Pa(e.history,Wt,st.signal),Fr=d||f,En=D.navigation.state!=="idle"?Gi(Fr,D.navigation.location,g):D.matches;Dt(En,"Didn't find any matches after fetcher action");let Rt=++se;V.set(T,Rt);let vr=Lo(Be,Et.data);D.fetchers.set(T,vr);let[yr,Pn]=Hm(e.history,D,En,Be,Wt,!1,_.v7_skipActionErrorRevalidation,xe,Ne,ne,ve,De,fe,Fr,g,[ae.route.id,Et]);Pn.filter(Ot=>Ot.key!==T).forEach(Ot=>{let Ln=Ot.key,Br=D.fetchers.get(Ln),Ya=Lo(void 0,Br?Br.data:void 0);D.fetchers.set(Ln,Ya),_e(Ln),Ot.controller&&X.set(Ln,Ot.controller)}),Ye({fetchers:new Map(D.fetchers)});let xr=()=>Pn.forEach(Ot=>_e(Ot.key));st.signal.addEventListener("abort",xr);let{loaderResults:In,fetcherResults:Pt}=await Ee(D,En,yr,Pn,er);if(st.signal.aborted)return;st.signal.removeEventListener("abort",xr),V.delete(T),X.delete(T),Pn.forEach(Ot=>X.delete(Ot.key));let Gt=Cl(In);if(Gt)return K(er,Gt.result,!1,{preventScrollReset:Ae});if(Gt=Cl(Pt),Gt)return fe.add(Gt.key),K(er,Gt.result,!1,{preventScrollReset:Ae});let{loaderData:vn,errors:zr}=Zm(D,En,In,void 0,Pn,Pt,we);if(D.fetchers.has(T)){let Ot=ki(Et.data);D.fetchers.set(T,Ot)}nn(Rt),D.navigation.state==="loading"&&Rt>E?(Dt(re,"Expected pending action"),oe&&oe.abort(),Je(D.navigation.location,{matches:En,loaderData:vn,errors:zr,fetchers:new Map(D.fetchers)})):(Ye({errors:zr,loaderData:Qm(D.loaderData,vn,En,zr),fetchers:new Map(D.fetchers)}),xe=!1)}async function te(T,L,Q,ae,ke,He,et,Ae,Be){let $e=D.fetchers.get(T);Ze(T,Lo(Be,$e?$e.data:void 0),{flushSync:et});let ze=new AbortController,st=Pa(e.history,Q,ze.signal);if(He){let Et=await qt(ke,new URL(st.url).pathname,st.signal,T);if(Et.type==="aborted")return;if(Et.type==="error"){vt(T,L,Et.error,{flushSync:et});return}else if(Et.matches)ke=Et.matches,ae=Qo(ke,Q);else{vt(T,L,Qn(404,{pathname:Q}),{flushSync:et});return}}X.set(T,ze);let St=se,Ut=(await he("loader",D,st,[ae],ke,T))[ae.route.id];if(ji(Ut)&&(Ut=await ff(Ut,st.signal,!0)||Ut),X.get(T)===ze&&X.delete(T),!st.signal.aborted){if(ve.has(T)){Ze(T,ki(void 0));return}if(Ji(Ut))if(E>St){Ze(T,ki(void 0));return}else{fe.add(T),await K(st,Ut,!1,{preventScrollReset:Ae});return}if(or(Ut)){vt(T,L,Ut.error);return}Dt(!ji(Ut),"Unhandled fetcher deferred data"),Ze(T,ki(Ut.data))}}async function K(T,L,Q,ae){let{submission:ke,fetcherSubmission:He,preventScrollReset:et,replace:Ae}=ae===void 0?{}:ae;L.response.headers.has("X-Remix-Revalidate")&&(xe=!0);let Be=L.response.headers.get("Location");Dt(Be,"Expected a Location header on the redirect Response"),Be=Wm(Be,new URL(T.url),g);let $e=es(D.location,Be,{_isRedirect:!0});if(i){let Et=!1;if(L.response.headers.has("X-Remix-Reload-Document"))Et=!0;else if(df.test(Be)){const Wt=e.history.createURL(Be);Et=Wt.origin!==n.location.origin||Qa(Wt.pathname,g)==null}if(Et){Ae?n.location.replace(Be):n.location.assign(Be);return}}oe=null;let ze=Ae===!0||L.response.headers.has("X-Remix-Replace")?mn.Replace:mn.Push,{formMethod:st,formAction:St,formEncType:ln}=D.navigation;!ke&&!He&&st&&St&&ln&&(ke=Xm(D.navigation));let Ut=ke||He;if(sw.has(L.response.status)&&Ut&&Er(Ut.formMethod))await Tt(ze,$e,{submission:sn({},Ut,{formAction:Be}),preventScrollReset:et||le,enableViewTransition:Q?R:void 0});else{let Et=cd($e,ke);await Tt(ze,$e,{overrideNavigation:Et,fetcherSubmission:He,preventScrollReset:et||le,enableViewTransition:Q?R:void 0})}}async function he(T,L,Q,ae,ke,He){let et,Ae={};try{et=await mw(y,T,L,Q,ae,ke,He,c,s)}catch(Be){return ae.forEach($e=>{Ae[$e.route.id]={type:Qt.error,error:Be}}),Ae}for(let[Be,$e]of Object.entries(et))if(_w($e)){let ze=$e.result;Ae[Be]={type:Qt.redirect,response:yw(ze,Q,Be,ke,g,_.v7_relativeSplatPath)}}else Ae[Be]=await vw($e);return Ae}async function Ee(T,L,Q,ae,ke){let He=T.matches,et=he("loader",T,ke,Q,L,null),Ae=Promise.all(ae.map(async ze=>{if(ze.matches&&ze.match&&ze.controller){let St=(await he("loader",T,Pa(e.history,ze.path,ze.controller.signal),[ze.match],ze.matches,ze.key))[ze.match.route.id];return{[ze.key]:St}}else return Promise.resolve({[ze.key]:{type:Qt.error,error:Qn(404,{pathname:ze.path})}})})),Be=await et,$e=(await Ae).reduce((ze,st)=>Object.assign(ze,st),{});return await Promise.all([Sw(L,Be,ke.signal,He,T.loaderData),Nw(L,$e,ae)]),{loaderResults:Be,fetcherResults:$e}}function Zt(){xe=!0,Ne.push(...Ie()),De.forEach((T,L)=>{X.has(L)&&ne.add(L),_e(L)})}function Ze(T,L,Q){Q===void 0&&(Q={}),D.fetchers.set(T,L),Ye({fetchers:new Map(D.fetchers)},{flushSync:(Q&&Q.flushSync)===!0})}function vt(T,L,Q,ae){ae===void 0&&(ae={});let ke=Zi(D.matches,L);pt(T),Ye({errors:{[ke.route.id]:Q},fetchers:new Map(D.fetchers)},{flushSync:(ae&&ae.flushSync)===!0})}function ue(T){return ce.set(T,(ce.get(T)||0)+1),ve.has(T)&&ve.delete(T),D.fetchers.get(T)||lw}function pt(T){let L=D.fetchers.get(T);X.has(T)&&!(L&&L.state==="loading"&&V.has(T))&&_e(T),De.delete(T),V.delete(T),fe.delete(T),_.v7_fetcherPersist&&ve.delete(T),ne.delete(T),D.fetchers.delete(T)}function Mt(T){let L=(ce.get(T)||0)-1;L<=0?(ce.delete(T),ve.add(T),_.v7_fetcherPersist||pt(T)):ce.set(T,L),Ye({fetchers:new Map(D.fetchers)})}function _e(T){let L=X.get(T);L&&(L.abort(),X.delete(T))}function Bt(T){for(let L of T){let Q=ue(L),ae=ki(Q.data);D.fetchers.set(L,ae)}}function ot(){let T=[],L=!1;for(let Q of fe){let ae=D.fetchers.get(Q);Dt(ae,"Expected fetcher: "+Q),ae.state==="loading"&&(fe.delete(Q),T.push(Q),L=!0)}return Bt(T),L}function nn(T){let L=[];for(let[Q,ae]of V)if(ae0}function W(T,L){let Q=D.blockers.get(T)||Io;return je.get(T)!==L&&je.set(T,L),Q}function Se(T){D.blockers.delete(T),je.delete(T)}function at(T,L){let Q=D.blockers.get(T)||Io;Dt(Q.state==="unblocked"&&L.state==="blocked"||Q.state==="blocked"&&L.state==="blocked"||Q.state==="blocked"&&L.state==="proceeding"||Q.state==="blocked"&&L.state==="unblocked"||Q.state==="proceeding"&&L.state==="unblocked","Invalid blocker state transition: "+Q.state+" -> "+L.state);let ae=new Map(D.blockers);ae.set(T,L),Ye({blockers:ae})}function Ge(T){let{currentLocation:L,nextLocation:Q,historyAction:ae}=T;if(je.size===0)return;je.size>1&&Xi(!1,"A router only supports one blocker at a time");let ke=Array.from(je.entries()),[He,et]=ke[ke.length-1],Ae=D.blockers.get(He);if(!(Ae&&Ae.state==="proceeding")&&et({currentLocation:L,nextLocation:Q,historyAction:ae}))return He}function Xe(T){let L=Qn(404,{pathname:T}),Q=d||f,{matches:ae,route:ke}=Km(Q);return Ie(),{notFoundMatches:ae,route:ke,error:L}}function Ie(T){let L=[];return we.forEach((Q,ae)=>{(!T||T(ae))&&(Q.cancel(),L.push(ae),we.delete(ae))}),L}function ee(T,L,Q){if(S=T,j=L,b=Q||null,!N&&D.navigation===ld){N=!0;let ae=dn(D.location,D.matches);ae!=null&&Ye({restoreScrollPosition:ae})}return()=>{S=null,j=null,b=null}}function ut(T,L){return b&&b(T,L.map(ae=>Fx(ae,D.loaderData)))||T.key}function mt(T,L){if(S&&j){let Q=ut(T,L);S[Q]=j()}}function dn(T,L){if(S){let Q=ut(T,L),ae=S[Q];if(typeof ae=="number")return ae}return null}function rn(T,L,Q){if(w)if(T){if(Object.keys(T[0].params).length>0)return{active:!0,matches:Ul(L,Q,g,!0)}}else return{active:!0,matches:Ul(L,Q,g,!0)||[]};return{active:!1,matches:null}}async function qt(T,L,Q,ae){if(!w)return{type:"success",matches:T};let ke=T;for(;;){let He=d==null,et=d||f,Ae=c;try{await w({signal:Q,path:L,matches:ke,fetcherKey:ae,patch:(ze,st)=>{Q.aborted||Vm(ze,st,et,Ae,s)}})}catch(ze){return{type:"error",error:ze,partialMatches:ke}}finally{He&&!Q.aborted&&(f=[...f])}if(Q.aborted)return{type:"aborted"};let Be=Gi(et,L,g);if(Be)return{type:"success",matches:Be};let $e=Ul(et,L,g,!0);if(!$e||ke.length===$e.length&&ke.every((ze,st)=>ze.route.id===$e[st].route.id))return{type:"success",matches:null};ke=$e}}function Vt(T){c={},d=Ql(T,s,void 0,c)}function At(T,L){let Q=d==null;Vm(T,L,d||f,c,s),Q&&(f=[...f],Ye({}))}return ye={get basename(){return g},get future(){return _},get state(){return D},get routes(){return f},get window(){return n},initialize:Pe,subscribe:Te,enableScrollRestoration:ee,navigate:jt,fetch:M,revalidate:gt,createHref:T=>e.history.createHref(T),encodeLocation:T=>e.history.encodeLocation(T),getFetcher:ue,deleteFetcher:Mt,dispose:H,getBlocker:W,deleteBlocker:Se,patchRoutes:At,_internalFetchControllers:X,_internalActiveDeferreds:we,_internalSetRoutes:Vt},ye}function dw(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Pd(e,n,i,a,s,c,f,d){let g,y;if(f){g=[];for(let _ of n)if(g.push(_),_.route.id===f){y=_;break}}else g=n,y=n[n.length-1];let w=uf(s||".",cf(g,c),Qa(e.pathname,i)||e.pathname,d==="path");if(s==null&&(w.search=e.search,w.hash=e.hash),(s==null||s===""||s===".")&&y){let _=hf(w.search);if(y.route.index&&!_)w.search=w.search?w.search.replace(/^\?/,"?index&"):"?index";else if(!y.route.index&&_){let v=new URLSearchParams(w.search),x=v.getAll("index");v.delete("index"),x.filter(b=>b).forEach(b=>v.append("index",b));let S=v.toString();w.search=S?"?"+S:""}}return a&&i!=="/"&&(w.pathname=w.pathname==="/"?i:ei([i,w.pathname])),ea(w)}function Bm(e,n,i,a){if(!a||!dw(a))return{path:i};if(a.formMethod&&!bw(a.formMethod))return{path:i,error:Qn(405,{method:a.formMethod})};let s=()=>({path:i,error:Qn(400,{type:"invalid-body"})}),c=a.formMethod||"get",f=e?c.toUpperCase():c.toLowerCase(),d=S0(i);if(a.body!==void 0){if(a.formEncType==="text/plain"){if(!Er(f))return s();let v=typeof a.body=="string"?a.body:a.body instanceof FormData||a.body instanceof URLSearchParams?Array.from(a.body.entries()).reduce((x,S)=>{let[b,j]=S;return""+x+b+"="+j+` -`},""):String(a.body);return{path:i,submission:{formMethod:f,formAction:d,formEncType:a.formEncType,formData:void 0,json:void 0,text:v}}}else if(a.formEncType==="application/json"){if(!Er(f))return s();try{let v=typeof a.body=="string"?JSON.parse(a.body):a.body;return{path:i,submission:{formMethod:f,formAction:d,formEncType:a.formEncType,formData:void 0,json:v,text:void 0}}}catch{return s()}}}Dt(typeof FormData=="function","FormData is not available in this environment");let g,y;if(a.formData)g=Ld(a.formData),y=a.formData;else if(a.body instanceof FormData)g=Ld(a.body),y=a.body;else if(a.body instanceof URLSearchParams)g=a.body,y=Gm(g);else if(a.body==null)g=new URLSearchParams,y=new FormData;else try{g=new URLSearchParams(a.body),y=Gm(g)}catch{return s()}let w={formMethod:f,formAction:d,formEncType:a&&a.formEncType||"application/x-www-form-urlencoded",formData:y,json:void 0,text:void 0};if(Er(w.formMethod))return{path:i,submission:w};let _=ri(i);return n&&_.search&&hf(_.search)&&g.append("index",""),_.search="?"+g,{path:ea(_),submission:w}}function Um(e,n,i){i===void 0&&(i=!1);let a=e.findIndex(s=>s.route.id===n);return a>=0?e.slice(0,i?a+1:a):e}function Hm(e,n,i,a,s,c,f,d,g,y,w,_,v,x,S,b){let j=b?or(b[1])?b[1].error:b[1].data:void 0,N=e.createURL(n.location),I=e.createURL(s),F=i;c&&n.errors?F=Um(i,Object.keys(n.errors)[0],!0):b&&or(b[1])&&(F=Um(i,b[0]));let O=b?b[1].statusCode:void 0,Z=f&&O&&O>=400,ye=F.filter((re,le)=>{let{route:oe}=re;if(oe.lazy)return!0;if(oe.loader==null)return!1;if(c)return Id(oe,n.loaderData,n.errors);if(fw(n.loaderData,n.matches[le],re)||g.some(J=>J===re.route.id))return!0;let R=n.matches[le],U=re;return qm(re,sn({currentUrl:N,currentParams:R.params,nextUrl:I,nextParams:U.params},a,{actionResult:j,actionStatus:O,defaultShouldRevalidate:Z?!1:d||N.pathname+N.search===I.pathname+I.search||N.search!==I.search||C0(R,U)}))}),D=[];return _.forEach((re,le)=>{if(c||!i.some(Y=>Y.route.id===re.routeId)||w.has(le))return;let oe=Gi(x,re.path,S);if(!oe){D.push({key:le,routeId:re.routeId,path:re.path,matches:null,match:null,controller:null});return}let R=n.fetchers.get(le),U=Qo(oe,re.path),J=!1;v.has(le)?J=!1:y.has(le)?(y.delete(le),J=!0):R&&R.state!=="idle"&&R.data===void 0?J=d:J=qm(U,sn({currentUrl:N,currentParams:n.matches[n.matches.length-1].params,nextUrl:I,nextParams:i[i.length-1].params},a,{actionResult:j,actionStatus:O,defaultShouldRevalidate:Z?!1:d})),J&&D.push({key:le,routeId:re.routeId,path:re.path,matches:oe,match:U,controller:new AbortController})}),[ye,D]}function Id(e,n,i){if(e.lazy)return!0;if(!e.loader)return!1;let a=n!=null&&n[e.id]!==void 0,s=i!=null&&i[e.id]!==void 0;return!a&&s?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!a&&!s}function fw(e,n,i){let a=!n||i.route.id!==n.route.id,s=e[i.route.id]===void 0;return a||s}function C0(e,n){let i=e.route.path;return e.pathname!==n.pathname||i!=null&&i.endsWith("*")&&e.params["*"]!==n.params["*"]}function qm(e,n){if(e.route.shouldRevalidate){let i=e.route.shouldRevalidate(n);if(typeof i=="boolean")return i}return n.defaultShouldRevalidate}function Vm(e,n,i,a,s){var c;let f;if(e){let y=a[e];Dt(y,"No route found to patch children into: routeId = "+e),y.children||(y.children=[]),f=y.children}else f=i;let d=n.filter(y=>!f.some(w=>b0(y,w))),g=Ql(d,s,[e||"_","patch",String(((c=f)==null?void 0:c.length)||"0")],a);f.push(...g)}function b0(e,n){return"id"in e&&"id"in n&&e.id===n.id?!0:e.index===n.index&&e.path===n.path&&e.caseSensitive===n.caseSensitive?(!e.children||e.children.length===0)&&(!n.children||n.children.length===0)?!0:e.children.every((i,a)=>{var s;return(s=n.children)==null?void 0:s.some(c=>b0(i,c))}):!1}async function hw(e,n,i){if(!e.lazy)return;let a=await e.lazy();if(!e.lazy)return;let s=i[e.id];Dt(s,"No route found in manifest");let c={};for(let f in a){let g=s[f]!==void 0&&f!=="hasErrorBoundary";Xi(!g,'Route "'+s.id+'" has a static property "'+f+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+f+'" will be ignored.')),!g&&!Ax.has(f)&&(c[f]=a[f])}Object.assign(s,c),Object.assign(s,sn({},n(s),{lazy:void 0}))}async function pw(e){let{matches:n}=e,i=n.filter(s=>s.shouldLoad);return(await Promise.all(i.map(s=>s.resolve()))).reduce((s,c,f)=>Object.assign(s,{[i[f].route.id]:c}),{})}async function mw(e,n,i,a,s,c,f,d,g,y){let w=c.map(x=>x.route.lazy?hw(x.route,g,d):void 0),_=c.map((x,S)=>{let b=w[S],j=s.some(I=>I.route.id===x.route.id);return sn({},x,{shouldLoad:j,resolve:async I=>(I&&a.method==="GET"&&(x.route.lazy||x.route.loader)&&(j=!0),j?gw(n,a,x,b,I,y):Promise.resolve({type:Qt.data,result:void 0}))})}),v=await e({matches:_,request:a,params:c[0].params,fetcherKey:f,context:y});try{await Promise.all(w)}catch{}return v}async function gw(e,n,i,a,s,c){let f,d,g=y=>{let w,_=new Promise((S,b)=>w=b);d=()=>w(),n.signal.addEventListener("abort",d);let v=S=>typeof y!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+i.route.id+"]"))):y({request:n,params:i.params,context:c},...S!==void 0?[S]:[]),x=(async()=>{try{return{type:"data",result:await(s?s(b=>v(b)):v())}}catch(S){return{type:"error",result:S}}})();return Promise.race([x,_])};try{let y=i.route[e];if(a)if(y){let w,[_]=await Promise.all([g(y).catch(v=>{w=v}),a]);if(w!==void 0)throw w;f=_}else if(await a,y=i.route[e],y)f=await g(y);else if(e==="action"){let w=new URL(n.url),_=w.pathname+w.search;throw Qn(405,{method:n.method,pathname:_,routeId:i.route.id})}else return{type:Qt.data,result:void 0};else if(y)f=await g(y);else{let w=new URL(n.url),_=w.pathname+w.search;throw Qn(404,{pathname:_})}Dt(f.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+i.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(y){return{type:Qt.error,result:y}}finally{d&&n.signal.removeEventListener("abort",d)}return f}async function vw(e){let{result:n,type:i}=e;if(N0(n)){let _;try{let v=n.headers.get("Content-Type");v&&/\bapplication\/json\b/.test(v)?n.body==null?_=null:_=await n.json():_=await n.text()}catch(v){return{type:Qt.error,error:v}}return i===Qt.error?{type:Qt.error,error:new Jl(n.status,n.statusText,_),statusCode:n.status,headers:n.headers}:{type:Qt.data,data:_,statusCode:n.status,headers:n.headers}}if(i===Qt.error){if(Ym(n)){var a,s;if(n.data instanceof Error){var c,f;return{type:Qt.error,error:n.data,statusCode:(c=n.init)==null?void 0:c.status,headers:(f=n.init)!=null&&f.headers?new Headers(n.init.headers):void 0}}return{type:Qt.error,error:new Jl(((a=n.init)==null?void 0:a.status)||500,void 0,n.data),statusCode:ts(n)?n.status:void 0,headers:(s=n.init)!=null&&s.headers?new Headers(n.init.headers):void 0}}return{type:Qt.error,error:n,statusCode:ts(n)?n.status:void 0}}if(Cw(n)){var d,g;return{type:Qt.deferred,deferredData:n,statusCode:(d=n.init)==null?void 0:d.status,headers:((g=n.init)==null?void 0:g.headers)&&new Headers(n.init.headers)}}if(Ym(n)){var y,w;return{type:Qt.data,data:n.data,statusCode:(y=n.init)==null?void 0:y.status,headers:(w=n.init)!=null&&w.headers?new Headers(n.init.headers):void 0}}return{type:Qt.data,data:n}}function yw(e,n,i,a,s,c){let f=e.headers.get("Location");if(Dt(f,"Redirects returned/thrown from loaders/actions must have a Location header"),!df.test(f)){let d=a.slice(0,a.findIndex(g=>g.route.id===i)+1);f=Pd(new URL(n.url),d,s,!0,f,c),e.headers.set("Location",f)}return e}function Wm(e,n,i){if(df.test(e)){let a=e,s=a.startsWith("//")?new URL(n.protocol+a):new URL(a),c=Qa(s.pathname,i)!=null;if(s.origin===n.origin&&c)return s.pathname+s.search+s.hash}return e}function Pa(e,n,i,a){let s=e.createURL(S0(n)).toString(),c={signal:i};if(a&&Er(a.formMethod)){let{formMethod:f,formEncType:d}=a;c.method=f.toUpperCase(),d==="application/json"?(c.headers=new Headers({"Content-Type":d}),c.body=JSON.stringify(a.json)):d==="text/plain"?c.body=a.text:d==="application/x-www-form-urlencoded"&&a.formData?c.body=Ld(a.formData):c.body=a.formData}return new Request(s,c)}function Ld(e){let n=new URLSearchParams;for(let[i,a]of e.entries())n.append(i,typeof a=="string"?a:a.name);return n}function Gm(e){let n=new FormData;for(let[i,a]of e.entries())n.append(i,a);return n}function xw(e,n,i,a,s){let c={},f=null,d,g=!1,y={},w=i&&or(i[1])?i[1].error:void 0;return e.forEach(_=>{if(!(_.route.id in n))return;let v=_.route.id,x=n[v];if(Dt(!Ji(x),"Cannot handle redirect results in processLoaderData"),or(x)){let S=x.error;w!==void 0&&(S=w,w=void 0),f=f||{};{let b=Zi(e,v);f[b.route.id]==null&&(f[b.route.id]=S)}c[v]=void 0,g||(g=!0,d=ts(x.error)?x.error.status:500),x.headers&&(y[v]=x.headers)}else ji(x)?(a.set(v,x.deferredData),c[v]=x.deferredData.data,x.statusCode!=null&&x.statusCode!==200&&!g&&(d=x.statusCode),x.headers&&(y[v]=x.headers)):(c[v]=x.data,x.statusCode&&x.statusCode!==200&&!g&&(d=x.statusCode),x.headers&&(y[v]=x.headers))}),w!==void 0&&i&&(f={[i[0]]:w},c[i[0]]=void 0),{loaderData:c,errors:f,statusCode:d||200,loaderHeaders:y}}function Zm(e,n,i,a,s,c,f){let{loaderData:d,errors:g}=xw(n,i,a,f);return s.forEach(y=>{let{key:w,match:_,controller:v}=y,x=c[w];if(Dt(x,"Did not find corresponding fetcher result"),!(v&&v.signal.aborted))if(or(x)){let S=Zi(e.matches,_?.route.id);g&&g[S.route.id]||(g=sn({},g,{[S.route.id]:x.error})),e.fetchers.delete(w)}else if(Ji(x))Dt(!1,"Unhandled fetcher revalidation redirect");else if(ji(x))Dt(!1,"Unhandled fetcher deferred data");else{let S=ki(x.data);e.fetchers.set(w,S)}}),{loaderData:d,errors:g}}function Qm(e,n,i,a){let s=sn({},n);for(let c of i){let f=c.route.id;if(n.hasOwnProperty(f)?n[f]!==void 0&&(s[f]=n[f]):e[f]!==void 0&&c.route.loader&&(s[f]=e[f]),a&&a.hasOwnProperty(f))break}return s}function Jm(e){return e?or(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Zi(e,n){return(n?e.slice(0,e.findIndex(a=>a.route.id===n)+1):[...e]).reverse().find(a=>a.route.hasErrorBoundary===!0)||e[0]}function Km(e){let n=e.length===1?e[0]:e.find(i=>i.index||!i.path||i.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:n}],route:n}}function Qn(e,n){let{pathname:i,routeId:a,method:s,type:c,message:f}=n===void 0?{}:n,d="Unknown Server Error",g="Unknown @remix-run/router error";return e===400?(d="Bad Request",s&&i&&a?g="You made a "+s+' request to "'+i+'" but '+('did not provide a `loader` for route "'+a+'", ')+"so there is no way to handle the request.":c==="defer-action"?g="defer() is not supported in actions":c==="invalid-body"&&(g="Unable to encode submission body")):e===403?(d="Forbidden",g='Route "'+a+'" does not match URL "'+i+'"'):e===404?(d="Not Found",g='No route matches URL "'+i+'"'):e===405&&(d="Method Not Allowed",s&&i&&a?g="You made a "+s.toUpperCase()+' request to "'+i+'" but '+('did not provide an `action` for route "'+a+'", ')+"so there is no way to handle the request.":s&&(g='Invalid request method "'+s.toUpperCase()+'"')),new Jl(e||500,d,new Error(g),!0)}function Cl(e){let n=Object.entries(e);for(let i=n.length-1;i>=0;i--){let[a,s]=n[i];if(Ji(s))return{key:a,result:s}}}function S0(e){let n=typeof e=="string"?ri(e):e;return ea(sn({},n,{hash:""}))}function ww(e,n){return e.pathname!==n.pathname||e.search!==n.search?!1:e.hash===""?n.hash!=="":e.hash===n.hash?!0:n.hash!==""}function _w(e){return N0(e.result)&&ow.has(e.result.status)}function ji(e){return e.type===Qt.deferred}function or(e){return e.type===Qt.error}function Ji(e){return(e&&e.type)===Qt.redirect}function Ym(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Cw(e){let n=e;return n&&typeof n=="object"&&typeof n.data=="object"&&typeof n.subscribe=="function"&&typeof n.cancel=="function"&&typeof n.resolveData=="function"}function N0(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function bw(e){return aw.has(e.toLowerCase())}function Er(e){return rw.has(e.toLowerCase())}async function Sw(e,n,i,a,s){let c=Object.entries(n);for(let f=0;fv?.route.id===d);if(!y)continue;let w=a.find(v=>v.route.id===y.route.id),_=w!=null&&!C0(w,y)&&(s&&s[y.route.id])!==void 0;ji(g)&&_&&await ff(g,i,!1).then(v=>{v&&(n[d]=v)})}}async function Nw(e,n,i){for(let a=0;ay?.route.id===c)&&ji(d)&&(Dt(f,"Expected an AbortController for revalidating fetcher deferred result"),await ff(d,f.signal,!0).then(y=>{y&&(n[s]=y)}))}}async function ff(e,n,i){if(i===void 0&&(i=!1),!await e.deferredData.resolveData(n)){if(i)try{return{type:Qt.data,data:e.deferredData.unwrappedData}}catch(s){return{type:Qt.error,error:s}}return{type:Qt.data,data:e.deferredData.data}}}function hf(e){return new URLSearchParams(e).getAll("index").some(n=>n==="")}function Qo(e,n){let i=typeof n=="string"?ri(n).search:n.search;if(e[e.length-1].route.index&&hf(i||""))return e[e.length-1];let a=x0(e);return a[a.length-1]}function Xm(e){let{formMethod:n,formAction:i,formEncType:a,text:s,formData:c,json:f}=e;if(!(!n||!i||!a)){if(s!=null)return{formMethod:n,formAction:i,formEncType:a,formData:void 0,json:void 0,text:s};if(c!=null)return{formMethod:n,formAction:i,formEncType:a,formData:c,json:void 0,text:void 0};if(f!==void 0)return{formMethod:n,formAction:i,formEncType:a,formData:void 0,json:f,text:void 0}}}function cd(e,n){return n?{state:"loading",location:e,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Ew(e,n){return{state:"submitting",location:e,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}}function Lo(e,n){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:n}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function kw(e,n){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:n?n.data:void 0}}function ki(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function jw(e,n){try{let i=e.sessionStorage.getItem(_0);if(i){let a=JSON.parse(i);for(let[s,c]of Object.entries(a||{}))c&&Array.isArray(c)&&n.set(s,new Set(c||[]))}}catch{}}function Tw(e,n){if(n.size>0){let i={};for(let[a,s]of n)i[a]=[...s];try{e.sessionStorage.setItem(_0,JSON.stringify(i))}catch(a){Xi(!1,"Failed to save applied view transitions in sessionStorage ("+a+").")}}}/** - * React Router v6.30.1 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Kl(){return Kl=Object.assign?Object.assign.bind():function(e){for(var n=1;n{d.current=!0}),p.useCallback(function(y,w){if(w===void 0&&(w={}),!d.current)return;if(typeof y=="number"){a.go(y);return}let _=uf(y,JSON.parse(f),c,w.relative==="path");e==null&&n!=="/"&&(_.pathname=_.pathname==="/"?n:ei([n,_.pathname])),(w.replace?a.replace:a.push)(_,w.state,w)},[n,a,f,c,e])}const Iw=p.createContext(null);function Lw(e){let n=p.useContext(ii).outlet;return n&&p.createElement(Iw.Provider,{value:e},n)}function Dw(){let{matches:e}=p.useContext(ii),n=e[e.length-1];return n?n.params:{}}function T0(e,n){let{relative:i}=n===void 0?{}:n,{future:a}=p.useContext(ia),{matches:s}=p.useContext(ii),{pathname:c}=Ja(),f=JSON.stringify(cf(s,a.v7_relativeSplatPath));return p.useMemo(()=>uf(e,JSON.parse(f),c,i==="path"),[e,f,c,i])}function Rw(e,n,i,a){hs()||Dt(!1);let{navigator:s}=p.useContext(ia),{matches:c}=p.useContext(ii),f=c[c.length-1],d=f?f.params:{};f&&f.pathname;let g=f?f.pathnameBase:"/";f&&f.route;let y=Ja(),w;w=y;let _=w.pathname||"/",v=_;if(g!=="/"){let b=g.replace(/^\//,"").split("/");v="/"+_.replace(/^\//,"").split("/").slice(b.length).join("/")}let x=Gi(e,{pathname:v});return zw(x&&x.map(b=>Object.assign({},b,{params:Object.assign({},d,b.params),pathname:ei([g,s.encodeLocation?s.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?g:ei([g,s.encodeLocation?s.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),c,i,a)}function Ow(){let e=qw(),n=ts(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),i=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},n),i?p.createElement("pre",{style:s},i):null,null)}const Aw=p.createElement(Ow,null);class $w extends p.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,i){return i.location!==n.location||i.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:i.error,location:i.location,revalidation:n.revalidation||i.revalidation}}componentDidCatch(n,i){console.error("React Router caught the following error during render",n,i)}render(){return this.state.error!==void 0?p.createElement(ii.Provider,{value:this.props.routeContext},p.createElement(k0.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Fw(e){let{routeContext:n,match:i,children:a}=e,s=p.useContext(dc);return s&&s.static&&s.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=i.route.id),p.createElement(ii.Provider,{value:n},a)}function zw(e,n,i,a){var s;if(n===void 0&&(n=[]),i===void 0&&(i=null),a===void 0&&(a=null),e==null){var c;if(!i)return null;if(i.errors)e=i.matches;else if((c=a)!=null&&c.v7_partialHydration&&n.length===0&&!i.initialized&&i.matches.length>0)e=i.matches;else return null}let f=e,d=(s=i)==null?void 0:s.errors;if(d!=null){let w=f.findIndex(_=>_.route.id&&d?.[_.route.id]!==void 0);w>=0||Dt(!1),f=f.slice(0,Math.min(f.length,w+1))}let g=!1,y=-1;if(i&&a&&a.v7_partialHydration)for(let w=0;w=0?f=f.slice(0,y+1):f=[f[0]];break}}}return f.reduceRight((w,_,v)=>{let x,S=!1,b=null,j=null;i&&(x=d&&_.route.id?d[_.route.id]:void 0,b=_.route.errorElement||Aw,g&&(y<0&&v===0?(Ww("route-fallback"),S=!0,j=null):y===v&&(S=!0,j=_.route.hydrateFallbackElement||null)));let N=n.concat(f.slice(0,v+1)),I=()=>{let F;return x?F=b:S?F=j:_.route.Component?F=p.createElement(_.route.Component,null):_.route.element?F=_.route.element:F=w,p.createElement(Fw,{match:_,routeContext:{outlet:w,matches:N,isDataRoute:i!=null},children:F})};return i&&(_.route.ErrorBoundary||_.route.errorElement||v===0)?p.createElement($w,{location:i.location,revalidation:i.revalidation,component:b,error:x,children:I(),routeContext:{outlet:null,matches:N,isDataRoute:!0}}):I()},null)}var M0=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(M0||{}),P0=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(P0||{});function Bw(e){let n=p.useContext(dc);return n||Dt(!1),n}function Uw(e){let n=p.useContext(E0);return n||Dt(!1),n}function Hw(e){let n=p.useContext(ii);return n||Dt(!1),n}function I0(e){let n=Hw(),i=n.matches[n.matches.length-1];return i.route.id||Dt(!1),i.route.id}function qw(){var e;let n=p.useContext(k0),i=Uw(P0.UseRouteError),a=I0();return n!==void 0?n:(e=i.errors)==null?void 0:e[a]}function Vw(){let{router:e}=Bw(M0.UseNavigateStable),n=I0(),i=p.useRef(!1);return j0(()=>{i.current=!0}),p.useCallback(function(s,c){c===void 0&&(c={}),i.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Kl({fromRouteId:n},c)))},[e,n])}const eg={};function Ww(e,n,i){eg[e]||(eg[e]=!0)}function Gw(e,n){e?.v7_startTransition,e?.v7_relativeSplatPath===void 0&&(!n||n.v7_relativeSplatPath),n&&(n.v7_fetcherPersist,n.v7_normalizeFormMethod,n.v7_partialHydration,n.v7_skipActionErrorRevalidation)}function Zw(e){return Lw(e.context)}function Qw(e){let{basename:n="/",children:i=null,location:a,navigationType:s=mn.Pop,navigator:c,static:f=!1,future:d}=e;hs()&&Dt(!1);let g=n.replace(/^\/*/,"/"),y=p.useMemo(()=>({basename:g,navigator:c,static:f,future:Kl({v7_relativeSplatPath:!1},d)}),[g,d,c,f]);typeof a=="string"&&(a=ri(a));let{pathname:w="/",search:_="",hash:v="",state:x=null,key:S="default"}=a,b=p.useMemo(()=>{let j=Qa(w,g);return j==null?null:{location:{pathname:j,search:_,hash:v,state:x,key:S},navigationType:s}},[g,w,_,v,x,S,s]);return b==null?null:p.createElement(ia.Provider,{value:y},p.createElement(pf.Provider,{children:i,value:b}))}new Promise(()=>{});function Jw(e){let n={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(n,{element:p.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(n,{hydrateFallbackElement:p.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(n,{errorElement:p.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),n}/** - * React Router DOM v6.30.1 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function ns(){return ns=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0)&&(i[s]=e[s]);return i}function Yw(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Xw(e,n){return e.button===0&&(!n||n==="_self")&&!Yw(e)}function Dd(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((n,i)=>{let a=e[i];return n.concat(Array.isArray(a)?a.map(s=>[i,s]):[[i,a]])},[]))}function e_(e,n){let i=Dd(e);return n&&n.forEach((a,s)=>{i.has(s)||n.getAll(s).forEach(c=>{i.append(s,c)})}),i}const t_=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],n_="6";try{window.__reactRouterVersion=n_}catch{}function r_(e,n){return uw({basename:void 0,future:ns({},void 0,{v7_prependBasename:!0}),history:Dx({window:void 0}),hydrationData:i_(),routes:e,mapRouteProperties:Jw,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function i_(){var e;let n=(e=window)==null?void 0:e.__staticRouterHydrationData;return n&&n.errors&&(n=ns({},n,{errors:a_(n.errors)})),n}function a_(e){if(!e)return null;let n=Object.entries(e),i={};for(let[a,s]of n)if(s&&s.__type==="RouteErrorResponse")i[a]=new Jl(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let c=window[s.__subType];if(typeof c=="function")try{let f=new c(s.message);f.stack="",i[a]=f}catch{}}if(i[a]==null){let c=new Error(s.message);c.stack="",i[a]=c}}else i[a]=s;return i}const o_=p.createContext({isTransitioning:!1}),s_=p.createContext(new Map),l_="startTransition",tg=Ex[l_],c_="flushSync",ng=Lx[c_];function u_(e){tg?tg(e):e()}function Do(e){ng?ng(e):e()}class d_{constructor(){this.status="pending",this.promise=new Promise((n,i)=>{this.resolve=a=>{this.status==="pending"&&(this.status="resolved",n(a))},this.reject=a=>{this.status==="pending"&&(this.status="rejected",i(a))}})}}function f_(e){let{fallbackElement:n,router:i,future:a}=e,[s,c]=p.useState(i.state),[f,d]=p.useState(),[g,y]=p.useState({isTransitioning:!1}),[w,_]=p.useState(),[v,x]=p.useState(),[S,b]=p.useState(),j=p.useRef(new Map),{v7_startTransition:N}=a||{},I=p.useCallback(re=>{N?u_(re):re()},[N]),F=p.useCallback((re,le)=>{let{deletedFetchers:oe,flushSync:R,viewTransitionOpts:U}=le;re.fetchers.forEach((Y,xe)=>{Y.data!==void 0&&j.current.set(xe,Y.data)}),oe.forEach(Y=>j.current.delete(Y));let J=i.window==null||i.window.document==null||typeof i.window.document.startViewTransition!="function";if(!U||J){R?Do(()=>c(re)):I(()=>c(re));return}if(R){Do(()=>{v&&(w&&w.resolve(),v.skipTransition()),y({isTransitioning:!0,flushSync:!0,currentLocation:U.currentLocation,nextLocation:U.nextLocation})});let Y=i.window.document.startViewTransition(()=>{Do(()=>c(re))});Y.finished.finally(()=>{Do(()=>{_(void 0),x(void 0),d(void 0),y({isTransitioning:!1})})}),Do(()=>x(Y));return}v?(w&&w.resolve(),v.skipTransition(),b({state:re,currentLocation:U.currentLocation,nextLocation:U.nextLocation})):(d(re),y({isTransitioning:!0,flushSync:!1,currentLocation:U.currentLocation,nextLocation:U.nextLocation}))},[i.window,v,w,j,I]);p.useLayoutEffect(()=>i.subscribe(F),[i,F]),p.useEffect(()=>{g.isTransitioning&&!g.flushSync&&_(new d_)},[g]),p.useEffect(()=>{if(w&&f&&i.window){let re=f,le=w.promise,oe=i.window.document.startViewTransition(async()=>{I(()=>c(re)),await le});oe.finished.finally(()=>{_(void 0),x(void 0),d(void 0),y({isTransitioning:!1})}),x(oe)}},[I,f,w,i.window]),p.useEffect(()=>{w&&f&&s.location.key===f.location.key&&w.resolve()},[w,v,s.location,f]),p.useEffect(()=>{!g.isTransitioning&&S&&(d(S.state),y({isTransitioning:!0,flushSync:!1,currentLocation:S.currentLocation,nextLocation:S.nextLocation}),b(void 0))},[g.isTransitioning,S]),p.useEffect(()=>{},[]);let O=p.useMemo(()=>({createHref:i.createHref,encodeLocation:i.encodeLocation,go:re=>i.navigate(re),push:(re,le,oe)=>i.navigate(re,{state:le,preventScrollReset:oe?.preventScrollReset}),replace:(re,le,oe)=>i.navigate(re,{replace:!0,state:le,preventScrollReset:oe?.preventScrollReset})}),[i]),Z=i.basename||"/",ye=p.useMemo(()=>({router:i,navigator:O,static:!1,basename:Z}),[i,O,Z]),D=p.useMemo(()=>({v7_relativeSplatPath:i.future.v7_relativeSplatPath}),[i.future.v7_relativeSplatPath]);return p.useEffect(()=>Gw(a,i.future),[a,i.future]),p.createElement(p.Fragment,null,p.createElement(dc.Provider,{value:ye},p.createElement(E0.Provider,{value:s},p.createElement(s_.Provider,{value:j.current},p.createElement(o_.Provider,{value:g},p.createElement(Qw,{basename:Z,location:s.location,navigationType:s.historyAction,navigator:O,future:D},s.initialized||i.future.v7_partialHydration?p.createElement(h_,{routes:i.routes,future:i.future,state:s}):n))))),null)}const h_=p.memo(p_);function p_(e){let{routes:n,future:i,state:a}=e;return Rw(n,void 0,a,i)}const m_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",g_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,v_=p.forwardRef(function(n,i){let{onClick:a,relative:s,reloadDocument:c,replace:f,state:d,target:g,to:y,preventScrollReset:w,viewTransition:_}=n,v=Kw(n,t_),{basename:x}=p.useContext(ia),S,b=!1;if(typeof y=="string"&&g_.test(y)&&(S=y,m_))try{let F=new URL(window.location.href),O=y.startsWith("//")?new URL(F.protocol+y):new URL(y),Z=Qa(O.pathname,x);O.origin===F.origin&&Z!=null?y=Z+O.search+O.hash:b=!0}catch{}let j=Mw(y,{relative:s}),N=y_(y,{replace:f,state:d,target:g,preventScrollReset:w,relative:s,viewTransition:_});function I(F){a&&a(F),F.defaultPrevented||N(F)}return p.createElement("a",ns({},v,{href:S||j,onClick:b||c?a:I,ref:i,target:g}))});var rg;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(rg||(rg={}));var ig;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ig||(ig={}));function y_(e,n){let{target:i,replace:a,state:s,preventScrollReset:c,relative:f,viewTransition:d}=n===void 0?{}:n,g=aa(),y=Ja(),w=T0(e,{relative:f});return p.useCallback(_=>{if(Xw(_,i)){_.preventDefault();let v=a!==void 0?a:ea(y)===ea(w);g(e,{replace:v,state:s,preventScrollReset:c,relative:f,viewTransition:d})}},[y,g,w,a,s,i,e,c,f,d])}function L0(e){let n=p.useRef(Dd(e)),i=p.useRef(!1),a=Ja(),s=p.useMemo(()=>e_(a.search,i.current?null:n.current),[a.search]),c=aa(),f=p.useCallback((d,g)=>{const y=Dd(typeof d=="function"?d(s):d);i.current=!0,c("?"+y,g)},[c,s]);return[s,f]}function x_(e){return typeof e=="number"?Number.isNaN(e):!1}function Ke(e){return e==null||x_(e)}function Jt(e){return!Ke(e)}function w_(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return Ke(e)||e===!1||n.includes(e)}function mf(e){return w_(e,[""])}function ps(e){return!mf(e)}const __=["Boolean","Number","String","Function","Array","Date","RegExp","Object","Error","Symbol"];__.reduce((e,n)=>({...e,[`[object ${n}]`]:n.toLowerCase()}),{});const C_={sorting:void 0,setSorting:e=>{console.warn("Trying to set to ",e)}},b_=p.createContext(C_),S_=p.createContext({alerts:[],addAlert:()=>{console.warn("AlertContext::addAlert called before it was initialized")},removeAlert:()=>{console.warn("AlertContext::removeAlert called before it was initialized")},updateAlert:()=>{console.warn("AlertContext::updateAlert called before it was initialized")}}),N_=p.createContext({setShowDropdown:()=>{console.warn("DropdownMenuContext::setShowDropdown called without a provider")}}),gf=p.createContext({currentLanguage:"en",setCurrentLanguage:()=>{console.warn("LanguageContext::setCurrentLanguage called without a provider")},languageNamespaceStatus:{},setLanguageNamespaceStatus:()=>{console.warn("LanguageContext::setLanguageNamespaceStatus called without a provider")},strings:{},setStrings:()=>{console.warn("LanguageContext::setStrings called without a provider")},registerNamespace:()=>{console.warn("LanguageContext::registerNamespace called without a provider")}});p.createContext({variant:"primary"});function E_(e){return typeof e=="number"?Number.isNaN(e):!1}function k_(e){return e==null||E_(e)}function j_(e,n){if(k_(e))return;const i={},a=[];return e.forEach(s=>{const c=n?n(s):JSON.stringify(s);i[c]||(i[c]=!0,a.push(s))}),e.length===a.length?e:a}const T_=["Boolean","Number","String","Function","Array","Date","RegExp","Object","Error","Symbol"];T_.reduce((e,n)=>({...e,[`[object ${n}]`]:n.toLowerCase()}),{});function be(){for(var e=arguments.length,n=new Array(e),i=0;i{f&&f(c,_)},[f,c]);return u.jsx("button",{ref:s,name:typeof c=="string"?c:void 0,type:g,className:be(ag.rawButton,d&&ag.focused,i),disabled:a,onClick:f?w:void 0,...y,children:n})}function Ro(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0";if(Ke(e))return"";const a=String(e);return a.length>=n?a:Array(n-a.length+1).join(i)+a}function D0(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:16,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i="";const a=n?"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789":"abcdefghijklmnopqrstuvwxyz0123456789";for(let s=0;sn+i,0)}function yf(e,n,i){const a=Math.min(n,i),s=Math.max(n,i);return Math.max(a,Math.min(s,e))}function Or(e){const[n]=p.useState(()=>`_${D0()}`),{spacing:i,variant:a="md",mode:s="gap",inner:c}=e;return p.useEffect(()=>{const f=["var(--go-ui-spacing-4xs)","var(--go-ui-spacing-3xs)","var(--go-ui-spacing-2xs)","var(--go-ui-spacing-xs)","var(--go-ui-spacing-sm)","var(--go-ui-spacing-md)","var(--go-ui-spacing-lg)","var(--go-ui-spacing-xl)","var(--go-ui-spacing-2xl)","var(--go-ui-spacing-3xl)","var(--go-ui-spacing-4xl)"];let d="0";if(i!=="none"){const w={condensed:-3,compact:-2,cozy:-1,default:0,comfortable:1,relaxed:2,loose:3},_={xs:3,sm:4,md:5,lg:6,xl:7},v=c?_[a]-1:_[a],x=w[i];d=f[yf(v+x,0,f.length-1)]}if(Ke(i))return;const g=document.createElement("style");if(document.head.appendChild(g),!g.sheet){g.remove();return}let y;return s==="gap"||s==="grid-gap"?y=`gap: ${d};`:s==="padding-h"?y=`padding-left: ${d}; padding-right: ${d};`:s==="padding-v"&&(y=`padding-top: ${d}; padding-bottom: ${d};`),g.sheet.insertRule(`.${n} { ${y} }`),()=>{g.remove()}},[i,a,s,c,n]),n}const D_="_basic-layout_v9jro_1",R_="_with-wrap_v9jro_5",O_="_icons-container_v9jro_9",A_="_children-container_v9jro_14",$_="_actions-container_v9jro_19",Oo={basicLayout:D_,withWrap:R_,iconsContainer:O_,childrenContainer:A_,actionsContainer:$_};function ms(e){const{className:n,icons:i,children:a,actions:s,iconsContainerClassName:c,childrenContainerClassName:f,actionsContainerClassName:d,withoutWrap:g,spacing:y="default",variant:w="md"}=e,_=Or({spacing:y,variant:w,mode:"gap"}),v=Or({spacing:y,variant:w,mode:"gap",inner:!0}),x=be(Oo.basicLayout,!g&&Oo.withWrap,_,n),S=Ke(i)&&Ke(a)&&Ke(s)?null:u.jsxs(u.Fragment,{children:[i&&u.jsx("div",{className:be(Oo.iconsContainer,v,c),children:i}),u.jsx("div",{className:be(Oo.childrenContainer,v,f),children:a}),s&&u.jsx("div",{className:be(Oo.actionsContainer,v,d),children:s})]});return{containerClassName:x,content:S}}const F_="_button_18a84_1",z_="_ellipsized_18a84_29",B_="_children_18a84_32",U_="_overflow-wrapper_18a84_36",H_="_primary_18a84_44",q_="_secondary_18a84_45",V_="_no-spacing_18a84_50",W_="_condensed-spacing_18a84_54",G_="_compact-spacing_18a84_58",Z_="_cozy-spacing_18a84_62",Q_="_default-spacing_18a84_66",J_="_comfortable-spacing_18a84_70",K_="_relaxed-spacing_18a84_74",Y_="_loose-spacing_18a84_78",X_="_disabled_18a84_88",eC="_tertiary_18a84_116",tC="_tertiary-on-dark_18a84_130",nC="_dropdown-item_18a84_144",Sn={button:F_,ellipsized:z_,children:B_,overflowWrapper:U_,primary:H_,secondary:q_,noSpacing:V_,condensedSpacing:W_,compactSpacing:G_,cozySpacing:Z_,defaultSpacing:Q_,comfortableSpacing:J_,relaxedSpacing:K_,looseSpacing:Y_,disabled:X_,tertiary:eC,tertiaryOnDark:tC,dropdownItem:nC},rC={primary:Sn.primary,secondary:Sn.secondary,tertiary:Sn.tertiary,"tertiary-on-dark":Sn.tertiaryOnDark,"dropdown-item":Sn.dropdownItem},iC={none:Sn.noSpacing,condensed:Sn.condensedSpacing,compact:Sn.compactSpacing,cozy:Sn.cozySpacing,default:Sn.defaultSpacing,comfortable:Sn.comfortableSpacing,relaxed:Sn.relaxedSpacing,loose:Sn.looseSpacing};function aC(e){const{actions:n,actionsContainerClassName:i,children:a,childrenContainerClassName:s,className:c,disabled:f,icons:d,iconsContainerClassName:g,variant:y="primary",spacing:w="default",ellipsize:_}=e,v=be(Sn.button,rC[y],iC[w],f&&Sn.disabled,_&&Sn.ellipsized,c),x=p.useMemo(()=>_?u.jsx("div",{className:Sn.overflowWrapper,children:a}):a,[_,a]),{content:S,containerClassName:b}=ms({className:v,icons:d,children:x,actions:n,iconsContainerClassName:g,childrenContainerClassName:be(Sn.children,s),actionsContainerClassName:i,spacing:w,withoutWrap:!0,variant:"xs"});return{className:b,children:S,disabled:f}}function Me(e){const{actions:n,actionsContainerClassName:i,children:a,childrenContainerClassName:s,className:c,disabled:f,icons:d,iconsContainerClassName:g,name:y,onClick:w,variant:_,type:v="button",spacing:x,...S}=e,b=p.useCallback((N,I)=>{w&&w(N,I)},[w]),j=aC({variant:_,className:c,actionsContainerClassName:i,iconsContainerClassName:g,childrenContainerClassName:s,children:a,icons:d,actions:n,spacing:x,disabled:f||v!=="submit"&&Ke(w)});return u.jsx(vf,{name:y,type:v,onClick:b,...S,...j})}const oC=({title:e,titleId:n,...i})=>p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?p.createElement("title",{id:n},e):null,p.createElement("g",{clipPath:"url(#alert-line_svg__a)"},p.createElement("path",{d:"m12.866 3 9.526 16.5a1 1 0 0 1-.866 1.5H2.474a1 1 0 0 1-.866-1.5L11.134 3a1 1 0 0 1 1.732 0Zm-8.66 16h15.588L12 5.5 4.206 19ZM11 16h2v2h-2v-2Zm0-7h2v5h-2V9Z"})),p.createElement("defs",null,p.createElement("clipPath",{id:"alert-line_svg__a"},p.createElement("path",{d:"M0 0h24v24H0z"})))),R0=({title:e,titleId:n,...i})=>p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 56 56","aria-hidden":"true",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?p.createElement("title",{id:n},e):null,p.createElement("g",{clipPath:"url(#analysis_svg__a)"},p.createElement("path",{d:"m12.384 37.796-7.179 7.18a4.115 4.115 0 0 0 5.82 5.819l7.179-7.18a24.009 24.009 0 0 1-5.82-5.819Zm13.619-13.798h-4a1.003 1.003 0 0 0-1 1v4.94a12.572 12.572 0 0 0 6 5.518V24.998a1.003 1.003 0 0 0-1-1Zm15.998-6h-4a1.003 1.003 0 0 0-1 1v16.458a12.572 12.572 0 0 0 6-5.519V18.998a1.003 1.003 0 0 0-1-1Zm-7.999 3h-4a1.003 1.003 0 0 0-1 1v14.138c1.972.48 4.029.48 6 0V21.998a1.003 1.003 0 0 0-1-1Z"}),p.createElement("path",{d:"M32.002 4a19.998 19.998 0 1 0 0 39.995 19.998 19.998 0 0 0 0-39.995Zm10.999 30.177a14.998 14.998 0 1 1-21.998-20.394 14.998 14.998 0 0 1 21.998 20.394Z"})),p.createElement("defs",null,p.createElement("clipPath",{id:"analysis_svg__a"},p.createElement("path",{d:"M0 0h56v56H0z"})))),O0=({title:e,titleId:n,...i})=>p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?p.createElement("title",{id:n},e):null,p.createElement("g",{clipPath:"url(#arrow-down-small-fill_svg__a)"},p.createElement("path",{d:"m12 16-6-6h12l-6 6Z"})),p.createElement("defs",null,p.createElement("clipPath",{id:"arrow-down-small-fill_svg__a"},p.createElement("path",{d:"M0 0h24v24H0z"})))),sC=({title:e,titleId:n,...i})=>p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?p.createElement("title",{id:n},e):null,p.createElement("g",{clipPath:"url(#arrow-drop-down-line_svg__a)"},p.createElement("path",{d:"m12 15-4.243-4.243 1.415-1.414L12 12.172l2.828-2.83 1.415 1.415L12 15Z"})),p.createElement("defs",null,p.createElement("clipPath",{id:"arrow-drop-down-line_svg__a"},p.createElement("path",{d:"M0 0h24v24H0z"})))),lC=({title:e,titleId:n,...i})=>p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?p.createElement("title",{id:n},e):null,p.createElement("g",{clipPath:"url(#arrow-drop-up-line_svg__a)"},p.createElement("path",{d:"m12 11.828-2.828 2.829-1.415-1.414L12 9l4.243 4.243-1.415 1.414L12 11.828Z"})),p.createElement("defs",null,p.createElement("clipPath",{id:"arrow-drop-up-line_svg__a"},p.createElement("path",{d:"M0 0h24v24H0z"})))),cC=({title:e,titleId:n,...i})=>p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?p.createElement("title",{id:n},e):null,p.createElement("g",{clipPath:"url(#arrow-right-line_svg__a)"},p.createElement("path",{d:"m16.172 11-5.364-5.364 1.414-1.414L20 12l-7.778 7.778-1.414-1.414L16.172 13H4v-2h12.172Z"})),p.createElement("defs",null,p.createElement("clipPath",{id:"arrow-right-line_svg__a"},p.createElement("path",{d:"M0 0h24v24H0z"})))),A0=({title:e,titleId:n,...i})=>p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?p.createElement("title",{id:n},e):null,p.createElement("g",{clipPath:"url(#arrow-up-small-fill_svg__a)"},p.createElement("path",{d:"m12 8 6 6H6l6-6Z"})),p.createElement("defs",null,p.createElement("clipPath",{id:"arrow-up-small-fill_svg__a"},p.createElement("path",{d:"M0 0h24v24H0z"})))),uC=({title:e,titleId:n,...i})=>p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?p.createElement("title",{id:n},e):null,p.createElement("g",{clipPath:"url(#check-double-fill_svg__a)"},p.createElement("path",{d:"m11.602 13.76 1.412 1.412 8.466-8.466 1.414 1.414-9.88 9.88-6.364-6.364 1.414-1.414 2.125 2.125 1.413 1.412Zm.002-2.829 4.952-4.952 1.41 1.41-4.952 4.952-1.41-1.41Zm-2.827 5.656L7.364 18 1 11.636l1.414-1.414 1.413 1.412-.001.002 4.951 4.95Z"})),p.createElement("defs",null,p.createElement("clipPath",{id:"check-double-fill_svg__a"},p.createElement("path",{d:"M0 0h24v24H0z"})))),dC=({title:e,titleId:n,...i})=>p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?p.createElement("title",{id:n},e):null,p.createElement("g",{clipPath:"url(#check-line_svg__a)"},p.createElement("path",{d:"m10 15.171 9.192-9.192 1.415 1.414L10 18l-6.364-6.364 1.414-1.414 4.95 4.95Z"})),p.createElement("defs",null,p.createElement("clipPath",{id:"check-line_svg__a"},p.createElement("path",{d:"M0 0h24v24H0z"})))),fC=({title:e,titleId:n,...i})=>p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?p.createElement("title",{id:n},e):null,p.createElement("g",{clipPath:"url(#checkbox-blank-circle-line_svg__a)"},p.createElement("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10Zm0-2a8 8 0 1 0 0-16.001A8 8 0 0 0 12 20Z"})),p.createElement("defs",null,p.createElement("clipPath",{id:"checkbox-blank-circle-line_svg__a"},p.createElement("path",{d:"M0 0h24v24H0z"})))),$0=({title:e,titleId:n,...i})=>p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?p.createElement("title",{id:n},e):null,p.createElement("g",{clipPath:"url(#checkbox-blank-line_svg__a)"},p.createElement("path",{d:"M4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm1 2v14h14V5H5Z"})),p.createElement("defs",null,p.createElement("clipPath",{id:"checkbox-blank-line_svg__a"},p.createElement("path",{d:"M0 0h24v24H0z"})))),hC=({title:e,titleId:n,...i})=>p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?p.createElement("title",{id:n},e):null,p.createElement("g",{clipPath:"url(#checkbox-indeterminate-line_svg__a)"},p.createElement("path",{d:"M4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm1 2v14h14V5H5Zm2 6h10v2H7v-2Z"})),p.createElement("defs",null,p.createElement("clipPath",{id:"checkbox-indeterminate-line_svg__a"},p.createElement("path",{d:"M0 0h24v24H0z"})))),F0=({title:e,titleId:n,...i})=>p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?p.createElement("title",{id:n},e):null,p.createElement("g",{clipPath:"url(#checkbox-line_svg__a)"},p.createElement("path",{d:"M4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm1 2v14h14V5H5Zm6.003 11L6.76 11.757l1.414-1.414 2.829 2.829 5.656-5.657 1.415 1.414L11.003 16Z"})),p.createElement("defs",null,p.createElement("clipPath",{id:"checkbox-line_svg__a"},p.createElement("path",{d:"M0 0h24v24H0z"})))),og=({title:e,titleId:n,...i})=>p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?p.createElement("title",{id:n},e):null,p.createElement("g",{clipPath:"url(#chevron-left-line_svg__a)"},p.createElement("path",{d:"M11.05 12 16 7.05l-1.413-1.414L8.223 12l6.364 6.364L16 16.95 11.05 12Z"})),p.createElement("defs",null,p.createElement("clipPath",{id:"chevron-left-line_svg__a"},p.createElement("path",{d:"M0 24h24V0H0z"})))),sg=({title:e,titleId:n,...i})=>p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?p.createElement("title",{id:n},e):null,p.createElement("g",{clipPath:"url(#chevron-right-line_svg__a)"},p.createElement("path",{d:"m13.172 12-4.95-4.95 1.414-1.414L16 12l-6.364 6.364-1.414-1.414 4.95-4.95Z"})),p.createElement("defs",null,p.createElement("clipPath",{id:"chevron-right-line_svg__a"},p.createElement("path",{d:"M0 0h24v24H0z"})))),pC=({title:e,titleId:n,...i})=>p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?p.createElement("title",{id:n},e):null,p.createElement("path",{fillRule:"evenodd",d:"m13.057 11.996 4.716-4.716a.75.75 0 1 0-1.06-1.06l-4.717 4.716L7.28 6.22a.75.75 0 1 0-1.06 1.06l4.716 4.716-4.716 4.716a.75.75 0 1 0 1.06 1.06l4.716-4.715 4.716 4.716a.748.748 0 0 0 1.061 0 .75.75 0 0 0 0-1.061l-4.716-4.716Z",clipRule:"evenodd"})),Rd=({title:e,titleId:n,...i})=>p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?p.createElement("title",{id:n},e):null,p.createElement("g",{clipPath:"url(#delete-bin-line_svg__a)"},p.createElement("path",{d:"M17 6h5v2h-2v13a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V8H2V6h5V3a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v3Zm1 2H6v12h12V8Zm-9 3h2v6H9v-6Zm4 0h2v6h-2v-6ZM9 4v2h6V4H9Z"})),p.createElement("defs",null,p.createElement("clipPath",{id:"delete-bin-line_svg__a"},p.createElement("path",{d:"M0 0h24v24H0z"})))),mC=({title:e,titleId:n,...i})=>p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 32 32",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?p.createElement("title",{id:n},e):null,p.createElement("path",{d:"M17.949 6.651a1.834 1.834 0 1 0-1.833 1.834c1.01 0 1.833-.822 1.833-1.834Zm-7.806 15.847a1.836 1.836 0 0 0-1.833 1.834c0 1.01.822 1.832 1.833 1.832a1.835 1.835 0 0 0 1.833-1.832 1.836 1.836 0 0 0-1.833-1.834Zm5.973-10.343a2.506 2.506 0 1 0 .001 5.012 2.506 2.506 0 0 0-.001-5.012Zm5.973 10.343a1.834 1.834 0 1 0 1.833 1.834 1.836 1.836 0 0 0-1.833-1.834Z"}),p.createElement("path",{fillRule:"evenodd",d:"M0 16C0 7.163 7.164 0 16 0c8.837 0 16 7.163 16 16 0 8.836-7.164 16-16 16S0 24.836 0 16Zm22.089 11.044a2.716 2.716 0 0 1-2.713-2.713c0-.828.375-1.57.962-2.068l-2.589-4.324a3.643 3.643 0 0 1-3.266 0l-2.589 4.324a2.7 2.7 0 0 1 .962 2.068 2.716 2.716 0 0 1-2.713 2.713A2.716 2.716 0 0 1 7.43 24.33a2.716 2.716 0 0 1 2.713-2.713c.352 0 .688.07.997.192l2.606-4.354a3.664 3.664 0 0 1 1.93-6.43v-1.7a2.714 2.714 0 0 1-2.273-2.674 2.716 2.716 0 0 1 2.714-2.713 2.716 2.716 0 0 1 2.712 2.713 2.714 2.714 0 0 1-2.272 2.674v1.7a3.664 3.664 0 0 1 3.226 3.636 3.651 3.651 0 0 1-1.297 2.794l2.607 4.354c.31-.122.645-.192.997-.192a2.716 2.716 0 0 1 2.712 2.713 2.716 2.716 0 0 1-2.713 2.713ZM4.497 14.677c0-1.958 1.228-3.59 3.282-3.59 1.497 0 2.754.798 2.936 2.342H9.544c-.114-.901-.901-1.363-1.765-1.363-1.47 0-2.083 1.295-2.083 2.61 0 1.316.613 2.61 2.083 2.61 1.227.02 1.899-.719 1.919-1.88H7.875v-.912h2.917v3.609h-.768l-.182-.806c-.643.73-1.227.969-2.062.969-2.055 0-3.283-1.632-3.283-3.59Z",clipRule:"evenodd"})),gC=({title:e,titleId:n,...i})=>p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?p.createElement("title",{id:n},e):null,p.createElement("g",{clipPath:"url(#information-line_svg__a)"},p.createElement("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10Zm0-2a8 8 0 1 0 0-16.001A8 8 0 0 0 12 20ZM11 7h2v2h-2V7Zm0 4h2v6h-2v-6Z"})),p.createElement("defs",null,p.createElement("clipPath",{id:"information-line_svg__a"},p.createElement("path",{d:"M0 0h24v24H0z"})))),vC=({title:e,titleId:n,...i})=>p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?p.createElement("title",{id:n},e):null,p.createElement("g",{clipPath:"url(#question-line_svg__a)"},p.createElement("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10Zm0-2a8 8 0 1 0 0-16.001A8 8 0 0 0 12 20Zm-1-5h2v2h-2v-2Zm2-1.645V14h-2v-1.5a1 1 0 0 1 1-1 1.5 1.5 0 1 0-1.471-1.794l-1.962-.393A3.5 3.5 0 1 1 13 13.355Z"})),p.createElement("defs",null,p.createElement("clipPath",{id:"question-line_svg__a"},p.createElement("path",{d:"M0 0h24v24H0z"})))),yC=({title:e,titleId:n,...i})=>p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?p.createElement("title",{id:n},e):null,p.createElement("g",{clipPath:"url(#radio-button-line_svg__a)"},p.createElement("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10Zm0-2a8 8 0 1 0 0-16.001A8 8 0 0 0 12 20Zm0-3a5 5 0 1 1 0-10 5 5 0 0 1 0 10Z"})),p.createElement("defs",null,p.createElement("clipPath",{id:"radio-button-line_svg__a"},p.createElement("path",{d:"M0 0h24v24H0z"})))),xC=({title:e,titleId:n,...i})=>p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?p.createElement("title",{id:n},e):null,p.createElement("g",{clipPath:"url(#search-line_svg__a)"},p.createElement("path",{d:"m18.031 16.617 4.283 4.282-1.415 1.415-4.282-4.283A8.96 8.96 0 0 1 11 20c-4.968 0-9-4.032-9-9s4.032-9 9-9 9 4.032 9 9a8.96 8.96 0 0 1-1.969 5.617Zm-2.006-.742A6.977 6.977 0 0 0 18 11c0-3.868-3.133-7-7-7-3.868 0-7 3.132-7 7 0 3.867 3.132 7 7 7a6.977 6.977 0 0 0 4.875-1.975l.15-.15Z"})),p.createElement("defs",null,p.createElement("clipPath",{id:"search-line_svg__a"},p.createElement("path",{d:"M0 0h24v24H0z"})))),wC=({title:e,titleId:n,...i})=>p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 25 25",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?p.createElement("title",{id:n},e):null,p.createElement("path",{d:"M8.775 9.71a2.284 2.284 0 0 0-2.2 1.66H4.623a.623.623 0 0 0 0 1.247h1.952a2.284 2.284 0 0 0 4.401 0h8.804a.623.623 0 0 0 0-1.246h-8.804a2.284 2.284 0 0 0-2.2-1.661Zm0 3.322a1.038 1.038 0 1 1 0-2.076 1.038 1.038 0 0 1 0 2.076ZM15.627 4a2.284 2.284 0 0 0-2.2 1.661H4.622a.623.623 0 0 0 0 1.246h8.803a2.285 2.285 0 0 0 4.402 0h1.952a.623.623 0 1 0 0-1.246h-1.952A2.284 2.284 0 0 0 15.628 4Zm0 3.322a1.038 1.038 0 1 1 0-2.077 1.038 1.038 0 0 1 0 2.077Zm0 8.098a2.284 2.284 0 0 0-2.2 1.66H4.622a.623.623 0 0 0 0 1.246h8.803a2.285 2.285 0 0 0 4.402 0h1.952a.623.623 0 0 0 0-1.245h-1.952a2.284 2.284 0 0 0-2.2-1.661Zm0 3.322a1.038 1.038 0 1 1 0-2.077 1.038 1.038 0 0 1 0 2.077Z"})),_C=({title:e,titleId:n,...i})=>p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?p.createElement("title",{id:n},e):null,p.createElement("path",{fillRule:"evenodd",d:"m15.063 12 .937.938-4 4-4-4L8.938 12 12 15.063 15.063 12Z",clipRule:"evenodd"}),p.createElement("mask",{id:"table-sorting-line_svg__a",width:8,height:5,x:8,y:12,maskUnits:"userSpaceOnUse",style:{maskType:"luminance"}},p.createElement("path",{fillRule:"evenodd",d:"m15.063 12 .937.938-4 4-4-4L8.938 12 12 15.063 15.063 12Z",clipRule:"evenodd"})),p.createElement("g",{mask:"url(#table-sorting-line_svg__a)"},p.createElement("path",{d:"M-24-22h72v72h-72z"})),p.createElement("path",{fillRule:"evenodd",d:"M8.938 11 8 10.062l4-4 4 4-.938.938L12 7.937 8.937 11Z",clipRule:"evenodd"}),p.createElement("mask",{id:"table-sorting-line_svg__b",width:8,height:5,x:8,y:6,maskUnits:"userSpaceOnUse",style:{maskType:"luminance"}},p.createElement("path",{fillRule:"evenodd",d:"M8.938 11 8 10.062l4-4 4 4-.938.938L12 7.937 8.937 11Z",clipRule:"evenodd"})),p.createElement("g",{mask:"url(#table-sorting-line_svg__b)"},p.createElement("path",{d:"M48 45h-72v-72h72z"}))),z0=({title:e,titleId:n,...i})=>p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":n},i),e?p.createElement("title",{id:n},e):null,p.createElement("g",{clipPath:"url(#upload-cloud-line_svg__a)"},p.createElement("path",{d:"M1 14.5a6.496 6.496 0 0 1 3.064-5.519 8.001 8.001 0 0 1 15.872 0 6.5 6.5 0 0 1-2.936 12l-10 .02c-3.356-.275-6-3.079-6-6.5Zm15.848 4.487a4.5 4.5 0 0 0 2.03-8.309l-.807-.503-.12-.942a6 6 0 0 0-11.903 0l-.12.942-.805.503a4.5 4.5 0 0 0 2.029 8.31l.173.012h9.35l.173-.013ZM13 13v4h-2v-4H8l4-5 4 5h-3Z"})),p.createElement("defs",null,p.createElement("clipPath",{id:"upload-cloud-line_svg__a"},p.createElement("path",{d:"M0 0h24v24H0z"})))),CC="_spinner_50bgg_1",bC="_spinner-bounce_50bgg_9",bl={spinner:CC,spinnerBounce:bC};function Ki(e){const{className:n}=e;return u.jsxs("div",{className:be(bl.spinner,n),children:[u.jsx("div",{className:bl.spinnerBounce}),u.jsx("div",{className:bl.spinnerBounce}),u.jsx("div",{className:bl.spinnerBounce})]})}const SC="_message_176iw_1",NC="_icon_176iw_13",EC="_spinner_176iw_17",kC="_title_176iw_22",jC="_errored_176iw_27",TC="_compact_176iw_33",Ni={message:SC,icon:NC,spinner:EC,title:kC,errored:jC,compact:TC};function MC(e){const{className:n,pending:i=!1,variant:a,icon:s,title:c,description:f,actions:d,compact:g=!1,errored:y,erroredTitle:w,erroredDescription:_}=e,v=Jt(y?w:c),x=Jt(y?_:f);return u.jsxs("div",{className:be(Ni.message,a==="error"&&Ni.errored,g&&Ni.compact,n),children:[(s||i)&&u.jsxs("div",{className:Ni.icon,children:[i&&u.jsx(Ki,{className:Ni.spinner}),!i&&s]}),v&&u.jsx("div",{className:Ni.title,children:y?w:c}),x&&u.jsx("div",{className:Ni.description,children:f}),d&&u.jsx("div",{className:Ni.actions,children:d})]})}function fc(e){const{strings:n,registerNamespace:i}=p.useContext(gf);return p.useEffect(()=>{i(e.namespace,e.strings)},[i,e]),n[e.namespace]??e.strings}const PC="common",IC={messageTitleFetching:"Fetching data...",messageTitleFilteredDataNotAvailable:"Data is not available for selected filter!",messageTitleDataNotAvailable:"Data is not available!",messageTitleDataFailedToFetch:"Failed to fetch data!"},LC={namespace:PC,strings:IC},DC="_default-message_wu986_1",RC="_overlay_wu986_2",lg={defaultMessage:DC,overlay:RC};function xf(e){const{className:n,compact:i,pending:a,overlayPending:s,filtered:c,empty:f,errored:d,emptyMessage:g,filteredEmptyMessage:y,pendingMessage:w,errorMessage:_}=e,v=fc(LC),x=p.useMemo(()=>a?w??v.messageTitleFetching:d?_??v.messageTitleDataFailedToFetch:c?y??v.messageTitleFilteredDataNotAvailable:f?g??v.messageTitleDataNotAvailable:null,[f,a,c,d,g,y,w,_,v]);return!f&&!a&&!d?null:u.jsx(MC,{className:be(lg.defaultMessage,a&&s&&lg.overlay,n),icon:u.jsx(R0,{}),compact:i,title:x,pending:a})}const OC="_filter-bar_16xsj_1",AC="_grid-with-actions_16xsj_6",$C="_grid_16xsj_6",FC="_actions_16xsj_15",Ko={filterBar:OC,gridWithActions:AC,grid:$C,actions:FC};function cg(e){const{grid:n,actions:i,spacing:a="default"}=e,s=Or({spacing:a,mode:"gap"}),c=Or({spacing:a,mode:"gap",inner:!0}),f=Or({spacing:a,mode:"grid-gap"});return Ke(n)&&Ke(i)?null:u.jsxs("div",{className:be(Ko.gridWithActions,s),children:[u.jsx("div",{className:be(Ko.grid,f),children:n}),Jt(i)&&u.jsx("div",{className:be(Ko.actions,c),children:i})]})}function zC(e){const{className:n,filters:i,filterActions:a,search:s,searchActions:c,filterPreview:f,spacing:d}=e;return Ke(i)&&Ke(a)&&Ke(s)&&Ke(c)&&Ke(f)?null:u.jsxs("div",{className:be(Ko.filterBar,n),children:[u.jsx(cg,{grid:i,actions:a,spacing:d}),u.jsx(cg,{grid:s,actions:c,spacing:d}),Jt(f)&&u.jsx("div",{className:Ko.filterPreview,children:f})]})}function BC(e){const{actions:n,actionsContainerClassName:i,children:a,childrenContainerClassName:s,className:c,icons:f,iconsContainerClassName:d,spacing:g,withoutWrap:y}=e,{content:w,containerClassName:_}=ms({actions:n,actionsContainerClassName:i,children:a,childrenContainerClassName:s,className:c,icons:f,iconsContainerClassName:d,spacing:g,withoutWrap:y});return u.jsx("div",{className:_,children:w})}function UC(e,n,i){const[a,s]=p.useState(()=>e);return p.useEffect(()=>{const c=setTimeout(()=>{s(e)},300);return()=>{clearTimeout(c)}},[e,n,i]),a}function HC(e,n=!1){const[i,a]=p.useState(()=>{var s;const c=(s=e.current)==null?void 0:s.getBoundingClientRect();return{width:c?.width??0,height:c?.height??0}});return p.useEffect(()=>{const s=new ResizeObserver(f=>{const d=f.at(0),g=d?.contentRect;g&&a({width:g.width,height:g.height})}),c=e.current;return!n&&Jt(c)&&s.observe(c),()=>{!n&&Jt(c)&&s.unobserve(c)}},[n,e]),UC(i)}const qC="_heading_1uxwj_1",VC="_level-one_1uxwj_9",WC="_level-two_1uxwj_17",GC="_level-three_1uxwj_25",ZC="_level-four_1uxwj_33",QC="_level-five_1uxwj_37",JC="_level-six_1uxwj_41",KC="_ellipsized-text_1uxwj_45",YC="_ellipsized_1uxwj_45",Yr={heading:qC,levelOne:VC,levelTwo:WC,levelThree:GC,levelFour:ZC,levelFive:QC,levelSix:JC,ellipsizedText:KC,ellipsized:YC},XC={1:Yr.levelOne,2:Yr.levelTwo,3:Yr.levelThree,4:Yr.levelFour,5:Yr.levelFive,6:Yr.levelSix};function $a(e){const{className:n,level:i=3,children:a,ellipsize:s}=e,c=`h${i}`,f=p.useRef(null),d=HC(f);return a?u.jsxs(c,{className:be(Yr.heading,s&&Yr.ellipsized,XC[i],n),ref:f,children:[s&&u.jsx("div",{className:Yr.ellipsizedText,style:{width:`${d.width}px`},title:typeof a=="string"?a:void 0,children:a}),!s&&a]}):null}const eb="_header_537v1_1",tb={header:eb};function nb(e){const{actions:n,actionsContainerClassName:i,children:a,childrenContainerClassName:s,className:c,elementRef:f,ellipsizeHeading:d,heading:g,headingClassName:y,headingLevel:w,headingDescription:_,headingDescriptionContainerClassName:v,icons:x,iconsContainerClassName:S,headingSectionClassName:b,headingContainerClassName:j,wrapHeadingContent:N=!1,spacing:I="default"}=e,F=p.useMemo(()=>Ke(g)&&Ke(_)?null:u.jsxs(u.Fragment,{children:[u.jsx($a,{level:w,className:y,ellipsize:d,children:g}),_&&u.jsx("div",{className:v,children:_})]}),[g,d,_,y,v,w]),{content:O,containerClassName:Z}=ms({actions:n,actionsContainerClassName:i,children:F,childrenContainerClassName:j,className:b,icons:x,iconsContainerClassName:S,withoutWrap:!N,spacing:I,variant:"sm"}),ye=Or({spacing:I,inner:!0});return!O&&!a?null:u.jsxs("div",{className:be(tb.header,ye,c),ref:f,children:[O&&u.jsx("div",{className:Z,children:O}),a&&u.jsx("div",{className:s,children:a})]})}const rb="_container_lyve2_1",ib="_header_lyve2_8",ab="_centered-header-description-container_lyve2_11",ob="_centered-description_lyve2_16",sb="_with-border-and-header-background_lyve2_23",lb="_border_lyve2_33",cb="_content_lyve2_39",ub="_pending-overlaid_lyve2_42",db="_message_lyve2_47",fb="_footer_lyve2_53",hb="_with-grid-view_lyve2_57",pb="_two-columns_lyve2_67",mb="_three-columns_lyve2_82",gb="_four-columns_lyve2_96",vb="_five-columns_lyve2_100",yb="_with-vertical-view_lyve2_105",xb="_with-overflow-in-content_lyve2_112",bn={container:rb,header:ib,centeredHeaderDescriptionContainer:ab,centeredDescription:ob,withBorderAndHeaderBackground:sb,border:lb,content:cb,pendingOverlaid:ub,message:db,footer:fb,withGridView:hb,twoColumns:pb,threeColumns:mb,fourColumns:gb,fiveColumns:vb,withVerticalView:yb,withOverflowInContent:xb},wb={2:bn.twoColumns,3:bn.threeColumns,4:bn.fourColumns,5:bn.fiveColumns};function Qe(e){const{actions:n,actionsContainerClassName:i,children:a,childrenContainerClassName:s,className:c,containerRef:f,contentViewType:d="default",ellipsizeHeading:g,filters:y,filterActions:w,footerActions:_,footerActionsContainerClassName:v,footerClassName:x,footerContent:S,footerContentClassName:b,footerIcons:j,headerClassName:N,headerDescription:I,withCenteredHeaderDescription:F,headerDescriptionContainerClassName:O,headerElementRef:Z,heading:ye,headingClassName:D,headingContainerClassName:re,headingDescription:le,headingDescriptionContainerClassName:oe,headingLevel:R,headingSectionClassName:U,icons:J,iconsContainerClassName:Y,numPreferredGridContentColumns:xe=2,spacing:Ne="default",withHeaderBorder:ne=!1,withFooterBorder:X=!1,withBorderAndHeaderBackground:se=!1,withOverflowInContent:E=!1,withInternalPadding:V=!1,withoutWrapInHeading:fe=!1,withoutWrapInFooter:De=!1,pending:ce=!1,overlayPending:ve=!1,empty:we=!1,errored:je=!1,filtered:Re=!1,compactMessage:Pe=!1,errorMessage:H,emptyMessage:Te,pendingMessage:Ye,filteredEmptyMessage:Je}=e,jt=j||S||_,gt=ye||n||J||I||le,Tt=Or({spacing:Ne}),ht=Or({spacing:Ne,mode:"padding-h"}),z=Or({spacing:Ne,mode:"padding-v"}),Oe=Or({spacing:Ne,mode:"gap",inner:!0}),lt=p.useMemo(()=>Ke(I)?null:F?u.jsx("div",{className:bn.centeredDescription,children:I}):I,[I,F]);return!gt&&!y&&!a&&!jt&&!we&&!ce&&!je&&!Re?null:u.jsxs("div",{ref:f,className:be(bn.container,!se&&Tt,V&&z,E&&bn.withOverflowInContent,se&&bn.withBorderAndHeaderBackground,d==="grid"&&bn.withGridView,d==="grid"&&wb[xe],d==="vertical"&&bn.withVerticalView,c),children:[gt&&u.jsx(nb,{actions:n,className:be(bn.header,se&&z,(V||se)&&ht,N),elementRef:Z,actionsContainerClassName:i,ellipsizeHeading:g,heading:ye,headingLevel:R,icons:J,iconsContainerClassName:Y,childrenContainerClassName:be(F&&bn.centeredHeaderDescriptionContainer,O),headingSectionClassName:U,headingClassName:D,headingContainerClassName:re,wrapHeadingContent:!fe,headingDescription:le,headingDescriptionContainerClassName:oe,spacing:Ne,children:lt}),ne&&u.jsx("div",{className:bn.border}),u.jsx(zC,{filters:y,filterActions:w,spacing:Ne,className:be(V&&ht)}),(a||we||ce||je||Re)&&u.jsxs("div",{className:be(bn.content,d!=="default"&&Oe,(V||se)&&ht,se&&z,ve&&ce&&bn.pendingOverlaid,s),children:[u.jsx(xf,{className:bn.message,pending:ce,filtered:Re,errored:je,empty:we,compact:Pe,overlayPending:ve,emptyMessage:Te,filteredEmptyMessage:Je,pendingMessage:Ye,errorMessage:H}),!we&&!je&&(!ce||ve)&&a]}),jt&&X&&u.jsx("div",{className:bn.border}),jt&&u.jsx(BC,{actions:_,icons:j,childrenContainerClassName:b,className:be(bn.footer,V&&ht,se&&z,x),actionsContainerClassName:v,spacing:Ne,withoutWrap:De,children:S})]})}function _b(e){const{children:n,container:i=document.body,portalKey:a}=e;return u.jsx(u.Fragment,{children:lf.createPortal(n,i,a)})}const Cb="yyyy-MM-dd",B0="-",bb=108;function Fa(e,n,i){return Ke(e)?void 0:e.reduce((a,s,c)=>{const f=n(s,c);return a[f]=i?i(s,f,c,a):s,a},{})}function wf(e,n){return function(i,a){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;const c=Jt(i)?e(i):void 0,f=Jt(a)?e(a):void 0;return c===f?0:Ke(c)?s*1:Ke(f)?s*-1:s*n(c,f)}}const Sb=wf(e=>e,(e,n)=>e.localeCompare(n)),Nb=wf(e=>e,(e,n)=>e-n),Eb=(e,n,i,a)=>i?wf(s=>s,(s,c)=>{const f=i.toLowerCase(),d=s.toLowerCase().indexOf(f),g=c.toLowerCase().indexOf(f);return d===g||d===-1&&g===-1?s.localeCompare(c):g===-1?-1:d===-1?1:d-g})(e,n,a):0,kb=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],jb=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];var Xr=function(e){return e.time="time",e.date="date",e}(Xr||{});function ug(e,n){let i,a;return n.forEach(s=>{const c=e.indexOf(s);if(c===-1)return;const f=c+s.length;(i===void 0||ca)&&(a=f)}),{start:i,end:a}}function Tb(e){const{start:n,end:i}=ug(e,["yyyy","yy","MMM","MM","dd","EEE"]),{start:a,end:s}=ug(e,["hh","mm","ss","aaa"]),c=e.length,f=(d,g)=>d===void 0||g===void 0?"":e.substring(d,g);return n===void 0&&a===void 0?[{value:e}].filter(d=>d.value!==""):n===void 0?[{value:f(0,a)},{type:Xr.time,value:f(a,s)},{value:f(s,c)}].filter(d=>d.value!==""):a===void 0?[{value:f(0,n)},{type:Xr.date,value:f(n,i)},{value:f(i,c)}].filter(d=>d.value!==""):nd.value!==""):[{value:f(0,a)},{type:Xr.time,value:f(a,s)},{value:f(s,n)},{type:Xr.date,value:f(n,i)},{value:f(i,c)}].filter(d=>d.value!=="")}function Mb(e,n){return e.map(i=>{if(i.type===Xr.date){const a=n.getFullYear(),s=n.getMonth(),c=n.getDate(),f=jb[n.getDay()],d={...i};return d.value=d.value.replace("yyyy",String(a)).replace("yy",String(a%100)).replace("MMM",kb[s]).replace("MM",Ro(s+1,2)).replace("EEE",f).replace("dd",Ro(c,2)),d}if(i.type===Xr.time){const a=i.value.indexOf("aaa"),s=n.getHours(),c=a>=0?(s-1)%12+1:s,f=s>=12?"PM":"AM",d=n.getMinutes(),g=n.getSeconds(),y={...i};return y.value=y.value.replace("hh",Ro(c,2)).replace("mm",Ro(d,2)).replace("ss",Ro(g,2)).replace("aaa",f),y}return i})}function Pb(e,n,i=!0){if(Ke(e)||Ke(n))return;if(n===0)return 0;const a=e*100/n;return i?yf(a,0,100):a}function Ib(e){if(Ke(e))return;const n=e.filter(Jt);if(n.length!==0)return n}function Lb(e){const n=Ib(e);if(!Ke(n))return Jo(n)}function ta(e,n,i){return mf(n)?e:e.filter(a=>I_(i(a),n)).sort((a,s)=>Eb(i(a),i(s),n))}function dg(e){if(e<1e3)return 2;const n=new Intl.NumberFormat("default",{notation:"compact"}).formatToParts(e).find(({type:i})=>i==="fraction");return Ke(n)||mf(n.value)?0:Number(n.value)>.1?1:0}function Db(e,n){if(Ke(e))return;const i={};if(Ke(n))return i.maximumFractionDigits=dg(e),new Intl.NumberFormat("default",i).format(e);const{currency:a,unit:s,maximumFractionDigits:c,compact:f,separatorHidden:d,language:g}=n;return ps(s)&&(i.unit=s,i.unitDisplay="short"),a&&(i.currencyDisplay="narrowSymbol",i.style="currency"),f&&(i.notation="compact",i.compactDisplay="short"),i.useGrouping=!d,Jt(c)?i.maximumFractionDigits=c:i.maximumFractionDigits=dg(e),new Intl.NumberFormat(g,i).format(e)}function Rb(e,n=Cb){if(Ke(e))return;const i=new Date(e);return Number.isNaN(i.getTime())?void 0:Mb(Tb(n),i).map(a=>a.value).join("")}const Ob="_number-output_1blvi_1",Ab={numberOutput:Ob};function _f(e){const{className:n,invalidText:i=B0,separatorHidden:a,compact:s,currency:c,value:f,tooltip:d,unit:g,prefix:y,suffix:w,maximumFractionDigits:_=1}=e,{currentLanguage:v}=p.useContext(gf),x=p.useMemo(()=>{if(Ke(f))return i;const S=Db(f,{currency:c,compact:s,separatorHidden:a,maximumFractionDigits:_,unit:g,language:v});return u.jsxs(u.Fragment,{children:[y,S,w]})},[i,f,s,a,c,g,_,y,v,w]);return u.jsx("div",{className:be(Ab.numberOutput,n),title:Jt(d)?String(d):void 0,children:x})}const Yl=parseFloat(getComputedStyle(document.documentElement).fontSize),$b=16*Yl,ud=.5*Yl,Fb={vertical:"bottom",horizontal:"right"};function zb(e){const n=window.innerWidth/2,i=window.innerHeight/2,a=e.x+e.width/2,s=e.y+e.height/2;return{horizontal:a{if(Ke(e.current))return;const c=e.current.getBoundingClientRect(),{x:f,y:d,width:g,height:y}=c,w=Yl,_=w,v=window.innerWidth-w,x=window.innerWidth-2*w,S=zb(c),b=f+g/2,j=yf(Jt(n)?n*Yl:g,$b,x);let N=b-j/2,I=b+j/2;if(N<_){const F=_-N-w;N=_,I+=F}if(I>v){const F=I-v-w;I=v,N-=F}a({content:{bottom:S.vertical==="bottom"?`${window.innerHeight-d+ud}px`:"unset",top:S.vertical==="top"?`${d+y+ud}px`:"unset",left:S.horizontal==="left"?`${N}px`:"unset",right:S.horizontal==="right"?`${window.innerWidth-I}px`:"unset"},pointer:{left:`${b}px`,top:S.vertical==="top"?`${d+y}px`:`${d-ud}px`,right:"unset",bottom:"unset"},width:`${I-N}px`,orientation:S})},[e,n]);return p.useEffect(()=>{s();const c=s,f=s;return window.addEventListener("scroll",c,!0),window.addEventListener("resize",f,!0),()=>{window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",f,!0)}},[s]),i}const Ub="_popup_cws49_1",Hb="_top-orientation_cws49_9",qb="_pointer_cws49_15",Vb="_icon_cws49_25",Ao={popup:Ub,topOrientation:Hb,pointer:qb,icon:Vb};function hc(e){const{parentRef:n,elementRef:i,children:a,className:s,pointerClassName:c,preferredWidth:f}=e,{content:d,pointer:g,width:y,orientation:w}=Bb(n,f);return u.jsxs(_b,{children:[u.jsx("div",{ref:i,style:{...d,width:y},className:be(Ao.popup,w.vertical==="bottom"&&Ao.topOrientation,s),children:a}),u.jsx("div",{className:be(Ao.pointer,w.vertical==="bottom"&&Ao.topOrientation,c),style:{...g},children:u.jsx("svg",{className:Ao.icon,viewBox:"0 0 200 100",children:u.jsx("path",{d:"M0 100 L100 0 L200 100Z"})})})]})}const Wb="_tooltip-dummy_rbf3f_1",Gb="_tooltip-content_rbf3f_7",Zb="_pointer_rbf3f_14",dd={tooltipDummy:Wb,tooltipContent:Gb,pointer:Zb};function Qb(e){const{className:n,title:i,description:a,preferredWidth:s}=e,[c,f]=p.useState(!1),[d,g]=p.useState(!1),y=p.useRef(),w=p.useRef(null);return p.useEffect(()=>{const _=()=>{g(!0)},v=()=>{g(!1)};if(Ke(w.current))return;const{current:{parentNode:x}}=w;if(!Ke(x))return y.current=x,x.addEventListener("mouseover",_),x.addEventListener("mouseout",v),f(!0),()=>{x.removeEventListener("mouseover",_),x.removeEventListener("mouseout",v)}},[]),u.jsxs(u.Fragment,{children:[!c&&u.jsx("div",{className:dd.tooltipDummy,ref:w}),d&&u.jsx(hc,{className:be(dd.tooltipContent,n),parentRef:y,pointerClassName:dd.pointer,preferredWidth:s,children:u.jsx(Qe,{heading:i,withInternalPadding:!0,contentViewType:"vertical",children:a})})]})}const Jb="_input-error_1sxiz_1",Kb="_pointer_1sxiz_14",Sl={inputError:Jb,pointer:Kb};function Cf(e){const{children:n,className:i,disabled:a}=e,[s,c]=p.useState(!1),f=p.useRef(),d=p.useRef(null);return p.useEffect(()=>{if(Ke(d.current))return;const{current:{parentElement:g}}=d;Ke(g)||(f.current=g,c(!0))},[]),u.jsxs(u.Fragment,{children:[!s&&u.jsx("div",{className:Sl.tooltipDummy,ref:d}),n&&!a&&u.jsxs(hc,{className:be(Sl.inputError,i),pointerClassName:Sl.pointer,parentRef:f,children:[u.jsx(oC,{className:Sl.icon}),n]})]})}const Yb="_input-label_3lsx4_1",Xb="_disabled_3lsx4_7",eS="_required_3lsx4_11",fd={inputLabel:Yb,disabled:Xb,required:eS};function U0(e){const{children:n,className:i,disabled:a,required:s}=e;return n?u.jsxs("div",{className:be(fd.inputLabel,a&&fd.disabled,i),children:[n,s&&u.jsx("span",{"aria-hidden":!0,className:fd.required,children:"*"})]}):null}function H0(e){const{data:n,keySelector:i,renderer:a,rendererParams:s}=e;return Ke(n)?null:n.map((c,f)=>{const d=i(c,f),g=s(d,c,f,n);return u.jsx(a,{...g},String(d))})}const tS="_radio_1uudv_1",nS="_icon_1uudv_5",rS="_content_1uudv_10",iS="_description_1uudv_16",aS="_input_1uudv_21",oS="_active_1uudv_37",sS="_disabled_1uudv_43",lS="_read-only_1uudv_55",Jr={radio:tS,icon:nS,content:rS,description:iS,input:aS,active:oS,disabled:sS,readOnly:lS};function cS(e){const{name:n,label:i,description:a,className:s,value:c,inputName:f,onClick:d,disabled:g,readOnly:y,actions:w}=e,_=$n.useCallback(()=>{d&&d(n)},[n,d]),{content:v,containerClassName:x}=ms({icons:c?u.jsx(yC,{className:Jr.icon}):u.jsx(fC,{className:Jr.icon}),actions:w,childrenContainerClassName:Jr.content,children:u.jsxs(u.Fragment,{children:[i,a&&u.jsx("div",{className:Jr.description,children:a})]}),spacing:"compact",withoutWrap:!0});return u.jsxs("label",{className:be(Jr.radio,c&&Jr.active,g&&Jr.disabled,y&&Jr.readOnly,x,s),children:[u.jsx("input",{className:Jr.input,type:"radio",name:typeof f=="string"?f:void 0,checked:c,onClick:_,disabled:g,readOnly:!0}),v]})}const uS="_radio-input_17cft_1",dS="_radio-list-container_17cft_6",fS="_disabled_17cft_13",hS="_input-hint_17cft_18",Nl={radioInput:uS,radioListContainer:dS,disabled:fS,inputHint:hS};function pS(e){return!!e.clearable}function mS(e){const n=pS(e),{className:i,name:a,options:s,value:c,keySelector:f,labelSelector:d,descriptionSelector:g,label:y,labelContainerClassName:w,hint:_,hintContainerClassName:v,listContainerClassName:x,error:S,renderer:b=cS,rendererParams:j,disabled:N,readOnly:I,required:F,onChange:O,withAsterisk:Z}=e,ye=$n.useCallback(le=>{I||(n&&e.onChange(le===c?void 0:le,a),!n&&Jt(le)&&O(le,a))},[c,e,O,n,I,a]),D=$n.useCallback((le,oe)=>{const R={inputName:a,label:d(oe),description:g?g(oe):void 0,name:le,onClick:ye,value:le===c,disabled:N,readOnly:I};return{...j?j(oe):void 0,...R}},[a,d,c,ye,j,N,I,g]),re=Z??F;return u.jsxs("div",{className:be(Nl.radioInput,N&&Nl.disabled,i),children:[u.jsx(U0,{className:w,disabled:N,required:re,children:y}),u.jsx("div",{className:be(Nl.radioListContainer,x),children:u.jsx(H0,{data:s,rendererParams:D,renderer:b,keySelector:f})}),_&&u.jsx("div",{className:be(Nl.inputHint,v),children:_}),u.jsx(Cf,{children:S})]})}function Tn(e){return e.id}const gS="common",vS={booleanYesLabel:"Yes",booleanNoLabel:"No"},yS={namespace:gS,strings:vS},xS="_boolean-output_kg1uq_1",wS={booleanOutput:xS};function _S(e){const{className:n,invalidText:i,value:a}=e,s=fc(yS);let c;return a===!0?c=s.booleanYesLabel:a===!1?c=s.booleanNoLabel:c=i,u.jsx("div",{className:be(wS.booleanOutput,n),children:c})}const CS="_button_1vbet_1",bS="_round_1vbet_31",SS="_primary_1vbet_34",NS="_secondary_1vbet_51",ES="_tertiary_1vbet_69",hd={button:CS,round:bS,primary:SS,secondary:NS,tertiary:ES};function hg(e){const{ariaLabel:n,children:i,className:a,variant:s,round:c=!0,...f}=e,d=be(hd.button,hd[s],c&&hd.round,a);return u.jsx(vf,{className:d,"aria-label":n,...f,children:i})}function kS(e){const{className:n,indeterminate:i,value:a}=e;return u.jsxs(u.Fragment,{children:[i&&u.jsx(hC,{className:n}),a&&!i&&u.jsx(F0,{className:n}),!a&&!i&&u.jsx($0,{className:n})]})}const jS="_checkbox_12g7n_1",TS="_with-background_12g7n_7",MS="_checkmark-container_12g7n_12",PS="_input_12g7n_18",IS="_content_12g7n_33",LS="_description_12g7n_40",DS="_checked_12g7n_45",RS="_checkmark_12g7n_12",OS="_disabled-checkbox_12g7n_58",Ir={checkbox:jS,withBackground:TS,checkmarkContainer:MS,input:PS,content:IS,description:LS,checked:DS,checkmark:RS,disabledCheckbox:OS};function Xl(e){const{className:n,checkmark:i=kS,checkmarkClassName:a,checkmarkContainerClassName:s,disabled:c,error:f,indeterminate:d,inputClassName:g,invertedLogic:y=!1,label:w,labelContainerClassName:_,name:v,onChange:x,readOnly:S,tooltip:b,value:j,description:N,withBackground:I,...F}=e,O=p.useCallback(D=>{const re=D.currentTarget.checked;x(y?!re:re,v)},[v,x,y]),Z=y?!j:j,ye=be(Ir.checkbox,n,!d&&Z&&Ir.checked,I&&Ir.withBackground,c&&Ir.disabledCheckbox,S&&Ir.readOnly);return u.jsxs("label",{className:ye,title:b,children:[u.jsxs("div",{className:be(Ir.checkmarkContainer,s),children:[u.jsx("input",{onChange:O,className:be(Ir.input,g),type:"checkbox",checked:Z??!1,disabled:c||S,readOnly:S,...F}),u.jsx(i,{className:be(Ir.checkmark,a),value:Z??!1,indeterminate:d,"aria-hidden":"true"})]}),(w||N)&&u.jsxs("div",{className:Ir.content,children:[w&&u.jsx("div",{className:_,children:w}),N&&u.jsx("div",{className:Ir.description,children:N})]}),f&&u.jsx(Cf,{children:f})]})}var ft=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function AS(e){if(e.__esModule)return e;var n=e.default;if(typeof n=="function"){var i=function a(){return this instanceof a?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};i.prototype=n.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(i,a,s.get?s:{enumerable:!0,get:function(){return e[a]}})}),i}var Yn=function(){return Yn=Object.assign||function(e){for(var n,i=1,a=arguments.length;i=0}).sort(pN)},gN=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],Mf=gN.join(","),vN="".concat(Mf,", [data-focus-guard]"),uv=function(e,n){return $r((e.shadowRoot||e).children).reduce(function(i,a){return i.concat(a.matches(n?vN:Mf)?[a]:[],uv(a))},[])},yN=function(e,n){var i;return e instanceof HTMLIFrameElement&&!((i=e.contentDocument)===null||i===void 0)&&i.body?Ha([e.contentDocument.body],n):[e]},Ha=function(e,n){return e.reduce(function(i,a){var s,c=uv(a,n),f=(s=[]).concat.apply(s,c.map(function(d){return yN(d,n)}));return i.concat(f,a.parentNode?$r(a.parentNode.querySelectorAll(Mf)).filter(function(d){return d===a}):[])},[])},xN=function(e){var n=e.querySelectorAll("[".concat(GS,"]"));return $r(n).map(function(i){return Ha([i])}).reduce(function(i,a){return i.concat(a)},[])},Pf=function(e,n){return $r(e).filter(function(i){return av(n,i)}).filter(function(i){return dN(i)})},vg=function(e,n){return n===void 0&&(n=new Map),$r(e).filter(function(i){return ov(n,i)})},If=function(e,n,i){return Tf(Pf(Ha(e,i),n),!0,i)},is=function(e,n){return Tf(Pf(Ha(e),n),!1)},wN=function(e,n){return Pf(xN(e),n)},Yi=function(e,n){return e.shadowRoot?Yi(e.shadowRoot,n):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,n)?!0:$r(e.children).some(function(i){var a;if(i instanceof HTMLIFrameElement){var s=(a=i.contentDocument)===null||a===void 0?void 0:a.body;return s?Yi(s,n):!1}return Yi(i,n)})},_N=function(e){for(var n=new Set,i=e.length,a=0;a0&&n.add(s),(c&Node.DOCUMENT_POSITION_CONTAINS)>0&&n.add(a)}return e.filter(function(f,d){return!n.has(d)})},dv=function(e){return e.parentNode?dv(e.parentNode):e},Lf=function(e){var n=na(e);return n.filter(Boolean).reduce(function(i,a){var s=a.getAttribute(Od);return i.push.apply(i,s?_N($r(dv(a).querySelectorAll("[".concat(Od,'="').concat(s,'"]:not([').concat(Q0,'="disabled"])')))):[a]),i},[])},CN=function(e){try{return e()}catch{return}},as=function(e){if(e===void 0&&(e=document),!(!e||!e.activeElement)){var n=e.activeElement;return n.shadowRoot?as(n.shadowRoot):n instanceof HTMLIFrameElement&&CN(function(){return n.contentWindow.document})?as(n.contentWindow.document):n}},bN=function(e,n){return e===n},SN=function(e,n){return!!$r(e.querySelectorAll("iframe")).some(function(i){return bN(i,n)})},fv=function(e,n){return n===void 0&&(n=as(nv(e).ownerDocument)),!n||n.dataset&&n.dataset.focusGuard?!1:Lf(e).some(function(i){return Yi(i,n)||SN(i,n)})},NN=function(e){e===void 0&&(e=document);var n=as(e);return n?$r(e.querySelectorAll("[".concat(WS,"]"))).some(function(i){return Yi(i,n)}):!1},EN=function(e,n){return n.filter(cv).filter(function(i){return i.name===e.name}).filter(function(i){return i.checked})[0]||e},Df=function(e,n){return cv(e)&&e.name?EN(e,n):e},kN=function(e){var n=new Set;return e.forEach(function(i){return n.add(Df(i,e))}),e.filter(function(i){return n.has(i)})},yg=function(e){return e[0]&&e.length>1?Df(e[0],e):e[0]},xg=function(e,n){return e.indexOf(Df(n,e))},Fd="NEW_FOCUS",jN=function(e,n,i,a,s){var c=e.length,f=e[0],d=e[c-1],g=jf(a);if(!(a&&e.indexOf(a)>=0)){var y=a!==void 0?i.indexOf(a):-1,w=s?i.indexOf(s):y,_=s?e.indexOf(s):-1;if(y===-1)return _!==-1?_:Fd;if(_===-1)return Fd;var v=y-w,x=i.indexOf(f),S=i.indexOf(d),b=kN(i),j=a!==void 0?b.indexOf(a):-1,N=j-(s?b.indexOf(s):y);if(!v&&_>=0||n.length===0)return _;var I=xg(e,n[0]),F=xg(e,n[n.length-1]);if(y<=x&&g&&Math.abs(v)>1)return F;if(y>=S&&g&&Math.abs(v)>1)return I;if(v&&Math.abs(N)>1)return _;if(y<=x)return F;if(y>S)return I;if(v)return Math.abs(v)>1?_:(c+_+v)%c}},TN=function(e){return function(n){var i,a=(i=sv(n))===null||i===void 0?void 0:i.autofocus;return n.autofocus||a!==void 0&&a!=="false"||e.indexOf(n)>=0}},wg=function(e,n,i){var a=e.map(function(c){var f=c.node;return f}),s=vg(a.filter(TN(i)));return s&&s.length?yg(s):yg(vg(n))},zd=function(e,n){return n===void 0&&(n=[]),n.push(e),e.parentNode&&zd(e.parentNode.host||e.parentNode,n),n},xd=function(e,n){for(var i=zd(e),a=zd(n),s=0;s=0)return c}return!1},hv=function(e,n,i){var a=na(e),s=na(n),c=a[0],f=!1;return s.filter(Boolean).forEach(function(d){f=xd(f||d,d)||f,i.filter(Boolean).forEach(function(g){var y=xd(c,g);y&&(!f||Yi(y,f)?f=y:f=xd(y,f))})}),f},_g=function(e,n){return e.reduce(function(i,a){return i.concat(wN(a,n))},[])},MN=function(e,n){var i=new Map;return n.forEach(function(a){return i.set(a.node,a)}),e.map(function(a){return i.get(a)}).filter(hN)},PN=function(e,n){var i=as(na(e).length>0?document:nv(e).ownerDocument),a=Lf(e).filter($d),s=hv(i||e,e,a),c=new Map,f=is(a,c),d=f.filter(function(S){var b=S.node;return $d(b)});if(d[0]){var g=is([s],c).map(function(S){var b=S.node;return b}),y=MN(g,d),w=y.map(function(S){var b=S.node;return b}),_=y.filter(function(S){var b=S.tabIndex;return b>=0}).map(function(S){var b=S.node;return b}),v=jN(w,_,g,i,n);if(v===Fd){var x=wg(f,_,_g(a,c))||wg(f,w,_g(a,c));if(x)return{node:x};console.warn("focus-lock: cannot find any node to move focus into");return}return v===void 0?v:y[v]}},IN=function(e){var n=Lf(e).filter($d),i=hv(e,e,n),a=Tf(Ha([i],!0),!0,!0),s=Ha(n,!1);return a.map(function(c){var f=c.node,d=c.index;return{node:f,index:d,lockItem:s.indexOf(f)>=0,guard:jf(f)}})},Rf=function(e,n){e&&("focus"in e&&e.focus(n),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus())},wd=0,_d=!1,pv=function(e,n,i){i===void 0&&(i={});var a=PN(e,n);if(!_d&&a){if(wd>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),_d=!0,setTimeout(function(){_d=!1},1);return}wd++,Rf(a.node,i.focusOptions),wd--}};function $o(e){if(!e)return null;if(typeof WeakRef>"u")return function(){return e||null};var n=e?new WeakRef(e):null;return function(){return n?.deref()||null}}var LN=function(e){if(!e)return null;for(var n=[],i=e;i&&i!==document.body;)n.push({current:$o(i),parent:$o(i.parentElement),left:$o(i.previousElementSibling),right:$o(i.nextElementSibling)}),i=i.parentElement;return{element:$o(e),stack:n,ownerDocument:e.ownerDocument}},DN=function(e){var n,i,a,s,c;if(e)for(var f=e.stack,d=e.ownerDocument,g=new Map,y=0,w=f;y-1&&(b.filter(function(N){var I=N.guard,F=N.node;return I&&F.dataset.focusAutoGuard}).forEach(function(N){var I=N.node;return I.removeAttribute("tabIndex")}),bg(j,b.length,1,b),bg(j,-1,-1,b))}}}return e},wv=function(e){nc()&&e&&(e.stopPropagation(),e.preventDefault())},Af=function(){return kf(nc)},KN=function(e){var n=e.target,i=e.currentTarget;i.contains(n)||VN(i,n)},YN=function(){return null},_v=function(){Of=!0},Cv=function(){Of=!1,os="just",kf(function(){os="meanwhile"})},XN=function(){document.addEventListener("focusin",wv),document.addEventListener("focusout",Af),window.addEventListener("focus",_v),window.addEventListener("blur",Cv)},eE=function(){document.removeEventListener("focusin",wv),document.removeEventListener("focusout",Af),window.removeEventListener("focus",_v),window.removeEventListener("blur",Cv)};function tE(e){return e.filter(function(n){var i=n.disabled;return!i})}var bv={moveFocusInside:pv,focusInside:fv,focusNextElement:$N,focusPrevElement:FN,focusFirstElement:zN,focusLastElement:BN,captureFocusRestore:mv};function nE(e){var n=e.slice(-1)[0];n&&!za&&XN();var i=za,a=i&&n&&n.id===i.id;za=n,i&&!a&&(i.onDeactivation(),e.filter(function(s){var c=s.id;return c===i.id}).length||i.returnFocus(!n)),n?(ar=null,(!a||i.observed!==n.observed)&&n.onActivation(bv),nc(),kf(nc)):(eE(),ar=null)}J0.assignSyncMedium(KN);K0.assignMedium(Af);QS.assignMedium(function(e){return e(bv)});const rE=aN(tE,nE)(YN);Nf(Y0,rE);var iE=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function aE(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=iE();return n&&e.setAttribute("nonce",n),e}function oE(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function sE(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var lE=function(){var e=0,n=null;return{add:function(i){e==0&&(n=aE())&&(oE(n,i),sE(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},cE=function(){var e=lE();return function(n,i){p.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&i])}},$f=function(){var e=cE(),n=function(i){var a=i.styles,s=i.dynamic;return e(a,s),null};return n},uE={left:0,top:0,right:0,gap:0},Cd=function(e){return parseInt(e||"",10)||0},dE=function(e){var n=window.getComputedStyle(document.body),i=n[e==="padding"?"paddingLeft":"marginLeft"],a=n[e==="padding"?"paddingTop":"marginTop"],s=n[e==="padding"?"paddingRight":"marginRight"];return[Cd(i),Cd(a),Cd(s)]},fE=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return uE;var n=dE(e),i=document.documentElement.clientWidth,a=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,a-i+n[2]-n[0])}},hE=$f(),Ua="data-scroll-locked",pE=function(e,n,i,a){var s=e.left,c=e.top,f=e.right,d=e.gap;return i===void 0&&(i="margin"),` - .`.concat(zS,` { - overflow: hidden `).concat(a,`; - padding-right: `).concat(d,"px ").concat(a,`; - } - body[`).concat(Ua,`] { - overflow: hidden `).concat(a,`; - overscroll-behavior: contain; - `).concat([n&&"position: relative ".concat(a,";"),i==="margin"&&` - padding-left: `.concat(s,`px; - padding-top: `).concat(c,`px; - padding-right: `).concat(f,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(d,"px ").concat(a,`; - `),i==="padding"&&"padding-right: ".concat(d,"px ").concat(a,";")].filter(Boolean).join(""),` - } - - .`).concat(Hl,` { - right: `).concat(d,"px ").concat(a,`; - } - - .`).concat(ql,` { - margin-right: `).concat(d,"px ").concat(a,`; - } - - .`).concat(Hl," .").concat(Hl,` { - right: 0 `).concat(a,`; - } - - .`).concat(ql," .").concat(ql,` { - margin-right: 0 `).concat(a,`; - } - - body[`).concat(Ua,`] { - `).concat(BS,": ").concat(d,`px; - } -`)},Sg=function(){var e=parseInt(document.body.getAttribute(Ua)||"0",10);return isFinite(e)?e:0},mE=function(){p.useEffect(function(){return document.body.setAttribute(Ua,(Sg()+1).toString()),function(){var e=Sg()-1;e<=0?document.body.removeAttribute(Ua):document.body.setAttribute(Ua,e.toString())}},[])},gE=function(e){var n=e.noRelative,i=e.noImportant,a=e.gapMode,s=a===void 0?"margin":a;mE();var c=p.useMemo(function(){return fE(s)},[s]);return p.createElement(hE,{styles:pE(c,!n,s,i?"":"!important")})},Bd=!1;if(typeof window<"u")try{var El=Object.defineProperty({},"passive",{get:function(){return Bd=!0,!0}});window.addEventListener("test",El,El),window.removeEventListener("test",El,El)}catch{Bd=!1}var Ia=Bd?{passive:!1}:!1,vE=function(e){return e.tagName==="TEXTAREA"},Sv=function(e,n){if(!(e instanceof Element))return!1;var i=window.getComputedStyle(e);return i[n]!=="hidden"&&!(i.overflowY===i.overflowX&&!vE(e)&&i[n]==="visible")},yE=function(e){return Sv(e,"overflowY")},xE=function(e){return Sv(e,"overflowX")},Ng=function(e,n){var i=n.ownerDocument,a=n;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var s=Nv(e,a);if(s){var c=Ev(e,a),f=c[1],d=c[2];if(f>d)return!0}a=a.parentNode}while(a&&a!==i.body);return!1},wE=function(e){var n=e.scrollTop,i=e.scrollHeight,a=e.clientHeight;return[n,i,a]},_E=function(e){var n=e.scrollLeft,i=e.scrollWidth,a=e.clientWidth;return[n,i,a]},Nv=function(e,n){return e==="v"?yE(n):xE(n)},Ev=function(e,n){return e==="v"?wE(n):_E(n)},CE=function(e,n){return e==="h"&&n==="rtl"?-1:1},bE=function(e,n,i,a,s){var c=CE(e,window.getComputedStyle(n).direction),f=c*a,d=i.target,g=n.contains(d),y=!1,w=f>0,_=0,v=0;do{var x=Ev(e,d),S=x[0],b=x[1],j=x[2],N=b-j-c*S;(S||N)&&Nv(e,d)&&(_+=N,v+=S),d instanceof ShadowRoot?d=d.host:d=d.parentNode}while(!g&&d!==document.body||g&&(n.contains(d)||n===d));return(w&&Math.abs(_)<1||!w&&Math.abs(v)<1)&&(y=!0),y},kl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Eg=function(e){return[e.deltaX,e.deltaY]},kg=function(e){return e&&"current"in e?e.current:e},SE=function(e,n){return e[0]===n[0]&&e[1]===n[1]},NE=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},EE=0,La=[];function kE(e){var n=p.useRef([]),i=p.useRef([0,0]),a=p.useRef(),s=p.useState(EE++)[0],c=p.useState($f)[0],f=p.useRef(e);p.useEffect(function(){f.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var b=FS([e.lockRef.current],(e.shards||[]).map(kg)).filter(Boolean);return b.forEach(function(j){return j.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),b.forEach(function(j){return j.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var d=p.useCallback(function(b,j){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!f.current.allowPinchZoom;var N=kl(b),I=i.current,F="deltaX"in b?b.deltaX:I[0]-N[0],O="deltaY"in b?b.deltaY:I[1]-N[1],Z,ye=b.target,D=Math.abs(F)>Math.abs(O)?"h":"v";if("touches"in b&&D==="h"&&ye.type==="range")return!1;var re=Ng(D,ye);if(!re)return!0;if(re?Z=D:(Z=D==="v"?"h":"v",re=Ng(D,ye)),!re)return!1;if(!a.current&&"changedTouches"in b&&(F||O)&&(a.current=Z),!Z)return!0;var le=a.current||Z;return bE(le,j,b,le==="h"?F:O)},[]),g=p.useCallback(function(b){var j=b;if(!(!La.length||La[La.length-1]!==c)){var N="deltaY"in j?Eg(j):kl(j),I=n.current.filter(function(Z){return Z.name===j.type&&(Z.target===j.target||j.target===Z.shadowParent)&&SE(Z.delta,N)})[0];if(I&&I.should){j.cancelable&&j.preventDefault();return}if(!I){var F=(f.current.shards||[]).map(kg).filter(Boolean).filter(function(Z){return Z.contains(j.target)}),O=F.length>0?d(j,F[0]):!f.current.noIsolation;O&&j.cancelable&&j.preventDefault()}}},[]),y=p.useCallback(function(b,j,N,I){var F={name:b,delta:j,target:N,should:I,shadowParent:jE(N)};n.current.push(F),setTimeout(function(){n.current=n.current.filter(function(O){return O!==F})},1)},[]),w=p.useCallback(function(b){i.current=kl(b),a.current=void 0},[]),_=p.useCallback(function(b){y(b.type,Eg(b),b.target,d(b,e.lockRef.current))},[]),v=p.useCallback(function(b){y(b.type,kl(b),b.target,d(b,e.lockRef.current))},[]);p.useEffect(function(){return La.push(c),e.setCallbacks({onScrollCapture:_,onWheelCapture:_,onTouchMoveCapture:v}),document.addEventListener("wheel",g,Ia),document.addEventListener("touchmove",g,Ia),document.addEventListener("touchstart",w,Ia),function(){La=La.filter(function(b){return b!==c}),document.removeEventListener("wheel",g,Ia),document.removeEventListener("touchmove",g,Ia),document.removeEventListener("touchstart",w,Ia)}},[]);var x=e.removeScrollBar,S=e.inert;return p.createElement(p.Fragment,null,S?p.createElement(c,{styles:NE(s)}):null,x?p.createElement(gE,{gapMode:e.gapMode}):null)}function jE(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}Nf(Z0,kE);var TE=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},Da=new WeakMap,jl=new WeakMap,Tl={},bd=0,kv=function(e){return e&&(e.host||kv(e.parentNode))},ME=function(e,n){return n.map(function(i){if(e.contains(i))return i;var a=kv(i);return a&&e.contains(a)?a:(console.error("aria-hidden",i,"in not contained inside",e,". Doing nothing"),null)}).filter(function(i){return!!i})},PE=function(e,n,i,a){var s=ME(n,Array.isArray(e)?e:[e]);Tl[i]||(Tl[i]=new WeakMap);var c=Tl[i],f=[],d=new Set,g=new Set(s),y=function(_){!_||d.has(_)||(d.add(_),y(_.parentNode))};s.forEach(y);var w=function(_){!_||g.has(_)||Array.prototype.forEach.call(_.children,function(v){if(d.has(v))w(v);else try{var x=v.getAttribute(a),S=x!==null&&x!=="false",b=(Da.get(v)||0)+1,j=(c.get(v)||0)+1;Da.set(v,b),c.set(v,j),f.push(v),b===1&&S&&jl.set(v,!0),j===1&&v.setAttribute(i,"true"),S||v.setAttribute(a,"true")}catch(N){console.error("aria-hidden: cannot operate on ",v,N)}})};return w(n),d.clear(),bd++,function(){f.forEach(function(_){var v=Da.get(_)-1,x=c.get(_)-1;Da.set(_,v),c.set(_,x),v||(jl.has(_)||_.removeAttribute(a),jl.delete(_)),x||_.removeAttribute(i)}),bd--,bd||(Da=new WeakMap,Da=new WeakMap,jl=new WeakMap,Tl={})}},IE=function(e,n,i){var a=Array.from(Array.isArray(e)?e:[e]),s=n||TE(e);return s?(a.push.apply(a,Array.from(s.querySelectorAll("[aria-live]"))),PE(a,s,i,"aria-hidden")):function(){return null}},LE=$f(),DE=` - [`+tv+`] { - pointer-events: none !important; - } -`,RE=function(){return p.createElement(LE,{styles:DE})},jg=function(e){return"current"in e?e.current:e};function OE(e){var n=e.setLockProps,i=e.onEscapeKey,a=e.onClickOutside,s=e.shards,c=e.onActivation,f=e.onDeactivation,d=e.noIsolation,g=p.useState(void 0),y=g[0],w=g[1],_=p.useRef(null),v=p.useRef(0);return p.useEffect(function(){var x=function(N){N.defaultPrevented||(N.code==="Escape"||N.key==="Escape"||N.keyCode===27)&&i&&i(N)},S=function(N){N.defaultPrevented||N.target===_.current||N instanceof MouseEvent&&N.button!==0||s&&s.map(jg).some(function(I){return I&&I.contains(N.target)||I===N.target})||a&&a(N)},b=function(N){S(N),v.current=N.touches.length},j=function(N){v.current=N.touches.length};if(y)return document.addEventListener("keydown",x),document.addEventListener("mousedown",S),document.addEventListener("touchstart",b),document.addEventListener("touchend",j),function(){document.removeEventListener("keydown",x),document.removeEventListener("mousedown",S),document.removeEventListener("touchstart",b),document.removeEventListener("touchend",j)}},[y,a,i]),p.useEffect(function(){if(y)return c&&c(y),function(){f&&f()}},[!!y]),p.useEffect(function(){var x=function(){return null},S=!1,b=function(N){d||(x=IE($S([N],(s||[]).map(jg)),document.body,tv)),w(function(){return N})},j=function(){x(),S||w(null)};return n({onMouseDown:function(N){_.current=N.target},onTouchStart:function(N){_.current=N.target},onActivation:b,onDeactivation:j}),function(){S=!0,n(!1)}},[]),p.createElement(RE,null)}const AE=Nf(ev,OE);var $E=function(e){return p.createElement(AE,Yn({},e))};p.forwardRef(function(e,n){return p.createElement(eN,Yn({},e,{ref:n,sideCar:$E}))});const FE="_input-container_1b4m7_1",zE="_input-section_1b4m7_4",BE="_input_1b4m7_1",UE="_disabled_1b4m7_17",HE="_errored_1b4m7_25",qE="_general_1b4m7_31",VE="_read-only_1b4m7_38",WE="_input-hint_1b4m7_53",GE="_input-error_1b4m7_58",Lr={inputContainer:FE,inputSection:zE,input:BE,disabled:UE,errored:HE,general:qE,readOnly:VE,inputHint:WE,inputError:GE};function Ff(e){const{containerRef:n,inputSectionRef:i,actions:a,className:s,disabled:c,error:f,errorOnTooltip:d=!1,hint:g,icons:y,input:w,inputSectionClassName:_,label:v,labelClassName:x,readOnly:S,required:b,variant:j="form",withAsterisk:N,actionsContainerClassName:I,errorContainerClassName:F,hintContainerClassName:O,iconsContainerClassName:Z,spacing:ye}=e,D=N??b,{content:re,containerClassName:le}=ms({className:be(Lr.inputSection,_),icons:y,iconsContainerClassName:Z,actions:a,actionsContainerClassName:I,children:w,childrenContainerClassName:Lr.input,spacing:ye,withoutWrap:!0,variant:"xs"});return u.jsxs("div",{ref:n,className:be(Lr.inputContainer,!!f&&Lr.errored,S&&Lr.readOnly,j==="form"&&Lr.form,j==="general"&&Lr.general,c&&Lr.disabled,s),title:d&&f&&typeof f=="string"?f:void 0,children:[u.jsx(U0,{className:x,disabled:c,required:D,children:v}),u.jsx("div",{ref:i,className:le,children:re}),g&&u.jsx("div",{className:be(Lr.inputHint,O),children:g}),!d&&u.jsx(Cf,{disabled:c,className:be(Lr.inputError,F),children:f})]})}const ZE="_raw-input_8rtzt_1",QE={rawInput:ZE};function jv(e){const{className:n,onChange:i,elementRef:a,value:s,name:c,...f}=e,d=$n.useCallback(g=>{const y=g.currentTarget.value;i&&i(y===""?void 0:y,c,g)},[c,i]);return u.jsx("input",{...f,ref:a,className:be(QE.rawInput,n),name:Jt(c)?String(c):void 0,onChange:d,value:s??""})}const JE="_date-output_4jzjo_1",KE={dateOutput:JE};function YE(e){const{value:n,format:i,className:a,invalidText:s}=e,c=p.useMemo(()=>Rb(n,i),[n,i]);return u.jsx("div",{className:be(KE.dateOutput,a),children:c??s})}function Tv(e,n,i,a){$n.useEffect(()=>{if(!e)return;const s=c=>{const{current:f}=i,{current:d}=a,g=c.target,y=c&&f?f===c.target||f.contains(g):!1,w=d?d===c.target||d.contains(g):!1;n(y,w,c)};return document.addEventListener("click",s),()=>{document.removeEventListener("click",s)}},[e,n,i,a])}const XE="_dropdown-menu_16hml_1",ek="_icons_16hml_4",tk="_content_16hml_5",nk="_actions_16hml_6",rk="_dropdown-icon_16hml_10",ik="_dropdown-content_16hml_16",qi={dropdownMenu:XE,icons:ek,content:tk,actions:nk,dropdownIcon:rk,dropdownContent:ik};function ak(e){const n=p.useRef(null),{className:i,popupClassName:a,children:s,label:c,activeClassName:f,icons:d,variant:g="secondary",actions:y,withoutDropdownIcon:w,componentRef:_,elementRef:v=n,persistent:x,preferredPopupWidth:S}=e,b=p.useRef(null),[j,N]=p.useState(!1);p.useEffect(()=>{_&&(_.current={setShowDropdown:N})},[_,N]);const I=p.useCallback(()=>{N(ye=>!ye)},[N]),F=p.useCallback((ye,D)=>{D||ye&&x||N(!1)},[N,x]);Tv(j,F,b,v);const O=p.useMemo(()=>({setShowDropdown:N}),[N]),Z=!!y||!w;return u.jsxs(N_.Provider,{value:O,children:[u.jsx(Me,{name:void 0,className:be(qi.dropdownMenu,j&&f,i),elementRef:v,onClick:I,variant:g,actionsContainerClassName:qi.actions,iconsContainerClassName:qi.icons,childrenContainerClassName:qi.content,actions:Z?u.jsxs(u.Fragment,{children:[y,!w&&(j?u.jsx(A0,{className:qi.dropdownIcon}):u.jsx(O0,{className:qi.dropdownIcon}))]}):void 0,icons:d,children:c}),j&&u.jsx(hc,{elementRef:b,className:be(qi.dropdownContent,a),parentRef:v,preferredWidth:S,children:s})]})}var Tg={},ok={},ss={},zf={},ls={},Bf={};Object.defineProperty(Bf,"__esModule",{value:!0});Bf.default=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿ��cgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;���f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(function(e){return e.charCodeAt(0)}));var Uf={};Object.defineProperty(Uf,"__esModule",{value:!0});Uf.default=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(function(e){return e.charCodeAt(0)}));var Ud={};(function(e){var n;Object.defineProperty(e,"__esModule",{value:!0}),e.replaceCodePoint=e.fromCodePoint=void 0;var i=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);e.fromCodePoint=(n=String.fromCodePoint)!==null&&n!==void 0?n:function(c){var f="";return c>65535&&(c-=65536,f+=String.fromCharCode(c>>>10&1023|55296),c=56320|c&1023),f+=String.fromCharCode(c),f};function a(c){var f;return c>=55296&&c<=57343||c>1114111?65533:(f=i.get(c))!==null&&f!==void 0?f:c}e.replaceCodePoint=a;function s(c){return(0,e.fromCodePoint)(a(c))}e.default=s})(Ud);(function(e){var n=ft&&ft.__createBinding||(Object.create?function(R,U,J,Y){Y===void 0&&(Y=J);var xe=Object.getOwnPropertyDescriptor(U,J);(!xe||("get"in xe?!U.__esModule:xe.writable||xe.configurable))&&(xe={enumerable:!0,get:function(){return U[J]}}),Object.defineProperty(R,Y,xe)}:function(R,U,J,Y){Y===void 0&&(Y=J),R[Y]=U[J]}),i=ft&&ft.__setModuleDefault||(Object.create?function(R,U){Object.defineProperty(R,"default",{enumerable:!0,value:U})}:function(R,U){R.default=U}),a=ft&&ft.__importStar||function(R){if(R&&R.__esModule)return R;var U={};if(R!=null)for(var J in R)J!=="default"&&Object.prototype.hasOwnProperty.call(R,J)&&n(U,R,J);return i(U,R),U},s=ft&&ft.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXML=e.decodeHTMLStrict=e.decodeHTMLAttribute=e.decodeHTML=e.determineBranch=e.EntityDecoder=e.DecodingMode=e.BinTrieFlags=e.fromCodePoint=e.replaceCodePoint=e.decodeCodePoint=e.xmlDecodeTree=e.htmlDecodeTree=void 0;var c=s(Bf);e.htmlDecodeTree=c.default;var f=s(Uf);e.xmlDecodeTree=f.default;var d=a(Ud);e.decodeCodePoint=d.default;var g=Ud;Object.defineProperty(e,"replaceCodePoint",{enumerable:!0,get:function(){return g.replaceCodePoint}}),Object.defineProperty(e,"fromCodePoint",{enumerable:!0,get:function(){return g.fromCodePoint}});var y;(function(R){R[R.NUM=35]="NUM",R[R.SEMI=59]="SEMI",R[R.EQUALS=61]="EQUALS",R[R.ZERO=48]="ZERO",R[R.NINE=57]="NINE",R[R.LOWER_A=97]="LOWER_A",R[R.LOWER_F=102]="LOWER_F",R[R.LOWER_X=120]="LOWER_X",R[R.LOWER_Z=122]="LOWER_Z",R[R.UPPER_A=65]="UPPER_A",R[R.UPPER_F=70]="UPPER_F",R[R.UPPER_Z=90]="UPPER_Z"})(y||(y={}));var w=32,_;(function(R){R[R.VALUE_LENGTH=49152]="VALUE_LENGTH",R[R.BRANCH_LENGTH=16256]="BRANCH_LENGTH",R[R.JUMP_TABLE=127]="JUMP_TABLE"})(_=e.BinTrieFlags||(e.BinTrieFlags={}));function v(R){return R>=y.ZERO&&R<=y.NINE}function x(R){return R>=y.UPPER_A&&R<=y.UPPER_F||R>=y.LOWER_A&&R<=y.LOWER_F}function S(R){return R>=y.UPPER_A&&R<=y.UPPER_Z||R>=y.LOWER_A&&R<=y.LOWER_Z||v(R)}function b(R){return R===y.EQUALS||S(R)}var j;(function(R){R[R.EntityStart=0]="EntityStart",R[R.NumericStart=1]="NumericStart",R[R.NumericDecimal=2]="NumericDecimal",R[R.NumericHex=3]="NumericHex",R[R.NamedEntity=4]="NamedEntity"})(j||(j={}));var N;(function(R){R[R.Legacy=0]="Legacy",R[R.Strict=1]="Strict",R[R.Attribute=2]="Attribute"})(N=e.DecodingMode||(e.DecodingMode={}));var I=function(){function R(U,J,Y){this.decodeTree=U,this.emitCodePoint=J,this.errors=Y,this.state=j.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=N.Strict}return R.prototype.startEntity=function(U){this.decodeMode=U,this.state=j.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},R.prototype.write=function(U,J){switch(this.state){case j.EntityStart:return U.charCodeAt(J)===y.NUM?(this.state=j.NumericStart,this.consumed+=1,this.stateNumericStart(U,J+1)):(this.state=j.NamedEntity,this.stateNamedEntity(U,J));case j.NumericStart:return this.stateNumericStart(U,J);case j.NumericDecimal:return this.stateNumericDecimal(U,J);case j.NumericHex:return this.stateNumericHex(U,J);case j.NamedEntity:return this.stateNamedEntity(U,J)}},R.prototype.stateNumericStart=function(U,J){return J>=U.length?-1:(U.charCodeAt(J)|w)===y.LOWER_X?(this.state=j.NumericHex,this.consumed+=1,this.stateNumericHex(U,J+1)):(this.state=j.NumericDecimal,this.stateNumericDecimal(U,J))},R.prototype.addToNumericResult=function(U,J,Y,xe){if(J!==Y){var Ne=Y-J;this.result=this.result*Math.pow(xe,Ne)+parseInt(U.substr(J,Ne),xe),this.consumed+=Ne}},R.prototype.stateNumericHex=function(U,J){for(var Y=J;J>14;J>14,Ne!==0){if(ne===y.SEMI)return this.emitNamedEntityData(this.treeIndex,Ne,this.consumed+this.excess);this.decodeMode!==N.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1},R.prototype.emitNotTerminatedNamedEntity=function(){var U,J=this,Y=J.result,xe=J.decodeTree,Ne=(xe[Y]&_.VALUE_LENGTH)>>14;return this.emitNamedEntityData(Y,Ne,this.consumed),(U=this.errors)===null||U===void 0||U.missingSemicolonAfterCharacterReference(),this.consumed},R.prototype.emitNamedEntityData=function(U,J,Y){var xe=this.decodeTree;return this.emitCodePoint(J===1?xe[U]&~_.VALUE_LENGTH:xe[U+1],Y),J===3&&this.emitCodePoint(xe[U+2],Y),Y},R.prototype.end=function(){var U;switch(this.state){case j.NamedEntity:return this.result!==0&&(this.decodeMode!==N.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case j.NumericDecimal:return this.emitNumericEntity(0,2);case j.NumericHex:return this.emitNumericEntity(0,3);case j.NumericStart:return(U=this.errors)===null||U===void 0||U.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case j.EntityStart:return 0}},R}();e.EntityDecoder=I;function F(R){var U="",J=new I(R,function(Y){return U+=(0,d.fromCodePoint)(Y)});return function(Y,xe){for(var Ne=0,ne=0;(ne=Y.indexOf("&",ne))>=0;){U+=Y.slice(Ne,ne),J.startEntity(xe);var X=J.write(Y,ne+1);if(X<0){Ne=ne+J.end();break}Ne=ne+X,ne=X===0?Ne+1:Ne}var se=U+Y.slice(Ne);return U="",se}}function O(R,U,J,Y){var xe=(U&_.BRANCH_LENGTH)>>7,Ne=U&_.JUMP_TABLE;if(xe===0)return Ne!==0&&Y===Ne?J:-1;if(Ne){var ne=Y-Ne;return ne<0||ne>=xe?-1:R[J+ne]-1}for(var X=J,se=X+xe-1;X<=se;){var E=X+se>>>1,V=R[E];if(VY)se=E-1;else return R[E+xe]}return-1}e.determineBranch=O;var Z=F(c.default),ye=F(f.default);function D(R,U){return U===void 0&&(U=N.Legacy),Z(R,U)}e.decodeHTML=D;function re(R){return Z(R,N.Attribute)}e.decodeHTMLAttribute=re;function le(R){return Z(R,N.Strict)}e.decodeHTMLStrict=le;function oe(R){return ye(R,N.Strict)}e.decodeXML=oe})(ls);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.QuoteType=void 0;var n=ls,i;(function(v){v[v.Tab=9]="Tab",v[v.NewLine=10]="NewLine",v[v.FormFeed=12]="FormFeed",v[v.CarriageReturn=13]="CarriageReturn",v[v.Space=32]="Space",v[v.ExclamationMark=33]="ExclamationMark",v[v.Number=35]="Number",v[v.Amp=38]="Amp",v[v.SingleQuote=39]="SingleQuote",v[v.DoubleQuote=34]="DoubleQuote",v[v.Dash=45]="Dash",v[v.Slash=47]="Slash",v[v.Zero=48]="Zero",v[v.Nine=57]="Nine",v[v.Semi=59]="Semi",v[v.Lt=60]="Lt",v[v.Eq=61]="Eq",v[v.Gt=62]="Gt",v[v.Questionmark=63]="Questionmark",v[v.UpperA=65]="UpperA",v[v.LowerA=97]="LowerA",v[v.UpperF=70]="UpperF",v[v.LowerF=102]="LowerF",v[v.UpperZ=90]="UpperZ",v[v.LowerZ=122]="LowerZ",v[v.LowerX=120]="LowerX",v[v.OpeningSquareBracket=91]="OpeningSquareBracket"})(i||(i={}));var a;(function(v){v[v.Text=1]="Text",v[v.BeforeTagName=2]="BeforeTagName",v[v.InTagName=3]="InTagName",v[v.InSelfClosingTag=4]="InSelfClosingTag",v[v.BeforeClosingTagName=5]="BeforeClosingTagName",v[v.InClosingTagName=6]="InClosingTagName",v[v.AfterClosingTagName=7]="AfterClosingTagName",v[v.BeforeAttributeName=8]="BeforeAttributeName",v[v.InAttributeName=9]="InAttributeName",v[v.AfterAttributeName=10]="AfterAttributeName",v[v.BeforeAttributeValue=11]="BeforeAttributeValue",v[v.InAttributeValueDq=12]="InAttributeValueDq",v[v.InAttributeValueSq=13]="InAttributeValueSq",v[v.InAttributeValueNq=14]="InAttributeValueNq",v[v.BeforeDeclaration=15]="BeforeDeclaration",v[v.InDeclaration=16]="InDeclaration",v[v.InProcessingInstruction=17]="InProcessingInstruction",v[v.BeforeComment=18]="BeforeComment",v[v.CDATASequence=19]="CDATASequence",v[v.InSpecialComment=20]="InSpecialComment",v[v.InCommentLike=21]="InCommentLike",v[v.BeforeSpecialS=22]="BeforeSpecialS",v[v.SpecialStartSequence=23]="SpecialStartSequence",v[v.InSpecialTag=24]="InSpecialTag",v[v.BeforeEntity=25]="BeforeEntity",v[v.BeforeNumericEntity=26]="BeforeNumericEntity",v[v.InNamedEntity=27]="InNamedEntity",v[v.InNumericEntity=28]="InNumericEntity",v[v.InHexEntity=29]="InHexEntity"})(a||(a={}));function s(v){return v===i.Space||v===i.NewLine||v===i.Tab||v===i.FormFeed||v===i.CarriageReturn}function c(v){return v===i.Slash||v===i.Gt||s(v)}function f(v){return v>=i.Zero&&v<=i.Nine}function d(v){return v>=i.LowerA&&v<=i.LowerZ||v>=i.UpperA&&v<=i.UpperZ}function g(v){return v>=i.UpperA&&v<=i.UpperF||v>=i.LowerA&&v<=i.LowerF}var y;(function(v){v[v.NoValue=0]="NoValue",v[v.Unquoted=1]="Unquoted",v[v.Single=2]="Single",v[v.Double=3]="Double"})(y=e.QuoteType||(e.QuoteType={}));var w={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},_=function(){function v(x,S){var b=x.xmlMode,j=b===void 0?!1:b,N=x.decodeEntities,I=N===void 0?!0:N;this.cbs=S,this.state=a.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=a.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=j,this.decodeEntities=I,this.entityTrie=j?n.xmlDecodeTree:n.htmlDecodeTree}return v.prototype.reset=function(){this.state=a.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=a.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},v.prototype.write=function(x){this.offset+=this.buffer.length,this.buffer=x,this.parse()},v.prototype.end=function(){this.running&&this.finish()},v.prototype.pause=function(){this.running=!1},v.prototype.resume=function(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=a.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&x===i.Amp&&(this.state=a.BeforeEntity)},v.prototype.stateSpecialStartSequence=function(x){var S=this.sequenceIndex===this.currentSequence.length,b=S?c(x):(x|32)===this.currentSequence[this.sequenceIndex];if(!b)this.isSpecial=!1;else if(!S){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=a.InTagName,this.stateInTagName(x)},v.prototype.stateInSpecialTag=function(x){if(this.sequenceIndex===this.currentSequence.length){if(x===i.Gt||s(x)){var S=this.index-this.currentSequence.length;if(this.sectionStart>14)-1;if(!this.allowLegacyEntity()&&x!==i.Semi)this.trieIndex+=b;else{var j=this.index-this.entityExcess+1;j>this.sectionStart&&this.emitPartial(this.sectionStart,j),this.entityResult=this.trieIndex,this.trieIndex+=b,this.entityExcess=0,this.sectionStart=this.index+1,b===0&&this.emitNamedEntity()}}},v.prototype.emitNamedEntity=function(){if(this.state=this.baseState,this.entityResult!==0){var x=(this.entityTrie[this.entityResult]&n.BinTrieFlags.VALUE_LENGTH)>>14;switch(x){case 1:{this.emitCodePoint(this.entityTrie[this.entityResult]&~n.BinTrieFlags.VALUE_LENGTH);break}case 2:{this.emitCodePoint(this.entityTrie[this.entityResult+1]);break}case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}}},v.prototype.stateBeforeNumericEntity=function(x){(x|32)===i.LowerX?(this.entityExcess++,this.state=a.InHexEntity):(this.state=a.InNumericEntity,this.stateInNumericEntity(x))},v.prototype.emitNumericEntity=function(x){var S=this.index-this.entityExcess-1,b=S+2+ +(this.state===a.InHexEntity);b!==this.index&&(S>this.sectionStart&&this.emitPartial(this.sectionStart,S),this.sectionStart=this.index+Number(x),this.emitCodePoint((0,n.replaceCodePoint)(this.entityResult))),this.state=this.baseState},v.prototype.stateInNumericEntity=function(x){x===i.Semi?this.emitNumericEntity(!0):f(x)?(this.entityResult=this.entityResult*10+(x-i.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},v.prototype.stateInHexEntity=function(x){x===i.Semi?this.emitNumericEntity(!0):f(x)?(this.entityResult=this.entityResult*16+(x-i.Zero),this.entityExcess++):g(x)?(this.entityResult=this.entityResult*16+((x|32)-i.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},v.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===a.Text||this.baseState===a.InSpecialTag)},v.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===a.Text||this.state===a.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===a.InAttributeValueDq||this.state===a.InAttributeValueSq||this.state===a.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},v.prototype.shouldContinue=function(){return this.index0&&f.has(this.stack[this.stack.length-1]);){var d=this.stack.pop();(a=(i=this.cbs).onclosetag)===null||a===void 0||a.call(i,d,!0)}this.isVoidElement(n)||(this.stack.push(n),Dg.has(n)?this.foreignContext.push(!0):Rg.has(n)&&this.foreignContext.push(!1)),(c=(s=this.cbs).onopentagname)===null||c===void 0||c.call(s,n),this.cbs.onopentag&&(this.attribs={})},e.prototype.endOpenTag=function(n){var i,a;this.startIndex=this.openTagStart,this.attribs&&((a=(i=this.cbs).onopentag)===null||a===void 0||a.call(i,this.tagname,this.attribs,n),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},e.prototype.onopentagend=function(n){this.endIndex=n,this.endOpenTag(!1),this.startIndex=n+1},e.prototype.onclosetag=function(n,i){var a,s,c,f,d,g;this.endIndex=i;var y=this.getSlice(n,i);if(this.lowerCaseTagNames&&(y=y.toLowerCase()),(Dg.has(y)||Rg.has(y))&&this.foreignContext.pop(),this.isVoidElement(y))!this.options.xmlMode&&y==="br"&&((s=(a=this.cbs).onopentagname)===null||s===void 0||s.call(a,"br"),(f=(c=this.cbs).onopentag)===null||f===void 0||f.call(c,"br",{},!0),(g=(d=this.cbs).onclosetag)===null||g===void 0||g.call(d,"br",!1));else{var w=this.stack.lastIndexOf(y);if(w!==-1)if(this.cbs.onclosetag)for(var _=this.stack.length-w;_--;)this.cbs.onclosetag(this.stack.pop(),_!==0);else this.stack.length=w;else!this.options.xmlMode&&y==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=i+1},e.prototype.onselfclosingtag=function(n){this.endIndex=n,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=n+1):this.onopentagend(n)},e.prototype.closeCurrentTag=function(n){var i,a,s=this.tagname;this.endOpenTag(n),this.stack[this.stack.length-1]===s&&((a=(i=this.cbs).onclosetag)===null||a===void 0||a.call(i,s,!n),this.stack.pop())},e.prototype.onattribname=function(n,i){this.startIndex=n;var a=this.getSlice(n,i);this.attribname=this.lowerCaseAttributeNames?a.toLowerCase():a},e.prototype.onattribdata=function(n,i){this.attribvalue+=this.getSlice(n,i)},e.prototype.onattribentity=function(n){this.attribvalue+=(0,Mg.fromCodePoint)(n)},e.prototype.onattribend=function(n,i){var a,s;this.endIndex=i,(s=(a=this.cbs).onattribute)===null||s===void 0||s.call(a,this.attribname,this.attribvalue,n===Ml.QuoteType.Double?'"':n===Ml.QuoteType.Single?"'":n===Ml.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},e.prototype.getInstructionName=function(n){var i=n.search(fk),a=i<0?n:n.substr(0,i);return this.lowerCaseTagNames&&(a=a.toLowerCase()),a},e.prototype.ondeclaration=function(n,i){this.endIndex=i;var a=this.getSlice(n,i);if(this.cbs.onprocessinginstruction){var s=this.getInstructionName(a);this.cbs.onprocessinginstruction("!".concat(s),"!".concat(a))}this.startIndex=i+1},e.prototype.onprocessinginstruction=function(n,i){this.endIndex=i;var a=this.getSlice(n,i);if(this.cbs.onprocessinginstruction){var s=this.getInstructionName(a);this.cbs.onprocessinginstruction("?".concat(s),"?".concat(a))}this.startIndex=i+1},e.prototype.oncomment=function(n,i,a){var s,c,f,d;this.endIndex=i,(c=(s=this.cbs).oncomment)===null||c===void 0||c.call(s,this.getSlice(n,i-a)),(d=(f=this.cbs).oncommentend)===null||d===void 0||d.call(f),this.startIndex=i+1},e.prototype.oncdata=function(n,i,a){var s,c,f,d,g,y,w,_,v,x;this.endIndex=i;var S=this.getSlice(n,i-a);this.options.xmlMode||this.options.recognizeCDATA?((c=(s=this.cbs).oncdatastart)===null||c===void 0||c.call(s),(d=(f=this.cbs).ontext)===null||d===void 0||d.call(f,S),(y=(g=this.cbs).oncdataend)===null||y===void 0||y.call(g)):((_=(w=this.cbs).oncomment)===null||_===void 0||_.call(w,"[CDATA[".concat(S,"]]")),(x=(v=this.cbs).oncommentend)===null||x===void 0||x.call(v)),this.startIndex=i+1},e.prototype.onend=function(){var n,i;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var a=this.stack.length;a>0;this.cbs.onclosetag(this.stack[--a],!0));}(i=(n=this.cbs).onend)===null||i===void 0||i.call(n)},e.prototype.reset=function(){var n,i,a,s;(i=(n=this.cbs).onreset)===null||i===void 0||i.call(n),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(s=(a=this.cbs).onparserinit)===null||s===void 0||s.call(a,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},e.prototype.parseComplete=function(n){this.reset(),this.end(n)},e.prototype.getSlice=function(n,i){for(;n-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var a=this.buffers[0].slice(n-this.bufferOffset,i-this.bufferOffset);i-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),a+=this.buffers[0].slice(0,i-this.bufferOffset);return a},e.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},e.prototype.write=function(n){var i,a;if(this.ended){(a=(i=this.cbs).onerror)===null||a===void 0||a.call(i,new Error(".write() after done!"));return}this.buffers.push(n),this.tokenizer.running&&(this.tokenizer.write(n),this.writeIndex++)},e.prototype.end=function(n){var i,a;if(this.ended){(a=(i=this.cbs).onerror)===null||a===void 0||a.call(i,new Error(".end() after done!"));return}n&&this.write(n),this.ended=!0,this.tokenizer.end()},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"childNodes",{get:function(){return this.children},set:function(i){this.children=i},enumerable:!1,configurable:!0}),n}(Hf);Lt.NodeWithChildren=mc;var Lv=function(e){Mi(n,e);function n(){var i=e!==null&&e.apply(this,arguments)||this;return i.type=Xn.ElementType.CDATA,i}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),n}(mc);Lt.CDATA=Lv;var Dv=function(e){Mi(n,e);function n(){var i=e!==null&&e.apply(this,arguments)||this;return i.type=Xn.ElementType.Root,i}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),n}(mc);Lt.Document=Dv;var Rv=function(e){Mi(n,e);function n(i,a,s,c){s===void 0&&(s=[]),c===void 0&&(c=i==="script"?Xn.ElementType.Script:i==="style"?Xn.ElementType.Style:Xn.ElementType.Tag);var f=e.call(this,s)||this;return f.name=i,f.attribs=a,f.type=c,f}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"tagName",{get:function(){return this.name},set:function(i){this.name=i},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"attributes",{get:function(){var i=this;return Object.keys(this.attribs).map(function(a){var s,c;return{name:a,value:i.attribs[a],namespace:(s=i["x-attribsNamespace"])===null||s===void 0?void 0:s[a],prefix:(c=i["x-attribsPrefix"])===null||c===void 0?void 0:c[a]}})},enumerable:!1,configurable:!0}),n}(mc);Lt.Element=Rv;function Ov(e){return(0,Xn.isTag)(e)}Lt.isTag=Ov;function Av(e){return e.type===Xn.ElementType.CDATA}Lt.isCDATA=Av;function $v(e){return e.type===Xn.ElementType.Text}Lt.isText=$v;function Fv(e){return e.type===Xn.ElementType.Comment}Lt.isComment=Fv;function zv(e){return e.type===Xn.ElementType.Directive}Lt.isDirective=zv;function Bv(e){return e.type===Xn.ElementType.Root}Lt.isDocument=Bv;function pk(e){return Object.prototype.hasOwnProperty.call(e,"children")}Lt.hasChildren=pk;function qf(e,n){n===void 0&&(n=!1);var i;if($v(e))i=new Mv(e.data);else if(Fv(e))i=new Pv(e.data);else if(Ov(e)){var a=n?Sd(e.children):[],s=new Rv(e.name,Yo({},e.attribs),a);a.forEach(function(g){return g.parent=s}),e.namespace!=null&&(s.namespace=e.namespace),e["x-attribsNamespace"]&&(s["x-attribsNamespace"]=Yo({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(s["x-attribsPrefix"]=Yo({},e["x-attribsPrefix"])),i=s}else if(Av(e)){var a=n?Sd(e.children):[],c=new Lv(a);a.forEach(function(y){return y.parent=c}),i=c}else if(Bv(e)){var a=n?Sd(e.children):[],f=new Dv(a);a.forEach(function(y){return y.parent=f}),e["x-mode"]&&(f["x-mode"]=e["x-mode"]),i=f}else if(zv(e)){var d=new Iv(e.name,e.data);e["x-name"]!=null&&(d["x-name"]=e["x-name"],d["x-publicId"]=e["x-publicId"],d["x-systemId"]=e["x-systemId"]),i=d}else throw new Error("Not implemented yet: ".concat(e.type));return i.startIndex=e.startIndex,i.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(i.sourceCodeLocation=e.sourceCodeLocation),i}Lt.cloneNode=qf;function Sd(e){for(var n=e.map(function(a){return qf(a,!0)}),i=1;i$\x80-\uFFFF]/g;var n=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);e.getCodePoint=String.prototype.codePointAt!=null?function(s,c){return s.codePointAt(c)}:function(s,c){return(s.charCodeAt(c)&64512)===55296?(s.charCodeAt(c)-55296)*1024+s.charCodeAt(c+1)-56320+65536:s.charCodeAt(c)};function i(s){for(var c="",f=0,d;(d=e.xmlReplacer.exec(s))!==null;){var g=d.index,y=s.charCodeAt(g),w=n.get(y);w!==void 0?(c+=s.substring(f,g)+w,f=g+1):(c+="".concat(s.substring(f,g),"&#x").concat((0,e.getCodePoint)(s,g).toString(16),";"),f=e.xmlReplacer.lastIndex+=+((y&64512)===55296))}return c+s.substr(f)}e.encodeXML=i,e.escape=i;function a(s,c){return function(f){for(var d,g=0,y="";d=s.exec(f);)g!==d.index&&(y+=f.substring(g,d.index)),y+=c.get(d[0].charCodeAt(0)),g=d.index+1;return y+f.substring(g)}}e.escapeUTF8=a(/[&<>'"]/g,n),e.escapeAttribute=a(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),e.escapeText=a(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))})(rc);var mk=ft&&ft.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ra,"__esModule",{value:!0});ra.encodeNonAsciiHTML=ra.encodeHTML=void 0;var gk=mk(Vf),Hv=rc,vk=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function yk(e){return qv(vk,e)}ra.encodeHTML=yk;function xk(e){return qv(Hv.xmlReplacer,e)}ra.encodeNonAsciiHTML=xk;function qv(e,n){for(var i="",a=0,s;(s=e.exec(n))!==null;){var c=s.index;i+=n.substring(a,c);var f=n.charCodeAt(c),d=gk.default.get(f);if(typeof d=="object"){if(c+10&&(a+=gc(e.children,n)),(n.xmlMode||!Og.has(e.name))&&(a+=""))),a}function Mk(e){return"<".concat(e.data,">")}function Pk(e,n){var i,a=e.data||"";return((i=n.encodeEntities)!==null&&i!==void 0?i:n.decodeEntities)!==!1&&!(!n.xmlMode&&e.parent&&bk.has(e.parent.name))&&(a=n.xmlMode||n.encodeEntities!=="utf8"?(0,ic.encodeXML)(a):(0,ic.escapeText)(a)),a}function Ik(e){return"")}function Lk(e){return"")}var Dk=ft&&ft.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(sr,"__esModule",{value:!0});sr.innerText=sr.textContent=sr.getText=sr.getInnerHTML=sr.getOuterHTML=void 0;var Ar=ti,Rk=Dk(gs),Ok=Ka;function Wv(e,n){return(0,Rk.default)(e,n)}sr.getOuterHTML=Wv;function Ak(e,n){return(0,Ar.hasChildren)(e)?e.children.map(function(i){return Wv(i,n)}).join(""):""}sr.getInnerHTML=Ak;function Wl(e){return Array.isArray(e)?e.map(Wl).join(""):(0,Ar.isTag)(e)?e.name==="br"?` -`:Wl(e.children):(0,Ar.isCDATA)(e)?Wl(e.children):(0,Ar.isText)(e)?e.data:""}sr.getText=Wl;function Hd(e){return Array.isArray(e)?e.map(Hd).join(""):(0,Ar.hasChildren)(e)&&!(0,Ar.isComment)(e)?Hd(e.children):(0,Ar.isText)(e)?e.data:""}sr.textContent=Hd;function qd(e){return Array.isArray(e)?e.map(qd).join(""):(0,Ar.hasChildren)(e)&&(e.type===Ok.ElementType.Tag||(0,Ar.isCDATA)(e))?qd(e.children):(0,Ar.isText)(e)?e.data:""}sr.innerText=qd;var Nn={};Object.defineProperty(Nn,"__esModule",{value:!0});Nn.prevElementSibling=Nn.nextElementSibling=Nn.getName=Nn.hasAttrib=Nn.getAttributeValue=Nn.getSiblings=Nn.getParent=Nn.getChildren=void 0;var Wf=ti;function Gv(e){return(0,Wf.hasChildren)(e)?e.children:[]}Nn.getChildren=Gv;function Zv(e){return e.parent||null}Nn.getParent=Zv;function $k(e){var n,i,a=Zv(e);if(a!=null)return Gv(a);for(var s=[e],c=e.prev,f=e.next;c!=null;)s.unshift(c),n=c,c=n.prev;for(;f!=null;)s.push(f),i=f,f=i.next;return s}Nn.getSiblings=$k;function Fk(e,n){var i;return(i=e.attribs)===null||i===void 0?void 0:i[n]}Nn.getAttributeValue=Fk;function zk(e,n){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,n)&&e.attribs[n]!=null}Nn.hasAttrib=zk;function Bk(e){return e.name}Nn.getName=Bk;function Uk(e){for(var n,i=e.next;i!==null&&!(0,Wf.isTag)(i);)n=i,i=n.next;return i}Nn.nextElementSibling=Uk;function Hk(e){for(var n,i=e.prev;i!==null&&!(0,Wf.isTag)(i);)n=i,i=n.prev;return i}Nn.prevElementSibling=Hk;var Kn={};Object.defineProperty(Kn,"__esModule",{value:!0});Kn.prepend=Kn.prependChild=Kn.append=Kn.appendChild=Kn.replaceElement=Kn.removeElement=void 0;function vs(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var n=e.parent.children,i=n.lastIndexOf(e);i>=0&&n.splice(i,1)}e.next=null,e.prev=null,e.parent=null}Kn.removeElement=vs;function qk(e,n){var i=n.prev=e.prev;i&&(i.next=n);var a=n.next=e.next;a&&(a.prev=n);var s=n.parent=e.parent;if(s){var c=s.children;c[c.lastIndexOf(e)]=n,e.parent=null}}Kn.replaceElement=qk;function Vk(e,n){if(vs(n),n.next=null,n.parent=e,e.children.push(n)>1){var i=e.children[e.children.length-2];i.next=n,n.prev=i}else n.prev=null}Kn.appendChild=Vk;function Wk(e,n){vs(n);var i=e.parent,a=e.next;if(n.next=a,n.prev=e,e.next=n,n.parent=i,a){if(a.prev=n,i){var s=i.children;s.splice(s.lastIndexOf(a),0,n)}}else i&&i.children.push(n)}Kn.append=Wk;function Gk(e,n){if(vs(n),n.parent=e,n.prev=null,e.children.unshift(n)!==1){var i=e.children[1];i.prev=n,n.next=i}else n.next=null}Kn.prependChild=Gk;function Zk(e,n){vs(n);var i=e.parent;if(i){var a=i.children;a.splice(a.indexOf(e),0,n)}e.prev&&(e.prev.next=n),n.parent=i,n.prev=e.prev,n.next=e,e.prev=n}Kn.prepend=Zk;var Bn={};Object.defineProperty(Bn,"__esModule",{value:!0});Bn.findAll=Bn.existsOne=Bn.findOne=Bn.findOneChild=Bn.find=Bn.filter=void 0;var vc=ti;function Qk(e,n,i,a){return i===void 0&&(i=!0),a===void 0&&(a=1/0),Qv(e,Array.isArray(n)?n:[n],i,a)}Bn.filter=Qk;function Qv(e,n,i,a){for(var s=[],c=[n],f=[0];;){if(f[0]>=c[0].length){if(f.length===1)return s;c.shift(),f.shift();continue}var d=c[0][f[0]++];if(e(d)&&(s.push(d),--a<=0))return s;i&&(0,vc.hasChildren)(d)&&d.children.length>0&&(f.unshift(0),c.unshift(d.children))}}Bn.find=Qv;function Jk(e,n){return n.find(e)}Bn.findOneChild=Jk;function Jv(e,n,i){i===void 0&&(i=!0);for(var a=null,s=0;s0&&(a=Jv(e,c.children,!0));else continue}return a}Bn.findOne=Jv;function Kv(e,n){return n.some(function(i){return(0,vc.isTag)(i)&&(e(i)||Kv(e,i.children))})}Bn.existsOne=Kv;function Kk(e,n){for(var i=[],a=[n],s=[0];;){if(s[0]>=a[0].length){if(a.length===1)return i;a.shift(),s.shift();continue}var c=a[0][s[0]++];(0,vc.isTag)(c)&&(e(c)&&i.push(c),c.children.length>0&&(s.unshift(0),a.unshift(c.children)))}}Bn.findAll=Kk;var lr={};Object.defineProperty(lr,"__esModule",{value:!0});lr.getElementsByTagType=lr.getElementsByTagName=lr.getElementById=lr.getElements=lr.testElement=void 0;var Qi=ti,yc=Bn,ac={tag_name:function(e){return typeof e=="function"?function(n){return(0,Qi.isTag)(n)&&e(n.name)}:e==="*"?Qi.isTag:function(n){return(0,Qi.isTag)(n)&&n.name===e}},tag_type:function(e){return typeof e=="function"?function(n){return e(n.type)}:function(n){return n.type===e}},tag_contains:function(e){return typeof e=="function"?function(n){return(0,Qi.isText)(n)&&e(n.data)}:function(n){return(0,Qi.isText)(n)&&n.data===e}}};function Yv(e,n){return typeof n=="function"?function(i){return(0,Qi.isTag)(i)&&n(i.attribs[e])}:function(i){return(0,Qi.isTag)(i)&&i.attribs[e]===n}}function Yk(e,n){return function(i){return e(i)||n(i)}}function Xv(e){var n=Object.keys(e).map(function(i){var a=e[i];return Object.prototype.hasOwnProperty.call(ac,i)?ac[i](a):Yv(i,a)});return n.length===0?null:n.reduce(Yk)}function Xk(e,n){var i=Xv(e);return i?i(n):!0}lr.testElement=Xk;function ej(e,n,i,a){a===void 0&&(a=1/0);var s=Xv(e);return s?(0,yc.filter)(s,n,i,a):[]}lr.getElements=ej;function tj(e,n,i){return i===void 0&&(i=!0),Array.isArray(n)||(n=[n]),(0,yc.findOne)(Yv("id",e),n,i)}lr.getElementById=tj;function nj(e,n,i,a){return i===void 0&&(i=!0),a===void 0&&(a=1/0),(0,yc.filter)(ac.tag_name(e),n,i,a)}lr.getElementsByTagName=nj;function rj(e,n,i,a){return i===void 0&&(i=!0),a===void 0&&(a=1/0),(0,yc.filter)(ac.tag_type(e),n,i,a)}lr.getElementsByTagType=rj;var ey={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.uniqueSort=e.compareDocumentPosition=e.DocumentPosition=e.removeSubsets=void 0;var n=ti;function i(f){for(var d=f.length;--d>=0;){var g=f[d];if(d>0&&f.lastIndexOf(g,d-1)>=0){f.splice(d,1);continue}for(var y=g.parent;y;y=y.parent)if(f.includes(y)){f.splice(d,1);break}}return f}e.removeSubsets=i;var a;(function(f){f[f.DISCONNECTED=1]="DISCONNECTED",f[f.PRECEDING=2]="PRECEDING",f[f.FOLLOWING=4]="FOLLOWING",f[f.CONTAINS=8]="CONTAINS",f[f.CONTAINED_BY=16]="CONTAINED_BY"})(a=e.DocumentPosition||(e.DocumentPosition={}));function s(f,d){var g=[],y=[];if(f===d)return 0;for(var w=(0,n.hasChildren)(f)?f:f.parent;w;)g.unshift(w),w=w.parent;for(w=(0,n.hasChildren)(d)?d:d.parent;w;)y.unshift(w),w=w.parent;for(var _=Math.min(g.length,y.length),v=0;v<_&&g[v]===y[v];)v++;if(v===0)return a.DISCONNECTED;var x=g[v-1],S=x.children,b=g[v],j=y[v];return S.indexOf(b)>S.indexOf(j)?x===d?a.FOLLOWING|a.CONTAINED_BY:a.FOLLOWING:x===f?a.PRECEDING|a.CONTAINS:a.PRECEDING}e.compareDocumentPosition=s;function c(f){return f=f.filter(function(d,g,y){return!y.includes(d,g+1)}),f.sort(function(d,g){var y=s(d,g);return y&a.PRECEDING?-1:y&a.FOLLOWING?1:0}),f}e.uniqueSort=c})(ey);var xc={};Object.defineProperty(xc,"__esModule",{value:!0});xc.getFeed=void 0;var ij=sr,ys=lr;function aj(e){var n=oc(uj,e);return n?n.name==="feed"?oj(n):sj(n):null}xc.getFeed=aj;function oj(e){var n,i=e.children,a={type:"atom",items:(0,ys.getElementsByTagName)("entry",i).map(function(f){var d,g=f.children,y={media:ty(g)};Jn(y,"id","id",g),Jn(y,"title","title",g);var w=(d=oc("link",g))===null||d===void 0?void 0:d.attribs.href;w&&(y.link=w);var _=Ti("summary",g)||Ti("content",g);_&&(y.description=_);var v=Ti("updated",g);return v&&(y.pubDate=new Date(v)),y})};Jn(a,"id","id",i),Jn(a,"title","title",i);var s=(n=oc("link",i))===null||n===void 0?void 0:n.attribs.href;s&&(a.link=s),Jn(a,"description","subtitle",i);var c=Ti("updated",i);return c&&(a.updated=new Date(c)),Jn(a,"author","email",i,!0),a}function sj(e){var n,i,a=(i=(n=oc("channel",e.children))===null||n===void 0?void 0:n.children)!==null&&i!==void 0?i:[],s={type:e.name.substr(0,3),id:"",items:(0,ys.getElementsByTagName)("item",e.children).map(function(f){var d=f.children,g={media:ty(d)};Jn(g,"id","guid",d),Jn(g,"title","title",d),Jn(g,"link","link",d),Jn(g,"description","description",d);var y=Ti("pubDate",d)||Ti("dc:date",d);return y&&(g.pubDate=new Date(y)),g})};Jn(s,"title","title",a),Jn(s,"link","link",a),Jn(s,"description","description",a);var c=Ti("lastBuildDate",a);return c&&(s.updated=new Date(c)),Jn(s,"author","managingEditor",a,!0),s}var lj=["url","type","lang"],cj=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function ty(e){return(0,ys.getElementsByTagName)("media:content",e).map(function(n){for(var i=n.attribs,a={medium:i.medium,isDefault:!!i.isDefault},s=0,c=lj;s - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */function Ag(e){return Object.prototype.toString.call(e)==="[object Object]"}function dj(e){var n,i;return Ag(e)===!1?!1:(n=e.constructor,n===void 0?!0:(i=n.prototype,!(Ag(i)===!1||i.hasOwnProperty("isPrototypeOf")===!1)))}Gf.isPlainObject=dj;var fj={exports:{}};(function(e){(function(n,i){e.exports?e.exports=i():n.parseSrcset=i()})(ft,function(){return function(n){function i(O){return O===" "||O===" "||O===` -`||O==="\f"||O==="\r"}function a(O){var Z,ye=O.exec(n.substring(j));if(ye)return Z=ye[0],j+=Z.length,Z}for(var s=n.length,c=/^[ \t\n\r\u000c]+/,f=/^[, \t\n\r\u000c]+/,d=/^[^ \t\n\r\u000c]+/,g=/[,]+$/,y=/^\d+$/,w=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,_,v,x,S,b,j=0,N=[];;){if(a(f),j>=s)return N;_=a(d),v=[],_.slice(-1)===","?(_=_.replace(g,""),F()):I()}function I(){for(a(c),x="",S="in descriptor";;){if(b=n.charAt(j),S==="in descriptor")if(i(b))x&&(v.push(x),x="",S="after descriptor");else if(b===","){j+=1,x&&v.push(x),F();return}else if(b==="(")x=x+b,S="in parens";else if(b===""){x&&v.push(x),F();return}else x=x+b;else if(S==="in parens")if(b===")")x=x+b,S="in descriptor";else if(b===""){v.push(x),F();return}else x=x+b;else if(S==="after descriptor"&&!i(b))if(b===""){F();return}else S="in descriptor",j-=1;j+=1}}function F(){var O=!1,Z,ye,D,re,le={},oe,R,U,J,Y;for(re=0;re",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(n){if(!this.source)return"";let i=this.source;n==null&&(n=$g.isColorSupported);let a=w=>w,s=w=>w,c=w=>w;if(n){let{bold:w,gray:_,red:v}=$g.createColors(!0);s=x=>w(v(x)),a=x=>_(x),Fg&&(c=x=>Fg(x))}let f=i.split(/\r?\n/),d=Math.max(this.line-3,0),g=Math.min(this.line+2,f.length),y=String(g).length;return f.slice(d,g).map((w,_)=>{let v=d+1+_,x=" "+(" "+v).slice(-y)+" | ";if(v===this.line){if(w.length>160){let b=20,j=Math.max(0,this.column-b),N=Math.max(this.column+b,this.endColumn+b),I=w.slice(j,N),F=a(x.replace(/\d/g," "))+w.slice(0,Math.min(this.column-1,b-1)).replace(/[^\t]/g," ");return s(">")+a(x)+c(I)+` - `+F+s("^")}let S=a(x.replace(/\d/g," "))+w.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+a(x)+c(w)+` - `+S+s("^")}return" "+a(x)+c(w)}).join(` -`)}toString(){let n=this.showSourceCode();return n&&(n=` - -`+n+` -`),this.name+": "+this.message+n}};var Qf=Vd;Vd.default=Vd;const zg={after:` -`,beforeClose:` -`,beforeComment:` -`,beforeDecl:` -`,beforeOpen:" ",beforeRule:` -`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function gj(e){return e[0].toUpperCase()+e.slice(1)}let Wd=class{constructor(e){this.builder=e}atrule(e,n){let i="@"+e.name,a=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?i+=e.raws.afterName:a&&(i+=" "),e.nodes)this.block(e,i+a);else{let s=(e.raws.between||"")+(n?";":"");this.builder(i+a+s,e)}}beforeAfter(e,n){let i;e.type==="decl"?i=this.raw(e,null,"beforeDecl"):e.type==="comment"?i=this.raw(e,null,"beforeComment"):n==="before"?i=this.raw(e,null,"beforeRule"):i=this.raw(e,null,"beforeClose");let a=e.parent,s=0;for(;a&&a.type!=="root";)s+=1,a=a.parent;if(i.includes(` -`)){let c=this.raw(e,null,"indent");if(c.length)for(let f=0;f0&&e.nodes[n].type==="comment";)n-=1;let i=this.raw(e,"semicolon");for(let a=0;a{if(a=d.raws[n],typeof a<"u")return!1})}return typeof a>"u"&&(a=zg[i]),c.rawCache[i]=a,a}rawBeforeClose(e){let n;return e.walk(i=>{if(i.nodes&&i.nodes.length>0&&typeof i.raws.after<"u")return n=i.raws.after,n.includes(` -`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawBeforeComment(e,n){let i;return e.walkComments(a=>{if(typeof a.raws.before<"u")return i=a.raws.before,i.includes(` -`)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(n,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(e,n){let i;return e.walkDecls(a=>{if(typeof a.raws.before<"u")return i=a.raws.before,i.includes(` -`)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(n,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeOpen(e){let n;return e.walk(i=>{if(i.type!=="decl"&&(n=i.raws.between,typeof n<"u"))return!1}),n}rawBeforeRule(e){let n;return e.walk(i=>{if(i.nodes&&(i.parent!==e||e.first!==i)&&typeof i.raws.before<"u")return n=i.raws.before,n.includes(` -`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawColon(e){let n;return e.walkDecls(i=>{if(typeof i.raws.between<"u")return n=i.raws.between.replace(/[^\s:]/g,""),!1}),n}rawEmptyBody(e){let n;return e.walk(i=>{if(i.nodes&&i.nodes.length===0&&(n=i.raws.after,typeof n<"u"))return!1}),n}rawIndent(e){if(e.raws.indent)return e.raws.indent;let n;return e.walk(i=>{let a=i.parent;if(a&&a!==e&&a.parent&&a.parent===e&&typeof i.raws.before<"u"){let s=i.raws.before.split(` -`);return n=s[s.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(e){let n;return e.walk(i=>{if(i.nodes&&i.nodes.length&&i.last.type==="decl"&&(n=i.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(e,n){let i=e[n],a=e.raws[n];return a&&a.value===i?a.raw:i}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,n){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,n)}};var iy=Wd;Wd.default=Wd;let vj=iy;function Gd(e,n){new vj(n).stringify(e)}var wc=Gd;Gd.default=Gd;var xs={};xs.isClean=Symbol("isClean");xs.my=Symbol("my");let yj=Qf,xj=iy,wj=wc,{isClean:Fo,my:_j}=xs;function Zd(e,n){let i=new e.constructor;for(let a in e){if(!Object.prototype.hasOwnProperty.call(e,a)||a==="proxyCache")continue;let s=e[a],c=typeof s;a==="parent"&&c==="object"?n&&(i[a]=n):a==="source"?i[a]=s:Array.isArray(s)?i[a]=s.map(f=>Zd(f,i)):(c==="object"&&s!==null&&(s=Zd(s)),i[a]=s)}return i}let Qd=class{constructor(e={}){this.raws={},this[Fo]=!1,this[_j]=!0;for(let n in e)if(n==="nodes"){this.nodes=[];for(let i of e[n])typeof i.clone=="function"?this.append(i.clone()):this.append(i)}else this[n]=e[n]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let n=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let n in e)this[n]=e[n];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let n=Zd(this);for(let i in e)n[i]=e[i];return n}cloneAfter(e={}){let n=this.clone(e);return this.parent.insertAfter(this,n),n}cloneBefore(e={}){let n=this.clone(e);return this.parent.insertBefore(this,n),n}error(e,n={}){if(this.source){let{end:i,start:a}=this.rangeBy(n);return this.source.input.error(e,{column:a.column,line:a.line},{column:i.column,line:i.line},n)}return new yj(e)}getProxyProcessor(){return{get(e,n){return n==="proxyOf"?e:n==="root"?()=>e.root().toProxy():e[n]},set(e,n,i){return e[n]===i||(e[n]=i,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&e.markDirty()),!0}}}markClean(){this[Fo]=!0}markDirty(){if(this[Fo]){this[Fo]=!1;let e=this;for(;e=e.parent;)e[Fo]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,n){let i=this.source.start;if(e.index)i=this.positionInside(e.index,n);else if(e.word){n=this.toString();let a=n.indexOf(e.word);a!==-1&&(i=this.positionInside(a,n))}return i}positionInside(e,n){let i=n||this.toString(),a=this.source.start.column,s=this.source.start.line;for(let c=0;ctypeof d=="object"&&d.toJSON?d.toJSON(null,n):d);else if(typeof f=="object"&&f.toJSON)i[c]=f.toJSON(null,n);else if(c==="source"){let d=n.get(f.input);d==null&&(d=s,n.set(f.input,s),s++),i[c]={end:f.end,inputId:d,start:f.start}}else i[c]=f}return a&&(i.inputs=[...n.keys()].map(c=>c.toJSON())),i}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=wj){e.stringify&&(e=e.stringify);let n="";return e(this,i=>{n+=i}),n}warn(e,n,i){let a={node:this};for(let s in i)a[s]=i[s];return e.warn(n,a)}get proxyOf(){return this}};var _c=Qd;Qd.default=Qd;let Cj=_c,Jd=class extends Cj{constructor(e){super(e),this.type="comment"}};var Cc=Jd;Jd.default=Jd;let bj=_c,Kd=class extends bj{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var bc=Kd;Kd.default=Kd;let ay=Cc,oy=bc,Sj=_c,{isClean:sy,my:ly}=xs,Jf,cy,uy,Kf;function dy(e){return e.map(n=>(n.nodes&&(n.nodes=dy(n.nodes)),delete n.source,n))}function fy(e){if(e[sy]=!1,e.proxyOf.nodes)for(let n of e.proxyOf.nodes)fy(n)}let ni=class hy extends Sj{append(...n){for(let i of n){let a=this.normalize(i,this.last);for(let s of a)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(n){if(super.cleanRaws(n),this.nodes)for(let i of this.nodes)i.cleanRaws(n)}each(n){if(!this.proxyOf.nodes)return;let i=this.getIterator(),a,s;for(;this.indexes[i]n[i](...a.map(s=>typeof s=="function"?(c,f)=>s(c.toProxy(),f):s)):i==="every"||i==="some"?a=>n[i]((s,...c)=>a(s.toProxy(),...c)):i==="root"?()=>n.root().toProxy():i==="nodes"?n.nodes.map(a=>a.toProxy()):i==="first"||i==="last"?n[i].toProxy():n[i]:n[i]},set(n,i,a){return n[i]===a||(n[i]=a,(i==="name"||i==="params"||i==="selector")&&n.markDirty()),!0}}}index(n){return typeof n=="number"?n:(n.proxyOf&&(n=n.proxyOf),this.proxyOf.nodes.indexOf(n))}insertAfter(n,i){let a=this.index(n),s=this.normalize(i,this.proxyOf.nodes[a]).reverse();a=this.index(n);for(let f of s)this.proxyOf.nodes.splice(a+1,0,f);let c;for(let f in this.indexes)c=this.indexes[f],a"u")n=[];else if(Array.isArray(n)){n=n.slice(0);for(let a of n)a.parent&&a.parent.removeChild(a,"ignore")}else if(n.type==="root"&&this.type!=="document"){n=n.nodes.slice(0);for(let a of n)a.parent&&a.parent.removeChild(a,"ignore")}else if(n.type)n=[n];else if(n.prop){if(typeof n.value>"u")throw new Error("Value field is missed in node creation");typeof n.value!="string"&&(n.value=String(n.value)),n=[new oy(n)]}else if(n.selector||n.selectors)n=[new Kf(n)];else if(n.name)n=[new Jf(n)];else if(n.text)n=[new ay(n)];else throw new Error("Unknown node type in node creation");return n.map(a=>(a[ly]||hy.rebuild(a),a=a.proxyOf,a.parent&&a.parent.removeChild(a),a[sy]&&fy(a),a.raws||(a.raws={}),typeof a.raws.before>"u"&&i&&typeof i.raws.before<"u"&&(a.raws.before=i.raws.before.replace(/\S/g,"")),a.parent=this.proxyOf,a))}prepend(...n){n=n.reverse();for(let i of n){let a=this.normalize(i,this.first,"prepend").reverse();for(let s of a)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+a.length}return this.markDirty(),this}push(n){return n.parent=this,this.proxyOf.nodes.push(n),this}removeAll(){for(let n of this.proxyOf.nodes)n.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(n){n=this.index(n),this.proxyOf.nodes[n].parent=void 0,this.proxyOf.nodes.splice(n,1);let i;for(let a in this.indexes)i=this.indexes[a],i>=n&&(this.indexes[a]=i-1);return this.markDirty(),this}replaceValues(n,i,a){return a||(a=i,i={}),this.walkDecls(s=>{i.props&&!i.props.includes(s.prop)||i.fast&&!s.value.includes(i.fast)||(s.value=s.value.replace(n,a))}),this.markDirty(),this}some(n){return this.nodes.some(n)}walk(n){return this.each((i,a)=>{let s;try{s=n(i,a)}catch(c){throw i.addToError(c)}return s!==!1&&i.walk&&(s=i.walk(n)),s})}walkAtRules(n,i){return i?n instanceof RegExp?this.walk((a,s)=>{if(a.type==="atrule"&&n.test(a.name))return i(a,s)}):this.walk((a,s)=>{if(a.type==="atrule"&&a.name===n)return i(a,s)}):(i=n,this.walk((a,s)=>{if(a.type==="atrule")return i(a,s)}))}walkComments(n){return this.walk((i,a)=>{if(i.type==="comment")return n(i,a)})}walkDecls(n,i){return i?n instanceof RegExp?this.walk((a,s)=>{if(a.type==="decl"&&n.test(a.prop))return i(a,s)}):this.walk((a,s)=>{if(a.type==="decl"&&a.prop===n)return i(a,s)}):(i=n,this.walk((a,s)=>{if(a.type==="decl")return i(a,s)}))}walkRules(n,i){return i?n instanceof RegExp?this.walk((a,s)=>{if(a.type==="rule"&&n.test(a.selector))return i(a,s)}):this.walk((a,s)=>{if(a.type==="rule"&&a.selector===n)return i(a,s)}):(i=n,this.walk((a,s)=>{if(a.type==="rule")return i(a,s)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};ni.registerParse=e=>{cy=e};ni.registerRule=e=>{Kf=e};ni.registerAtRule=e=>{Jf=e};ni.registerRoot=e=>{uy=e};var oa=ni;ni.default=ni;ni.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,Jf.prototype):e.type==="rule"?Object.setPrototypeOf(e,Kf.prototype):e.type==="decl"?Object.setPrototypeOf(e,oy.prototype):e.type==="comment"?Object.setPrototypeOf(e,ay.prototype):e.type==="root"&&Object.setPrototypeOf(e,uy.prototype),e[ly]=!0,e.nodes&&e.nodes.forEach(n=>{ni.rebuild(n)})};let py=oa,sc=class extends py{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Yf=sc;sc.default=sc;py.registerAtRule(sc);let Nj=oa,my,gy,cs=class extends Nj{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new my(new gy,this,e).stringify()}};cs.registerLazyResult=e=>{my=e};cs.registerProcessor=e=>{gy=e};var Xf=cs;cs.default=cs;let Ej="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",kj=(e=21)=>{let n="",i=e;for(;i--;)n+=Ej[Math.random()*64|0];return n};var jj={nanoid:kj};let{existsSync:Tj,readFileSync:Mj}=kr,{dirname:Nd,join:Pj}=kr,{SourceMapConsumer:Bg,SourceMapGenerator:Ug}=kr;function Ij(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}let Yd=class{constructor(e,n){if(n.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let i=n.map?n.map.prev:void 0,a=this.loadMap(n.from,i);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=Nd(this.mapFile)),a&&(this.text=a)}consumer(){return this.consumerCache||(this.consumerCache=new Bg(this.text)),this.consumerCache}decodeInline(e){let n=/^data:application\/json;charset=utf-?8;base64,/,i=/^data:application\/json;base64,/,a=/^data:application\/json;charset=utf-?8,/,s=/^data:application\/json,/,c=e.match(a)||e.match(s);if(c)return decodeURIComponent(e.substr(c[0].length));let f=e.match(n)||e.match(i);if(f)return Ij(e.substr(f[0].length));let d=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+d)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let n=e.match(/\/\*\s*# sourceMappingURL=/g);if(!n)return;let i=e.lastIndexOf(n.pop()),a=e.indexOf("*/",i);i>-1&&a>-1&&(this.annotation=this.getAnnotationURL(e.substring(i,a)))}loadFile(e){if(this.root=Nd(e),Tj(e))return this.mapFile=e,Mj(e,"utf-8").toString().trim()}loadMap(e,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let i=n(e);if(i){let a=this.loadFile(i);if(!a)throw new Error("Unable to load previous source map: "+i.toString());return a}}else{if(n instanceof Bg)return Ug.fromSourceMap(n).toString();if(n instanceof Ug)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let i=this.annotation;return e&&(i=Pj(Nd(e),i)),this.loadFile(i)}}}startWith(e,n){return e?e.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var vy=Yd;Yd.default=Yd;let{nanoid:Lj}=jj,{isAbsolute:Xd,resolve:ef}=kr,{SourceMapConsumer:Dj,SourceMapGenerator:Rj}=kr,{fileURLToPath:Hg,pathToFileURL:Il}=kr,qg=Qf,Oj=vy,Ed=kr,kd=Symbol("fromOffsetCache"),Aj=!!(Dj&&Rj),Vg=!!(ef&&Xd),lc=class{constructor(e,n={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!Vg||/^\w+:\/\//.test(n.from)||Xd(n.from)?this.file=n.from:this.file=ef(n.from)),Vg&&Aj){let i=new Oj(this.css,n);if(i.text){this.map=i;let a=i.consumer().file;!this.file&&a&&(this.file=this.mapResolve(a))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}error(e,n,i,a={}){let s,c,f;if(n&&typeof n=="object"){let g=n,y=i;if(typeof g.offset=="number"){let w=this.fromOffset(g.offset);n=w.line,i=w.col}else n=g.line,i=g.column;if(typeof y.offset=="number"){let w=this.fromOffset(y.offset);c=w.line,s=w.col}else c=y.line,s=y.column}else if(!i){let g=this.fromOffset(n);n=g.line,i=g.col}let d=this.origin(n,i,c,s);return d?f=new qg(e,d.endLine===void 0?d.line:{column:d.column,line:d.line},d.endLine===void 0?d.column:{column:d.endColumn,line:d.endLine},d.source,d.file,a.plugin):f=new qg(e,c===void 0?n:{column:i,line:n},c===void 0?i:{column:s,line:c},this.css,this.file,a.plugin),f.input={column:i,endColumn:s,endLine:c,line:n,source:this.css},this.file&&(Il&&(f.input.url=Il(this.file).toString()),f.input.file=this.file),f}fromOffset(e){let n,i;if(this[kd])i=this[kd];else{let s=this.css.split(` -`);i=new Array(s.length);let c=0;for(let f=0,d=s.length;f=n)a=i.length-1;else{let s=i.length-2,c;for(;a>1),e=i[c+1])a=c+1;else{a=c;break}}return{col:e-i[a]+1,line:a+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ef(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,n,i,a){if(!this.map)return!1;let s=this.map.consumer(),c=s.originalPositionFor({column:n,line:e});if(!c.source)return!1;let f;typeof i=="number"&&(f=s.originalPositionFor({column:a,line:i}));let d;Xd(c.source)?d=Il(c.source):d=new URL(c.source,this.map.consumer().sourceRoot||Il(this.map.mapFile));let g={column:c.column,endColumn:f&&f.column,endLine:f&&f.line,line:c.line,url:d.toString()};if(d.protocol==="file:")if(Hg)g.file=Hg(d);else throw new Error("file: protocol is not available in this PostCSS build");let y=s.sourceContentFor(c.source);return y&&(g.source=y),g}toJSON(){let e={};for(let n of["hasBOM","css","file","id"])this[n]!=null&&(e[n]=this[n]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Sc=lc;lc.default=lc;Ed&&Ed.registerInput&&Ed.registerInput(lc);let yy=oa,xy,wy,Va=class extends yy{constructor(n){super(n),this.type="root",this.nodes||(this.nodes=[])}normalize(n,i,a){let s=super.normalize(n);if(i){if(a==="prepend")this.nodes.length>1?i.raws.before=this.nodes[1].raws.before:delete i.raws.before;else if(this.first!==i)for(let c of s)c.raws.before=i.raws.before}return s}removeChild(n,i){let a=this.index(n);return!i&&a===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[a].raws.before),super.removeChild(n)}toResult(n={}){return new xy(new wy,this,n).stringify()}};Va.registerLazyResult=e=>{xy=e};Va.registerProcessor=e=>{wy=e};var ws=Va;Va.default=Va;yy.registerRoot(Va);let us={comma(e){return us.split(e,[","],!0)},space(e){let n=[" ",` -`," "];return us.split(e,n)},split(e,n,i){let a=[],s="",c=!1,f=0,d=!1,g="",y=!1;for(let w of e)y?y=!1:w==="\\"?y=!0:d?w===g&&(d=!1):w==='"'||w==="'"?(d=!0,g=w):w==="("?f+=1:w===")"?f>0&&(f-=1):f===0&&n.includes(w)&&(c=!0),c?(s!==""&&a.push(s.trim()),s="",c=!1):s+=w;return(i||s!=="")&&a.push(s.trim()),a}};var _y=us;us.default=us;let Cy=oa,$j=_y,cc=class extends Cy{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return $j.comma(this.selector)}set selectors(e){let n=this.selector?this.selector.match(/,\s*/):null,i=n?n[0]:","+this.raw("between","beforeOpen");this.selector=e.join(i)}};var eh=cc;cc.default=cc;Cy.registerRule(cc);let Fj=Yf,zj=Cc,Bj=bc,Uj=Sc,Hj=vy,qj=ws,Vj=eh;function ds(e,n){if(Array.isArray(e))return e.map(s=>ds(s));let{inputs:i,...a}=e;if(i){n=[];for(let s of i){let c={...s,__proto__:Uj.prototype};c.map&&(c.map={...c.map,__proto__:Hj.prototype}),n.push(c)}}if(a.nodes&&(a.nodes=e.nodes.map(s=>ds(s,n))),a.source){let{inputId:s,...c}=a.source;a.source=c,s!=null&&(a.source.input=n[s])}if(a.type==="root")return new qj(a);if(a.type==="decl")return new Bj(a);if(a.type==="rule")return new Vj(a);if(a.type==="comment")return new zj(a);if(a.type==="atrule")return new Fj(a);throw new Error("Unknown node type: "+e.type)}var Wj=ds;ds.default=ds;let{dirname:Gl,relative:by,resolve:Sy,sep:Ny}=kr,{SourceMapConsumer:Ey,SourceMapGenerator:Zl}=kr,{pathToFileURL:Wg}=kr,Gj=Sc,Zj=!!(Ey&&Zl),Qj=!!(Gl&&Sy&&by&&Ny),Jj=class{constructor(e,n,i,a){this.stringify=e,this.mapOpts=i.map||{},this.root=n,this.opts=i,this.css=a,this.originalCSS=a,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let n=` -`;this.css.includes(`\r -`)&&(n=`\r -`),this.css+=n+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let n=this.toUrl(this.path(e.file)),i=e.root||Gl(e.file),a;this.mapOpts.sourcesContent===!1?(a=new Ey(e.text),a.sourcesContent&&(a.sourcesContent=null)):a=e.consumer(),this.map.applySourceMap(a,n,this.toUrl(this.path(i)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let n=this.root.nodes.length-1;n>=0;n--)e=this.root.nodes[n],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Qj&&Zj&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,n=>{e+=n}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Zl.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Zl({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Zl({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,n=1,i="",a={generated:{column:0,line:0},original:{column:0,line:0},source:""},s,c;this.stringify(this.root,(f,d,g)=>{if(this.css+=f,d&&g!=="end"&&(a.generated.line=e,a.generated.column=n-1,d.source&&d.source.start?(a.source=this.sourcePath(d),a.original.line=d.source.start.line,a.original.column=d.source.start.column-1,this.map.addMapping(a)):(a.source=i,a.original.line=1,a.original.column=0,this.map.addMapping(a))),c=f.match(/\n/g),c?(e+=c.length,s=f.lastIndexOf(` -`),n=f.length-s):n+=f.length,d&&g!=="start"){let y=d.parent||{raws:{}};(!(d.type==="decl"||d.type==="atrule"&&!d.nodes)||d!==y.last||y.raws.semicolon)&&(d.source&&d.source.end?(a.source=this.sourcePath(d),a.original.line=d.source.end.line,a.original.column=d.source.end.column-1,a.generated.line=e,a.generated.column=n-2,this.map.addMapping(a)):(a.source=i,a.original.line=1,a.original.column=0,a.generated.line=e,a.generated.column=n-1,this.map.addMapping(a)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let n=this.memoizedPaths.get(e);if(n)return n;let i=this.opts.to?Gl(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(i=Gl(Sy(i,this.mapOpts.annotation)));let a=by(i,e);return this.memoizedPaths.set(e,a),a}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let n=e.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let e=new Gj(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(n=>{if(n.source){let i=n.source.input.from;if(i&&!e[i]){e[i]=!0;let a=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(a,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(n,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let n=this.memoizedFileURLs.get(e);if(n)return n;if(Wg){let i=Wg(e).toString();return this.memoizedFileURLs.set(e,i),i}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let n=this.memoizedURLs.get(e);if(n)return n;Ny==="\\"&&(e=e.replace(/\\/g,"/"));let i=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,i),i}};var ky=Jj;const jd=39,Gg=34,Ll=92,Zg=47,Dl=10,zo=32,Rl=12,Ol=9,Al=13,Kj=91,Yj=93,Xj=40,e2=41,t2=123,n2=125,r2=59,i2=42,a2=58,o2=64,$l=/[\t\n\f\r "#'()/;[\\\]{}]/g,Fl=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,s2=/.[\r\n"'(/\\]/,Qg=/[\da-f]/i;var l2=function(e,n={}){let i=e.css.valueOf(),a=n.ignoreErrors,s,c,f,d,g,y,w,_,v,x,S=i.length,b=0,j=[],N=[];function I(){return b}function F(D){throw e.error("Unclosed "+D,b)}function O(){return N.length===0&&b>=S}function Z(D){if(N.length)return N.pop();if(b>=S)return;let re=D?D.ignoreUnclosed:!1;switch(s=i.charCodeAt(b),s){case Dl:case zo:case Ol:case Al:case Rl:{d=b;do d+=1,s=i.charCodeAt(d);while(s===zo||s===Dl||s===Ol||s===Al||s===Rl);y=["space",i.slice(b,d)],b=d-1;break}case Kj:case Yj:case t2:case n2:case a2:case r2:case e2:{let le=String.fromCharCode(s);y=[le,le,b];break}case Xj:{if(x=j.length?j.pop()[1]:"",v=i.charCodeAt(b+1),x==="url"&&v!==jd&&v!==Gg&&v!==zo&&v!==Dl&&v!==Ol&&v!==Rl&&v!==Al){d=b;do{if(w=!1,d=i.indexOf(")",d+1),d===-1)if(a||re){d=b;break}else F("bracket");for(_=d;i.charCodeAt(_-1)===Ll;)_-=1,w=!w}while(w);y=["brackets",i.slice(b,d+1),b,d],b=d}else d=i.indexOf(")",b+1),c=i.slice(b,d+1),d===-1||s2.test(c)?y=["(","(",b]:(y=["brackets",c,b,d],b=d);break}case jd:case Gg:{g=s===jd?"'":'"',d=b;do{if(w=!1,d=i.indexOf(g,d+1),d===-1)if(a||re){d=b+1;break}else F("string");for(_=d;i.charCodeAt(_-1)===Ll;)_-=1,w=!w}while(w);y=["string",i.slice(b,d+1),b,d],b=d;break}case o2:{$l.lastIndex=b+1,$l.test(i),$l.lastIndex===0?d=i.length-1:d=$l.lastIndex-2,y=["at-word",i.slice(b,d+1),b,d],b=d;break}case Ll:{for(d=b,f=!0;i.charCodeAt(d+1)===Ll;)d+=1,f=!f;if(s=i.charCodeAt(d+1),f&&s!==Zg&&s!==zo&&s!==Dl&&s!==Ol&&s!==Al&&s!==Rl&&(d+=1,Qg.test(i.charAt(d)))){for(;Qg.test(i.charAt(d+1));)d+=1;i.charCodeAt(d+1)===zo&&(d+=1)}y=["word",i.slice(b,d+1),b,d],b=d;break}default:{s===Zg&&i.charCodeAt(b+1)===i2?(d=i.indexOf("*/",b+2)+1,d===0&&(a||re?d=i.length:F("comment")),y=["comment",i.slice(b,d+1),b,d],b=d):(Fl.lastIndex=b+1,Fl.test(i),Fl.lastIndex===0?d=i.length-1:d=Fl.lastIndex-2,y=["word",i.slice(b,d+1),b,d],j.push(y),b=d);break}}return b++,y}function ye(D){N.push(D)}return{back:ye,endOfFile:O,nextToken:Z,position:I}};let c2=Yf,u2=Cc,d2=bc,f2=ws,Jg=eh,h2=l2;const Kg={empty:!0,space:!0};function p2(e){for(let n=e.length-1;n>=0;n--){let i=e[n],a=i[3]||i[2];if(a)return a}}let m2=class{constructor(e){this.input=e,this.root=new f2,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let n=new c2;n.name=e[1].slice(1),n.name===""&&this.unnamedAtrule(n,e),this.init(n,e[2]);let i,a,s,c=!1,f=!1,d=[],g=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),i=e[0],i==="("||i==="["?g.push(i==="("?")":"]"):i==="{"&&g.length>0?g.push("}"):i===g[g.length-1]&&g.pop(),g.length===0)if(i===";"){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}else if(i==="{"){f=!0;break}else if(i==="}"){if(d.length>0){for(s=d.length-1,a=d[s];a&&a[0]==="space";)a=d[--s];a&&(n.source.end=this.getPosition(a[3]||a[2]),n.source.end.offset++)}this.end(e);break}else d.push(e);else d.push(e);if(this.tokenizer.endOfFile()){c=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(d),d.length?(n.raws.afterName=this.spacesAndCommentsFromStart(d),this.raw(n,"params",d),c&&(e=d[d.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),f&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let n=this.colon(e);if(n===!1)return;let i=0,a;for(let s=n-1;s>=0&&(a=e[s],!(a[0]!=="space"&&(i+=1,i===2)));s--);throw this.input.error("Missed semicolon",a[0]==="word"?a[3]+1:a[2])}colon(e){let n=0,i,a,s;for(let[c,f]of e.entries()){if(a=f,s=a[0],s==="("&&(n+=1),s===")"&&(n-=1),n===0&&s===":")if(!i)this.doubleColon(a);else{if(i[0]==="word"&&i[1]==="progid")continue;return c}i=a}return!1}comment(e){let n=new u2;this.init(n,e[2]),n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++;let i=e[1].slice(2,-2);if(/^\s*$/.test(i))n.text="",n.raws.left=i,n.raws.right="";else{let a=i.match(/^(\s*)([^]*\S)(\s*)$/);n.text=a[2],n.raws.left=a[1],n.raws.right=a[3]}}createTokenizer(){this.tokenizer=h2(this.input)}decl(e,n){let i=new d2;this.init(i,e[0][2]);let a=e[e.length-1];for(a[0]===";"&&(this.semicolon=!0,e.pop()),i.source.end=this.getPosition(a[3]||a[2]||p2(e)),i.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),i.raws.before+=e.shift()[1];for(i.source.start=this.getPosition(e[0][2]),i.prop="";e.length;){let d=e[0][0];if(d===":"||d==="space"||d==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let s;for(;e.length;)if(s=e.shift(),s[0]===":"){i.raws.between+=s[1];break}else s[0]==="word"&&/\w/.test(s[1])&&this.unknownWord([s]),i.raws.between+=s[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let c=[],f;for(;e.length&&(f=e[0][0],!(f!=="space"&&f!=="comment"));)c.push(e.shift());this.precheckMissedSemicolon(e);for(let d=e.length-1;d>=0;d--){if(s=e[d],s[1].toLowerCase()==="!important"){i.important=!0;let g=this.stringFrom(e,d);g=this.spacesFromEnd(e)+g,g!==" !important"&&(i.raws.important=g);break}else if(s[1].toLowerCase()==="important"){let g=e.slice(0),y="";for(let w=d;w>0;w--){let _=g[w][0];if(y.trim().startsWith("!")&&_!=="space")break;y=g.pop()[1]+y}y.trim().startsWith("!")&&(i.important=!0,i.raws.important=y,e=g)}if(s[0]!=="space"&&s[0]!=="comment")break}e.some(d=>d[0]!=="space"&&d[0]!=="comment")&&(i.raws.between+=c.map(d=>d[1]).join(""),c=[]),this.raw(i,"value",c.concat(e),n),i.value.includes(":")&&!n&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let n=new Jg;this.init(n,e[2]),n.selector="",n.raws.between="",this.current=n}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let n=this.input.fromOffset(e);return{column:n.col,line:n.line,offset:e}}init(e,n){this.current.push(e),e.source={input:this.input,start:this.getPosition(n)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let n=!1,i=null,a=!1,s=null,c=[],f=e[1].startsWith("--"),d=[],g=e;for(;g;){if(i=g[0],d.push(g),i==="("||i==="[")s||(s=g),c.push(i==="("?")":"]");else if(f&&a&&i==="{")s||(s=g),c.push("}");else if(c.length===0)if(i===";")if(a){this.decl(d,f);return}else break;else if(i==="{"){this.rule(d);return}else if(i==="}"){this.tokenizer.back(d.pop()),n=!0;break}else i===":"&&(a=!0);else i===c[c.length-1]&&(c.pop(),c.length===0&&(s=null));g=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),c.length>0&&this.unclosedBracket(s),n&&a){if(!f)for(;d.length&&(g=d[d.length-1][0],!(g!=="space"&&g!=="comment"));)this.tokenizer.back(d.pop());this.decl(d,f)}else this.unknownWord(d)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,n,i,a){let s,c,f=i.length,d="",g=!0,y,w;for(let _=0;_v+x[1],"");e.raws[n]={raw:_,value:d}}e[n]=d}rule(e){e.pop();let n=new Jg;this.init(n,e[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(n,"selector",e),this.current=n}spacesAndCommentsFromEnd(e){let n,i="";for(;e.length&&(n=e[e.length-1][0],!(n!=="space"&&n!=="comment"));)i=e.pop()[1]+i;return i}spacesAndCommentsFromStart(e){let n,i="";for(;e.length&&(n=e[0][0],!(n!=="space"&&n!=="comment"));)i+=e.shift()[1];return i}spacesFromEnd(e){let n,i="";for(;e.length&&(n=e[e.length-1][0],n==="space");)i=e.pop()[1]+i;return i}stringFrom(e,n){let i="";for(let a=n;ae.type==="warning")}get content(){return this.css}};var nh=nf;nf.default=nf;let _2=oa,C2=Xf,b2=ky,S2=th,Yg=nh,N2=ws,E2=wc,{isClean:Rr,my:k2}=xs;const j2={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},T2={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},M2={Once:!0,postcssPlugin:!0,prepare:!0},Wa=0;function Bo(e){return typeof e=="object"&&typeof e.then=="function"}function Ty(e){let n=!1,i=j2[e.type];return e.type==="decl"?n=e.prop.toLowerCase():e.type==="atrule"&&(n=e.name.toLowerCase()),n&&e.append?[i,i+"-"+n,Wa,i+"Exit",i+"Exit-"+n]:n?[i,i+"-"+n,i+"Exit",i+"Exit-"+n]:e.append?[i,Wa,i+"Exit"]:[i,i+"Exit"]}function Xg(e){let n;return e.type==="document"?n=["Document",Wa,"DocumentExit"]:e.type==="root"?n=["Root",Wa,"RootExit"]:n=Ty(e),{eventIndex:0,events:n,iterator:0,node:e,visitorIndex:0,visitors:[]}}function rf(e){return e[Rr]=!1,e.nodes&&e.nodes.forEach(n=>rf(n)),e}let af={},Ga=class My{constructor(n,i,a){this.stringified=!1,this.processed=!1;let s;if(typeof i=="object"&&i!==null&&(i.type==="root"||i.type==="document"))s=rf(i);else if(i instanceof My||i instanceof Yg)s=rf(i.root),i.map&&(typeof a.map>"u"&&(a.map={}),a.map.inline||(a.map.inline=!1),a.map.prev=i.map);else{let c=S2;a.syntax&&(c=a.syntax.parse),a.parser&&(c=a.parser),c.parse&&(c=c.parse);try{s=c(i,a)}catch(f){this.processed=!0,this.error=f}s&&!s[k2]&&_2.rebuild(s)}this.result=new Yg(n,s,a),this.helpers={...af,postcss:af,result:this.result},this.plugins=this.processor.plugins.map(c=>typeof c=="object"&&c.prepare?{...c,...c.prepare(this.result)}:c)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(n){return this.async().catch(n)}finally(n){return this.async().then(n,n)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(n,i){let a=this.result.lastPlugin;try{i&&i.addToError(n),this.error=n,n.name==="CssSyntaxError"&&!n.plugin?(n.plugin=a.postcssPlugin,n.setMessage()):a.postcssVersion}catch(s){console&&console.error&&console.error(s)}return n}prepareVisitors(){this.listeners={};let n=(i,a,s)=>{this.listeners[a]||(this.listeners[a]=[]),this.listeners[a].push([i,s])};for(let i of this.plugins)if(typeof i=="object")for(let a in i){if(!T2[a]&&/^[A-Z]/.test(a))throw new Error(`Unknown event ${a} in ${i.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!M2[a])if(typeof i[a]=="object")for(let s in i[a])s==="*"?n(i,a,i[a][s]):n(i,a+"-"+s.toLowerCase(),i[a][s]);else typeof i[a]=="function"&&n(i,a,i[a])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let n=0;n0;){let a=this.visitTick(i);if(Bo(a))try{await a}catch(s){let c=i[i.length-1].node;throw this.handleError(s,c)}}}if(this.listeners.OnceExit)for(let[i,a]of this.listeners.OnceExit){this.result.lastPlugin=i;try{if(n.type==="document"){let s=n.nodes.map(c=>a(c,this.helpers));await Promise.all(s)}else await a(n,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(n){this.result.lastPlugin=n;try{if(typeof n=="object"&&n.Once){if(this.result.root.type==="document"){let i=this.result.root.nodes.map(a=>n.Once(a,this.helpers));return Bo(i[0])?Promise.all(i):i}return n.Once(this.result.root,this.helpers)}else if(typeof n=="function")return n(this.result.root,this.result)}catch(i){throw this.handleError(i)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let n=this.result.opts,i=E2;n.syntax&&(i=n.syntax.stringify),n.stringifier&&(i=n.stringifier),i.stringify&&(i=i.stringify);let a=new b2(i,this.result.root,this.result.opts).generate();return this.result.css=a[0],this.result.map=a[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let n of this.plugins){let i=this.runOnRoot(n);if(Bo(i))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let n=this.result.root;for(;!n[Rr];)n[Rr]=!0,this.walkSync(n);if(this.listeners.OnceExit)if(n.type==="document")for(let i of n.nodes)this.visitSync(this.listeners.OnceExit,i);else this.visitSync(this.listeners.OnceExit,n)}return this.result}then(n,i){return this.async().then(n,i)}toString(){return this.css}visitSync(n,i){for(let[a,s]of n){this.result.lastPlugin=a;let c;try{c=s(i,this.helpers)}catch(f){throw this.handleError(f,i.proxyOf)}if(i.type!=="root"&&i.type!=="document"&&!i.parent)return!0;if(Bo(c))throw this.getAsyncError()}}visitTick(n){let i=n[n.length-1],{node:a,visitors:s}=i;if(a.type!=="root"&&a.type!=="document"&&!a.parent){n.pop();return}if(s.length>0&&i.visitorIndex{s[Rr]||this.walkSync(s)});else{let s=this.listeners[a];if(s&&this.visitSync(s,n.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Ga.registerPostcss=e=>{af=e};var Py=Ga;Ga.default=Ga;N2.registerLazyResult(Ga);C2.registerLazyResult(Ga);let P2=ky,I2=th;const L2=nh;let D2=wc,of=class{constructor(e,n,i){n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=i,this._map=void 0;let a,s=D2;this.result=new L2(this._processor,a,this._opts),this.result.css=n;let c=this;Object.defineProperty(this.result,"root",{get(){return c.root}});let f=new P2(s,a,this._opts,n);if(f.isMap()){let[d,g]=f.generate();d&&(this.result.css=d),g&&(this.result.map=g)}else f.clearAnnotation(),this.result.css=f.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,n){return this.async().then(e,n)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,n=I2;try{e=n(this._css,this._opts)}catch(i){this.error=i}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var R2=of;of.default=of;let O2=Xf,A2=Py,$2=R2,F2=ws,fs=class{constructor(n=[]){this.version="8.4.47",this.plugins=this.normalize(n)}normalize(n){let i=[];for(let a of n)if(a.postcss===!0?a=a():a.postcss&&(a=a.postcss),typeof a=="object"&&Array.isArray(a.plugins))i=i.concat(a.plugins);else if(typeof a=="object"&&a.postcssPlugin)i.push(a);else if(typeof a=="function")i.push(a);else if(!(typeof a=="object"&&(a.parse||a.stringify)))throw new Error(a+" is not a PostCSS plugin");return i}process(n,i={}){return!this.plugins.length&&!i.parser&&!i.stringifier&&!i.syntax?new $2(this,n,i):new A2(this,n,i)}use(n){return this.plugins=this.plugins.concat(this.normalize([n])),this}};var z2=fs;fs.default=fs;F2.registerProcessor(fs);O2.registerProcessor(fs);let Iy=Yf,Ly=Cc,B2=oa,U2=Qf,Dy=bc,Ry=Xf,H2=Wj,q2=Sc,V2=Py,W2=_y,G2=_c,Z2=th,rh=z2,Q2=nh,Oy=ws,Ay=eh,J2=wc,K2=jy;function Kt(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new rh(e)}Kt.plugin=function(e,n){let i=!1;function a(...c){console&&console.warn&&!i&&(i=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide: -https://evilmartians.com/chronicles/postcss-8-plugin-migration`),Tg.LANG&&Tg.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南: -https://www.w3ctech.com/topic/2226`));let f=n(...c);return f.postcssPlugin=e,f.postcssVersion=new rh().version,f}let s;return Object.defineProperty(a,"postcss",{get(){return s||(s=a()),s}}),a.process=function(c,f,d){return Kt([a(d)]).process(c,f)},a};Kt.stringify=J2;Kt.parse=Z2;Kt.fromJSON=H2;Kt.list=W2;Kt.comment=e=>new Ly(e);Kt.atRule=e=>new Iy(e);Kt.decl=e=>new Dy(e);Kt.rule=e=>new Ay(e);Kt.root=e=>new Oy(e);Kt.document=e=>new Ry(e);Kt.CssSyntaxError=U2;Kt.Declaration=Dy;Kt.Container=B2;Kt.Processor=rh;Kt.Document=Ry;Kt.Comment=Ly;Kt.Warning=K2;Kt.AtRule=Iy;Kt.Result=Q2;Kt.Input=q2;Kt.Rule=Ay;Kt.Root=Oy;Kt.Node=G2;V2.registerPostcss(Kt);var Y2=Kt;Kt.default=Kt;const{isPlainObject:X4}=Gf,{parse:eL}=Y2,X2="_info-popup_i3rna_1",eT="_label_i3rna_2",tT="_icon_i3rna_7",nT="_dropdown-container_i3rna_15",rT="_content_i3rna_20",Uo={infoPopup:X2,label:eT,icon:tT,dropdownContainer:nT,content:rT};function iT(e){const{className:n,icon:i=u.jsx(gC,{}),infoLabel:a,title:s,description:c,withoutIcon:f,popupClassName:d,descriptionClassName:g}=e;return u.jsx(ak,{label:u.jsxs("div",{className:Uo.label,children:[a,!f&&i&&u.jsx("div",{className:Uo.icon,children:i})]}),popupClassName:be(Uo.dropdownContainer,d),className:be(Uo.infoPopup,n),variant:"tertiary",withoutDropdownIcon:!0,children:u.jsx(Qe,{heading:s,childrenContainerClassName:be(g,Uo.content),withInternalPadding:!0,children:c})})}const aT="_progress-wrapper_x340w_1",oT="_title_x340w_7",sT="_total_x340w_11",lT="_progress_x340w_1",Ho={progressWrapper:aT,title:oT,total:sT,progress:lT};function e0(e){const{className:n,title:i,description:a,totalValue:s,value:c,showPercentageInTitle:f,children:d,color:g="var(--go-ui-color-primary-red)"}=e,y=Jt(c)?c:0,w=Jt(s)?s:0;let _;return w===0?_=0:_=y/w*100,u.jsxs("div",{className:be(Ho.progressWrapper,n),children:[(i||f)&&u.jsxs("div",{className:Ho.title,children:[i,f&&u.jsx(_f,{value:_,suffix:"%"})]}),u.jsx("div",{className:Ho.total,children:u.jsx("div",{className:Ho.progress,style:{width:`${_}%`,backgroundColor:g}})}),a&&u.jsx("div",{className:Ho.description,children:a}),d]})}const cT="_legend-element_1a9ic_1",uT="_color_1a9ic_7",dT="_icon-container_1a9ic_14",fT="_icon_1a9ic_14",hT="_label_1a9ic_31",qo={legendElement:cT,color:uT,iconContainer:dT,icon:fT,label:hT};function pT(e){const{className:n,colorClassName:i,iconClassName:a,color:s,label:c,iconSrc:f}=e;return u.jsxs("div",{className:be(qo.legendElement,n),children:[f?u.jsx("div",{style:{backgroundColor:s},className:qo.iconContainer,children:u.jsx("img",{className:be(qo.icon,a),src:f,alt:""})}):u.jsx("div",{style:{backgroundColor:s},className:be(qo.color,i)}),u.jsx("div",{className:qo.label,children:c})]})}const mT="_list_1whuj_1",gT="_compact_1whuj_5",vT="_pending_1whuj_8",Td={list:mT,compact:gT,pending:vT};function yT(e){const{className:n,data:i,keySelector:a,renderer:s,rendererParams:c,pending:f,errored:d,filtered:g,errorMessage:y,emptyMessage:w,pendingMessage:_,filteredEmptyMessage:v,compact:x,withoutMessage:S=!1,messageClassName:b}=e,j=Ke(i)||i.length===0;return u.jsxs("div",{className:be(Td.list,x&&Td.compact,f&&Td.pending,n),children:[u.jsx(H0,{data:i,keySelector:a,renderer:s,rendererParams:c}),!S&&u.jsx(xf,{className:b,pending:f,filtered:g,empty:j,errored:d,compact:x,emptyMessage:w,filteredEmptyMessage:v,pendingMessage:_,errorMessage:y,overlayPending:!0})]})}function $y(e,n){if(Ke(e))return;const i={},a=[];return e.forEach(s=>{const c=n?n(s):JSON.stringify(s);i[c]||(i[c]=!0,a.push(s))}),e.length===a.length?e:a}const xT=[40,38,13,8];function wT(e,n,i){return n.findIndex((a,s)=>i(a,s)===e)}function t0(e,n,i,a){if(i.length<=0)return;let s=wT(e,i,a);s===-1&&(s=n>0?-1:0);const c=L_(s+n,i.length);return a(i[c],c)}function _T(e,n,i,a,s,c,f,d,g){return p.useCallback(y=>{const{keyCode:w}=y,_=e?.key;if(a&&(w===9||w===27))c();else if(!a&&xT.includes(w))y.stopPropagation(),y.preventDefault(),f();else if(w===13)if(Jt(_)){y.stopPropagation(),y.preventDefault();const v=i.find((x,S)=>n(x,S)===_);v&&d(_,v)}else y.stopPropagation(),y.preventDefault(),g&&g();else if(w===40){y.stopPropagation(),y.preventDefault();const v=t0(_,1,i,n);s(v?{key:v}:void 0)}else if(w===38){y.stopPropagation(),y.preventDefault();const v=t0(_,-1,i,n);s(v?{key:v}:void 0)}},[e,a,n,s,c,d,f,g,i])}const CT="_generic-option_zv1n8_1",bT={genericOption:CT};function ST(e){const{optionContainerClassName:n,contentRenderer:i,contentRendererParam:a,option:s,onClick:c,optionKey:f,focusedKey:d}=e,g=a(f,s),{containerClassName:y,title:w,..._}=g,v=d?.key===f,x=p.useRef(null);p.useEffect(()=>{d&&d.key===f&&!d.mouse&&x.current&&x.current.scrollIntoView({behavior:"smooth",block:"center"})},[f,d]);const S=p.useCallback(()=>{c(f,s)},[f,s,c]);return u.jsx(vf,{elementRef:x,className:be(bT.genericOption,n,y),onClick:S,title:w,name:f,focused:v,children:i(_)})}const NT="common",ET={infoMessageAnd:"and",infoMessageMore:"more",buttonTitleSelect:"Select all",buttonTitleClear:"Clear",buttonTitleClose:"Close",buttonTitleOpen:"Open",selectInputPendingMessage:"Fetching options...",selectInputEmptyMessage:"No option available",selectInputFilteredMessage:"No option available for the search",selectInputErrorMessage:"Could not load options"},kT={namespace:NT,strings:ET},jT="_popup_poyjv_1",TT="_list_poyjv_4",MT="_list-item_poyjv_9",PT="_info-message_poyjv_14",IT="_icon_poyjv_21",Ei={popup:jT,list:TT,listItem:MT,infoMessage:PT,icon:IT},LT=[];function Fy(e){const{actions:n,actionsContainerClassName:i,className:a,disabled:s,error:c,errorContainerClassName:f,hint:d,hintContainerClassName:g,icons:y,iconsContainerClassName:w,inputSectionClassName:_,label:v,labelClassName:x,name:S,onOptionClick:b,searchText:j,onSearchTextChange:N,optionContainerClassName:I,optionKeySelector:F,optionRenderer:O,optionRendererParams:Z,options:ye,optionsPopupClassName:D,persistentOptionPopup:re,readOnly:le,placeholder:oe,valueDisplay:R="",nonClearable:U,onClearButtonClick:J,onSelectAllButtonClick:Y,optionsPending:xe=!1,optionsFiltered:Ne=!1,optionsErrored:ne=!1,focused:X,focusedKey:se,onFocusedKeyChange:E,onFocusedChange:V,dropdownShown:fe,onDropdownShownChange:De,totalOptionsCount:ce=0,hasValue:ve,autoFocus:we,onEnterWithoutOption:je,withAsterisk:Re,required:Pe,variant:H,errorOnTooltip:Te,dropdownHidden:Ye}=e,Je=ye??LT,jt=fc(kT),gt=p.useRef(null),Tt=p.useRef(null),ht=p.useRef(null),z=p.useRef(null),Oe=p.useCallback(pt=>{fe||De(!0),N(pt)},[fe,De,N]),lt=p.useCallback((pt,Mt)=>{Mt.stopPropagation(),De(!fe)},[fe,De]),M=p.useCallback(()=>{fe||De(!0)},[fe,De]),ie=p.useCallback(()=>{De(!1)},[De]),te=p.useCallback(()=>{le||M()},[le,M]),K=p.useCallback((pt,Mt)=>{pt||Mt?re&&ht.current&&ht.current.focus():ie()},[ie,re]),he=p.useCallback((pt,Mt)=>{b(pt,Mt,S),re||ie()},[b,ie,re,S]),Ee=p.useCallback((pt,Mt)=>({contentRendererParam:Z,option:Mt,optionKey:pt,focusedKey:se,contentRenderer:O,onClick:he,onFocus:E,optionContainerClassName:be(I,Ei.listItem)}),[se,he,E,I,O,Z]);Tv(fe,K,z,gt);const Zt=_T(se,F,Je,fe,E,ie,M,he,je),Ze=Je.length,vt=ce-Ze>0?`${jt.infoMessageAnd} ${ce-Ze} ${jt.infoMessageMore}`:void 0,ue=fe&&!Ye;return u.jsxs(u.Fragment,{children:[u.jsx(Ff,{actionsContainerClassName:i,className:a,containerRef:gt,disabled:s,errorContainerClassName:f,error:c,errorOnTooltip:Te,hintContainerClassName:g,hint:d,iconsContainerClassName:w,icons:y,inputSectionClassName:_,inputSectionRef:Tt,labelClassName:x,label:v,readOnly:le,required:Pe,variant:H,withAsterisk:Re,actions:u.jsxs(u.Fragment,{children:[n,!le&&Y&&u.jsx(Me,{onClick:Y,disabled:s,variant:"tertiary",name:void 0,title:jt.buttonTitleSelect,children:u.jsx(uC,{className:Ei.icon})}),!le&&!U&&ve&&u.jsx(Me,{onClick:J,disabled:s,variant:"tertiary",name:void 0,title:jt.buttonTitleClear,children:u.jsx(pC,{className:Ei.icon})}),!le&&u.jsx(Me,{onClick:lt,variant:"tertiary",name:void 0,title:ue?jt.buttonTitleClose:jt.buttonTitleOpen,children:ue?u.jsx(A0,{className:Ei.icon}):u.jsx(O0,{className:Ei.icon})})]}),input:u.jsx(jv,{name:S,elementRef:ht,readOnly:le,disabled:s,value:fe||X?j:R,onChange:Oe,onClick:te,onFocus:()=>V(!0),onBlur:()=>V(!1),placeholder:ps(R)?R:oe,autoComplete:"off",onKeyDown:Zt,autoFocus:we})}),ue&&u.jsxs(hc,{elementRef:z,parentRef:Tt,className:be(D,Ei.popup),children:[u.jsx(yT,{className:Ei.list,data:Je,keySelector:F,renderer:ST,rendererParams:Ee,errored:ne,filtered:Ne,pending:xe,pendingMessage:jt.selectInputPendingMessage,emptyMessage:jt.selectInputEmptyMessage,filteredEmptyMessage:jt.selectInputFilteredMessage,errorMessage:jt.selectInputErrorMessage,compact:!0}),!xe&&!ne&&!!vt&&u.jsx("div",{className:Ei.infoMessage,children:vt})]})]})}function DT(e){const{children:n,isActive:i,iconClassName:a,labelClassName:s}=e;return u.jsxs(u.Fragment,{children:[u.jsx("div",{className:a,children:i?u.jsx(F0,{}):u.jsx($0,{})}),u.jsx("div",{className:s,children:n})]})}const RT="_option_1kpl9_1",OT="_active_1kpl9_7",AT="_icon_1kpl9_11",$T="_label_1kpl9_17",Vo={option:RT,active:OT,icon:AT,label:$T},Md=[];function FT(e){const{keySelector:n,labelSelector:i,name:a,onChange:s,onOptionsChange:c,options:f,optionsPending:d,optionsErrored:g,value:y,sortFunction:w,searchOptions:_,onSearchValueChange:v,onShowDropdownChange:x,hideOptionFilter:S,selectedOnTop:b,...j}=e,N=f??Md,I=_??Md,F=y??Md,[O,Z]=p.useState(),[ye,D]=p.useState(!1),[re,le]=p.useState(!1),[oe,R]=p.useState(),[U,J]=p.useState({}),Y=p.useMemo(()=>Fa(N,n,ce=>ce),[N,n]),xe=p.useMemo(()=>Fa(N,n,i),[N,n,i]),Ne=p.useMemo(()=>F.map(ce=>xe[ce]??"?").join(", "),[F,xe]),ne=p.useMemo(()=>F.map(ce=>Y[ce]).filter(Jt),[F,Y]),X=p.useMemo(()=>{const ce=$y([...I,...ne],n);if(!b)return w?w(ce,O,i):ce;const ve=ce.filter(je=>U[n(je)]),we=ce.filter(je=>!U[n(je)]&&(Ke(S)||S(je)));return w?[...ta(ve,O,i),...w(we,O,i)]:[...ta(ve,O,i),...we]},[b,n,i,O,I,U,ne,w,S]),se=p.useCallback(ce=>{Z(ce),v&&v(ce)},[v]),E=p.useCallback(ce=>{D(ce),x&&x(ce),ce?(J(Fa(F,ve=>ve,()=>!0)),R(void 0)):(J({}),R(void 0),Z(void 0),v&&v(void 0))},[F,v,x]),V=p.useCallback((ce,ve)=>{const we=F.findIndex(je=>je===ce)!==-1;return{children:i(ve),containerClassName:be(Vo.option,we&&Vo.active),title:i(ve),isActive:we,labelClassName:Vo.label,iconClassName:Vo.icon}},[i,F]),fe=p.useCallback((ce,ve)=>{const we=[...F],je=F.findIndex(Re=>Re===ce);je!==-1?we.splice(je,1):(we.push(ce),c&&c(Re=>{const Pe=Re??[];return Pe.find(H=>n(H)===ce)?Re:[...Pe,ve]})),s(we,a)},[F,s,a,c,n]),De=p.useCallback(()=>{s([],a)},[a,s]);return u.jsx(Fy,{...j,name:a,options:X,optionsPending:d,optionsFiltered:ps(O)&&O.length>0,optionsErrored:g,optionKeySelector:n,optionRenderer:DT,optionRendererParams:V,optionContainerClassName:Vo.optionContainer,onOptionClick:fe,valueDisplay:Ne,onClearButtonClick:De,searchText:O,onSearchTextChange:se,dropdownShown:ye,onDropdownShownChange:E,focused:re,onFocusedChange:le,focusedKey:oe,onFocusedKeyChange:R,persistentOptionPopup:!0,nonClearable:!1,hasValue:Jt(F)&&F.length>0})}function ih(e){const{name:n,options:i,keySelector:a,onChange:s,withSelectAll:c,...f}=e,d=p.useCallback(()=>{if(Ke(i))return;const g=i.map(a);s(g,n)},[i,n,s,a]);return u.jsx(FT,{...f,name:n,onChange:s,options:i,keySelector:a,sortFunction:ta,searchOptions:i,onSelectAllButtonClick:c?d:void 0,selectedOnTop:!1})}const zT="_page-container_1cfro_1",BT="_content_1cfro_2",n0={pageContainer:zT,content:BT};function cr(e){const{className:n,contentClassName:i,children:a,contentAs:s="div",containerAs:c="div"}=e,f=s;return u.jsx(c,{className:be(n0.pageContainer,n),children:u.jsx(f,{className:be(n0.content,i),children:a})})}const UT="_text-output_10oza_1",HT="_with-background_10oza_6",qT="_label_10oza_11",VT="_with-colon_10oza_12",WT="_value_10oza_17",GT="_text-type_10oza_18",ZT="_strong_10oza_24",Dr={textOutput:UT,withBackground:HT,label:qT,withColon:VT,value:WT,textType:GT,strong:ZT};function r0(e){const{className:n,label:i,icon:a,description:s,labelClassName:c,descriptionClassName:f,valueClassName:d,strongLabel:g,strongValue:y,strongDescription:w,withoutLabelColon:_,withBackground:v,invalidText:x=B0,...S}=e,{value:b}=e;let j=x;return S.valueType==="number"?j=u.jsx(_f,{...S,invalidText:x}):S.valueType==="date"?j=u.jsx(YE,{...S,invalidText:x}):S.valueType==="boolean"?j=u.jsx(_S,{...S,invalidText:x}):b instanceof Date||(j=b||x),u.jsxs("div",{className:be(Dr.textOutput,v&&Dr.withBackground,n),children:[a,i&&u.jsx("div",{className:be(Dr.label,g&&Dr.strong,c,!_&&Dr.withColon),children:i}),u.jsx("div",{className:be(Dr.value,y&&Dr.strong,S.valueType==="text"&&Dr.textType,d),children:j}),s&&u.jsx("div",{className:be(Dr.description,w&&Dr.strong,f),children:s})]})}const QT="_pie-chart_pyr7m_1",JT="_legend_pyr7m_7",KT="_legend-item_pyr7m_13",Wo={pieChart:QT,legend:JT,legendItem:KT},YT=70,XT=40;function i0(e,n=1){return Math.round(e*10**n)/10**n}function a0(e,n){const i=(n-90)*Math.PI/180;return{x:i0(e+e*Math.cos(i)),y:i0(e+e*Math.sin(i))}}function eM(e,n,i){let a=i;const s=a-n===360;s&&(a-=1);const c=a0(e,n),f=a0(e,a),d=a-n<=180?0:1,g=["M",c.x,c.y,"A",e,e,0,d,1,f.x,f.y];return s?g.push("Z"):g.push("L",e,e,"L",c.x,c.y,"Z"),g.join(" ")}function Go(e){const{className:n,data:i,valueSelector:a,labelSelector:s,keySelector:c,colorSelector:f,colors:d,pieRadius:g=YT,chartPadding:y=XT,legendClassName:w,showPercentageInLegend:_}=e,v=Lb(i?.map(b=>a(b))),x=Ke(v)||v===0?1:v,S=p.useMemo(()=>{let b=0;const j=i?.map(N=>{const I=a(N);if(Ke(I))return;const F=360*(I/x);return b+=F,{key:c(N),value:I,label:s(N),startAngle:b-F,percentage:Pb(I,x),endAngle:b,datum:N}}).filter(Jt)??[];return f?j.map(({datum:N,...I})=>({...I,color:f(N)})):j.map(({datum:N,...I},F)=>({...I,color:d[F%d.length]}))},[i,c,a,s,x,f,d]);return u.jsxs("div",{className:be(Wo.pieChart,n),children:[u.jsx("svg",{className:Wo.svg,style:{width:`${y+g*2}px`,height:`${y+g*2}px`},children:u.jsx("g",{style:{transform:`translate(${y/2}px, ${y/2}px)`},children:S.map(b=>u.jsx("path",{className:Wo.path,d:eM(g,b.startAngle,b.endAngle),fill:b.color,children:u.jsx(Qb,{description:u.jsx(r0,{label:b.label,value:b.value})})},b.key))})}),u.jsx("div",{className:be(Wo.legend,w),children:S.map(b=>u.jsx(pT,{className:Wo.legendItem,label:_?u.jsx(r0,{label:b.label,value:b.percentage,valueType:"number",prefix:"(",suffix:"%)",withoutLabelColon:!0}):b.label,color:b.color},b.key))})]})}const tM="_raw-input_145mq_1",nM={rawInput:tM};function rM(e){const{className:n,onChange:i,elementRef:a,value:s,name:c,...f}=e,d=$n.useCallback(g=>{var y;const w=(y=g?.target)==null?void 0:y.value;i&&i(w===""?void 0:w,c,g)},[c,i]);return u.jsx("textarea",{...f,ref:a,className:be(nM.rawInput,n),name:Jt(c)?String(c):void 0,onChange:d,value:s??""})}const iM="_option_11p37_1",aM="_icon_11p37_6",oM="_label_11p37_14",sM="_overflow-container_11p37_20",lM="_description_11p37_25",Oa={option:iM,icon:aM,label:oM,overflowContainer:sM,description:lM};function cM(e){const{className:n,label:i,description:a,iconClassName:s,labelClassName:c}=e;return u.jsxs("div",{className:be(Oa.option,n),children:[u.jsx("div",{className:be(Oa.icon,s),children:u.jsx(dC,{})}),u.jsxs("div",{className:be(Oa.label,c),children:[u.jsx("div",{className:Oa.overflowContainer,children:i}),u.jsx("div",{className:be(Oa.overflowContainer,Oa.description),children:a})]})]})}const uM="_option-container_2k92q_1",dM="_option_2k92q_1",fM="_active_2k92q_9",hM="_icon_2k92q_12",Zo={optionContainer:uM,option:dM,active:fM,icon:hM},o0=[];function s0(e){const{keySelector:n,labelSelector:i,descriptionSelector:a,name:s,onChange:c,onOptionsChange:f,options:d,optionsPending:g,optionsErrored:y,value:w,sortFunction:_,searchOptions:v,onSearchValueChange:x,onShowDropdownChange:S,hideOptionFilter:b,selectedOnTop:j,onEnterWithoutOption:N,...I}=e,F=d??o0,O=v??o0,[Z,ye]=p.useState(),[D,re]=p.useState(!1),[le,oe]=p.useState(!1),[R,U]=p.useState(),[J,Y]=p.useState({}),xe=p.useMemo(()=>Fa(F,n,i),[F,n,i]),Ne=Jt(w)?xe[w]??"?":"",ne=p.useMemo(()=>{const ve=F?.find(we=>n(we)===w);return Ke(ve)?[]:[ve]},[w,F,n]),X=p.useMemo(()=>{const ve=$y([...O,...ne],n);if(!j)return _?_(ve,Z,i):ve;const we=ve.filter(Re=>J[n(Re)]),je=ve.filter(Re=>!J[n(Re)]&&(Ke(b)||b(Re)));return _?[...ta(we,Z,i),..._(je,Z,i)]:[...ta(we,Z,i),...je]},[j,n,i,Z,O,J,ne,_,b]),se=p.useCallback(ve=>{ye(ve),x&&x(ve)},[x]),E=p.useCallback(()=>{re(!1),S&&S(!1),ye(void 0),x&&x(void 0),N&&N(Z)},[Z,S,N,x]),V=p.useCallback(ve=>{re(ve),S&&S(ve),ve?(Y(Fa(w?[w]:[],we=>we,()=>!0)),U(w?{key:w}:void 0)):(Y({}),U(void 0),ye(void 0),x&&x(void 0))},[w,x,S]),fe=p.useCallback((ve,we)=>{const je=ve===w;return{label:i(we),description:a?a(we):void 0,containerClassName:be(Zo.optionContainer,je&&Zo.active),title:i(we),className:Zo.option,iconClassName:Zo.icon}},[w,i,a]),De=p.useCallback((ve,we)=>{f&&f(je=>{const Re=je??[];return Re.find(Pe=>n(Pe)===ve)?je:[...Re,we]}),c(ve,s,we)},[c,s,f,n]),ce=p.useCallback(()=>{if(!e.nonClearable){const ve=e.onChange;ve(void 0,s,void 0)}},[s,e.onChange,e.nonClearable]);return u.jsx(Fy,{...I,name:s,options:X,optionsPending:g,optionsErrored:y,optionsFiltered:ps(Z)&&Z.length>0,optionKeySelector:n,optionRenderer:cM,optionRendererParams:fe,optionContainerClassName:Zo.optionContainer,onOptionClick:De,valueDisplay:Ne,onClearButtonClick:ce,searchText:Z,onSearchTextChange:se,dropdownShown:D,onDropdownShownChange:V,focused:le,onFocusedChange:oe,focusedKey:R,onFocusedKeyChange:U,hasValue:Jt(w),persistentOptionPopup:!1,onEnterWithoutOption:E})}const pM="_segment-input_bykt7_1",mM="_segment-list_bykt7_4",gM="_segment_bykt7_1",vM="_active_bykt7_18",yM="_secondary-variant_bykt7_24",Xo={segmentInput:pM,segmentList:mM,segment:gM,active:vM,secondaryVariant:yM};function xM(e){const{label:n,name:i,onClick:a,value:s,className:c,variant:f="primary",inputName:d,...g}=e;return u.jsx(Me,{...g,className:be(Xo.segment,s&&Xo.active,f==="secondary"&&Xo.secondaryVariant,c),name:i,onClick:a,variant:"tertiary",children:n})}function Za(e){const{rendererParams:n,listContainerClassName:i,keySelector:a,labelSelector:s,className:c,...f}=e;return u.jsx(mS,{className:be(c,Xo.segmentInput),...f,renderer:xM,rendererParams:n,listContainerClassName:be(i,Xo.segmentList),keySelector:a,labelSelector:s})}function Un(e){const{name:n,options:i,nonClearable:a,onChange:s,...c}=e;return e.nonClearable?u.jsx(s0,{...c,onChange:e.onChange,nonClearable:e.nonClearable,name:n,options:i,sortFunction:ta,searchOptions:i,selectedOnTop:!1}):u.jsx(s0,{...c,onChange:e.onChange,nonClearable:e.nonClearable,name:n,options:i,sortFunction:ta,searchOptions:i,selectedOnTop:!1})}const wM="_td_1k4cn_1",_M={td:wM};function CM(e){const{className:n,children:i,...a}=e;return u.jsx("td",{className:be(n,_M.td),...a,children:i})}function zy(e){const{className:n,children:i,...a}=e;return u.jsx("tr",{className:n,...a,children:i})}const bM="_row_1829z_1",SM="_cell_1829z_2",l0={row:bM,cell:SM};function NM(e){const{data:n,keySelector:i,columns:a,rowClassName:s,cellClassName:c,rowModifier:f}=e;return u.jsx(u.Fragment,{children:n?.map((d,g)=>{const y=i(d,g),w=a.map(x=>{const{id:S,cellRenderer:b,cellRendererClassName:j,cellRendererParams:N,cellContainerClassName:I}=x,F=N(y,d,g,n),O=u.jsx(b,{className:j,...F,name:S});return u.jsx(CM,{className:be(l0.cell,I,typeof c=="function"?c(y,d,S):c),children:O},S)}),_=u.jsx(zy,{className:be(l0.row,typeof s=="function"?s(y,d):s),children:w});let v=_;return f&&(v=f({rowKey:y,row:_,cells:w,columns:a,datum:d})),u.jsx(p.Fragment,{children:v},y)})})}const EM="_th_cdv41_1",kM="_resize-handle_cdv41_8",c0={th:EM,resizeHandle:kM};function jM(e){const{className:n,children:i,onResize:a,onResizeComplete:s,name:c,...f}=e,d=p.useRef(null),g=p.useRef(),y=p.useRef(),w=p.useRef(),_=p.useCallback(x=>{var S;if(Jt(g.current)&&d.current&&a){x.preventDefault(),x.stopPropagation();const b=x.clientX-g.current;if(Jt(y.current)){const j=y.current+b;w.current=j,a(j,c)}else y.current=(S=d.current)==null?void 0:S.offsetWidth}},[a,c]),v=p.useCallback(x=>{var S;x.preventDefault(),g.current=x.clientX,y.current=(S=d.current)==null?void 0:S.offsetWidth,window.addEventListener("mousemove",_,!0)},[_]);return p.useEffect(()=>{const x=()=>{g.current=void 0,y.current=void 0,s&&Jt(w.current)&&s(w.current,c),window.removeEventListener("mousemove",_,!0)};return window.addEventListener("mouseup",x,!0),()=>{window.removeEventListener("mouseup",x,!0),window.removeEventListener("mousemove",_,!0)}},[_,c,s]),u.jsxs("th",{ref:d,className:be(n,c0.th),...f,children:[a&&u.jsx("div",{role:"presentation",className:c0.resizeHandle,onMouseDown:v}),i]})}const TM="_table_nilhy_1",MM="_table-overflow-wrapper_nilhy_8",PM="_table-element_nilhy_13",IM="_header-row_nilhy_23",LM="_header-element_nilhy_24",DM="_header-component_nilhy_29",Vi={table:TM,tableOverflowWrapper:MM,tableElement:PM,headerRow:IM,headerElement:LM,headerComponent:DM};function RM(e,n){return n??e.columnWidth??bb}function Mn(e){const{data:n,keySelector:i,columns:a,caption:s,className:c,captionClassName:f,headerRowClassName:d,headerCellClassName:g,rowClassName:y,cellClassName:w,rowModifier:_,fixedColumnWidth:v,resizableColumn:x,headersHidden:S,pending:b,filtered:j,errored:N=!1}=e,I=p.useRef(null),[F]=$n.useState(()=>D0()),[O,Z]=$n.useState({});p.useEffect(()=>{Z(oe=>{if(Ke(I.current))return oe;const R=I.current.getBoundingClientRect(),{width:U}=R;let J=a.map(ne=>({id:ne.id,stretch:!!ne.columnStretch,width:RM(ne,oe[ne.id])}));const Y=Jo(J.filter(ne=>ne.stretch).map(ne=>ne.width)),xe=Jo(J.filter(ne=>!ne.stretch).map(ne=>ne.width)),Ne=(U-xe)/Y;return Ne>1&&(J=J.map(ne=>({...ne,width:ne.stretch?ne.width*Ne:ne.width}))),Fa(J,ne=>ne.id,ne=>ne.width)})},[a]);const ye=$n.useCallback((oe,R)=>{const U=document.getElementById(`${F}-${R}`),J=Math.max(oe,80);if(Ke(U)||(U.style.width=`${J}px`,!v))return;const Y=document.getElementById(F);if(Ke(Y))return;const xe=Jo(a.map(Ne=>Ne.id===R?J:O[Ne.id]));Y.style.width=`${xe}px`},[F,O,a,v]),D=$n.useCallback((oe,R)=>{Jt(R)&&Z(U=>({...U,[R]:Math.max(oe,80)}))},[Z]),re=$n.useMemo(()=>Jo(a.map(oe=>O[oe.id])),[O,a]),le=Ke(n)||n.length===0||Object.keys(O).length===0;return u.jsxs("div",{ref:I,className:be(Vi.table,c),children:[!le&&u.jsx("div",{className:Vi.tableOverflowWrapper,children:u.jsxs("table",{className:Vi.tableElement,style:v?{width:`${re}px`}:void 0,id:F,children:[s&&u.jsx("caption",{className:f,children:s}),u.jsx("colgroup",{children:a.map(oe=>{const{id:R,columnClassName:U}=oe,J=O[R],Y=v?{width:`${J}px`}:void 0;return u.jsx("col",{id:`${F}-${R}`,style:Y,className:be(Vi.column,U)},R)})}),!S&&u.jsx("thead",{children:u.jsx(zy,{className:be(Vi.headerRow,d),children:a.map((oe,R)=>{const{id:U,title:J,headerCellRenderer:Y,headerCellRendererClassName:xe,headerCellRendererParams:Ne,headerContainerClassName:ne}=oe,X=u.jsx(Y,{...Ne,name:U,title:J,index:R,className:be(xe,Vi.headerComponent)});return u.jsx(jM,{scope:"col",name:U,onResize:x?ye:void 0,onResizeComplete:x?D:void 0,className:be(Vi.headerElement,typeof g=="function"?g(U):g,ne),children:X},U)})})}),u.jsx("tbody",{children:u.jsx(NM,{data:n,keySelector:i,columns:a,rowClassName:y,cellClassName:w,rowModifier:_})})]})}),u.jsx(xf,{filtered:j,empty:le,errored:N,pending:b,overlayPending:!0})]})}function OM(e){const{className:n,value:i}=e;return Ke(i)?null:u.jsx("div",{className:n,children:i})}const AM="common",$M={sortTableButtonTitle:"Sort Table"},FM={namespace:AM,strings:$M},zM="_header-cell_vn24d_1",BM="_sort-button_vn24d_8",UM="_icon_vn24d_12",HM="_info-popup-icon_vn24d_17",Wi={headerCell:zM,sortButton:BM,icon:UM,infoPopupIcon:HM};function By(e){const{className:n,titleClassName:i,title:a,name:s,sortable:c,defaultSortDirection:f="asc",infoTitle:d,infoDescription:g}=e,{sorting:y,setSorting:w}=p.useContext(b_),_=fc(FM),v=y?.name===s?y.direction:void 0,x=p.useRef(null),S=p.useCallback(()=>{if(Ke(w))return;let b;Ke(v)?b=f:v==="asc"?b="dsc":v==="dsc"&&(b="asc"),w(b?{name:s,direction:b}:void 0)},[s,w,v,f]);return u.jsxs("div",{ref:x,className:be(n,Wi.headerCell),children:[c&&u.jsxs(Me,{name:void 0,variant:"tertiary",onClick:S,title:_.sortTableButtonTitle,className:Wi.sortButton,children:[Ke(v)&&u.jsx(_C,{className:Wi.icon}),v==="asc"&&u.jsx(lC,{className:Wi.icon}),v==="dsc"&&u.jsx(sC,{className:Wi.icon})]}),u.jsx("div",{className:be(i,Wi.title),children:a}),d&&g&&u.jsx(iT,{className:Wi.infoPopupIcon,title:d,description:g})]})}p.createContext({tabs:[],step:0,disabled:!1,activeTab:"",variant:"primary",setActiveTab:()=>{console.warn("setActiveTab called before it was initialized")},registerTab:()=>{console.warn("registerTab called before it was initialized")},unregisterTab:()=>{console.warn("unregisterTab called before it was initialized")}});const u0="•",qM="Enter";function VM(e){const{actions:n,className:i,disabled:a,error:s,errorOnTooltip:c,hint:f,icons:d,inputClassName:g,label:y,labelClassName:w,readOnly:_,required:v,variant:x,inputSectionClassName:S,withAsterisk:b,onChange:j,name:N,autoBullets:I=!1,rows:F=5,...O}=e,Z=$n.useCallback(D=>{Ke(j)||D.target.value===""&&j(`${u0} `,N)},[j,N]),ye=$n.useCallback(D=>{Ke(j)||D.key===qM&&j(`${D.currentTarget.value}${u0} `,N)},[j,N]);return u.jsx(Ff,{actions:n,className:i,disabled:a,error:s,errorOnTooltip:c,hint:f,icons:d,inputSectionClassName:S,labelClassName:w,label:y,readOnly:_,required:v,variant:x,withAsterisk:b,input:u.jsx(rM,{...O,readOnly:_,disabled:a,className:g,onChange:j,name:N,onFocus:I?Z:void 0,onKeyUp:I?ye:void 0,rows:F})})}function gn(e){const{actions:n,className:i,disabled:a,error:s,errorOnTooltip:c,hint:f,icons:d,inputClassName:g,inputSectionClassName:y,label:w,readOnly:_,required:v,variant:x,withAsterisk:S,type:b="text",...j}=e;return u.jsx(Ff,{className:i,actions:n,disabled:a,error:s,errorOnTooltip:c,hint:f,icons:d,inputSectionClassName:y,label:w,required:v,readOnly:_,variant:x,withAsterisk:S,input:u.jsx(jv,{...j,required:v,readOnly:_,disabled:a,className:g,type:b})})}const Uy=p.createContext(void 0),ah=()=>{const e=p.useContext(Uy);if(e===void 0)throw new Error("useAdmin must be used within an AdminProvider");return e},WM=({children:e})=>{const[n,i]=p.useState(!1),[a,s]=p.useState(!0),c=async()=>{const y=localStorage.getItem("adminToken");if(!y){i(!1),s(!1);return}try{(await fetch("/api/admin/verify",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${y}`}})).ok?i(!0):(localStorage.removeItem("adminToken"),i(!1))}catch(w){console.error("Error verifying admin token:",w),localStorage.removeItem("adminToken"),i(!1)}finally{s(!1)}},f=async y=>{try{const w=await fetch("/api/admin/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:y})});if(w.ok){const _=await w.json();return localStorage.setItem("adminToken",_.access_token),i(!0),!0}else return!1}catch(w){return console.error("Login error:",w),!1}},d=()=>{localStorage.removeItem("adminToken"),i(!1)};p.useEffect(()=>{c()},[]);const g={isAuthenticated:n,isLoading:a,login:f,logout:d,verifyToken:c};return u.jsx(Uy.Provider,{value:g,children:e})},GM=[{to:"/upload",label:"Upload",Icon:z0},{to:"/explore",label:"Explore",Icon:xC},{to:"/analytics",label:"Analytics",Icon:R0}];function ZM(){const e=Ja(),n=aa();return ah(),u.jsx("nav",{className:"border-b border-gray-200 bg-white shadow-sm sticky top-0 z-50 backdrop-blur-sm bg-white/95",children:u.jsxs(cr,{className:"border-b-2 border-ifrcRed",contentClassName:"flex items-center justify-between py-6",children:[u.jsxs("div",{className:"flex items-center gap-4 min-w-0 cursor-pointer group transition-all duration-200 hover:scale-105",onClick:()=>{if(!(e.pathname==="/upload"||e.pathname==="/")){if(e.pathname==="/upload"){if(window.confirmNavigationIfNeeded){window.confirmNavigationIfNeeded("/");return}if(!confirm("You have unsaved changes. Are you sure you want to leave?"))return}n("/")}},children:[u.jsx("div",{className:"p-2 rounded-lg bg-gradient-to-br from-ifrcRed/10 to-ifrcRed/20 group-hover:from-ifrcRed/20 group-hover:to-ifrcRed/30 transition-all duration-200",children:u.jsx(mC,{className:"h-8 w-8 flex-shrink-0 text-ifrcRed"})}),u.jsx("div",{className:"flex flex-col",children:u.jsx("span",{className:"font-bold text-xl text-gray-900 leading-tight",children:"PromptAid Vision"})})]}),u.jsx("nav",{className:"flex items-center space-x-4 bg-gray-50/80 rounded-xl p-2 backdrop-blur-sm",children:GM.map(({to:i,label:a,Icon:s})=>{const c=e.pathname===i||i==="/upload"&&e.pathname==="/"||i==="/explore"&&e.pathname.startsWith("/map/"),f=e.pathname==="/upload"||e.pathname==="/",d=i==="/upload"||i==="/";return u.jsxs("div",{className:"relative",children:[u.jsx(Qe,{withInternalPadding:!0,className:"p-2",children:u.jsxs(Me,{name:a.toLowerCase(),variant:c?"primary":"tertiary",size:1,className:`transition-all duration-200 ${c?"shadow-lg shadow-ifrcRed/20 transform scale-105":"hover:bg-white hover:shadow-md hover:scale-105"}`,onClick:()=>{if(!(f&&d)){if(e.pathname==="/upload"){if(window.confirmNavigationIfNeeded){window.confirmNavigationIfNeeded(i);return}if(!confirm("You have unsaved changes. Are you sure you want to leave?"))return}n(i)}},children:[u.jsx(s,{className:`w-4 h-4 transition-transform duration-200 ${c?"scale-110":"group-hover:scale-110"}`}),u.jsx("span",{className:"inline ml-2 font-semibold",children:a})]})}),c&&u.jsx("div",{className:"absolute -bottom-2 left-1/2 transform -translate-x-1/2 w-8 h-1 bg-ifrcRed rounded-full animate-pulse"})]},i)})}),u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsxs(Me,{name:"help",variant:e.pathname==="/help"?"primary":"tertiary",size:1,className:`transition-all duration-200 ${e.pathname==="/help"?"shadow-lg shadow-ifrcRed/20 transform scale-105":"hover:bg-blue-50 hover:text-blue-600 hover:shadow-md hover:scale-105"}`,onClick:()=>{if(e.pathname==="/upload"){if(window.confirmNavigationIfNeeded){window.confirmNavigationIfNeeded("/help");return}if(!confirm("You have unsaved changes. Are you sure you want to leave?"))return}n("/help")},children:[u.jsx(vC,{className:"w-4 h-4"}),u.jsx("span",{className:"inline ml-2 font-semibold",children:"Help & Support"})]}),u.jsxs("div",{className:"relative",children:[u.jsx(Qe,{withInternalPadding:!0,className:"p-2",children:u.jsxs(Me,{name:"dev",variant:e.pathname==="/admin"?"primary":"tertiary",size:1,className:`transition-all duration-200 ${e.pathname==="/admin"?"shadow-lg shadow-purple-500/20 transform scale-105":"hover:bg-purple-50 hover:text-purple-600 hover:shadow-md hover:scale-105"}`,onClick:()=>{if(e.pathname==="/upload"){if(window.confirmNavigationIfNeeded){window.confirmNavigationIfNeeded("/admin");return}if(!confirm("You have unsaved changes. Are you sure you want to leave?"))return}n("/admin")},children:[u.jsx(wC,{className:"w-4 h-4"}),u.jsx("span",{className:"inline ml-2 font-semibold",children:"Dev"})]})}),e.pathname==="/admin"&&u.jsx("div",{className:"absolute -bottom-2 left-1/2 transform -translate-x-1/2 w-8 h-1 bg-purple-500 rounded-full animate-pulse"})]})]})]})})}function QM(){return u.jsxs(u.Fragment,{children:[u.jsx(ZM,{}),u.jsx(Zw,{})]})}const JM="_uploadContainer_a7no8_1",KM="_dropZone_a7no8_9",YM="_hasFile_a7no8_30",XM="_dropZoneIcon_a7no8_37",eP="_dropZoneText_a7no8_43",tP="_dropZoneSubtext_a7no8_49",nP="_filePreview_a7no8_55",rP="_filePreviewImage_a7no8_64",iP="_fileName_a7no8_110",aP="_fileInfo_a7no8_118",oP="_helpLink_a7no8_125",sP="_loadingContainer_a7no8_145",lP="_loadingText_a7no8_153",cP="_generateButtonContainer_a7no8_157",uP="_uploadedMapContainer_a7no8_165",dP="_uploadedMapImage_a7no8_169",fP="_formGrid_a7no8_209",hP="_titleField_a7no8_222",pP="_ratingSection_a7no8_226",mP="_ratingDescription_a7no8_230",gP="_ratingSlider_a7no8_235",vP="_ratingLabel_a7no8_242",yP="_ratingInput_a7no8_251",xP="_ratingValue_a7no8_256",wP="_submitSection_a7no8_266",_P="_successContainer_a7no8_275",CP="_successHeading_a7no8_280",bP="_successText_a7no8_285",SP="_successButton_a7no8_291",NP="_viewFullSizeButton_a7no8_297",EP="_fullSizeModalOverlay_a7no8_306",kP="_fullSizeModalContent_a7no8_320",jP="_fullSizeModalHeader_a7no8_331",TP="_fullSizeModalImage_a7no8_347",MP="_confirmSection_a7no8_384",PP="_step2Layout_a7no8_393",IP="_mapColumn_a7no8_400",LP="_contentColumn_a7no8_405",DP="_metadataSectionCard_a7no8_489",RP="_droneMetadataSection_a7no8_498",OP="_droneMetadataHeading_a7no8_504",AP="_droneMetadataGrid_a7no8_512",$P="_rtkFixContainer_a7no8_518",FP="_rtkFixLabel_a7no8_524",zP="_rtkFixCheckbox_a7no8_533",BP="_confirmButtonContainer_a7no8_548",UP="_ratingWarningContent_a7no8_556",HP="_ratingWarningTitle_a7no8_564",qP="_ratingWarningText_a7no8_571",VP="_ratingWarningButtons_a7no8_578",WP="_preprocessingProgress_a7no8_585",ge={uploadContainer:JM,dropZone:KM,hasFile:YM,dropZoneIcon:XM,dropZoneText:eP,dropZoneSubtext:tP,filePreview:nP,filePreviewImage:rP,fileName:iP,fileInfo:aP,helpLink:oP,loadingContainer:sP,loadingText:lP,generateButtonContainer:cP,uploadedMapContainer:uP,uploadedMapImage:dP,formGrid:fP,titleField:hP,ratingSection:pP,ratingDescription:mP,ratingSlider:gP,ratingLabel:vP,ratingInput:yP,ratingValue:xP,submitSection:wP,successContainer:_P,successHeading:CP,successText:bP,successButton:SP,viewFullSizeButton:NP,fullSizeModalOverlay:EP,fullSizeModalContent:kP,fullSizeModalHeader:jP,fullSizeModalImage:TP,confirmSection:MP,step2Layout:PP,mapColumn:IP,contentColumn:LP,metadataSectionCard:DP,droneMetadataSection:RP,droneMetadataHeading:OP,droneMetadataGrid:AP,rtkFixContainer:$P,rtkFixLabel:FP,rtkFixCheckbox:zP,confirmButtonContainer:BP,ratingWarningContent:UP,ratingWarningTitle:HP,ratingWarningText:qP,ratingWarningButtons:VP,preprocessingProgress:WP},zl="selectedVlmModel";function d0(){const[e]=L0(),n=aa(),[i,a]=p.useState(1),[s,c]=p.useState(!1),[f,d]=p.useState(!1),g=p.useRef(i),y=p.useRef(null),[w,_]=p.useState(null),[v,x]=p.useState(null),[S,b]=p.useState(""),[j,N]=p.useState(""),[I,F]=p.useState(""),[O,Z]=p.useState("crisis_map"),[ye,D]=p.useState([]),[re,le]=p.useState(""),[oe,R]=p.useState(""),[U,J]=p.useState(""),[Y,xe]=p.useState(""),[Ne,ne]=p.useState(""),[X,se]=p.useState(""),[E,V]=p.useState(""),[fe,De]=p.useState(""),[ce,ve]=p.useState(""),[we,je]=p.useState(!1),[Re,Pe]=p.useState(""),[H,Te]=p.useState(""),[Ye,Je]=p.useState([]),[jt,gt]=p.useState([]),[Tt,ht]=p.useState([]),[z,Oe]=p.useState([]),[lt,M]=p.useState([]),[ie,te]=p.useState(null);g.current=i,y.current=ie;const K=$=>b($||""),he=$=>N($||""),Ee=$=>F($||""),Zt=$=>Z($||""),Ze=$=>D(Array.isArray($)?$:[]),vt=$=>R($||""),ue=$=>J($||""),pt=$=>xe($||""),Mt=$=>ne($||""),_e=$=>se($||""),Bt=$=>V($||""),ot=$=>De($||""),nn=$=>ve($||""),W=$=>je($||!1),Se=$=>Pe($||""),at=$=>Te($||""),Ge=$=>a($);p.useEffect(()=>{Promise.all([fetch("/api/sources").then($=>$.json()),fetch("/api/types").then($=>$.json()),fetch("/api/spatial-references").then($=>$.json()),fetch("/api/image-types").then($=>$.json()),fetch("/api/countries").then($=>$.json()),fetch("/api/models").then($=>$.json())]).then(([$,yt,$t,Ct,wt,Ht])=>{!localStorage.getItem(zl)&&Ht?.length&&localStorage.setItem(zl,Ht[0].m_code),Je($),gt(yt),ht($t),Oe(Ct),M(wt),$.length>0&&b($[0].s_code),N("OTHER"),F("OTHER"),Ct.length>0&&!e.get("imageType")&&!O&&Z(Ct[0].image_type)})},[e]);const Xe=p.useCallback($=>{$==="/upload"||$==="/"||(y.current?($e($),Ae(!0)):n($))},[n]);p.useEffect(()=>(window.confirmNavigationIfNeeded=$=>{Xe($)},()=>{delete window.confirmNavigationIfNeeded}),[Xe]),p.useEffect(()=>{const $=Ct=>{if(y.current){const wt="You have an uploaded image that will be deleted if you leave this page. Are you sure you want to leave?";return Ct.preventDefault(),Ct.returnValue=wt,wt}},yt=()=>{y.current&&fetch(`/api/images/${y.current}`,{method:"DELETE"}).catch(console.error)},$t=Ct=>{const wt=Ct.target,Ht=wt.closest("a[href]")||wt.closest("[data-navigate]");if(Ht&&y.current){const tt=Ht.getAttribute("href")||Ht.getAttribute("data-navigate");tt&&tt!=="#"&&!tt.startsWith("javascript:")&&!tt.startsWith("mailto:")&&(Ct.preventDefault(),Ct.stopPropagation(),Xe(tt))}};return window.addEventListener("beforeunload",$),document.addEventListener("click",$t,!0),()=>{window.removeEventListener("beforeunload",$),document.removeEventListener("click",$t,!0),yt()}},[Xe]);const[Ie,ee]=p.useState(null),[ut,mt]=p.useState("");p.useEffect(()=>{const $=e.get("imageUrl"),yt=e.get("step"),$t=e.get("imageId"),Ct=e.get("imageType");$&&(ee($),yt==="2a"&&$t&&(d(!0),te($t),Ct&&(console.log("Setting imageType from URL parameter:",Ct),Z(Ct)),fetch(`/api/images/${$t}`).then(wt=>wt.json()).then(wt=>{if(console.log("API response data.image_type:",wt.image_type),wt.image_type&&!Ct&&(console.log("Setting imageType from API response:",wt.image_type),Z(wt.image_type)),wt.generated)try{const tt=JSON.parse(wt.generated);tt.analysis?mt(tt.analysis):mt(wt.generated)}catch{mt(wt.generated)}let Ht=wt.raw_json?.extracted_metadata;if(console.log("Raw extracted_metadata:",Ht),!Ht&&wt.generated)try{const tt=JSON.parse(wt.generated);console.log("Parsed generated field:",tt),tt.metadata&&(Ht=tt,console.log("Using metadata from generated field"))}catch(tt){console.log("Could not parse generated field as JSON:",tt)}if(Ht){const tt=Ht.metadata||Ht;console.log("Final metadata to apply:",tt),tt.title&&(console.log("Setting title to:",tt.title),le(tt.title)),tt.source&&(console.log("Setting source to:",tt.source),b(tt.source)),tt.type&&(console.log("Setting event type to:",tt.type),N(tt.type)),tt.epsg&&(console.log("Setting EPSG to:",tt.epsg),F(tt.epsg)),tt.countries&&Array.isArray(tt.countries)&&(console.log("Setting countries to:",tt.countries),D(tt.countries))}else console.log("No metadata found to extract");a("2a"),d(!1)}).catch(console.error).finally(()=>d(!1))))},[e]),p.useEffect(()=>{console.log("imageType changed to:",O)},[O]);const dn=()=>{L(!1),a(1),x(null),_(null),te(null),ee(null),le(""),b(""),N(""),F(""),D([]),R(""),J(""),xe(""),ne(""),se(""),V(""),De(""),ve(""),je(!1),Pe(""),Te(""),qt({accuracy:50,context:50,usability:50}),mt(""),st(!1),ln(null),Et(!1),er(null),En(!1),vr(null),Pn(!1),In("")},[rn,qt]=p.useState({accuracy:50,context:50,usability:50}),[Vt,At]=p.useState(!1),[T,L]=p.useState(!1),[Q,ae]=p.useState(!1),[ke,He]=p.useState(!1),[et,Ae]=p.useState(!1),[Be,$e]=p.useState(null),[ze,st]=p.useState(!1),[St,ln]=p.useState(null),[Ut,Et]=p.useState(!1),[Wt,er]=p.useState(null),[Fr,En]=p.useState(!1),[Rt,vr]=p.useState(null),[yr,Pn]=p.useState(!1),[xr,In]=p.useState(""),Pt=$=>{$.preventDefault();const yt=$.dataTransfer.files?.[0];yt&&Gt(yt)},Gt=$=>{$&&(console.log("File selected:",$.name,"Type:",$.type,"Size:",$.size),vn($)?(console.log("File needs preprocessing, showing modal"),vr($),En(!0)):(console.log("File does not need preprocessing, setting directly"),x($)))},vn=$=>{const yt=["image/jpeg","image/jpg","image/png"],$t=[".jpg",".jpeg",".png"];let Ct=!yt.includes($.type);if(!Ct&&$.name){const wt=$.name.toLowerCase().substring($.name.lastIndexOf("."));Ct=!$t.includes(wt)}return Ct},zr=async()=>{if(Rt){Pn(!0),In("Starting file conversion...");try{const $=new FormData;$.append("file",Rt),$.append("preprocess_only","true"),In("Converting file format...");const yt=await fetch("/api/images/preprocess",{method:"POST",body:$});if(!yt.ok)throw new Error("Preprocessing failed");const $t=await yt.json();In("Finalizing conversion...");const Ct=atob($t.processed_content),wt=new Uint8Array(Ct.length);for(let _t=0;_t{En(!1),vr(null),Pn(!1),In("")},1e3)}catch($){console.error("Preprocessing error:",$),In("Conversion failed. Please try again."),setTimeout(()=>{En(!1),vr(null),Pn(!1),In("")},2e3)}}},Ot=()=>{En(!1),vr(null),Pn(!1),In("")};p.useEffect(()=>{if(!v){_(null);return}const $=URL.createObjectURL(v);return _($),()=>URL.revokeObjectURL($)},[v]);async function Ln($){const yt=await $.text();try{return yt?JSON.parse(yt):{}}catch{return{error:yt}}}function Br($,yt){const $t=$ instanceof Error?$.message:`Failed to ${yt.toLowerCase()}`;alert($t)}async function Ya(){if(!v)return;c(!0);const $=new FormData;$.append("file",v),O==="drone_image"?($.append("event_type",j||"OTHER"),$.append("epsg",I||"OTHER"),oe&&$.append("center_lon",oe),U&&$.append("center_lat",U),Y&&$.append("amsl_m",Y),Ne&&$.append("agl_m",Ne),X&&$.append("heading_deg",X),E&&$.append("yaw_deg",E),fe&&$.append("pitch_deg",fe),ce&&$.append("roll_deg",ce),we&&$.append("rtk_fix",we.toString()),Re&&$.append("std_h_m",Re),H&&$.append("std_v_m",H)):($.append("source",S||"OTHER"),$.append("event_type",j||"OTHER"),$.append("epsg",I||"OTHER")),$.append("image_type",O),ye.forEach($t=>$.append("countries",$t));const yt=localStorage.getItem(zl);yt&&$.append("model_name",yt);try{const $t=await fetch("/api/images/",{method:"POST",body:$}),Ct=await Ln($t);if(!$t.ok)throw new Error(Ct.error||"Upload failed");ee(Ct.image_url),Ct.preprocessing_info&&typeof Ct.preprocessing_info=="object"&&"was_preprocessed"in Ct.preprocessing_info&&Ct.preprocessing_info.was_preprocessed===!0&&(er(Ct.preprocessing_info),Et(!0));const wt=Ct.image_id;if(!wt)throw new Error("Upload failed: image_id not found");te(wt);const Ht=await fetch(`/api/images/${wt}/caption`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({title:re||"Generated Caption",prompt:O==="drone_image"?"DEFAULT_DRONE_IMAGE":"DEFAULT_CRISIS_MAP",...yt&&{model_name:yt}})}),tt=await Ln(Ht);if(!Ht.ok)throw new Error(tt.error||"Caption failed");te(wt);const _t=tt.raw_json?.fallback_info;_t&&(ln({originalModel:_t.original_model,fallbackModel:_t.fallback_model,reason:_t.reason}),st(!0));const xt=tt.raw_json?.extracted_metadata;if(xt){const kt=xt.metadata||xt;kt.title&&le(kt.title),kt.source&&b(kt.source),kt.type&&N(kt.type),kt.epsg&&F(kt.epsg),kt.countries&&Array.isArray(kt.countries)&&D(kt.countries),O==="drone_image"&&(kt.center_lon&&R(kt.center_lon),kt.center_lat&&J(kt.center_lat),kt.amsl_m&&xe(kt.amsl_m),kt.agl_m&&ne(kt.agl_m),kt.heading_deg&&se(kt.heading_deg),kt.yaw_deg&&V(kt.yaw_deg),kt.pitch_deg&&De(kt.pitch_deg),kt.roll_deg&&ve(kt.roll_deg),kt.rtk_fix!==void 0&&je(kt.rtk_fix),kt.std_h_m&&Pe(kt.std_h_m),kt.std_v_m&&Te(kt.std_v_m))}if(tt.generated)try{const kt=JSON.parse(tt.generated);kt.analysis?mt(kt.analysis):mt(tt.generated)}catch{mt(tt.generated)}Ge("2a")}catch($t){Br($t,"Upload")}finally{c(!1)}}async function Pi(){if(Ie){c(!0);try{const $=await fetch("/api/contribute/from-url",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:Ie,source:O==="drone_image"?void 0:S||"OTHER",event_type:j||"OTHER",epsg:I||"OTHER",image_type:O,countries:ye,...O==="drone_image"&&{center_lon:oe||void 0,center_lat:U||void 0,amsl_m:Y||void 0,agl_m:Ne||void 0,heading_deg:X||void 0,yaw_deg:E||void 0,pitch_deg:fe||void 0,roll_deg:ce||void 0,rtk_fix:we||void 0,std_h_m:Re||void 0,std_v_m:H||void 0}})}),yt=await Ln($);if(!$.ok)throw new Error(yt.error||"Upload failed");yt.preprocessing_info&&typeof yt.preprocessing_info=="object"&&"was_preprocessed"in yt.preprocessing_info&&yt.preprocessing_info.was_preprocessed===!0&&(er(yt.preprocessing_info),Et(!0));const $t=yt.image_id;te($t),ee(yt.image_url);const Ct=localStorage.getItem(zl)||void 0,wt=await fetch(`/api/images/${$t}/caption`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({title:"Generated Caption",prompt:O==="drone_image"?"DEFAULT_DRONE_IMAGE":"DEFAULT_CRISIS_MAP",...Ct&&{model_name:Ct}})}),Ht=await Ln(wt);if(!wt.ok)throw new Error(Ht.error||"Caption failed");const tt=Ht.raw_json?.fallback_info;tt&&(ln({originalModel:tt.original_model,fallbackModel:tt.fallback_model,reason:tt.reason}),st(!0));const _t=Ht.raw_json?.extracted_metadata;if(_t){const xt=_t.metadata||_t;xt.title&&le(xt.title),xt.source&&b(xt.source),xt.type&&N(xt.type),xt.epsg&&F(xt.epsg),xt.countries&&Array.isArray(xt.countries)&&D(xt.countries),O==="drone_image"&&(xt.center_lon&&R(xt.center_lon),xt.center_lat&&J(xt.center_lat),xt.amsl_m&&xe(xt.amsl_m),xt.agl_m&&ne(xt.agl_m),xt.heading_deg&&se(xt.heading_deg),xt.yaw_deg&&V(xt.yaw_deg),xt.pitch_deg&&De(xt.pitch_deg),xt.roll_deg&&ve(xt.roll_deg),xt.rtk_fix!==void 0&&je(xt.rtk_fix),xt.std_h_m&&Pe(xt.std_h_m),xt.std_v_m&&Te(xt.std_v_m))}if(Ht.generated)try{const xt=JSON.parse(Ht.generated);xt.analysis?mt(xt.analysis):mt(Ht.generated)}catch{mt(Ht.generated)}Ge("2a")}catch($){Br($,"Upload")}finally{c(!1)}}}async function sa(){if(console.log("handleSubmit called with:",{uploadedImageId:ie,title:re,draft:ut}),!ie)return alert("No image to submit");if(!T){ae(!0);return}try{const $={source:O==="drone_image"?void 0:S||"OTHER",event_type:j||"OTHER",epsg:I||"OTHER",image_type:O,countries:ye};console.log("Updating metadata:",$);const yt=await fetch(`/api/images/${ie}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify($)}),$t=await Ln(yt);if(!yt.ok)throw new Error($t.error||"Metadata update failed");const Ct={title:re,edited:ut||"",accuracy:rn.accuracy,context:rn.context,usability:rn.usability};console.log("Updating caption:",Ct);const wt=await fetch(`/api/images/${ie}/caption`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ct)}),Ht=await Ln(wt);if(!wt.ok)throw new Error(Ht.error||"Caption update failed");te(null),Ge(3)}catch($){Br($,"Submit")}}async function ai(){if(console.log("handleDelete called with uploadedImageId:",ie),!ie){alert("No image to delete. Please try refreshing the page.");return}He(!0)}async function la(){try{console.log("Deleting image with ID:",ie);const $=await fetch(`/api/images/${ie}`,{method:"DELETE"});if(!$.ok){const yt=await Ln($);throw new Error(yt.error||`Delete failed with status ${$.status}`)}He(!1),e.get("isContribution")==="true"?n("/explore"):dn()}catch($){Br($,"Delete")}}async function Nc(){if(Be&&y.current)try{await fetch(`/api/images/${y.current}`,{method:"DELETE"}),Ae(!1),$e(null),n(Be)}catch($){console.error("Failed to delete image before navigation:",$),Ae(!1),$e(null),n(Be)}}return u.jsxs(cr,{children:[i!==3&&u.jsx("div",{className:"max-w-7xl mx-auto",children:u.jsxs("div",{className:ge.uploadContainer,"data-step":i,children:[i===1&&!e.get("step")&&u.jsxs("div",{className:"space-y-6",children:[u.jsx("p",{className:"text-gray-700 leading-relaxed max-w-2xl mx-auto",children:"This app evaluates how well multimodal AI models analyze and describe crisis maps and drone imagery. Upload any file format (PDF, TIFF, HEIC, etc.) and we'll automatically convert it for you. Let the AI generate a description, then review and rate the result based on your expertise."}),u.jsx("div",{className:ge.helpLink,children:u.jsxs(v_,{to:"/help",className:ge.helpLink,children:["More ",u.jsx(cC,{className:"w-3 h-3"})]})}),u.jsx("div",{className:"flex justify-center",children:u.jsx(Qe,{withInternalPadding:!0,className:"bg-transparent border-none shadow-none",children:u.jsx(Za,{name:"image-type",value:O,onChange:$=>Zt($),options:[{key:"crisis_map",label:"Crisis Maps"},{key:"drone_image",label:"Drone Imagery"}],keySelector:$=>$.key,labelSelector:$=>$.label})})}),u.jsxs("div",{className:`${ge.dropZone} ${v?ge.hasFile:""}`,onDragOver:$=>$.preventDefault(),onDrop:Pt,children:[v&&w?u.jsxs("div",{className:ge.filePreview,children:[u.jsx("div",{className:ge.filePreviewImage,children:u.jsx("img",{src:w,alt:"File preview"})}),u.jsx("p",{className:ge.fileName,children:v.name}),u.jsxs("p",{className:ge.fileInfo,children:[(v.size/1024/1024).toFixed(2)," MB"]})]}):u.jsxs(u.Fragment,{children:[u.jsx(z0,{className:ge.dropZoneIcon}),u.jsx("p",{className:ge.dropZoneText,children:"Drag & Drop any file here"}),u.jsx("p",{className:ge.dropZoneSubtext,children:"or"})]}),u.jsxs("label",{className:"inline-block cursor-pointer",children:[u.jsx("input",{type:"file",className:"sr-only",onChange:$=>Gt($.target.files?.[0])}),u.jsx(Me,{name:"upload",variant:"secondary",size:1,onClick:()=>document.querySelector('input[type="file"]')?.click(),children:v?"Change File":"Browse Files"})]})]})]}),s&&u.jsxs("div",{className:ge.loadingContainer,children:[u.jsx(Ki,{className:"text-ifrcRed"}),u.jsx("p",{className:ge.loadingText,children:"Generating..."})]}),f&&u.jsxs("div",{className:ge.loadingContainer,children:[u.jsx(Ki,{className:"text-ifrcRed"}),u.jsx("p",{className:ge.loadingText,children:"Loading contribution..."})]}),i===1&&!s&&u.jsx("div",{className:ge.generateButtonContainer,children:Ie?u.jsx(Me,{name:"generate-from-url",onClick:Pi,children:"Generate Caption"}):u.jsx(Me,{name:"generate",disabled:!v,onClick:Ya,children:"Generate"})}),i==="2a"&&u.jsxs("div",{className:ge.step2Layout,children:[u.jsx("div",{className:ge.mapColumn,children:u.jsx(Qe,{heading:"Uploaded Image",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:u.jsxs("div",{className:ge.uploadedMapContainer,children:[u.jsx("div",{className:ge.uploadedMapImage,children:u.jsx("img",{src:Ie||w||void 0,alt:"Uploaded image preview"})}),u.jsx("div",{className:ge.viewFullSizeButton,children:u.jsx(Me,{name:"view-full-size",variant:"secondary",size:1,onClick:()=>At(!0),children:"View Image"})})]})})}),u.jsx("div",{className:ge.contentColumn,children:u.jsx("div",{className:ge.metadataSectionCard,children:u.jsxs(Qe,{heading:"Confirm image details",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:[u.jsxs("div",{className:ge.formGrid,children:[u.jsx("div",{className:ge.titleField,children:u.jsx(gn,{label:"Title",name:"title",value:re,onChange:$=>le($||""),placeholder:"Enter a title for this map...",required:!0})}),O!=="drone_image"&&u.jsx(Un,{label:"Source",name:"source",value:S,onChange:K,options:Ye,keySelector:$=>$.s_code,labelSelector:$=>$.label,required:!0}),u.jsx(Un,{label:"Event Type",name:"event_type",value:j,onChange:he,options:jt,keySelector:$=>$.t_code,labelSelector:$=>$.label,required:O!=="drone_image"}),u.jsx(Un,{label:"EPSG",name:"epsg",value:I,onChange:Ee,options:Tt,keySelector:$=>$.epsg,labelSelector:$=>`${$.srid} (EPSG:${$.epsg})`,placeholder:"EPSG",required:O!=="drone_image"}),u.jsx(Un,{label:"Image Type",name:"image_type",value:O,onChange:Zt,options:z,keySelector:$=>$.image_type,labelSelector:$=>$.label,required:!0}),u.jsx(ih,{label:"Countries (optional)",name:"countries",value:ye,onChange:Ze,options:lt,keySelector:$=>$.c_code,labelSelector:$=>$.label,placeholder:"Select one or more"}),O==="drone_image"&&u.jsx(u.Fragment,{children:u.jsxs("div",{className:ge.droneMetadataSection,children:[u.jsx("h4",{className:ge.droneMetadataHeading,children:"Drone Flight Data"}),u.jsxs("div",{className:ge.droneMetadataGrid,children:[u.jsx(gn,{label:"Center Longitude",name:"center_lon",value:oe,onChange:vt,placeholder:"e.g., -122.4194",step:"any"}),u.jsx(gn,{label:"Center Latitude",name:"center_lat",value:U,onChange:ue,placeholder:"e.g., 37.7749",step:"any"}),u.jsx(gn,{label:"Altitude AMSL (m)",name:"amsl_m",value:Y,onChange:pt,placeholder:"e.g., 100.5",step:"any"}),u.jsx(gn,{label:"Altitude AGL (m)",name:"agl_m",value:Ne,onChange:Mt,placeholder:"e.g., 50.2",step:"any"}),u.jsx(gn,{label:"Heading (degrees)",name:"heading_deg",value:X,onChange:_e,placeholder:"e.g., 180.0",step:"any"}),u.jsx(gn,{label:"Yaw (degrees)",name:"yaw_deg",value:E,onChange:Bt,placeholder:"e.g., 90.0",step:"any"}),u.jsx(gn,{label:"Pitch (degrees)",name:"pitch_deg",value:fe,onChange:ot,placeholder:"e.g., 0.0",step:"any"}),u.jsx(gn,{label:"Roll (degrees)",name:"roll_deg",value:ce,onChange:nn,placeholder:"e.g., 0.0",step:"any"}),u.jsx("div",{className:ge.rtkFixContainer,children:u.jsxs("label",{className:ge.rtkFixLabel,children:[u.jsx("input",{type:"checkbox",checked:we,onChange:$=>W($.target.checked),className:ge.rtkFixCheckbox}),"RTK Fix Available"]})}),u.jsx(gn,{label:"Horizontal Std Dev (m)",name:"std_h_m",value:Re,onChange:Se,placeholder:"e.g., 0.1",step:"any"}),u.jsx(gn,{label:"Vertical Std Dev (m)",name:"std_v_m",value:H,onChange:at,placeholder:"e.g., 0.2",step:"any"})]})]})})]}),u.jsxs("div",{className:ge.confirmSection,children:[u.jsx(hg,{name:"delete",variant:"tertiary",onClick:ai,title:"Delete",ariaLabel:"Delete uploaded image",children:u.jsx(Rd,{})}),u.jsx(Me,{name:"confirm-metadata",onClick:async()=>{Ie&&!ie?await Pi():Ge("2b")},children:"Next"})]})]})})})]}),i==="2b"&&u.jsxs("div",{className:ge.step2Layout,children:[u.jsx("div",{className:ge.mapColumn,children:u.jsx(Qe,{heading:"Uploaded Image",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:u.jsxs("div",{className:ge.uploadedMapContainer,children:[u.jsx("div",{className:ge.uploadedMapImage,children:u.jsx("img",{src:Ie||w||void 0,alt:"Uploaded image preview"})}),u.jsx("div",{className:ge.viewFullSizeButton,children:u.jsx(Me,{name:"view-full-size",variant:"secondary",size:1,onClick:()=>At(!0),children:"View Image"})})]})})}),u.jsxs("div",{className:ge.contentColumn,children:[u.jsx("div",{className:ge.metadataSectionCard,children:u.jsx(Qe,{heading:"AI Performance Rating",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:u.jsxs("div",{className:ge.ratingSection,children:[!T&&u.jsxs(u.Fragment,{children:[u.jsx("p",{className:ge.ratingDescription,children:"How well did the AI perform on the task?"}),["accuracy","context","usability"].map($=>u.jsxs("div",{className:ge.ratingSlider,children:[u.jsx("label",{className:ge.ratingLabel,children:$}),u.jsx("input",{type:"range",min:0,max:100,value:rn[$],onChange:yt=>qt($t=>({...$t,[$]:Number(yt.target.value)})),className:ge.ratingInput}),u.jsx("span",{className:ge.ratingValue,children:rn[$]})]},$)),u.jsx("div",{className:ge.confirmButtonContainer,children:u.jsx(Me,{name:"confirm-ratings",variant:"secondary",onClick:()=>L(!0),children:"Confirm Ratings"})})]}),T&&u.jsx("div",{className:ge.confirmButtonContainer,children:u.jsx(Me,{name:"edit-ratings",variant:"secondary",onClick:()=>L(!1),children:"Edit Ratings"})})]})})}),u.jsx("div",{className:ge.metadataSectionCard,children:u.jsxs(Qe,{heading:"Generated Text",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:[u.jsx("div",{className:"text-left",children:u.jsx(VM,{name:"caption",value:ut,onChange:$=>mt($||""),rows:10,placeholder:"AI-generated caption will appear here..."})}),u.jsxs("div",{className:ge.submitSection,children:[u.jsx(Me,{name:"back",variant:"secondary",onClick:()=>Ge("2a"),children:"Back"}),u.jsx(hg,{name:"delete",variant:"tertiary",onClick:ai,title:"Delete",ariaLabel:"Delete uploaded image",children:u.jsx(Rd,{})}),u.jsx(Me,{name:"submit",onClick:sa,children:"Submit"})]})]})})]})]}),Vt&&u.jsx("div",{className:ge.fullSizeModalOverlay,onClick:()=>At(!1),children:u.jsxs("div",{className:ge.fullSizeModalContent,onClick:$=>$.stopPropagation(),children:[u.jsx("div",{className:ge.fullSizeModalHeader,children:u.jsx(Me,{name:"close-modal",variant:"tertiary",size:1,onClick:()=>At(!1),children:"✕"})}),u.jsx("div",{className:ge.fullSizeModalImage,children:u.jsx("img",{src:Ie||w||void 0,alt:"Full size map"})})]})}),Q&&u.jsx("div",{className:ge.fullSizeModalOverlay,onClick:()=>ae(!1),children:u.jsx("div",{className:ge.fullSizeModalContent,onClick:$=>$.stopPropagation(),children:u.jsxs("div",{className:ge.ratingWarningContent,children:[u.jsx("h3",{className:ge.ratingWarningTitle,children:"Please Confirm Your Ratings"}),u.jsx("p",{className:ge.ratingWarningText,children:'You must confirm your performance ratings before submitting. Please go back to the rating section and click "Confirm Ratings".'}),u.jsx("div",{className:ge.ratingWarningButtons,children:u.jsx(Me,{name:"close-warning",variant:"secondary",onClick:()=>ae(!1),children:"Close"})})]})})}),ke&&u.jsx("div",{className:ge.fullSizeModalOverlay,onClick:()=>He(!1),children:u.jsx("div",{className:ge.fullSizeModalContent,onClick:$=>$.stopPropagation(),children:u.jsxs("div",{className:ge.ratingWarningContent,children:[u.jsx("h3",{className:ge.ratingWarningTitle,children:"Delete Image?"}),u.jsx("p",{className:ge.ratingWarningText,children:"This action cannot be undone. Are you sure you want to delete this uploaded image?"}),u.jsxs("div",{className:ge.ratingWarningButtons,children:[u.jsx(Me,{name:"confirm-delete",variant:"secondary",onClick:la,children:"Delete"}),u.jsx(Me,{name:"cancel-delete",variant:"tertiary",onClick:()=>He(!1),children:"Cancel"})]})]})})}),et&&u.jsx("div",{className:ge.fullSizeModalOverlay,onClick:()=>Ae(!1),children:u.jsx("div",{className:ge.fullSizeModalContent,onClick:$=>$.stopPropagation(),children:u.jsxs("div",{className:ge.ratingWarningContent,children:[u.jsx("h3",{className:ge.ratingWarningTitle,children:"Leave Page?"}),u.jsx("p",{className:ge.ratingWarningText,children:"Your uploaded image will be deleted if you leave this page. Are you sure you want to continue?"}),u.jsxs("div",{className:ge.ratingWarningButtons,children:[u.jsx(Me,{name:"confirm-navigation",variant:"secondary",onClick:Nc,children:"Leave Page"}),u.jsx(Me,{name:"cancel-navigation",variant:"tertiary",onClick:()=>Ae(!1),children:"Stay"})]})]})})}),ze&&St&&u.jsx("div",{className:ge.fullSizeModalOverlay,onClick:()=>st(!1),children:u.jsx("div",{className:ge.fullSizeModalContent,onClick:$=>$.stopPropagation(),children:u.jsxs("div",{className:ge.ratingWarningContent,children:[u.jsx("h3",{className:ge.ratingWarningTitle,children:"Model Changed"}),u.jsxs("p",{className:ge.ratingWarningText,children:[St.originalModel," is currently unavailable. We've automatically switched to ",St.fallbackModel," to complete your request."]}),u.jsx("div",{className:ge.ratingWarningButtons,children:u.jsx(Me,{name:"close-fallback",variant:"secondary",onClick:()=>st(!1),children:"Got it"})})]})})}),Ut&&Wt&&u.jsx("div",{className:ge.fullSizeModalOverlay,onClick:()=>Et(!1),children:u.jsx("div",{className:ge.fullSizeModalContent,onClick:$=>$.stopPropagation(),children:u.jsxs("div",{className:ge.ratingWarningContent,children:[u.jsx("h3",{className:ge.ratingWarningTitle,children:"File Converted"}),u.jsxs("p",{className:ge.ratingWarningText,children:["Your file ",u.jsx("strong",{children:Wt.original_filename})," has been converted from",u.jsxs("strong",{children:[" ",Wt.original_mime_type]})," to",u.jsxs("strong",{children:[" ",Wt.processed_mime_type]})," for optimal processing.",u.jsx("br",{}),u.jsx("br",{}),"This conversion ensures your file is in the best format for our AI models to analyze."]}),u.jsx("div",{className:ge.ratingWarningButtons,children:u.jsx(Me,{name:"close-preprocessing",variant:"secondary",onClick:()=>Et(!1),children:"Got it"})})]})})}),Fr&&u.jsx("div",{className:ge.fullSizeModalOverlay,onClick:Ot,children:u.jsx("div",{className:ge.fullSizeModalContent,onClick:$=>$.stopPropagation(),children:u.jsxs("div",{className:ge.ratingWarningContent,children:[u.jsx("h3",{className:ge.ratingWarningTitle,children:"File Conversion Required"}),u.jsx("p",{className:ge.ratingWarningText,children:"The file you selected will be converted to a web-compatible format (PNG or JPEG). This ensures optimal compatibility and processing by our AI models."}),u.jsxs("div",{className:ge.ratingWarningButtons,children:[u.jsx(Me,{name:"confirm-preprocessing",variant:"secondary",onClick:zr,children:"Convert File"}),u.jsx(Me,{name:"cancel-preprocessing",variant:"tertiary",onClick:Ot,children:"Cancel"})]}),yr&&u.jsxs("div",{className:ge.preprocessingProgress,children:[u.jsx("p",{children:xr}),u.jsx(Ki,{className:"text-ifrcRed"})]})]})})})]})}),i===3&&u.jsxs("div",{className:ge.successContainer,children:[u.jsx($a,{level:2,className:ge.successHeading,children:"Saved!"}),u.jsx("p",{className:ge.successText,children:"Your caption has been successfully saved."}),u.jsx("div",{className:ge.successButton,children:u.jsx(Me,{name:"upload-another",onClick:dn,children:"Upload Another"})})]})]})}const f0={};function gr(e,n,i,a){return{id:e,title:n,columnClassName:a?.columnClassName,headerCellRenderer:By,headerCellRendererClassName:a?.headerCellRendererClassName,headerContainerClassName:a?.headerContainerClassName,headerCellRendererParams:{sortable:a?.sortable,infoTitle:a?.headerInfoTitle,infoDescription:a?.headerInfoDescription},cellRendererClassName:a?.cellRendererClassName,cellContainerClassName:a?.cellContainerClassName,cellRenderer:OM,cellRendererParams:(s,c)=>({value:i(c)||"--"}),valueSelector:i,valueComparator:(s,c)=>Sb(i(s),i(c)),columnWidth:a?.columnWidth,columnStretch:a?.columnStretch,columnStyle:a?.columnStyle}}function on(e,n,i,a){return{id:e,title:n,columnClassName:a?.columnClassName,headerCellRenderer:By,headerCellRendererClassName:be(f0.numberCellHeader,a?.headerCellRendererClassName),headerContainerClassName:a?.headerContainerClassName,headerCellRendererParams:{sortable:a?.sortable,infoTitle:a?.headerInfoTitle,infoDescription:a?.headerInfoDescription},cellRendererClassName:be(f0.numberCell,a?.cellRendererClassName),cellContainerClassName:a?.cellContainerClassName,cellRenderer:_f,cellRendererParams:(s,c)=>({value:i(c),suffix:a?.suffix,maximumFractionDigits:a?.maximumFractionDigits,invalidText:"--"}),valueSelector:i,valueComparator:(s,c)=>Nb(i(s),i(c)),columnWidth:a?.columnWidth,columnStretch:a?.columnStretch,columnStyle:a?.columnStyle}}const GP="_tabSelector_1b1f0_1",ZP="_progressSection_1b1f0_14",QP="_progressLabel_1b1f0_20",JP="_chartGrid_1b1f0_28",KP="_chartSection_1b1f0_34",YP="_chartContainer_1b1f0_40",XP="_tableContainer_1b1f0_51",eI="_modelPerformance_1b1f0_59",tI="_loadingContainer_1b1f0_67",nI="_errorContainer_1b1f0_77",rI="_userInteractionCards_1b1f0_96",iI="_userInteractionCard_1b1f0_96",aI="_userInteractionCardValue_1b1f0_116",oI="_userInteractionCardLabel_1b1f0_123",sI="_userInteractionCardButton_1b1f0_129",lI="_summaryStatsCards_1b1f0_133",cI="_summaryStatsCard_1b1f0_133",uI="_summaryStatsCardValue_1b1f0_154",dI="_summaryStatsCardLabel_1b1f0_161",Le={tabSelector:GP,progressSection:ZP,progressLabel:QP,chartGrid:JP,chartSection:KP,chartContainer:YP,tableContainer:XP,modelPerformance:eI,loadingContainer:tI,errorContainer:nI,userInteractionCards:rI,userInteractionCard:iI,userInteractionCardValue:aI,userInteractionCardLabel:oI,userInteractionCardButton:sI,summaryStatsCards:lI,summaryStatsCard:cI,summaryStatsCardValue:uI,summaryStatsCardLabel:dI};function fI(){const[e]=L0(),[n,i]=p.useState(null),[a,s]=p.useState(!0),[c,f]=p.useState("crisis_maps"),[d,g]=p.useState([]),[y,w]=p.useState([]),[_,v]=p.useState([]),[x,S]=p.useState(!1),[b,j]=p.useState(!1),[N,I]=p.useState(!1),F=M=>{S(M==="editTime"),j(M==="percentage"),I(M==="delete")},O=[{key:"crisis_maps",label:"Crisis Maps"},{key:"drone_images",label:"Drone Images"}],Z=p.useCallback((M,ie)=>{if(!M||!ie)return 0;const te=M.toLowerCase().replace(/[^\w\s]/g,"").split(/\s+/).filter(ue=>ue.length>0),K=ie.toLowerCase().replace(/[^\w\s]/g,"").split(/\s+/).filter(ue=>ue.length>0);if(te.length===0&&K.length===0)return 1;if(te.length===0||K.length===0)return 0;const he=new Set(te),Ee=new Set(K),Zt=new Set([...he].filter(ue=>Ee.has(ue))),Ze=new Set([...he,...Ee]);return Zt.size/Ze.size},[]),ye=p.useCallback(async()=>{s(!0);try{const ie=await(await fetch("/api/images")).json(),te={},K=ie.filter(ue=>ue.image_type==="crisis_map"),he=ie.filter(ue=>ue.image_type==="drone_image"),Ee={totalCaptions:ie.length,sources:{},types:{},regions:{},models:{},modelEditTimes:te,percentageModified:0,modelPercentageData:{},totalDeleteCount:0,deleteRate:0,crisisMaps:K,droneImages:he};ie.forEach(ue=>{if(ue.source&&(Ee.sources[ue.source]=(Ee.sources[ue.source]||0)+1),ue.event_type&&(Ee.types[ue.event_type]=(Ee.types[ue.event_type]||0)+1),ue.countries&&ue.countries.forEach(pt=>{pt.r_code&&(Ee.regions[pt.r_code]=(Ee.regions[pt.r_code]||0)+1)}),ue.model){const pt=ue.model,Mt=Ee.models[pt]||={count:0,avgAccuracy:0,avgContext:0,avgUsability:0,totalScore:0,deleteCount:0};if(Mt.count++,ue.accuracy!=null&&(Mt.avgAccuracy+=ue.accuracy),ue.context!=null&&(Mt.avgContext+=ue.context),ue.usability!=null&&(Mt.avgUsability+=ue.usability),ue.created_at&&ue.updated_at){const _e=new Date(ue.created_at).getTime(),ot=new Date(ue.updated_at).getTime()-_e;ot>0&&(te[pt]||(te[pt]=[]),te[pt].push(ot))}}}),d.forEach(ue=>{ue.s_code&&!Ee.sources[ue.s_code]&&(Ee.sources[ue.s_code]=0)}),y.forEach(ue=>{ue.t_code&&!Ee.types[ue.t_code]&&(Ee.types[ue.t_code]=0)}),_.forEach(ue=>{ue.r_code&&!Ee.regions[ue.r_code]&&(Ee.regions[ue.r_code]=0)}),["GPT-4","Claude","Gemini","Llama","Other"].forEach(ue=>{Ee.models[ue]||(Ee.models[ue]={count:0,avgAccuracy:0,avgContext:0,avgUsability:0,totalScore:0,deleteCount:0})}),Object.values(Ee.models).forEach(ue=>{ue.count>0&&(ue.avgAccuracy=Math.round(ue.avgAccuracy/ue.count),ue.avgContext=Math.round(ue.avgContext/ue.count),ue.avgUsability=Math.round(ue.avgUsability/ue.count),ue.totalScore=Math.round((ue.avgAccuracy+ue.avgContext+ue.avgUsability)/3))});const Ze=ie.filter(ue=>ue.generated&&ue.edited);if(Ze.length>0){const pt=[...Ze.map(Bt=>Z(Bt.generated,Bt.edited))].sort((Bt,ot)=>Bt-ot),Mt=Math.floor(pt.length/2),_e=pt.length%2===0?(pt[Mt-1]+pt[Mt])/2:pt[Mt];Ee.percentageModified=Math.round((1-_e)*100)}const vt={};ie.forEach(ue=>{if(ue.model&&ue.generated&&ue.edited){const pt=Z(ue.generated,ue.edited),Mt=Math.round((1-pt)*100);vt[ue.model]||(vt[ue.model]=[]),vt[ue.model].push(Mt)}}),Ee.modelPercentageData=vt;try{const ue=await fetch("/api/models");if(ue.ok){const pt=await ue.json();if(pt.models){pt.models.forEach(_e=>{Ee.models[_e.m_code]&&(Ee.models[_e.m_code].deleteCount=_e.delete_count||0)});const Mt=pt.models.reduce((_e,Bt)=>_e+(Bt.delete_count||0),0);Ee.totalDeleteCount=Mt,Ee.deleteRate=Mt>0?Math.round(Mt/(Mt+ie.length)*100):0}}}catch(ue){console.log("Could not fetch model delete counts:",ue)}i(Ee)}catch{i(null)}finally{s(!1)}},[d,y,_,Z]),D=p.useCallback(async()=>{try{const[M,ie,te]=await Promise.all([fetch("/api/sources"),fetch("/api/types"),fetch("/api/regions")]),K=await M.json(),he=await ie.json(),Ee=await te.json();g(K),w(he),v(Ee)}catch(M){console.log("Could not fetch lookup data:",M)}},[]);p.useEffect(()=>{const M=e.get("view");(M==="crisis_maps"||M==="drone_images")&&f(M)},[e]),p.useEffect(()=>{D()},[]),p.useEffect(()=>{d.length>0&&y.length>0&&_.length>0&&ye()},[d,y,_,ye]);const re=p.useCallback(M=>{const ie=d.find(te=>te.s_code===M);return ie?ie.label:M},[d]),le=p.useCallback(M=>{if(M.length===0)return 0;const ie=[...M].sort((K,he)=>K-he),te=Math.floor(ie.length/2);return ie.length%2===0?Math.round((ie[te-1]+ie[te])/2):ie[te]},[]),oe=p.useCallback(M=>{const ie=Math.floor(M/1e3),te=Math.floor(ie/60),K=Math.floor(te/60);return K>0?`${K}h ${te%60}m`:te>0?`${te}m ${ie%60}s`:`${ie}s`},[]),R=p.useCallback(M=>{const ie=y.find(te=>te.t_code===M);return ie?ie.label:M},[y]),U=p.useMemo(()=>n?Object.entries(n.modelEditTimes||{}).filter(([,M])=>M.length>0).sort(([,M],[,ie])=>le(ie)-le(M)).map(([M,ie],te)=>({id:te+1,name:M,count:ie.length,avgEditTime:le(ie),minEditTime:Math.min(...ie),maxEditTime:Math.max(...ie)})):[],[n,le]),J=p.useMemo(()=>n?Object.entries(n.modelPercentageData||{}).filter(([,M])=>M.length>0).sort(([,M],[,ie])=>{const te=[...M].sort((vt,ue)=>vt-ue),K=[...ie].sort((vt,ue)=>vt-ue),he=Math.floor(te.length/2),Ee=Math.floor(K.length/2),Zt=te.length%2===0?(te[he-1]+te[he])/2:te[he];return(K.length%2===0?(K[Ee-1]+K[Ee])/2:K[Ee])-Zt}).map(([M,ie],te)=>{const K=[...ie].sort((Zt,Ze)=>Zt-Ze),he=Math.floor(K.length/2),Ee=K.length%2===0?Math.round((K[he-1]+K[he])/2):K[he];return{id:te+1,name:M,count:ie.length,avgPercentageModified:Ee,minPercentageModified:Math.min(...ie),maxPercentageModified:Math.max(...ie)}}):[],[n]),Y=p.useMemo(()=>n?Object.entries(n.models).filter(([,M])=>M.count>0).map(([M,ie],te)=>{const K=[ie.avgAccuracy,ie.avgContext,ie.avgUsability],he=K.reduce((Ze,vt)=>Ze+vt,0)/K.length,Ee=K.reduce((Ze,vt)=>Ze+Math.pow(vt-he,2),0)/K.length,Zt=Math.round(100-Math.sqrt(Ee));return{id:te+1,name:M,consistency:Math.max(0,Zt),avgScore:Math.round(he),count:ie.count}}).sort((M,ie)=>ie.consistency-M.consistency):[],[n]),xe=p.useMemo(()=>[gr("name","Region",M=>M.name),on("count","Count",M=>M.count),on("percentage","% of Total",M=>M.percentage,{suffix:"%",maximumFractionDigits:0})],[]),Ne=p.useMemo(()=>[gr("name","Type",M=>M.name),on("count","Count",M=>M.count),on("percentage","% of Total",M=>M.percentage,{suffix:"%",maximumFractionDigits:0})],[]),ne=p.useMemo(()=>[gr("name","Source",M=>M.name),on("count","Count",M=>M.count),on("percentage","% of Total",M=>M.percentage,{suffix:"%",maximumFractionDigits:0})],[]),X=p.useMemo(()=>[gr("name","Model",M=>M.name),on("count","Count",M=>M.count),on("accuracy","Accuracy",M=>M.accuracy,{suffix:"%",maximumFractionDigits:0}),on("context","Context",M=>M.context,{suffix:"%",maximumFractionDigits:0}),on("usability","Usability",M=>M.usability,{suffix:"%",maximumFractionDigits:0}),on("totalScore","Total Score",M=>M.totalScore,{suffix:"%",maximumFractionDigits:0})],[oe]),se=p.useMemo(()=>[gr("name","Model",M=>M.name),on("count","Count",M=>M.count),gr("avgEditTime","Median Edit Time",M=>oe(M.avgEditTime)),gr("minEditTime","Min Edit Time",M=>oe(M.minEditTime)),gr("maxEditTime","Max Edit Time",M=>oe(M.maxEditTime))],[oe]),E=p.useMemo(()=>[gr("name","Model",M=>M.name),on("count","Count",M=>M.count),on("avgPercentageModified","Median % Modified",M=>M.avgPercentageModified,{suffix:"%",maximumFractionDigits:0}),on("minPercentageModified","Min % Modified",M=>M.minPercentageModified,{suffix:"%",maximumFractionDigits:0}),on("maxPercentageModified","Max % Modified",M=>M.maxPercentageModified,{suffix:"%",maximumFractionDigits:0})],[]),V=p.useMemo(()=>[gr("name","Model",M=>M.name),on("count","Total Count",M=>M.count),on("deleteCount","Delete Count",M=>M.deleteCount),on("deleteRate","Delete Rate",M=>M.deleteRate,{suffix:"%",maximumFractionDigits:1})],[]),fe=p.useMemo(()=>[gr("source","Source",M=>M.source),on("avgQuality","Average Quality",M=>M.avgQuality,{suffix:"%",maximumFractionDigits:0}),on("count","Count",M=>M.count)],[]),De=p.useMemo(()=>[gr("name","Model",M=>M.name),on("consistency","Consistency",M=>M.consistency,{suffix:"%",maximumFractionDigits:0}),on("avgScore","Average Score",M=>M.avgScore,{suffix:"%",maximumFractionDigits:0}),on("count","Count",M=>M.count)],[]),ce=p.useCallback(M=>n?M==="crisis_map"?n.crisisMaps.length:M==="drone_image"?n.droneImages.length:0:0,[n]),ve=p.useCallback(M=>{if(!n)return[];const ie=M==="crisis_map"?n.crisisMaps:n.droneImages,te={};return ie.forEach(K=>{K.countries&&K.countries.forEach(he=>{he.r_code&&(te[he.r_code]=(te[he.r_code]||0)+1)})}),Object.entries(te).filter(([,K])=>K>0).map(([K,he])=>({name:K,value:he}))},[n]),we=p.useCallback(M=>{if(!n)return[];const ie=M==="crisis_map"?n.crisisMaps:n.droneImages,te={};ie.forEach(he=>{he.countries&&he.countries.forEach(Ee=>{Ee.r_code&&(te[Ee.r_code]=(te[Ee.r_code]||0)+1)})});const K=_.reduce((he,Ee)=>(Ee.r_code&&(he[Ee.r_code]={name:Ee.label,count:te[Ee.r_code]||0}),he),{});return Object.entries(K).sort(([,he],[,Ee])=>Ee.count-he.count).map(([,{name:he,count:Ee}],Zt)=>({id:Zt+1,name:he,count:Ee,percentage:ie.length>0?Math.round(Ee/ie.length*100):0}))},[n,_]),je=p.useCallback(M=>{if(!n)return[];const ie=M==="crisis_map"?n.crisisMaps:n.droneImages,te={};return ie.forEach(K=>{K.source&&(te[K.source]=(te[K.source]||0)+1)}),Object.entries(te).filter(([,K])=>K>0).map(([K,he])=>({name:K,value:he}))},[n]),Re=p.useCallback(M=>{if(!n)return[];const ie=M==="crisis_map"?n.crisisMaps:n.droneImages,te={};return ie.forEach(K=>{K.source&&(te[K.source]=(te[K.source]||0)+1)}),Object.entries(te).sort(([,K],[,he])=>he-K).map(([K,he],Ee)=>({id:Ee+1,name:re(K),count:he,percentage:ie.length>0?Math.round(he/ie.length*100):0}))},[n,re]),Pe=p.useCallback(M=>{if(!n)return[];const ie=M==="crisis_map"?n.crisisMaps:n.droneImages,te={};return ie.forEach(K=>{K.event_type&&(te[K.event_type]=(te[K.event_type]||0)+1)}),Object.entries(te).filter(([,K])=>K>0).map(([K,he])=>({name:K,value:he}))},[n]),H=p.useCallback(M=>{if(!n)return[];const ie=M==="crisis_map"?n.crisisMaps:n.droneImages,te={};return ie.forEach(K=>{K.event_type&&(te[K.event_type]=(te[K.event_type]||0)+1)}),Object.entries(te).sort(([,K],[,he])=>he-K).map(([K,he],Ee)=>({id:Ee+1,name:R(K),count:he,percentage:ie.length>0?Math.round(he/ie.length*100):0}))},[n,R]),Te=p.useCallback(M=>{if(!n)return"No data available";const te=Object.entries(n.modelEditTimes).filter(([K])=>M==="crisis_map"?K.includes("GPT")||K.includes("Claude")||K.includes("Gemini")||K.includes("STUB"):M==="drone_image"?K.includes("Llama")||K.includes("Other"):!0).flatMap(([,K])=>K);return te.length===0?"No data available":oe(le(te))},[n,oe,le]),Ye=p.useCallback(()=>{if(!n)return"No data available";const M=n.totalCaptions||0,ie=n.percentageModified||0;return M>0?Math.round(ie/M*100):0},[n]),Je=p.useCallback(()=>n&&n.deleteRate>=0?`${n.deleteRate}%`:"No data available",[n]),jt=p.useCallback(M=>n?U.filter(te=>M==="crisis_map"?te.name.includes("GPT")||te.name.includes("Claude")||te.name.includes("Gemini")||te.name.includes("STUB"):M==="drone_image"?te.name.includes("Llama")||te.name.includes("Other"):!0):[],[n,U]),gt=p.useCallback(M=>n?J.filter(te=>M==="crisis_map"?te.name.includes("GPT")||te.name.includes("Claude")||te.name.includes("Gemini")||te.name.includes("STUB"):M==="drone_image"?te.name.includes("Llama")||te.name.includes("Other"):!0):[],[n,J]),Tt=p.useCallback(M=>{if(!n)return[];const ie=M==="crisis_map"?n.crisisMaps:n.droneImages,te={};return ie.forEach(K=>{K.model&&(te[K.model]||(te[K.model]={count:0,deleteCount:0}),te[K.model].count++)}),Object.entries(te).map(([K,he],Ee)=>{const Ze=n.models?.[K]?.deleteCount||0,vt=he.count>0?Math.round(Ze/he.count*100*10)/10:0;return{id:Ee+1,name:K,count:he.count,deleteCount:Ze,deleteRate:vt}}).sort((K,he)=>he.count-K.count)},[n]),ht=p.useCallback(M=>{if(!n)return[];const ie=M==="crisis_map"?n.crisisMaps:n.droneImages,te={};return ie.forEach(K=>{K.model&&(te[K.model]||(te[K.model]={count:0,totalAccuracy:0,totalContext:0,totalUsability:0}),te[K.model].count++,K.accuracy!=null&&(te[K.model].totalAccuracy+=K.accuracy),K.context!=null&&(te[K.model].totalContext+=K.context),K.usability!=null&&(te[K.model].totalUsability+=K.usability))}),Object.entries(te).map(([K,he],Ee)=>({id:Ee+1,name:K,count:he.count,accuracy:he.count>0?Math.round(he.totalAccuracy/he.count):0,context:he.count>0?Math.round(he.totalContext/he.count):0,usability:he.count>0?Math.round(he.totalUsability/he.count):0,totalScore:he.count>0?Math.round((he.totalAccuracy+he.totalContext+he.totalUsability)/(3*he.count)):0})).sort((K,he)=>he.totalScore-K.totalScore)},[n]),z=p.useCallback(M=>{if(!n)return[];const ie=M==="crisis_map"?n.crisisMaps:n.droneImages,te={};return ie.forEach(K=>{K.source&&(te[K.source]||(te[K.source]={total:0,count:0,totalImages:0}),te[K.source].totalImages+=1,K.accuracy!=null&&(te[K.source].total+=K.accuracy,te[K.source].count+=1))}),Object.entries(te).map(([K,he],Ee)=>({id:Ee+1,source:re(K),avgQuality:he.count>0?Math.round(he.total/he.count):0,count:he.totalImages}))},[n,re]),Oe=p.useCallback(M=>n?Y.filter(te=>M==="crisis_map"?te.name.includes("GPT")||te.name.includes("Claude")||te.name.includes("Gemini")||te.name.includes("STUB"):M==="drone_image"?te.name.includes("Llama")||te.name.includes("Other"):!0):[],[n,Y]);if(a)return u.jsx(cr,{children:u.jsx("div",{className:Le.loadingContainer,children:u.jsx(Ki,{})})});if(!n)return u.jsx(cr,{children:u.jsx("div",{className:Le.errorContainer,children:u.jsx("div",{className:"text-red-500",children:"Failed to load analytics data. Please try again."})})});const lt=["#F5333F","#F64752","#F75C65","#F87079","#F9858C","#FA999F","#FBADB2","#FCC2C5"];return u.jsx(cr,{children:u.jsxs("div",{className:"max-w-7xl mx-auto",children:[u.jsx("div",{className:Le.tabSelector,children:u.jsx(Za,{name:"analytics-view",value:c,onChange:M=>{(M==="crisis_maps"||M==="drone_images")&&f(M)},options:O,keySelector:M=>M.key,labelSelector:M=>M.label})}),c==="crisis_maps"?u.jsxs("div",{className:Le.chartGrid,children:[u.jsxs(Qe,{heading:"Summary Statistics",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:[u.jsxs("div",{className:Le.summaryStatsCards,children:[u.jsxs("div",{className:Le.summaryStatsCard,children:[u.jsx("div",{className:Le.summaryStatsCardValue,children:ce("crisis_map")}),u.jsx("div",{className:Le.summaryStatsCardLabel,children:"Total Crisis Maps"})]}),u.jsxs("div",{className:Le.summaryStatsCard,children:[u.jsx("div",{className:Le.summaryStatsCardValue,children:"2000"}),u.jsx("div",{className:Le.summaryStatsCardLabel,children:"Target Amount"})]})]}),u.jsxs("div",{className:Le.progressSection,children:[u.jsxs("div",{className:Le.progressLabel,children:[u.jsx("span",{children:"Progress towards target"}),u.jsxs("span",{children:[Math.round(ce("crisis_map")/2e3*100),"%"]})]}),u.jsx(e0,{value:ce("crisis_map"),totalValue:2e3})]})]}),u.jsx(Qe,{heading:"Regions Distribution",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:u.jsxs("div",{className:Le.chartSection,children:[u.jsx("div",{className:Le.chartContainer,children:u.jsx(Go,{data:ve("crisis_map"),valueSelector:M=>M.value,labelSelector:M=>M.name,keySelector:M=>M.name,colors:lt,showPercentageInLegend:!0})}),u.jsx("div",{className:Le.tableContainer,children:u.jsx(Mn,{data:we("crisis_map"),columns:xe,keySelector:Tn,filtered:!1,pending:!1})})]})}),u.jsx(Qe,{heading:"Sources Distribution",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:u.jsxs("div",{className:Le.chartSection,children:[u.jsx("div",{className:Le.chartContainer,children:u.jsx(Go,{data:je("crisis_map"),valueSelector:M=>M.value,labelSelector:M=>M.name,keySelector:M=>M.name,colors:lt,showPercentageInLegend:!0})}),u.jsx("div",{className:Le.tableContainer,children:u.jsx(Mn,{data:Re("crisis_map"),columns:ne,keySelector:Tn,filtered:!1,pending:!1})})]})}),u.jsx(Qe,{heading:"Types Distribution",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:u.jsxs("div",{className:Le.chartSection,children:[u.jsx("div",{className:Le.chartContainer,children:u.jsx(Go,{data:Pe("crisis_map"),valueSelector:M=>M.value,labelSelector:M=>M.name,keySelector:M=>M.name,colors:lt,showPercentageInLegend:!0})}),u.jsx("div",{className:Le.tableContainer,children:u.jsx(Mn,{data:H("crisis_map"),columns:Ne,keySelector:Tn,filtered:!1,pending:!1})})]})}),u.jsxs(Qe,{heading:"User Interaction Statistics",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:[u.jsxs("div",{className:Le.userInteractionCards,children:[u.jsxs("div",{className:Le.userInteractionCard,children:[u.jsx("div",{className:Le.userInteractionCardValue,children:Te("crisis_map")}),u.jsx("div",{className:Le.userInteractionCardLabel,children:"Median Edit Time"}),u.jsx(Me,{name:"view-edit-time-details",variant:x?"primary":"secondary",onClick:()=>F(x?"none":"editTime"),className:Le.userInteractionCardButton,children:x?"Hide Details":"View Details"})]}),u.jsxs("div",{className:Le.userInteractionCard,children:[u.jsx("div",{className:Le.userInteractionCardValue,children:Ye()}),u.jsx("div",{className:Le.userInteractionCardLabel,children:"Median % Modified"}),u.jsx(Me,{name:"view-percentage-details",variant:b?"primary":"secondary",onClick:()=>F(b?"none":"percentage"),className:Le.userInteractionCardButton,children:b?"Hide Details":"View Details"})]}),u.jsxs("div",{className:Le.userInteractionCard,children:[u.jsx("div",{className:Le.userInteractionCardValue,children:Je()}),u.jsx("div",{className:Le.userInteractionCardLabel,children:"Delete Rate"}),u.jsx(Me,{name:"view-delete-details",variant:N?"primary":"secondary",onClick:()=>F(N?"none":"delete"),className:Le.userInteractionCardButton,children:N?"Hide Details":"View Details"})]})]}),x&&u.jsx("div",{className:Le.modelPerformance,children:u.jsx(Mn,{data:jt("crisis_map"),columns:se,keySelector:Tn,filtered:!1,pending:!1})}),b&&u.jsx("div",{className:Le.modelPerformance,children:u.jsx(Mn,{data:gt("crisis_map"),columns:E,keySelector:Tn,filtered:!1,pending:!1})}),N&&u.jsx("div",{className:Le.modelPerformance,children:u.jsx(Mn,{data:Tt("crisis_map"),columns:V,keySelector:Tn,filtered:!1,pending:!1})})]}),u.jsx(Qe,{heading:"Model Performance",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:u.jsx("div",{className:Le.modelPerformance,children:u.jsx(Mn,{data:ht("crisis_map"),columns:X,keySelector:Tn,filtered:!1,pending:!1})})}),u.jsx(Qe,{heading:"Quality-Source Correlation",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:u.jsx("div",{className:Le.tableContainer,children:u.jsx(Mn,{data:z("crisis_map"),columns:fe,keySelector:Tn,filtered:!1,pending:!1})})}),u.jsx(Qe,{heading:"Model Consistency Analysis",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:u.jsx("div",{className:Le.tableContainer,children:u.jsx(Mn,{data:Oe("crisis_map"),columns:De,keySelector:Tn,filtered:!1,pending:!1})})})]}):u.jsxs("div",{className:Le.chartGrid,children:[u.jsxs(Qe,{heading:"Summary Statistics",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:[u.jsxs("div",{className:Le.summaryStatsCards,children:[u.jsxs("div",{className:Le.summaryStatsCard,children:[u.jsx("div",{className:Le.summaryStatsCardValue,children:ce("drone_image")}),u.jsx("div",{className:Le.summaryStatsCardLabel,children:"Total Drone Images"})]}),u.jsxs("div",{className:Le.summaryStatsCard,children:[u.jsx("div",{className:Le.summaryStatsCardValue,children:"2000"}),u.jsx("div",{className:Le.summaryStatsCardLabel,children:"Target Amount"})]})]}),u.jsxs("div",{className:Le.progressSection,children:[u.jsxs("div",{className:Le.progressLabel,children:[u.jsx("span",{children:"Progress towards target"}),u.jsxs("span",{children:[Math.round(ce("drone_image")/2e3*100),"%"]})]}),u.jsx(e0,{value:ce("drone_image"),totalValue:2e3})]})]}),u.jsx(Qe,{heading:"Regions Distribution",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:u.jsxs("div",{className:Le.chartSection,children:[u.jsx("div",{className:Le.chartContainer,children:u.jsx(Go,{data:ve("drone_image"),valueSelector:M=>M.value,labelSelector:M=>M.name,keySelector:M=>M.name,colors:lt,showPercentageInLegend:!0})}),u.jsx("div",{className:Le.tableContainer,children:u.jsx(Mn,{data:we("drone_image"),columns:xe,keySelector:Tn,filtered:!1,pending:!1})})]})}),u.jsx(Qe,{heading:"Types Distribution",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:u.jsxs("div",{className:Le.chartSection,children:[u.jsx("div",{className:Le.chartContainer,children:u.jsx(Go,{data:Pe("drone_image"),valueSelector:M=>M.value,labelSelector:M=>M.name,keySelector:M=>M.name,colors:lt,showPercentageInLegend:!0})}),u.jsx("div",{className:Le.tableContainer,children:u.jsx(Mn,{data:H("drone_image"),columns:Ne,keySelector:Tn,filtered:!1,pending:!1})})]})}),u.jsxs(Qe,{heading:"User Interaction Statistics",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:[u.jsxs("div",{className:Le.userInteractionCards,children:[u.jsxs("div",{className:Le.userInteractionCard,children:[u.jsx("div",{className:Le.userInteractionCardValue,children:Te("drone_image")}),u.jsx("div",{className:Le.userInteractionCardLabel,children:"Median Edit Time"}),u.jsx(Me,{name:"view-edit-time-details",variant:x?"primary":"secondary",onClick:()=>F(x?"none":"editTime"),className:Le.userInteractionCardButton,children:x?"Hide Details":"View Details"})]}),u.jsxs("div",{className:Le.userInteractionCard,children:[u.jsx("div",{className:Le.userInteractionCardValue,children:Ye()}),u.jsx("div",{className:Le.userInteractionCardLabel,children:"Median % Modified"}),u.jsx(Me,{name:"view-percentage-details",variant:b?"primary":"secondary",onClick:()=>F(b?"none":"percentage"),className:Le.userInteractionCardButton,children:b?"Hide Details":"View Details"})]}),u.jsxs("div",{className:Le.userInteractionCard,children:[u.jsx("div",{className:Le.userInteractionCardValue,children:Je()}),u.jsx("div",{className:Le.userInteractionCardLabel,children:"Delete Rate"}),u.jsx(Me,{name:"view-delete-details",variant:N?"primary":"secondary",onClick:()=>F(N?"none":"delete"),className:Le.userInteractionCardButton,children:N?"Hide Details":"View Details"})]})]}),x&&u.jsx("div",{className:Le.modelPerformance,children:u.jsx(Mn,{data:jt("drone_image"),columns:se,keySelector:Tn,filtered:!1,pending:!1})}),b&&u.jsx("div",{className:Le.modelPerformance,children:u.jsx(Mn,{data:gt("drone_image"),columns:E,keySelector:Tn,filtered:!1,pending:!1})}),N&&u.jsx("div",{className:Le.modelPerformance,children:u.jsx(Mn,{data:Tt("drone_image"),columns:V,keySelector:Tn,filtered:!1,pending:!1})})]}),u.jsx(Qe,{heading:"Model Performance",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:u.jsx("div",{className:Le.modelPerformance,children:u.jsx(Mn,{data:ht("drone_image"),columns:X,keySelector:Tn,filtered:!1,pending:!1})})}),u.jsx(Qe,{heading:"Quality-Source Correlation",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:u.jsx("div",{className:Le.tableContainer,children:u.jsx(Mn,{data:z("drone_image"),columns:fe,keySelector:Tn,filtered:!1,pending:!1})})}),u.jsx(Qe,{heading:"Model Consistency Analysis",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:u.jsx("div",{className:Le.tableContainer,children:u.jsx(Mn,{data:Oe("drone_image"),columns:De,keySelector:Tn,filtered:!1,pending:!1})})})]})]})})}const hI="modulepreload",pI=function(e){return"/app/"+e},h0={},Hy=function(n,i,a){let s=Promise.resolve();if(i&&i.length>0){let g=function(y){return Promise.all(y.map(w=>Promise.resolve(w).then(_=>({status:"fulfilled",value:_}),_=>({status:"rejected",reason:_}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),d=f?.nonce||f?.getAttribute("nonce");s=g(i.map(y=>{if(y=pI(y),y in h0)return;h0[y]=!0;const w=y.endsWith(".css"),_=w?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${y}"]${_}`))return;const v=document.createElement("link");if(v.rel=w?"stylesheet":hI,w||(v.as="script"),v.crossOrigin="",v.href=y,d&&v.setAttribute("nonce",d),document.head.appendChild(v),w)return new Promise((x,S)=>{v.addEventListener("load",x),v.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${y}`)))})}))}function c(f){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=f,window.dispatchEvent(d),!d.defaultPrevented)throw f}return s.then(f=>{for(const d of f||[])d.status==="rejected"&&c(d.reason);return n().catch(c)})},qy=p.createContext(void 0),oh=()=>{const e=p.useContext(qy);if(e===void 0)throw new Error("useFilterContext must be used within a FilterProvider");return e},mI=({children:e})=>{const[n,i]=p.useState(""),[a,s]=p.useState(""),[c,f]=p.useState(""),[d,g]=p.useState(""),[y,w]=p.useState(""),[_,v]=p.useState(""),[x,S]=p.useState(!1),j={search:n,srcFilter:a,catFilter:c,regionFilter:d,countryFilter:y,imageTypeFilter:_,showReferenceExamples:x,setSearch:i,setSrcFilter:s,setCatFilter:f,setRegionFilter:g,setCountryFilter:w,setImageTypeFilter:v,setShowReferenceExamples:S,clearAllFilters:()=>{i(""),s(""),f(""),g(""),w(""),v(""),S(!1)}};return u.jsx(qy.Provider,{value:j,children:e})},gI="_tabSelector_o9y1f_1",vI="_metadataTags_o9y1f_8",yI="_metadataTag_o9y1f_8",xI="_metadataTagSource_o9y1f_32",wI="_metadataTagType_o9y1f_43",_I="_mapItem_o9y1f_54",CI="_mapItemImage_o9y1f_72",bI="_mapItemContent_o9y1f_92",SI="_mapItemTitle_o9y1f_97",NI="_mapItemMetadata_o9y1f_105",EI="_fullSizeModalOverlay_o9y1f_134",kI="_fullSizeModalContent_o9y1f_148",jI="_ratingWarningContent_o9y1f_159",TI="_ratingWarningTitle_o9y1f_165",MI="_ratingWarningButtons_o9y1f_179",PI="_filterStatusContainer_o9y1f_189",II="_filterStatusMessage_o9y1f_194",LI="_filterStatusCount_o9y1f_201",DI="_activeFiltersList_o9y1f_209",RI="_activeFilter_o9y1f_209",OI="_filterStatusActions_o9y1f_226",AI="_exportModeSection_o9y1f_234",$I="_splitConfigSection_o9y1f_246",FI="_splitConfigTitle_o9y1f_251",zI="_splitInputsContainer_o9y1f_258",BI="_splitInputGroup_o9y1f_266",UI="_splitInputLabel_o9y1f_273",HI="_splitInput_o9y1f_258",qI="_splitTotal_o9y1f_298",VI="_splitTotalError_o9y1f_305",WI="_checkboxesContainer_o9y1f_310",ct={tabSelector:gI,metadataTags:vI,metadataTag:yI,metadataTagSource:xI,metadataTagType:wI,mapItem:_I,mapItemImage:CI,mapItemContent:bI,mapItemTitle:SI,mapItemMetadata:NI,fullSizeModalOverlay:EI,fullSizeModalContent:kI,ratingWarningContent:jI,ratingWarningTitle:TI,ratingWarningButtons:MI,filterStatusContainer:PI,filterStatusMessage:II,filterStatusCount:LI,activeFiltersList:DI,activeFilter:RI,filterStatusActions:OI,exportModeSection:AI,splitConfigSection:$I,splitConfigTitle:FI,splitInputsContainer:zI,splitInputGroup:BI,splitInputLabel:UI,splitInput:HI,splitTotal:qI,splitTotalError:VI,checkboxesContainer:WI};function GI(){const e=aa(),[n,i]=p.useState("explore"),[a,s]=p.useState([]),{search:c,setSearch:f,srcFilter:d,setSrcFilter:g,catFilter:y,setCatFilter:w,regionFilter:_,setRegionFilter:v,countryFilter:x,setCountryFilter:S,imageTypeFilter:b,setImageTypeFilter:j,showReferenceExamples:N,setShowReferenceExamples:I,clearAllFilters:F}=oh(),[O,Z]=p.useState([]),[ye,D]=p.useState([]),[re,le]=p.useState([]),[oe,R]=p.useState([]),[U,J]=p.useState([]),[Y,xe]=p.useState(!0),[Ne,ne]=p.useState(!0),[X,se]=p.useState(!1),[E,V]=p.useState("filters"),[fe,De]=p.useState("standard"),[ce,ve]=p.useState(80),[we,je]=p.useState(10),[Re,Pe]=p.useState(10),[H,Te]=p.useState(!0),[Ye,Je]=p.useState(!0),jt=[{key:"explore",label:"List"},{key:"mapDetails",label:"Carousel"}],gt=()=>{ne(!0),fetch("/api/captions").then(z=>{if(!z.ok)throw new Error(`HTTP ${z.status}: ${z.statusText}`);return z.json()}).then(z=>{if(Array.isArray(z)){const Oe=z.filter(lt=>lt.generated&<.model);s(Oe)}else s([])}).catch(()=>{s([])}).finally(()=>{ne(!1)})};p.useEffect(()=>{gt()},[]),p.useEffect(()=>{const z=()=>{document.hidden||gt()};return document.addEventListener("visibilitychange",z),()=>{document.removeEventListener("visibilitychange",z)}},[]),p.useEffect(()=>{xe(!0),Promise.all([fetch("/api/sources").then(z=>{if(!z.ok)throw new Error(`HTTP ${z.status}: ${z.statusText}`);return z.json()}),fetch("/api/types").then(z=>{if(!z.ok)throw new Error(`HTTP ${z.status}: ${z.statusText}`);return z.json()}),fetch("/api/regions").then(z=>{if(!z.ok)throw new Error(`HTTP ${z.status}: ${z.statusText}`);return z.json()}),fetch("/api/countries").then(z=>{if(!z.ok)throw new Error(`HTTP ${z.status}: ${z.statusText}`);return z.json()}),fetch("/api/image-types").then(z=>{if(!z.ok)throw new Error(`HTTP ${z.status}: ${z.statusText}`);return z.json()})]).then(([z,Oe,lt,M,ie])=>{Z(z),D(Oe),le(lt),R(M),J(ie)}).catch(()=>{}).finally(()=>{xe(!1)})},[]);const Tt=p.useMemo(()=>a.filter(z=>{const Oe=!c||z.title?.toLowerCase().includes(c.toLowerCase())||z.generated?.toLowerCase().includes(c.toLowerCase())||z.source?.toLowerCase().includes(c.toLowerCase())||z.event_type?.toLowerCase().includes(c.toLowerCase()),lt=!d||z.source===d,M=!y||z.event_type===y,ie=!_||z.countries.some(Ee=>Ee.r_code===_),te=!x||z.countries.some(Ee=>Ee.c_code===x),K=!b||z.image_type===b,he=!N||z.starred===!0;return Oe&<&&M&&ie&&te&&K&&he}),[a,c,d,y,_,x,b,N]),ht=async(z,Oe="fine-tuning")=>{if(z.length===0){alert("No images to export");return}try{const lt=(await Hy(async()=>{const{default:Ze}=await import("./jszip.min-nJKPel3e.js").then(vt=>vt.j);return{default:Ze}},[])).default,M=new lt,ie=z.filter(Ze=>Ze.image_type==="crisis_map"),te=z.filter(Ze=>Ze.image_type==="drone_image");if(ie.length>0){const Ze=M.folder("crisis_maps_dataset"),vt=Ze?.folder("images");if(vt){const ue=ie.map(async(_e,Bt)=>{try{const ot=await fetch(_e.image_url);if(!ot.ok)throw new Error(`Failed to fetch image ${_e.image_id}`);const nn=await ot.blob(),W=_e.file_key.split(".").pop()||"jpg",Se=`${String(Bt+1).padStart(4,"0")}.${W}`;return vt.file(Se,nn),{success:!0,fileName:Se,image:_e}}catch(ot){return console.error(`Failed to process image ${_e.image_id}:`,ot),{success:!1,fileName:"",image:_e}}}),Mt=(await Promise.all(ue)).filter(_e=>_e.success);if(Oe==="fine-tuning"){const _e=[],Bt=[],ot=[],nn=new Map;Mt.forEach(W=>{const Se=W.image.source||"unknown";nn.has(Se)||nn.set(Se,[]),nn.get(Se).push(W)}),nn.forEach((W,Se)=>{const at=W.length,Ge=Math.floor(at*(ce/100)),Xe=Math.floor(at*(we/100)),Ie=[...W].sort(()=>Math.random()-.5);_e.push(...Ie.slice(0,Ge).map(ee=>({image:`images/${ee.fileName}`,caption:ee.image.edited||ee.image.generated||"",metadata:{image_id:ee.image.image_id,title:ee.image.title,source:ee.image.source,event_type:ee.image.event_type,image_type:ee.image.image_type,countries:ee.image.countries,starred:ee.image.starred}}))),Bt.push(...Ie.slice(Ge,Ge+Xe).map(ee=>({image:`images/${ee.fileName}`,caption:ee.image.edited||ee.image.generated||"",metadata:{image_id:ee.image.image_id,title:ee.image.title,source:ee.image.source,event_type:ee.image.event_type,image_type:ee.image.image_type,countries:ee.image.countries,starred:ee.image.starred}}))),ot.push(...Ie.slice(Ge+Xe).map(ee=>({image:`images/${ee.fileName}`,caption:ee.image.edited||ee.image.generated||"",metadata:{image_id:ee.image.image_id,title:ee.image.title,source:ee.image.source,event_type:ee.image.event_type,image_type:ee.image.image_type,countries:ee.image.countries,starred:ee.image.starred}})))}),Ze&&(Ze.file("train.jsonl",JSON.stringify(_e,null,2)),Ze.file("test.jsonl",JSON.stringify(Bt,null,2)),Ze.file("val.jsonl",JSON.stringify(ot,null,2)))}else Mt.forEach((_e,Bt)=>{const ot={image:`images/${_e.fileName}`,caption:_e.image.edited||_e.image.generated||"",metadata:{image_id:_e.image.image_id,title:_e.image.title,source:_e.image.source,event_type:_e.image.event_type,image_type:_e.image.image_type,countries:_e.image.countries,starred:_e.image.starred}};Ze&&Ze.file(`${String(Bt+1).padStart(4,"0")}.json`,JSON.stringify(ot,null,2))})}}if(te.length>0){const Ze=M.folder("drone_images_dataset"),vt=Ze?.folder("images");if(vt){const ue=te.map(async(_e,Bt)=>{try{const ot=await fetch(_e.image_url);if(!ot.ok)throw new Error(`Failed to fetch image ${_e.image_id}`);const nn=await ot.blob(),W=_e.file_key.split(".").pop()||"jpg",Se=`${String(Bt+1).padStart(4,"0")}.${W}`;return vt.file(Se,nn),{success:!0,fileName:Se,image:_e}}catch(ot){return console.error(`Failed to process image ${_e.image_id}:`,ot),{success:!1,fileName:"",image:_e}}}),Mt=(await Promise.all(ue)).filter(_e=>_e.success);if(Oe==="fine-tuning"){const _e=[],Bt=[],ot=[],nn=new Map;Mt.forEach(W=>{const Se=W.image.event_type||"unknown";nn.has(Se)||nn.set(Se,[]),nn.get(Se).push(W)}),nn.forEach((W,Se)=>{const at=W.length,Ge=Math.floor(at*(ce/100)),Xe=Math.floor(at*(we/100)),Ie=[...W].sort(()=>Math.random()-.5);_e.push(...Ie.slice(0,Ge).map(ee=>({image:`images/${ee.fileName}`,caption:ee.image.edited||ee.image.generated||"",metadata:{image_id:ee.image.image_id,title:ee.image.title,source:ee.image.source,event_type:ee.image.event_type,image_type:ee.image.image_type,countries:ee.image.countries,starred:ee.image.starred}}))),Bt.push(...Ie.slice(Ge,Ge+Xe).map(ee=>({image:`images/${ee.fileName}`,caption:ee.image.edited||ee.image.generated||"",metadata:{image_id:ee.image.image_id,title:ee.image.title,source:ee.image.source,event_type:ee.image.event_type,image_type:ee.image.image_type,countries:ee.image.countries,starred:ee.image.starred}}))),ot.push(...Ie.slice(Ge+Xe).map(ee=>({image:`images/${ee.fileName}`,caption:ee.image.edited||ee.image.generated||"",metadata:{image_id:ee.image.image_id,title:ee.image.title,source:ee.image.source,event_type:ee.image.event_type,image_type:ee.image.image_type,countries:ee.image.countries,starred:ee.image.starred}})))}),Ze&&(Ze.file("train.jsonl",JSON.stringify(_e,null,2)),Ze.file("test.jsonl",JSON.stringify(Bt,null,2)),Ze.file("val.jsonl",JSON.stringify(ot,null,2)))}else Mt.forEach((_e,Bt)=>{const ot={image:`images/${_e.fileName}`,caption:_e.image.edited||_e.image.generated||"",metadata:{image_id:_e.image.image_id,title:_e.image.title,source:_e.image.source,event_type:_e.image.event_type,image_type:_e.image.image_type,countries:_e.image.countries,starred:_e.image.starred}};Ze&&Ze.file(`${String(Bt+1).padStart(4,"0")}.json`,JSON.stringify(ot,null,2))})}}const K=await M.generateAsync({type:"blob"}),he=URL.createObjectURL(K),Ee=document.createElement("a");Ee.href=he,Ee.download=`datasets_${Oe}_${new Date().toISOString().split("T")[0]}.zip`,document.body.appendChild(Ee),Ee.click(),document.body.removeChild(Ee),URL.revokeObjectURL(he);const Zt=(ie.length||0)+(te.length||0);console.log(`Exported ${Oe} datasets with ${Zt} total images:`),ie.length>0&&console.log(`- Crisis maps: ${ie.length} images`),te.length>0&&console.log(`- Drone images: ${te.length} images`)}catch(lt){console.error("Export failed:",lt),alert("Failed to export dataset. Please try again.")}};return u.jsxs(cr,{children:[u.jsxs("div",{className:"max-w-7xl mx-auto",children:[u.jsxs("div",{className:ct.tabSelector,children:[u.jsx(Za,{name:"explore-view",value:n,onChange:z=>{(z==="explore"||z==="mapDetails")&&(i(z),z==="mapDetails"&&a.length>0&&e(`/map/${a[0].image_id}`))},options:jt,keySelector:z=>z.key,labelSelector:z=>z.label}),u.jsx(Me,{name:"export-dataset",variant:"secondary",onClick:()=>{se(!0),V(c||d||y||_||x||b||N?"filters":"export")},children:"Export Dataset"})]}),n==="explore"?u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"mb-6 space-y-4",children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[u.jsx(Qe,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2 flex-1 min-w-[300px]",children:u.jsx(gn,{name:"search",placeholder:"Search examples...",value:c,onChange:z=>f(z||"")})}),u.jsx(Qe,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:u.jsxs(Me,{name:"reference-examples",variant:N?"primary":"secondary",onClick:()=>I(!N),className:"whitespace-nowrap",children:[u.jsx("span",{className:"mr-2",children:N?u.jsx("span",{className:"text-yellow-400",children:"★"}):u.jsx("span",{className:"text-yellow-400",children:"☆"})}),"Reference Examples"]})}),u.jsx(Qe,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:u.jsx(Me,{name:"clear-filters",variant:"secondary",onClick:F,children:"Clear Filters"})})]}),u.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[u.jsx(Qe,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:u.jsx(Un,{name:"source",placeholder:Y?"Loading...":"All Sources",options:O,value:d||null,onChange:z=>g(z||""),keySelector:z=>z.s_code,labelSelector:z=>z.label,required:!1,disabled:Y})}),u.jsx(Qe,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:u.jsx(Un,{name:"category",placeholder:Y?"Loading...":"All Categories",options:ye,value:y||null,onChange:z=>w(z||""),keySelector:z=>z.t_code,labelSelector:z=>z.label,required:!1,disabled:Y})}),u.jsx(Qe,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:u.jsx(Un,{name:"region",placeholder:Y?"Loading...":"All Regions",options:re,value:_||null,onChange:z=>v(z||""),keySelector:z=>z.r_code,labelSelector:z=>z.label,required:!1,disabled:Y})}),u.jsx(Qe,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:u.jsx(ih,{name:"country",placeholder:Y?"Loading...":"All Countries",options:oe,value:x?[x]:[],onChange:z=>S(z[0]||""),keySelector:z=>z.c_code,labelSelector:z=>z.label,disabled:Y})}),u.jsx(Qe,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:u.jsx(Un,{name:"imageType",placeholder:Y?"Loading...":"All Image Types",options:U,value:b||null,onChange:z=>j(z||""),keySelector:z=>z.image_type,labelSelector:z=>z.label,required:!1,disabled:Y})})]})]}),u.jsxs("div",{className:"space-y-4",children:[u.jsx("div",{className:"flex justify-between items-center",children:u.jsxs("p",{className:"text-sm text-gray-600",children:[Tt.length," of ",a.length," examples"]})}),Ne&&u.jsx("div",{className:"text-center py-12",children:u.jsxs("div",{className:"flex flex-col items-center gap-4",children:[u.jsx(Ki,{className:"text-ifrcRed"}),u.jsx("div",{children:"Loading examples..."})]})}),!Ne&&u.jsxs("div",{className:"space-y-4",children:[Tt.map(z=>u.jsxs("div",{className:ct.mapItem,onClick:()=>e(`/map/${z.image_id}`),children:[u.jsx("div",{className:ct.mapItemImage,style:{width:"120px",height:"80px"},children:z.image_url?u.jsx("img",{src:z.image_url,alt:z.file_key,onError:Oe=>{const lt=Oe.target;lt.style.display="none",lt.parentElement.innerHTML="Img"}}):"Img"}),u.jsxs("div",{className:ct.mapItemContent,children:[u.jsx("h3",{className:ct.mapItemTitle,children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{children:z.title||"Untitled"}),z.starred&&u.jsx("span",{className:"text-red-500 text-lg",title:"Starred image",children:"★"})]})}),u.jsx("div",{className:ct.mapItemMetadata,children:u.jsxs("div",{className:ct.metadataTags,children:[z.image_type!=="drone_image"&&u.jsx("span",{className:ct.metadataTagSource,children:O.find(Oe=>Oe.s_code===z.source)?.label||z.source}),u.jsx("span",{className:ct.metadataTagType,children:ye.find(Oe=>Oe.t_code===z.event_type)?.label||z.event_type}),u.jsx("span",{className:ct.metadataTag,children:U.find(Oe=>Oe.image_type===z.image_type)?.label||z.image_type}),z.countries&&z.countries.length>0&&u.jsxs(u.Fragment,{children:[u.jsx("span",{className:ct.metadataTag,children:re.find(Oe=>Oe.r_code===z.countries[0].r_code)?.label||"Unknown Region"}),u.jsx("span",{className:ct.metadataTag,children:z.countries.map(Oe=>Oe.label).join(", ")})]})]})})]})]},z.image_id)),!Tt.length&&u.jsx("div",{className:"text-center py-12",children:u.jsx("p",{className:"text-gray-500",children:"No examples found."})})]})]})]}):u.jsx("div",{className:"space-y-6",children:u.jsxs("div",{className:"text-center py-12",children:[u.jsx("p",{className:"text-gray-500",children:"Map Details view coming soon..."}),u.jsx("p",{className:"text-sm text-gray-400 mt-2",children:"This will show detailed information about individual maps"})]})})]}),X&&u.jsx("div",{className:ct.fullSizeModalOverlay,onClick:()=>se(!1),children:u.jsx("div",{className:ct.fullSizeModalContent,onClick:z=>z.stopPropagation(),children:u.jsx("div",{className:ct.ratingWarningContent,children:E==="filters"?u.jsxs(u.Fragment,{children:[u.jsx("h3",{className:ct.ratingWarningTitle,children:"Export Dataset"}),u.jsx("div",{className:ct.filterStatusContainer,children:c||d||y||_||x||b||N?u.jsxs(u.Fragment,{children:[u.jsx("div",{className:ct.filterStatusMessage,children:"Filters are being applied"}),u.jsxs("div",{className:ct.filterStatusCount,children:[Tt.length," of ",a.length," examples"]}),u.jsxs("div",{className:ct.activeFiltersList,children:[c&&u.jsxs("span",{className:ct.activeFilter,children:['Search: "',c,'"']}),d&&u.jsxs("span",{className:ct.activeFilter,children:["Source: ",O.find(z=>z.s_code===d)?.label||d]}),y&&u.jsxs("span",{className:ct.activeFilter,children:["Category: ",ye.find(z=>z.t_code===y)?.label||y]}),_&&u.jsxs("span",{className:ct.activeFilter,children:["Region: ",re.find(z=>z.r_code===_)?.label||_]}),x&&u.jsxs("span",{className:ct.activeFilter,children:["Country: ",oe.find(z=>z.c_code===x)?.label||x]}),b&&u.jsxs("span",{className:ct.activeFilter,children:["Type: ",U.find(z=>z.image_type===b)?.label||b]}),N&&u.jsx("span",{className:ct.activeFilter,children:"Reference Examples Only"})]}),u.jsxs("div",{className:ct.filterStatusActions,children:[u.jsx(Me,{name:"clear-filters-modal",variant:"secondary",size:1,onClick:F,children:"Clear Filters"}),u.jsx(Me,{name:"continue-with-filters",variant:"primary",size:1,onClick:()=>V("export"),children:"Continue"})]})]}):u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:ct.filterStatusCount,children:[a.length," examples available"]}),u.jsx(Me,{name:"continue-no-filters",variant:"primary",size:1,onClick:()=>V("export"),children:"Continue"})]})}),u.jsx("div",{className:ct.ratingWarningButtons,children:u.jsx(Me,{name:"cancel-export",variant:"tertiary",onClick:()=>{se(!1),V("filters")},children:"Cancel"})})]}):u.jsxs(u.Fragment,{children:[u.jsx("h3",{className:ct.ratingWarningTitle,children:"Export Dataset"}),u.jsx("div",{className:ct.exportModeSection,children:u.jsx(Za,{name:"export-mode",value:fe,onChange:z=>{(z==="standard"||z==="fine-tuning")&&De(z)},options:[{key:"standard",label:"Standard"},{key:"fine-tuning",label:"Fine-tuning"}],keySelector:z=>z.key,labelSelector:z=>z.label})}),fe==="fine-tuning"&&u.jsxs("div",{className:ct.splitConfigSection,children:[u.jsx("div",{className:ct.splitConfigTitle,children:"Dataset Split Configuration"}),u.jsxs("div",{className:ct.splitInputsContainer,children:[u.jsxs("div",{className:ct.splitInputGroup,children:[u.jsx("label",{htmlFor:"train-split",className:ct.splitInputLabel,children:"Train (%)"}),u.jsx("input",{id:"train-split",type:"number",min:"0",max:"100",value:ce,onChange:z=>{const Oe=parseInt(z.target.value)||0,lt=100-Oe;lt>=0&&(ve(Oe),we+Re>lt&&(je(Math.floor(lt/2)),Pe(lt-Math.floor(lt/2))))},className:ct.splitInput})]}),u.jsxs("div",{className:ct.splitInputGroup,children:[u.jsx("label",{htmlFor:"test-split",className:ct.splitInputLabel,children:"Test (%)"}),u.jsx("input",{id:"test-split",type:"number",min:"0",max:"100",value:we,onChange:z=>{const Oe=parseInt(z.target.value)||0,lt=100-ce-Oe;lt>=0&&(je(Oe),Pe(lt))},className:ct.splitInput})]}),u.jsxs("div",{className:ct.splitInputGroup,children:[u.jsx("label",{htmlFor:"val-split",className:ct.splitInputLabel,children:"Val (%)"}),u.jsx("input",{id:"val-split",type:"number",min:"0",max:"100",value:Re,onChange:z=>{const Oe=parseInt(z.target.value)||0,lt=100-ce-Oe;lt>=0&&(Pe(Oe),je(lt))},className:ct.splitInput})]})]}),ce+we+Re!==100&&u.jsx("div",{className:ct.splitTotal,children:u.jsx("span",{className:ct.splitTotalError,children:"Must equal 100%"})})]}),u.jsxs("div",{className:ct.checkboxesContainer,children:[u.jsx("div",{className:"flex items-center gap-3",children:u.jsx(Xl,{name:"crisis-maps",label:`Crisis Maps (${Tt.filter(z=>z.image_type==="crisis_map").length} images)`,value:H,onChange:(z,Oe)=>Te(z),disabled:Y})}),u.jsx("div",{className:"flex items-center gap-3",children:u.jsx(Xl,{name:"drone-images",label:`Drone Images (${Tt.filter(z=>z.image_type==="drone_image").length} images)`,value:Ye,onChange:(z,Oe)=>Je(z),disabled:Y})})]}),u.jsxs("div",{className:ct.ratingWarningButtons,children:[(c||d||y||_||x||b||N)&&u.jsx(Me,{name:"back-to-filters",variant:"secondary",onClick:()=>V("filters"),children:"Back to Filters"}),u.jsx(Me,{name:"confirm-export",onClick:()=>{if(!H&&!Ye){alert("Please select at least one image type to export.");return}const z=[];H&&z.push("crisis_map"),Ye&&z.push("drone_image");const Oe=Tt.filter(lt=>z.includes(lt.image_type));ht(Oe,fe),se(!1),V("filters")},children:"Export Selected"})]})]})})})})]})}function ZI(){const e=aa(),{setShowReferenceExamples:n}=oh(),i=()=>{e("/upload")},a=()=>{n(!0),e("/explore")},s=()=>{e("/analytics?view=crisis_maps")};return u.jsx(cr,{className:"py-10",children:u.jsx(Qe,{withInternalPadding:!0,className:"max-w-4xl mx-auto",children:u.jsxs("div",{className:"space-y-8",children:[u.jsxs(Qe,{withInternalPadding:!0,className:"p-8",children:[u.jsx($a,{level:3,className:"mb-4 text-ifrcRed font-semibold",children:"Introduction"}),u.jsx("p",{className:"text-gray-700 leading-relaxed text-base",children:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."}),u.jsx("div",{className:"mt-6",children:u.jsx(Me,{name:"upload-now",variant:"primary",onClick:i,children:"Upload now →"})})]}),u.jsxs(Qe,{withInternalPadding:!0,className:"p-8",children:[u.jsx($a,{level:3,className:"mb-4 text-ifrcRed font-semibold",children:"Guidelines"}),u.jsx("p",{className:"text-gray-700 leading-relaxed text-base",children:"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt."}),u.jsx("div",{className:"mt-6",children:u.jsx(Me,{name:"see-examples",variant:"primary",onClick:a,children:"See examples →"})})]}),u.jsxs(Qe,{withInternalPadding:!0,className:"p-8",children:[u.jsx($a,{level:3,className:"mb-4 text-ifrcRed font-semibold",children:"VLMs"}),u.jsx("p",{className:"text-gray-700 leading-relaxed text-base",children:"At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio."}),u.jsx("div",{className:"mt-6",children:u.jsx(Me,{name:"view-vlm-details",variant:"primary",onClick:s,children:"View VLM details →"})})]})]})})})}const QI="_tabSelector_1iaxx_1",JI="_imageContainer_1iaxx_12",KI="_imagePlaceholder_1iaxx_33",YI="_metadataTags_1iaxx_45",XI="_metadataTag_1iaxx_45",e4="_captionContainer_1iaxx_67",t4="_captionText_1iaxx_74",n4="_gridLayout_1iaxx_131",r4="_detailsSection_1iaxx_143",i4="_loadingContainer_1iaxx_149",a4="_errorContainer_1iaxx_159",o4="_fullSizeModalOverlay_1iaxx_193",s4="_fullSizeModalContent_1iaxx_207",l4="_ratingWarningContent_1iaxx_218",c4="_ratingWarningTitle_1iaxx_224",u4="_ratingWarningText_1iaxx_231",d4="_ratingWarningButtons_1iaxx_238",f4="_exportModeSection_1iaxx_260",h4="_splitConfigSection_1iaxx_272",p4="_splitConfigTitle_1iaxx_277",m4="_splitInputsContainer_1iaxx_284",g4="_splitInputGroup_1iaxx_292",v4="_splitInputLabel_1iaxx_299",y4="_splitInput_1iaxx_284",x4="_splitTotal_1iaxx_324",w4="_splitTotalError_1iaxx_331",_4="_checkboxesContainer_1iaxx_347",bt={tabSelector:QI,imageContainer:JI,imagePlaceholder:KI,metadataTags:YI,metadataTag:XI,captionContainer:e4,captionText:t4,gridLayout:n4,detailsSection:r4,loadingContainer:i4,errorContainer:a4,fullSizeModalOverlay:o4,fullSizeModalContent:s4,ratingWarningContent:l4,ratingWarningTitle:c4,ratingWarningText:u4,ratingWarningButtons:d4,exportModeSection:f4,splitConfigSection:h4,splitConfigTitle:p4,splitInputsContainer:m4,splitInputGroup:g4,splitInputLabel:v4,splitInput:y4,splitTotal:x4,splitTotalError:w4,checkboxesContainer:_4};function C4(){const{mapId:e}=Dw(),n=aa(),{isAuthenticated:i}=ah(),[a,s]=p.useState("mapDetails"),[c,f]=p.useState(null),[d,g]=p.useState(!0),[y,w]=p.useState(null),[_,v]=p.useState([]),[x,S]=p.useState([]),[b,j]=p.useState([]),[N,I]=p.useState([]),[F,O]=p.useState([]),[Z,ye]=p.useState(!1),[D,re]=p.useState(!1),[le,oe]=p.useState(!1),[R,U]=p.useState(!1),[J,Y]=p.useState(!1),[xe,Ne]=p.useState("standard"),[ne,X]=p.useState(80),[se,E]=p.useState(10),[V,fe]=p.useState(10),[De,ce]=p.useState(!0),[ve,we]=p.useState(!0),[je,Re]=p.useState(!1),{search:Pe,setSearch:H,srcFilter:Te,setSrcFilter:Ye,catFilter:Je,setCatFilter:jt,regionFilter:gt,setRegionFilter:Tt,countryFilter:ht,setCountryFilter:z,imageTypeFilter:Oe,setImageTypeFilter:lt,showReferenceExamples:M,setShowReferenceExamples:ie,clearAllFilters:te}=oh(),K=[{key:"explore",label:"List"},{key:"mapDetails",label:"Carousel"}],he=p.useCallback(async W=>{oe(!0),g(!0);try{const Se=await fetch(`/api/images/${W}`);if(!Se.ok)throw new Error("Map not found");const at=await Se.json();f(at),await Ee(W)}catch(Se){w(Se instanceof Error?Se.message:"Unknown error occurred")}finally{g(!1),oe(!1)}},[]);p.useEffect(()=>{if(!e){w("Map ID is required"),g(!1);return}he(e)},[e,he]),p.useEffect(()=>{if(!c||d||je)return;(()=>{const Se=!Pe||c.title?.toLowerCase().includes(Pe.toLowerCase())||c.generated?.toLowerCase().includes(Pe.toLowerCase())||c.source?.toLowerCase().includes(Pe.toLowerCase())||c.event_type?.toLowerCase().includes(Pe.toLowerCase()),at=!Te||c.source===Te,Ge=!Je||c.event_type===Je,Xe=!gt||c.countries.some(mt=>mt.r_code===gt),Ie=!ht||c.countries.some(mt=>mt.c_code===ht),ee=!Oe||c.image_type===Oe,ut=!M||c.starred===!0;return Se&&at&&Ge&&Xe&&Ie&&ee&&ut})()||fetch("/api/images").then(Se=>Se.json()).then(Se=>{const at=Se.find(Ge=>{const Xe=!Pe||Ge.title?.toLowerCase().includes(Pe.toLowerCase())||Ge.generated?.toLowerCase().includes(Pe.toLowerCase())||Ge.source?.toLowerCase().includes(Pe.toLowerCase())||Ge.event_type?.toLowerCase().includes(Pe.toLowerCase()),Ie=!Te||Ge.source===Te,ee=!Je||Ge.event_type===Je,ut=!gt||Ge.countries?.some(qt=>qt.r_code===gt),mt=!ht||Ge.countries?.some(qt=>qt.c_code===ht),dn=!Oe||Ge.image_type===Oe,rn=!M||Ge.starred===!0;return Xe&&Ie&&ee&&ut&&mt&&dn&&rn});at&&at.image_id!==e&&n(`/map/${at.image_id}`)}).catch(console.error)},[c,Pe,Te,Je,gt,ht,Oe,M,e,n,d,je]);const Ee=async W=>{try{const Se=await fetch("/api/images");if(Se.ok){const Ge=(await Se.json()).filter(Ie=>{const ee=!Pe||Ie.title?.toLowerCase().includes(Pe.toLowerCase())||Ie.generated?.toLowerCase().includes(Pe.toLowerCase())||Ie.source?.toLowerCase().includes(Pe.toLowerCase())||Ie.event_type?.toLowerCase().includes(Pe.toLowerCase()),ut=!Te||Ie.source===Te,mt=!Je||Ie.event_type===Je,dn=!gt||Ie.countries?.some(At=>At.r_code===gt),rn=!ht||Ie.countries?.some(At=>At.c_code===ht),qt=!Oe||Ie.image_type===Oe,Vt=!M||Ie.starred===!0;return ee&&ut&&mt&&dn&&rn&&qt&&Vt}),Xe=Ge.findIndex(Ie=>Ie.image_id===W);ye(Ge.length>1&&Xe>0),re(Ge.length>1&&Xe{if(!le){oe(!0);try{const Se=await fetch("/api/images");if(Se.ok){const Ge=(await Se.json()).filter(ut=>{const mt=!Pe||ut.title?.toLowerCase().includes(Pe.toLowerCase())||ut.generated?.toLowerCase().includes(Pe.toLowerCase())||ut.source?.toLowerCase().includes(Pe.toLowerCase())||ut.event_type?.toLowerCase().includes(Pe.toLowerCase()),dn=!Te||ut.source===Te,rn=!Je||ut.event_type===Je,qt=!gt||ut.countries?.some(L=>L.r_code===gt),Vt=!ht||ut.countries?.some(L=>L.c_code===ht),At=!Oe||ut.image_type===Oe,T=!M||ut.starred===!0;return mt&&dn&&rn&&qt&&Vt&&At&&T}),Xe=Ge.findIndex(ut=>ut.image_id===e);if(Xe===-1){console.error("Current image not found in filtered list");return}let Ie;W==="previous"?Ie=Xe>0?Xe-1:Ge.length-1:Ie=Xe{Promise.all([fetch("/api/sources").then(W=>W.json()),fetch("/api/types").then(W=>W.json()),fetch("/api/image-types").then(W=>W.json()),fetch("/api/regions").then(W=>W.json()),fetch("/api/countries").then(W=>W.json())]).then(([W,Se,at,Ge,Xe])=>{v(W),S(Se),j(at),I(Ge),O(Xe)}).catch(console.error)},[]);const[Ze,vt]=p.useState(!1),ue=async()=>{c&&U(!0)},pt=async()=>{if(c)try{(await fetch(`/api/images/${c.image_id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({starred:!c.starred})})).ok?f(Se=>Se?{...Se,starred:!Se.starred}:null):console.error("Failed to toggle starred status")}catch(W){console.error("Error toggling starred status:",W)}},Mt=async()=>{if(c){Re(!0);try{if(console.log("Deleting image with ID:",c.image_id),(await fetch(`/api/images/${c.image_id}`,{method:"DELETE"})).ok){f(Se=>Se?{...Se,starred:!Se.starred}:null),U(!1);try{const Se=await fetch("/api/images");if(Se.ok){const Ge=(await Se.json()).filter(Ie=>{const ee=!Pe||Ie.title?.toLowerCase().includes(Pe.toLowerCase())||Ie.generated?.toLowerCase().includes(Pe.toLowerCase())||Ie.source?.toLowerCase().includes(Pe.toLowerCase())||Ie.event_type?.toLowerCase().includes(Pe.toLowerCase()),ut=!Te||Ie.source===Te,mt=!Je||Ie.event_type===Je,dn=!gt||Ie.countries?.some(At=>At.r_code===gt),rn=!ht||Ie.countries?.some(At=>At.c_code===ht),qt=!Oe||Ie.image_type===Oe,Vt=!M||Ie.starred===!0;return ee&&ut&&mt&&dn&&rn&&qt&&Vt}),Xe=Ge.filter(Ie=>Ie.image_id!==c.image_id);if(Xe.length>0){const Ie=Ge.findIndex(ut=>ut.image_id===c.image_id);let ee;Ie===Ge.length-1?ee=Ie-1:ee=Ie,console.log("Navigation target:",{currentIndex:Ie,targetIndex:ee,targetId:Xe[ee]?.image_id}),ee>=0&&ee{if(!c)return null;if(!Pe&&!Te&&!Je&&!gt&&!ht&&!Oe&&!M)return c;const W=!Pe||c.title?.toLowerCase().includes(Pe.toLowerCase())||c.generated?.toLowerCase().includes(Pe.toLowerCase())||c.source?.toLowerCase().includes(Pe.toLowerCase())||c.event_type?.toLowerCase().includes(Pe.toLowerCase()),Se=!Te||c.source===Te,at=!Je||c.event_type===Je,Ge=!gt||c.countries.some(ut=>ut.r_code===gt),Xe=!ht||c.countries.some(ut=>ut.c_code===ht),Ie=!Oe||c.image_type===Oe,ee=!M||c.starred===!0;return W&&Se&&at&&Ge&&Xe&&Ie&&ee?c:null},[c,Pe,Te,Je,gt,ht,Oe,M]),Bt=async()=>{if(c){vt(!0);try{const W=await fetch("/api/contribute/from-url",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:c.image_url,source:c.source,event_type:c.event_type,epsg:c.epsg,image_type:c.image_type,countries:c.countries.map(ee=>ee.c_code)})});if(!W.ok){const ee=await W.json();throw new Error(ee.error||"Failed to create contribution")}const Se=await W.json(),at=Se.image_id,Ge=localStorage.getItem("selectedVlmModel"),Xe=await fetch(`/api/images/${at}/caption`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({title:"Generated Caption",prompt:"DEFAULT_CRISIS_MAP",...Ge&&{model_name:Ge}})});if(!Xe.ok){const ee=await Xe.json();throw new Error(ee.error||"Failed to generate caption")}const Ie=`/upload?imageUrl=${encodeURIComponent(Se.image_url)}&isContribution=true&step=2a&imageId=${at}&imageType=${c.image_type}`;n(Ie)}catch(W){console.error("Contribution failed:",W),alert(`Contribution failed: ${W instanceof Error?W.message:"Unknown error"}`)}finally{vt(!1)}}},ot=(W,Se)=>({image:`images/${Se}`,caption:W.edited||W.generated||"",metadata:{image_id:W.image_id,title:W.title,source:W.source,event_type:W.event_type,image_type:W.image_type,countries:W.countries,starred:W.starred}}),nn=async W=>{if(c)try{const Se=(await Hy(async()=>{const{default:ee}=await import("./jszip.min-nJKPel3e.js").then(ut=>ut.j);return{default:ee}},[])).default,at=new Se;if(c.image_type==="crisis_map"){const ee=at.folder("crisis_maps_dataset"),ut=ee?.folder("images");if(ut)try{const mt=await fetch(c.image_url);if(!mt.ok)throw new Error(`Failed to fetch image ${c.image_id}`);const dn=await mt.blob(),qt=`0001.${c.file_key.split(".").pop()||"jpg"}`;if(ut.file(qt,dn),W==="fine-tuning"){const Vt=[],At=[],T=[];if(String(c?.image_type)==="crisis_map"){const L=Math.random();Ln("/explore"),children:"Return to Explore"})]})})}):u.jsxs(cr,{children:[u.jsxs("div",{className:"max-w-7xl mx-auto",children:[u.jsxs("div",{className:bt.tabSelector,children:[u.jsx(Za,{name:"map-details-view",value:a,onChange:W=>{(W==="mapDetails"||W==="explore")&&(s(W),W==="explore"&&n("/explore"))},options:K,keySelector:W=>W.key,labelSelector:W=>W.label}),u.jsx(Me,{name:"export-dataset",variant:"secondary",onClick:()=>Y(!0),children:"Export Dataset"})]}),u.jsxs("div",{className:"mb-6 space-y-4",children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[u.jsx(Qe,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2 flex-1 min-w-[300px]",children:u.jsx(gn,{name:"search",placeholder:"Search examples...",value:Pe,onChange:W=>H(W||"")})}),u.jsx(Qe,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:u.jsxs(Me,{name:"reference-examples",variant:M?"primary":"secondary",onClick:()=>ie(!M),className:"whitespace-nowrap",children:[u.jsx("span",{className:"mr-2",children:M?u.jsx("span",{className:"text-yellow-400",children:"★"}):u.jsx("span",{className:"text-yellow-400",children:"☆"})}),"Reference Examples"]})}),u.jsx(Qe,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:u.jsx(Me,{name:"clear-filters",variant:"secondary",onClick:te,children:"Clear Filters"})})]}),u.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[u.jsx(Qe,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:u.jsx(Un,{name:"source",placeholder:"All Sources",options:_,value:Te||null,onChange:W=>Ye(W||""),keySelector:W=>W.s_code,labelSelector:W=>W.label,required:!1})}),u.jsx(Qe,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:u.jsx(Un,{name:"category",placeholder:"All Categories",options:x,value:Je||null,onChange:W=>jt(W||""),keySelector:W=>W.t_code,labelSelector:W=>W.label,required:!1})}),u.jsx(Qe,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:u.jsx(Un,{name:"region",placeholder:"All Regions",options:N,value:gt||null,onChange:W=>Tt(W||""),keySelector:W=>W.r_code,labelSelector:W=>W.label,required:!1})}),u.jsx(Qe,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:u.jsx(ih,{name:"country",placeholder:"All Countries",options:F,value:ht?[ht]:[],onChange:W=>z(W[0]||""),keySelector:W=>W.c_code,labelSelector:W=>W.label})}),u.jsx(Qe,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:u.jsx(Un,{name:"imageType",placeholder:"All Image Types",options:b,value:Oe||null,onChange:W=>lt(W||""),keySelector:W=>W.image_type,labelSelector:W=>W.label,required:!1})})]})]}),a==="mapDetails"?u.jsx("div",{className:"relative",children:_e?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:bt.gridLayout,children:[u.jsx(Qe,{heading:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{children:_e.title||"Map Image"}),_e.starred&&u.jsx("span",{className:"text-red-500 text-xl",title:"Starred image",children:"★"})]}),headingLevel:2,withHeaderBorder:!0,withInternalPadding:!0,spacing:"comfortable",children:u.jsx("div",{className:bt.imageContainer,children:_e.image_url?u.jsx("img",{src:_e.image_url,alt:_e.file_key}):u.jsx("div",{className:bt.imagePlaceholder,children:"No image available"})})}),u.jsxs("div",{className:bt.detailsSection,children:[u.jsx(Qe,{heading:"Tags",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,spacing:"comfortable",children:u.jsxs("div",{className:bt.metadataTags,children:[_e.image_type!=="drone_image"&&u.jsx("span",{className:bt.metadataTag,children:_.find(W=>W.s_code===_e.source)?.label||_e.source}),u.jsx("span",{className:bt.metadataTag,children:x.find(W=>W.t_code===_e.event_type)?.label||_e.event_type}),u.jsx("span",{className:bt.metadataTag,children:b.find(W=>W.image_type===_e.image_type)?.label||_e.image_type}),_e.countries&&_e.countries.length>0&&u.jsxs(u.Fragment,{children:[u.jsx("span",{className:bt.metadataTag,children:N.find(W=>W.r_code===_e.countries[0].r_code)?.label||"Unknown Region"}),u.jsx("span",{className:bt.metadataTag,children:_e.countries.map(W=>W.label).join(", ")})]})]})}),u.jsx(Qe,{heading:"Description",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,spacing:"comfortable",children:u.jsx("div",{className:bt.captionContainer,children:_e.generated?u.jsx("div",{className:bt.captionText,children:u.jsx("p",{children:_e.edited||_e.generated})}):u.jsx("p",{children:"— no caption yet —"})})})]})]}),u.jsx("div",{className:"flex items-center justify-center mt-8",children:u.jsx(Qe,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-lg p-4",children:u.jsxs("div",{className:"flex items-center gap-4",children:[Z&&u.jsx(Qe,{withInternalPadding:!0,className:"rounded-md p-2",children:u.jsx(Me,{name:"previous-item",variant:"tertiary",size:1,className:`bg-white/90 hover:bg-white shadow-lg border border-gray-200 ${le?"opacity-50 cursor-not-allowed":"hover:scale-110"}`,onClick:()=>Zt("previous"),disabled:le,children:u.jsxs("div",{className:"flex items-center gap-1",children:[u.jsxs("div",{className:"flex -space-x-1",children:[u.jsx(og,{className:"w-4 h-4"}),u.jsx(og,{className:"w-4 h-4"})]}),u.jsx("span",{className:"font-semibold",children:"Previous"})]})})}),i&&u.jsx(Qe,{withInternalPadding:!0,className:"rounded-md p-2",children:u.jsx(Me,{name:"delete",variant:"tertiary",size:1,className:"bg-red-50 hover:bg-red-100 text-red-700 border border-red-200 hover:border-red-300",onClick:ue,title:"Delete","aria-label":"Delete saved image",children:u.jsx(Rd,{className:"w-4 h-4"})})}),u.jsx(Qe,{withInternalPadding:!0,className:"rounded-md p-2",children:u.jsx(Me,{name:"contribute",onClick:Bt,disabled:Ze,children:Ze?u.jsx("span",{children:"Generating..."}):"Contribute"})}),i&&u.jsx(Qe,{withInternalPadding:!0,className:"rounded-md p-2",children:u.jsx(Me,{name:"toggle-star",variant:"tertiary",size:1,className:`${c?.starred?"bg-red-100 hover:bg-red-200 text-red-800 border-2 border-red-400":"bg-gray-100 hover:bg-gray-200 text-gray-600 border-2 border-gray-300"} w-16 h-8 rounded-full transition-all duration-200 flex items-center justify-center`,onClick:pt,title:c?.starred?"Unstar image":"Star image","aria-label":c?.starred?"Unstar image":"Star image",children:u.jsx("span",{className:`text-lg transition-all duration-200 ${c?.starred?"text-red-600":"text-gray-500"}`,children:c?.starred?"★":"☆"})})}),D&&u.jsx(Qe,{withInternalPadding:!0,className:"rounded-md p-2",children:u.jsx(Me,{name:"next-item",variant:"tertiary",size:1,className:`bg-white/90 hover:bg-white shadow-lg border border-gray-200 ${le?"opacity-50 cursor-not-allowed":"hover:scale-110"}`,onClick:()=>Zt("next"),disabled:le,children:u.jsxs("div",{className:"flex items-center gap-1",children:[u.jsx("span",{className:"font-semibold",children:"Next"}),u.jsxs("div",{className:"flex -space-x-1",children:[u.jsx(sg,{className:"w-4 h-4"}),u.jsx(sg,{className:"w-4 h-4"})]})]})})})]})})})]}):u.jsxs("div",{className:"text-center py-12",children:[u.jsx("div",{className:"text-xl font-semibold text-gray-600 mb-4",children:"No matches found"}),u.jsx("div",{className:"mt-4",children:u.jsx(Me,{name:"clear-filters",variant:"secondary",onClick:te,children:"Clear Filters"})})]})}):null]}),R&&u.jsx("div",{className:bt.fullSizeModalOverlay,onClick:()=>U(!1),children:u.jsx("div",{className:bt.fullSizeModalContent,onClick:W=>W.stopPropagation(),children:u.jsxs("div",{className:bt.ratingWarningContent,children:[u.jsx("h3",{className:bt.ratingWarningTitle,children:"Delete Image?"}),u.jsx("p",{className:bt.ratingWarningText,children:"This action cannot be undone. Are you sure you want to delete this saved image and all related data?"}),u.jsxs("div",{className:bt.ratingWarningButtons,children:[u.jsx(Me,{name:"confirm-delete",variant:"secondary",onClick:Mt,children:"Delete"}),u.jsx(Me,{name:"cancel-delete",variant:"tertiary",onClick:()=>U(!1),children:"Cancel"})]})]})})}),J&&u.jsx("div",{className:bt.fullSizeModalOverlay,onClick:()=>Y(!1),children:u.jsx("div",{className:bt.fullSizeModalContent,onClick:W=>W.stopPropagation(),children:u.jsxs("div",{className:bt.ratingWarningContent,children:[u.jsx("h3",{className:bt.ratingWarningTitle,children:"Export Dataset"}),u.jsx("div",{className:bt.exportModeSection,children:u.jsx(Za,{name:"export-mode",value:xe,onChange:W=>{(W==="standard"||W==="fine-tuning")&&Ne(W)},options:[{key:"standard",label:"Standard"},{key:"fine-tuning",label:"Fine-tuning"}],keySelector:W=>W.key,labelSelector:W=>W.label})}),xe==="fine-tuning"&&u.jsxs("div",{className:bt.splitConfigSection,children:[u.jsx("div",{className:bt.splitConfigTitle,children:"Dataset Split Configuration"}),u.jsxs("div",{className:bt.splitInputsContainer,children:[u.jsxs("div",{className:bt.splitInputGroup,children:[u.jsx("label",{htmlFor:"train-split",className:bt.splitInputLabel,children:"Train (%)"}),u.jsx("input",{id:"train-split",type:"number",min:"0",max:"100",value:ne,onChange:W=>{const Se=parseInt(W.target.value)||0,at=100-Se;at>=0&&(X(Se),se+V>at&&(E(Math.floor(at/2)),fe(at-Math.floor(at/2))))},className:bt.splitInput})]}),u.jsxs("div",{className:bt.splitInputGroup,children:[u.jsx("label",{htmlFor:"test-split",className:bt.splitInputLabel,children:"Test (%)"}),u.jsx("input",{id:"test-split",type:"number",min:"0",max:"100",value:se,onChange:W=>{const Se=parseInt(W.target.value)||0,at=100-ne-Se;at>=0&&(E(Se),fe(at))},className:bt.splitInput})]}),u.jsxs("div",{className:bt.splitInputGroup,children:[u.jsx("label",{htmlFor:"val-split",className:bt.splitInputLabel,children:"Val (%)"}),u.jsx("input",{id:"val-split",type:"number",min:"0",max:"100",value:V,onChange:W=>{const Se=parseInt(W.target.value)||0,at=100-ne-Se;at>=0&&(fe(Se),E(at))},className:bt.splitInput})]})]}),ne+se+V!==100&&u.jsx("div",{className:bt.splitTotal,children:u.jsx("span",{className:bt.splitTotalError,children:"Must equal 100%"})})]}),u.jsxs("div",{className:bt.checkboxesContainer,children:[u.jsx("div",{className:"flex items-center gap-3",children:u.jsx(Xl,{name:"crisis-maps",label:"Crisis Maps",value:De,onChange:(W,Se)=>ce(W)})}),u.jsx("div",{className:"flex items-center gap-3",children:u.jsx(Xl,{name:"drone-images",label:"Drone Images",value:ve,onChange:(W,Se)=>we(W)})})]}),u.jsxs("div",{className:bt.ratingWarningButtons,children:[u.jsx(Me,{name:"confirm-export",onClick:()=>{if(!De&&!ve){alert("Please select at least one image type to export.");return}if(c?.image_type==="crisis_map"&&De||c?.image_type==="drone_image"&&ve)nn(xe);else{alert("The current image type is not selected for export.");return}Y(!1)},children:"Export Selected"}),u.jsx(Me,{name:"cancel-export",variant:"tertiary",onClick:()=>Y(!1),children:"Cancel"})]})]})})})]})}const b4="_adminContainer_q6omz_7",S4="_adminHeader_q6omz_23",N4="_adminSection_q6omz_37",E4="_modelSelectionArea_q6omz_55",k4="_modelSelectionRow_q6omz_69",j4="_modelsTable_q6omz_175",T4="_modelCode_q6omz_257",M4="_modelId_q6omz_267",P4="_modelActions_q6omz_279",I4="_addModelButtonContainer_q6omz_291",L4="_addModelForm_q6omz_307",D4="_addModelFormTitle_q6omz_323",R4="_addModelFormGrid_q6omz_339",O4="_addModelFormField_q6omz_365",A4="_addModelFormCheckbox_q6omz_453",$4="_addModelFormActions_q6omz_489",F4="_modalOverlay_q6omz_507",z4="_modalContent_q6omz_535",B4="_modalBody_q6omz_557",U4="_modalTitle_q6omz_577",H4="_modalText_q6omz_593",q4="_modalTextLeft_q6omz_617",V4="_modalButtons_q6omz_663",it={adminContainer:b4,adminHeader:S4,adminSection:N4,modelSelectionArea:E4,modelSelectionRow:k4,modelsTable:j4,modelCode:T4,modelId:M4,modelActions:P4,addModelButtonContainer:I4,addModelForm:L4,addModelFormTitle:D4,addModelFormGrid:R4,addModelFormField:O4,addModelFormCheckbox:A4,addModelFormActions:$4,modalOverlay:F4,modalContent:z4,modalBody:B4,modalTitle:U4,modalText:H4,modalTextLeft:q4,modalButtons:V4},Bl="selectedVlmModel";function W4(){const{isAuthenticated:e,isLoading:n,login:i,logout:a}=ah(),[s,c]=p.useState(""),[f,d]=p.useState(""),[g,y]=p.useState(!1),[w,_]=p.useState([]),[v,x]=p.useState(""),[S,b]=p.useState(!1),[j,N]=p.useState(!1),[I,F]=p.useState(null),[O,Z]=p.useState({m_code:"",label:"",model_type:"custom",provider:"huggingface",model_id:"",is_available:!1}),[ye,D]=p.useState(!1),[re,le]=p.useState(!1),[oe,R]=p.useState(!1),[U,J]=p.useState(""),[Y,xe]=p.useState(""),[Ne,ne]=p.useState(""),[X,se]=p.useState("");p.useEffect(()=>{e&&E()},[e]);const E=()=>{fetch("/api/models").then(H=>H.json()).then(H=>{console.log("Models data received:",H),_(H.models||[]);const Te=localStorage.getItem(Bl);if(H.models&&H.models.length>0)if(Te==="random")x("random");else if(Te&&H.models.find(Ye=>Ye.m_code===Te&&Ye.is_available))x(Te);else{const Ye=H.models.find(Je=>Je.is_available)||H.models[0];x(Ye.m_code),localStorage.setItem(Bl,Ye.m_code)}}).catch(()=>{})},V=async(H,Te)=>{try{const Ye=await fetch(`/api/models/${H}/toggle`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({is_available:!Te})});if(Ye.ok)_(Je=>Je.map(jt=>jt.m_code===H?{...jt,is_available:!Te}:jt));else{const Je=await Ye.json();alert(`Failed to toggle model availability: ${Je.error||"Unknown error"}`)}}catch{alert("Error toggling model availability")}},fe=H=>{x(H),H==="random"?localStorage.setItem(Bl,"random"):localStorage.setItem(Bl,H)},De=async()=>{try{const H=await fetch("/api/admin/models",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("adminToken")}`},body:JSON.stringify(O)});if(H.ok){const Te=` -Model "${O.label}" added successfully! - -⚠️ IMPORTANT: Model will NOT work until you complete these steps: - -1. 🔑 Ensure API key is set and valid. - -2. 📝 Verify model_id format. - -3. 📚 Check model specific documentation for details. - `;xe(Te),le(!0),b(!1),Z({m_code:"",label:"",model_type:"custom",provider:"huggingface",model_id:"",is_available:!1}),E()}else{const Te=await H.json();alert(`Failed to add model: ${Te.detail||"Unknown error"}`)}}catch{alert("Error adding model")}},ce=H=>{F(H),Z({m_code:H.m_code,label:H.label,model_type:H.model_type||"custom",provider:H.provider||H.config?.provider||"huggingface",model_id:H.model_id||H.config?.model_id||H.m_code,is_available:H.is_available}),N(!0)},ve=async()=>{try{console.log("Updating model with data:",O);const H={label:O.label,model_type:O.model_type,provider:O.provider,model_id:O.model_id,is_available:O.is_available};console.log("Update payload:",H);const Te=await fetch(`/api/admin/models/${I.m_code}`,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("adminToken")}`},body:JSON.stringify(H)});if(console.log("Update response status:",Te.status),Te.ok){const Ye=await Te.json();console.log("Update successful:",Ye),N(!1),F(null),Z({m_code:"",label:"",model_type:"custom",provider:"huggingface",model_id:"",is_available:!1}),console.log("Refreshing models..."),E()}else{const Ye=await Te.json();console.error("Update failed:",Ye),alert(`Failed to update model: ${Ye.detail||"Unknown error"}`)}}catch(H){console.error("Update error:",H),alert("Error updating model")}},we=async H=>{J(H),D(!0)},je=async()=>{try{const H=await fetch(`/api/admin/models/${U}`,{method:"DELETE",headers:{Authorization:`Bearer ${localStorage.getItem("adminToken")}`}});if(H.ok)D(!1),J(""),E();else{const Te=await H.json();alert(`Failed to delete model: ${Te.detail||"Unknown error"}`)}}catch{alert("Error deleting model")}},Re=async H=>{if(H.preventDefault(),!s.trim()){d("Please enter a password");return}y(!0),d("");try{await i(s)||d("Invalid password")}catch{d("Login failed. Please try again.")}finally{y(!1)}},Pe=()=>{a(),c(""),d("")};return n?u.jsx(cr,{children:u.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:u.jsxs("div",{className:"text-center",children:[u.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-ifrcRed mx-auto mb-4"}),u.jsx("p",{className:"text-gray-600",children:"Loading..."})]})})}):e?u.jsxs(cr,{children:[u.jsxs("div",{className:it.adminContainer,children:[u.jsx("div",{className:it.adminHeader,children:u.jsx(Me,{name:"logout",variant:"secondary",onClick:Pe,children:"Logout"})}),u.jsxs("div",{className:it.adminSection,children:[u.jsx(Qe,{heading:"VLM Model Selection",headingLevel:2,withHeaderBorder:!0,withInternalPadding:!0,children:u.jsxs("div",{className:it.modelSelectionArea,children:[u.jsx("p",{className:"text-gray-700",children:"Select which Vision Language Model to use for caption generation."}),u.jsx("div",{className:it.modelSelectionRow,children:u.jsx(Un,{label:"Model",name:"selected-model",value:v,onChange:H=>fe(H||""),options:[{value:"random",label:"Random"},...w.filter(H=>H.is_available).map(H=>({value:H.m_code,label:H.label}))],keySelector:H=>H.value,labelSelector:H=>H.label})})]})}),u.jsx(Qe,{heading:"Model Management",headingLevel:2,withHeaderBorder:!0,withInternalPadding:!0,children:u.jsxs("div",{className:it.modelManagementArea,children:[u.jsx("div",{className:it.modelsTable,children:u.jsxs("table",{children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:"Code"}),u.jsx("th",{children:"Label"}),u.jsx("th",{children:"Provider"}),u.jsx("th",{children:"Model ID"}),u.jsx("th",{children:"Available"}),u.jsx("th",{children:"Actions"})]})}),u.jsx("tbody",{children:w.map(H=>u.jsxs("tr",{children:[u.jsx("td",{className:it.modelCode,children:H.m_code}),u.jsx("td",{children:H.label}),u.jsx("td",{children:H.provider||H.config?.provider||"huggingface"}),u.jsx("td",{className:it.modelId,children:H.model_id||H.config?.model_id||H.m_code||"N/A"}),u.jsx("td",{children:u.jsx(Me,{name:`toggle-${H.m_code}`,variant:H.is_available?"primary":"secondary",size:1,onClick:()=>V(H.m_code,H.is_available),children:H.is_available?"Enabled":"Disabled"})}),u.jsx("td",{children:u.jsxs("div",{className:it.modelActions,children:[u.jsx(Me,{name:`edit-${H.m_code}`,variant:"secondary",size:1,onClick:()=>ce(H),children:"Edit"}),u.jsx(Me,{name:`delete-${H.m_code}`,variant:"secondary",size:1,onClick:()=>we(H.m_code),children:"Delete"})]})})]},H.m_code))})]})}),!S&&u.jsx("div",{className:it.addModelButtonContainer,children:u.jsx(Me,{name:"show-add-form",variant:"primary",onClick:()=>b(!0),children:"Add New Model"})}),S&&u.jsxs("div",{className:it.addModelForm,children:[u.jsx("h4",{className:it.addModelFormTitle,children:"Add New Model"}),u.jsxs("div",{className:it.addModelFormGrid,children:[u.jsx("div",{className:it.addModelFormField,children:u.jsx(gn,{label:"Model Code",name:"model-code",value:O.m_code,onChange:H=>Z({...O,m_code:H||""}),placeholder:"e.g., NEW_MODEL_123"})}),u.jsx("div",{className:it.addModelFormField,children:u.jsx(gn,{label:"Label",name:"model-label",value:O.label,onChange:H=>Z({...O,label:H||""}),placeholder:"e.g., New Model Name"})}),u.jsx("div",{className:it.addModelFormField,children:u.jsx(Un,{label:"Provider",name:"model-provider",value:O.provider,onChange:H=>Z({...O,provider:H||"huggingface"}),options:[{value:"huggingface",label:"HuggingFace"},{value:"openai",label:"OpenAI"},{value:"google",label:"Google"}],keySelector:H=>H.value,labelSelector:H=>H.label})}),u.jsx("div",{className:it.addModelFormField,children:u.jsx(gn,{label:"Model ID",name:"model-id",value:O.model_id,onChange:H=>Z({...O,model_id:H||""}),placeholder:"e.g., org/model-name"})}),u.jsx("div",{className:it.addModelFormField,children:u.jsxs("div",{className:it.addModelFormCheckbox,children:[u.jsx("input",{type:"checkbox",checked:O.is_available,onChange:H=>Z({...O,is_available:H.target.checked})}),u.jsx("span",{children:"Available for use"})]})})]}),u.jsxs("div",{className:it.addModelFormActions,children:[u.jsx(Me,{name:"save-model",variant:"primary",onClick:De,disabled:!O.m_code||!O.label||!O.model_id,children:"Save Model"}),u.jsx(Me,{name:"cancel-add",variant:"secondary",onClick:()=>b(!1),children:"Cancel"})]})]}),j&&u.jsxs("div",{className:it.addModelForm,children:[u.jsxs("h4",{className:it.addModelFormTitle,children:["Edit Model: ",I?.label]}),u.jsxs("div",{className:it.addModelFormGrid,children:[u.jsx("div",{className:it.addModelFormField,children:u.jsx(gn,{label:"Model Code",name:"model-code",value:O.m_code,onChange:H=>Z({...O,m_code:H||""}),placeholder:"e.g., NEW_MODEL_123",disabled:!0})}),u.jsx("div",{className:it.addModelFormField,children:u.jsx(gn,{label:"Label",name:"model-label",value:O.label,onChange:H=>Z({...O,label:H||""}),placeholder:"e.g., New Model Name"})}),u.jsx("div",{className:it.addModelFormField,children:u.jsx(Un,{label:"Provider",name:"model-provider",value:O.provider,onChange:H=>Z({...O,provider:H||"huggingface"}),options:[{value:"huggingface",label:"HuggingFace"},{value:"openai",label:"OpenAI"},{value:"google",label:"Google"}],keySelector:H=>H.value,labelSelector:H=>H.label})}),u.jsx("div",{className:it.addModelFormField,children:u.jsx(gn,{label:"Model ID",name:"model-id",value:O.model_id,onChange:H=>Z({...O,model_id:H||""}),placeholder:"e.g., org/model-name"})}),u.jsx("div",{className:it.addModelFormField,children:u.jsxs("div",{className:it.addModelFormCheckbox,children:[u.jsx("input",{type:"checkbox",checked:O.is_available,onChange:H=>Z({...O,is_available:H.target.checked})}),u.jsx("span",{children:"Available for use"})]})})]}),u.jsxs("div",{className:it.addModelFormActions,children:[u.jsx(Me,{name:"update-model",variant:"primary",onClick:ve,disabled:!O.m_code||!O.label||!O.model_id,children:"Update Model"}),u.jsx(Me,{name:"cancel-edit",variant:"secondary",onClick:()=>{N(!1),F(null),Z({m_code:"",label:"",model_type:"custom",provider:"huggingface",model_id:"",is_available:!1})},children:"Cancel"})]})]})]})}),u.jsx(Qe,{heading:"Utilities",headingLevel:2,withHeaderBorder:!0,withInternalPadding:!0,children:u.jsxs("div",{className:"flex flex-wrap gap-4",children:[u.jsx(Me,{name:"test-connection",variant:"secondary",onClick:async()=>{ne("Testing API connection..."),se("Connection Test Results");try{const H=await fetch("/api/models");if(H.ok){const Te=await H.json(),Ye=`✅ API connection successful! - -Found ${Te.models?.length||0} models in database. - -Available models: -${Te.models?.filter(Je=>Je.is_available).map(Je=>`- ${Je.label} (${Je.m_code})`).join(` -`)||"None"}`;ne(Ye)}else{const Te=`❌ API connection failed: HTTP ${H.status}`;ne(Te)}R(!0)}catch(H){const Te=`❌ Connection error: ${H}`;ne(Te),R(!0)}},children:"Test Connection"}),u.jsx(Me,{name:"view-schemas",variant:"secondary",onClick:()=>{fetch("/api/schemas",{headers:{Authorization:`Bearer ${localStorage.getItem("adminToken")}`}}).then(H=>H.json()).then(H=>{console.log("Schemas Response:",H);let Te="",Ye="Schemas Response";H&&Array.isArray(H)?(Te=`Found ${H.length} schemas: - -`,H.forEach((Je,jt)=>{Te+=`=== Schema ${jt+1} === -`,Te+=JSON.stringify(Je,null,2),Te+=` - -`})):H&&typeof H=="object"?Te=`Schemas Response: - -Response type: ${typeof H} -Keys: ${Object.keys(H).join(", ")} - -Raw data: -${JSON.stringify(H,null,2)}`:Te=`Schemas Response: - -Unexpected data type: ${typeof H} -Value: ${H}`,ne(Te),se(Ye),R(!0)}).catch(H=>{console.error("Schemas Error:",H);const Te=`Failed to fetch schemas: ${H.message||"Unknown error"}`;ne(Te),se("Schemas Error"),R(!0)})},children:"View Schemas"})]})})]})]}),ye&&u.jsx("div",{className:it.modalOverlay,onClick:()=>D(!1),children:u.jsx("div",{className:it.modalContent,onClick:H=>H.stopPropagation(),children:u.jsxs("div",{className:it.modalBody,children:[u.jsx("h3",{className:it.modalTitle,children:"Delete Model"}),u.jsxs("p",{className:it.modalText,children:["Are you sure you want to delete model ",u.jsx("span",{className:it.modelCode,children:U}),"? This action cannot be undone."]}),u.jsxs("div",{className:it.modalButtons,children:[u.jsx(Me,{name:"cancel-delete",variant:"tertiary",onClick:()=>D(!1),children:"Cancel"}),u.jsx(Me,{name:"confirm-delete",variant:"secondary",onClick:je,children:"Delete"})]})]})})}),re&&u.jsx("div",{className:it.modalOverlay,onClick:()=>le(!1),children:u.jsx("div",{className:it.modalContent,onClick:H=>H.stopPropagation(),children:u.jsxs("div",{className:it.modalBody,children:[u.jsx("h3",{className:it.modalTitle,children:"Model Added Successfully!"}),u.jsx("div",{className:`${it.modalText} ${it.modalTextLeft}`,children:Y}),u.jsx("div",{className:it.modalButtons,children:u.jsx(Me,{name:"close-setup-instructions",variant:"secondary",onClick:()=>le(!1),children:"Got it!"})})]})})}),oe&&u.jsx("div",{className:it.modalOverlay,onClick:()=>R(!1),children:u.jsx("div",{className:it.modalContent,onClick:H=>H.stopPropagation(),children:u.jsxs("div",{className:it.modalBody,children:[u.jsx("h3",{className:it.modalTitle,children:X}),u.jsx("div",{className:`${it.modalText} ${it.modalTextLeft}`,children:u.jsx("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:Ne})}),u.jsx("div",{className:it.modalButtons,children:u.jsx(Me,{name:"close-test-results",variant:"secondary",onClick:()=>R(!1),children:"Close"})})]})})})]}):u.jsx(cr,{children:u.jsxs("div",{className:"mx-auto max-w-md px-4 sm:px-6 lg:px-8 py-6 sm:py-10",children:[u.jsx("div",{className:"text-center mb-8",children:u.jsx($a,{level:2,children:"Admin Login"})}),u.jsxs("form",{onSubmit:Re,className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-gray-700 mb-2",children:"Password"}),u.jsx(gn,{id:"password",name:"password",type:"password",value:s,onChange:H=>c(H||""),placeholder:"Enter admin password",required:!0,className:"w-full"})]}),f&&u.jsx("div",{className:"bg-ifrcRed/10 border border-ifrcRed/20 rounded-md p-3",children:u.jsx("p",{className:"text-sm text-ifrcRed font-medium",children:f})}),u.jsx("div",{className:"flex justify-center",children:u.jsx(Qe,{withInternalPadding:!0,className:"p-2",children:u.jsx(Me,{name:"login",type:"submit",variant:"primary",size:2,disabled:g,children:g?"Logging in...":"Login"})})})]})]})})}const G4=r_([{element:u.jsx(QM,{}),children:[{path:"/",element:u.jsx(d0,{})},{path:"/upload",element:u.jsx(d0,{})},{path:"/analytics",element:u.jsx(fI,{})},{path:"/explore",element:u.jsx(GI,{})},{path:"/help",element:u.jsx(ZI,{})},{path:"/admin",element:u.jsx(W4,{})},{path:"/map/:mapId",element:u.jsx(C4,{})}]}]);function Z4(){const[e,n]=p.useState([]),i=p.useCallback(d=>{n(g=>j_([...g,d],y=>y.name)??g)},[n]),a=p.useCallback(d=>{n(g=>{const y=g.findIndex(_=>_.name===d);if(y===-1)return g;const w=[...g];return w.splice(y,1),w})},[n]),s=p.useCallback((d,g)=>{n(y=>{const w=y.findIndex(v=>v.name===d);if(w===-1)return y;const _=[...y];return _[w]={..._[w],...g},_})},[n]),c=p.useMemo(()=>({alerts:e,addAlert:i,removeAlert:a,updateAlert:s}),[e,i,a,s]),f=p.useMemo(()=>({languageNamespaceStatus:{},setLanguageNamespaceStatus:()=>{},currentLanguage:"en",setCurrentLanguage:()=>{},strings:{},setStrings:()=>{},registerNamespace:()=>{}}),[]);return u.jsx(S_.Provider,{value:c,children:u.jsx(gf.Provider,{value:f,children:u.jsx(WM,{children:u.jsx(mI,{children:u.jsx(f_,{router:G4})})})})})}function Q4(){return u.jsx(Z4,{})}Px.createRoot(document.getElementById("root")).render(u.jsx(p.StrictMode,{children:u.jsx(Q4,{})}));export{J4 as c,m0 as g};